refactor(schema): extract public event definitions (#33579)

This commit is contained in:
Kit Langton 2026-06-24 22:43:17 +02:00 committed by GitHub
commit 24b0132bc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
93 changed files with 2743 additions and 2127 deletions

View file

@ -1,6 +1,7 @@
export * as Integration from "./integration"
import { Schema } from "effect"
import { define, inventory } from "./event"
export const ID = Schema.String.pipe(Schema.brand("Integration.ID"))
export type ID = typeof ID.Type
@ -72,6 +73,16 @@ export type Method = typeof Method.Type
export const Inputs = Schema.Record(Schema.String, Schema.String).annotate({ identifier: "Integration.Inputs" })
export type Inputs = typeof Inputs.Type
const Updated = define({
type: "integration.updated",
schema: {},
})
const ConnectionUpdated = define({
type: "integration.connection.updated",
schema: { integrationID: ID },
})
export const Event = { Updated, ConnectionUpdated, Definitions: inventory(Updated, ConnectionUpdated) }
export interface Ref extends Schema.Schema.Type<typeof Ref> {}
export const Ref = Schema.Struct({
id: ID,