@wildo-ai/external-connectors-models 1.1.4 → 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.
Files changed (100) hide show
  1. package/dist/esm/companion-exports.d.ts.map +1 -1
  2. package/dist/esm/core/commons.external-connectors-models.schemas.d.ts +23 -132
  3. package/dist/esm/core/commons.external-connectors-models.schemas.d.ts.map +1 -1
  4. package/dist/esm/core/commons.external-connectors-models.schemas.js +23 -31
  5. package/dist/esm/core/commons.external-connectors-models.schemas.js.map +1 -1
  6. package/dist/esm/core/operation-classification.external-connectors-models.schemas.d.ts.map +1 -1
  7. package/dist/esm/core/operation-classification.external-connectors-models.schemas.js.map +1 -1
  8. package/dist/esm/core/security.external-connectors-models.schemas.d.ts +40 -8
  9. package/dist/esm/core/security.external-connectors-models.schemas.d.ts.map +1 -1
  10. package/dist/esm/core/security.external-connectors-models.schemas.js +61 -14
  11. package/dist/esm/core/security.external-connectors-models.schemas.js.map +1 -1
  12. package/dist/esm/index.d.ts +5 -2
  13. package/dist/esm/index.d.ts.map +1 -1
  14. package/dist/esm/index.js +5 -2
  15. package/dist/esm/index.js.map +1 -1
  16. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts +78 -163
  17. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts.map +1 -1
  18. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js +78 -93
  19. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js.map +1 -1
  20. package/dist/esm/protocols/billing.standard-interface.schemas.d.ts +258 -13
  21. package/dist/esm/protocols/billing.standard-interface.schemas.d.ts.map +1 -1
  22. package/dist/esm/protocols/billing.standard-interface.schemas.js +41 -0
  23. package/dist/esm/protocols/billing.standard-interface.schemas.js.map +1 -1
  24. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts +57 -17
  25. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts.map +1 -1
  26. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js +26 -7
  27. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js.map +1 -1
  28. package/dist/esm/protocols/email-inbound.standard-interface.schemas.d.ts +229 -0
  29. package/dist/esm/protocols/email-inbound.standard-interface.schemas.d.ts.map +1 -0
  30. package/dist/esm/protocols/email-inbound.standard-interface.schemas.js +160 -0
  31. package/dist/esm/protocols/email-inbound.standard-interface.schemas.js.map +1 -0
  32. package/dist/esm/protocols/email.external-connectors-models.schemas.d.ts +1 -56
  33. package/dist/esm/protocols/email.external-connectors-models.schemas.d.ts.map +1 -1
  34. package/dist/esm/protocols/email.external-connectors-models.schemas.js +0 -20
  35. package/dist/esm/protocols/email.external-connectors-models.schemas.js.map +1 -1
  36. package/dist/esm/protocols/email.standard-interface.schemas.d.ts +4 -4
  37. package/dist/esm/protocols/email.standard-interface.schemas.d.ts.map +1 -1
  38. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.d.ts +1 -16
  39. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.d.ts.map +1 -1
  40. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.js +4 -9
  41. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.js.map +1 -1
  42. package/dist/esm/protocols/file-storage.standard-interface.d.ts +179 -0
  43. package/dist/esm/protocols/file-storage.standard-interface.d.ts.map +1 -0
  44. package/dist/esm/protocols/file-storage.standard-interface.js +79 -0
  45. package/dist/esm/protocols/file-storage.standard-interface.js.map +1 -0
  46. package/dist/esm/protocols/frontend.external-connectors-models.schemas.d.ts +6 -13
  47. package/dist/esm/protocols/frontend.external-connectors-models.schemas.d.ts.map +1 -1
  48. package/dist/esm/protocols/frontend.external-connectors-models.schemas.js +0 -9
  49. package/dist/esm/protocols/frontend.external-connectors-models.schemas.js.map +1 -1
  50. package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.d.ts.map +1 -1
  51. package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.js.map +1 -1
  52. package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts +20 -16
  53. package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts.map +1 -1
  54. package/dist/esm/protocols/hooks.external-connectors-models.schemas.js +12 -9
  55. package/dist/esm/protocols/hooks.external-connectors-models.schemas.js.map +1 -1
  56. package/dist/esm/protocols/image.external-connectors-models.schemas.d.ts +1 -18
  57. package/dist/esm/protocols/image.external-connectors-models.schemas.d.ts.map +1 -1
  58. package/dist/esm/protocols/image.external-connectors-models.schemas.js +1 -7
  59. package/dist/esm/protocols/image.external-connectors-models.schemas.js.map +1 -1
  60. package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts +100 -40
  61. package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts.map +1 -1
  62. package/dist/esm/protocols/llm.external-connectors-models.schemas.js +164 -41
  63. package/dist/esm/protocols/llm.external-connectors-models.schemas.js.map +1 -1
  64. package/dist/esm/protocols/oauth2-provider-assurance.definitions.d.ts +7 -0
  65. package/dist/esm/protocols/oauth2-provider-assurance.definitions.d.ts.map +1 -0
  66. package/dist/esm/protocols/oauth2-provider-assurance.definitions.js +36 -0
  67. package/dist/esm/protocols/oauth2-provider-assurance.definitions.js.map +1 -0
  68. package/dist/esm/protocols/oauth2-provider-assurance.schemas.d.ts +23 -0
  69. package/dist/esm/protocols/oauth2-provider-assurance.schemas.d.ts.map +1 -0
  70. package/dist/esm/protocols/oauth2-provider-assurance.schemas.js +25 -0
  71. package/dist/esm/protocols/oauth2-provider-assurance.schemas.js.map +1 -0
  72. package/dist/esm/protocols/oauth2.external-connectors-models.schemas.d.ts +0 -148
  73. package/dist/esm/protocols/oauth2.external-connectors-models.schemas.d.ts.map +1 -1
  74. package/dist/esm/protocols/oauth2.external-connectors-models.schemas.js +1 -40
  75. package/dist/esm/protocols/oauth2.external-connectors-models.schemas.js.map +1 -1
  76. package/dist/esm/protocols/provider-oauth2-token-endpoint-hosts.external-connectors-models.d.ts +39 -0
  77. package/dist/esm/protocols/provider-oauth2-token-endpoint-hosts.external-connectors-models.d.ts.map +1 -0
  78. package/dist/esm/protocols/provider-oauth2-token-endpoint-hosts.external-connectors-models.js +66 -0
  79. package/dist/esm/protocols/provider-oauth2-token-endpoint-hosts.external-connectors-models.js.map +1 -0
  80. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts +863 -16
  81. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts.map +1 -1
  82. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js +703 -0
  83. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js.map +1 -1
  84. package/dist/esm/protocols/sms.external-connectors-models.schemas.d.ts +0 -39
  85. package/dist/esm/protocols/sms.external-connectors-models.schemas.d.ts.map +1 -1
  86. package/dist/esm/protocols/sms.external-connectors-models.schemas.js +0 -13
  87. package/dist/esm/protocols/sms.external-connectors-models.schemas.js.map +1 -1
  88. package/dist/esm/protocols/sms.standard-interface.schemas.d.ts +1 -1
  89. package/dist/esm/protocols/sms.standard-interface.schemas.d.ts.map +1 -1
  90. package/dist/esm/protocols/sms.standard-interface.schemas.js.map +1 -1
  91. package/dist/tsconfig.build.tsbuildinfo +1 -1
  92. package/package.json +2 -3
  93. package/dist/esm/core/protocols.external-connectors-models.schemas.d.ts +0 -74
  94. package/dist/esm/core/protocols.external-connectors-models.schemas.d.ts.map +0 -1
  95. package/dist/esm/core/protocols.external-connectors-models.schemas.js +0 -1
  96. package/dist/esm/core/protocols.external-connectors-models.schemas.js.map +0 -1
  97. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.d.ts +0 -37
  98. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.d.ts.map +0 -1
  99. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.js +0 -10
  100. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.js.map +0 -1
@@ -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"]}
@@ -1,16 +1,9 @@
1
- import { z } from "zod";
2
- import { ExternalProvider_ExchangeProtocol_Configuration_Base, ExternalProvider_ExchangeProtocol_Kind, ExternalProvider_ExchangeProtocol_Profile_Base } from "../core/commons.external-connectors-models.schemas";
3
1
  import { ExternalProvider_OperationDefinition_Base } from "../core/operations.external-connectors-models.schemas";
4
- export type FrontendProvider_Profile = ExternalProvider_ExchangeProtocol_Profile_Base;
5
- export type FrontendProvider_Configuration = ExternalProvider_ExchangeProtocol_Configuration_Base;
2
+ /**
3
+ * A frontend SDK provider's operation definition. The provider itself is described by the live
4
+ * `BackendProviderModule` / `ProviderProtocolRuntimeContract` pair; the profile, configuration and
5
+ * status triple that once sat beside this alias was the per-protocol half of the retired
6
+ * exchange-protocol model and had no reader (#965).
7
+ */
6
8
  export type FrontendProvider_Operation = ExternalProvider_OperationDefinition_Base;
7
- declare const _FrontendProvider_StatusSchema: z.ZodObject<{
8
- status: z.ZodEnum<typeof import("..").ExternalProvider_Status>;
9
- lastCheckedAt: z.ZodString;
10
- errorReason: z.ZodOptional<z.ZodString>;
11
- protocolKind: z.ZodLiteral<ExternalProvider_ExchangeProtocol_Kind.FRONTEND_SDK>;
12
- }, z.core.$strip>;
13
- export declare const FrontendProvider_StatusSchema: typeof _FrontendProvider_StatusSchema;
14
- export type FrontendProvider_Status = z.infer<typeof _FrontendProvider_StatusSchema>;
15
- export {};
16
9
  //# sourceMappingURL=frontend.external-connectors-models.schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"frontend.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../src/protocols/frontend.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,oDAAoD,EAAE,sCAAsC,EAAE,8CAA8C,EAAuD,MAAM,oDAAoD,CAAA;AACtQ,OAAO,EAAE,yCAAyC,EAAE,MAAM,uDAAuD,CAAC;AAGlH,MAAM,MAAM,wBAAwB,GAAG,8CAA8C,CAAC;AAEtF,MAAM,MAAM,8BAA8B,GAAG,oDAAoD,CAAC;AAElG,MAAM,MAAM,0BAA0B,GAAG,yCAAyC,CAAC;AAMnF,QAAA,MAAM,8BAA8B;;;;;iBAElC,CAAC;AAEH,eAAO,MAAM,6BAA6B,EAAE,OAAO,8BAA+D,CAAC;AACnH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
1
+ {"version":3,"file":"frontend.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../../src/protocols/frontend.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yCAAyC,EAAE,MAAM,uDAAuD,CAAC;AAElH;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,GAAG,yCAAyC,CAAC"}
@@ -1,10 +1 @@
1
- import { z } from "zod";
2
- import { ExternalProvider_ExchangeProtocol_Kind, ExternalProvider_ExchangeProtocol_Status_BaseSchema } from "../core/commons.external-connectors-models.schemas.js";
3
- //===============================================================
4
- // STATUS
5
- //===============================================================
6
- const _FrontendProvider_StatusSchema = ExternalProvider_ExchangeProtocol_Status_BaseSchema.extend({
7
- protocolKind: z.literal(ExternalProvider_ExchangeProtocol_Kind.FRONTEND_SDK),
8
- });
9
- export const FrontendProvider_StatusSchema = _FrontendProvider_StatusSchema;
10
1
  //# sourceMappingURL=frontend.external-connectors-models.schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"frontend.external-connectors-models.schemas.js","sourceRoot":"","sources":["../../../../src/protocols/frontend.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAwD,sCAAsC,EAAkD,mDAAmD,EAAE,MAAM,oDAAoD,CAAA;AAUtQ,iEAAiE;AACjE,SAAS;AACT,iEAAiE;AAEjE,MAAM,8BAA8B,GAAG,mDAAmD,CAAC,MAAM,CAAC;IAChG,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,sCAAsC,CAAC,YAAY,CAAC;CAC7E,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,6BAA6B,GAA0C,8BAA8B,CAAC","sourcesContent":["import { z } from \"zod\"\nimport { ExternalProvider_ExchangeProtocol_Configuration_Base, ExternalProvider_ExchangeProtocol_Kind, ExternalProvider_ExchangeProtocol_Profile_Base, ExternalProvider_ExchangeProtocol_Status_BaseSchema } from \"../core/commons.external-connectors-models.schemas\"\nimport { ExternalProvider_OperationDefinition_Base } from \"../core/operations.external-connectors-models.schemas\";\n\n\nexport type FrontendProvider_Profile = ExternalProvider_ExchangeProtocol_Profile_Base;\n\nexport type FrontendProvider_Configuration = ExternalProvider_ExchangeProtocol_Configuration_Base;\n\nexport type FrontendProvider_Operation = ExternalProvider_OperationDefinition_Base;\n\n//===============================================================\n// STATUS\n//===============================================================\n\nconst _FrontendProvider_StatusSchema = ExternalProvider_ExchangeProtocol_Status_BaseSchema.extend({\n protocolKind: z.literal(ExternalProvider_ExchangeProtocol_Kind.FRONTEND_SDK),\n});\n\nexport const FrontendProvider_StatusSchema: typeof _FrontendProvider_StatusSchema = _FrontendProvider_StatusSchema;\nexport type FrontendProvider_Status = z.infer<typeof _FrontendProvider_StatusSchema>;"]}
1
+ {"version":3,"file":"frontend.external-connectors-models.schemas.js","sourceRoot":"","sources":["../../../../src/protocols/frontend.external-connectors-models.schemas.ts"],"names":[],"mappings":"","sourcesContent":["import { ExternalProvider_OperationDefinition_Base } from \"../core/operations.external-connectors-models.schemas\";\n\n/**\n * A frontend SDK provider's operation definition. The provider itself is described by the live\n * `BackendProviderModule` / `ProviderProtocolRuntimeContract` pair; the profile, configuration and\n * status triple that once sat beside this alias was the per-protocol half of the retired\n * exchange-protocol model and had no reader (#965).\n */\nexport type FrontendProvider_Operation = ExternalProvider_OperationDefinition_Base;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"hooks-capability.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../src/protocols/hooks-capability.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,SAAS,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,OAAO,EAAE,OAAO,CAAC;IACjB,2EAA2E;IAC3E,UAAU,EAAE,OAAO,CAAC;IACpB,sBAAsB;IACtB,SAAS,EAAE,IAAI,GAAG,MAAM,CAAC;CAC1B;AAMD;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC3C;AAMD;;;;;;;;;GASG;AACH,MAAM,WAAW,wBAAwB;IACvC,6EAA6E;IAC7E,eAAe,CACb,OAAO,EAAE,MAAM,GAAG,UAAU,EAC5B,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,GACb,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE9B;;;OAGG;IACH,UAAU,CACR,OAAO,EAAE,MAAM,GAAG,UAAU,EAC5B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,wBAAwB,GAAG,IAAI,CAAC;CACpC;AAMD;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACvC,yEAAyE;IACzE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B;;;OAGG;IACH,WAAW,CACT,gBAAgB,EAAE,OAAO,EAAE,wEAAwE;IACnG,WAAW,EAAE,wBAAwB,GACpC,OAAO,CAAC,IAAI,CAAC,CAAC;CAClB;AAMD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,0BAA0B;IACzC,+CAA+C;IAC/C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,yCAAyC;IACzC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B,mDAAmD;IACnD,YAAY,CAAC,WAAW,EAAE,wBAAwB,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAEzF,wFAAwF;IACxF,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7C"}
1
+ {"version":3,"file":"hooks-capability.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../../src/protocols/hooks-capability.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH;;;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,CAAC,CAAC;CAClB;AAMD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,0BAA0B;IACzC,+CAA+C;IAC/C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,yCAAyC;IACzC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B,mDAAmD;IACnD,YAAY,CAAC,WAAW,EAAE,wBAAwB,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAEzF,wFAAwF;IACxF,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"hooks-capability.external-connectors-models.schemas.js","sourceRoot":"","sources":["../../../src/protocols/hooks-capability.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG","sourcesContent":["/**\n * Hook Protocol Feature Types\n * \n * Standard types for the webhook processing pipeline:\n * - StandardHook_ParsedEvent: Provider-agnostic parsed event\n * - StandardHook_ResolvedScope: Resolved engine scope from event\n * - WebhookCapabilityAdapter: Runtime contract for verify + parse\n * - WebhookCapabilityHandler: Dispatches processed events to business logic\n * - Hook_ScopeResolverStrategy: Escape hatch for custom scope resolution\n */\n\n// ===============================================================\n// Standard Parsed Event (Provider-Agnostic)\n// ===============================================================\n\n/**\n * A webhook event normalized to a provider-agnostic format.\n * Produced by WebhookCapabilityAdapter.parseEvent().\n */\nexport interface StandardHook_ParsedEvent {\n /** Unique event ID from the provider (for idempotency) */\n eventId: string;\n /** Standardized event type (e.g., 'SUBSCRIPTION_CREATED') */\n eventType: string;\n /** Original provider event type (e.g., 'customer.subscription.created') */\n providerEventType: string;\n /** Provider reference (e.g., 'stripe', 'google') */\n providerRef: string;\n /** Endpoint key this event was received on (e.g., 'billing', 'calendar') */\n endpointKey: string;\n /** Parsed event payload (provider-specific structure) */\n payload: unknown;\n /** Raw event payload as received (for scope ID extraction via dot-path) */\n rawPayload: unknown;\n /** Event timestamp */\n timestamp: Date | string;\n}\n\n// ===============================================================\n// Standard Resolved Scope\n// ===============================================================\n\n/**\n * Framework scope resolved from a webhook event.\n * Maps to ExecutionContext initiatorIds fields.\n */\nexport interface StandardHook_ResolvedScope {\n applicationId?: string;\n organizationId?: string;\n userId?: string;\n /** Additional provider-specific scope IDs for audit/debug */\n providerScopeIds?: Record<string, string>;\n}\n\n// ===============================================================\n// Webhook Capability Adapter\n// ===============================================================\n\n/**\n * Adapter that bridges a capability-specific transformer\n * (e.g., StandardBilling_Interface) to the generic webhook pipeline.\n * \n * Each capability implements one adapter. The adapter normalizes\n * capability-specific verify/parse methods into the standard pipeline contract.\n * \n * Example: BillingWebhookAdapter wraps Stripe_BillingTransformer.verifyWebhookSignature()\n * and parseWebhookEvent() into the standard interface.\n */\nexport interface WebhookCapabilityAdapter {\n /** Verify the webhook signature using the capability's verification logic */\n verifySignature(\n rawBody: string | Uint8Array, \n signatureHeader: string, \n secret: string\n ): boolean | Promise<boolean>;\n\n /** \n * Parse the raw webhook body into a StandardHook_ParsedEvent.\n * Returns null if the event type is unknown/unsupported (acknowledged but not processed).\n */\n parseEvent(\n rawBody: string | Uint8Array, \n headers: Record<string, string>\n ): StandardHook_ParsedEvent | null;\n}\n\n// ===============================================================\n// Webhook Capability Handler\n// ===============================================================\n\n/**\n * Handles processed webhook events for a specific capability.\n * Dispatches to business logic (e.g., BillingWebhookEventRouter) with the ExecutionContext.\n * \n * Registered at startup and matched by endpoint capability.\n */\nexport interface WebhookCapabilityHandler {\n /** Which capability this handler serves (e.g., 'billing', 'calendar') */\n readonly capability: string;\n\n /** \n * Handle the processed webhook event with its execution context.\n * The executionContext carries the resolved scope and can be used for all DB operations.\n */\n handleEvent(\n executionContext: unknown, // ExecutionContext<any> — typed as unknown to avoid circular dependency\n parsedEvent: StandardHook_ParsedEvent\n ): Promise<void>;\n}\n\n// ===============================================================\n// Hook Scope Resolver Strategy (Escape Hatch)\n// ===============================================================\n\n/**\n * Optional override for scope resolution when the declarative\n * Hook_EndpointScopeBinding config is insufficient.\n * \n * Register with WebhookHandlerBackendService.registerCustomScopeResolver()\n * to override the generic declarative resolver for a specific endpoint.\n * \n * Use cases:\n * - Different event types within the same endpoint have scope IDs at different payload paths\n * - Complex multi-step scope resolution logic\n * - Provider-specific edge cases\n */\nexport interface Hook_ScopeResolverStrategy {\n /** Provider reference this resolver handles */\n readonly providerRef: string;\n /** Endpoint key this resolver handles */\n readonly endpointKey: string;\n\n /** Resolve the engine scope from a parsed event */\n resolveScope(parsedEvent: StandardHook_ParsedEvent): Promise<StandardHook_ResolvedScope>;\n\n /** Whether scope resolution is required for this event type (affects error handling) */\n isScopeRequired(eventType: string): boolean;\n}\n"]}
1
+ {"version":3,"file":"hooks-capability.external-connectors-models.schemas.js","sourceRoot":"","sources":["../../../../src/protocols/hooks-capability.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG","sourcesContent":["/**\n * Hook Protocol Feature Types\n * \n * Standard types for the webhook processing pipeline:\n * - StandardHook_ParsedEvent: Provider-agnostic parsed event\n * - StandardHook_ResolvedScope: Resolved engine scope from event\n * - WebhookCapabilityAdapter: Runtime contract for verify + parse\n * - WebhookCapabilityHandler: Dispatches processed events to business logic\n * - Hook_ScopeResolverStrategy: Escape hatch for custom scope resolution\n */\n\n// ===============================================================\n// Standard Parsed Event (Provider-Agnostic)\n// ===============================================================\n\n/**\n * A webhook event normalized to a provider-agnostic format.\n * Produced by WebhookCapabilityAdapter.parseEvent().\n */\nexport interface StandardHook_ParsedEvent {\n /** Unique event ID from the provider (for idempotency) */\n eventId: string;\n /** Standardized event type (e.g., 'SUBSCRIPTION_CREATED') */\n eventType: string;\n /** Original provider event type (e.g., 'customer.subscription.created') */\n providerEventType: string;\n /** Provider reference (e.g., 'stripe', 'google') */\n providerRef: string;\n /** Endpoint key this event was received on (e.g., 'billing', 'calendar') */\n endpointKey: string;\n /** Parsed event payload (provider-specific structure) */\n payload: unknown;\n /** Raw event payload as received (for scope ID extraction via dot-path) */\n rawPayload: unknown;\n /** Event timestamp */\n timestamp: Date | string;\n}\n\n// ===============================================================\n// Standard Resolved Scope\n// ===============================================================\n\n/**\n * Framework scope resolved from a webhook event.\n * Maps to ExecutionContext initiatorIds fields.\n */\nexport interface StandardHook_ResolvedScope {\n applicationId?: string;\n organizationId?: string;\n userId?: string;\n /** Additional provider-specific scope IDs for audit/debug */\n providerScopeIds?: Record<string, string>;\n}\n\n// ===============================================================\n// Webhook Capability Adapter\n// ===============================================================\n\n/**\n * Adapter that bridges a capability-specific transformer\n * (e.g., StandardBilling_Interface) to the generic webhook pipeline.\n * \n * Each capability implements one adapter. The adapter normalizes\n * capability-specific verify/parse methods into the standard pipeline contract.\n * \n * Example: BillingWebhookAdapter wraps Stripe_BillingTransformer.verifyWebhookSignature()\n * and parseWebhookEvent() into the standard interface.\n */\nexport interface WebhookCapabilityAdapter {\n /** Verify the webhook signature using the capability's verification logic */\n verifySignature(\n rawBody: string | Uint8Array, \n signatureHeader: string, \n secret: string\n ): boolean | Promise<boolean>;\n\n /** \n * Parse the raw webhook body into a StandardHook_ParsedEvent.\n * Returns null if the event type is unknown/unsupported (acknowledged but not processed).\n */\n parseEvent(\n rawBody: string | Uint8Array, \n headers: Record<string, string>\n ): StandardHook_ParsedEvent | null;\n}\n\n// ===============================================================\n// Webhook Capability Handler\n// ===============================================================\n\n/**\n * Handles processed webhook events for a specific capability.\n * Dispatches to business logic (e.g., BillingWebhookEventRouter) with the ExecutionContext.\n * \n * Registered at startup and matched by endpoint capability.\n */\nexport interface WebhookCapabilityHandler {\n /** Which capability this handler serves (e.g., 'billing', 'calendar') */\n readonly capability: string;\n\n /** \n * Handle the processed webhook event with its execution context.\n * The executionContext carries the resolved scope and can be used for all DB operations.\n */\n handleEvent(\n executionContext: unknown, // ExecutionContext<any> — typed as unknown to avoid circular dependency\n parsedEvent: StandardHook_ParsedEvent\n ): Promise<void>;\n}\n\n// ===============================================================\n// Hook Scope Resolver Strategy (Escape Hatch)\n// ===============================================================\n\n/**\n * Optional override for scope resolution when the declarative\n * Hook_EndpointScopeBinding config is insufficient.\n * \n * Register with WebhookHandlerBackendService.registerCustomScopeResolver()\n * to override the generic declarative resolver for a specific endpoint.\n * \n * Use cases:\n * - Different event types within the same endpoint have scope IDs at different payload paths\n * - Complex multi-step scope resolution logic\n * - Provider-specific edge cases\n */\nexport interface Hook_ScopeResolverStrategy {\n /** Provider reference this resolver handles */\n readonly providerRef: string;\n /** Endpoint key this resolver handles */\n readonly endpointKey: string;\n\n /** Resolve the engine scope from a parsed event */\n resolveScope(parsedEvent: StandardHook_ParsedEvent): Promise<StandardHook_ResolvedScope>;\n\n /** Whether scope resolution is required for this event type (affects error handling) */\n isScopeRequired(eventType: string): boolean;\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { API_HttpMethod, ExternalProvider_ExchangeProtocol_Configuration_Base, ExternalProvider_ExchangeProtocol_Kind, ExternalProvider_ExchangeProtocol_Profile_Base } from "../core/commons.external-connectors-models.schemas";
2
+ import { API_HttpMethod, ExternalProvider_ExchangeProtocol_Configuration_Base } from "../core/commons.external-connectors-models.schemas";
3
3
  import { ExternalProvider_Auth_Kind } from "../core/security.external-connectors-models.schemas";
4
4
  import { ExternalProvider_OperationDefinition_Base } from "../core/operations.external-connectors-models.schemas";
5
5
  export declare const Hook_HttpMethods: readonly API_HttpMethod[];
@@ -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,11 +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;
161
- };
162
- export type HookInitiatorProvider_Profile = ExternalProvider_ExchangeProtocol_Profile_Base & {
163
- baseURL?: string;
164
- webhookDocUrl?: string;
165
- signatureConfig?: Hook_SignatureConfig;
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;
166
179
  };
167
180
  export type HookInitiatorProvider_Configuration = ExternalProvider_ExchangeProtocol_Configuration_Base & {
168
181
  /** Webhook endpoints — each generates a route: POST /webhooks/{providerRef}/{endpointKey} */
@@ -188,13 +201,4 @@ export type Hook_OperationDefinition = ExternalProvider_OperationDefinition_Base
188
201
  operationContextSchema: typeof Hook_OperationContextSchema;
189
202
  samplePayload?: unknown;
190
203
  };
191
- export declare const HookInitiatorProvider_StatusSchema: z.ZodObject<{
192
- status: z.ZodEnum<typeof import("..").ExternalProvider_Status>;
193
- lastCheckedAt: z.ZodString;
194
- errorReason: z.ZodOptional<z.ZodString>;
195
- protocolKind: z.ZodLiteral<ExternalProvider_ExchangeProtocol_Kind.WEBHOOK_ORIGINATOR>;
196
- activeSubscriptions: z.ZodOptional<z.ZodNumber>;
197
- lastEventReceivedAt: z.ZodOptional<z.ZodString>;
198
- }, z.core.$strip>;
199
- export type HookInitiatorProvider_Status = z.infer<typeof HookInitiatorProvider_StatusSchema>;
200
204
  //# sourceMappingURL=hooks.external-connectors-models.schemas.d.ts.map
@@ -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,EACpD,sCAAsC,EACtC,8CAA8C,EAE/C,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;CACxB;AAED,oBAAY,mBAAmB;IAC7B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAMD,eAAO,MAAM,0BAA0B;;;;;iBAKrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAM9E,eAAO,MAAM,sBAAsB;;;;;;;;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,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,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;IACvB;;;;;;;;;OASG;IACH,OAAO,YAAY;CACpB;AAED,oBAAY,mBAAmB;IAC7B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAMD,eAAO,MAAM,0BAA0B;;;;;iBAKrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAM9E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;iBAoBjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAMtE;;;GAGG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MAAM,CAAC;IACnB,sDAAsD;IACtD,eAAe,EAAE,oBAAoB,CAAC;IACtC,4DAA4D;IAC5D,eAAe,EAAE,oBAAoB,CAAC;IACtC,mCAAmC;IACnC,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,iEAAiE;IACjE,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,iEAAiE;IACjE,YAAY,EAAE,yBAAyB,CAAC;IACxC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAMF,MAAM,MAAM,mCAAmC,GAAG,oDAAoD,GAAG;IACvG,6FAA6F;IAC7F,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,+DAA+D;IAC/D,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,oEAAoE;IACpE,aAAa,CAAC,EAAE,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"}
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { API_HttpMethod, ExternalProvider_ExchangeProtocol_Kind, ExternalProvider_ExchangeProtocol_Status_BaseSchema } from "../core/commons.external-connectors-models.schemas.js";
2
+ import { API_HttpMethod } from "../core/commons.external-connectors-models.schemas.js";
3
3
  import { ExternalProvider_Auth_Kind } from "../core/security.external-connectors-models.schemas.js";
4
4
  import { ExternalProvider_OperationContextSchema } from "../core/operations.external-connectors-models.schemas.js";
5
5
  //===============================================================
@@ -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) {
@@ -92,12 +103,4 @@ export const Hook_OperationContextSchema = ExternalProvider_OperationContextSche
92
103
  signatureVerified: z.boolean().optional(),
93
104
  pollingCursor: z.string().optional(),
94
105
  });
95
- // ===============================================================
96
- // STATUS
97
- // ===============================================================
98
- export const HookInitiatorProvider_StatusSchema = ExternalProvider_ExchangeProtocol_Status_BaseSchema.extend({
99
- protocolKind: z.literal(ExternalProvider_ExchangeProtocol_Kind.WEBHOOK_ORIGINATOR),
100
- activeSubscriptions: z.number().optional(),
101
- lastEventReceivedAt: z.string().optional(),
102
- });
103
106
  //# sourceMappingURL=hooks.external-connectors-models.schemas.js.map
@@ -1 +1 @@
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,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AAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACnC,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AA+IH,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;AAaH,kEAAkE;AAClE,SAAS;AACT,kEAAkE;AAElE,MAAM,CAAC,MAAM,kCAAkC,GAAG,mDAAmD,CAAC,MAAM,CAAC;IAC3G,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,sCAAsC,CAAC,kBAAkB,CAAC;IAClF,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1C,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { \n API_HttpMethod, \n ExternalProvider_ExchangeProtocol_Configuration_Base, \n ExternalProvider_ExchangeProtocol_Kind, \n ExternalProvider_ExchangeProtocol_Profile_Base, \n ExternalProvider_ExchangeProtocol_Status_BaseSchema \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 Profile\n// ===============================================================\n\nexport type HookInitiatorProvider_Profile = ExternalProvider_ExchangeProtocol_Profile_Base & {\n baseURL?: string;\n webhookDocUrl?: string;\n signatureConfig?: Hook_SignatureConfig;\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// ===============================================================\n// STATUS\n// ===============================================================\n\nexport const HookInitiatorProvider_StatusSchema = ExternalProvider_ExchangeProtocol_Status_BaseSchema.extend({\n protocolKind: z.literal(ExternalProvider_ExchangeProtocol_Kind.WEBHOOK_ORIGINATOR),\n activeSubscriptions: z.number().optional(),\n lastEventReceivedAt: z.string().optional(),\n});\nexport type HookInitiatorProvider_Status = z.infer<typeof HookInitiatorProvider_StatusSchema>;\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;IACzD,cAAc,CAAC,IAAI;IACnB,cAAc,CAAC,GAAG;IAClB,cAAc,CAAC,KAAK;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAA0C;IACtE,0BAA0B,CAAC,IAAI;IAC/B,0BAA0B,CAAC,cAAc;IACzC,0BAA0B,CAAC,MAAM;IACjC,0BAA0B,CAAC,KAAK;CACjC,CAAC;AAEF,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,6CAAyB,CAAA;IACzB,yEAAqD,CAAA;IACrD,2CAAuB,CAAA;AACzB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AAED,MAAM,CAAN,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,2CAAmB,CAAA;IACnB,2CAAmB,CAAA;IACnB,mDAA2B,CAAA;AAC7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IAE1C,YAAY;IACZ,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;IACpD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAErC,YAAY;IACZ,eAAe,EAAE,0BAA0B,CAAC,QAAQ,EAAE;IAEtD,iCAAiC;IACjC,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;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;AA4IH,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 * 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"]}
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { ExternalProvider_ExchangeProtocol_Configuration_Base, ExternalProvider_ExchangeProtocol_Kind, ExternalProvider_ExchangeProtocol_Profile_Base } from "../core/commons.external-connectors-models.schemas";
2
+ import { ExternalProvider_ExchangeProtocol_Kind } from "../core/commons.external-connectors-models.schemas";
3
3
  import { ExternalProvider_OperationDefinition_Base } from "../core/operations.external-connectors-models.schemas";
4
4
  export declare enum ImageProvider_Model {
5
5
  /**
@@ -66,16 +66,6 @@ export declare const ImageProvider_OperationModelConfiguration_Schema: z.ZodObje
66
66
  seed: z.ZodOptional<z.ZodNumber>;
67
67
  }, z.core.$strip>;
68
68
  export type ImageProvider_OperationModelConfiguration = z.infer<typeof ImageProvider_OperationModelConfiguration_Schema>;
69
- export type ImageProvider_Profile = ExternalProvider_ExchangeProtocol_Profile_Base & {
70
- baseURL?: string;
71
- /** Sizes this provider supports (advertised for validation/UX). */
72
- supportedSizes?: ImageProvider_Size[];
73
- /** Whether the provider can render a transparent background. */
74
- supportsTransparentBackground?: boolean;
75
- };
76
- export type ImageProvider_Configuration = ExternalProvider_ExchangeProtocol_Configuration_Base & {
77
- customLocation?: string;
78
- };
79
69
  export declare const ImageProvider_UsageSchema: z.ZodObject<{
80
70
  imageCount: z.ZodOptional<z.ZodNumber>;
81
71
  inputTokens: z.ZodOptional<z.ZodNumber>;
@@ -141,11 +131,4 @@ export declare const ImageProvider_GenerateImageOutputSchema: z.ZodObject<{
141
131
  revisedPrompt: z.ZodOptional<z.ZodString>;
142
132
  }, z.core.$strip>;
143
133
  export type ImageProvider_GenerateImageOutput = z.infer<typeof ImageProvider_GenerateImageOutputSchema>;
144
- export declare const ImageProvider_StatusSchema: z.ZodObject<{
145
- status: z.ZodEnum<typeof import("..").ExternalProvider_Status>;
146
- lastCheckedAt: z.ZodString;
147
- errorReason: z.ZodOptional<z.ZodString>;
148
- protocolKind: z.ZodLiteral<ExternalProvider_ExchangeProtocol_Kind.IMAGE_PROVIDER>;
149
- }, z.core.$strip>;
150
- export type ImageProvider_Status = z.infer<typeof ImageProvider_StatusSchema>;
151
134
  //# sourceMappingURL=image.external-connectors-models.schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"image.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../src/protocols/image.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EACL,oDAAoD,EACpD,sCAAsC,EACtC,8CAA8C,EAE/C,MAAM,oDAAoD,CAAA;AAC3D,OAAO,EAEL,yCAAyC,EAC1C,MAAM,uDAAuD,CAAA;AAiB9D,oBAAY,mBAAmB;IAE7B;;;;;OAKG;IACH,mBAAmB,gBAAgB;IACnC;;;OAGG;IACH,qBAAqB,kBAAkB;IACvC,+CAA+C;IAC/C,mBAAmB,gBAAgB;IACnC,uBAAuB;IACvB,gBAAgB,aAAa;CAC9B;AAED,oBAAY,0BAA0B;IACpC,yEAAyE;IACzE,cAAc,wBAAwB;CACvC;AAMD;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,WAAW,cAAc;IACzB,kBAAkB,cAAc;IAChC,mBAAmB,cAAc;IACjC,IAAI,SAAS;CACd;AAED,qCAAqC;AACrC,oBAAY,qBAAqB;IAC/B,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED;;;;GAIG;AACH,oB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kCAAkC;;iBAK7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAG9F,eAAO,MAAM,sCAAsC;;;;;iBAIjD,CAAC;AACH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AAEtG,8EAA8E;AAC9E,eAAO,MAAM,kCAAkC;;;;;iBAK7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,eAAO,MAAM,uCAAuC;;;;;;;;iBAIlD,CAAC;AACH,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAC;AAMxG,eAAO,MAAM,0BAA0B;;;;;iBAErC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
1
+ {"version":3,"file":"image.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../../src/protocols/image.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EACL,sCAAsC,EACrC,MAAM,oDAAoD,CAAA;AAC7D,OAAO,EAEL,yCAAyC,EAC1C,MAAM,uDAAuD,CAAA;AAiB9D,oBAAY,mBAAmB;IAE7B;;;;;OAKG;IACH,mBAAmB,gBAAgB;IACnC;;;OAGG;IACH,qBAAqB,kBAAkB;IACvC,+CAA+C;IAC/C,mBAAmB,gBAAgB;IACnC,uBAAuB;IACvB,gBAAgB,aAAa;CAC9B;AAED,oBAAY,0BAA0B;IACpC,yEAAyE;IACzE,cAAc,wBAAwB;CACvC;AAMD;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,WAAW,cAAc;IACzB,kBAAkB,cAAc;IAChC,mBAAmB,cA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IjD,CAAC;AACH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AAEtG,8EAA8E;AAC9E,eAAO,MAAM,kCAAkC;;;;;iBAK7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,eAAO,MAAM,uCAAuC;;;;;;;;iBAIlD,CAAC;AACH,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { ExternalProvider_ExchangeProtocol_Kind, ExternalProvider_ExchangeProtocol_Status_BaseSchema, } from "../core/commons.external-connectors-models.schemas.js";
2
+ import { ExternalProvider_ExchangeProtocol_Kind, } from "../core/commons.external-connectors-models.schemas.js";
3
3
  import { ExternalProvider_OperationContextSchema, } from "../core/operations.external-connectors-models.schemas.js";
4
4
  //===============================================================
5
5
  // Image Provider
@@ -141,10 +141,4 @@ export const ImageProvider_GenerateImageOutputSchema = z.object({
141
141
  /** Provider-revised prompt, when the model returns one. */
142
142
  revisedPrompt: z.string().optional(),
143
143
  });
144
- // ===============================================================
145
- // STATUS
146
- // ===============================================================
147
- export const ImageProvider_StatusSchema = ExternalProvider_ExchangeProtocol_Status_BaseSchema.extend({
148
- protocolKind: z.literal(ExternalProvider_ExchangeProtocol_Kind.IMAGE_PROVIDER),
149
- });
150
144
  //# sourceMappingURL=image.external-connectors-models.schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"image.external-connectors-models.schemas.js","sourceRoot":"","sources":["../../../../src/protocols/image.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAEL,sCAAsC,EAEtC,mDAAmD,GACpD,MAAM,oDAAoD,CAAA;AAC3D,OAAO,EACL,uCAAuC,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AAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC7C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC/C,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9D,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,kCAAkC,CAAC;IACnD,2DAA2D;IAC3D,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAGH,kEAAkE;AAClE,SAAS;AACT,kEAAkE;AAElE,MAAM,CAAC,MAAM,0BAA0B,GAAG,mDAAmD,CAAC,MAAM,CAAC;IACnG,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,sCAAsC,CAAC,cAAc,CAAC;CAC/E,CAAC,CAAC","sourcesContent":["import { z } from \"zod\"\nimport {\n ExternalProvider_ExchangeProtocol_Configuration_Base,\n ExternalProvider_ExchangeProtocol_Kind,\n ExternalProvider_ExchangeProtocol_Profile_Base,\n ExternalProvider_ExchangeProtocol_Status_BaseSchema,\n} from \"../core/commons.external-connectors-models.schemas\"\nimport {\n ExternalProvider_OperationContextSchema,\n ExternalProvider_OperationDefinition_Base,\n} from \"../core/operations.external-connectors-models.schemas\"\n\n//===============================================================\n// Image Provider\n// --------\n// Text-to-image generation providers (gpt-image, DALL·E, Imagen, Flux).\n// Serves the IMAGE artifact modality of the actor-agent system. This is\n// the transport contract; the agent declares `outputModality: IMAGE` and\n// the executor resolves it to an `IMAGE_PROVIDER` binding.\n//\n// Deliberately a SEPARATE protocol from `LLM_PROVIDER` (framework mindset —\n// image generation is already a distinct `EngineCapability.AI_IMAGE_GENERATION`\n// / `BUILTIN_PROVIDER_CAPABILITY.IMAGE_GENERATION`): its I/O is image bytes,\n// and its parameters (size / quality / background) share nothing with LLM\n// sampling (temperature / topP). Overloading LLM would conflate the two.\n//===============================================================\n\nexport enum ImageProvider_Model {\n // OpenAI — ids + parameter support verified LIVE against the images API (2026-07-16).\n /**\n * OpenAI's newest text-to-image model (Apr 2026). Highest quality, but\n * does NOT support `background: transparent` (verified live: the API\n * rejects it) — pair it with `Background.AUTO` plus the engine's\n * `removeSolidBackground` derivation tool when transparency is needed.\n */\n OPEN_AI_GPT_IMAGE_2 = \"gpt-image-2\",\n /**\n * Transparent-capable upgrade of gpt-image-1 (verified live) — the wired\n * default for logo generation, whose pipeline is transparent-first.\n */\n OPEN_AI_GPT_IMAGE_1_5 = \"gpt-image-1.5\",\n /** Previous-generation text-to-image model. */\n OPEN_AI_GPT_IMAGE_1 = \"gpt-image-1\",\n /** OpenAI DALL·E 3. */\n OPEN_AI_DALL_E_3 = \"dall-e-3\",\n}\n\nexport enum ImageProvider_OperationKey {\n /** Text (+ optional reference images) → one or more generated images. */\n GENERATE_IMAGE = \"image.generateImage\",\n}\n\n// ===============================================================\n// Image generation parameters (the config — NOT LLM sampling)\n// ===============================================================\n\n/**\n * Canvas size of the generated image. `AUTO` lets the provider pick the\n * best fit for the prompt. Values mirror gpt-image-1's supported sizes.\n */\nexport enum ImageProvider_Size {\n SQUARE_1024 = \"1024x1024\",\n PORTRAIT_1024_1536 = \"1024x1536\",\n LANDSCAPE_1536_1024 = \"1536x1024\",\n AUTO = \"auto\",\n}\n\n/** Rendering quality / cost tier. */\nexport enum ImageProvider_Quality {\n LOW = \"low\",\n MEDIUM = \"medium\",\n HIGH = \"high\",\n AUTO = \"auto\",\n}\n\n/**\n * Background composition. `TRANSPARENT` is the clean default for a logo\n * master — it rasterizes losslessly into favicon / monochrome / dark-light\n * derivations (see `BrandLogoBackgroundTreatment`).\n */\nexport enum ImageProvider_Background {\n TRANSPARENT = \"transparent\",\n OPAQUE = \"opaque\",\n AUTO = \"auto\",\n}\n\nexport enum ImageProvider_OutputFormat {\n PNG = \"png\",\n JPEG = \"jpeg\",\n WEBP = \"webp\",\n}\n\nexport const ImageProvider_OperationModelConfiguration_Schema = z.object({\n model: z.string(),\n providerRef: z.string(),\n size: z.enum(ImageProvider_Size).optional(),\n quality: z.enum(ImageProvider_Quality).optional(),\n background: z.enum(ImageProvider_Background).optional(),\n outputFormat: z.enum(ImageProvider_OutputFormat).optional(),\n /** Number of images to generate per call (default 1). */\n n: z.number().int().positive().optional(),\n /** Random seed for deterministic output where the provider supports it. */\n seed: z.number().optional(),\n});\nexport type ImageProvider_OperationModelConfiguration = z.infer<typeof ImageProvider_OperationModelConfiguration_Schema>;\n\n// ===============================================================\n// Image Provider Profiles and Configurations\n// ===============================================================\n\nexport type ImageProvider_Profile = ExternalProvider_ExchangeProtocol_Profile_Base & {\n baseURL?: string,\n /** Sizes this provider supports (advertised for validation/UX). */\n supportedSizes?: ImageProvider_Size[],\n /** Whether the provider can render a transparent background. */\n supportsTransparentBackground?: boolean,\n}\n\nexport type ImageProvider_Configuration = ExternalProvider_ExchangeProtocol_Configuration_Base & {\n customLocation?: string,\n}\n\n// ===============================================================\n// Image Operations Context\n// ===============================================================\n\nexport const ImageProvider_UsageSchema = z.object({\n /** Number of images actually returned. */\n imageCount: z.number().int().nonnegative().optional(),\n /** Provider-reported input tokens, when the model reports them (gpt-image does). */\n inputTokens: z.number().optional(),\n /** Provider-reported output (image) tokens, when reported. */\n outputTokens: z.number().optional(),\n});\nexport type ImageProvider_Usage = z.infer<typeof ImageProvider_UsageSchema>;\n\nexport const ImageProvider_ExecutionTransportMetadataSchema = z.object({\n protocolKind: z.literal(ExternalProvider_ExchangeProtocol_Kind.IMAGE_PROVIDER),\n providerRef: z.string(),\n model: z.string().optional(),\n});\nexport type ImageProvider_ExecutionTransportMetadata = z.infer<typeof ImageProvider_ExecutionTransportMetadataSchema>;\n\nexport const ImageProvider_OperationContext_BaseSchema = ExternalProvider_OperationContextSchema.extend({\n usage: ImageProvider_UsageSchema.optional(),\n executionTime: z.number().optional(),\n finishedAt: z.string().optional(),\n transport: ImageProvider_ExecutionTransportMetadataSchema.optional(),\n});\nexport type ImageProvider_OperationContext_Base = z.infer<typeof ImageProvider_OperationContext_BaseSchema>;\n\nexport type ImageProvider_OperationDefinitionBase = ExternalProvider_OperationDefinition_Base & {\n imageModelConfigurationSchema?: z.ZodSchema<any>,\n operationContextSchema: typeof ImageProvider_OperationContext_BaseSchema,\n supportedModels?: string[],\n}\n\n// ===============================================================\n// Image I/O Schemas\n// ===============================================================\n\n/** A reference image passed as generation conditioning (URL or data URI). */\nexport const ImageProvider_ReferenceImageSchema = z.object({\n image: z.union([\n z.url(),\n z.string().regex(/^data:image\\/[^;]+;base64,/),\n ]),\n});\nexport type ImageProvider_ReferenceImage = z.infer<typeof ImageProvider_ReferenceImageSchema>;\n\n// Generate Image Operation\nexport const ImageProvider_GenerateImageInputSchema = z.object({\n prompt: z.string(),\n /** Optional conditioning images (edit / variation flows). */\n referenceImages: z.array(ImageProvider_ReferenceImageSchema).optional(),\n});\nexport type ImageProvider_GenerateImageInput = z.infer<typeof ImageProvider_GenerateImageInputSchema>;\n\n/** One generated image. `base64` is the raw payload; `mediaType` its MIME. */\nexport const ImageProvider_GeneratedImageSchema = z.object({\n base64: z.string(),\n mediaType: z.string(),\n width: z.number().int().positive().optional(),\n height: z.number().int().positive().optional(),\n});\nexport type ImageProvider_GeneratedImage = z.infer<typeof ImageProvider_GeneratedImageSchema>;\n\nexport const ImageProvider_GenerateImageOutputSchema = z.object({\n images: z.array(ImageProvider_GeneratedImageSchema),\n /** Provider-revised prompt, when the model returns one. */\n revisedPrompt: z.string().optional(),\n});\nexport type ImageProvider_GenerateImageOutput = z.infer<typeof ImageProvider_GenerateImageOutputSchema>;\n\n// ===============================================================\n// STATUS\n// ===============================================================\n\nexport const ImageProvider_StatusSchema = ExternalProvider_ExchangeProtocol_Status_BaseSchema.extend({\n protocolKind: z.literal(ExternalProvider_ExchangeProtocol_Kind.IMAGE_PROVIDER),\n});\nexport type ImageProvider_Status = z.infer<typeof ImageProvider_StatusSchema>;\n"]}
1
+ {"version":3,"file":"image.external-connectors-models.schemas.js","sourceRoot":"","sources":["../../../../src/protocols/image.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EACL,sCAAsC,GACrC,MAAM,oDAAoD,CAAA;AAC7D,OAAO,EACL,uCAAuC,GAExC,MAAM,uDAAuD,CAAA;AAE9D,iEAAiE;AACjE,iBAAiB;AACjB,WAAW;AACX,wEAAwE;AACxE,wEAAwE;AACxE,yEAAyE;AACzE,2DAA2D;AAC3D,EAAE;AACF,4EAA4E;AAC5E,gFAAgF;AAChF,6EAA6E;AAC7E,0EAA0E;AAC1E,yEAAyE;AACzE,iEAAiE;AAEjE,MAAM,CAAN,IAAY,mBAkBX;AAlBD,WAAY,mBAAmB;IAC7B,sFAAsF;IACtF;;;;;OAKG;IACH,0DAAmC,CAAA;IACnC;;;OAGG;IACH,8DAAuC,CAAA;IACvC,+CAA+C;IAC/C,0DAAmC,CAAA;IACnC,uBAAuB;IACvB,oDAA6B,CAAA;AAC/B,CAAC,EAlBW,mBAAmB,KAAnB,mBAAmB,QAkB9B;AAED,MAAM,CAAN,IAAY,0BAGX;AAHD,WAAY,0BAA0B;IACpC,yEAAyE;IACzE,oEAAsC,CAAA;AACxC,CAAC,EAHW,0BAA0B,KAA1B,0BAA0B,QAGrC;AAED,kEAAkE;AAClE,8DAA8D;AAC9D,kEAAkE;AAElE;;;GAGG;AACH,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,+CAAyB,CAAA;IACzB,sDAAgC,CAAA;IAChC,uDAAiC,CAAA;IACjC,mCAAa,CAAA;AACf,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B;AAED,qCAAqC;AACrC,MAAM,CAAN,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC/B,oCAAW,CAAA;IACX,0CAAiB,CAAA;IACjB,sCAAa,CAAA;IACb,sCAAa,CAAA;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Q,EAAE;CACxE,CAAC,CAAC;AAGH,8EAA8E;AAC9E,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CAAC;IACzD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC7C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC/C,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9D,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,kCAAkC,CAAC;IACnD,2DAA2D;IAC3D,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC","sourcesContent":["import { z } from \"zod\"\nimport {\n ExternalProvider_ExchangeProtocol_Kind,\n } from \"../core/commons.external-connectors-models.schemas\"\nimport {\n ExternalProvider_OperationContextSchema,\n ExternalProvider_OperationDefinition_Base,\n} from \"../core/operations.external-connectors-models.schemas\"\n\n//===============================================================\n// Image Provider\n// --------\n// Text-to-image generation providers (gpt-image, DALL·E, Imagen, Flux).\n// Serves the IMAGE artifact modality of the actor-agent system. This is\n// the transport contract; the agent declares `outputModality: IMAGE` and\n// the executor resolves it to an `IMAGE_PROVIDER` binding.\n//\n// Deliberately a SEPARATE protocol from `LLM_PROVIDER` (framework mindset —\n// image generation is already a distinct `EngineCapability.AI_IMAGE_GENERATION`\n// / `BUILTIN_PROVIDER_CAPABILITY.IMAGE_GENERATION`): its I/O is image bytes,\n// and its parameters (size / quality / background) share nothing with LLM\n// sampling (temperature / topP). Overloading LLM would conflate the two.\n//===============================================================\n\nexport enum ImageProvider_Model {\n // OpenAI — ids + parameter support verified LIVE against the images API (2026-07-16).\n /**\n * OpenAI's newest text-to-image model (Apr 2026). Highest quality, but\n * does NOT support `background: transparent` (verified live: the API\n * rejects it) — pair it with `Background.AUTO` plus the engine's\n * `removeSolidBackground` derivation tool when transparency is needed.\n */\n OPEN_AI_GPT_IMAGE_2 = \"gpt-image-2\",\n /**\n * Transparent-capable upgrade of gpt-image-1 (verified live) — the wired\n * default for logo generation, whose pipeline is transparent-first.\n */\n OPEN_AI_GPT_IMAGE_1_5 = \"gpt-image-1.5\",\n /** Previous-generation text-to-image model. */\n OPEN_AI_GPT_IMAGE_1 = \"gpt-image-1\",\n /** OpenAI DALL·E 3. */\n OPEN_AI_DALL_E_3 = \"dall-e-3\",\n}\n\nexport enum ImageProvider_OperationKey {\n /** Text (+ optional reference images) → one or more generated images. */\n GENERATE_IMAGE = \"image.generateImage\",\n}\n\n// ===============================================================\n// Image generation parameters (the config — NOT LLM sampling)\n// ===============================================================\n\n/**\n * Canvas size of the generated image. `AUTO` lets the provider pick the\n * best fit for the prompt. Values mirror gpt-image-1's supported sizes.\n */\nexport enum ImageProvider_Size {\n SQUARE_1024 = \"1024x1024\",\n PORTRAIT_1024_1536 = \"1024x1536\",\n LANDSCAPE_1536_1024 = \"1536x1024\",\n AUTO = \"auto\",\n}\n\n/** Rendering quality / cost tier. */\nexport enum ImageProvider_Quality {\n LOW = \"low\",\n MEDIUM = \"medium\",\n HIGH = \"high\",\n AUTO = \"auto\",\n}\n\n/**\n * Background composition. `TRANSPARENT` is the clean default for a logo\n * master — it rasterizes losslessly into favicon / monochrome / dark-light\n * derivations (see `BrandLogoBackgroundTreatment`).\n */\nexport enum ImageProvider_Background {\n TRANSPARENT = \"transparent\",\n OPAQUE = \"opaque\",\n AUTO = \"auto\",\n}\n\nexport enum ImageProvider_OutputFormat {\n PNG = \"png\",\n JPEG = \"jpeg\",\n WEBP = \"webp\",\n}\n\nexport const ImageProvider_OperationModelConfiguration_Schema = z.object({\n model: z.string(),\n providerRef: z.string(),\n size: z.enum(ImageProvider_Size).optional(),\n quality: z.enum(ImageProvider_Quality).optional(),\n background: z.enum(ImageProvider_Background).optional(),\n outputFormat: z.enum(ImageProvider_OutputFormat).optional(),\n /** Number of images to generate per call (default 1). */\n n: z.number().int().positive().optional(),\n /** Random seed for deterministic output where the provider supports it. */\n seed: z.number().optional(),\n});\nexport type ImageProvider_OperationModelConfiguration = z.infer<typeof ImageProvider_OperationModelConfiguration_Schema>;\n\n// ===============================================================\n// Image Operations Context\n// ===============================================================\n\nexport const ImageProvider_UsageSchema = z.object({\n /** Number of images actually returned. */\n imageCount: z.number().int().nonnegative().optional(),\n /** Provider-reported input tokens, when the model reports them (gpt-image does). */\n inputTokens: z.number().optional(),\n /** Provider-reported output (image) tokens, when reported. */\n outputTokens: z.number().optional(),\n});\nexport type ImageProvider_Usage = z.infer<typeof ImageProvider_UsageSchema>;\n\nexport const ImageProvider_ExecutionTransportMetadataSchema = z.object({\n protocolKind: z.literal(ExternalProvider_ExchangeProtocol_Kind.IMAGE_PROVIDER),\n providerRef: z.string(),\n model: z.string().optional(),\n});\nexport type ImageProvider_ExecutionTransportMetadata = z.infer<typeof ImageProvider_ExecutionTransportMetadataSchema>;\n\nexport const ImageProvider_OperationContext_BaseSchema = ExternalProvider_OperationContextSchema.extend({\n usage: ImageProvider_UsageSchema.optional(),\n executionTime: z.number().optional(),\n finishedAt: z.string().optional(),\n transport: ImageProvider_ExecutionTransportMetadataSchema.optional(),\n});\nexport type ImageProvider_OperationContext_Base = z.infer<typeof ImageProvider_OperationContext_BaseSchema>;\n\nexport type ImageProvider_OperationDefinitionBase = ExternalProvider_OperationDefinition_Base & {\n imageModelConfigurationSchema?: z.ZodSchema<any>,\n operationContextSchema: typeof ImageProvider_OperationContext_BaseSchema,\n supportedModels?: string[],\n}\n\n// ===============================================================\n// Image I/O Schemas\n// ===============================================================\n\n/** A reference image passed as generation conditioning (URL or data URI). */\nexport const ImageProvider_ReferenceImageSchema = z.object({\n image: z.union([\n z.url(),\n z.string().regex(/^data:image\\/[^;]+;base64,/),\n ]),\n});\nexport type ImageProvider_ReferenceImage = z.infer<typeof ImageProvider_ReferenceImageSchema>;\n\n// Generate Image Operation\nexport const ImageProvider_GenerateImageInputSchema = z.object({\n prompt: z.string(),\n /** Optional conditioning images (edit / variation flows). */\n referenceImages: z.array(ImageProvider_ReferenceImageSchema).optional(),\n});\nexport type ImageProvider_GenerateImageInput = z.infer<typeof ImageProvider_GenerateImageInputSchema>;\n\n/** One generated image. `base64` is the raw payload; `mediaType` its MIME. */\nexport const ImageProvider_GeneratedImageSchema = z.object({\n base64: z.string(),\n mediaType: z.string(),\n width: z.number().int().positive().optional(),\n height: z.number().int().positive().optional(),\n});\nexport type ImageProvider_GeneratedImage = z.infer<typeof ImageProvider_GeneratedImageSchema>;\n\nexport const ImageProvider_GenerateImageOutputSchema = z.object({\n images: z.array(ImageProvider_GeneratedImageSchema),\n /** Provider-revised prompt, when the model returns one. */\n revisedPrompt: z.string().optional(),\n});\nexport type ImageProvider_GenerateImageOutput = z.infer<typeof ImageProvider_GenerateImageOutputSchema>;\n\n"]}