@wildo-ai/external-connectors-models 1.1.7 → 1.1.9
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/companion-exports.js.map +1 -1
- package/dist/esm/core/commons.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/core/commons.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/core/oauth2.enums.d.ts.map +1 -1
- package/dist/esm/core/oauth2.enums.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/operations.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/core/operations.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/core/security.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/core/security.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/protocols/billing.standard-interface.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/billing.standard-interface.schemas.js.map +1 -1
- package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js +1 -1
- package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/email-inbound.standard-interface.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/email-inbound.standard-interface.schemas.js.map +1 -1
- package/dist/esm/protocols/email.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/email.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/email.standard-interface.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/email.standard-interface.schemas.js.map +1 -1
- package/dist/esm/protocols/embeddings.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/embeddings.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/file-storage.standard-interface.d.ts.map +1 -1
- package/dist/esm/protocols/file-storage.standard-interface.js.map +1 -1
- package/dist/esm/protocols/frontend.external-connectors-models.schemas.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/protocols/hooks.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/image.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/image.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/llm.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/oauth2-provider-assurance.definitions.d.ts.map +1 -1
- package/dist/esm/protocols/oauth2-provider-assurance.definitions.js.map +1 -1
- package/dist/esm/protocols/oauth2-provider-assurance.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/oauth2-provider-assurance.schemas.js.map +1 -1
- package/dist/esm/protocols/oauth2.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/oauth2.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/provider-oauth2-token-endpoint-hosts.external-connectors-models.d.ts.map +1 -1
- package/dist/esm/protocols/provider-oauth2-token-endpoint-hosts.external-connectors-models.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/protocols/sms.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/sms.external-connectors-models.schemas.js.map +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 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.external-connectors-models.schemas.js","sourceRoot":"","sources":["../../../src/protocols/email.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,uCAAuC,EAA6C,MAAM,uDAAuD,CAAC;AAE3J,iEAAiE;AACjE,iBAAiB;AACjB,WAAW;AACX,qEAAqE;AACrE,wEAAwE;AACxE,sDAAsD;AACtD,EAAE;AACF,wBAAwB;AACxB,wEAAwE;AACxE,0EAA0E;AAC1E,gEAAgE;AAChE,0EAA0E;AAC1E,iEAAiE;AAEjE,kEAAkE;AAClE,uBAAuB;AACvB,kEAAkE;AAElE;;;GAGG;AACH,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,0DAA+B,CAAA;IAC/B,kDAAuB,CAAA;AACzB,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,4BAGX;AAHD,WAAY,4BAA4B;IACtC,qDAAqB,CAAA;IACrB,6CAAa,CAAA;AACf,CAAC,EAHW,4BAA4B,KAA5B,4BAA4B,QAGvC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,2BAIX;AAJD,WAAY,2BAA2B;IACrC,4CAAa,CAAA;IACb,oDAAqB,CAAA;IACrB,0CAAW,CAAA;AACb,CAAC,EAJW,2BAA2B,KAA3B,2BAA2B,QAItC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,4BAaX;AAbD,WAAY,4BAA4B;IACtC,iDAAiB,CAAA;IACjB,6CAAa,CAAA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,EAAE;IAErD,SAAS;IACT,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAE3C,mCAAmC;IACnC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzC,gBAAgB,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC;AAGH,kEAAkE;AAClE,uBAAuB;AACvB,kEAAkE;AAElE,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,MAAM,CAAC;IACvD,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,4BAA4B,CAAC;IAC/C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;IAE3B,sBAAsB;IACtB,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,QAAQ,EAAE;IACvD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,mBAAmB;IAC7C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAEhC,gBAAgB;IAChB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,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 { ExternalProvider_OperationContextSchema, ExternalProvider_OperationDefinition_Base } from \"../core/operations.external-connectors-models.schemas\";\n\n//===============================================================\n// Email Provider\n// --------\n// Integration with email service providers for sending transactional\n// and marketing emails. Supports both REST API and SMTP-based providers\n// with differentiated operations for each email type.\n//\n// CONFIGURATION LEVELS:\n// - Profile (Provider-level): Fixed by the provider, cannot be changed.\n// Examples: API endpoints, SMTP server addresses, capabilities, limits.\n// - Configuration (Consumer-level): User-configurable settings.\n// Examples: API keys, sender addresses, tracking preferences, webhooks.\n//===============================================================\n\n// ===============================================================\n// Email Provider Enums\n// ===============================================================\n\n/**\n * The type of email operation - transactional vs marketing have different\n * requirements, compliance rules, and often use separate sending domains/IPs.\n */\nexport enum EmailProvider_EmailType {\n TRANSACTIONAL = \"transactional\", // Password resets, receipts, notifications\n MARKETING = \"marketing\", // Newsletters, promotions, campaigns\n}\n\n/**\n * The delivery method used by the email provider.\n * REST API provides more features, SMTP is simpler but more limited.\n */\nexport enum EmailProvider_DeliveryMethod {\n REST_API = \"rest_api\",\n SMTP = \"smtp\",\n}\n\n/**\n * SMTP encryption/security modes.\n */\nexport enum EmailProvider_SMTP_Security {\n NONE = \"none\", // Plain text (port 25, not recommended)\n STARTTLS = \"starttls\", // Upgrade to TLS (port 587)\n TLS = \"tls\", // Implicit TLS/SSL (port 465)\n}\n\n/**\n * Email delivery status for tracking.\n */\nexport enum EmailProvider_DeliveryStatus {\n QUEUED = \"queued\",\n SENT = \"sent\",\n DELIVERED = \"delivered\",\n OPENED = \"opened\",\n CLICKED = \"clicked\",\n BOUNCED = \"bounced\",\n SOFT_BOUNCED = \"soft_bounced\",\n SPAM_COMPLAINT = \"spam_complaint\",\n UNSUBSCRIBED = \"unsubscribed\",\n DROPPED = \"dropped\",\n DEFERRED = \"deferred\",\n FAILED = \"failed\",\n}\n\n/**\n * Email bounce types.\n */\nexport enum EmailProvider_BounceType {\n HARD = \"hard\", // Permanent failure (address doesn't exist)\n SOFT = \"soft\", // Temporary failure (mailbox full, server down)\n TRANSIENT = \"transient\",\n}\n\n/**\n * Standard email provider operation keys.\n * Each provider implements a subset of these based on capabilities.\n */\nexport enum EmailProvider_OperationKey {\n // Core Transactional Operations\n SEND_EMAIL = \"email.send\",\n SEND_BATCH = \"email.sendBatch\",\n SEND_TEMPLATE = \"email.sendTemplate\",\n \n // Marketing/Campaign Operations\n SEND_CAMPAIGN = \"email.campaign.send\",\n CREATE_CAMPAIGN = \"email.campaign.create\",\n SCHEDULE_CAMPAIGN = \"email.campaign.schedule\",\n GET_CAMPAIGN = \"email.campaign.get\",\n \n // List Management (Marketing)\n LIST_CREATE = \"email.list.create\",\n LIST_ADD_CONTACT = \"email.list.addContact\",\n LIST_REMOVE_CONTACT = \"email.list.removeContact\",\n LIST_GET = \"email.list.get\",\n \n // Template Operations\n TEMPLATE_CREATE = \"email.template.create\",\n TEMPLATE_GET = \"email.template.get\",\n TEMPLATE_LIST = \"email.template.list\",\n TEMPLATE_DELETE = \"email.template.delete\",\n \n // Status & Analytics\n GET_MESSAGE_STATUS = \"email.message.getStatus\",\n GET_ANALYTICS = \"email.analytics.get\",\n \n // Suppression/Bounces\n GET_SUPPRESSIONS = \"email.suppressions.get\",\n ADD_SUPPRESSION = \"email.suppressions.add\",\n DELETE_SUPPRESSION = \"email.suppressions.delete\",\n \n // Domain Verification\n DOMAIN_VERIFY = \"email.domain.verify\",\n DOMAIN_GET_STATUS = \"email.domain.getStatus\",\n}\n\n/**\n * Email provider capabilities - what features the provider supports.\n * Used to determine which operations are available.\n */\nexport enum EmailProvider_Capability {\n // Delivery Methods\n SUPPORTS_REST_API = \"supports_rest_api\",\n SUPPORTS_SMTP = \"supports_smtp\",\n \n // Email Types\n SUPPORTS_TRANSACTIONAL = \"supports_transactional\",\n SUPPORTS_MARKETING = \"supports_marketing\",\n \n // Core Features\n SUPPORTS_TEMPLATES = \"supports_templates\",\n SUPPORTS_BATCH_SENDING = \"supports_batch_sending\",\n SUPPORTS_SCHEDULING = \"supports_scheduling\",\n SUPPORTS_ATTACHMENTS = \"supports_attachments\",\n SUPPORTS_INLINE_IMAGES = \"supports_inline_images\",\n \n // Tracking\n SUPPORTS_OPEN_TRACKING = \"supports_open_tracking\",\n SUPPORTS_CLICK_TRACKING = \"supports_click_tracking\",\n SUPPORTS_WEBHOOKS = \"supports_webhooks\",\n \n // Marketing Specific\n SUPPORTS_CAMPAIGNS = \"supports_campaigns\",\n SUPPORTS_LIST_MANAGEMENT = \"supports_list_management\",\n SUPPORTS_SEGMENTATION = \"supports_segmentation\",\n SUPPORTS_AB_TESTING = \"supports_ab_testing\",\n \n // Compliance & Deliverability\n SUPPORTS_SUPPRESSION_LISTS = \"supports_suppression_lists\",\n SUPPORTS_DEDICATED_IP = \"supports_dedicated_ip\",\n SUPPORTS_CUSTOM_DOMAIN = \"supports_custom_domain\",\n SUPPORTS_EMAIL_VALIDATION = \"supports_email_validation\",\n}\n\n// ===============================================================\n// SMTP Server Profile (Provider-level, fixed)\n// ===============================================================\n\nexport const EmailProvider_SMTP_ServerProfileSchema = z.object({\n host: z.string().min(1),\n port: z.number().int().min(1).max(65535),\n security: z.enum(EmailProvider_SMTP_Security),\n // Note: username/password are consumer-level (in Configuration)\n});\nexport type EmailProvider_SMTP_ServerProfile = z.infer<typeof EmailProvider_SMTP_ServerProfileSchema>;\n\n// ===============================================================\n// Email Address Schema\n// ===============================================================\n\nexport const EmailProvider_AddressSchema = z.object({\n email: z.email(),\n name: z.string().optional(),\n});\nexport type EmailProvider_Address = z.infer<typeof EmailProvider_AddressSchema>;\n\n// ===============================================================\n// Email Attachment Schema\n// ===============================================================\n\nexport const EmailProvider_AttachmentSchema = z.object({\n filename: z.string().min(1),\n content: z.string(), // Base64 encoded content\n contentType: z.string().optional(),\n contentId: z.string().optional(), // For inline images (cid:)\n});\nexport type EmailProvider_Attachment = z.infer<typeof EmailProvider_AttachmentSchema>;\n\n// ===============================================================\n// Send Email Input Schema\n// ===============================================================\n\nexport const EmailProvider_SendEmailInputSchema = z.object({\n // Recipients\n to: z.array(EmailProvider_AddressSchema).min(1),\n cc: z.array(EmailProvider_AddressSchema).optional(),\n bcc: z.array(EmailProvider_AddressSchema).optional(),\n \n // Sender (can override configuration default)\n from: EmailProvider_AddressSchema.optional(),\n replyTo: EmailProvider_AddressSchema.optional(),\n \n // Content\n subject: z.string().min(1),\n text: z.string().optional(),\n html: z.string().optional(),\n \n // Attachments\n attachments: z.array(EmailProvider_AttachmentSchema).optional(),\n \n // Headers\n headers: z.record(z.string(), z.string()).optional(),\n \n // Tags for categorization/analytics\n tags: z.array(z.string()).optional(),\n \n // Scheduling\n scheduledAt: z.iso.datetime().optional(),\n \n // Tracking overrides\n trackOpens: z.boolean().optional(),\n trackClicks: z.boolean().optional(),\n});\nexport type EmailProvider_SendEmailInput = z.infer<typeof EmailProvider_SendEmailInputSchema>;\n\n// ===============================================================\n// Send Email Output Schema\n// ===============================================================\n\nexport const EmailProvider_SendEmailOutputSchema = z.object({\n // Provider's message ID\n id: z.string(),\n \n // Status (if available immediately)\n status: z.enum(EmailProvider_DeliveryStatus).optional(),\n \n // Provider-specific data\n providerMessageId: z.string().optional(),\n});\nexport type EmailProvider_SendEmailOutput = z.infer<typeof EmailProvider_SendEmailOutputSchema>;\n\n// ===============================================================\n// Send Template Email Input Schema\n// ===============================================================\n\nexport const EmailProvider_SendTemplateInputSchema = z.object({\n // Recipients\n to: z.array(EmailProvider_AddressSchema).min(1),\n cc: z.array(EmailProvider_AddressSchema).optional(),\n bcc: z.array(EmailProvider_AddressSchema).optional(),\n \n // Sender\n from: EmailProvider_AddressSchema.optional(),\n replyTo: EmailProvider_AddressSchema.optional(),\n \n // Template\n templateId: z.string().min(1),\n templateAlias: z.string().optional(), // Some providers use alias instead of ID\n \n // Template variables\n variables: z.record(z.string(), z.unknown()).optional(),\n \n // Subject override (if template allows)\n subject: z.string().optional(),\n \n // Tags\n tags: z.array(z.string()).optional(),\n \n // Scheduling\n scheduledAt: z.iso.datetime().optional(),\n});\nexport type EmailProvider_SendTemplateInput = z.infer<typeof EmailProvider_SendTemplateInputSchema>;\n\n// ===============================================================\n// Batch Send Input Schema\n// ===============================================================\n\nconst emailProviderBatchItemSchema = z.object({\n to: EmailProvider_AddressSchema,\n variables: z.record(z.string(), z.unknown()).optional(),\n subject: z.string().optional(), // Override per recipient\n});\n\nexport const EmailProvider_SendBatchInputSchema = z.object({\n // Sender\n from: EmailProvider_AddressSchema.optional(),\n replyTo: EmailProvider_AddressSchema.optional(),\n \n // Content (direct or template)\n subject: z.string().optional(), // Default subject\n text: z.string().optional(),\n html: z.string().optional(),\n templateId: z.string().optional(),\n \n // Recipients with personalizations\n recipients: z.array(emailProviderBatchItemSchema).min(1),\n \n // Tags\n tags: z.array(z.string()).optional(),\n});\nexport type EmailProvider_SendBatchInput = z.infer<typeof EmailProvider_SendBatchInputSchema>;\n\n// ===============================================================\n// Batch Send Output Schema\n// ===============================================================\n\nexport const EmailProvider_SendBatchOutputSchema = z.object({\n // Summary\n totalRequested: z.number().int(),\n totalAccepted: z.number().int(),\n totalRejected: z.number().int(),\n \n // Results per recipient\n results: z.array(z.object({\n email: z.string(),\n id: z.string().optional(),\n status: z.enum([\"accepted\", \"rejected\"]),\n error: z.string().optional(),\n })),\n});\nexport type EmailProvider_SendBatchOutput = z.infer<typeof EmailProvider_SendBatchOutputSchema>;\n\n// ===============================================================\n// Campaign Input Schema (Marketing)\n// ===============================================================\n\nexport const EmailProvider_CreateCampaignInputSchema = z.object({\n // Campaign details\n name: z.string().min(1),\n subject: z.string().min(1),\n previewText: z.string().optional(),\n \n // Sender\n from: EmailProvider_AddressSchema,\n replyTo: EmailProvider_AddressSchema.optional(),\n \n // Content\n html: z.string().optional(),\n text: z.string().optional(),\n templateId: z.string().optional(),\n \n // Recipients\n listIds: z.array(z.string()).optional(),\n segmentIds: z.array(z.string()).optional(),\n \n // Scheduling\n scheduledAt: z.iso.datetime().optional(),\n \n // Tracking\n trackOpens: z.boolean().optional().default(true),\n trackClicks: z.boolean().optional().default(true),\n});\nexport type EmailProvider_CreateCampaignInput = z.infer<typeof EmailProvider_CreateCampaignInputSchema>;\n\n// ===============================================================\n// Campaign Output Schema\n// ===============================================================\n\nexport const EmailProvider_CampaignOutputSchema = z.object({\n id: z.string(),\n status: z.enum([\"draft\", \"scheduled\", \"sending\", \"sent\", \"cancelled\"]),\n scheduledAt: z.iso.datetime().optional(),\n sentAt: z.iso.datetime().optional(),\n});\nexport type EmailProvider_CampaignOutput = z.infer<typeof EmailProvider_CampaignOutputSchema>;\n\n// ===============================================================\n// Message Status Schema\n// ===============================================================\n\nexport const EmailProvider_MessageStatusSchema = z.object({\n id: z.string(),\n status: z.enum(EmailProvider_DeliveryStatus),\n to: z.email(),\n subject: z.string().optional(),\n sentAt: z.iso.datetime().optional(),\n deliveredAt: z.iso.datetime().optional(),\n openedAt: z.iso.datetime().optional(),\n clickedAt: z.iso.datetime().optional(),\n bouncedAt: z.iso.datetime().optional(),\n bounceType: z.enum(EmailProvider_BounceType).optional(),\n bounceReason: z.string().optional(),\n});\nexport type EmailProvider_MessageStatus = z.infer<typeof EmailProvider_MessageStatusSchema>;\n\n// ===============================================================\n// Email Operation Context (for tracking)\n// ===============================================================\n\nexport const EmailProvider_OperationContextSchema = ExternalProvider_OperationContextSchema.extend({\n // Message identification\n messageId: z.string().optional(),\n \n // Delivery info\n deliveryMethod: z.enum(EmailProvider_DeliveryMethod).optional(),\n deliveryStatus: z.enum(EmailProvider_DeliveryStatus).optional(),\n \n // Email type\n emailType: z.enum(EmailProvider_EmailType).optional(),\n \n // Counts\n recipientCount: z.number().int().optional(),\n \n // Rate limit headers from provider\n rateLimitRemaining: z.number().optional(),\n rateLimitResetAt: z.iso.datetime().optional(),\n});\nexport type EmailProvider_OperationContext = z.infer<typeof EmailProvider_OperationContextSchema>;\n\n// ===============================================================\n// Webhook Event Schema\n// ===============================================================\n\nexport const EmailProvider_WebhookEventSchema = z.object({\n eventType: z.enum(EmailProvider_DeliveryStatus),\n messageId: z.string(),\n email: z.email(),\n timestamp: z.iso.datetime(),\n \n // Event-specific data\n bounceType: z.enum(EmailProvider_BounceType).optional(),\n bounceReason: z.string().optional(),\n link: z.url().optional(), // For click events\n userAgent: z.string().optional(),\n \n // Original tags\n tags: z.array(z.string()).optional(),\n});\nexport type EmailProvider_WebhookEvent = z.infer<typeof EmailProvider_WebhookEventSchema>;\n\n// ===============================================================\n// Email Operation Definition\n// ===============================================================\n\nexport type EmailProvider_OperationDefinition = ExternalProvider_OperationDefinition_Base & {\n operationContextSchema: typeof EmailProvider_OperationContextSchema;\n \n // Which email types this operation supports\n supportedEmailTypes: EmailProvider_EmailType[];\n \n // Which delivery methods work for this operation\n supportedDeliveryMethods: EmailProvider_DeliveryMethod[];\n \n // Required capabilities\n requiredCapabilities?: EmailProvider_Capability[];\n};\n\n"]}
|
|
1
|
+
{"version":3,"file":"email.external-connectors-models.schemas.js","sourceRoot":"","sources":["../../../../src/protocols/email.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,uCAAuC,EAA6C,MAAM,uDAAuD,CAAC;AAE3J,iEAAiE;AACjE,iBAAiB;AACjB,WAAW;AACX,qEAAqE;AACrE,wEAAwE;AACxE,sDAAsD;AACtD,EAAE;AACF,wBAAwB;AACxB,wEAAwE;AACxE,0EAA0E;AAC1E,gEAAgE;AAChE,0EAA0E;AAC1E,iEAAiE;AAEjE,kEAAkE;AAClE,uBAAuB;AACvB,kEAAkE;AAElE;;;GAGG;AACH,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,0DAA+B,CAAA;IAC/B,kDAAuB,CAAA;AACzB,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,4BAGX;AAHD,WAAY,4BAA4B;IACtC,qDAAqB,CAAA;IACrB,6CAAa,CAAA;AACf,CAAC,EAHW,4BAA4B,KAA5B,4BAA4B,QAGvC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,2BAIX;AAJD,WAAY,2BAA2B;IACrC,4CAAa,CAAA;IACb,oDAAqB,CAAA;IACrB,0CAAW,CAAA;AACb,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AAE,CAAC,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC,QAAQ,EAAE;IAE/D,aAAa;IACb,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,QAAQ,EAAE;IAErD,SAAS;IACT,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAE3C,mCAAmC;IACnC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzC,gBAAgB,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC;AAGH,kEAAkE;AAClE,uBAAuB;AACvB,kEAAkE;AAElE,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,MAAM,CAAC;IACvD,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,4BAA4B,CAAC;IAC/C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;IAE3B,sBAAsB;IACtB,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,QAAQ,EAAE;IACvD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,mBAAmB;IAC7C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAEhC,gBAAgB;IAChB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,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 { ExternalProvider_OperationContextSchema, ExternalProvider_OperationDefinition_Base } from \"../core/operations.external-connectors-models.schemas\";\n\n//===============================================================\n// Email Provider\n// --------\n// Integration with email service providers for sending transactional\n// and marketing emails. Supports both REST API and SMTP-based providers\n// with differentiated operations for each email type.\n//\n// CONFIGURATION LEVELS:\n// - Profile (Provider-level): Fixed by the provider, cannot be changed.\n// Examples: API endpoints, SMTP server addresses, capabilities, limits.\n// - Configuration (Consumer-level): User-configurable settings.\n// Examples: API keys, sender addresses, tracking preferences, webhooks.\n//===============================================================\n\n// ===============================================================\n// Email Provider Enums\n// ===============================================================\n\n/**\n * The type of email operation - transactional vs marketing have different\n * requirements, compliance rules, and often use separate sending domains/IPs.\n */\nexport enum EmailProvider_EmailType {\n TRANSACTIONAL = \"transactional\", // Password resets, receipts, notifications\n MARKETING = \"marketing\", // Newsletters, promotions, campaigns\n}\n\n/**\n * The delivery method used by the email provider.\n * REST API provides more features, SMTP is simpler but more limited.\n */\nexport enum EmailProvider_DeliveryMethod {\n REST_API = \"rest_api\",\n SMTP = \"smtp\",\n}\n\n/**\n * SMTP encryption/security modes.\n */\nexport enum EmailProvider_SMTP_Security {\n NONE = \"none\", // Plain text (port 25, not recommended)\n STARTTLS = \"starttls\", // Upgrade to TLS (port 587)\n TLS = \"tls\", // Implicit TLS/SSL (port 465)\n}\n\n/**\n * Email delivery status for tracking.\n */\nexport enum EmailProvider_DeliveryStatus {\n QUEUED = \"queued\",\n SENT = \"sent\",\n DELIVERED = \"delivered\",\n OPENED = \"opened\",\n CLICKED = \"clicked\",\n BOUNCED = \"bounced\",\n SOFT_BOUNCED = \"soft_bounced\",\n SPAM_COMPLAINT = \"spam_complaint\",\n UNSUBSCRIBED = \"unsubscribed\",\n DROPPED = \"dropped\",\n DEFERRED = \"deferred\",\n FAILED = \"failed\",\n}\n\n/**\n * Email bounce types.\n */\nexport enum EmailProvider_BounceType {\n HARD = \"hard\", // Permanent failure (address doesn't exist)\n SOFT = \"soft\", // Temporary failure (mailbox full, server down)\n TRANSIENT = \"transient\",\n}\n\n/**\n * Standard email provider operation keys.\n * Each provider implements a subset of these based on capabilities.\n */\nexport enum EmailProvider_OperationKey {\n // Core Transactional Operations\n SEND_EMAIL = \"email.send\",\n SEND_BATCH = \"email.sendBatch\",\n SEND_TEMPLATE = \"email.sendTemplate\",\n \n // Marketing/Campaign Operations\n SEND_CAMPAIGN = \"email.campaign.send\",\n CREATE_CAMPAIGN = \"email.campaign.create\",\n SCHEDULE_CAMPAIGN = \"email.campaign.schedule\",\n GET_CAMPAIGN = \"email.campaign.get\",\n \n // List Management (Marketing)\n LIST_CREATE = \"email.list.create\",\n LIST_ADD_CONTACT = \"email.list.addContact\",\n LIST_REMOVE_CONTACT = \"email.list.removeContact\",\n LIST_GET = \"email.list.get\",\n \n // Template Operations\n TEMPLATE_CREATE = \"email.template.create\",\n TEMPLATE_GET = \"email.template.get\",\n TEMPLATE_LIST = \"email.template.list\",\n TEMPLATE_DELETE = \"email.template.delete\",\n \n // Status & Analytics\n GET_MESSAGE_STATUS = \"email.message.getStatus\",\n GET_ANALYTICS = \"email.analytics.get\",\n \n // Suppression/Bounces\n GET_SUPPRESSIONS = \"email.suppressions.get\",\n ADD_SUPPRESSION = \"email.suppressions.add\",\n DELETE_SUPPRESSION = \"email.suppressions.delete\",\n \n // Domain Verification\n DOMAIN_VERIFY = \"email.domain.verify\",\n DOMAIN_GET_STATUS = \"email.domain.getStatus\",\n}\n\n/**\n * Email provider capabilities - what features the provider supports.\n * Used to determine which operations are available.\n */\nexport enum EmailProvider_Capability {\n // Delivery Methods\n SUPPORTS_REST_API = \"supports_rest_api\",\n SUPPORTS_SMTP = \"supports_smtp\",\n \n // Email Types\n SUPPORTS_TRANSACTIONAL = \"supports_transactional\",\n SUPPORTS_MARKETING = \"supports_marketing\",\n \n // Core Features\n SUPPORTS_TEMPLATES = \"supports_templates\",\n SUPPORTS_BATCH_SENDING = \"supports_batch_sending\",\n SUPPORTS_SCHEDULING = \"supports_scheduling\",\n SUPPORTS_ATTACHMENTS = \"supports_attachments\",\n SUPPORTS_INLINE_IMAGES = \"supports_inline_images\",\n \n // Tracking\n SUPPORTS_OPEN_TRACKING = \"supports_open_tracking\",\n SUPPORTS_CLICK_TRACKING = \"supports_click_tracking\",\n SUPPORTS_WEBHOOKS = \"supports_webhooks\",\n \n // Marketing Specific\n SUPPORTS_CAMPAIGNS = \"supports_campaigns\",\n SUPPORTS_LIST_MANAGEMENT = \"supports_list_management\",\n SUPPORTS_SEGMENTATION = \"supports_segmentation\",\n SUPPORTS_AB_TESTING = \"supports_ab_testing\",\n \n // Compliance & Deliverability\n SUPPORTS_SUPPRESSION_LISTS = \"supports_suppression_lists\",\n SUPPORTS_DEDICATED_IP = \"supports_dedicated_ip\",\n SUPPORTS_CUSTOM_DOMAIN = \"supports_custom_domain\",\n SUPPORTS_EMAIL_VALIDATION = \"supports_email_validation\",\n}\n\n// ===============================================================\n// SMTP Server Profile (Provider-level, fixed)\n// ===============================================================\n\nexport const EmailProvider_SMTP_ServerProfileSchema = z.object({\n host: z.string().min(1),\n port: z.number().int().min(1).max(65535),\n security: z.enum(EmailProvider_SMTP_Security),\n // Note: username/password are consumer-level (in Configuration)\n});\nexport type EmailProvider_SMTP_ServerProfile = z.infer<typeof EmailProvider_SMTP_ServerProfileSchema>;\n\n// ===============================================================\n// Email Address Schema\n// ===============================================================\n\nexport const EmailProvider_AddressSchema = z.object({\n email: z.email(),\n name: z.string().optional(),\n});\nexport type EmailProvider_Address = z.infer<typeof EmailProvider_AddressSchema>;\n\n// ===============================================================\n// Email Attachment Schema\n// ===============================================================\n\nexport const EmailProvider_AttachmentSchema = z.object({\n filename: z.string().min(1),\n content: z.string(), // Base64 encoded content\n contentType: z.string().optional(),\n contentId: z.string().optional(), // For inline images (cid:)\n});\nexport type EmailProvider_Attachment = z.infer<typeof EmailProvider_AttachmentSchema>;\n\n// ===============================================================\n// Send Email Input Schema\n// ===============================================================\n\nexport const EmailProvider_SendEmailInputSchema = z.object({\n // Recipients\n to: z.array(EmailProvider_AddressSchema).min(1),\n cc: z.array(EmailProvider_AddressSchema).optional(),\n bcc: z.array(EmailProvider_AddressSchema).optional(),\n \n // Sender (can override configuration default)\n from: EmailProvider_AddressSchema.optional(),\n replyTo: EmailProvider_AddressSchema.optional(),\n \n // Content\n subject: z.string().min(1),\n text: z.string().optional(),\n html: z.string().optional(),\n \n // Attachments\n attachments: z.array(EmailProvider_AttachmentSchema).optional(),\n \n // Headers\n headers: z.record(z.string(), z.string()).optional(),\n \n // Tags for categorization/analytics\n tags: z.array(z.string()).optional(),\n \n // Scheduling\n scheduledAt: z.iso.datetime().optional(),\n \n // Tracking overrides\n trackOpens: z.boolean().optional(),\n trackClicks: z.boolean().optional(),\n});\nexport type EmailProvider_SendEmailInput = z.infer<typeof EmailProvider_SendEmailInputSchema>;\n\n// ===============================================================\n// Send Email Output Schema\n// ===============================================================\n\nexport const EmailProvider_SendEmailOutputSchema = z.object({\n // Provider's message ID\n id: z.string(),\n \n // Status (if available immediately)\n status: z.enum(EmailProvider_DeliveryStatus).optional(),\n \n // Provider-specific data\n providerMessageId: z.string().optional(),\n});\nexport type EmailProvider_SendEmailOutput = z.infer<typeof EmailProvider_SendEmailOutputSchema>;\n\n// ===============================================================\n// Send Template Email Input Schema\n// ===============================================================\n\nexport const EmailProvider_SendTemplateInputSchema = z.object({\n // Recipients\n to: z.array(EmailProvider_AddressSchema).min(1),\n cc: z.array(EmailProvider_AddressSchema).optional(),\n bcc: z.array(EmailProvider_AddressSchema).optional(),\n \n // Sender\n from: EmailProvider_AddressSchema.optional(),\n replyTo: EmailProvider_AddressSchema.optional(),\n \n // Template\n templateId: z.string().min(1),\n templateAlias: z.string().optional(), // Some providers use alias instead of ID\n \n // Template variables\n variables: z.record(z.string(), z.unknown()).optional(),\n \n // Subject override (if template allows)\n subject: z.string().optional(),\n \n // Tags\n tags: z.array(z.string()).optional(),\n \n // Scheduling\n scheduledAt: z.iso.datetime().optional(),\n});\nexport type EmailProvider_SendTemplateInput = z.infer<typeof EmailProvider_SendTemplateInputSchema>;\n\n// ===============================================================\n// Batch Send Input Schema\n// ===============================================================\n\nconst emailProviderBatchItemSchema = z.object({\n to: EmailProvider_AddressSchema,\n variables: z.record(z.string(), z.unknown()).optional(),\n subject: z.string().optional(), // Override per recipient\n});\n\nexport const EmailProvider_SendBatchInputSchema = z.object({\n // Sender\n from: EmailProvider_AddressSchema.optional(),\n replyTo: EmailProvider_AddressSchema.optional(),\n \n // Content (direct or template)\n subject: z.string().optional(), // Default subject\n text: z.string().optional(),\n html: z.string().optional(),\n templateId: z.string().optional(),\n \n // Recipients with personalizations\n recipients: z.array(emailProviderBatchItemSchema).min(1),\n \n // Tags\n tags: z.array(z.string()).optional(),\n});\nexport type EmailProvider_SendBatchInput = z.infer<typeof EmailProvider_SendBatchInputSchema>;\n\n// ===============================================================\n// Batch Send Output Schema\n// ===============================================================\n\nexport const EmailProvider_SendBatchOutputSchema = z.object({\n // Summary\n totalRequested: z.number().int(),\n totalAccepted: z.number().int(),\n totalRejected: z.number().int(),\n \n // Results per recipient\n results: z.array(z.object({\n email: z.string(),\n id: z.string().optional(),\n status: z.enum([\"accepted\", \"rejected\"]),\n error: z.string().optional(),\n })),\n});\nexport type EmailProvider_SendBatchOutput = z.infer<typeof EmailProvider_SendBatchOutputSchema>;\n\n// ===============================================================\n// Campaign Input Schema (Marketing)\n// ===============================================================\n\nexport const EmailProvider_CreateCampaignInputSchema = z.object({\n // Campaign details\n name: z.string().min(1),\n subject: z.string().min(1),\n previewText: z.string().optional(),\n \n // Sender\n from: EmailProvider_AddressSchema,\n replyTo: EmailProvider_AddressSchema.optional(),\n \n // Content\n html: z.string().optional(),\n text: z.string().optional(),\n templateId: z.string().optional(),\n \n // Recipients\n listIds: z.array(z.string()).optional(),\n segmentIds: z.array(z.string()).optional(),\n \n // Scheduling\n scheduledAt: z.iso.datetime().optional(),\n \n // Tracking\n trackOpens: z.boolean().optional().default(true),\n trackClicks: z.boolean().optional().default(true),\n});\nexport type EmailProvider_CreateCampaignInput = z.infer<typeof EmailProvider_CreateCampaignInputSchema>;\n\n// ===============================================================\n// Campaign Output Schema\n// ===============================================================\n\nexport const EmailProvider_CampaignOutputSchema = z.object({\n id: z.string(),\n status: z.enum([\"draft\", \"scheduled\", \"sending\", \"sent\", \"cancelled\"]),\n scheduledAt: z.iso.datetime().optional(),\n sentAt: z.iso.datetime().optional(),\n});\nexport type EmailProvider_CampaignOutput = z.infer<typeof EmailProvider_CampaignOutputSchema>;\n\n// ===============================================================\n// Message Status Schema\n// ===============================================================\n\nexport const EmailProvider_MessageStatusSchema = z.object({\n id: z.string(),\n status: z.enum(EmailProvider_DeliveryStatus),\n to: z.email(),\n subject: z.string().optional(),\n sentAt: z.iso.datetime().optional(),\n deliveredAt: z.iso.datetime().optional(),\n openedAt: z.iso.datetime().optional(),\n clickedAt: z.iso.datetime().optional(),\n bouncedAt: z.iso.datetime().optional(),\n bounceType: z.enum(EmailProvider_BounceType).optional(),\n bounceReason: z.string().optional(),\n});\nexport type EmailProvider_MessageStatus = z.infer<typeof EmailProvider_MessageStatusSchema>;\n\n// ===============================================================\n// Email Operation Context (for tracking)\n// ===============================================================\n\nexport const EmailProvider_OperationContextSchema = ExternalProvider_OperationContextSchema.extend({\n // Message identification\n messageId: z.string().optional(),\n \n // Delivery info\n deliveryMethod: z.enum(EmailProvider_DeliveryMethod).optional(),\n deliveryStatus: z.enum(EmailProvider_DeliveryStatus).optional(),\n \n // Email type\n emailType: z.enum(EmailProvider_EmailType).optional(),\n \n // Counts\n recipientCount: z.number().int().optional(),\n \n // Rate limit headers from provider\n rateLimitRemaining: z.number().optional(),\n rateLimitResetAt: z.iso.datetime().optional(),\n});\nexport type EmailProvider_OperationContext = z.infer<typeof EmailProvider_OperationContextSchema>;\n\n// ===============================================================\n// Webhook Event Schema\n// ===============================================================\n\nexport const EmailProvider_WebhookEventSchema = z.object({\n eventType: z.enum(EmailProvider_DeliveryStatus),\n messageId: z.string(),\n email: z.email(),\n timestamp: z.iso.datetime(),\n \n // Event-specific data\n bounceType: z.enum(EmailProvider_BounceType).optional(),\n bounceReason: z.string().optional(),\n link: z.url().optional(), // For click events\n userAgent: z.string().optional(),\n \n // Original tags\n tags: z.array(z.string()).optional(),\n});\nexport type EmailProvider_WebhookEvent = z.infer<typeof EmailProvider_WebhookEventSchema>;\n\n// ===============================================================\n// Email Operation Definition\n// ===============================================================\n\nexport type EmailProvider_OperationDefinition = ExternalProvider_OperationDefinition_Base & {\n operationContextSchema: typeof EmailProvider_OperationContextSchema;\n \n // Which email types this operation supports\n supportedEmailTypes: EmailProvider_EmailType[];\n \n // Which delivery methods work for this operation\n supportedDeliveryMethods: EmailProvider_DeliveryMethod[];\n \n // Required capabilities\n requiredCapabilities?: EmailProvider_Capability[];\n};\n\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.standard-interface.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"email.standard-interface.schemas.d.ts","sourceRoot":"","sources":["../../../../src/protocols/email.standard-interface.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAA2B,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAmB7I,eAAO,MAAM,2BAA2B;;;iBAGtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAMhF,eAAO,MAAM,8BAA8B;;;;;iBAKzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF;;;;;;GAMG;AACH,oBAAY,4BAA4B;IACtC,IAAI,SAAS;IACb,mBAAmB,wBAAwB;CAC5C;AAED,8EAA8E;AAC9E,oBAAY,6BAA6B;IACvC,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,S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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.standard-interface.schemas.js","sourceRoot":"","sources":["../../../src/protocols/email.standard-interface.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAA2B,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAE7I,iEAAiE;AACjE,2BAA2B;AAC3B,WAAW;AACX,qEAAqE;AACrE,gEAAgE;AAChE,+BAA+B;AAC/B,EAAE;AACF,qBAAqB;AACrB,uDAAuD;AACvD,gEAAgE;AAChE,yEAAyE;AACzE,iEAAiE;AAEjE,kEAAkE;AAClE,yBAAyB;AACzB,kEAAkE;AAElE,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC;AAIH,kEAAkE;AAClE,sBAAsB;AACtB,kEAAkE;AAElE,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,iBAAiB;IACtC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,2BAA2B;CAC9D,CAAC,CAAC;AAIH;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,4BAGX;AAHD,WAAY,4BAA4B;IACtC,6CAAa,CAAA;IACb,2EAA2C,CAAA;AAC7C,CAAC,EAHW,4BAA4B,KAA5B,4BAA4B,QAGvC;AAED,8EAA8E;AAC9E,MAAM,CAAN,IAAY,6BAIX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CAAC;IACF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAE/B,8DAA8D;IAC9D,kBAAkB,EAAE,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,QAAQ,EAAE;IAC/D,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACnD,CAAC,CAAC;AAIH,kEAAkE;AAClE,0BAA0B;AAC1B,kEAAkE;AAElE;;;GAGG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG;IACjD,SAAS,EAAE,EAAgC,EAAE,mCAAmC;IAChF,YAAY,EAAE,CAAC,wBAAwB,CAAC,kBAAkB,CAAC;IAC3D,SAAS,EAAE,CAAC,wBAAwB,CAAC,sBAAsB,CAAC;IAC5D,aAAa,EAAE,CAAC,wBAAwB,CAAC,mBAAmB,CAAC;IAC7D,YAAY,EAAE,CAAC,wBAAwB,CAAC,kBAAkB,EAAE,wBAAwB,CAAC,kBAAkB,CAAC;IACxG,UAAU,EAAE,CAAC,wBAAwB,CAAC,wBAAwB,CAAC;CACvD,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { EmailProvider_Capability, EmailProvider_EmailType, EmailProvider_DeliveryStatus } from \"./email.external-connectors-models.schemas\";\n\n//===============================================================\n// Standard Email Interface\n// --------\n// This is the canonical interface that Wildo uses internally to send\n// emails. The ETL layer transforms these standard requests into\n// provider-specific API calls.\n//\n// Design Principles:\n// 1. Provider-agnostic - works with any email provider\n// 2. Capability-aware - validates against provider capabilities\n// 3. Extensible - new fields can be added without breaking existing code\n//===============================================================\n\n// ===============================================================\n// Standard Email Address\n// ===============================================================\n\nexport const StandardEmail_AddressSchema = z.object({\n email: z.email(),\n name: z.string().optional(),\n});\n\nexport type StandardEmail_Address = z.infer<typeof StandardEmail_AddressSchema>;\n\n// ===============================================================\n// Standard Attachment\n// ===============================================================\n\nexport const StandardEmail_AttachmentSchema = z.object({\n filename: z.string().min(1),\n content: z.string(), // Base64 encoded\n contentType: z.string().optional(),\n contentId: z.string().optional(), // For inline images (cid:)\n});\n\nexport type StandardEmail_Attachment = z.infer<typeof StandardEmail_AttachmentSchema>;\n\n/**\n * Wire encoding used by a network email provider gateway.\n *\n * This vocabulary is deliberately closed and explicit on every provider\n * contract: JSON and multipart data require materially different headers and\n * serialization. There is no implicit default.\n */\nexport enum EmailProviderPayloadEncoding {\n JSON = \"json\",\n MULTIPART_FORM_DATA = \"multipart-form-data\",\n}\n\n/** Provider acknowledgement state returned by a synchronous send endpoint. */\nexport enum EmailProviderSubmissionStatus {\n QUEUED = \"queued\",\n SENT = \"sent\",\n SCHEDULED = \"scheduled\",\n}\n\n/** Provider-owned classification for HTTP responses whose status is ambiguous. */\nexport enum EmailProviderSubmissionClassification {\n ACCEPTED = \"accepted\",\n REJECTED = \"rejected\",\n ACCEPTANCE_UNKNOWN = \"acceptance_unknown\",\n}\n\n// ===============================================================\n// TRANSACTIONAL: Send Email Request\n// ===============================================================\n\nexport const StandardEmail_SendRequestSchema = z.object({\n /**\n * Stable identity of ONE logical provider submission across retries.\n *\n * Deliberately not named `idempotencyKey`: it remains the framework's\n * correlation identity even when the selected provider cannot enforce\n * idempotency. Provider gateways may map it to a native idempotency field as\n * an optional duplicate-risk reduction.\n */\n submissionId: z.string().min(1).max(256),\n\n // Recipients (required)\n to: z.array(StandardEmail_AddressSchema).min(1),\n cc: z.array(StandardEmail_AddressSchema).optional(),\n bcc: z.array(StandardEmail_AddressSchema).optional(),\n \n // Sender (required unless provider config has default)\n from: StandardEmail_AddressSchema.optional(),\n replyTo: StandardEmail_AddressSchema.optional(),\n \n // Content (html OR text required)\n subject: z.string().min(1),\n html: z.string().optional(),\n text: z.string().optional(),\n \n // Optional features\n attachments: z.array(StandardEmail_AttachmentSchema).optional(),\n headers: z.record(z.string(), z.string()).optional(),\n tags: z.array(z.string()).optional(),\n \n // Scheduling (optional - requires SUPPORTS_SCHEDULING)\n scheduledAt: z.iso.datetime().optional(),\n \n // Tracking (optional, uses provider default if not set)\n trackOpens: z.boolean().optional(),\n trackClicks: z.boolean().optional(),\n \n // Metadata for correlation/tracking\n metadata: z.record(z.string(), z.string()).optional(),\n}).refine(\n (data) => data.html !== undefined || data.text !== undefined,\n { message: \"Either html or text content is required\" }\n);\n\nexport type StandardEmail_SendRequest = z.infer<typeof StandardEmail_SendRequestSchema>;\n\n// ===============================================================\n// TRANSACTIONAL: Send Email Response\n// ===============================================================\n\nexport const StandardEmail_SendResponseSchema = z.object({\n success: z.boolean(),\n /**\n * Mandatory provider-owned submission meaning. HTTP status, receipt shape,\n * and recipient-level `success` are not interchangeable across providers.\n */\n classification: z.enum(EmailProviderSubmissionClassification),\n /**\n * Provider-assigned receipts. An array is required because Brevo and\n * Mailchimp may acknowledge several recipient messages in one response.\n * Empty is honest for a successful non-delivery preview or a provider that\n * accepted the request without returning a receipt.\n */\n providerMessageIds: z.array(z.string().min(1)),\n /** Per-recipient rejections returned inside an otherwise successful HTTP response. */\n rejectedRecipients: z.array(z.object({\n email: z.string().min(1),\n reason: z.string().optional(),\n })).optional(),\n /**\n * Provider-declared detail explaining its explicit classification, including\n * semantic rejection or an ambiguous idempotency/processing conflict.\n */\n providerError: z.string().min(1).optional(),\n /**\n * Whether the caller should retry this response under at-least-once\n * semantics. For an acceptance-unknown response, a retry may duplicate a\n * message unless the selected provider happens to enforce the submission id.\n */\n retryable: z.boolean().optional(),\n /** Provider reports that this submission identity was already suppressed. */\n deduplicated: z.boolean().optional(),\n status: z.enum(EmailProviderSubmissionStatus).optional(),\n scheduledAt: z.iso.datetime().optional(),\n}).superRefine((response, context) => {\n const accepted =\n response.classification\n === EmailProviderSubmissionClassification.ACCEPTED;\n\n /**\n * `success` describes whole-request success, whereas `classification`\n * describes whether any provider submission was accepted. Once a provider\n * adapter classifies a submission as accepted, auxiliary result metadata\n * must never turn that acknowledgement into permission to replay. A false\n * `success` may describe an honest partial result (for example Mailchimp)\n * or anomalous adapter metadata; `rejectedRecipients` is therefore useful\n * evidence, but not a prerequisite for preserving acceptance.\n */\n if (response.success && !accepted) {\n context.addIssue({\n code: 'custom',\n path: ['success'],\n message:\n 'A successful email response must be classified as accepted',\n });\n }\n if (response.success && (response.rejectedRecipients?.length ?? 0) > 0) {\n context.addIssue({\n code: 'custom',\n path: ['rejectedRecipients'],\n message:\n 'A successful email response cannot contain rejected recipients',\n });\n }\n if (!accepted && response.providerMessageIds.length > 0) {\n context.addIssue({\n code: 'custom',\n path: ['providerMessageIds'],\n message:\n 'A non-accepted email response cannot contain provider acceptance receipts',\n });\n }\n for (const [index, providerMessageId] of response.providerMessageIds.entries()) {\n if (response.providerMessageIds.indexOf(providerMessageId) !== index) {\n context.addIssue({\n code: 'custom',\n path: ['providerMessageIds', index],\n message: 'Provider message receipts must be unique',\n });\n }\n }\n\n for (const acceptedOnlyField of [\n 'deduplicated',\n 'status',\n 'scheduledAt',\n ] as const) {\n if (!accepted && response[acceptedOnlyField] !== undefined) {\n context.addIssue({\n code: 'custom',\n path: [acceptedOnlyField],\n message:\n `${acceptedOnlyField} is valid only for an accepted email response`,\n });\n }\n }\n if (\n response.scheduledAt !== undefined\n && response.status !== EmailProviderSubmissionStatus.SCHEDULED\n ) {\n context.addIssue({\n code: 'custom',\n path: ['scheduledAt'],\n message:\n 'A scheduledAt receipt requires provider status scheduled',\n });\n }\n if (accepted && response.retryable === true) {\n context.addIssue({\n code: 'custom',\n path: ['retryable'],\n message: 'An accepted email response cannot request replay',\n });\n }\n});\n\nexport type StandardEmail_SendResponse = z.infer<typeof StandardEmail_SendResponseSchema>;\n\n// ===============================================================\n// TRANSACTIONAL: Send Template Request\n// ===============================================================\n\nexport const StandardEmail_SendTemplateRequestSchema = z.object({\n // Recipients\n to: z.array(StandardEmail_AddressSchema).min(1),\n cc: z.array(StandardEmail_AddressSchema).optional(),\n bcc: z.array(StandardEmail_AddressSchema).optional(),\n \n // Sender\n from: StandardEmail_AddressSchema.optional(),\n replyTo: StandardEmail_AddressSchema.optional(),\n \n // Template (requires SUPPORTS_TEMPLATES)\n templateId: z.string().min(1),\n templateAlias: z.string().optional(), // Alternative identifier (Postmark)\n variables: z.record(z.string(), z.unknown()).optional(),\n \n // Optional overrides\n subject: z.string().optional(), // Override template subject\n \n // Optional features\n attachments: z.array(StandardEmail_AttachmentSchema).optional(),\n tags: z.array(z.string()).optional(),\n scheduledAt: z.iso.datetime().optional(),\n \n // Metadata\n metadata: z.record(z.string(), z.string()).optional(),\n});\n\nexport type StandardEmail_SendTemplateRequest = z.infer<typeof StandardEmail_SendTemplateRequestSchema>;\n\n// ===============================================================\n// TRANSACTIONAL: Batch Send Request\n// ===============================================================\n\nexport const StandardEmail_BatchRecipientSchema = z.object({\n to: StandardEmail_AddressSchema,\n cc: z.array(StandardEmail_AddressSchema).optional(),\n bcc: z.array(StandardEmail_AddressSchema).optional(),\n variables: z.record(z.string(), z.unknown()).optional(),\n subject: z.string().optional(), // Per-recipient subject override\n metadata: z.record(z.string(), z.string()).optional(),\n});\n\nexport type StandardEmail_BatchRecipient = z.infer<typeof StandardEmail_BatchRecipientSchema>;\n\nexport const StandardEmail_BatchRequestSchema = z.object({\n // Sender (shared)\n from: StandardEmail_AddressSchema.optional(),\n replyTo: StandardEmail_AddressSchema.optional(),\n \n // Content (shared - either direct or template)\n subject: z.string().optional(), // Default subject\n html: z.string().optional(),\n text: z.string().optional(),\n templateId: z.string().optional(),\n \n // Recipients with personalizations (requires SUPPORTS_BATCH_SENDING)\n recipients: z.array(StandardEmail_BatchRecipientSchema).min(1),\n \n // Optional features\n attachments: z.array(StandardEmail_AttachmentSchema).optional(),\n tags: z.array(z.string()).optional(),\n scheduledAt: z.iso.datetime().optional(),\n});\n\nexport type StandardEmail_BatchRequest = z.infer<typeof StandardEmail_BatchRequestSchema>;\n\n// ===============================================================\n// TRANSACTIONAL: Batch Send Response\n// ===============================================================\n\nexport const StandardEmail_BatchResponseSchema = z.object({\n success: z.boolean(),\n totalRequested: z.number().int(),\n totalAccepted: z.number().int(),\n totalRejected: z.number().int(),\n results: z.array(z.object({\n // Email address OR summary identifier (e.g. \"batch\" when provider returns aggregate result)\n email: z.string().min(1),\n success: z.boolean(),\n messageId: z.string().optional(),\n error: z.string().optional(),\n })),\n});\n\nexport type StandardEmail_BatchResponse = z.infer<typeof StandardEmail_BatchResponseSchema>;\n\n// ===============================================================\n// MARKETING: Contact\n// ===============================================================\n\nexport const StandardMarketing_ContactSchema = z.object({\n email: z.email(),\n firstName: z.string().optional(),\n lastName: z.string().optional(),\n phone: z.string().optional(),\n attributes: z.record(z.string(), z.unknown()).optional(),\n});\n\nexport type StandardMarketing_Contact = z.infer<typeof StandardMarketing_ContactSchema>;\n\n// ===============================================================\n// MARKETING: List\n// ===============================================================\n\nexport const StandardMarketing_ListSchema = z.object({\n id: z.string().optional(), // Provider assigns on create\n name: z.string().min(1),\n description: z.string().optional(),\n});\n\nexport type StandardMarketing_List = z.infer<typeof StandardMarketing_ListSchema>;\n\n// ===============================================================\n// MARKETING: Audience (List + Contacts)\n// ===============================================================\n\nexport const StandardMarketing_AudienceSchema = z.object({\n // List reference (use existing by ID, or create/find by name)\n list: z.object({\n id: z.string().optional(),\n name: z.string().optional(),\n description: z.string().optional(),\n }).refine(\n (data) => data.id !== undefined || data.name !== undefined,\n { message: \"Either list.id or list.name is required\" }\n ),\n \n // Contacts to add/sync (optional if using existing list)\n contacts: z.array(StandardMarketing_ContactSchema).optional(),\n});\n\nexport type StandardMarketing_Audience = z.infer<typeof StandardMarketing_AudienceSchema>;\n\n// ===============================================================\n// MARKETING: Campaign Content\n// ===============================================================\n\nexport const StandardMarketing_ContentSchema = z.object({\n // Use template OR inline content\n templateId: z.string().optional(),\n templateVariables: z.record(z.string(), z.unknown()).optional(),\n \n // Inline content (if no template)\n subject: z.string().optional(),\n html: z.string().optional(),\n text: z.string().optional(),\n previewText: z.string().optional(),\n \n // Attachments\n attachments: z.array(StandardEmail_AttachmentSchema).optional(),\n}).refine(\n (data) => data.templateId !== undefined || data.subject !== undefined,\n { message: \"Either templateId or subject is required\" }\n);\n\nexport type StandardMarketing_Content = z.infer<typeof StandardMarketing_ContentSchema>;\n\n// ===============================================================\n// MARKETING: Campaign Request\n// ===============================================================\n\nexport const StandardMarketing_CampaignRequestSchema = z.object({\n // Campaign name\n name: z.string().min(1),\n \n // Sender\n from: StandardEmail_AddressSchema,\n replyTo: StandardEmail_AddressSchema.optional(),\n \n // Audience\n audience: StandardMarketing_AudienceSchema,\n \n // Content\n content: StandardMarketing_ContentSchema,\n \n // Execution\n schedule: z.object({\n sendAt: z.iso.datetime().optional(),\n sendImmediately: z.boolean().optional(),\n }).optional(),\n \n // Tracking\n trackOpens: z.boolean().optional().default(true),\n trackClicks: z.boolean().optional().default(true),\n \n // Tags\n tags: z.array(z.string()).optional(),\n \n // Metadata\n metadata: z.record(z.string(), z.string()).optional(),\n});\n\nexport type StandardMarketing_CampaignRequest = z.infer<typeof StandardMarketing_CampaignRequestSchema>;\n\n// ===============================================================\n// MARKETING: Campaign Response\n// ===============================================================\n\nexport const StandardMarketing_CampaignResponseSchema = z.object({\n success: z.boolean(),\n campaignId: z.string(),\n providerCampaignId: z.string().optional(),\n status: z.enum([\"draft\", \"scheduled\", \"sending\", \"sent\", \"cancelled\"]),\n scheduledAt: z.iso.datetime().optional(),\n listId: z.string().optional(),\n audienceSize: z.number().int().optional(),\n});\n\nexport type StandardMarketing_CampaignResponse = z.infer<typeof StandardMarketing_CampaignResponseSchema>;\n\n// ===============================================================\n// Message Status Request/Response\n// ===============================================================\n\nexport const StandardEmail_GetStatusRequestSchema = z.object({\n messageId: z.string().min(1),\n});\n\nexport type StandardEmail_GetStatusRequest = z.infer<typeof StandardEmail_GetStatusRequestSchema>;\n\nexport const StandardEmail_GetStatusResponseSchema = z.object({\n messageId: z.string(),\n status: z.enum(EmailProvider_DeliveryStatus),\n to: z.email(),\n subject: z.string().optional(),\n sentAt: z.iso.datetime().optional(),\n deliveredAt: z.iso.datetime().optional(),\n openedAt: z.iso.datetime().optional(),\n clickedAt: z.iso.datetime().optional(),\n bouncedAt: z.iso.datetime().optional(),\n bounceReason: z.string().optional(),\n});\n\nexport type StandardEmail_GetStatusResponse = z.infer<typeof StandardEmail_GetStatusResponseSchema>;\n\n// ===============================================================\n// Standard Error\n// ===============================================================\n\nexport const StandardEmail_ErrorSchema = z.object({\n code: z.enum([\n \"VALIDATION_ERROR\",\n \"PROVIDER_ERROR\",\n \"CAPABILITY_NOT_SUPPORTED\",\n \"MARKETING_NOT_SUPPORTED\",\n \"SCHEDULING_NOT_SUPPORTED\",\n \"TEMPLATE_NOT_FOUND\",\n \"RATE_LIMIT_EXCEEDED\",\n \"AUTHENTICATION_FAILED\",\n \"QUOTA_EXCEEDED\",\n \"UNKNOWN_ERROR\",\n ]),\n message: z.string(),\n provider: z.string().optional(),\n details: z.unknown().optional(),\n \n // For capability errors - dynamically populated from registry\n requiredCapability: z.enum(EmailProvider_Capability).optional(),\n supportedProviders: z.array(z.string()).optional(),\n});\n\nexport type StandardEmail_Error = z.infer<typeof StandardEmail_ErrorSchema>;\n\n// ===============================================================\n// Capability Requirements\n// ===============================================================\n\n/**\n * Maps standard operations to required capabilities.\n * Used by the ETL layer to validate provider support.\n */\nexport const StandardEmail_OperationCapabilities = {\n sendEmail: [] as EmailProvider_Capability[], // All providers support basic send\n sendTemplate: [EmailProvider_Capability.SUPPORTS_TEMPLATES],\n sendBatch: [EmailProvider_Capability.SUPPORTS_BATCH_SENDING],\n sendScheduled: [EmailProvider_Capability.SUPPORTS_SCHEDULING],\n sendCampaign: [EmailProvider_Capability.SUPPORTS_MARKETING, EmailProvider_Capability.SUPPORTS_CAMPAIGNS],\n manageList: [EmailProvider_Capability.SUPPORTS_LIST_MANAGEMENT],\n} as const;\n\nexport type StandardEmail_Operation = keyof typeof StandardEmail_OperationCapabilities;\n"]}
|
|
1
|
+
{"version":3,"file":"email.standard-interface.schemas.js","sourceRoot":"","sources":["../../../../src/protocols/email.standard-interface.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAA2B,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAE7I,iEAAiE;AACjE,2BAA2B;AAC3B,WAAW;AACX,qEAAqE;AACrE,gEAAgE;AAChE,+BAA+B;AAC/B,EAAE;AACF,qBAAqB;AACrB,uDAAuD;AACvD,gEAAgE;AAChE,yEAAyE;AACzE,iEAAiE;AAEjE,kEAAkE;AAClE,yBAAyB;AACzB,kEAAkE;AAElE,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC;AAIH,kEAAkE;AAClE,sBAAsB;AACtB,kEAAkE;AAElE,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,iBAAiB;IACtC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,2BAA2B;CAC9D,CAAC,CAAC;AAIH;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,4BAGX;AAHD,WAAY,4BAA4B;IACtC,6CAAa,CAAA;IACb,2EAA2C,CAAA;AAC7C,CAAC,EAHW,4BAA4B,KAA5B,4BAA4B,QAGvC;AAED,8EAA8E;AAC9E,MAAM,CAAN,IAAY,6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AChB,CAAC;IACF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAE/B,8DAA8D;IAC9D,kBAAkB,EAAE,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,QAAQ,EAAE;IAC/D,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACnD,CAAC,CAAC;AAIH,kEAAkE;AAClE,0BAA0B;AAC1B,kEAAkE;AAElE;;;GAGG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG;IACjD,SAAS,EAAE,EAAgC,EAAE,mCAAmC;IAChF,YAAY,EAAE,CAAC,wBAAwB,CAAC,kBAAkB,CAAC;IAC3D,SAAS,EAAE,CAAC,wBAAwB,CAAC,sBAAsB,CAAC;IAC5D,aAAa,EAAE,CAAC,wBAAwB,CAAC,mBAAmB,CAAC;IAC7D,YAAY,EAAE,CAAC,wBAAwB,CAAC,kBAAkB,EAAE,wBAAwB,CAAC,kBAAkB,CAAC;IACxG,UAAU,EAAE,CAAC,wBAAwB,CAAC,wBAAwB,CAAC;CACvD,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { EmailProvider_Capability, EmailProvider_EmailType, EmailProvider_DeliveryStatus } from \"./email.external-connectors-models.schemas\";\n\n//===============================================================\n// Standard Email Interface\n// --------\n// This is the canonical interface that Wildo uses internally to send\n// emails. The ETL layer transforms these standard requests into\n// provider-specific API calls.\n//\n// Design Principles:\n// 1. Provider-agnostic - works with any email provider\n// 2. Capability-aware - validates against provider capabilities\n// 3. Extensible - new fields can be added without breaking existing code\n//===============================================================\n\n// ===============================================================\n// Standard Email Address\n// ===============================================================\n\nexport const StandardEmail_AddressSchema = z.object({\n email: z.email(),\n name: z.string().optional(),\n});\n\nexport type StandardEmail_Address = z.infer<typeof StandardEmail_AddressSchema>;\n\n// ===============================================================\n// Standard Attachment\n// ===============================================================\n\nexport const StandardEmail_AttachmentSchema = z.object({\n filename: z.string().min(1),\n content: z.string(), // Base64 encoded\n contentType: z.string().optional(),\n contentId: z.string().optional(), // For inline images (cid:)\n});\n\nexport type StandardEmail_Attachment = z.infer<typeof StandardEmail_AttachmentSchema>;\n\n/**\n * Wire encoding used by a network email provider gateway.\n *\n * This vocabulary is deliberately closed and explicit on every provider\n * contract: JSON and multipart data require materially different headers and\n * serialization. There is no implicit default.\n */\nexport enum EmailProviderPayloadEncoding {\n JSON = \"json\",\n MULTIPART_FORM_DATA = \"multipart-form-data\",\n}\n\n/** Provider acknowledgement state returned by a synchronous send endpoint. */\nexport enum EmailProviderSubmissionStatus {\n QUEUED = \"queued\",\n SENT = \"sent\",\n SCHEDULED = \"scheduled\",\n}\n\n/** Provider-owned classification for HTTP responses whose status is ambiguous. */\nexport enum EmailProviderSubmissionClassification {\n ACCEPTED = \"accepted\",\n REJECTED = \"rejected\",\n ACCEPTANCE_UNKNOWN = \"acceptance_unknown\",\n}\n\n// ===============================================================\n// TRANSACTIONAL: Send Email Request\n// ===============================================================\n\nexport const StandardEmail_SendRequestSchema = z.object({\n /**\n * Stable identity of ONE logical provider submission across retries.\n *\n * Deliberately not named `idempotencyKey`: it remains the framework's\n * correlation identity even when the selected provider cannot enforce\n * idempotency. Provider gateways may map it to a native idempotency field as\n * an optional duplicate-risk reduction.\n */\n submissionId: z.string().min(1).max(256),\n\n // Recipients (required)\n to: z.array(StandardEmail_AddressSchema).min(1),\n cc: z.array(StandardEmail_AddressSchema).optional(),\n bcc: z.array(StandardEmail_AddressSchema).optional(),\n \n // Sender (required unless provider config has default)\n from: StandardEmail_AddressSchema.optional(),\n replyTo: StandardEmail_AddressSchema.optional(),\n \n // Content (html OR text required)\n subject: z.string().min(1),\n html: z.string().optional(),\n text: z.string().optional(),\n \n // Optional features\n attachments: z.array(StandardEmail_AttachmentSchema).optional(),\n headers: z.record(z.string(), z.string()).optional(),\n tags: z.array(z.string()).optional(),\n \n // Scheduling (optional - requires SUPPORTS_SCHEDULING)\n scheduledAt: z.iso.datetime().optional(),\n \n // Tracking (optional, uses provider default if not set)\n trackOpens: z.boolean().optional(),\n trackClicks: z.boolean().optional(),\n \n // Metadata for correlation/tracking\n metadata: z.record(z.string(), z.string()).optional(),\n}).refine(\n (data) => data.html !== undefined || data.text !== undefined,\n { message: \"Either html or text content is required\" }\n);\n\nexport type StandardEmail_SendRequest = z.infer<typeof StandardEmail_SendRequestSchema>;\n\n// ===============================================================\n// TRANSACTIONAL: Send Email Response\n// ===============================================================\n\nexport const StandardEmail_SendResponseSchema = z.object({\n success: z.boolean(),\n /**\n * Mandatory provider-owned submission meaning. HTTP status, receipt shape,\n * and recipient-level `success` are not interchangeable across providers.\n */\n classification: z.enum(EmailProviderSubmissionClassification),\n /**\n * Provider-assigned receipts. An array is required because Brevo and\n * Mailchimp may acknowledge several recipient messages in one response.\n * Empty is honest for a successful non-delivery preview or a provider that\n * accepted the request without returning a receipt.\n */\n providerMessageIds: z.array(z.string().min(1)),\n /** Per-recipient rejections returned inside an otherwise successful HTTP response. */\n rejectedRecipients: z.array(z.object({\n email: z.string().min(1),\n reason: z.string().optional(),\n })).optional(),\n /**\n * Provider-declared detail explaining its explicit classification, including\n * semantic rejection or an ambiguous idempotency/processing conflict.\n */\n providerError: z.string().min(1).optional(),\n /**\n * Whether the caller should retry this response under at-least-once\n * semantics. For an acceptance-unknown response, a retry may duplicate a\n * message unless the selected provider happens to enforce the submission id.\n */\n retryable: z.boolean().optional(),\n /** Provider reports that this submission identity was already suppressed. */\n deduplicated: z.boolean().optional(),\n status: z.enum(EmailProviderSubmissionStatus).optional(),\n scheduledAt: z.iso.datetime().optional(),\n}).superRefine((response, context) => {\n const accepted =\n response.classification\n === EmailProviderSubmissionClassification.ACCEPTED;\n\n /**\n * `success` describes whole-request success, whereas `classification`\n * describes whether any provider submission was accepted. Once a provider\n * adapter classifies a submission as accepted, auxiliary result metadata\n * must never turn that acknowledgement into permission to replay. A false\n * `success` may describe an honest partial result (for example Mailchimp)\n * or anomalous adapter metadata; `rejectedRecipients` is therefore useful\n * evidence, but not a prerequisite for preserving acceptance.\n */\n if (response.success && !accepted) {\n context.addIssue({\n code: 'custom',\n path: ['success'],\n message:\n 'A successful email response must be classified as accepted',\n });\n }\n if (response.success && (response.rejectedRecipients?.length ?? 0) > 0) {\n context.addIssue({\n code: 'custom',\n path: ['rejectedRecipients'],\n message:\n 'A successful email response cannot contain rejected recipients',\n });\n }\n if (!accepted && response.providerMessageIds.length > 0) {\n context.addIssue({\n code: 'custom',\n path: ['providerMessageIds'],\n message:\n 'A non-accepted email response cannot contain provider acceptance receipts',\n });\n }\n for (const [index, providerMessageId] of response.providerMessageIds.entries()) {\n if (response.providerMessageIds.indexOf(providerMessageId) !== index) {\n context.addIssue({\n code: 'custom',\n path: ['providerMessageIds', index],\n message: 'Provider message receipts must be unique',\n });\n }\n }\n\n for (const acceptedOnlyField of [\n 'deduplicated',\n 'status',\n 'scheduledAt',\n ] as const) {\n if (!accepted && response[acceptedOnlyField] !== undefined) {\n context.addIssue({\n code: 'custom',\n path: [acceptedOnlyField],\n message:\n `${acceptedOnlyField} is valid only for an accepted email response`,\n });\n }\n }\n if (\n response.scheduledAt !== undefined\n && response.status !== EmailProviderSubmissionStatus.SCHEDULED\n ) {\n context.addIssue({\n code: 'custom',\n path: ['scheduledAt'],\n message:\n 'A scheduledAt receipt requires provider status scheduled',\n });\n }\n if (accepted && response.retryable === true) {\n context.addIssue({\n code: 'custom',\n path: ['retryable'],\n message: 'An accepted email response cannot request replay',\n });\n }\n});\n\nexport type StandardEmail_SendResponse = z.infer<typeof StandardEmail_SendResponseSchema>;\n\n// ===============================================================\n// TRANSACTIONAL: Send Template Request\n// ===============================================================\n\nexport const StandardEmail_SendTemplateRequestSchema = z.object({\n // Recipients\n to: z.array(StandardEmail_AddressSchema).min(1),\n cc: z.array(StandardEmail_AddressSchema).optional(),\n bcc: z.array(StandardEmail_AddressSchema).optional(),\n \n // Sender\n from: StandardEmail_AddressSchema.optional(),\n replyTo: StandardEmail_AddressSchema.optional(),\n \n // Template (requires SUPPORTS_TEMPLATES)\n templateId: z.string().min(1),\n templateAlias: z.string().optional(), // Alternative identifier (Postmark)\n variables: z.record(z.string(), z.unknown()).optional(),\n \n // Optional overrides\n subject: z.string().optional(), // Override template subject\n \n // Optional features\n attachments: z.array(StandardEmail_AttachmentSchema).optional(),\n tags: z.array(z.string()).optional(),\n scheduledAt: z.iso.datetime().optional(),\n \n // Metadata\n metadata: z.record(z.string(), z.string()).optional(),\n});\n\nexport type StandardEmail_SendTemplateRequest = z.infer<typeof StandardEmail_SendTemplateRequestSchema>;\n\n// ===============================================================\n// TRANSACTIONAL: Batch Send Request\n// ===============================================================\n\nexport const StandardEmail_BatchRecipientSchema = z.object({\n to: StandardEmail_AddressSchema,\n cc: z.array(StandardEmail_AddressSchema).optional(),\n bcc: z.array(StandardEmail_AddressSchema).optional(),\n variables: z.record(z.string(), z.unknown()).optional(),\n subject: z.string().optional(), // Per-recipient subject override\n metadata: z.record(z.string(), z.string()).optional(),\n});\n\nexport type StandardEmail_BatchRecipient = z.infer<typeof StandardEmail_BatchRecipientSchema>;\n\nexport const StandardEmail_BatchRequestSchema = z.object({\n // Sender (shared)\n from: StandardEmail_AddressSchema.optional(),\n replyTo: StandardEmail_AddressSchema.optional(),\n \n // Content (shared - either direct or template)\n subject: z.string().optional(), // Default subject\n html: z.string().optional(),\n text: z.string().optional(),\n templateId: z.string().optional(),\n \n // Recipients with personalizations (requires SUPPORTS_BATCH_SENDING)\n recipients: z.array(StandardEmail_BatchRecipientSchema).min(1),\n \n // Optional features\n attachments: z.array(StandardEmail_AttachmentSchema).optional(),\n tags: z.array(z.string()).optional(),\n scheduledAt: z.iso.datetime().optional(),\n});\n\nexport type StandardEmail_BatchRequest = z.infer<typeof StandardEmail_BatchRequestSchema>;\n\n// ===============================================================\n// TRANSACTIONAL: Batch Send Response\n// ===============================================================\n\nexport const StandardEmail_BatchResponseSchema = z.object({\n success: z.boolean(),\n totalRequested: z.number().int(),\n totalAccepted: z.number().int(),\n totalRejected: z.number().int(),\n results: z.array(z.object({\n // Email address OR summary identifier (e.g. \"batch\" when provider returns aggregate result)\n email: z.string().min(1),\n success: z.boolean(),\n messageId: z.string().optional(),\n error: z.string().optional(),\n })),\n});\n\nexport type StandardEmail_BatchResponse = z.infer<typeof StandardEmail_BatchResponseSchema>;\n\n// ===============================================================\n// MARKETING: Contact\n// ===============================================================\n\nexport const StandardMarketing_ContactSchema = z.object({\n email: z.email(),\n firstName: z.string().optional(),\n lastName: z.string().optional(),\n phone: z.string().optional(),\n attributes: z.record(z.string(), z.unknown()).optional(),\n});\n\nexport type StandardMarketing_Contact = z.infer<typeof StandardMarketing_ContactSchema>;\n\n// ===============================================================\n// MARKETING: List\n// ===============================================================\n\nexport const StandardMarketing_ListSchema = z.object({\n id: z.string().optional(), // Provider assigns on create\n name: z.string().min(1),\n description: z.string().optional(),\n});\n\nexport type StandardMarketing_List = z.infer<typeof StandardMarketing_ListSchema>;\n\n// ===============================================================\n// MARKETING: Audience (List + Contacts)\n// ===============================================================\n\nexport const StandardMarketing_AudienceSchema = z.object({\n // List reference (use existing by ID, or create/find by name)\n list: z.object({\n id: z.string().optional(),\n name: z.string().optional(),\n description: z.string().optional(),\n }).refine(\n (data) => data.id !== undefined || data.name !== undefined,\n { message: \"Either list.id or list.name is required\" }\n ),\n \n // Contacts to add/sync (optional if using existing list)\n contacts: z.array(StandardMarketing_ContactSchema).optional(),\n});\n\nexport type StandardMarketing_Audience = z.infer<typeof StandardMarketing_AudienceSchema>;\n\n// ===============================================================\n// MARKETING: Campaign Content\n// ===============================================================\n\nexport const StandardMarketing_ContentSchema = z.object({\n // Use template OR inline content\n templateId: z.string().optional(),\n templateVariables: z.record(z.string(), z.unknown()).optional(),\n \n // Inline content (if no template)\n subject: z.string().optional(),\n html: z.string().optional(),\n text: z.string().optional(),\n previewText: z.string().optional(),\n \n // Attachments\n attachments: z.array(StandardEmail_AttachmentSchema).optional(),\n}).refine(\n (data) => data.templateId !== undefined || data.subject !== undefined,\n { message: \"Either templateId or subject is required\" }\n);\n\nexport type StandardMarketing_Content = z.infer<typeof StandardMarketing_ContentSchema>;\n\n// ===============================================================\n// MARKETING: Campaign Request\n// ===============================================================\n\nexport const StandardMarketing_CampaignRequestSchema = z.object({\n // Campaign name\n name: z.string().min(1),\n \n // Sender\n from: StandardEmail_AddressSchema,\n replyTo: StandardEmail_AddressSchema.optional(),\n \n // Audience\n audience: StandardMarketing_AudienceSchema,\n \n // Content\n content: StandardMarketing_ContentSchema,\n \n // Execution\n schedule: z.object({\n sendAt: z.iso.datetime().optional(),\n sendImmediately: z.boolean().optional(),\n }).optional(),\n \n // Tracking\n trackOpens: z.boolean().optional().default(true),\n trackClicks: z.boolean().optional().default(true),\n \n // Tags\n tags: z.array(z.string()).optional(),\n \n // Metadata\n metadata: z.record(z.string(), z.string()).optional(),\n});\n\nexport type StandardMarketing_CampaignRequest = z.infer<typeof StandardMarketing_CampaignRequestSchema>;\n\n// ===============================================================\n// MARKETING: Campaign Response\n// ===============================================================\n\nexport const StandardMarketing_CampaignResponseSchema = z.object({\n success: z.boolean(),\n campaignId: z.string(),\n providerCampaignId: z.string().optional(),\n status: z.enum([\"draft\", \"scheduled\", \"sending\", \"sent\", \"cancelled\"]),\n scheduledAt: z.iso.datetime().optional(),\n listId: z.string().optional(),\n audienceSize: z.number().int().optional(),\n});\n\nexport type StandardMarketing_CampaignResponse = z.infer<typeof StandardMarketing_CampaignResponseSchema>;\n\n// ===============================================================\n// Message Status Request/Response\n// ===============================================================\n\nexport const StandardEmail_GetStatusRequestSchema = z.object({\n messageId: z.string().min(1),\n});\n\nexport type StandardEmail_GetStatusRequest = z.infer<typeof StandardEmail_GetStatusRequestSchema>;\n\nexport const StandardEmail_GetStatusResponseSchema = z.object({\n messageId: z.string(),\n status: z.enum(EmailProvider_DeliveryStatus),\n to: z.email(),\n subject: z.string().optional(),\n sentAt: z.iso.datetime().optional(),\n deliveredAt: z.iso.datetime().optional(),\n openedAt: z.iso.datetime().optional(),\n clickedAt: z.iso.datetime().optional(),\n bouncedAt: z.iso.datetime().optional(),\n bounceReason: z.string().optional(),\n});\n\nexport type StandardEmail_GetStatusResponse = z.infer<typeof StandardEmail_GetStatusResponseSchema>;\n\n// ===============================================================\n// Standard Error\n// ===============================================================\n\nexport const StandardEmail_ErrorSchema = z.object({\n code: z.enum([\n \"VALIDATION_ERROR\",\n \"PROVIDER_ERROR\",\n \"CAPABILITY_NOT_SUPPORTED\",\n \"MARKETING_NOT_SUPPORTED\",\n \"SCHEDULING_NOT_SUPPORTED\",\n \"TEMPLATE_NOT_FOUND\",\n \"RATE_LIMIT_EXCEEDED\",\n \"AUTHENTICATION_FAILED\",\n \"QUOTA_EXCEEDED\",\n \"UNKNOWN_ERROR\",\n ]),\n message: z.string(),\n provider: z.string().optional(),\n details: z.unknown().optional(),\n \n // For capability errors - dynamically populated from registry\n requiredCapability: z.enum(EmailProvider_Capability).optional(),\n supportedProviders: z.array(z.string()).optional(),\n});\n\nexport type StandardEmail_Error = z.infer<typeof StandardEmail_ErrorSchema>;\n\n// ===============================================================\n// Capability Requirements\n// ===============================================================\n\n/**\n * Maps standard operations to required capabilities.\n * Used by the ETL layer to validate provider support.\n */\nexport const StandardEmail_OperationCapabilities = {\n sendEmail: [] as EmailProvider_Capability[], // All providers support basic send\n sendTemplate: [EmailProvider_Capability.SUPPORTS_TEMPLATES],\n sendBatch: [EmailProvider_Capability.SUPPORTS_BATCH_SENDING],\n sendScheduled: [EmailProvider_Capability.SUPPORTS_SCHEDULING],\n sendCampaign: [EmailProvider_Capability.SUPPORTS_MARKETING, EmailProvider_Capability.SUPPORTS_CAMPAIGNS],\n manageList: [EmailProvider_Capability.SUPPORTS_LIST_MANAGEMENT],\n} as const;\n\nexport type StandardEmail_Operation = keyof typeof StandardEmail_OperationCapabilities;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embeddings.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"embeddings.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../../src/protocols/embeddings.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EACL,sCAAsC,EACrC,MAAM,oDAAoD,CAAA;AAkB7D;;;;;GAKG;AACH,oBAAY,wBAAwB;IAClC,kGAAkG;IAClG,8BAA8B,2BAA2B;IACzD,kEAAkE;IAClE,8BAA8B,2BAA2B;CAC1D;AAED;;;;;;;;;GASG;AACH,oBAAY,+BAA+B;IACzC,8DAA8D;IAC9D,WAAW,0BAA0B;CACtC;AAED;;;;;;;;GAQG;AACH,oBAAY,8BAA8B;IACxC,yEAAyE;IACzE,MAAM,WAAW;IACjB,8EAA8E;IAC9E,KAAK,UAAU;CAChB;AAED;;;;;;;;;;;;;;;GAeG;AACH,oBAAY,wBAAwB;IAClC,iGAAiG;IACjG,WAAW,gBAAgB;CAC5B;AACD,8EAA8E;AAE9E;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC,4DAA4D;IAC5D,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,sFAAsF;IACtF,eAAe,EAAE,SAAS,wBAAwB,EAAE,CAAC;CACtD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,wBAAwB,EAAE,4BAA4B,CAenG,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,yCAAyC,EAAE,MAAM,CAAC,wBAAwB,EAAE,SAAS,wBAAwB,EAAE,CAI3H,CAAC;AAEF,sHAAsH;AACtH,oBAAY,iCAAiC;IAC3C,mEAAmE;IACnE,yBAAyB,8BAA8B;CACxD;AAED,MAAM,MAAM,0BAA0B,GAClC;IAAE,QAAQ,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,wBAAwB,CAAC;IAAC,KAAK,EAAE,4BAA4B,CAAA;CAAE,GACxF;IAAE,QAAQ,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,iCAAiC,CAAC;IAAC,gBAAgB,EAAE,SAAS,wBAAwB,EAAE,CAAA;CAAE,CAAC;AAE3H;;;;;;;GAOG;AACH,eAAO,MAAM,sCAAsC,GACjD,OAAO;IAAE,aAAa,EAAE,wBAAwB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EACvE,UAAS,MAAM,CAAC,wBAAwB,EAAE,4BAA4B,CAA4B,KACjG,0BAWF,CAAC;AAMF;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B;;iBAGzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF,eAAO,MAAM,mDAAmD;;;;iBAI9D,CAAC;AACH,MAAM,MAAM,6CAA6C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mDAAmD,CAAC,CAAC;AAMhI,kFAAkF;AAClF,eAAO,MAAM,wCAAwC;;;iBAKnD,CAAC;AACH,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wCAAwC,CAAC,CAAC;AAE1G;;;;;;;GAOG;AACH,eAAO,MAAM,yCAAyC;;;;;;;iBAOpD,CAAC;AACH,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embeddings.external-connectors-models.schemas.js","sourceRoot":"","sources":["../../../src/protocols/embeddings.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EACL,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ind,\n } from \"../core/commons.external-connectors-models.schemas\"\n\n//===============================================================\n// Embeddings Provider\n// --------\n// Text → vector embedding providers (OpenAI text-embedding-3, Voyage, Cohere embed, …).\n// Serves the RAG derived-data tier: the `rag:embedding-drain` worker embeds corpus chunks,\n// and retrieval (RAG plan Phase 5) embeds queries through the SAME provider seam so both\n// sides of a similarity search live in one vector space.\n//\n// Deliberately a SEPARATE protocol from `LLM_PROVIDER` (RAG plan DL2, the `IMAGE_PROVIDER`\n// precedent): its I/O is float vectors, its parameters (dimensions / batch size) share nothing\n// with LLM sampling, and — decisive — a sixth `LLMProvider_OperationKey` would fail SILENTLY\n// in every LLM consumer surface, while a new `runtimeContract.kind` fails COMPILATION at every\n// switch. It also fills its own `EngineCapability.AI_EMBEDDINGS` slot so an application can pick\n// Anthropic for chat and a different provider for embeddings.\n//===============================================================\n\n/**\n * Concrete embedding-model ids the framework knows. Ids and dimensions are published provider\n * facts (OpenAI embeddings API); the runtime additionally verifies the MEASURED dimension of\n * every returned vector against the catalog row before anything is persisted, so a wrong row\n * here fails loudly instead of poisoning a vector store.\n */\nexport enum EmbeddingsProvider_Model {\n /** OpenAI's cost-efficient embedding model — 1536 dimensions. The industry-default RAG choice. */\n OPEN_AI_TEXT_EMBEDDING_3_SMALL = \"text-embedding-3-small\",\n /** OpenAI's highest-quality embedding model — 3072 dimensions. */\n OPEN_AI_TEXT_EMBEDDING_3_LARGE = \"text-embedding-3-large\",\n}\n\n/**\n * The embeddings operation vocabulary — deliberately DISJOINT from `LLMProvider_OperationKey`\n * and `ImageProvider_OperationKey` (each protocol kind owns its own operation enum, so a key's\n * membership decides its protocol without inspection).\n *\n * Import path: `@wildo-ai/external-connectors-models`.\n *\n * (`@wildo_source` anchoring + the teaching skill are RAG-plan Phase-7 work — the\n * capability-catalog rule's DoD is deferred there deliberately, not forgotten.)\n */\nexport enum EmbeddingsProvider_OperationKey {\n /** A batch of texts → one vector per text, in input order. */\n EMBED_TEXTS = \"embeddings.embedTexts\",\n}\n\n/**\n * WHY a text is being embedded — some models embed retrieval QUERIES differently from the\n * DOCUMENTS they search over (Voyage/Cohere `input_type`; instruction-prefixed models), so the\n * caller's intent must travel with the call rather than being inferred. OpenAI `text-embedding-3-*`\n * ignores the distinction; providers that honour it translate this value at their boundary.\n *\n * A named home (semantic-string-literals rule): `'corpus'`/`'query'` are a closed vocabulary,\n * and this enum is where their semantics live.\n */\nexport enum EmbeddingsProvider_TextPurpose {\n /** The text IS retrievable content — a RAG chunk entering the corpus. */\n CORPUS = \"corpus\",\n /** The text is a SEARCH query that will be matched against corpus vectors. */\n QUERY = \"query\",\n}\n\n/**\n * @wildo_source:part:start saas.external-providers.embeddings.applicability facet:kind:api facet:audience:app-developer\n *\n * WHAT an embedding is produced FOR — the durable axis of embedding-model selection\n * (model-selection-by-applicability rule: an author names a CLASS, never a concrete model id;\n * the framework resolves the id from the catalog + preference below).\n *\n * This is ALSO the persisted `embeddingClass` stamp on every RAG chunk row: the drain worker\n * stamps the class it embedded under, and the model-migration pass re-embeds any chunk whose\n * stamped class→model binding no longer matches the current resolution — so changing the\n * preference below IS the migration trigger, with no chunk-table DDL and no call-site edits.\n *\n * NOTE both corpus AND query embedding of one retrieval surface MUST resolve through the SAME\n * class — a similarity search across two models' vector spaces is meaningless. That is why the\n * class names the SURFACE (`RAG_DEFAULT`), not the side (`purpose` carries the side).\n */\nexport enum Embeddings_Applicability {\n /** The default RAG surface: `.ragSource()` corpus chunks and the retrieval queries over them. */\n RAG_DEFAULT = \"rag-default\",\n}\n/** @wildo_source:part:end saas.external-providers.embeddings.applicability */\n\n/**\n * One row per embedding model: everything the framework knows about a concrete id.\n * Mirrors `LLM_ModelCatalogEntry`'s shape at the size this axis needs today.\n */\nexport type Embeddings_ModelCatalogEntry = {\n /** The `ref` of the provider module that serves this id. */\n providerRef: string;\n /**\n * The model's published output dimension. Load-bearing twice: the drain worker VERIFIES every\n * returned vector against it before persisting (a wrong-dims write silently poisons ANN\n * indexes), and the pgvector HNSW expression index is created per this dimension.\n */\n dims: number;\n /** FRAMEWORK OPINION — which applicability classes this model may be resolved for. */\n applicabilities: readonly Embeddings_Applicability[];\n};\n\n/**\n * THE embedding-model catalog — the single per-model fact table (the `LLM_MODEL_CATALOG`\n * discipline: an EXHAUSTIVE `Record`, so a new `EmbeddingsProvider_Model` member without a row\n * is a compile error).\n */\nexport const EMBEDDINGS_MODEL_CATALOG: Record<EmbeddingsProvider_Model, Embeddings_ModelCatalogEntry> = {\n [EmbeddingsProvider_Model.OPEN_AI_TEXT_EMBEDDING_3_SMALL]: {\n providerRef: \"openai\",\n dims: 1536,\n applicabilities: [Embeddings_Applicability.RAG_DEFAULT],\n },\n [EmbeddingsProvider_Model.OPEN_AI_TEXT_EMBEDDING_3_LARGE]: {\n providerRef: \"openai\",\n dims: 3072,\n // Deliberately NOT auto-selected for RAG_DEFAULT: 2× the storage + ANN cost for a quality\n // delta most application corpora do not need. Selection is framework-owned: the public\n // resolver exposes no per-application preference override. Selecting this model would\n // require a framework applicability/preference change, with corpus migration implications.\n applicabilities: [],\n },\n};\n\n/**\n * The framework's DEFAULT answer to \"which embedding model serves this class\", ordered by\n * preference, highest first. THIS BINDING IS THE MIGRATION KEY (RAG plan §3.d): editing it\n * changes what `resolveEmbeddingsModelForApplicability` answers, which makes every chunk stamped\n * with the previous model a migration candidate the drain worker re-embeds — bounded per run,\n * converging over runs. No agent/worker definition changes.\n */\nexport const EMBEDDINGS_MODEL_APPLICABILITY_PREFERENCE: Record<Embeddings_Applicability, readonly EmbeddingsProvider_Model[]> = {\n [Embeddings_Applicability.RAG_DEFAULT]: [\n EmbeddingsProvider_Model.OPEN_AI_TEXT_EMBEDDING_3_SMALL,\n ],\n};\n\n/** Why {@link resolveEmbeddingsModelForApplicability} could not answer — carried into a named CONFIGURATION error. */\nexport enum Embeddings_ModelResolutionFailure {\n /** The applicability has no candidate at all for this provider. */\n NO_CANDIDATE_FOR_PROVIDER = \"no_candidate_for_provider\",\n}\n\nexport type Embeddings_ModelResolution =\n | { resolved: true; model: EmbeddingsProvider_Model; entry: Embeddings_ModelCatalogEntry }\n | { resolved: false; failure: Embeddings_ModelResolutionFailure; consideredModels: readonly EmbeddingsProvider_Model[] };\n\n/**\n * Resolve an applicability class to ONE concrete embedding model for a given provider.\n *\n * Fails CLOSED and explains itself (the `resolveModelForApplicability` contract): a silent\n * fallback to some other model would fracture the vector space the class exists to keep whole.\n * The resolved `(class, model)` pair is what the RAG drain worker stamps on every chunk and what\n * its migration pass compares stamps against.\n */\nexport const resolveEmbeddingsModelForApplicability = (\n input: { applicability: Embeddings_Applicability; providerRef: string },\n catalog: Record<EmbeddingsProvider_Model, Embeddings_ModelCatalogEntry> = EMBEDDINGS_MODEL_CATALOG,\n): Embeddings_ModelResolution => {\n const candidates = EMBEDDINGS_MODEL_APPLICABILITY_PREFERENCE[input.applicability];\n const forProvider = candidates.filter((model) => {\n const entry = catalog[model];\n return entry.providerRef === input.providerRef && entry.applicabilities.includes(input.applicability);\n });\n if (forProvider.length === 0) {\n return { resolved: false, failure: Embeddings_ModelResolutionFailure.NO_CANDIDATE_FOR_PROVIDER, consideredModels: candidates };\n }\n const model = forProvider[0]!;\n return { resolved: true, model, entry: catalog[model] };\n};\n\n// ===============================================================\n// Embeddings Operations Context\n// ===============================================================\n\n/**\n * Usage of one embedding call. There is NO completion-token dimension — an embedding consumes\n * input tokens and produces vectors, so usage-completeness for an embedding trace is judged on\n * `inputTokens` alone (H4: an embedding trace must never be flagged token-incomplete for lacking\n * completion tokens it structurally cannot have).\n */\nexport const EmbeddingsProvider_UsageSchema = z.object({\n /** Provider-reported input tokens, when the model reports them (OpenAI does). */\n inputTokens: z.number().optional(),\n});\nexport type EmbeddingsProvider_Usage = z.infer<typeof EmbeddingsProvider_UsageSchema>;\n\nexport const EmbeddingsProvider_ExecutionTransportMetadataSchema = z.object({\n protocolKind: z.literal(ExternalProvider_ExchangeProtocol_Kind.EMBEDDINGS_PROVIDER),\n providerRef: z.string(),\n model: z.string().optional(),\n});\nexport type EmbeddingsProvider_ExecutionTransportMetadata = z.infer<typeof EmbeddingsProvider_ExecutionTransportMetadataSchema>;\n\n// ===============================================================\n// Embeddings I/O Schemas\n// ===============================================================\n\n/** Input of the {@link EmbeddingsProvider_OperationKey.EMBED_TEXTS} operation. */\nexport const EmbeddingsProvider_EmbedTextsInputSchema = z.object({\n /** The texts to embed — one vector is returned per text, in this order. */\n texts: z.array(z.string()).min(1),\n /** Why these texts are embedded — see {@link EmbeddingsProvider_TextPurpose}. */\n purpose: z.enum(EmbeddingsProvider_TextPurpose),\n});\nexport type EmbeddingsProvider_EmbedTextsInput = z.infer<typeof EmbeddingsProvider_EmbedTextsInputSchema>;\n\n/**\n * Output of {@link EmbeddingsProvider_OperationKey.EMBED_TEXTS}. `vectors[i]` embeds `texts[i]`.\n *\n * ⚠️ PRIVACY/OBSERVABILITY CONTRACT: raw vectors are a lossy ENCODING of the source text, not\n * telemetry — they must NEVER reach analytics events, traces, or logs at any verbosity. Consumers\n * summarize (`vectorCount`, `dims`) instead; the PostHog sink's embedding arm enforces this\n * defensively even against a mis-built trace.\n */\nexport const EmbeddingsProvider_EmbedTextsOutputSchema = z.object({\n vectors: z.array(z.array(z.number())),\n /** The concrete model that produced the vectors — the chunk rows' `embeddingModel` stamp. */\n model: z.string(),\n /** The (verified) dimension every returned vector carries — the `embeddingDims` stamp. */\n dims: z.number().int().positive(),\n usage: EmbeddingsProvider_UsageSchema,\n});\nexport type EmbeddingsProvider_EmbedTextsOutput = z.infer<typeof EmbeddingsProvider_EmbedTextsOutputSchema>;\n\n"]}
|
|
1
|
+
{"version":3,"file":"embeddings.external-connectors-models.schemas.js","sourceRoot":"","sources":["../../../../src/protocols/embeddings.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EACL,sCAAsC,GACrC,MAAM,oDAAoD,CAAA;AAE7D,iEAAiE;AACjE,sBAAsB;AACtB,WAAW;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,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,iFAAiF;IACjF,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,mDAAmD,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1E,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,sCAAsC,CAAC,mBAAmB,CAAC;IACnF,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC;AAGH,kEAAkE;AAClE,yBAAyB;AACzB,kEAAkE;AAElE,kFAAkF;AAClF,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/D,2EAA2E;IAC3E,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,iFAAiF;IACjF,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,8BAA8B,CAAC;CAChD,CAAC,CAAC;AAGH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,yCAAyC,GAAG,CAAC,CAAC,MAAM,CAAC;IAChE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACrC,6FAA6F;IAC7F,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,0FAA0F;IAC1F,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACjC,KAAK,EAAE,8BAA8B;CACtC,CAAC,CAAC","sourcesContent":["import { z } from \"zod\"\nimport {\n ExternalProvider_ExchangeProtocol_Kind,\n } from \"../core/commons.external-connectors-models.schemas\"\n\n//===============================================================\n// Embeddings Provider\n// --------\n// Text → vector embedding providers (OpenAI text-embedding-3, Voyage, Cohere embed, …).\n// Serves the RAG derived-data tier: the `rag:embedding-drain` worker embeds corpus chunks,\n// and retrieval (RAG plan Phase 5) embeds queries through the SAME provider seam so both\n// sides of a similarity search live in one vector space.\n//\n// Deliberately a SEPARATE protocol from `LLM_PROVIDER` (RAG plan DL2, the `IMAGE_PROVIDER`\n// precedent): its I/O is float vectors, its parameters (dimensions / batch size) share nothing\n// with LLM sampling, and — decisive — a sixth `LLMProvider_OperationKey` would fail SILENTLY\n// in every LLM consumer surface, while a new `runtimeContract.kind` fails COMPILATION at every\n// switch. It also fills its own `EngineCapability.AI_EMBEDDINGS` slot so an application can pick\n// Anthropic for chat and a different provider for embeddings.\n//===============================================================\n\n/**\n * Concrete embedding-model ids the framework knows. Ids and dimensions are published provider\n * facts (OpenAI embeddings API); the runtime additionally verifies the MEASURED dimension of\n * every returned vector against the catalog row before anything is persisted, so a wrong row\n * here fails loudly instead of poisoning a vector store.\n */\nexport enum EmbeddingsProvider_Model {\n /** OpenAI's cost-efficient embedding model — 1536 dimensions. The industry-default RAG choice. */\n OPEN_AI_TEXT_EMBEDDING_3_SMALL = \"text-embedding-3-small\",\n /** OpenAI's highest-quality embedding model — 3072 dimensions. */\n OPEN_AI_TEXT_EMBEDDING_3_LARGE = \"text-embedding-3-large\",\n}\n\n/**\n * The embeddings operation vocabulary — deliberately DISJOINT from `LLMProvider_OperationKey`\n * and `ImageProvider_OperationKey` (each protocol kind owns its own operation enum, so a key's\n * membership decides its protocol without inspection).\n *\n * Import path: `@wildo-ai/external-connectors-models`.\n *\n * (`@wildo_source` anchoring + the teaching skill are RAG-plan Phase-7 work — the\n * capability-catalog rule's DoD is deferred there deliberately, not forgotten.)\n */\nexport enum EmbeddingsProvider_OperationKey {\n /** A batch of texts → one vector per text, in input order. */\n EMBED_TEXTS = \"embeddings.embedTexts\",\n}\n\n/**\n * WHY a text is being embedded — some models embed retrieval QUERIES differently from the\n * DOCUMENTS they search over (Voyage/Cohere `input_type`; instruction-prefixed models), so the\n * caller's intent must travel with the call rather than being inferred. OpenAI `text-embedding-3-*`\n * ignores the distinction; providers that honour it translate this value at their boundary.\n *\n * A named home (semantic-string-literals rule): `'corpus'`/`'query'` are a closed vocabulary,\n * and this enum is where their semantics live.\n */\nexport enum EmbeddingsProvider_TextPurpose {\n /** The text IS retrievable content — a RAG chunk entering the corpus. */\n CORPUS = \"corpus\",\n /** The text is a SEARCH query that will be matched against corpus vectors. */\n QUERY = \"query\",\n}\n\n/**\n * @wildo_source:part:start saas.external-providers.embeddings.applicability facet:kind:api facet:audience:app-developer\n *\n * WHAT an embedding is produced FOR — the durable axis of embedding-model selection\n * (model-selection-by-applicability rule: an author names a CLASS, never a concrete model id;\n * the framework resolves the id from the catalog + preference below).\n *\n * This is ALSO the persisted `embeddingClass` stamp on every RAG chunk row: the drain worker\n * stamps the class it embedded under, and the model-migration pass re-embeds any chunk whose\n * stamped class→model binding no longer matches the current resolution — so changing the\n * preference below IS the migration trigger, with no chunk-table DDL and no call-site edits.\n *\n * NOTE both corpus AND query embedding of one retrieval surface MUST resolve through the SAME\n * class — a similarity search across two models' vector spaces is meaningless. That is why the\n * class names the SURFACE (`RAG_DEFAULT`), not the side (`purpose` carries the side).\n */\nexport enum Embeddings_Applicability {\n /** The default RAG surface: `.ragSource()` corpus chunks and the retrieval queries over them. */\n RAG_DEFAULT = \"rag-default\",\n}\n/** @wildo_source:part:end saas.external-providers.embeddings.applicability */\n\n/**\n * One row per embedding model: everything the framework knows about a concrete id.\n * Mirrors `LLM_ModelCatalogEntry`'s shape at the size this axis needs today.\n */\nexport type Embeddings_ModelCatalogEntry = {\n /** The `ref` of the provider module that serves this id. */\n providerRef: string;\n /**\n * The model's published output dimension. Load-bearing twice: the drain worker VERIFIES every\n * returned vector against it before persisting (a wrong-dims write silently poisons ANN\n * indexes), and the pgvector HNSW expression index is created per this dimension.\n */\n dims: number;\n /** FRAMEWORK OPINION — which applicability classes this model may be resolved for. */\n applicabilities: readonly Embeddings_Applicability[];\n};\n\n/**\n * THE embedding-model catalog — the single per-model fact table (the `LLM_MODEL_CATALOG`\n * discipline: an EXHAUSTIVE `Record`, so a new `EmbeddingsProvider_Model` member without a row\n * is a compile error).\n */\nexport const EMBEDDINGS_MODEL_CATALOG: Record<EmbeddingsProvider_Model, Embeddings_ModelCatalogEntry> = {\n [EmbeddingsProvider_Model.OPEN_AI_TEXT_EMBEDDING_3_SMALL]: {\n providerRef: \"openai\",\n dims: 1536,\n applicabilities: [Embeddings_Applicability.RAG_DEFAULT],\n },\n [EmbeddingsProvider_Model.OPEN_AI_TEXT_EMBEDDING_3_LARGE]: {\n providerRef: \"openai\",\n dims: 3072,\n // Deliberately NOT auto-selected for RAG_DEFAULT: 2× the storage + ANN cost for a quality\n // delta most application corpora do not need. Selection is framework-owned: the public\n // resolver exposes no per-application preference override. Selecting this model would\n // require a framework applicability/preference change, with corpus migration implications.\n applicabilities: [],\n },\n};\n\n/**\n * The framework's DEFAULT answer to \"which embedding model serves this class\", ordered by\n * preference, highest first. THIS BINDING IS THE MIGRATION KEY (RAG plan §3.d): editing it\n * changes what `resolveEmbeddingsModelForApplicability` answers, which makes every chunk stamped\n * with the previous model a migration candidate the drain worker re-embeds — bounded per run,\n * converging over runs. No agent/worker definition changes.\n */\nexport const EMBEDDINGS_MODEL_APPLICABILITY_PREFERENCE: Record<Embeddings_Applicability, readonly EmbeddingsProvider_Model[]> = {\n [Embeddings_Applicability.RAG_DEFAULT]: [\n EmbeddingsProvider_Model.OPEN_AI_TEXT_EMBEDDING_3_SMALL,\n ],\n};\n\n/** Why {@link resolveEmbeddingsModelForApplicability} could not answer — carried into a named CONFIGURATION error. */\nexport enum Embeddings_ModelResolutionFailure {\n /** The applicability has no candidate at all for this provider. */\n NO_CANDIDATE_FOR_PROVIDER = \"no_candidate_for_provider\",\n}\n\nexport type Embeddings_ModelResolution =\n | { resolved: true; model: EmbeddingsProvider_Model; entry: Embeddings_ModelCatalogEntry }\n | { resolved: false; failure: Embeddings_ModelResolutionFailure; consideredModels: readonly EmbeddingsProvider_Model[] };\n\n/**\n * Resolve an applicability class to ONE concrete embedding model for a given provider.\n *\n * Fails CLOSED and explains itself (the `resolveModelForApplicability` contract): a silent\n * fallback to some other model would fracture the vector space the class exists to keep whole.\n * The resolved `(class, model)` pair is what the RAG drain worker stamps on every chunk and what\n * its migration pass compares stamps against.\n */\nexport const resolveEmbeddingsModelForApplicability = (\n input: { applicability: Embeddings_Applicability; providerRef: string },\n catalog: Record<EmbeddingsProvider_Model, Embeddings_ModelCatalogEntry> = EMBEDDINGS_MODEL_CATALOG,\n): Embeddings_ModelResolution => {\n const candidates = EMBEDDINGS_MODEL_APPLICABILITY_PREFERENCE[input.applicability];\n const forProvider = candidates.filter((model) => {\n const entry = catalog[model];\n return entry.providerRef === input.providerRef && entry.applicabilities.includes(input.applicability);\n });\n if (forProvider.length === 0) {\n return { resolved: false, failure: Embeddings_ModelResolutionFailure.NO_CANDIDATE_FOR_PROVIDER, consideredModels: candidates };\n }\n const model = forProvider[0]!;\n return { resolved: true, model, entry: catalog[model] };\n};\n\n// ===============================================================\n// Embeddings Operations Context\n// ===============================================================\n\n/**\n * Usage of one embedding call. There is NO completion-token dimension — an embedding consumes\n * input tokens and produces vectors, so usage-completeness for an embedding trace is judged on\n * `inputTokens` alone (H4: an embedding trace must never be flagged token-incomplete for lacking\n * completion tokens it structurally cannot have).\n */\nexport const EmbeddingsProvider_UsageSchema = z.object({\n /** Provider-reported input tokens, when the model reports them (OpenAI does). */\n inputTokens: z.number().optional(),\n});\nexport type EmbeddingsProvider_Usage = z.infer<typeof EmbeddingsProvider_UsageSchema>;\n\nexport const EmbeddingsProvider_ExecutionTransportMetadataSchema = z.object({\n protocolKind: z.literal(ExternalProvider_ExchangeProtocol_Kind.EMBEDDINGS_PROVIDER),\n providerRef: z.string(),\n model: z.string().optional(),\n});\nexport type EmbeddingsProvider_ExecutionTransportMetadata = z.infer<typeof EmbeddingsProvider_ExecutionTransportMetadataSchema>;\n\n// ===============================================================\n// Embeddings I/O Schemas\n// ===============================================================\n\n/** Input of the {@link EmbeddingsProvider_OperationKey.EMBED_TEXTS} operation. */\nexport const EmbeddingsProvider_EmbedTextsInputSchema = z.object({\n /** The texts to embed — one vector is returned per text, in this order. */\n texts: z.array(z.string()).min(1),\n /** Why these texts are embedded — see {@link EmbeddingsProvider_TextPurpose}. */\n purpose: z.enum(EmbeddingsProvider_TextPurpose),\n});\nexport type EmbeddingsProvider_EmbedTextsInput = z.infer<typeof EmbeddingsProvider_EmbedTextsInputSchema>;\n\n/**\n * Output of {@link EmbeddingsProvider_OperationKey.EMBED_TEXTS}. `vectors[i]` embeds `texts[i]`.\n *\n * ⚠️ PRIVACY/OBSERVABILITY CONTRACT: raw vectors are a lossy ENCODING of the source text, not\n * telemetry — they must NEVER reach analytics events, traces, or logs at any verbosity. Consumers\n * summarize (`vectorCount`, `dims`) instead; the PostHog sink's embedding arm enforces this\n * defensively even against a mis-built trace.\n */\nexport const EmbeddingsProvider_EmbedTextsOutputSchema = z.object({\n vectors: z.array(z.array(z.number())),\n /** The concrete model that produced the vectors — the chunk rows' `embeddingModel` stamp. */\n model: z.string(),\n /** The (verified) dimension every returned vector carries — the `embeddingDims` stamp. */\n dims: z.number().int().positive(),\n usage: EmbeddingsProvider_UsageSchema,\n});\nexport type EmbeddingsProvider_EmbedTextsOutput = z.infer<typeof EmbeddingsProvider_EmbedTextsOutputSchema>;\n\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-storage.standard-interface.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"file-storage.standard-interface.d.ts","sourceRoot":"","sources":["../../../../src/protocols/file-storage.standard-interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,OAAO,KAAK,EAAE,sCAAsC,EAA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E,mCAAmC,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAChG,4DAA4D;IAC5D,MAAM,CAAC,OAAO,EAAE,mCAAmC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrE;AAED,6EAA6E"}
|
|
@@ -1 +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
|
+
{"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 +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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frontend.external-connectors-models.schemas.js","sourceRoot":"","sources":["
|
|
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 +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;CAC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