@shipfox/api-integration-core-dto 3.0.0 → 6.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.
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +25 -0
- package/dist/contracts/integrations.d.ts +15 -0
- package/dist/contracts/integrations.d.ts.map +1 -1
- package/dist/contracts/integrations.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/inter-module.d.ts +303 -0
- package/dist/inter-module.d.ts.map +1 -0
- package/dist/inter-module.js +189 -0
- package/dist/inter-module.js.map +1 -0
- package/dist/ports.d.ts +7 -0
- package/dist/ports.d.ts.map +1 -1
- package/dist/ports.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/dist/webhooks.d.ts +97 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/dist/webhooks.js +151 -0
- package/dist/webhooks.js.map +1 -0
- package/package.json +11 -20
- package/src/contracts/integrations.ts +13 -0
- package/src/index.ts +2 -0
- package/src/inter-module.ts +129 -0
- package/src/ports.ts +6 -0
- package/src/webhooks.test.ts +92 -0
- package/src/webhooks.ts +228 -0
- package/tsconfig.build.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
$ shipfox-swc
|
|
2
|
-
Successfully compiled:
|
|
2
|
+
Successfully compiled: 12 files with swc (389.15ms)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @shipfox/api-integration-core-dto
|
|
2
2
|
|
|
3
|
+
## 6.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 0bb82a4: Adds the Agent and Integrations inter-module APIs, moving Workflows agent configuration, runtime credential resolution, and integration consumers behind producer-owned clients.
|
|
8
|
+
- f262539: Adds a composed webhook processor and optional provider-neutral delivery source for hosted API runtimes.
|
|
9
|
+
- 3bb4e26: Fixes composed webhook processing and exposes Slack URL-verification responses through the shared contract.
|
|
10
|
+
- 4604a06: Adds the shared versioned inbound webhook request and processing contracts.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [81f9544]
|
|
15
|
+
- @shipfox/inter-module@0.2.0
|
|
16
|
+
|
|
17
|
+
## 5.0.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- 2875241: Adds deduplicated Slack installation revocation for app uninstall and bot token-revocation events.
|
|
22
|
+
- fb70438: Cascades provider installation and token deletion when removing a connection.
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- bb037af: Resolves workspace packages from source during development while published consumers continue to use compiled output.
|
|
27
|
+
|
|
3
28
|
## 3.0.0
|
|
4
29
|
|
|
5
30
|
### 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 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../src/contracts/integrations.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAC7C,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,GAAG,aAAa,CAAC;AACrE,MAAM,MAAM,oCAAoC,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;AAEnF,MAAM,WAAW,qBAAqB,CACpC,YAAY,SAAS,uBAAuB,GAAG,uBAAuB;IAEtE,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,YAAY,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,oCAAoC,CAAC;IACtD,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAEjF,MAAM,WAAW,kBAAkB;IACjC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,oBAAoB,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,YAAY,EAA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C;AAErB,qBAAa,wBAAyB,SAAQ,KAAK;aAE/B,MAAM,EAAE,8BAA8B;aAEtC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS;gBAFtC,MAAM,EAAE,8BAA8B,EACtD,OAAO,EAAE,MAAM,EACC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS;CAKzD;AAED,eAAO,MAAM,yBAAyB,UAAY,CAAC;AAEnD,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,qBAAqB,EACjC,OAAO,EAAE;IACP,YAAY,EAAE,qBAAqB,EAAE,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/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * from '#contracts/index.js';
|
|
2
2
|
export * from '#errors.js';
|
|
3
3
|
export * from '#events.js';
|
|
4
|
+
export * from '#inter-module.js';
|
|
4
5
|
export * from '#ports.js';
|
|
5
6
|
export * from '#schemas/index.js';
|
|
6
7
|
export * from '#slug.js';
|
|
8
|
+
export * from '#webhooks.js';
|
|
7
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from '#contracts/index.js';
|
|
2
2
|
export * from '#errors.js';
|
|
3
3
|
export * from '#events.js';
|
|
4
|
+
export * from '#inter-module.js';
|
|
4
5
|
export * from '#ports.js';
|
|
5
6
|
export * from '#schemas/index.js';
|
|
6
7
|
export * from '#slug.js';
|
|
8
|
+
export * from '#webhooks.js';
|
|
7
9
|
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from '#contracts/index.js';\nexport * from '#errors.js';\nexport * from '#events.js';\nexport * from '#ports.js';\nexport * from '#schemas/index.js';\nexport * from '#slug.js';\n"],"names":[],"mappings":"AAAA,cAAc,sBAAsB;AACpC,cAAc,aAAa;AAC3B,cAAc,aAAa;AAC3B,cAAc,YAAY;AAC1B,cAAc,oBAAoB;AAClC,cAAc,WAAW"}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from '#contracts/index.js';\nexport * from '#errors.js';\nexport * from '#events.js';\nexport * from '#inter-module.js';\nexport * from '#ports.js';\nexport * from '#schemas/index.js';\nexport * from '#slug.js';\nexport * from '#webhooks.js';\n"],"names":[],"mappings":"AAAA,cAAc,sBAAsB;AACpC,cAAc,aAAa;AAC3B,cAAc,aAAa;AAC3B,cAAc,mBAAmB;AACjC,cAAc,YAAY;AAC1B,cAAc,oBAAoB;AAClC,cAAc,WAAW;AACzB,cAAc,eAAe"}
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import { type InterModuleClient } from '@shipfox/inter-module';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
/** Producer-owned synchronous operations for the Integrations bounded context. */
|
|
4
|
+
export declare const integrationsInterModuleContract: import("@shipfox/inter-module").InterModuleContract<{
|
|
5
|
+
readonly module: "integrations";
|
|
6
|
+
readonly methods: {
|
|
7
|
+
readonly resolveSourceRepository: {
|
|
8
|
+
readonly input: z.ZodObject<{
|
|
9
|
+
workspaceId: z.ZodString;
|
|
10
|
+
connectionId: z.ZodString;
|
|
11
|
+
externalRepositoryId: z.ZodString;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
readonly output: z.ZodObject<{
|
|
14
|
+
connection: z.ZodObject<{
|
|
15
|
+
id: z.ZodString;
|
|
16
|
+
provider: z.ZodString;
|
|
17
|
+
slug: z.ZodString;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
repository: z.ZodObject<{
|
|
20
|
+
externalRepositoryId: z.ZodString;
|
|
21
|
+
owner: z.ZodString;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
fullName: z.ZodString;
|
|
24
|
+
defaultBranch: z.ZodString;
|
|
25
|
+
visibility: z.ZodEnum<{
|
|
26
|
+
unknown: "unknown";
|
|
27
|
+
public: "public";
|
|
28
|
+
private: "private";
|
|
29
|
+
internal: "internal";
|
|
30
|
+
}>;
|
|
31
|
+
cloneUrl: z.ZodString;
|
|
32
|
+
htmlUrl: z.ZodString;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
readonly errors: {
|
|
36
|
+
'connection-not-found': z.ZodObject<{
|
|
37
|
+
connectionId: z.ZodString;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
'connection-inactive': z.ZodObject<{
|
|
40
|
+
connectionId: z.ZodString;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
'connection-workspace-mismatch': z.ZodObject<{
|
|
43
|
+
connectionId: z.ZodString;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
'provider-unavailable': z.ZodObject<{
|
|
46
|
+
provider: z.ZodString;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
'capability-unavailable': z.ZodObject<{
|
|
49
|
+
provider: z.ZodString;
|
|
50
|
+
capability: z.ZodEnum<{
|
|
51
|
+
source_control: "source_control";
|
|
52
|
+
agent_tools: "agent_tools";
|
|
53
|
+
}>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
'checkout-unsupported': z.ZodObject<{
|
|
56
|
+
provider: z.ZodString;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
'provider-failure': z.ZodObject<{
|
|
59
|
+
reason: z.ZodString;
|
|
60
|
+
retryAfterSeconds: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
readonly listSourceFiles: {
|
|
65
|
+
readonly input: z.ZodObject<{
|
|
66
|
+
workspaceId: z.ZodString;
|
|
67
|
+
connectionId: z.ZodString;
|
|
68
|
+
externalRepositoryId: z.ZodString;
|
|
69
|
+
ref: z.ZodString;
|
|
70
|
+
prefix: z.ZodString;
|
|
71
|
+
limit: z.ZodNumber;
|
|
72
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
readonly output: z.ZodObject<{
|
|
75
|
+
files: z.ZodArray<z.ZodObject<{
|
|
76
|
+
path: z.ZodString;
|
|
77
|
+
type: z.ZodLiteral<"file">;
|
|
78
|
+
size: z.ZodNullable<z.ZodNumber>;
|
|
79
|
+
}, z.core.$strip>>;
|
|
80
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
readonly errors: {
|
|
83
|
+
'connection-not-found': z.ZodObject<{
|
|
84
|
+
connectionId: z.ZodString;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
'connection-inactive': z.ZodObject<{
|
|
87
|
+
connectionId: z.ZodString;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
'connection-workspace-mismatch': z.ZodObject<{
|
|
90
|
+
connectionId: z.ZodString;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
'provider-unavailable': z.ZodObject<{
|
|
93
|
+
provider: z.ZodString;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
'capability-unavailable': z.ZodObject<{
|
|
96
|
+
provider: z.ZodString;
|
|
97
|
+
capability: z.ZodEnum<{
|
|
98
|
+
source_control: "source_control";
|
|
99
|
+
agent_tools: "agent_tools";
|
|
100
|
+
}>;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
'checkout-unsupported': z.ZodObject<{
|
|
103
|
+
provider: z.ZodString;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
'provider-failure': z.ZodObject<{
|
|
106
|
+
reason: z.ZodString;
|
|
107
|
+
retryAfterSeconds: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
}, z.core.$strip>;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
readonly fetchSourceFile: {
|
|
112
|
+
readonly input: z.ZodObject<{
|
|
113
|
+
workspaceId: z.ZodString;
|
|
114
|
+
connectionId: z.ZodString;
|
|
115
|
+
externalRepositoryId: z.ZodString;
|
|
116
|
+
ref: z.ZodString;
|
|
117
|
+
path: z.ZodString;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
readonly output: z.ZodObject<{
|
|
120
|
+
path: z.ZodString;
|
|
121
|
+
ref: z.ZodString;
|
|
122
|
+
content: z.ZodString;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
readonly errors: {
|
|
125
|
+
'connection-not-found': z.ZodObject<{
|
|
126
|
+
connectionId: z.ZodString;
|
|
127
|
+
}, z.core.$strip>;
|
|
128
|
+
'connection-inactive': z.ZodObject<{
|
|
129
|
+
connectionId: z.ZodString;
|
|
130
|
+
}, z.core.$strip>;
|
|
131
|
+
'connection-workspace-mismatch': z.ZodObject<{
|
|
132
|
+
connectionId: z.ZodString;
|
|
133
|
+
}, z.core.$strip>;
|
|
134
|
+
'provider-unavailable': z.ZodObject<{
|
|
135
|
+
provider: z.ZodString;
|
|
136
|
+
}, z.core.$strip>;
|
|
137
|
+
'capability-unavailable': z.ZodObject<{
|
|
138
|
+
provider: z.ZodString;
|
|
139
|
+
capability: z.ZodEnum<{
|
|
140
|
+
source_control: "source_control";
|
|
141
|
+
agent_tools: "agent_tools";
|
|
142
|
+
}>;
|
|
143
|
+
}, z.core.$strip>;
|
|
144
|
+
'checkout-unsupported': z.ZodObject<{
|
|
145
|
+
provider: z.ZodString;
|
|
146
|
+
}, z.core.$strip>;
|
|
147
|
+
'provider-failure': z.ZodObject<{
|
|
148
|
+
reason: z.ZodString;
|
|
149
|
+
retryAfterSeconds: z.ZodOptional<z.ZodNumber>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
readonly createCheckoutSpec: {
|
|
154
|
+
readonly input: z.ZodObject<{
|
|
155
|
+
workspaceId: z.ZodString;
|
|
156
|
+
connectionId: z.ZodString;
|
|
157
|
+
externalRepositoryId: z.ZodString;
|
|
158
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
159
|
+
permissions: z.ZodOptional<z.ZodObject<{
|
|
160
|
+
contents: z.ZodEnum<{
|
|
161
|
+
read: "read";
|
|
162
|
+
write: "write";
|
|
163
|
+
}>;
|
|
164
|
+
}, z.core.$strip>>;
|
|
165
|
+
}, z.core.$strip>;
|
|
166
|
+
readonly output: z.ZodObject<{
|
|
167
|
+
repositoryUrl: z.ZodString;
|
|
168
|
+
ref: z.ZodString;
|
|
169
|
+
credentials: z.ZodOptional<z.ZodObject<{
|
|
170
|
+
username: z.ZodString;
|
|
171
|
+
token: z.ZodString;
|
|
172
|
+
expiresAt: z.ZodString;
|
|
173
|
+
}, z.core.$strip>>;
|
|
174
|
+
gitAuthor: z.ZodOptional<z.ZodObject<{
|
|
175
|
+
name: z.ZodString;
|
|
176
|
+
email: z.ZodString;
|
|
177
|
+
}, z.core.$strip>>;
|
|
178
|
+
}, z.core.$strip>;
|
|
179
|
+
readonly errors: {
|
|
180
|
+
'connection-not-found': z.ZodObject<{
|
|
181
|
+
connectionId: z.ZodString;
|
|
182
|
+
}, z.core.$strip>;
|
|
183
|
+
'connection-inactive': z.ZodObject<{
|
|
184
|
+
connectionId: z.ZodString;
|
|
185
|
+
}, z.core.$strip>;
|
|
186
|
+
'connection-workspace-mismatch': z.ZodObject<{
|
|
187
|
+
connectionId: z.ZodString;
|
|
188
|
+
}, z.core.$strip>;
|
|
189
|
+
'provider-unavailable': z.ZodObject<{
|
|
190
|
+
provider: z.ZodString;
|
|
191
|
+
}, z.core.$strip>;
|
|
192
|
+
'capability-unavailable': z.ZodObject<{
|
|
193
|
+
provider: z.ZodString;
|
|
194
|
+
capability: z.ZodEnum<{
|
|
195
|
+
source_control: "source_control";
|
|
196
|
+
agent_tools: "agent_tools";
|
|
197
|
+
}>;
|
|
198
|
+
}, z.core.$strip>;
|
|
199
|
+
'checkout-unsupported': z.ZodObject<{
|
|
200
|
+
provider: z.ZodString;
|
|
201
|
+
}, z.core.$strip>;
|
|
202
|
+
'provider-failure': z.ZodObject<{
|
|
203
|
+
reason: z.ZodString;
|
|
204
|
+
retryAfterSeconds: z.ZodOptional<z.ZodNumber>;
|
|
205
|
+
}, z.core.$strip>;
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
readonly getAgentToolsContext: {
|
|
209
|
+
readonly input: z.ZodObject<{
|
|
210
|
+
workspaceId: z.ZodString;
|
|
211
|
+
defaultConnectionId: z.ZodString;
|
|
212
|
+
}, z.core.$strip>;
|
|
213
|
+
readonly output: z.ZodObject<{
|
|
214
|
+
selectionCatalogs: z.ZodArray<z.ZodObject<{
|
|
215
|
+
provider: z.ZodString;
|
|
216
|
+
selectors: z.ZodArray<z.ZodObject<{
|
|
217
|
+
token: z.ZodString;
|
|
218
|
+
kind: z.ZodEnum<{
|
|
219
|
+
family: "family";
|
|
220
|
+
family_wildcard: "family_wildcard";
|
|
221
|
+
method: "method";
|
|
222
|
+
standalone: "standalone";
|
|
223
|
+
}>;
|
|
224
|
+
sensitivity: z.ZodEnum<{
|
|
225
|
+
read: "read";
|
|
226
|
+
write: "write";
|
|
227
|
+
}>;
|
|
228
|
+
sensitive: z.ZodBoolean;
|
|
229
|
+
}, z.core.$strip>>;
|
|
230
|
+
}, z.core.$strip>>;
|
|
231
|
+
catalogs: z.ZodArray<z.ZodObject<{
|
|
232
|
+
provider: z.ZodString;
|
|
233
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
234
|
+
id: z.ZodString;
|
|
235
|
+
description: z.ZodString;
|
|
236
|
+
sensitivity: z.ZodEnum<{
|
|
237
|
+
read: "read";
|
|
238
|
+
write: "write";
|
|
239
|
+
}>;
|
|
240
|
+
sensitive: z.ZodBoolean;
|
|
241
|
+
requiredScope: z.ZodUnknown;
|
|
242
|
+
inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
243
|
+
outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
244
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
245
|
+
id: z.ZodString;
|
|
246
|
+
description: z.ZodString;
|
|
247
|
+
sensitivity: z.ZodEnum<{
|
|
248
|
+
read: "read";
|
|
249
|
+
write: "write";
|
|
250
|
+
}>;
|
|
251
|
+
sensitive: z.ZodBoolean;
|
|
252
|
+
requiredScope: z.ZodUnknown;
|
|
253
|
+
}, z.core.$strip>>>;
|
|
254
|
+
}, z.core.$strip>>;
|
|
255
|
+
}, z.core.$strip>>;
|
|
256
|
+
workspaceConnections: z.ZodArray<z.ZodObject<{
|
|
257
|
+
slug: z.ZodString;
|
|
258
|
+
id: z.ZodString;
|
|
259
|
+
provider: z.ZodString;
|
|
260
|
+
capabilities: z.ZodArray<z.ZodEnum<{
|
|
261
|
+
source_control: "source_control";
|
|
262
|
+
agent_tools: "agent_tools";
|
|
263
|
+
}>>;
|
|
264
|
+
}, z.core.$strip>>;
|
|
265
|
+
defaultConnection: z.ZodNullable<z.ZodObject<{
|
|
266
|
+
id: z.ZodString;
|
|
267
|
+
slug: z.ZodString;
|
|
268
|
+
provider: z.ZodString;
|
|
269
|
+
}, z.core.$strip>>;
|
|
270
|
+
}, z.core.$strip>;
|
|
271
|
+
readonly errors: {
|
|
272
|
+
'connection-not-found': z.ZodObject<{
|
|
273
|
+
connectionId: z.ZodString;
|
|
274
|
+
}, z.core.$strip>;
|
|
275
|
+
'connection-inactive': z.ZodObject<{
|
|
276
|
+
connectionId: z.ZodString;
|
|
277
|
+
}, z.core.$strip>;
|
|
278
|
+
'connection-workspace-mismatch': z.ZodObject<{
|
|
279
|
+
connectionId: z.ZodString;
|
|
280
|
+
}, z.core.$strip>;
|
|
281
|
+
'provider-unavailable': z.ZodObject<{
|
|
282
|
+
provider: z.ZodString;
|
|
283
|
+
}, z.core.$strip>;
|
|
284
|
+
'capability-unavailable': z.ZodObject<{
|
|
285
|
+
provider: z.ZodString;
|
|
286
|
+
capability: z.ZodEnum<{
|
|
287
|
+
source_control: "source_control";
|
|
288
|
+
agent_tools: "agent_tools";
|
|
289
|
+
}>;
|
|
290
|
+
}, z.core.$strip>;
|
|
291
|
+
'checkout-unsupported': z.ZodObject<{
|
|
292
|
+
provider: z.ZodString;
|
|
293
|
+
}, z.core.$strip>;
|
|
294
|
+
'provider-failure': z.ZodObject<{
|
|
295
|
+
reason: z.ZodString;
|
|
296
|
+
retryAfterSeconds: z.ZodOptional<z.ZodNumber>;
|
|
297
|
+
}, z.core.$strip>;
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
}>;
|
|
302
|
+
export type IntegrationsModuleClient = InterModuleClient<typeof integrationsInterModuleContract>;
|
|
303
|
+
//# sourceMappingURL=inter-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inter-module.d.ts","sourceRoot":"","sources":["../src/inter-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AA8BtB,kFAAkF;AAClF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8F1C,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC,OAAO,+BAA+B,CAAC,CAAC"}
|