@wildo-ai/external-connectors-models 1.1.5 → 1.1.6
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/dist/esm/.native.tsbuildinfo +1 -0
- package/dist/esm/core/commons.external-connectors-models.schemas.d.ts +10 -0
- package/dist/esm/core/commons.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/core/commons.external-connectors-models.schemas.js +10 -0
- package/dist/esm/core/commons.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts +52 -0
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js +58 -1
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/billing.standard-interface.schemas.d.ts +129 -4
- package/dist/esm/protocols/billing.standard-interface.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/billing.standard-interface.schemas.js.map +1 -1
- package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts +56 -1
- package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js +25 -0
- package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/email-inbound.standard-interface.schemas.d.ts +229 -0
- package/dist/esm/protocols/email-inbound.standard-interface.schemas.d.ts.map +1 -0
- package/dist/esm/protocols/email-inbound.standard-interface.schemas.js +160 -0
- package/dist/esm/protocols/email-inbound.standard-interface.schemas.js.map +1 -0
- package/dist/esm/protocols/file-storage.standard-interface.d.ts +179 -0
- package/dist/esm/protocols/file-storage.standard-interface.d.ts.map +1 -0
- package/dist/esm/protocols/file-storage.standard-interface.js +79 -0
- package/dist/esm/protocols/file-storage.standard-interface.js.map +1 -0
- package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts +19 -1
- package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/hooks.external-connectors-models.schemas.js +11 -0
- package/dist/esm/protocols/hooks.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts +8 -0
- package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/llm.external-connectors-models.schemas.js +10 -0
- package/dist/esm/protocols/llm.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/provider-oauth2-token-endpoint-hosts.external-connectors-models.d.ts +39 -0
- package/dist/esm/protocols/provider-oauth2-token-endpoint-hosts.external-connectors-models.d.ts.map +1 -0
- package/dist/esm/protocols/provider-oauth2-token-endpoint-hosts.external-connectors-models.js +66 -0
- package/dist/esm/protocols/provider-oauth2-token-endpoint-hosts.external-connectors-models.js.map +1 -0
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts +337 -5
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js +324 -1
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standard File Storage Adapter Interface (#1674)
|
|
3
|
+
* --------
|
|
4
|
+
* The contract a PROVIDER implements so a file storage whose bytes live at a vendor — a person's
|
|
5
|
+
* OneDrive, an organization's SharePoint library, a Dropbox folder — can be contributed by a package
|
|
6
|
+
* instead of being wired into the engine.
|
|
7
|
+
*
|
|
8
|
+
* ## Why it lives here, below the backend library
|
|
9
|
+
*
|
|
10
|
+
* The engine's storage contract (`IFileStorageProvider` in `@wildo-ai/saas-backend-lib`) takes the
|
|
11
|
+
* backend library's `ExecutionContext`. A provider package depends on
|
|
12
|
+
* `@wildo-ai/external-connectors-private`, which `saas-backend-lib` itself depends on, so a package
|
|
13
|
+
* could not implement that interface without a dependency edge pointing the wrong way — the same
|
|
14
|
+
* constraint billing met in #336. This contract sits in `@wildo-ai/external-connectors-models`, below
|
|
15
|
+
* both sides, and deliberately knows nothing about execution contexts, tenants or stored credentials:
|
|
16
|
+
* an adapter receives the ACCESS the engine resolved for one call and the file identifiers, and does
|
|
17
|
+
* the vendor's half of the work.
|
|
18
|
+
*
|
|
19
|
+
* The engine wraps every contributed adapter in its own `IFileStorageProvider`, which keeps everything
|
|
20
|
+
* an adapter must not decide for itself: which grant a file is read through (the person who linked or
|
|
21
|
+
* uploaded it, or the file's organization), the recorded credential use naming the connection and the
|
|
22
|
+
* contributing package, input validation and size limits, and the mapping of a vendor failure onto the
|
|
23
|
+
* application's error vocabulary.
|
|
24
|
+
*
|
|
25
|
+
* ## What it rejects, on purpose
|
|
26
|
+
*
|
|
27
|
+
* Supersedes #336's decision D10 ("file storage stays a separate registry, revisited when a storage
|
|
28
|
+
* vendor package is actually wanted"): Microsoft storage is now wanted from a package. The rejected
|
|
29
|
+
* alternative was #336's billing pattern — a registry of ENGINE-shipped adapters keyed by a declared
|
|
30
|
+
* name — because it keeps the implementation in the engine and so can never admit a package's adapter.
|
|
31
|
+
*
|
|
32
|
+
* The storage VOCABULARY stays closed. An adapter serves a member of `FileStorageAccepted` the engine
|
|
33
|
+
* already declares; it never adds a member. A declared member nothing serves remains a startup refusal.
|
|
34
|
+
*/
|
|
35
|
+
/** What removing a file's row does to the bytes at the vendor. */
|
|
36
|
+
export var ProviderFileStorageDeleteBehavior;
|
|
37
|
+
(function (ProviderFileStorageDeleteBehavior) {
|
|
38
|
+
/** The bytes are the application's, kept at the vendor on its behalf: `delete` removes them. */
|
|
39
|
+
ProviderFileStorageDeleteBehavior["REMOVES_BYTES"] = "REMOVES_BYTES";
|
|
40
|
+
/**
|
|
41
|
+
* The bytes are the owner's own document (a person's file they linked): `delete` forgets the
|
|
42
|
+
* reference and never calls the vendor. Deleting someone's document because an application row went
|
|
43
|
+
* away is an irreversible act that needs a deliberate door of its own.
|
|
44
|
+
*/
|
|
45
|
+
ProviderFileStorageDeleteBehavior["FORGETS_REFERENCE"] = "FORGETS_REFERENCE";
|
|
46
|
+
})(ProviderFileStorageDeleteBehavior || (ProviderFileStorageDeleteBehavior = {}));
|
|
47
|
+
/** Why an adapter could not do what it was asked. The engine maps each to its own error type. */
|
|
48
|
+
export var ProviderFileStorageFailureKind;
|
|
49
|
+
(function (ProviderFileStorageFailureKind) {
|
|
50
|
+
/** The vendor knows no such file for this grant. */
|
|
51
|
+
ProviderFileStorageFailureKind["NOT_FOUND"] = "NOT_FOUND";
|
|
52
|
+
/** The vendor refused the grant for this file (revoked, insufficient scope, not shared with the owner). */
|
|
53
|
+
ProviderFileStorageFailureKind["ACCESS_DENIED"] = "ACCESS_DENIED";
|
|
54
|
+
/** The reference cannot be a file here (a folder, a vendor-native document with no bytes, a malformed id). */
|
|
55
|
+
ProviderFileStorageFailureKind["INVALID_REFERENCE"] = "INVALID_REFERENCE";
|
|
56
|
+
/** The vendor failed or could not be reached. */
|
|
57
|
+
ProviderFileStorageFailureKind["VENDOR_FAILURE"] = "VENDOR_FAILURE";
|
|
58
|
+
})(ProviderFileStorageFailureKind || (ProviderFileStorageFailureKind = {}));
|
|
59
|
+
/**
|
|
60
|
+
* The failure an adapter throws. Anything else an adapter throws is treated as `VENDOR_FAILURE`, so a
|
|
61
|
+
* vendor SDK's own error never reaches a person as an unexplained 500.
|
|
62
|
+
*/
|
|
63
|
+
export class ProviderFileStorageFailure extends Error {
|
|
64
|
+
kind;
|
|
65
|
+
/**
|
|
66
|
+
* The HTTP status the vendor answered with, when it answered. Recorded on the outbound record, so a reviewer
|
|
67
|
+
* can tell a vendor that refused from one that never answered. Leave it out when nothing came back.
|
|
68
|
+
*/
|
|
69
|
+
status;
|
|
70
|
+
constructor(kind, message, options) {
|
|
71
|
+
super(message);
|
|
72
|
+
this.name = 'ProviderFileStorageFailure';
|
|
73
|
+
this.kind = kind;
|
|
74
|
+
if (options?.status !== undefined)
|
|
75
|
+
this.status = options.status;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/** @wildo_source:part:end external-connectors.models.file-storage-adapter */
|
|
79
|
+
//# sourceMappingURL=file-storage.standard-interface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-storage.standard-interface.js","sourceRoot":"","sources":["../../../../src/protocols/file-storage.standard-interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AA0BH,kEAAkE;AAClE,MAAM,CAAN,IAAY,iCASX;AATD,WAAY,iCAAiC;IAC3C,gGAAgG;IAChG,oEAA+B,CAAA;IAC/B;;;;OAIG;IACH,4EAAuC,CAAA;AACzC,CAAC,EATW,iCAAiC,KAAjC,iCAAiC,QAS5C;AAED,iGAAiG;AACjG,MAAM,CAAN,IAAY,8BASX;AATD,WAAY,8BAA8B;IACxC,oDAAoD;IACpD,yDAAuB,CAAA;IACvB,2GAA2G;IAC3G,iEAA+B,CAAA;IAC/B,8GAA8G;IAC9G,yEAAuC,CAAA;IACvC,iDAAiD;IACjD,mEAAiC,CAAA;AACnC,CAAC,EATW,8BAA8B,KAA9B,8BAA8B,QASzC;AAED;;;GAGG;AACH,MAAM,OAAO,0BAA2B,SAAQ,KAAK;IAC1C,IAAI,CAAiC;IAC9C;;;OAGG;IACM,MAAM,CAAU;IAEzB,YAAY,IAAoC,EAAE,OAAe,EAAE,OAAsC;QACvG,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,OAAO,EAAE,MAAM,KAAK,SAAS;YAAE,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAClE,CAAC;CACF;AA8FD,6EAA6E","sourcesContent":["/**\n * Standard File Storage Adapter Interface (#1674)\n * --------\n * The contract a PROVIDER implements so a file storage whose bytes live at a vendor — a person's\n * OneDrive, an organization's SharePoint library, a Dropbox folder — can be contributed by a package\n * instead of being wired into the engine.\n *\n * ## Why it lives here, below the backend library\n *\n * The engine's storage contract (`IFileStorageProvider` in `@wildo-ai/saas-backend-lib`) takes the\n * backend library's `ExecutionContext`. A provider package depends on\n * `@wildo-ai/external-connectors-private`, which `saas-backend-lib` itself depends on, so a package\n * could not implement that interface without a dependency edge pointing the wrong way — the same\n * constraint billing met in #336. This contract sits in `@wildo-ai/external-connectors-models`, below\n * both sides, and deliberately knows nothing about execution contexts, tenants or stored credentials:\n * an adapter receives the ACCESS the engine resolved for one call and the file identifiers, and does\n * the vendor's half of the work.\n *\n * The engine wraps every contributed adapter in its own `IFileStorageProvider`, which keeps everything\n * an adapter must not decide for itself: which grant a file is read through (the person who linked or\n * uploaded it, or the file's organization), the recorded credential use naming the connection and the\n * contributing package, input validation and size limits, and the mapping of a vendor failure onto the\n * application's error vocabulary.\n *\n * ## What it rejects, on purpose\n *\n * Supersedes #336's decision D10 (\"file storage stays a separate registry, revisited when a storage\n * vendor package is actually wanted\"): Microsoft storage is now wanted from a package. The rejected\n * alternative was #336's billing pattern — a registry of ENGINE-shipped adapters keyed by a declared\n * name — because it keeps the implementation in the engine and so can never admit a package's adapter.\n *\n * The storage VOCABULARY stays closed. An adapter serves a member of `FileStorageAccepted` the engine\n * already declares; it never adds a member. A declared member nothing serves remains a startup refusal.\n */\n\nimport type { FileStorageAccepted } from '@wildo-ai/zod-decorators';\n\nimport type { ExternalProvider_Connection_OwnerScope } from '../core/security.external-connectors-models.schemas';\n\n/** @wildo_source:part:start external-connectors.models.file-storage-adapter facet:kind:api facet:audience:app-developer */\n\n/**\n * WHOSE grant a file in this storage is read and written through. A subset of the connection owner\n * vocabulary, not a new one: a vendor storage is reachable through a person's connection or an\n * organization's, never through the application's own account (the application's own bytes live in the\n * framework's storages).\n *\n * - `USER` — the person who LINKED or UPLOADED the file (the row's `uploadedBy`). Another reader still\n * reads it: the application authorizes the ROW, and the storage reads the BYTES as that person.\n * - `ORGANIZATION` — the organization the file belongs to (the row's `organizationId`, which only an\n * organization-scoped file carries).\n *\n * Both are already on the file row, which is what lets erasure and retention reach a file held in\n * someone's own drive.\n */\nexport type ProviderFileStorageGrantOwner =\n | ExternalProvider_Connection_OwnerScope.USER\n | ExternalProvider_Connection_OwnerScope.ORGANIZATION;\n\n/** What removing a file's row does to the bytes at the vendor. */\nexport enum ProviderFileStorageDeleteBehavior {\n /** The bytes are the application's, kept at the vendor on its behalf: `delete` removes them. */\n REMOVES_BYTES = 'REMOVES_BYTES',\n /**\n * The bytes are the owner's own document (a person's file they linked): `delete` forgets the\n * reference and never calls the vendor. Deleting someone's document because an application row went\n * away is an irreversible act that needs a deliberate door of its own.\n */\n FORGETS_REFERENCE = 'FORGETS_REFERENCE',\n}\n\n/** Why an adapter could not do what it was asked. The engine maps each to its own error type. */\nexport enum ProviderFileStorageFailureKind {\n /** The vendor knows no such file for this grant. */\n NOT_FOUND = 'NOT_FOUND',\n /** The vendor refused the grant for this file (revoked, insufficient scope, not shared with the owner). */\n ACCESS_DENIED = 'ACCESS_DENIED',\n /** The reference cannot be a file here (a folder, a vendor-native document with no bytes, a malformed id). */\n INVALID_REFERENCE = 'INVALID_REFERENCE',\n /** The vendor failed or could not be reached. */\n VENDOR_FAILURE = 'VENDOR_FAILURE',\n}\n\n/**\n * The failure an adapter throws. Anything else an adapter throws is treated as `VENDOR_FAILURE`, so a\n * vendor SDK's own error never reaches a person as an unexplained 500.\n */\nexport class ProviderFileStorageFailure extends Error {\n readonly kind: ProviderFileStorageFailureKind;\n /**\n * The HTTP status the vendor answered with, when it answered. Recorded on the outbound record, so a reviewer\n * can tell a vendor that refused from one that never answered. Leave it out when nothing came back.\n */\n readonly status?: number;\n\n constructor(kind: ProviderFileStorageFailureKind, message: string, options?: { readonly status?: number }) {\n super(message);\n this.name = 'ProviderFileStorageFailure';\n this.kind = kind;\n if (options?.status !== undefined) this.status = options.status;\n }\n}\n\n/**\n * The access the engine resolved for ONE call: the delegated token of the grant the file lives under.\n * Resolved, recorded as a credential use and handed over per call, so an adapter never holds a\n * credential between calls and never chooses whose it is.\n */\nexport interface ProviderFileStorageAccess {\n readonly accessToken: string;\n}\n\n/** What the vendor says about one file. */\nexport interface ProviderFileStorageDescription {\n /** The vendor's display name for the file. */\n readonly name: string;\n readonly contentType: string;\n /** Size in bytes. A vendor-native document with no bytes cannot be described: throw `INVALID_REFERENCE`. */\n readonly size: number;\n readonly etag?: string;\n readonly lastModified?: Date;\n}\n\nexport interface ProviderFileStorageUploadRequest {\n readonly access: ProviderFileStorageAccess;\n /** The application's id for the file — stable, never shown to a person. */\n readonly fileId: string;\n /** The name to give the file at the vendor. */\n readonly fileName: string;\n readonly contentType: string;\n /** The size the engine already validated against the application's limit. */\n readonly size: number;\n /** The bytes, streamed. Already bounded by the engine. */\n readonly body: AsyncIterable<Uint8Array>;\n}\n\nexport interface ProviderFileStorageReferenceRequest {\n readonly access: ProviderFileStorageAccess;\n /** The vendor's id for the file, as `upload` returned it or a picker linked it. */\n readonly storageRef: string;\n}\n\nexport interface ProviderFileStorageDownload {\n readonly body: AsyncIterable<Uint8Array>;\n readonly contentType: string;\n readonly size: number;\n readonly etag?: string;\n readonly lastModified?: Date;\n}\n\n/**\n * A file storage a provider contributes. Declared on the provider's backend module\n * (`fileStorageAdapters`); the grant it spends is ITS OWN provider's connection — a module cannot\n * point an adapter at another provider's grant — so a package whose ref belongs to a declared shared\n * connection (`microsoft`, #1725) stores through that one connection.\n *\n * @example\n * ```ts\n * export const oneDriveStorage: ProviderFileStorageAdapter = {\n * storage: FileStorageAccepted.ONEDRIVE,\n * grantOwner: ExternalProvider_Connection_OwnerScope.USER,\n * deleteBehavior: ProviderFileStorageDeleteBehavior.FORGETS_REFERENCE,\n * acceptsRemoteReferences: true,\n * upload: async ({ access, fileName, body }) => ({ storageRef: await putDriveItem(access, fileName, body) }),\n * download: async ({ access, storageRef }) => getDriveItemContent(access, storageRef),\n * describe: async ({ access, storageRef }) => getDriveItem(access, storageRef),\n * delete: async () => undefined,\n * };\n * ```\n */\nexport interface ProviderFileStorageAdapter {\n /**\n * The declared storage member this adapter serves. Exactly one adapter may serve a member.\n *\n * Typed as the member's VALUE (`'onedrive'`) rather than the `@wildo-ai/zod-decorators` enum, so a provider package\n * names it through the vocabulary it can already reach — `FileStorageAccepted.ONEDRIVE` from `@wildo-ai/saas-models`,\n * whose members are held equal to the enum's — without taking a dependency on the decorator package. The set stays\n * closed: the engine refuses a value that is not a member when it admits the adapter.\n */\n readonly storage: `${FileStorageAccepted}`;\n readonly grantOwner: ProviderFileStorageGrantOwner;\n readonly deleteBehavior: ProviderFileStorageDeleteBehavior;\n /**\n * Whether a person may LINK a file that already exists at the vendor (a picker's\n * `REMOTE_REFERENCE`). When true, the engine describes the reference through the linker's grant\n * before a row is created — which is also the proof the reference is real and reachable by them.\n */\n readonly acceptsRemoteReferences: boolean;\n upload(request: ProviderFileStorageUploadRequest): Promise<{ readonly storageRef: string }>;\n download(request: ProviderFileStorageReferenceRequest): Promise<ProviderFileStorageDownload>;\n describe(request: ProviderFileStorageReferenceRequest): Promise<ProviderFileStorageDescription>;\n /** Called only when `deleteBehavior` is `REMOVES_BYTES`. */\n delete(request: ProviderFileStorageReferenceRequest): Promise<void>;\n}\n\n/** @wildo_source:part:end external-connectors.models.file-storage-adapter */\n"]}
|
|
@@ -22,7 +22,18 @@ export declare enum Hook_HandshakeType {
|
|
|
22
22
|
export declare enum Hook_SignatureAlgorithm {
|
|
23
23
|
HMAC_SHA256 = "hmac-sha256",
|
|
24
24
|
HMAC_SHA512 = "hmac-sha512",
|
|
25
|
-
HMAC_SHA1 = "hmac-sha1"
|
|
25
|
+
HMAC_SHA1 = "hmac-sha1",
|
|
26
|
+
/**
|
|
27
|
+
* The Svix / Standard Webhooks v1 construction, verified by the ENGINE (#1600): HMAC-SHA256 over
|
|
28
|
+
* `{svix-id}.{svix-timestamp}.{rawBody}` with the base64 key of a `whsec_` secret, any listed `v1,` signature
|
|
29
|
+
* matching, inside a five-minute window. An endpoint declaring it needs no provider adapter — the provider
|
|
30
|
+
* cannot supply a verifier for it, which is the point: the one fail-closed decision of the inbound path stays
|
|
31
|
+
* in engine code. `svix-id` is the delivery's dedup key.
|
|
32
|
+
*
|
|
33
|
+
* spec-cite: https://docs.svix.com/receiving/verifying-payloads/how-manual — headers, signed content, secret
|
|
34
|
+
* format, versioned signature list and timestamp tolerance.
|
|
35
|
+
*/
|
|
36
|
+
SVIX_V1 = "svix-v1"
|
|
26
37
|
}
|
|
27
38
|
export declare enum Hook_DeliveryStatus {
|
|
28
39
|
PENDING = "pending",
|
|
@@ -158,6 +169,13 @@ export type Hook_Endpoint = {
|
|
|
158
169
|
eventTypes: string[];
|
|
159
170
|
/** Declarative scope binding — how events map to engine scope */
|
|
160
171
|
scopeBinding: Hook_EndpointScopeBinding;
|
|
172
|
+
/**
|
|
173
|
+
* The largest body this endpoint accepts, in bytes, when an inbound handler takes its events (#1596).
|
|
174
|
+
* A larger delivery is refused 413 and audited. Per ENDPOINT, not per route prefix: capping the whole
|
|
175
|
+
* `/webhooks/` family would cap every provider at the smallest endpoint's size. Omitted, the server's
|
|
176
|
+
* own body limit applies.
|
|
177
|
+
*/
|
|
178
|
+
maxBodyBytes?: number;
|
|
161
179
|
};
|
|
162
180
|
export type HookInitiatorProvider_Configuration = ExternalProvider_ExchangeProtocol_Configuration_Base & {
|
|
163
181
|
/** Webhook endpoints — each generates a route: POST /webhooks/{providerRef}/{endpointKey} */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../../src/protocols/hooks.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,cAAc,EACd,oDAAoD,EAErD,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,qDAAqD,CAAC;AACjG,OAAO,EAA2C,yCAAyC,EAAE,MAAM,uDAAuD,CAAC;AAc3J,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EAIrD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,SAAS,0BAA0B,EAKlE,CAAC;AAEF,oBAAY,gBAAgB;IAC1B,IAAI,qBAAqB;IACzB,eAAe,sCAAsC;IACrD,GAAG,oBAAoB;CACxB;AAED,oBAAY,oBAAoB;IAC9B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,WAAW,gBAAgB;CAC5B;AAED,oBAAY,kBAAkB;IAC5B,IAAI,SAAS;IACb,kBAAkB,uBAAuB;IACzC,kBAAkB,uBAAuB;CAC1C;AAED,oBAAY,uBAAuB;IACjC,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,SAAS,cAAc;
|
|
1
|
+
{"version":3,"file":"hooks.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../../src/protocols/hooks.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,cAAc,EACd,oDAAoD,EAErD,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,qDAAqD,CAAC;AACjG,OAAO,EAA2C,yCAAyC,EAAE,MAAM,uDAAuD,CAAC;AAc3J,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EAIrD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,SAAS,0BAA0B,EAKlE,CAAC;AAEF,oBAAY,gBAAgB;IAC1B,IAAI,qBAAqB;IACzB,eAAe,sCAAsC;IACrD,GAAG,oBAAo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AAE,MAAM,CAAC;CACxB,CAAC;AAMF,eAAO,MAAM,2BAA2B;;;;;;;;;iBAMtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAMhF,MAAM,MAAM,wBAAwB,GAAG,yCAAyC,GAAG;IACjF,WAAW,EAAE,gBAAgB,CAAC;IAC9B,sBAAsB,EAAE,OAAO,2BAA2B,CAAC;IAC3D,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC"}
|
|
@@ -46,6 +46,17 @@ export var Hook_SignatureAlgorithm;
|
|
|
46
46
|
Hook_SignatureAlgorithm["HMAC_SHA256"] = "hmac-sha256";
|
|
47
47
|
Hook_SignatureAlgorithm["HMAC_SHA512"] = "hmac-sha512";
|
|
48
48
|
Hook_SignatureAlgorithm["HMAC_SHA1"] = "hmac-sha1";
|
|
49
|
+
/**
|
|
50
|
+
* The Svix / Standard Webhooks v1 construction, verified by the ENGINE (#1600): HMAC-SHA256 over
|
|
51
|
+
* `{svix-id}.{svix-timestamp}.{rawBody}` with the base64 key of a `whsec_` secret, any listed `v1,` signature
|
|
52
|
+
* matching, inside a five-minute window. An endpoint declaring it needs no provider adapter — the provider
|
|
53
|
+
* cannot supply a verifier for it, which is the point: the one fail-closed decision of the inbound path stays
|
|
54
|
+
* in engine code. `svix-id` is the delivery's dedup key.
|
|
55
|
+
*
|
|
56
|
+
* spec-cite: https://docs.svix.com/receiving/verifying-payloads/how-manual — headers, signed content, secret
|
|
57
|
+
* format, versioned signature list and timestamp tolerance.
|
|
58
|
+
*/
|
|
59
|
+
Hook_SignatureAlgorithm["SVIX_V1"] = "svix-v1";
|
|
49
60
|
})(Hook_SignatureAlgorithm || (Hook_SignatureAlgorithm = {}));
|
|
50
61
|
export var Hook_DeliveryStatus;
|
|
51
62
|
(function (Hook_DeliveryStatus) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.external-connectors-models.schemas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;IACxC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAEvC,YAAY;IACZ,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACnC,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAqIH,kEAAkE;AAClE,4BAA4B;AAC5B,kEAAkE;AAElE,MAAM,CAAC,MAAM,2BAA2B,GAAG,uCAAuC,CAAC,MAAM,CAAC;IACxF,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC;IAC3C,iBAAiB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACzC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { \n API_HttpMethod, \n ExternalProvider_ExchangeProtocol_Configuration_Base, \n ExternalProvider_ExchangeProtocol_Kind \n} from \"../core/commons.external-connectors-models.schemas\";\nimport { ExternalProvider_Auth_Kind } from \"../core/security.external-connectors-models.schemas\";\nimport { ExternalProvider_OperationContextSchema, ExternalProvider_OperationDefinition_Base } from \"../core/operations.external-connectors-models.schemas\";\n\n//===============================================================\n// Webhook/Hooks Provider\n// --------\n// Schema definitions for webhook integrations.\n// Supports event subscriptions, signature verification, and\n// delivery management.\n//===============================================================\n\n// ===============================================================\n// Webhook Enums\n// ===============================================================\n\nexport const Hook_HttpMethods: readonly API_HttpMethod[] = [\n API_HttpMethod.POST,\n API_HttpMethod.PUT,\n API_HttpMethod.PATCH,\n];\n\nexport const Hook_SecurityType: readonly ExternalProvider_Auth_Kind[] = [\n ExternalProvider_Auth_Kind.NONE,\n ExternalProvider_Auth_Kind.HMAC_SIGNATURE,\n ExternalProvider_Auth_Kind.BEARER,\n ExternalProvider_Auth_Kind.BASIC,\n];\n\nexport enum Hook_ContentType {\n JSON = \"application/json\",\n FORM_URLENCODED = \"application/x-www-form-urlencoded\",\n XML = \"application/xml\",\n}\n\nexport enum Hook_TriggerStrategy {\n WEBHOOK = \"webhook\",\n POLLING = \"polling\",\n APP_WEBHOOK = \"app_webhook\",\n}\n\nexport enum Hook_HandshakeType {\n NONE = \"none\",\n CHALLENGE_RESPONSE = \"challenge_response\",\n VERIFICATION_TOKEN = \"verification_token\",\n}\n\nexport enum Hook_SignatureAlgorithm {\n HMAC_SHA256 = \"hmac-sha256\",\n HMAC_SHA512 = \"hmac-sha512\",\n HMAC_SHA1 = \"hmac-sha1\",\n}\n\nexport enum Hook_DeliveryStatus {\n PENDING = \"pending\",\n DELIVERED = \"delivered\",\n FAILED = \"failed\",\n RETRYING = \"retrying\",\n}\n\n// ===============================================================\n// Webhook Signature Config\n// ===============================================================\n\nexport const Hook_SignatureConfigSchema = z.object({\n algorithm: z.enum(Hook_SignatureAlgorithm),\n headerName: z.string(), // e.g., \"X-Hub-Signature-256\"\n timestampHeader: z.string().optional(),\n prefix: z.string().optional(), // e.g., \"sha256=\"\n});\nexport type Hook_SignatureConfig = z.infer<typeof Hook_SignatureConfigSchema>;\n\n// ===============================================================\n// Webhook Trigger Spec\n// ===============================================================\n\nexport const Hook_TriggerSpecSchema = z.object({\n strategy: z.enum(Hook_TriggerStrategy),\n \n // Events\n eventTypes: z.array(z.string()).optional(),\n \n // Handshake\n handshakeType: z.enum(Hook_HandshakeType).optional(),\n challengeField: z.string().optional(),\n \n // Signature\n signatureConfig: Hook_SignatureConfigSchema.optional(),\n \n // Polling (for POLLING strategy)\n pollingIntervalMs: z.number().optional(),\n deduplicationKey: z.string().optional(),\n \n // Lifecycle\n hasOnEnable: z.boolean().optional(),\n hasOnDisable: z.boolean().optional(),\n});\nexport type Hook_TriggerSpec = z.infer<typeof Hook_TriggerSpecSchema>;\n\n// ===============================================================\n// Webhook Endpoint Scope Binding (Declarative Scope Resolution)\n// ===============================================================\n\n/**\n * Variant config for polymorphic scope resolution.\n * Each entry represents one variant collection to query during lookup.\n */\nexport interface Hook_PolymorphicVariantBinding {\n /** Variant resource type to query (e.g., 'organizationBillingAccounts') */\n resourceType: string;\n /** Parent resource type (e.g., 'organizations') */\n parentResourceType: string;\n /** Parent field identifier — the scope entity ID field on matched documents (e.g., 'organizationId') */\n parentFieldIdentifier: string;\n /** Whether this variant's parent is a primary scope entity */\n isPrimaryScope: boolean;\n}\n\n/**\n * Declarative scope resolution config for a webhook endpoint.\n * \n * Determines how an incoming webhook event is mapped to a engine scope\n * (organization or user) without writing per-capability code.\n * \n * Three modes:\n * - APPLICATION: Global events, no lookup needed.\n * - Single-scope (ORGANIZATIONS / USER_SELF): Extract an ID from the\n * event payload, look up a single resource type, and resolve the scope entity ID.\n * - Polymorphic: Extract an ID from the event payload, query N variant collections\n * in order, and resolve the scope from whichever variant matches. Used when a\n * resource has been polymorphically expanded across multiple scope types.\n */\nexport type Hook_EndpointScopeBinding =\n | {\n /** Global/application-scoped events — no entity lookup needed */\n primaryScope: 'APPLICATION';\n }\n | {\n /** Scoped events — requires payload extraction + resource lookup */\n primaryScope: 'ORGANIZATIONS' | 'USER_SELF';\n /** Dot-path into the parsed event payload to extract the provider's scope ID (e.g., 'data.object.customer') */\n payloadScopeIdPath: string;\n /** Resource type to query for scope resolution (e.g., 'BILLING_ACCOUNTS') */\n lookupResourceType: string;\n /** Field on the resource to match the extracted ID (e.g., 'providerCustomerId') */\n lookupField: string;\n /** Field on the found resource that gives the scope entity ID (defaults to 'organizationId'/'userId' based on primaryScope) */\n scopeEntityIdField?: string;\n /** Event types that don't carry scope — fall back to APPLICATION scope (e.g., 'product.created', 'price.updated') */\n scopeExemptEventTypes?: string[];\n }\n | {\n /** Polymorphic scope resolution — queries multiple variant collections */\n mode: 'polymorphic';\n /** Dot-path into the parsed event payload to extract the provider's scope ID (e.g., 'data.object.customer') */\n payloadScopeIdPath: string;\n /** Field on each variant resource to match the extracted ID (e.g., 'providerCustomerId') */\n lookupField: string;\n /** Variant collections to query, in order. First match wins. */\n variants: Hook_PolymorphicVariantBinding[];\n /** Event types that don't carry scope — fall back to APPLICATION scope (e.g., 'product.created', 'price.updated') */\n scopeExemptEventTypes?: string[];\n /**\n * Per-event-type overrides for payloadScopeIdPath.\n * Keyed by the provider's native event type (e.g., 'customer.deleted').\n * Use when different event types carry the scope ID at different payload paths.\n */\n eventTypeOverrides?: Record<string, { payloadScopeIdPath: string }>;\n };\n\n// ===============================================================\n// Webhook Endpoint\n// ===============================================================\n\n/**\n * A webhook endpoint for a specific domain/capability within a provider.\n * \n * Each endpoint generates a route: POST /webhooks/{providerRef}/{endpointKey}\n * \n * The endpoint is the SINGLE SOURCE OF TRUTH for all webhook metadata:\n * - Signature config (how to verify)\n * - Event types (what this endpoint handles)\n * - Scope binding (how events map to engine scope)\n * \n * Examples:\n * Stripe: { key: 'billing', capability: 'billing', ... }\n * Google: { key: 'calendar', capability: 'calendar', ... }, { key: 'drive', ... }\n * Microsoft: { key: 'graph', ... }, { key: 'teams', ... }\n */\nexport type Hook_Endpoint = {\n /** Unique key within this provider (used in route: /webhooks/stripe/{key}) */\n key: string;\n /**\n * Optional human-readable name. The runtime projection emitted by\n * `getDefaultProviderConfiguration` does not set this (verified\n * 2026-05-06 — no consumer reads `endpoint.displayName` anywhere\n * in the engine or in `external-connectors-public`); requiring it\n * was aspirational. Future admin/UI surfaces that want to display\n * webhook endpoints should treat the field as optional and fall\n * back to `key` when absent.\n */\n displayName?: string;\n /** Which capability this endpoint serves */\n capability: string;\n /** Signature verification config for this endpoint */\n signatureConfig: Hook_SignatureConfig;\n /** Trigger strategy (webhook push, polling, app_webhook) */\n triggerStrategy: Hook_TriggerStrategy;\n /** Handshake type if applicable */\n handshakeType?: Hook_HandshakeType;\n /** Event types this endpoint handles (single source of truth) */\n eventTypes: string[];\n /** Declarative scope binding — how events map to engine scope */\n scopeBinding: Hook_EndpointScopeBinding;\n};\n\n// ===============================================================\n// Webhook Provider Configuration\n// ===============================================================\n\nexport type HookInitiatorProvider_Configuration = ExternalProvider_ExchangeProtocol_Configuration_Base & {\n /** Webhook endpoints — each generates a route: POST /webhooks/{providerRef}/{endpointKey} */\n endpoints: Hook_Endpoint[];\n /** Per-endpoint webhook secrets: endpointKey → secret value */\n endpointSecrets?: Record<string, string>;\n /** Fallback secret if not specified per-endpoint (legacy compat) */\n webhookSecret?: string;\n};\n\n// ===============================================================\n// Webhook Operation Context\n// ===============================================================\n\nexport const Hook_OperationContextSchema = ExternalProvider_OperationContextSchema.extend({\n eventType: z.string(),\n eventId: z.string().optional(),\n deliveryStatus: z.enum(Hook_DeliveryStatus),\n signatureVerified: z.boolean().optional(),\n pollingCursor: z.string().optional(),\n});\nexport type Hook_OperationContext = z.infer<typeof Hook_OperationContextSchema>;\n\n// ===============================================================\n// Webhook Operation Definition\n// ===============================================================\n\nexport type Hook_OperationDefinition = ExternalProvider_OperationDefinition_Base & {\n triggerSpec: Hook_TriggerSpec;\n operationContextSchema: typeof Hook_OperationContextSchema;\n samplePayload?: unknown;\n};\n\n"]}
|
|
1
|
+
{"version":3,"file":"hooks.external-connectors-models.schemas.js","sourceRoot":"","sources":["../../../../src/protocols/hooks.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,cAAc,EAGf,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,qDAAqD,CAAC;AACjG,OAAO,EAAE,uCAAuC,EAA6C,MAAM,uDAAuD,CAAC;AAE3J,iEAAiE;AACjE,yBAAyB;AACzB,WAAW;AACX,+CAA+C;AAC/C,4DAA4D;AAC5D,uBAAuB;AACvB,iEAAiE;AAEjE,kEAAkE;AAClE,gBAAgB;AAChB,kEAAkE;AAElE,MAAM,CAAC,MAAM,gBAAgB,GAA8B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QAAQ,EAAE;IAC9B,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC;IAC3C,iBAAiB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACzC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { \n API_HttpMethod, \n ExternalProvider_ExchangeProtocol_Configuration_Base, \n ExternalProvider_ExchangeProtocol_Kind \n} from \"../core/commons.external-connectors-models.schemas\";\nimport { ExternalProvider_Auth_Kind } from \"../core/security.external-connectors-models.schemas\";\nimport { ExternalProvider_OperationContextSchema, ExternalProvider_OperationDefinition_Base } from \"../core/operations.external-connectors-models.schemas\";\n\n//===============================================================\n// Webhook/Hooks Provider\n// --------\n// Schema definitions for webhook integrations.\n// Supports event subscriptions, signature verification, and\n// delivery management.\n//===============================================================\n\n// ===============================================================\n// Webhook Enums\n// ===============================================================\n\nexport const Hook_HttpMethods: readonly API_HttpMethod[] = [\n API_HttpMethod.POST,\n API_HttpMethod.PUT,\n API_HttpMethod.PATCH,\n];\n\nexport const Hook_SecurityType: readonly ExternalProvider_Auth_Kind[] = [\n ExternalProvider_Auth_Kind.NONE,\n ExternalProvider_Auth_Kind.HMAC_SIGNATURE,\n ExternalProvider_Auth_Kind.BEARER,\n ExternalProvider_Auth_Kind.BASIC,\n];\n\nexport enum Hook_ContentType {\n JSON = \"application/json\",\n FORM_URLENCODED = \"application/x-www-form-urlencoded\",\n XML = \"application/xml\",\n}\n\nexport enum Hook_TriggerStrategy {\n WEBHOOK = \"webhook\",\n POLLING = \"polling\",\n APP_WEBHOOK = \"app_webhook\",\n}\n\nexport enum Hook_HandshakeType {\n NONE = \"none\",\n CHALLENGE_RESPONSE = \"challenge_response\",\n VERIFICATION_TOKEN = \"verification_token\",\n}\n\nexport enum Hook_SignatureAlgorithm {\n HMAC_SHA256 = \"hmac-sha256\",\n HMAC_SHA512 = \"hmac-sha512\",\n HMAC_SHA1 = \"hmac-sha1\",\n /**\n * The Svix / Standard Webhooks v1 construction, verified by the ENGINE (#1600): HMAC-SHA256 over\n * `{svix-id}.{svix-timestamp}.{rawBody}` with the base64 key of a `whsec_` secret, any listed `v1,` signature\n * matching, inside a five-minute window. An endpoint declaring it needs no provider adapter — the provider\n * cannot supply a verifier for it, which is the point: the one fail-closed decision of the inbound path stays\n * in engine code. `svix-id` is the delivery's dedup key.\n *\n * spec-cite: https://docs.svix.com/receiving/verifying-payloads/how-manual — headers, signed content, secret\n * format, versioned signature list and timestamp tolerance.\n */\n SVIX_V1 = \"svix-v1\",\n}\n\nexport enum Hook_DeliveryStatus {\n PENDING = \"pending\",\n DELIVERED = \"delivered\",\n FAILED = \"failed\",\n RETRYING = \"retrying\",\n}\n\n// ===============================================================\n// Webhook Signature Config\n// ===============================================================\n\nexport const Hook_SignatureConfigSchema = z.object({\n algorithm: z.enum(Hook_SignatureAlgorithm),\n headerName: z.string(), // e.g., \"X-Hub-Signature-256\"\n timestampHeader: z.string().optional(),\n prefix: z.string().optional(), // e.g., \"sha256=\"\n});\nexport type Hook_SignatureConfig = z.infer<typeof Hook_SignatureConfigSchema>;\n\n// ===============================================================\n// Webhook Trigger Spec\n// ===============================================================\n\nexport const Hook_TriggerSpecSchema = z.object({\n strategy: z.enum(Hook_TriggerStrategy),\n \n // Events\n eventTypes: z.array(z.string()).optional(),\n \n // Handshake\n handshakeType: z.enum(Hook_HandshakeType).optional(),\n challengeField: z.string().optional(),\n \n // Signature\n signatureConfig: Hook_SignatureConfigSchema.optional(),\n \n // Polling (for POLLING strategy)\n pollingIntervalMs: z.number().optional(),\n deduplicationKey: z.string().optional(),\n \n // Lifecycle\n hasOnEnable: z.boolean().optional(),\n hasOnDisable: z.boolean().optional(),\n});\nexport type Hook_TriggerSpec = z.infer<typeof Hook_TriggerSpecSchema>;\n\n// ===============================================================\n// Webhook Endpoint Scope Binding (Declarative Scope Resolution)\n// ===============================================================\n\n/**\n * Variant config for polymorphic scope resolution.\n * Each entry represents one variant collection to query during lookup.\n */\nexport interface Hook_PolymorphicVariantBinding {\n /** Variant resource type to query (e.g., 'organizationBillingAccounts') */\n resourceType: string;\n /** Parent resource type (e.g., 'organizations') */\n parentResourceType: string;\n /** Parent field identifier — the scope entity ID field on matched documents (e.g., 'organizationId') */\n parentFieldIdentifier: string;\n /** Whether this variant's parent is a primary scope entity */\n isPrimaryScope: boolean;\n}\n\n/**\n * Declarative scope resolution config for a webhook endpoint.\n * \n * Determines how an incoming webhook event is mapped to a engine scope\n * (organization or user) without writing per-capability code.\n * \n * Three modes:\n * - APPLICATION: Global events, no lookup needed.\n * - Single-scope (ORGANIZATIONS / USER_SELF): Extract an ID from the\n * event payload, look up a single resource type, and resolve the scope entity ID.\n * - Polymorphic: Extract an ID from the event payload, query N variant collections\n * in order, and resolve the scope from whichever variant matches. Used when a\n * resource has been polymorphically expanded across multiple scope types.\n */\nexport type Hook_EndpointScopeBinding =\n | {\n /** Global/application-scoped events — no entity lookup needed */\n primaryScope: 'APPLICATION';\n }\n | {\n /** Scoped events — requires payload extraction + resource lookup */\n primaryScope: 'ORGANIZATIONS' | 'USER_SELF';\n /** Dot-path into the parsed event payload to extract the provider's scope ID (e.g., 'data.object.customer') */\n payloadScopeIdPath: string;\n /** Resource type to query for scope resolution (e.g., 'BILLING_ACCOUNTS') */\n lookupResourceType: string;\n /** Field on the resource to match the extracted ID (e.g., 'providerCustomerId') */\n lookupField: string;\n /** Field on the found resource that gives the scope entity ID (defaults to 'organizationId'/'userId' based on primaryScope) */\n scopeEntityIdField?: string;\n /** Event types that don't carry scope — fall back to APPLICATION scope (e.g., 'product.created', 'price.updated') */\n scopeExemptEventTypes?: string[];\n }\n | {\n /** Polymorphic scope resolution — queries multiple variant collections */\n mode: 'polymorphic';\n /** Dot-path into the parsed event payload to extract the provider's scope ID (e.g., 'data.object.customer') */\n payloadScopeIdPath: string;\n /** Field on each variant resource to match the extracted ID (e.g., 'providerCustomerId') */\n lookupField: string;\n /** Variant collections to query, in order. First match wins. */\n variants: Hook_PolymorphicVariantBinding[];\n /** Event types that don't carry scope — fall back to APPLICATION scope (e.g., 'product.created', 'price.updated') */\n scopeExemptEventTypes?: string[];\n /**\n * Per-event-type overrides for payloadScopeIdPath.\n * Keyed by the provider's native event type (e.g., 'customer.deleted').\n * Use when different event types carry the scope ID at different payload paths.\n */\n eventTypeOverrides?: Record<string, { payloadScopeIdPath: string }>;\n };\n\n// ===============================================================\n// Webhook Endpoint\n// ===============================================================\n\n/**\n * A webhook endpoint for a specific domain/capability within a provider.\n * \n * Each endpoint generates a route: POST /webhooks/{providerRef}/{endpointKey}\n * \n * The endpoint is the SINGLE SOURCE OF TRUTH for all webhook metadata:\n * - Signature config (how to verify)\n * - Event types (what this endpoint handles)\n * - Scope binding (how events map to engine scope)\n * \n * Examples:\n * Stripe: { key: 'billing', capability: 'billing', ... }\n * Google: { key: 'calendar', capability: 'calendar', ... }, { key: 'drive', ... }\n * Microsoft: { key: 'graph', ... }, { key: 'teams', ... }\n */\nexport type Hook_Endpoint = {\n /** Unique key within this provider (used in route: /webhooks/stripe/{key}) */\n key: string;\n /**\n * Optional human-readable name. The runtime projection emitted by\n * `getDefaultProviderConfiguration` does not set this (verified\n * 2026-05-06 — no consumer reads `endpoint.displayName` anywhere\n * in the engine or in `external-connectors-public`); requiring it\n * was aspirational. Future admin/UI surfaces that want to display\n * webhook endpoints should treat the field as optional and fall\n * back to `key` when absent.\n */\n displayName?: string;\n /** Which capability this endpoint serves */\n capability: string;\n /** Signature verification config for this endpoint */\n signatureConfig: Hook_SignatureConfig;\n /** Trigger strategy (webhook push, polling, app_webhook) */\n triggerStrategy: Hook_TriggerStrategy;\n /** Handshake type if applicable */\n handshakeType?: Hook_HandshakeType;\n /** Event types this endpoint handles (single source of truth) */\n eventTypes: string[];\n /** Declarative scope binding — how events map to engine scope */\n scopeBinding: Hook_EndpointScopeBinding;\n /**\n * The largest body this endpoint accepts, in bytes, when an inbound handler takes its events (#1596).\n * A larger delivery is refused 413 and audited. Per ENDPOINT, not per route prefix: capping the whole\n * `/webhooks/` family would cap every provider at the smallest endpoint's size. Omitted, the server's\n * own body limit applies.\n */\n maxBodyBytes?: number;\n};\n\n// ===============================================================\n// Webhook Provider Configuration\n// ===============================================================\n\nexport type HookInitiatorProvider_Configuration = ExternalProvider_ExchangeProtocol_Configuration_Base & {\n /** Webhook endpoints — each generates a route: POST /webhooks/{providerRef}/{endpointKey} */\n endpoints: Hook_Endpoint[];\n /** Per-endpoint webhook secrets: endpointKey → secret value */\n endpointSecrets?: Record<string, string>;\n /** Fallback secret if not specified per-endpoint (legacy compat) */\n webhookSecret?: string;\n};\n\n// ===============================================================\n// Webhook Operation Context\n// ===============================================================\n\nexport const Hook_OperationContextSchema = ExternalProvider_OperationContextSchema.extend({\n eventType: z.string(),\n eventId: z.string().optional(),\n deliveryStatus: z.enum(Hook_DeliveryStatus),\n signatureVerified: z.boolean().optional(),\n pollingCursor: z.string().optional(),\n});\nexport type Hook_OperationContext = z.infer<typeof Hook_OperationContextSchema>;\n\n// ===============================================================\n// Webhook Operation Definition\n// ===============================================================\n\nexport type Hook_OperationDefinition = ExternalProvider_OperationDefinition_Base & {\n triggerSpec: Hook_TriggerSpec;\n operationContextSchema: typeof Hook_OperationContextSchema;\n samplePayload?: unknown;\n};\n\n"]}
|
|
@@ -544,6 +544,10 @@ export declare const LLMProvider_UsageSchema: z.ZodObject<{
|
|
|
544
544
|
cacheReadTokens: z.ZodOptional<z.ZodNumber>;
|
|
545
545
|
cacheWriteTokens: z.ZodOptional<z.ZodNumber>;
|
|
546
546
|
}, z.core.$strip>>;
|
|
547
|
+
outputTokenDetails: z.ZodOptional<z.ZodObject<{
|
|
548
|
+
textTokens: z.ZodOptional<z.ZodNumber>;
|
|
549
|
+
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
550
|
+
}, z.core.$strip>>;
|
|
547
551
|
}, z.core.$strip>;
|
|
548
552
|
export type LLMProvider_Usage = z.infer<typeof LLMProvider_UsageSchema>;
|
|
549
553
|
export declare const LLMProvider_TrackingSchema: z.ZodObject<{
|
|
@@ -812,6 +816,10 @@ export declare const LLMProvider_OperationContext_BaseSchema: z.ZodObject<{
|
|
|
812
816
|
cacheReadTokens: z.ZodOptional<z.ZodNumber>;
|
|
813
817
|
cacheWriteTokens: z.ZodOptional<z.ZodNumber>;
|
|
814
818
|
}, z.core.$strip>>;
|
|
819
|
+
outputTokenDetails: z.ZodOptional<z.ZodObject<{
|
|
820
|
+
textTokens: z.ZodOptional<z.ZodNumber>;
|
|
821
|
+
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
822
|
+
}, z.core.$strip>>;
|
|
815
823
|
}, z.core.$strip>>;
|
|
816
824
|
outputTracking: z.ZodOptional<z.ZodObject<{
|
|
817
825
|
toolsUsed: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../../src/protocols/llm.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,oDAAoD,EAAE,sCAAsC,EAAE,MAAM,oDAAoD,CAAA;AACjK,OAAO,EAAE,yCAAyC,EAA2C,MAAM,uDAAuD,CAAA;AAU1J,oBAAY,SAAS;IAEnB,UAAU,OAAO;IACjB,eAAe,YAAY;IAC3B,eAAe,YAAY;IAC3B,eAAe,YAAY;IAa3B,sCAAsC;IACtC,mBAAmB,gBAAgB;IACnC,+CAA+C;IAC/C,qBAAqB,kBAAkB;IACvC,oCAAoC;IACpC,oBAAoB,iBAAiB;IACrC,wEAAwE;IACxE,eAAe,YAAY;IAC3B,sCAAsC;IACtC,mBAAmB,gBAAgB;IACnC,eAAe,YAAY;IAC3B,aAAa,UAAU;IACvB,kBAAkB,eAAe;IACjC,cAAc,WAAW;IACzB,mBAA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M,WAAW;IACjB,UAAU,eAAe;IACzB,cAAc,mBAAmB;IACjC,aAAa,kBAAkB;IAC/B,KAAK,UAAU;CAChB;AAED,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"llm.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../../src/protocols/llm.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,oDAAoD,EAAE,sCAAsC,EAAE,MAAM,oDAAoD,CAAA;AACjK,OAAO,EAAE,yCAAyC,EAA2C,MAAM,uDAAuD,CAAA;AAU1J,oBAAY,SAAS;IAEnB,UAAU,OAAO;IACjB,eAAe,YAAY;IAC3B,eAAe,YAAY;IAC3B,eAAe,YAAY;IAa3B,sCAAsC;IACtC,mBAAmB,gBAAgB;IACnC,+CAA+C;IAC/C,qBAAqB,kBAAkB;IACvC,oCAAoC;IACpC,oBAAoB,iBAAiB;IACrC,wEAAwE;IACxE,eAAe,YAAY;IAC3B,sCAAsC;IACtC,mBAAmB,gBAAgB;IACnC,eAAe,YAAY;IAC3B,aAAa,UAAU;IACvB,kBAAkB,eAAe;IACjC,cAAc,WAAW;IACzB,mBAAmB,gBAAgB;IACnC,mBAAmB,gBAAgB;IACnC,aAAa,UAAU;IACvB,qBAAqB,kBAAkB;IAWvC,mGAAmG;IACnG,cAAc,mBAAmB;IACjC,2GAA2G;IAC3G,eAAe,oBAAoB;IACnC,6HAA6H;IAC7H,aAAa,kBAAkB;IAC/B,iCAAiC;IACjC,eAAe,oBAAoB;IACnC,oEAAoE;IACpE,eAAe,oBAAoB;IACnC,iBAAiB,sBAAsB;IACvC,gBAAgB,qBAAqB;IAGrC,0BAA0B,wBAAwB;IAClD,mBAAmB,iBAAiB;IACpC,qBAAqB,mBAAmB;IACxC,uBAAuB,qBAAqB;IAC5C,uBAAuB,yBAAyB;IAChD,qBAAqB,mBAAmB;IACxC,uBAAuB,qBAAqB;I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CAAC;AAEH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AACpG,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AAGtG,eAAO,MAAM,uCAAuC;;;iBAGlD,CAAC;AAEH,eAAO,MAAM,wCAAwC;;;iBAGnD,CAAC;AAEH,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAC;AACxG,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wCAAwC,CAAC,CAAC"}
|
|
@@ -885,6 +885,16 @@ export const LLMProvider_UsageSchema = z.object({
|
|
|
885
885
|
cacheReadTokens: z.number().optional(),
|
|
886
886
|
cacheWriteTokens: z.number().optional(),
|
|
887
887
|
}).optional(),
|
|
888
|
+
/**
|
|
889
|
+
* Exact AI-SDK output categories (`LanguageModelUsage.outputTokenDetails`), kept for acquisition-cost
|
|
890
|
+
* accounting (#1598). `reasoningTokens` is part of `completionTokens`, never in addition to it: every
|
|
891
|
+
* provider counts reasoning inside its output total. Absent `reasoningTokens` means the provider did
|
|
892
|
+
* not report the split (Anthropic and Mistral do not), which is NOT zero reasoning.
|
|
893
|
+
*/
|
|
894
|
+
outputTokenDetails: z.object({
|
|
895
|
+
textTokens: z.number().optional(),
|
|
896
|
+
reasoningTokens: z.number().optional(),
|
|
897
|
+
}).optional(),
|
|
888
898
|
});
|
|
889
899
|
export const LLMProvider_TrackingSchema = z.object({
|
|
890
900
|
// Tool execution tracking
|