@wildo-ai/external-connectors-models 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/core/commons.external-connectors-models.schemas.d.ts +13 -132
- package/dist/esm/core/commons.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/core/commons.external-connectors-models.schemas.js +13 -31
- package/dist/esm/core/commons.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/core/operation-classification.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/core/operation-classification.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/core/security.external-connectors-models.schemas.d.ts +40 -8
- package/dist/esm/core/security.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/core/security.external-connectors-models.schemas.js +61 -14
- package/dist/esm/core/security.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts +26 -163
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js +20 -92
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/billing.standard-interface.schemas.d.ts +130 -10
- package/dist/esm/protocols/billing.standard-interface.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/billing.standard-interface.schemas.js +41 -0
- package/dist/esm/protocols/billing.standard-interface.schemas.js.map +1 -1
- package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts +1 -16
- package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js +1 -7
- package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/email.external-connectors-models.schemas.d.ts +1 -56
- package/dist/esm/protocols/email.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/email.external-connectors-models.schemas.js +0 -20
- package/dist/esm/protocols/email.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/email.standard-interface.schemas.d.ts +4 -4
- package/dist/esm/protocols/email.standard-interface.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/embeddings.external-connectors-models.schemas.d.ts +1 -16
- package/dist/esm/protocols/embeddings.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/embeddings.external-connectors-models.schemas.js +4 -9
- package/dist/esm/protocols/embeddings.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/frontend.external-connectors-models.schemas.d.ts +6 -13
- package/dist/esm/protocols/frontend.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/frontend.external-connectors-models.schemas.js +0 -9
- package/dist/esm/protocols/frontend.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts +1 -15
- package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/hooks.external-connectors-models.schemas.js +1 -9
- package/dist/esm/protocols/hooks.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/image.external-connectors-models.schemas.d.ts +1 -18
- package/dist/esm/protocols/image.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/image.external-connectors-models.schemas.js +1 -7
- package/dist/esm/protocols/image.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts +92 -40
- package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/llm.external-connectors-models.schemas.js +154 -41
- package/dist/esm/protocols/llm.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/oauth2-provider-assurance.definitions.d.ts +7 -0
- package/dist/esm/protocols/oauth2-provider-assurance.definitions.d.ts.map +1 -0
- package/dist/esm/protocols/oauth2-provider-assurance.definitions.js +36 -0
- package/dist/esm/protocols/oauth2-provider-assurance.definitions.js.map +1 -0
- package/dist/esm/protocols/oauth2-provider-assurance.schemas.d.ts +23 -0
- package/dist/esm/protocols/oauth2-provider-assurance.schemas.d.ts.map +1 -0
- package/dist/esm/protocols/oauth2-provider-assurance.schemas.js +25 -0
- package/dist/esm/protocols/oauth2-provider-assurance.schemas.js.map +1 -0
- package/dist/esm/protocols/oauth2.external-connectors-models.schemas.d.ts +0 -148
- package/dist/esm/protocols/oauth2.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/oauth2.external-connectors-models.schemas.js +1 -40
- package/dist/esm/protocols/oauth2.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts +530 -15
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js +380 -0
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/sms.external-connectors-models.schemas.d.ts +0 -39
- package/dist/esm/protocols/sms.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/sms.external-connectors-models.schemas.js +0 -13
- package/dist/esm/protocols/sms.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/sms.standard-interface.schemas.d.ts +1 -1
- package/dist/esm/protocols/sms.standard-interface.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/sms.standard-interface.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -3
- package/dist/esm/.native.tsbuildinfo +0 -1
- package/dist/esm/core/protocols.external-connectors-models.schemas.d.ts +0 -74
- package/dist/esm/core/protocols.external-connectors-models.schemas.d.ts.map +0 -1
- package/dist/esm/core/protocols.external-connectors-models.schemas.js +0 -1
- package/dist/esm/core/protocols.external-connectors-models.schemas.js.map +0 -1
- package/dist/esm/protocols/rest-api.external-connectors-models.schemas.d.ts +0 -37
- package/dist/esm/protocols/rest-api.external-connectors-models.schemas.d.ts.map +0 -1
- package/dist/esm/protocols/rest-api.external-connectors-models.schemas.js +0 -10
- package/dist/esm/protocols/rest-api.external-connectors-models.schemas.js.map +0 -1
|
@@ -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
|
-
|
|
5
|
-
|
|
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":["
|
|
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":"
|
|
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":["
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks-capability.external-connectors-models.schemas.js","sourceRoot":"","sources":["
|
|
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
|
|
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[];
|
|
@@ -159,11 +159,6 @@ export type Hook_Endpoint = {
|
|
|
159
159
|
/** Declarative scope binding — how events map to engine scope */
|
|
160
160
|
scopeBinding: Hook_EndpointScopeBinding;
|
|
161
161
|
};
|
|
162
|
-
export type HookInitiatorProvider_Profile = ExternalProvider_ExchangeProtocol_Profile_Base & {
|
|
163
|
-
baseURL?: string;
|
|
164
|
-
webhookDocUrl?: string;
|
|
165
|
-
signatureConfig?: Hook_SignatureConfig;
|
|
166
|
-
};
|
|
167
162
|
export type HookInitiatorProvider_Configuration = ExternalProvider_ExchangeProtocol_Configuration_Base & {
|
|
168
163
|
/** Webhook endpoints — each generates a route: POST /webhooks/{providerRef}/{endpointKey} */
|
|
169
164
|
endpoints: Hook_Endpoint[];
|
|
@@ -188,13 +183,4 @@ export type Hook_OperationDefinition = ExternalProvider_OperationDefinition_Base
|
|
|
188
183
|
operationContextSchema: typeof Hook_OperationContextSchema;
|
|
189
184
|
samplePayload?: unknown;
|
|
190
185
|
};
|
|
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
186
|
//# sourceMappingURL=hooks.external-connectors-models.schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["
|
|
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;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;;;;;;;;;;;;;;;iBAoBjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAMtE;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C,2EAA2E;IAC3E,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oB,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;CACzC,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
|
|
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
|
//===============================================================
|
|
@@ -92,12 +92,4 @@ export const Hook_OperationContextSchema = ExternalProvider_OperationContextSche
|
|
|
92
92
|
signatureVerified: z.boolean().optional(),
|
|
93
93
|
pollingCursor: z.string().optional(),
|
|
94
94
|
});
|
|
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
95
|
//# 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,cAAc,EAEd,sCAAsC,EAEtC,mDAAmD,EACpD,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,gBAA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AAC,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,IAA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mB,CAAC;IAC3C,iBAAiB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACzC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { \n API_HttpMethod, \n ExternalProvider_ExchangeProtocol_Configuration_Base, \n ExternalProvider_ExchangeProtocol_Kind \n} from \"../core/commons.external-connectors-models.schemas\";\nimport { ExternalProvider_Auth_Kind } from \"../core/security.external-connectors-models.schemas\";\nimport { ExternalProvider_OperationContextSchema, ExternalProvider_OperationDefinition_Base } from \"../core/operations.external-connectors-models.schemas\";\n\n//===============================================================\n// Webhook/Hooks Provider\n// --------\n// Schema definitions for webhook integrations.\n// Supports event subscriptions, signature verification, and\n// delivery management.\n//===============================================================\n\n// ===============================================================\n// Webhook Enums\n// ===============================================================\n\nexport const Hook_HttpMethods: readonly API_HttpMethod[] = [\n API_HttpMethod.POST,\n API_HttpMethod.PUT,\n API_HttpMethod.PATCH,\n];\n\nexport const Hook_SecurityType: readonly ExternalProvider_Auth_Kind[] = [\n ExternalProvider_Auth_Kind.NONE,\n ExternalProvider_Auth_Kind.HMAC_SIGNATURE,\n ExternalProvider_Auth_Kind.BEARER,\n ExternalProvider_Auth_Kind.BASIC,\n];\n\nexport enum Hook_ContentType {\n JSON = \"application/json\",\n FORM_URLENCODED = \"application/x-www-form-urlencoded\",\n XML = \"application/xml\",\n}\n\nexport enum Hook_TriggerStrategy {\n WEBHOOK = \"webhook\",\n POLLING = \"polling\",\n APP_WEBHOOK = \"app_webhook\",\n}\n\nexport enum Hook_HandshakeType {\n NONE = \"none\",\n CHALLENGE_RESPONSE = \"challenge_response\",\n VERIFICATION_TOKEN = \"verification_token\",\n}\n\nexport enum Hook_SignatureAlgorithm {\n HMAC_SHA256 = \"hmac-sha256\",\n HMAC_SHA512 = \"hmac-sha512\",\n HMAC_SHA1 = \"hmac-sha1\",\n}\n\nexport enum Hook_DeliveryStatus {\n PENDING = \"pending\",\n DELIVERED = \"delivered\",\n FAILED = \"failed\",\n RETRYING = \"retrying\",\n}\n\n// ===============================================================\n// Webhook Signature Config\n// ===============================================================\n\nexport const Hook_SignatureConfigSchema = z.object({\n algorithm: z.enum(Hook_SignatureAlgorithm),\n headerName: z.string(), // e.g., \"X-Hub-Signature-256\"\n timestampHeader: z.string().optional(),\n prefix: z.string().optional(), // e.g., \"sha256=\"\n});\nexport type Hook_SignatureConfig = z.infer<typeof Hook_SignatureConfigSchema>;\n\n// ===============================================================\n// Webhook Trigger Spec\n// ===============================================================\n\nexport const Hook_TriggerSpecSchema = z.object({\n strategy: z.enum(Hook_TriggerStrategy),\n \n // Events\n eventTypes: z.array(z.string()).optional(),\n \n // Handshake\n handshakeType: z.enum(Hook_HandshakeType).optional(),\n challengeField: z.string().optional(),\n \n // Signature\n signatureConfig: Hook_SignatureConfigSchema.optional(),\n \n // Polling (for POLLING strategy)\n pollingIntervalMs: z.number().optional(),\n deduplicationKey: z.string().optional(),\n \n // Lifecycle\n hasOnEnable: z.boolean().optional(),\n hasOnDisable: z.boolean().optional(),\n});\nexport type Hook_TriggerSpec = z.infer<typeof Hook_TriggerSpecSchema>;\n\n// ===============================================================\n// Webhook Endpoint Scope Binding (Declarative Scope Resolution)\n// ===============================================================\n\n/**\n * Variant config for polymorphic scope resolution.\n * Each entry represents one variant collection to query during lookup.\n */\nexport interface Hook_PolymorphicVariantBinding {\n /** Variant resource type to query (e.g., 'organizationBillingAccounts') */\n resourceType: string;\n /** Parent resource type (e.g., 'organizations') */\n parentResourceType: string;\n /** Parent field identifier — the scope entity ID field on matched documents (e.g., 'organizationId') */\n parentFieldIdentifier: string;\n /** Whether this variant's parent is a primary scope entity */\n isPrimaryScope: boolean;\n}\n\n/**\n * Declarative scope resolution config for a webhook endpoint.\n * \n * Determines how an incoming webhook event is mapped to a engine scope\n * (organization or user) without writing per-capability code.\n * \n * Three modes:\n * - APPLICATION: Global events, no lookup needed.\n * - Single-scope (ORGANIZATIONS / USER_SELF): Extract an ID from the\n * event payload, look up a single resource type, and resolve the scope entity ID.\n * - Polymorphic: Extract an ID from the event payload, query N variant collections\n * in order, and resolve the scope from whichever variant matches. Used when a\n * resource has been polymorphically expanded across multiple scope types.\n */\nexport type Hook_EndpointScopeBinding =\n | {\n /** Global/application-scoped events — no entity lookup needed */\n primaryScope: 'APPLICATION';\n }\n | {\n /** Scoped events — requires payload extraction + resource lookup */\n primaryScope: 'ORGANIZATIONS' | 'USER_SELF';\n /** Dot-path into the parsed event payload to extract the provider's scope ID (e.g., 'data.object.customer') */\n payloadScopeIdPath: string;\n /** Resource type to query for scope resolution (e.g., 'BILLING_ACCOUNTS') */\n lookupResourceType: string;\n /** Field on the resource to match the extracted ID (e.g., 'providerCustomerId') */\n lookupField: string;\n /** Field on the found resource that gives the scope entity ID (defaults to 'organizationId'/'userId' based on primaryScope) */\n scopeEntityIdField?: string;\n /** Event types that don't carry scope — fall back to APPLICATION scope (e.g., 'product.created', 'price.updated') */\n scopeExemptEventTypes?: string[];\n }\n | {\n /** Polymorphic scope resolution — queries multiple variant collections */\n mode: 'polymorphic';\n /** Dot-path into the parsed event payload to extract the provider's scope ID (e.g., 'data.object.customer') */\n payloadScopeIdPath: string;\n /** Field on each variant resource to match the extracted ID (e.g., 'providerCustomerId') */\n lookupField: string;\n /** Variant collections to query, in order. First match wins. */\n variants: Hook_PolymorphicVariantBinding[];\n /** Event types that don't carry scope — fall back to APPLICATION scope (e.g., 'product.created', 'price.updated') */\n scopeExemptEventTypes?: string[];\n /**\n * Per-event-type overrides for payloadScopeIdPath.\n * Keyed by the provider's native event type (e.g., 'customer.deleted').\n * Use when different event types carry the scope ID at different payload paths.\n */\n eventTypeOverrides?: Record<string, { payloadScopeIdPath: string }>;\n };\n\n// ===============================================================\n// Webhook Endpoint\n// ===============================================================\n\n/**\n * A webhook endpoint for a specific domain/capability within a provider.\n * \n * Each endpoint generates a route: POST /webhooks/{providerRef}/{endpointKey}\n * \n * The endpoint is the SINGLE SOURCE OF TRUTH for all webhook metadata:\n * - Signature config (how to verify)\n * - Event types (what this endpoint handles)\n * - Scope binding (how events map to engine scope)\n * \n * Examples:\n * Stripe: { key: 'billing', capability: 'billing', ... }\n * Google: { key: 'calendar', capability: 'calendar', ... }, { key: 'drive', ... }\n * Microsoft: { key: 'graph', ... }, { key: 'teams', ... }\n */\nexport type Hook_Endpoint = {\n /** Unique key within this provider (used in route: /webhooks/stripe/{key}) */\n key: string;\n /**\n * Optional human-readable name. The runtime projection emitted by\n * `getDefaultProviderConfiguration` does not set this (verified\n * 2026-05-06 — no consumer reads `endpoint.displayName` anywhere\n * in the engine or in `external-connectors-public`); requiring it\n * was aspirational. Future admin/UI surfaces that want to display\n * webhook endpoints should treat the field as optional and fall\n * back to `key` when absent.\n */\n displayName?: string;\n /** Which capability this endpoint serves */\n capability: string;\n /** Signature verification config for this endpoint */\n signatureConfig: Hook_SignatureConfig;\n /** Trigger strategy (webhook push, polling, app_webhook) */\n triggerStrategy: Hook_TriggerStrategy;\n /** Handshake type if applicable */\n handshakeType?: Hook_HandshakeType;\n /** Event types this endpoint handles (single source of truth) */\n eventTypes: string[];\n /** Declarative scope binding — how events map to engine scope */\n scopeBinding: Hook_EndpointScopeBinding;\n};\n\n// ===============================================================\n// Webhook Provider Configuration\n// ===============================================================\n\nexport type HookInitiatorProvider_Configuration = ExternalProvider_ExchangeProtocol_Configuration_Base & {\n /** Webhook endpoints — each generates a route: POST /webhooks/{providerRef}/{endpointKey} */\n endpoints: Hook_Endpoint[];\n /** Per-endpoint webhook secrets: endpointKey → secret value */\n endpointSecrets?: Record<string, string>;\n /** Fallback secret if not specified per-endpoint (legacy compat) */\n webhookSecret?: string;\n};\n\n// ===============================================================\n// Webhook Operation Context\n// ===============================================================\n\nexport const Hook_OperationContextSchema = ExternalProvider_OperationContextSchema.extend({\n eventType: z.string(),\n eventId: z.string().optional(),\n deliveryStatus: z.enum(Hook_DeliveryStatus),\n signatureVerified: z.boolean().optional(),\n pollingCursor: z.string().optional(),\n});\nexport type Hook_OperationContext = z.infer<typeof Hook_OperationContextSchema>;\n\n// ===============================================================\n// Webhook Operation Definition\n// ===============================================================\n\nexport type Hook_OperationDefinition = ExternalProvider_OperationDefinition_Base & {\n triggerSpec: Hook_TriggerSpec;\n operationContextSchema: typeof Hook_OperationContextSchema;\n samplePayload?: unknown;\n};\n\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
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":["
|
|
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,cAAc;IACjC,IAAI,SAAS;CACd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M,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,
|
|
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,mDA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C,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;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,oCAA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C7D,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC,QAAQ,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"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { ExternalProvider_ExchangeProtocol_Configuration_Base, ExternalProvider_ExchangeProtocol_Kind
|
|
2
|
+
import { ExternalProvider_ExchangeProtocol_Configuration_Base, 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 LLM_Model {
|
|
5
5
|
OPEN_AI_O1 = "o1",
|
|
@@ -26,7 +26,9 @@ export declare enum LLM_Model {
|
|
|
26
26
|
OPEN_AI_GPT_3_5_TURBO = "gpt-3.5-turbo",
|
|
27
27
|
/** Anthropic's most intelligent generally-available model (Claude 5 family, Mythos-class tier). */
|
|
28
28
|
CLAUDE_FABLE_5 = "claude-fable-5",
|
|
29
|
-
/** Claude 5 family Opus tier. Same no-sampling-params contract as the rest of the family. */
|
|
29
|
+
/** Claude 5 family Opus tier, 5.5 revision. Same no-sampling-params contract as the rest of the family. */
|
|
30
|
+
CLAUDE_OPUS_5_5 = "claude-opus-5-5",
|
|
31
|
+
/** Claude 5 family Opus tier (superseded by CLAUDE_OPUS_5_5). Same no-sampling-params contract as the rest of the family. */
|
|
30
32
|
CLAUDE_OPUS_5 = "claude-opus-5",
|
|
31
33
|
/** Claude 5 family workhorse. */
|
|
32
34
|
CLAUDE_SONNET_5 = "claude-sonnet-5",
|
|
@@ -90,12 +92,13 @@ export declare enum LLM_Model_Thinking_Capability {
|
|
|
90
92
|
OPTIONAL = "optional",
|
|
91
93
|
/**
|
|
92
94
|
* The model ALWAYS reasons and thinking CANNOT be disabled (o-series,
|
|
93
|
-
* `claude-fable-5`). Every effort is valid EXCEPT `NONE` — asking such a model
|
|
95
|
+
* `claude-fable-5`, `claude-opus-5-5`). Every effort is valid EXCEPT `NONE` — asking such a model
|
|
94
96
|
* not to think is a provider error, not a preference.
|
|
95
97
|
*
|
|
96
98
|
* NOT a property of a model FAMILY: measured 2026-09-08, `claude-fable-5`
|
|
97
99
|
* refuses `thinking.type.disabled` while `claude-sonnet-5` and
|
|
98
|
-
* `claude-opus-5` accept it
|
|
100
|
+
* `claude-opus-5` accept it — and on 2026-09-24 `claude-opus-5-5` refused it,
|
|
101
|
+
* so even two revisions of one tier differ. Both siblings carried this value on the family's
|
|
99
102
|
* behalf for a month, which made `validateReasoningEffortForModel` refuse a
|
|
100
103
|
* configuration the provider would have honoured.
|
|
101
104
|
*/
|
|
@@ -240,15 +243,6 @@ export declare enum LLMProvider_PromptFormat {
|
|
|
240
243
|
/** Markdown headings (## Instructions, ## Context) - generic fallback */
|
|
241
244
|
MARKDOWN_HEADINGS = "markdown_headings"
|
|
242
245
|
}
|
|
243
|
-
export type LLMProvider_Profile = ExternalProvider_ExchangeProtocol_Profile_Base & {
|
|
244
|
-
baseURL?: string;
|
|
245
|
-
/** Preferred prompt format for this provider (XML for Claude, MESSAGE_ROLES for OpenAI, etc.) */
|
|
246
|
-
promptFormatPreference: LLMProvider_PromptFormat;
|
|
247
|
-
/** Whether provider supports system messages (most modern LLMs do) */
|
|
248
|
-
supportsSystemMessage: boolean;
|
|
249
|
-
/** Whether provider benefits from structured context tags (e.g., XML tags for Claude) */
|
|
250
|
-
prefersStructuredContext: boolean;
|
|
251
|
-
};
|
|
252
246
|
export type LLMProvider_Configuration = ExternalProvider_ExchangeProtocol_Configuration_Base & {
|
|
253
247
|
customLocation?: string;
|
|
254
248
|
maxStructuredDataFieldAllowed?: number;
|
|
@@ -282,12 +276,13 @@ export type LLMProvider_ToolChoice = z.infer<typeof LLMProvider_ToolChoice_Schem
|
|
|
282
276
|
* | Model | Supported | Rejected |
|
|
283
277
|
* |--------------------------------------|---------------------------------|-------------------------------|
|
|
284
278
|
* | GPT-5.6 sol / terra / luna | none, low, medium, high, xhigh | `minimal`, `provider-default` |
|
|
285
|
-
* | claude-fable-5
|
|
279
|
+
* | claude-fable-5 · claude-opus-5-5 | low, medium, high, xhigh | **`none`**, `minimal`, `provider-default` |
|
|
286
280
|
* | claude-sonnet-5 · claude-opus-5 | none, low, medium, high, xhigh | `minimal`, `provider-default` |
|
|
287
281
|
*
|
|
288
282
|
* ⚠️ `NONE` is NOT portable, but the line is finer than "OpenAI yes, Anthropic
|
|
289
|
-
* no": `claude-fable-5`
|
|
290
|
-
*
|
|
283
|
+
* no": `claude-fable-5` and `claude-opus-5-5` refuse it while `claude-sonnet-5`
|
|
284
|
+
* and `claude-opus-5` accept it, so a level legal on one Opus revision is
|
|
285
|
+
* illegal on the next —
|
|
291
286
|
* which is why the capability is a per-model probed fact and never a family
|
|
292
287
|
* assumption. `PROVIDER_DEFAULT` is rejected as an explicit value by BOTH
|
|
293
288
|
* providers — omit the field entirely for the model's own default.
|
|
@@ -665,14 +660,51 @@ export declare enum LLMProvider_StructuredGenerationFailureKind {
|
|
|
665
660
|
/**
|
|
666
661
|
* One structural validation issue recovered from the SDK/Zod cause chain.
|
|
667
662
|
*
|
|
668
|
-
*
|
|
669
|
-
*
|
|
670
|
-
*
|
|
671
|
-
*
|
|
663
|
+
* Never the issue's `message`: a provider validation error retains the rejected value in its message,
|
|
664
|
+
* so carrying it would copy private model output into any log, trace or persisted failure record that
|
|
665
|
+
* receives this reason. The path names the field the model got wrong.
|
|
666
|
+
*
|
|
667
|
+
* ## What the SCHEMA expected, which is not model output
|
|
668
|
+
*
|
|
669
|
+
* A path and a code say WHERE and roughly WHAT, and that is not enough for a retry to succeed. Measured
|
|
670
|
+
* 2026-09-13 on Wonder CRM's `document-release-policy`: three attempts in a row were rejected with
|
|
671
|
+
* `operatorAttestationLimitationRefs: invalid_type`, and the model repeated the same answer each time
|
|
672
|
+
* because nothing told it an ARRAY was expected. Zod 4 carries that in fields separate from the message,
|
|
673
|
+
* and every one of them is read off the SCHEMA, never off the value:
|
|
674
|
+
*
|
|
675
|
+
* - `expected` — the type an `invalid_type` wanted (`array`, `string`);
|
|
676
|
+
* - `format` / `pattern` — the format an `invalid_format` wanted, and the schema's own regex;
|
|
677
|
+
* - `values` — the options an `invalid_value` admits, i.e. the enum's members;
|
|
678
|
+
* - `keys` — the key names an `unrecognized_keys` found. Schema shape against a strict object, and it
|
|
679
|
+
* was PROJECTED by the provider service while this schema did not declare it, so the caller-side
|
|
680
|
+
* parse silently stripped it — the diagnosis its projection existed for never arrived.
|
|
681
|
+
*
|
|
682
|
+
* ## The one code for which the MESSAGE is the only content: `custom`
|
|
683
|
+
*
|
|
684
|
+
* A `custom` issue is raised by a `.refine()` / `.superRefine()` this repository AUTHORED, and it carries
|
|
685
|
+
* none of the fields above — no `expected`, no `values`, nothing read off a leaf schema, because what it
|
|
686
|
+
* refuses is a relationship BETWEEN fields that no leaf can state. Its message is where the author wrote
|
|
687
|
+
* that relationship down, so an issue projected without it says `sharedResponsibility: custom` and nothing
|
|
688
|
+
* else. Measured 2026-09-16 on Wonder CRM's `top_down.compliance-conception`: three attempts in a row were
|
|
689
|
+
* refused on `obligations.N.sharedResponsibility: custom` and the model could not correct an answer whose
|
|
690
|
+
* rule — "several governance actors require a shared-responsibility judgement" — never reached it.
|
|
691
|
+
*
|
|
692
|
+
* It is SAFE for the same reason the fields above are, and for no weaker one: the text is the schema
|
|
693
|
+
* author's, written in this repository's source, not the provider's rendering of the rejected value.
|
|
694
|
+
* `code: "custom"` is what guarantees that — every other code's message is composed by Zod around the
|
|
695
|
+
* input. **A refinement author therefore owes this field a message that names schema-shaped identifiers
|
|
696
|
+
* only** — a slug, a ref, a key, an index — exactly the category `keys` already admits, and never a
|
|
697
|
+
* fragment of the rejected content.
|
|
672
698
|
*/
|
|
673
699
|
export declare const LLMProvider_StructuredValidationIssueSchema: z.ZodObject<{
|
|
674
700
|
code: z.ZodString;
|
|
675
701
|
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
702
|
+
expected: z.ZodOptional<z.ZodString>;
|
|
703
|
+
format: z.ZodOptional<z.ZodString>;
|
|
704
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
705
|
+
values: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
706
|
+
keys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
707
|
+
refinementMessage: z.ZodOptional<z.ZodString>;
|
|
676
708
|
}, z.core.$strip>;
|
|
677
709
|
export type LLMProvider_StructuredValidationIssue = z.infer<typeof LLMProvider_StructuredValidationIssueSchema>;
|
|
678
710
|
/**
|
|
@@ -713,12 +745,44 @@ export declare const LLMProvider_StructuredGenerationFailureSchema: z.ZodObject<
|
|
|
713
745
|
validationIssues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
714
746
|
code: z.ZodString;
|
|
715
747
|
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
748
|
+
expected: z.ZodOptional<z.ZodString>;
|
|
749
|
+
format: z.ZodOptional<z.ZodString>;
|
|
750
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
751
|
+
values: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
752
|
+
keys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
753
|
+
refinementMessage: z.ZodOptional<z.ZodString>;
|
|
716
754
|
}, z.core.$strip>>>;
|
|
717
755
|
finishReason: z.ZodOptional<z.ZodString>;
|
|
718
756
|
generatedTextLength: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
719
757
|
rootKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
720
758
|
}, z.core.$strip>;
|
|
721
759
|
export type LLMProvider_StructuredGenerationFailure = z.infer<typeof LLMProvider_StructuredGenerationFailureSchema>;
|
|
760
|
+
/**
|
|
761
|
+
* Render ONE validation issue as `path: code (what the schema wanted)`.
|
|
762
|
+
*
|
|
763
|
+
* THE renderer for an issue, and the reason it is exported rather than inlined into the failure line
|
|
764
|
+
* below: a caller that needs issues one at a time — the meta-workflow generation port turns each into a
|
|
765
|
+
* finding fed back to the model — otherwise hand-rolls this list, and every field added to the issue
|
|
766
|
+
* afterwards reaches one copy. That has now happened three times, each time silently, each time costing
|
|
767
|
+
* live runs: the paths themselves were dropped (2026-08-29), then `expected` (2026-09-13), then a
|
|
768
|
+
* `custom` refinement's message (2026-09-16). Keeping one renderer means a site that reports an issue at
|
|
769
|
+
* all reports the whole issue.
|
|
770
|
+
*
|
|
771
|
+
* Carries no generated text — see {@link LLMProvider_StructuredValidationIssueSchema} for why each field
|
|
772
|
+
* it prints is schema shape rather than the rejected value.
|
|
773
|
+
*/
|
|
774
|
+
export declare function describeStructuredValidationIssue(issue: LLMProvider_StructuredValidationIssue): string;
|
|
775
|
+
/**
|
|
776
|
+
* Render a structured-generation failure as one operator-readable line.
|
|
777
|
+
*
|
|
778
|
+
* Lives here, beside the schema, rather than in each caller: the two labelling orchestrators alone would
|
|
779
|
+
* otherwise have hand-rolled the same rendering twice, and the value of `validationIssues` is entirely in
|
|
780
|
+
* how it is presented — a caller that quietly drops it reports "no object" with extra words.
|
|
781
|
+
*
|
|
782
|
+
* Carries no generated text, only its length — see
|
|
783
|
+
* {@link LLMProvider_StructuredGenerationFailureSchema}.
|
|
784
|
+
*/
|
|
785
|
+
export declare function describeStructuredGenerationFailure(failure: LLMProvider_StructuredGenerationFailure): string;
|
|
722
786
|
/**
|
|
723
787
|
* Read the structured-generation failure reason off an invocation's `executionContext`.
|
|
724
788
|
*
|
|
@@ -732,19 +796,6 @@ export type LLMProvider_StructuredGenerationFailure = z.infer<typeof LLMProvider
|
|
|
732
796
|
* recorded" — in either case there is nothing more specific to report than the absence
|
|
733
797
|
* of an object.
|
|
734
798
|
*/
|
|
735
|
-
/**
|
|
736
|
-
* Render a structured-generation failure as one operator-readable line.
|
|
737
|
-
*
|
|
738
|
-
* Lives here, beside the schema, rather than in each caller: the two labelling
|
|
739
|
-
* orchestrators alone would otherwise have hand-rolled the same rendering twice, and the
|
|
740
|
-
* value of `validationIssues` is entirely in how it is presented — a caller that quietly
|
|
741
|
-
* drops it reports "no object" with extra words. Keeping one renderer means a site that
|
|
742
|
-
* reports the reason at all reports the whole reason.
|
|
743
|
-
*
|
|
744
|
-
* Carries no generated text, only its length — see
|
|
745
|
-
* {@link LLMProvider_StructuredGenerationFailureSchema}.
|
|
746
|
-
*/
|
|
747
|
-
export declare function describeStructuredGenerationFailure(failure: LLMProvider_StructuredGenerationFailure): string;
|
|
748
799
|
export declare function readStructuredGenerationFailure(executionContext: unknown): LLMProvider_StructuredGenerationFailure | undefined;
|
|
749
800
|
export declare const LLMProvider_OperationContext_BaseSchema: z.ZodObject<{
|
|
750
801
|
callTimestamp: z.ZodISODateTime;
|
|
@@ -816,6 +867,12 @@ export declare const LLMProvider_OperationContext_BaseSchema: z.ZodObject<{
|
|
|
816
867
|
validationIssues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
817
868
|
code: z.ZodString;
|
|
818
869
|
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
870
|
+
expected: z.ZodOptional<z.ZodString>;
|
|
871
|
+
format: z.ZodOptional<z.ZodString>;
|
|
872
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
873
|
+
values: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
874
|
+
keys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
875
|
+
refinementMessage: z.ZodOptional<z.ZodString>;
|
|
819
876
|
}, z.core.$strip>>>;
|
|
820
877
|
finishReason: z.ZodOptional<z.ZodString>;
|
|
821
878
|
generatedTextLength: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -951,9 +1008,11 @@ export declare const LLMProvider_GenerateStructuredInputSchema: z.ZodObject<{
|
|
|
951
1008
|
type: z.ZodLiteral<"image">;
|
|
952
1009
|
image: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
953
1010
|
}, z.core.$strip>>>;
|
|
1011
|
+
includeRejectedAnswer: z.ZodOptional<z.ZodBoolean>;
|
|
954
1012
|
}, z.core.$strip>;
|
|
955
1013
|
export declare const LLMProvider_GenerateStructuredOutputSchema: z.ZodObject<{
|
|
956
1014
|
object: z.ZodUnknown;
|
|
1015
|
+
rejectedAnswer: z.ZodOptional<z.ZodString>;
|
|
957
1016
|
}, z.core.$strip>;
|
|
958
1017
|
export type LLMProvider_GenerateStructuredInput = z.infer<typeof LLMProvider_GenerateStructuredInputSchema>;
|
|
959
1018
|
export type LLMProvider_GenerateStructuredOutput = z.infer<typeof LLMProvider_GenerateStructuredOutputSchema>;
|
|
@@ -1008,11 +1067,4 @@ export declare const LLMProvider_StreamStructuredOutputSchema: z.ZodObject<{
|
|
|
1008
1067
|
}, z.core.$strip>;
|
|
1009
1068
|
export type LLMProvider_StreamStructuredInput = z.infer<typeof LLMProvider_StreamStructuredInputSchema>;
|
|
1010
1069
|
export type LLMProvider_StreamStructuredOutput = z.infer<typeof LLMProvider_StreamStructuredOutputSchema>;
|
|
1011
|
-
export declare const LLMProvider_StatusSchema: z.ZodObject<{
|
|
1012
|
-
status: z.ZodEnum<typeof import("..").ExternalProvider_Status>;
|
|
1013
|
-
lastCheckedAt: z.ZodString;
|
|
1014
|
-
errorReason: z.ZodOptional<z.ZodString>;
|
|
1015
|
-
protocolKind: z.ZodLiteral<ExternalProvider_ExchangeProtocol_Kind.LLM_PROVIDER>;
|
|
1016
|
-
}, z.core.$strip>;
|
|
1017
|
-
export type LLMProvider_Status = z.infer<typeof LLMProvider_StatusSchema>;
|
|
1018
1070
|
//# sourceMappingURL=llm.external-connectors-models.schemas.d.ts.map
|