@shipfox/api-integration-core-dto 3.0.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  $ shipfox-swc
2
- Successfully compiled: 10 files with swc (385.62ms)
2
+ Successfully compiled: 10 files with swc (311.46ms)
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @shipfox/api-integration-core-dto
2
2
 
3
+ ## 5.0.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 2875241: Adds deduplicated Slack installation revocation for app uninstall and bot token-revocation events.
8
+ - fb70438: Cascades provider installation and token deletion when removing a connection.
9
+
10
+ ### Patch Changes
11
+
12
+ - bb037af: Resolves workspace packages from source during development while published consumers continue to use compiled output.
13
+
3
14
  ## 3.0.0
4
15
 
5
16
  ### Minor Changes
@@ -158,6 +158,21 @@ export interface IntegrationProvider<ProviderKind extends IntegrationProviderKin
158
158
  * no external home or the provider-side record is missing.
159
159
  */
160
160
  connectionExternalUrl?(connection: Connection): Promise<string | undefined>;
161
+ /**
162
+ * Deletes provider-owned persistence rows for a connection inside the caller's
163
+ * transaction. The transaction belongs to the shared integration database, so
164
+ * provider persistence must use it. The core delete route owns the connection row.
165
+ * Providers without either cleanup hook remove only that core row.
166
+ */
167
+ deleteConnectionRecords?(connection: Connection, options: {
168
+ tx: unknown;
169
+ }): Promise<void>;
170
+ /**
171
+ * Deletes provider-owned secrets after the connection transaction commits.
172
+ * External secret stores cannot participate in the database transaction, so a
173
+ * failure is logged after the connection has already been deleted.
174
+ */
175
+ deleteConnectionSecrets?(connection: Connection): Promise<void>;
161
176
  }
162
177
  export interface RegisteredIntegrationProvider<ProviderKind extends IntegrationProviderKind = IntegrationProviderKind, Route = unknown, Connection extends IntegrationConnection<ProviderKind> = IntegrationConnection<ProviderKind>> extends IntegrationProvider<ProviderKind, Route, Connection> {
163
178
  adapters: IntegrationProviderAdapters<Connection>;
@@ -1 +1 @@
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,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;;;;;;;;;;;;EAeF;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,uBAAuB,EACjC,KAAK,EAAE,MAAM,GACZ,MAAM,CAER;AAED,wBAAgB,yBAAyB,CACvC,oBAAoB,EAAE,MAAM,EAC5B,gBAAgB,EAAE,uBAAuB,GACxC,MAAM,CAuBR"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contracts/integrations.ts"],"sourcesContent":["export type IntegrationProviderKind = string;\nexport type IntegrationCapability = 'source_control' | 'agent_tools';\nexport type IntegrationConnectionLifecycleStatus = 'active' | 'disabled' | 'error';\n\nexport interface IntegrationConnection<\n ProviderKind extends IntegrationProviderKind = IntegrationProviderKind,\n> {\n id: string;\n workspaceId: string;\n provider: ProviderKind;\n externalAccountId: string;\n slug: string;\n displayName: string;\n lifecycleStatus: IntegrationConnectionLifecycleStatus;\n createdAt: Date;\n updatedAt: Date;\n}\n\nexport type RepositoryVisibility = 'public' | 'private' | 'internal' | 'unknown';\n\nexport interface RepositorySnapshot {\n externalRepositoryId: string;\n owner: string;\n name: string;\n fullName: string;\n defaultBranch: string;\n visibility: RepositoryVisibility;\n cloneUrl: string;\n htmlUrl: string;\n}\n\nexport interface RepositoryPage {\n repositories: RepositorySnapshot[];\n nextCursor: string | null;\n}\n\nexport interface ListRepositoriesInput<\n Connection extends IntegrationConnection = IntegrationConnection,\n> {\n connection: Connection;\n limit: number;\n cursor?: string | undefined;\n search?: string | undefined;\n}\n\nexport interface ResolveRepositoryInput<\n Connection extends IntegrationConnection = IntegrationConnection,\n> {\n connection: Connection;\n externalRepositoryId: string;\n}\n\nexport interface FileSnapshot {\n path: string;\n ref: string;\n content: string;\n}\n\nexport interface FileEntry {\n path: string;\n type: 'file';\n size: number | null;\n}\n\nexport interface FilePage {\n files: FileEntry[];\n nextCursor: string | null;\n}\n\nexport interface ListFilesInput<Connection extends IntegrationConnection = IntegrationConnection>\n extends ResolveRepositoryInput<Connection> {\n ref: string;\n prefix: string;\n limit: number;\n cursor?: string | undefined;\n}\n\nexport interface FetchFileInput<Connection extends IntegrationConnection = IntegrationConnection>\n extends ResolveRepositoryInput<Connection> {\n ref: string;\n path: string;\n}\n\nexport interface CheckoutCredentials {\n username: string;\n token: string;\n expiresAt: Date;\n}\n\nexport interface CheckoutGitAuthor {\n name: string;\n email: string;\n}\n\nexport interface CheckoutPermissions {\n contents: 'read' | 'write';\n}\n\nexport interface CheckoutSpec {\n /**\n * Clone URL that must never embed authentication material. Credentials live\n * only in `credentials` so a redaction helper can mask them; a provider that\n * embeds a token in this URL would bypass redaction and leak it into logs,\n * `git remote -v`, and persisted job rows.\n */\n repositoryUrl: string;\n ref: string;\n credentials?: CheckoutCredentials | undefined;\n gitAuthor?: CheckoutGitAuthor | undefined;\n}\n\nexport interface CreateCheckoutSpecInput<\n Connection extends IntegrationConnection = IntegrationConnection,\n> extends ResolveRepositoryInput<Connection> {\n ref?: string | undefined;\n permissions?: CheckoutPermissions | undefined;\n}\n\nexport interface SourceControlProvider<\n Connection extends IntegrationConnection = IntegrationConnection,\n> {\n listRepositories(input: ListRepositoriesInput<Connection>): Promise<RepositoryPage>;\n resolveRepository(input: ResolveRepositoryInput<Connection>): Promise<RepositorySnapshot>;\n listFiles(input: ListFilesInput<Connection>): Promise<FilePage>;\n fetchFile(input: FetchFileInput<Connection>): Promise<FileSnapshot>;\n createCheckoutSpec?(input: CreateCheckoutSpecInput<Connection>): Promise<CheckoutSpec>;\n}\n\nexport type AgentToolSensitivity = 'read' | 'write';\nexport type AgentToolJsonSchema = Record<string, unknown>;\n\nexport interface AgentToolCatalogMethod<RequiredScope = unknown> {\n id: string;\n description: string;\n sensitivity: AgentToolSensitivity;\n sensitive: boolean;\n requiredScope: RequiredScope;\n}\n\nexport interface AgentToolCatalogEntry<RequiredScope = unknown> {\n id: string;\n description: string;\n sensitivity: AgentToolSensitivity;\n sensitive: boolean;\n requiredScope: RequiredScope;\n inputSchema: AgentToolJsonSchema;\n outputSchema?: AgentToolJsonSchema | undefined;\n methods?: readonly AgentToolCatalogMethod<RequiredScope>[] | undefined;\n}\n\nexport type AgentToolSelectorKind = 'family' | 'family_wildcard' | 'method' | 'standalone';\n\nexport interface AgentToolSelector {\n readonly token: string;\n readonly kind: AgentToolSelectorKind;\n readonly sensitivity: AgentToolSensitivity;\n readonly sensitive: boolean;\n}\n\nexport interface AgentToolSelectionCatalog {\n readonly selectors: readonly AgentToolSelector[];\n}\n\nexport interface AgentToolCallInput {\n toolId: string;\n arguments: Record<string, unknown>;\n}\n\nexport interface AgentToolSession<CallResult = unknown> {\n call(input: AgentToolCallInput): Promise<CallResult>;\n close?(): Promise<void>;\n}\n\nexport interface OpenAgentToolsSessionInput<\n Connection extends IntegrationConnection = IntegrationConnection,\n RequiredScope = unknown,\n ProviderScope = unknown,\n> {\n connection: Connection;\n tools: readonly AgentToolCatalogEntry<RequiredScope>[];\n scope: ProviderScope;\n}\n\nexport interface AgentToolsProvider<\n Connection extends IntegrationConnection = IntegrationConnection,\n RequiredScope = unknown,\n ProviderScope = unknown,\n CallResult = unknown,\n> {\n catalog():\n | readonly AgentToolCatalogEntry<RequiredScope>[]\n | Promise<readonly AgentToolCatalogEntry<RequiredScope>[]>;\n selectionCatalog(): AgentToolSelectionCatalog | Promise<AgentToolSelectionCatalog>;\n openSession(\n input: OpenAgentToolsSessionInput<Connection, RequiredScope, ProviderScope>,\n ): Promise<AgentToolSession<CallResult>>;\n}\n\nexport interface IntegrationProviderAdapters<\n Connection extends IntegrationConnection = IntegrationConnection,\n> {\n source_control?: SourceControlProvider<Connection> | undefined;\n agent_tools?: AgentToolsProvider<Connection> | undefined;\n}\n\nexport interface IntegrationProvider<\n ProviderKind extends IntegrationProviderKind = IntegrationProviderKind,\n Route = unknown,\n Connection extends IntegrationConnection<ProviderKind> = IntegrationConnection<ProviderKind>,\n> {\n provider: ProviderKind;\n displayName: string;\n adapters?: IntegrationProviderAdapters<Connection> | undefined;\n routes?: Route[] | undefined;\n /**\n * Resolves the provider-side home of a connection (e.g. the Sentry org or the\n * GitHub installation settings page). Returns undefined when the connection has\n * no external home or the provider-side record is missing.\n */\n connectionExternalUrl?(connection: Connection): Promise<string | undefined>;\n}\n\nexport interface RegisteredIntegrationProvider<\n ProviderKind extends IntegrationProviderKind = IntegrationProviderKind,\n Route = unknown,\n Connection extends IntegrationConnection<ProviderKind> = IntegrationConnection<ProviderKind>,\n> extends IntegrationProvider<ProviderKind, Route, Connection> {\n adapters: IntegrationProviderAdapters<Connection>;\n capabilities: IntegrationCapability[];\n}\n\nexport type IntegrationProviderErrorReason =\n | 'repository-not-found'\n | 'installation-not-found'\n | 'file-not-found'\n | 'access-denied'\n | 'rate-limited'\n | 'timeout'\n | 'provider-unavailable'\n | 'malformed-provider-response'\n | 'content-too-large'\n | 'too-many-files';\n\nexport class IntegrationProviderError extends Error {\n constructor(\n public readonly reason: IntegrationProviderErrorReason,\n message: string,\n public readonly retryAfterSeconds?: number | undefined,\n ) {\n super(message);\n this.name = 'IntegrationProviderError';\n }\n}\n\nexport const MAX_REPOSITORY_FILE_BYTES = 1_000_000;\n\nexport function toIntegrationConnectionDto(\n connection: IntegrationConnection,\n options: {\n capabilities: IntegrationCapability[];\n externalUrl?: string | undefined;\n },\n) {\n return {\n id: connection.id,\n workspace_id: connection.workspaceId,\n provider: connection.provider,\n external_account_id: connection.externalAccountId,\n slug: connection.slug,\n display_name: connection.displayName,\n lifecycle_status: connection.lifecycleStatus,\n capabilities: options.capabilities,\n ...(options.externalUrl ? {external_url: options.externalUrl} : {}),\n created_at: connection.createdAt.toISOString(),\n updated_at: connection.updatedAt.toISOString(),\n };\n}\n\nexport function buildProviderRepositoryId(\n provider: IntegrationProviderKind,\n value: string,\n): string {\n return `${provider}:${value}`;\n}\n\nexport function parseProviderRepositoryId(\n externalRepositoryId: string,\n expectedProvider: IntegrationProviderKind,\n): string {\n const separatorIndex = externalRepositoryId.indexOf(':');\n if (separatorIndex <= 0) {\n throw new IntegrationProviderError(\n 'repository-not-found',\n `External repository id is missing a provider prefix: ${externalRepositoryId}`,\n );\n }\n const prefix = externalRepositoryId.slice(0, separatorIndex);\n const value = externalRepositoryId.slice(separatorIndex + 1);\n if (prefix !== expectedProvider) {\n throw new IntegrationProviderError(\n 'repository-not-found',\n `External repository id ${externalRepositoryId} is not owned by provider ${expectedProvider}`,\n );\n }\n if (!value) {\n throw new IntegrationProviderError(\n 'repository-not-found',\n `External repository id ${externalRepositoryId} is missing a provider-owned value`,\n );\n }\n return value;\n}\n"],"names":["IntegrationProviderError","Error","reason","message","retryAfterSeconds","name","MAX_REPOSITORY_FILE_BYTES","toIntegrationConnectionDto","connection","options","id","workspace_id","workspaceId","provider","external_account_id","externalAccountId","slug","display_name","displayName","lifecycle_status","lifecycleStatus","capabilities","externalUrl","external_url","created_at","createdAt","toISOString","updated_at","updatedAt","buildProviderRepositoryId","value","parseProviderRepositoryId","externalRepositoryId","expectedProvider","separatorIndex","indexOf","prefix","slice"],"mappings":"AAmPA,OAAO,MAAMA,iCAAiCC;IAC5C,YACE,AAAgBC,MAAsC,EACtDC,OAAe,EACf,AAAgBC,iBAAsC,CACtD;QACA,KAAK,CAACD,eAJUD,SAAAA,aAEAE,oBAAAA;QAGhB,IAAI,CAACC,IAAI,GAAG;IACd;AACF;AAEA,OAAO,MAAMC,4BAA4B,UAAU;AAEnD,OAAO,SAASC,2BACdC,UAAiC,EACjCC,OAGC;IAED,OAAO;QACLC,IAAIF,WAAWE,EAAE;QACjBC,cAAcH,WAAWI,WAAW;QACpCC,UAAUL,WAAWK,QAAQ;QAC7BC,qBAAqBN,WAAWO,iBAAiB;QACjDC,MAAMR,WAAWQ,IAAI;QACrBC,cAAcT,WAAWU,WAAW;QACpCC,kBAAkBX,WAAWY,eAAe;QAC5CC,cAAcZ,QAAQY,YAAY;QAClC,GAAIZ,QAAQa,WAAW,GAAG;YAACC,cAAcd,QAAQa,WAAW;QAAA,IAAI,CAAC,CAAC;QAClEE,YAAYhB,WAAWiB,SAAS,CAACC,WAAW;QAC5CC,YAAYnB,WAAWoB,SAAS,CAACF,WAAW;IAC9C;AACF;AAEA,OAAO,SAASG,0BACdhB,QAAiC,EACjCiB,KAAa;IAEb,OAAO,GAAGjB,SAAS,CAAC,EAAEiB,OAAO;AAC/B;AAEA,OAAO,SAASC,0BACdC,oBAA4B,EAC5BC,gBAAyC;IAEzC,MAAMC,iBAAiBF,qBAAqBG,OAAO,CAAC;IACpD,IAAID,kBAAkB,GAAG;QACvB,MAAM,IAAIlC,yBACR,wBACA,CAAC,qDAAqD,EAAEgC,sBAAsB;IAElF;IACA,MAAMI,SAASJ,qBAAqBK,KAAK,CAAC,GAAGH;IAC7C,MAAMJ,QAAQE,qBAAqBK,KAAK,CAACH,iBAAiB;IAC1D,IAAIE,WAAWH,kBAAkB;QAC/B,MAAM,IAAIjC,yBACR,wBACA,CAAC,uBAAuB,EAAEgC,qBAAqB,0BAA0B,EAAEC,kBAAkB;IAEjG;IACA,IAAI,CAACH,OAAO;QACV,MAAM,IAAI9B,yBACR,wBACA,CAAC,uBAAuB,EAAEgC,qBAAqB,kCAAkC,CAAC;IAEtF;IACA,OAAOF;AACT"}
1
+ {"version":3,"sources":["../../src/contracts/integrations.ts"],"sourcesContent":["export type IntegrationProviderKind = string;\nexport type IntegrationCapability = 'source_control' | 'agent_tools';\nexport type IntegrationConnectionLifecycleStatus = 'active' | 'disabled' | 'error';\n\nexport interface IntegrationConnection<\n ProviderKind extends IntegrationProviderKind = IntegrationProviderKind,\n> {\n id: string;\n workspaceId: string;\n provider: ProviderKind;\n externalAccountId: string;\n slug: string;\n displayName: string;\n lifecycleStatus: IntegrationConnectionLifecycleStatus;\n createdAt: Date;\n updatedAt: Date;\n}\n\nexport type RepositoryVisibility = 'public' | 'private' | 'internal' | 'unknown';\n\nexport interface RepositorySnapshot {\n externalRepositoryId: string;\n owner: string;\n name: string;\n fullName: string;\n defaultBranch: string;\n visibility: RepositoryVisibility;\n cloneUrl: string;\n htmlUrl: string;\n}\n\nexport interface RepositoryPage {\n repositories: RepositorySnapshot[];\n nextCursor: string | null;\n}\n\nexport interface ListRepositoriesInput<\n Connection extends IntegrationConnection = IntegrationConnection,\n> {\n connection: Connection;\n limit: number;\n cursor?: string | undefined;\n search?: string | undefined;\n}\n\nexport interface ResolveRepositoryInput<\n Connection extends IntegrationConnection = IntegrationConnection,\n> {\n connection: Connection;\n externalRepositoryId: string;\n}\n\nexport interface FileSnapshot {\n path: string;\n ref: string;\n content: string;\n}\n\nexport interface FileEntry {\n path: string;\n type: 'file';\n size: number | null;\n}\n\nexport interface FilePage {\n files: FileEntry[];\n nextCursor: string | null;\n}\n\nexport interface ListFilesInput<Connection extends IntegrationConnection = IntegrationConnection>\n extends ResolveRepositoryInput<Connection> {\n ref: string;\n prefix: string;\n limit: number;\n cursor?: string | undefined;\n}\n\nexport interface FetchFileInput<Connection extends IntegrationConnection = IntegrationConnection>\n extends ResolveRepositoryInput<Connection> {\n ref: string;\n path: string;\n}\n\nexport interface CheckoutCredentials {\n username: string;\n token: string;\n expiresAt: Date;\n}\n\nexport interface CheckoutGitAuthor {\n name: string;\n email: string;\n}\n\nexport interface CheckoutPermissions {\n contents: 'read' | 'write';\n}\n\nexport interface CheckoutSpec {\n /**\n * Clone URL that must never embed authentication material. Credentials live\n * only in `credentials` so a redaction helper can mask them; a provider that\n * embeds a token in this URL would bypass redaction and leak it into logs,\n * `git remote -v`, and persisted job rows.\n */\n repositoryUrl: string;\n ref: string;\n credentials?: CheckoutCredentials | undefined;\n gitAuthor?: CheckoutGitAuthor | undefined;\n}\n\nexport interface CreateCheckoutSpecInput<\n Connection extends IntegrationConnection = IntegrationConnection,\n> extends ResolveRepositoryInput<Connection> {\n ref?: string | undefined;\n permissions?: CheckoutPermissions | undefined;\n}\n\nexport interface SourceControlProvider<\n Connection extends IntegrationConnection = IntegrationConnection,\n> {\n listRepositories(input: ListRepositoriesInput<Connection>): Promise<RepositoryPage>;\n resolveRepository(input: ResolveRepositoryInput<Connection>): Promise<RepositorySnapshot>;\n listFiles(input: ListFilesInput<Connection>): Promise<FilePage>;\n fetchFile(input: FetchFileInput<Connection>): Promise<FileSnapshot>;\n createCheckoutSpec?(input: CreateCheckoutSpecInput<Connection>): Promise<CheckoutSpec>;\n}\n\nexport type AgentToolSensitivity = 'read' | 'write';\nexport type AgentToolJsonSchema = Record<string, unknown>;\n\nexport interface AgentToolCatalogMethod<RequiredScope = unknown> {\n id: string;\n description: string;\n sensitivity: AgentToolSensitivity;\n sensitive: boolean;\n requiredScope: RequiredScope;\n}\n\nexport interface AgentToolCatalogEntry<RequiredScope = unknown> {\n id: string;\n description: string;\n sensitivity: AgentToolSensitivity;\n sensitive: boolean;\n requiredScope: RequiredScope;\n inputSchema: AgentToolJsonSchema;\n outputSchema?: AgentToolJsonSchema | undefined;\n methods?: readonly AgentToolCatalogMethod<RequiredScope>[] | undefined;\n}\n\nexport type AgentToolSelectorKind = 'family' | 'family_wildcard' | 'method' | 'standalone';\n\nexport interface AgentToolSelector {\n readonly token: string;\n readonly kind: AgentToolSelectorKind;\n readonly sensitivity: AgentToolSensitivity;\n readonly sensitive: boolean;\n}\n\nexport interface AgentToolSelectionCatalog {\n readonly selectors: readonly AgentToolSelector[];\n}\n\nexport interface AgentToolCallInput {\n toolId: string;\n arguments: Record<string, unknown>;\n}\n\nexport interface AgentToolSession<CallResult = unknown> {\n call(input: AgentToolCallInput): Promise<CallResult>;\n close?(): Promise<void>;\n}\n\nexport interface OpenAgentToolsSessionInput<\n Connection extends IntegrationConnection = IntegrationConnection,\n RequiredScope = unknown,\n ProviderScope = unknown,\n> {\n connection: Connection;\n tools: readonly AgentToolCatalogEntry<RequiredScope>[];\n scope: ProviderScope;\n}\n\nexport interface AgentToolsProvider<\n Connection extends IntegrationConnection = IntegrationConnection,\n RequiredScope = unknown,\n ProviderScope = unknown,\n CallResult = unknown,\n> {\n catalog():\n | readonly AgentToolCatalogEntry<RequiredScope>[]\n | Promise<readonly AgentToolCatalogEntry<RequiredScope>[]>;\n selectionCatalog(): AgentToolSelectionCatalog | Promise<AgentToolSelectionCatalog>;\n openSession(\n input: OpenAgentToolsSessionInput<Connection, RequiredScope, ProviderScope>,\n ): Promise<AgentToolSession<CallResult>>;\n}\n\nexport interface IntegrationProviderAdapters<\n Connection extends IntegrationConnection = IntegrationConnection,\n> {\n source_control?: SourceControlProvider<Connection> | undefined;\n agent_tools?: AgentToolsProvider<Connection> | undefined;\n}\n\nexport interface IntegrationProvider<\n ProviderKind extends IntegrationProviderKind = IntegrationProviderKind,\n Route = unknown,\n Connection extends IntegrationConnection<ProviderKind> = IntegrationConnection<ProviderKind>,\n> {\n provider: ProviderKind;\n displayName: string;\n adapters?: IntegrationProviderAdapters<Connection> | undefined;\n routes?: Route[] | undefined;\n /**\n * Resolves the provider-side home of a connection (e.g. the Sentry org or the\n * GitHub installation settings page). Returns undefined when the connection has\n * no external home or the provider-side record is missing.\n */\n connectionExternalUrl?(connection: Connection): Promise<string | undefined>;\n /**\n * Deletes provider-owned persistence rows for a connection inside the caller's\n * transaction. The transaction belongs to the shared integration database, so\n * provider persistence must use it. The core delete route owns the connection row.\n * Providers without either cleanup hook remove only that core row.\n */\n deleteConnectionRecords?(connection: Connection, options: {tx: unknown}): Promise<void>;\n /**\n * Deletes provider-owned secrets after the connection transaction commits.\n * External secret stores cannot participate in the database transaction, so a\n * failure is logged after the connection has already been deleted.\n */\n deleteConnectionSecrets?(connection: Connection): Promise<void>;\n}\n\nexport interface RegisteredIntegrationProvider<\n ProviderKind extends IntegrationProviderKind = IntegrationProviderKind,\n Route = unknown,\n Connection extends IntegrationConnection<ProviderKind> = IntegrationConnection<ProviderKind>,\n> extends IntegrationProvider<ProviderKind, Route, Connection> {\n adapters: IntegrationProviderAdapters<Connection>;\n capabilities: IntegrationCapability[];\n}\n\nexport type IntegrationProviderErrorReason =\n | 'repository-not-found'\n | 'installation-not-found'\n | 'file-not-found'\n | 'access-denied'\n | 'rate-limited'\n | 'timeout'\n | 'provider-unavailable'\n | 'malformed-provider-response'\n | 'content-too-large'\n | 'too-many-files';\n\nexport class IntegrationProviderError extends Error {\n constructor(\n public readonly reason: IntegrationProviderErrorReason,\n message: string,\n public readonly retryAfterSeconds?: number | undefined,\n ) {\n super(message);\n this.name = 'IntegrationProviderError';\n }\n}\n\nexport const MAX_REPOSITORY_FILE_BYTES = 1_000_000;\n\nexport function toIntegrationConnectionDto(\n connection: IntegrationConnection,\n options: {\n capabilities: IntegrationCapability[];\n externalUrl?: string | undefined;\n },\n) {\n return {\n id: connection.id,\n workspace_id: connection.workspaceId,\n provider: connection.provider,\n external_account_id: connection.externalAccountId,\n slug: connection.slug,\n display_name: connection.displayName,\n lifecycle_status: connection.lifecycleStatus,\n capabilities: options.capabilities,\n ...(options.externalUrl ? {external_url: options.externalUrl} : {}),\n created_at: connection.createdAt.toISOString(),\n updated_at: connection.updatedAt.toISOString(),\n };\n}\n\nexport function buildProviderRepositoryId(\n provider: IntegrationProviderKind,\n value: string,\n): string {\n return `${provider}:${value}`;\n}\n\nexport function parseProviderRepositoryId(\n externalRepositoryId: string,\n expectedProvider: IntegrationProviderKind,\n): string {\n const separatorIndex = externalRepositoryId.indexOf(':');\n if (separatorIndex <= 0) {\n throw new IntegrationProviderError(\n 'repository-not-found',\n `External repository id is missing a provider prefix: ${externalRepositoryId}`,\n );\n }\n const prefix = externalRepositoryId.slice(0, separatorIndex);\n const value = externalRepositoryId.slice(separatorIndex + 1);\n if (prefix !== expectedProvider) {\n throw new IntegrationProviderError(\n 'repository-not-found',\n `External repository id ${externalRepositoryId} is not owned by provider ${expectedProvider}`,\n );\n }\n if (!value) {\n throw new IntegrationProviderError(\n 'repository-not-found',\n `External repository id ${externalRepositoryId} is missing a provider-owned value`,\n );\n }\n return value;\n}\n"],"names":["IntegrationProviderError","Error","reason","message","retryAfterSeconds","name","MAX_REPOSITORY_FILE_BYTES","toIntegrationConnectionDto","connection","options","id","workspace_id","workspaceId","provider","external_account_id","externalAccountId","slug","display_name","displayName","lifecycle_status","lifecycleStatus","capabilities","externalUrl","external_url","created_at","createdAt","toISOString","updated_at","updatedAt","buildProviderRepositoryId","value","parseProviderRepositoryId","externalRepositoryId","expectedProvider","separatorIndex","indexOf","prefix","slice"],"mappings":"AAgQA,OAAO,MAAMA,iCAAiCC;IAC5C,YACE,AAAgBC,MAAsC,EACtDC,OAAe,EACf,AAAgBC,iBAAsC,CACtD;QACA,KAAK,CAACD,eAJUD,SAAAA,aAEAE,oBAAAA;QAGhB,IAAI,CAACC,IAAI,GAAG;IACd;AACF;AAEA,OAAO,MAAMC,4BAA4B,UAAU;AAEnD,OAAO,SAASC,2BACdC,UAAiC,EACjCC,OAGC;IAED,OAAO;QACLC,IAAIF,WAAWE,EAAE;QACjBC,cAAcH,WAAWI,WAAW;QACpCC,UAAUL,WAAWK,QAAQ;QAC7BC,qBAAqBN,WAAWO,iBAAiB;QACjDC,MAAMR,WAAWQ,IAAI;QACrBC,cAAcT,WAAWU,WAAW;QACpCC,kBAAkBX,WAAWY,eAAe;QAC5CC,cAAcZ,QAAQY,YAAY;QAClC,GAAIZ,QAAQa,WAAW,GAAG;YAACC,cAAcd,QAAQa,WAAW;QAAA,IAAI,CAAC,CAAC;QAClEE,YAAYhB,WAAWiB,SAAS,CAACC,WAAW;QAC5CC,YAAYnB,WAAWoB,SAAS,CAACF,WAAW;IAC9C;AACF;AAEA,OAAO,SAASG,0BACdhB,QAAiC,EACjCiB,KAAa;IAEb,OAAO,GAAGjB,SAAS,CAAC,EAAEiB,OAAO;AAC/B;AAEA,OAAO,SAASC,0BACdC,oBAA4B,EAC5BC,gBAAyC;IAEzC,MAAMC,iBAAiBF,qBAAqBG,OAAO,CAAC;IACpD,IAAID,kBAAkB,GAAG;QACvB,MAAM,IAAIlC,yBACR,wBACA,CAAC,qDAAqD,EAAEgC,sBAAsB;IAElF;IACA,MAAMI,SAASJ,qBAAqBK,KAAK,CAAC,GAAGH;IAC7C,MAAMJ,QAAQE,qBAAqBK,KAAK,CAACH,iBAAiB;IAC1D,IAAIE,WAAWH,kBAAkB;QAC/B,MAAM,IAAIjC,yBACR,wBACA,CAAC,uBAAuB,EAAEgC,qBAAqB,0BAA0B,EAAEC,kBAAkB;IAEjG;IACA,IAAI,CAACH,OAAO;QACV,MAAM,IAAI9B,yBACR,wBACA,CAAC,uBAAuB,EAAEgC,qBAAqB,kCAAkC,CAAC;IAEtF;IACA,OAAOF;AACT"}
package/dist/ports.d.ts CHANGED
@@ -42,6 +42,13 @@ export type RecordDeliveryOnlyFn = (params: {
42
42
  provider: string;
43
43
  deliveryId: string;
44
44
  }) => Promise<void>;
45
+ export type ClaimWebhookDeliveryFn = (params: {
46
+ tx: IntegrationTx;
47
+ provider: string;
48
+ deliveryId: string;
49
+ }) => Promise<{
50
+ claimed: boolean;
51
+ }>;
45
52
  export type GetIntegrationConnectionByIdFn = (id: string, options?: {
46
53
  tx?: IntegrationTx;
47
54
  }) => Promise<IntegrationConnection | undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"ports.d.ts","sourceRoot":"","sources":["../src/ports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,oCAAoC,EACrC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAC,6BAA6B,EAAE,iBAAiB,EAAC,MAAM,YAAY,CAAC;AAQjF;;;;;GAKG;AAEH,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC;AAEhC,MAAM,MAAM,iCAAiC,GAAG,CAAC,MAAM,EAAE;IACvD,EAAE,EAAE,aAAa,CAAC;IAClB,KAAK,EAAE,6BAA6B,CAAC;CACtC,KAAK,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAC,CAAC,CAAC;AAEpC,MAAM,MAAM,6BAA6B,GAAG,CAC1C,MAAM,EAAE;IACN,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MA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C,OAAO,CAAC,CAAC"}
package/dist/ports.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ports.ts"],"sourcesContent":["import type {\n IntegrationConnection,\n IntegrationConnectionLifecycleStatus,\n} from '#contracts/index.js';\nimport type {IntegrationEventReceivedEvent, SourcePushPayload} from '#events.js';\n\n// The persistence seam between the integrations core and a provider package.\n// `@shipfox/api-integration-core` implements these against its own tables and\n// injects them into each provider at composition time, so providers depend only\n// on this contract — never on core itself, which would create a dependency cycle\n// (core composes the providers).\n\n/**\n * Database/transaction handle threaded from core into a provider and back into\n * core-owned persistence. Typed loosely so providers don't take a Drizzle\n * dependency just to pass a transaction through; core supplies the concrete\n * executor and conformance is checked where it wires the providers.\n */\n// biome-ignore lint/suspicious/noExplicitAny: cross-package tx handle, kept opaque to avoid a cyclic dep on core\nexport type IntegrationTx = any;\n\nexport type PublishIntegrationEventReceivedFn = (params: {\n tx: IntegrationTx;\n event: IntegrationEventReceivedEvent;\n}) => Promise<{published: boolean}>;\n\nexport type CreateIntegrationConnectionFn = (\n params: {\n workspaceId: string;\n provider: string;\n externalAccountId: string;\n slug: string;\n displayName: string;\n lifecycleStatus?: IntegrationConnectionLifecycleStatus | undefined;\n },\n options?: {tx?: IntegrationTx},\n) => Promise<IntegrationConnection>;\n\n// Emitted by source-control providers for a single push. The delivery dedup and the outbox\n// rows it writes must commit together, so it requires a transaction, never a bare connection.\nexport type PublishSourcePushFn = (params: {\n tx: IntegrationTx;\n provider: string;\n source: string;\n workspaceId: string;\n connectionId: string;\n connectionName: string;\n deliveryId: string;\n receivedAt: string;\n rawPayload: unknown;\n push: SourcePushPayload;\n}) => Promise<{published: boolean}>;\n\nexport type RecordDeliveryOnlyFn = (params: {\n tx: IntegrationTx;\n provider: string;\n deliveryId: string;\n}) => Promise<void>;\n\nexport type GetIntegrationConnectionByIdFn = (\n id: string,\n options?: {tx?: IntegrationTx},\n) => Promise<IntegrationConnection | undefined>;\n\nexport type UpdateIntegrationConnectionLifecycleStatusFn = (\n params: {id: string; lifecycleStatus: IntegrationConnectionLifecycleStatus},\n options?: {tx?: IntegrationTx},\n) => Promise<IntegrationConnection | undefined>;\n\nexport type DeleteIntegrationConnectionFn = (\n params: {id: string},\n options?: {tx?: IntegrationTx},\n) => Promise<boolean>;\n"],"names":[],"mappings":"AAqEA,WAGsB"}
1
+ {"version":3,"sources":["../src/ports.ts"],"sourcesContent":["import type {\n IntegrationConnection,\n IntegrationConnectionLifecycleStatus,\n} from '#contracts/index.js';\nimport type {IntegrationEventReceivedEvent, SourcePushPayload} from '#events.js';\n\n// The persistence seam between the integrations core and a provider package.\n// `@shipfox/api-integration-core` implements these against its own tables and\n// injects them into each provider at composition time, so providers depend only\n// on this contract — never on core itself, which would create a dependency cycle\n// (core composes the providers).\n\n/**\n * Database/transaction handle threaded from core into a provider and back into\n * core-owned persistence. Typed loosely so providers don't take a Drizzle\n * dependency just to pass a transaction through; core supplies the concrete\n * executor and conformance is checked where it wires the providers.\n */\n// biome-ignore lint/suspicious/noExplicitAny: cross-package tx handle, kept opaque to avoid a cyclic dep on core\nexport type IntegrationTx = any;\n\nexport type PublishIntegrationEventReceivedFn = (params: {\n tx: IntegrationTx;\n event: IntegrationEventReceivedEvent;\n}) => Promise<{published: boolean}>;\n\nexport type CreateIntegrationConnectionFn = (\n params: {\n workspaceId: string;\n provider: string;\n externalAccountId: string;\n slug: string;\n displayName: string;\n lifecycleStatus?: IntegrationConnectionLifecycleStatus | undefined;\n },\n options?: {tx?: IntegrationTx},\n) => Promise<IntegrationConnection>;\n\n// Emitted by source-control providers for a single push. The delivery dedup and the outbox\n// rows it writes must commit together, so it requires a transaction, never a bare connection.\nexport type PublishSourcePushFn = (params: {\n tx: IntegrationTx;\n provider: string;\n source: string;\n workspaceId: string;\n connectionId: string;\n connectionName: string;\n deliveryId: string;\n receivedAt: string;\n rawPayload: unknown;\n push: SourcePushPayload;\n}) => Promise<{published: boolean}>;\n\nexport type RecordDeliveryOnlyFn = (params: {\n tx: IntegrationTx;\n provider: string;\n deliveryId: string;\n}) => Promise<void>;\n\nexport type ClaimWebhookDeliveryFn = (params: {\n tx: IntegrationTx;\n provider: string;\n deliveryId: string;\n}) => Promise<{claimed: boolean}>;\n\nexport type GetIntegrationConnectionByIdFn = (\n id: string,\n options?: {tx?: IntegrationTx},\n) => Promise<IntegrationConnection | undefined>;\n\nexport type UpdateIntegrationConnectionLifecycleStatusFn = (\n params: {id: string; lifecycleStatus: IntegrationConnectionLifecycleStatus},\n options?: {tx?: IntegrationTx},\n) => Promise<IntegrationConnection | undefined>;\n\nexport type DeleteIntegrationConnectionFn = (\n params: {id: string},\n options?: {tx?: IntegrationTx},\n) => Promise<boolean>;\n"],"names":[],"mappings":"AA2EA,WAGsB"}