@novu/framework 2.11.1 → 2.11.2-alpha.1
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/README.md +114 -9
- package/ai-sdk/package.json +4 -0
- package/cards/package.json +4 -0
- package/dist/{esm/index-D6L0Yufw.d.ts → cjs/agent.types-Dqm2VBTO.d.cts} +410 -193
- package/dist/cjs/ai-sdk/index.cjs +1 -0
- package/dist/cjs/ai-sdk/index.d.cts +40 -0
- package/dist/cjs/cards.cjs +57 -0
- package/dist/cjs/cards.d.cts +2 -0
- package/dist/cjs/{health-check.types-D4NEyjyC.d.cts → health-check.types-B9FbzRbm.d.cts} +6 -140
- package/dist/cjs/index-1DobCKAF.d.cts +160 -0
- package/dist/cjs/index.cjs +138 -138
- package/dist/cjs/index.d.cts +5 -3
- package/dist/cjs/internal/index.cjs +1 -1
- package/dist/cjs/internal/index.d.cts +98 -4
- package/dist/cjs/jsx-dev-runtime.cjs +1 -1
- package/dist/cjs/jsx-runtime.cjs +1 -1
- package/dist/cjs/langchain/index.cjs +1 -0
- package/dist/cjs/langchain/index.d.cts +106 -0
- package/dist/cjs/servers/express.cjs +138 -138
- package/dist/cjs/servers/express.d.cts +6 -4
- package/dist/cjs/servers/h3.cjs +137 -137
- package/dist/cjs/servers/h3.d.cts +6 -4
- package/dist/cjs/servers/lambda.cjs +137 -137
- package/dist/cjs/servers/lambda.d.cts +6 -5
- package/dist/cjs/servers/nest.cjs +138 -138
- package/dist/cjs/servers/nest.d.cts +21 -7
- package/dist/cjs/servers/next.cjs +137 -137
- package/dist/cjs/servers/next.d.cts +6 -4
- package/dist/cjs/servers/nuxt.cjs +137 -137
- package/dist/cjs/servers/nuxt.d.cts +6 -4
- package/dist/cjs/servers/remix.cjs +137 -137
- package/dist/cjs/servers/remix.d.cts +6 -4
- package/dist/cjs/servers/sveltekit.cjs +137 -137
- package/dist/cjs/servers/sveltekit.d.cts +6 -4
- package/dist/cjs/step-resolver.cjs +1 -1
- package/dist/cjs/step-resolver.d.cts +3 -2
- package/dist/cjs/{subscriber.types-PRaHFLJu.d.cts → subscriber.types-DubxcL8q.d.cts} +18 -78
- package/dist/cjs/util.types-DaFfsxgy.d.cts +78 -0
- package/dist/cjs/validators.cjs +1 -1
- package/dist/{cjs/index-BNiIiOE-.d.cts → esm/agent.types-E3sxq6xr.d.ts} +410 -193
- package/dist/esm/ai-sdk/index.d.ts +40 -0
- package/dist/esm/ai-sdk/index.js +1 -0
- package/dist/esm/cards.d.ts +2 -0
- package/dist/esm/cards.js +1 -0
- package/dist/esm/{chunk-DKQLYSZS.js → chunk-22DBAEUX.js} +1 -1
- package/dist/esm/{chunk-KLCBNFAF.js → chunk-3XT6S7TZ.js} +14 -14
- package/dist/esm/chunk-3ZWME5KT.js +0 -0
- package/dist/esm/chunk-C3P3ZH2I.js +36 -0
- package/dist/esm/{chunk-QTWEINJ4.js → chunk-CANJPWLT.js} +1 -1
- package/dist/esm/chunk-E2MET7IR.js +1 -0
- package/dist/esm/chunk-FHYMHX3T.js +1 -0
- package/dist/esm/chunk-Q6BV36LU.js +98 -0
- package/dist/esm/chunk-W6DIBD4Z.js +1 -0
- package/dist/esm/{health-check.types-C-81VaBO.d.ts → health-check.types-BNocZ4Wk.d.ts} +6 -140
- package/dist/esm/index-aVljLqR4.d.ts +160 -0
- package/dist/esm/index.d.ts +5 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/internal/index.d.ts +98 -4
- package/dist/esm/internal/index.js +1 -1
- package/dist/esm/jsx-dev-runtime.js +1 -1
- package/dist/esm/jsx-runtime-7EPQR56T.js +1 -0
- package/dist/esm/jsx-runtime.js +1 -1
- package/dist/esm/langchain/index.d.ts +106 -0
- package/dist/esm/langchain/index.js +1 -0
- package/dist/esm/servers/express.d.ts +6 -4
- package/dist/esm/servers/express.js +1 -1
- package/dist/esm/servers/h3.d.ts +6 -4
- package/dist/esm/servers/h3.js +1 -1
- package/dist/esm/servers/lambda.d.ts +6 -5
- package/dist/esm/servers/lambda.js +1 -1
- package/dist/esm/servers/nest.d.ts +21 -7
- package/dist/esm/servers/nest.js +1 -1
- package/dist/esm/servers/next.d.ts +6 -4
- package/dist/esm/servers/next.js +1 -1
- package/dist/esm/servers/nuxt.d.ts +6 -4
- package/dist/esm/servers/nuxt.js +1 -1
- package/dist/esm/servers/remix.d.ts +6 -4
- package/dist/esm/servers/remix.js +1 -1
- package/dist/esm/servers/sveltekit.d.ts +6 -4
- package/dist/esm/servers/sveltekit.js +1 -1
- package/dist/esm/step-resolver.d.ts +3 -2
- package/dist/esm/step-resolver.js +1 -1
- package/dist/esm/{subscriber.types-CC7F0JO_.d.ts → subscriber.types-CmybpXhA.d.ts} +18 -78
- package/dist/esm/util.types-DaFfsxgy.d.ts +78 -0
- package/dist/esm/validators.js +1 -1
- package/package.json +56 -8
- package/dist/esm/chunk-52LSX2V5.js +0 -1
- package/dist/esm/chunk-N4PZBM53.js +0 -1
- package/dist/esm/chunk-ND6IQFTA.js +0 -133
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { RequestEvent } from '@sveltejs/kit';
|
|
2
|
-
import { S as ServeHandlerOptions } from '../index-
|
|
3
|
-
export {
|
|
4
|
-
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-
|
|
5
|
-
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-
|
|
2
|
+
import { S as ServeHandlerOptions } from '../index-1DobCKAF.cjs';
|
|
3
|
+
export { C as Client, N as NovuRequestHandler, a as agent, w as workflow } from '../index-1DobCKAF.cjs';
|
|
4
|
+
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-B9FbzRbm.cjs';
|
|
5
|
+
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-DubxcL8q.cjs';
|
|
6
6
|
import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.cjs';
|
|
7
7
|
export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
|
|
8
|
+
export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentContext, e as AgentConversation, f as AgentDeliveryError, g as AgentError, h as AgentHandlerContext, i as AgentHandlers, j as AgentHistoryEntry, k as AgentMessage, l as AgentMessageAuthor, m as AgentMessageContext, n as AgentPlatformContext, o as AgentReaction, p as AgentReactionContext, q as AgentResolveContext, r as AgentSubscriber, s as AgentToolCall, F as FileRef, M as MessageContent, R as ReplyHandle, T as ToolApprovalCard, t as ToolApprovalConfig, u as ToolApprovalDecision, v as toAgentError } from '../agent.types-Dqm2VBTO.cjs';
|
|
8
9
|
export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.cjs';
|
|
10
|
+
import '../util.types-DaFfsxgy.cjs';
|
|
9
11
|
import '../base.schema.types-BApIn9jr.cjs';
|
|
10
12
|
import 'json-schema-to-ts';
|
|
11
13
|
import 'zod';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var l=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var W=Object.prototype.hasOwnProperty;var G=(n,i)=>{for(var e in i)l(n,e,{get:i[e],enumerable:!0})},X=(n,i,e,d)=>{if(i&&typeof i=="object"||typeof i=="function")for(let a of _(i))!W.call(n,a)&&a!==e&&l(n,a,{get:()=>i[a],enumerable:!(d=B(i,a))||d.enumerable});return n};var K=n=>X(l({},"__esModule",{value:!0}),n);var Je={};G(Je,{actionStepSchemas:()=>U,channelStepSchemas:()=>H,providerSchemas:()=>I,step:()=>c});module.exports=K(Je);function V(n,i,e){return{type:"email",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function Y(n,i,e){return{type:"sms",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function $(n,i,e){return{type:"chat",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function Q(n,i,e){return{type:"push",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function Z(n,i,e){return{type:"in_app",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function ee(n,i,e){return{type:"delay",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip}}function te(n,i,e){return{type:"digest",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip}}function ie(n,i,e){return{type:"throttle",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip}}var c={email:V,sms:Y,chat:$,push:Q,inApp:Z,delay:ee,digest:te,throttle:ie};var t={output:{type:"object",properties:{},required:[],additionalProperties:!0}};var ne={type:"object",properties:{webhookUrl:{type:"string",format:"uri"},text:{type:"string"},blocks:{type:"array",items:{type:"object",properties:{type:{enum:["image","context","actions","divider","section","input","file","header","video","rich_text"]}},required:["type"],additionalProperties:!0}}},additionalProperties:!0},p={output:ne};var h={"chat-webhook":t,discord:t,getstream:t,"grafana-on-call":t,mattermost:t,msteams:t,"rocket-chat":t,ryver:t,slack:p,"whatsapp-business":t,zulip:t,telegram:t};var se={type:"object",properties:{to:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:'Email address of the recipient(s). Example: "Bob bob@host.com". You can use commas to separate multiple recipients (e.g.: "test@example.com,test@example.com" or ["test@example.com", "test@example.com"]).'},from:{type:"string"},subject:{type:"string",description:"Subject of the message."},text:{type:"string",description:"Text version of the message."},html:{type:"string",description:"HTML version of the message."},message:{type:"string",description:"MIME string of the message. Make sure to use multipart/form-data to send this as a file upload."},cc:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Same as To but for carbon copy"},bcc:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Same as To but for blind carbon copy"},ampHtml:{type:"string"},tVersion:{type:"string"},tText:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},oTag:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Tag string. See Tagging for more information."},oDkim:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Enables/disabled DKIM signatures on per-message basis. Pass yes or no"},oDeliverytime:{type:"string",description:"Desired time of delivery. See Date Format. Note: Messages can be scheduled for a maximum of 3 days in the future."},oDeliverytimeOptimizePeriod:{type:"string"},oTimeZoneLocalize:{type:"string"},oTestmode:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Enables sending in test mode. Pass yes if needed. See Sending in Test Mode"},oTracking:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Toggles tracking on a per-message basis, see Tracking Messages for details. Pass yes or no."},oTrackingClicks:{anyOf:[{type:"string",enum:["yes","no","htmlonly"]},{type:"boolean"}],description:"Toggles clicks tracking on a per-message basis. Has higher priority than domain-level setting. Pass yes, no or htmlonly."},oTrackingOpens:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Toggles opens tracking on a per-message basis. Has higher priority than domain-level setting. Pass yes or no."},oRequireTls:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},oSkipVerification:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},recipientVariables:{type:"string"}},required:[],additionalProperties:!0},m={output:se};var o={type:"object",properties:{name:{type:"string"},email:{type:"string"}},description:'JSON object, containing 2 properties: Name and Email address of a previously validated and active sender. Including the Name property in the JSON is optional. This property is not mandatory in case you use TemplateID and you specified a From address for the template. Format : { "Email":"value", "Name":"value" }.',required:["Email"],additionalProperties:!0},oe={type:"object",properties:{contentType:{type:"string"},filename:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},ae={type:"object",properties:{filename:{type:"string"},contentType:{type:"string"},contentId:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},re={type:"object",properties:{from:o,sender:o,to:{type:"array",items:o},cc:{type:"array",items:o},bcc:{type:"array",items:o},replyTo:o,subject:{type:"string"},textPart:{type:"string",description:"Content of the message, sent in Text and/or HTML format. At least one of these content types needs to be specified. When the HTML part is the only part provided, Mailjet will not generate a Text-part from the HTML version. The property can't be set when you use TemplateID"},htmlPart:{type:"string",description:"Content of the message, sent in Text and/or HTML format. At least one of these content types needs to be specified. When the HTML part is the only part provided, Mailjet will not generate a Text-part from the HTML version. The property can't be set when you use TemplateID"},templateId:{type:"number",description:"an ID for a template that is previously created and stored in Mailjet's system. It is mandatory when From and TextPart and/or HtmlPart are not provided. "},templateLanguage:{type:"boolean"},templateErrorReporting:o,templateErrorDeliver:{type:"boolean"},attachments:{type:"array",items:oe},inlineAttachments:{type:"array",items:ae},priority:{type:"number"},customCampaign:{type:"string"},deduplicateCampaign:{type:"boolean"},trackOpens:{type:"string",enum:["account_default","disabled","enabled"]},trackClicks:{type:"string",enum:["account_default","disabled","enabled"]},customId:{type:"string"},eventPayload:{type:"string"},urlTags:{type:"string"},headers:{type:"object",additionalProperties:!0},variables:{type:"object",additionalProperties:!0}},required:[],additionalProperties:!0},u={output:re};var s={type:"object",properties:{address:{type:"string"},name:{type:"string"}},additionalProperties:!0},r={type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0},le={type:"object",properties:{from:{anyOf:[{type:"string"},s]},sender:{anyOf:[{type:"string"},s]},to:{anyOf:[{type:"string"},s,{type:"array",items:s}]},cc:{anyOf:[{type:"string"},s,{type:"array",items:s}]},bcc:{anyOf:[{type:"string"},s,{type:"array",items:s}]},replyTo:{anyOf:[{type:"string"},s,{type:"array",items:s}]},inReplyTo:{anyOf:[{type:"string"},s]},references:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},subject:{type:"string"},text:{anyOf:[{type:"string"},r]},html:{anyOf:[{type:"string"},r]},watchHtml:{anyOf:[{type:"string"},r]},amp:{anyOf:[{type:"string"},{type:"object",properties:{content:{type:"string"},path:{type:"string"},href:{type:"string"},encoding:{type:"string"},contentType:{type:"string"},raw:{anyOf:[{type:"string"},r]}}}]},icalEvent:{anyOf:[{type:"string"},{type:"object",properties:{content:{type:"string"},path:{type:"string"},method:{type:"string"},filename:{anyOf:[{type:"string"},{type:"boolean"}]},href:{type:"string"},encoding:{type:"string"}}}]},headers:{anyOf:[{type:"object",additionalProperties:!0},{type:"array",items:{type:"object",additionalProperties:!0}}]},list:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},attachments:{type:"array",items:{type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0}}},required:[],additionalProperties:!0},y={output:le};var de={type:"object",properties:{},required:[],additionalProperties:!1},f={output:de};var ce={type:"object",properties:{personalizations:{type:"array",description:"An array of messages and their metadata. Each object within personalizations can be thought of as an envelope - it defines who should receive an individual message and how that message should be handled. See our [Personalizations documentation](https://sendgrid.com/docs/for-developers/sending-email/personalizations/) for examples.",uniqueItems:!1,maxItems:1e3,items:{type:"object",properties:{from:{title:"From Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account."},name:{type:"string",description:"A name or title associated with the sending email address."}},required:["email"]},to:{title:"To Email Array",type:"array",items:{type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},cc:{type:"array",description:"An array of recipients who will receive a copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.",maxItems:1e3,items:{title:"CC BCC Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},bcc:{type:"array",description:"An array of recipients who will receive a blind carbon copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.",maxItems:1e3,items:{title:"CC BCC Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},subject:{type:"string",description:"The subject of your email. See character length requirements according to [RFC 2822](http://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit#answer-1592310).",minLength:1},headers:{type:"object",description:"A collection of JSON key/value pairs allowing you to specify handling instructions for your email. You may not overwrite the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`"},substitutions:{type:"object",description:'Substitutions allow you to insert data without using Dynamic Transactional Templates. This field should **not** be used in combination with a Dynamic Transactional Template, which can be identified by a `templateId` starting with `d-`. This field is a collection of key/value pairs following the pattern "substitutionTag":"value to substitute". The key/value pairs must be strings. These substitutions will apply to the text and html content of the body of your email, in addition to the `subject` and `reply-to` parameters. The total collective size of your substitutions may not exceed 10,000 bytes per personalization object.',maxProperties:1e4},dynamicTemplateData:{type:"object",description:'Dynamic template data is available using Handlebars syntax in Dynamic Transactional Templates. This field should be used in combination with a Dynamic Transactional Template, which can be identified by a `templateId` starting with `d-`. This field is a collection of key/value pairs following the pattern "variable_name":"value to insert".'},customArgs:{type:"object",description:"Values that are specific to this personalization that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This field may not exceed 10,000 bytes.",maxProperties:1e4},sendAt:{type:"integer",description:"A unix timestamp allowing you to specify when your email should be delivered. Scheduling delivery more than 72 hours in advance is forbidden."}},required:["to"]}},from:{title:"From Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account."},name:{type:"string",description:"A name or title associated with the sending email address."}},required:["email"]},replyTo:{title:"Reply_to Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The email address where any replies or bounces will be returned."},name:{type:"string",description:"A name or title associated with the `replyTo` email address."}},required:["email"]},replyToList:{type:"array",description:"An array of recipients who will receive replies and/or bounces. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name. You can either choose to use \u201CreplyTo\u201D field or \u201CreplyToList\u201D but not both.",uniqueItems:!0,maxItems:1e3,items:{type:"object",properties:{email:{type:"string",description:"The email address where any replies or bounces will be returned.",format:"email"},name:{type:"string",description:"A name or title associated with the `replyToList` email address."}},required:["email"]}},subject:{type:"string",description:"The global or 'message level' subject of your email. This may be overridden by subject lines set in personalizations.",minLength:1},content:{type:"array",description:"An array where you can specify the content of your email. You can include multiple [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of content, but you must specify at least one MIME type. To include more than one MIME type, add another object to the array containing the `type` and `value` parameters.",items:{type:"object",properties:{type:{type:"string",description:"The MIME type of the content you are including in your email (e.g., `\u201Ctext/plain\u201D` or `\u201Ctext/html\u201D`).",minLength:1},value:{type:"string",description:"The actual content of the specified MIME type that you are including in your email.",minLength:1}},required:["type","value"]}},attachments:{type:"array",description:"An array of objects where you can specify any attachments you want to include.",items:{type:"object",properties:{content:{type:"string",description:"The Base64 encoded content of the attachment.",minLength:1},type:{type:"string",description:"The MIME type of the content you are attaching (e.g., `\u201Ctext/plain\u201D` or `\u201Ctext/html\u201D`).",minLength:1},filename:{type:"string",description:"The attachment's filename."},disposition:{type:"string",default:"attachment",description:"The attachment's content-disposition, specifying how you would like the attachment to be displayed. For example, `\u201Cinline\u201D` results in the attached file are displayed automatically within the message while `\u201Cattachment\u201D` results in the attached file require some action to be taken before it is displayed, such as opening or downloading the file.",enum:["inline","attachment"]},contentId:{type:"string",description:"The attachment's content ID. This is used when the disposition is set to `\u201Cinline\u201D` and the attachment is an image, allowing the file to be displayed within the body of your email."}},required:["content","filename"]}},templateId:{type:"string",description:"An email template ID. A template that contains a subject and content \u2014 either text or html \u2014 will override any subject and content values specified at the personalizations or message level."},headers:{description:"An object containing key/value pairs of header names and the value to substitute for them. The key/value pairs must be strings. You must ensure these are properly encoded if they contain unicode characters. These headers cannot be one of the reserved headers.",type:"object"},categories:{type:"array",description:"An array of category names for this message. Each category name may not exceed 255 characters. ",uniqueItems:!0,maxItems:10,items:{type:"string",maxLength:255}},customArgs:{description:"Values that are specific to the entire send that will be carried along with the email and its activity data. Key/value pairs must be strings. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This parameter is overridden by `customArgs` set at the personalizations level. Total `customArgs` size may not exceed 10,000 bytes.",type:"string"},sendAt:{type:"integer",description:"A unix timestamp allowing you to specify when you want your email to be delivered. This may be overridden by the `sendAt` parameter set at the personalizations level. Delivery cannot be scheduled more than 72 hours in advance. If you have the flexibility, it's better to schedule mail for off-peak times. Most emails are scheduled and sent at the top of the hour or half hour. Scheduling email to avoid peak times \u2014 for example, scheduling at 10:53 \u2014 can result in lower deferral rates due to the reduced traffic during off-peak times."},batchId:{type:"string",description:"An ID representing a batch of emails to be sent at the same time. Including a `batchId` in your request allows you include this email in that batch. It also enables you to cancel or pause the delivery of that batch. For more information, see the [Cancel Scheduled Sends API](https://sendgrid.com/docs/api-reference/)."},asm:{type:"object",description:"An object allowing you to specify how to handle unsubscribes.",properties:{groupId:{type:"integer",description:"The unsubscribe group to associate with this email."},groupsToDisplay:{type:"array",description:"An array containing the unsubscribe groups that you would like to be displayed on the unsubscribe preferences page.",maxItems:25,items:{type:"integer"}}},required:["groupId"]},ipPoolName:{type:"string",description:"The IP Pool that you would like to send this email from.",minLength:2,maxLength:64},mailSettings:{type:"object",description:"A collection of different mail settings that you can use to specify how you would like this email to be handled.",properties:{bypassListManagement:{type:"object",description:"Allows you to bypass all unsubscribe groups and suppressions to ensure that the email is delivered to every single recipient. This should only be used in emergencies when it is absolutely necessary that every recipient receives your email. This filter cannot be combined with any other bypass filters. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassSpamManagement:{type:"object",description:"Allows you to bypass the spam report list to ensure that the email is delivered to recipients. Bounce and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassBounceManagement:{type:"object",description:"Allows you to bypass the bounce list to ensure that the email is delivered to recipients. Spam report and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassUnsubscribeManagement:{type:"object",description:"Allows you to bypass the global unsubscribe list to ensure that the email is delivered to recipients. Bounce and spam report lists will still be checked; addresses on these other lists will not receive the message. This filter applies only to global unsubscribes and will not bypass group unsubscribes. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},footer:{type:"object",description:"The default footer that you would like included on every email.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},text:{type:"string",description:"The plain text content of your footer."},html:{type:"string",description:"The HTML content of your footer."}}},sandboxMode:{type:"object",description:"Sandbox Mode allows you to send a test email to ensure that your request body is valid and formatted correctly.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}}}},trackingSettings:{type:"object",description:"Settings to determine how you would like to track the metrics of how your recipients interact with your email.",properties:{clickTracking:{type:"object",description:"Allows you to track if a recipient clicked a link in your email.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},enableText:{type:"boolean",description:"Indicates if this setting should be included in the `text/plain` portion of your email."}}},openTracking:{type:"object",description:"Allows you to track if the email was opened by including a single pixel image in the body of the content. When the pixel is loaded, Twilio SendGrid can log that the email was opened.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},substitutionTag:{type:"string",description:"Allows you to specify a substitution tag that you can insert in the body of your email at a location that you desire. This tag will be replaced by the open tracking pixel."}}},subscriptionTracking:{type:"object",description:"Allows you to insert a subscription management link at the bottom of the text and HTML bodies of your email. If you would like to specify the location of the link within your email, you may use the `substitutionTag`.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},text:{type:"string",description:"Text to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>"},html:{type:"string",description:"HTML to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>"},substitutionTag:{type:"string",description:"A tag that will be replaced with the unsubscribe URL. for example: `[unsubscribe_url]`. If this parameter is used, it will override both the `text` and `html` parameters. The URL of the link will be placed at the substitution tag\u2019s location with no additional formatting."}}},ganalytics:{type:"object",description:"Allows you to enable tracking provided by Google Analytics.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},utmSource:{type:"string",description:"Name of the referrer source. (e.g. Google, SomeDomain.com, or Marketing Email)"},utmMedium:{type:"string",description:"Name of the marketing medium. (e.g. Email)"},utmTerm:{type:"string",description:"Used to identify any paid keywords."},utmContent:{type:"string",description:"Used to differentiate your campaign from advertisements."},utmCampaign:{type:"string",description:"The name of the campaign."}}}}}},required:[],additionalProperties:!1},g={output:ce};var S={braze:t,clickatell:t,nodemailer:y,emailjs:t,"email-webhook":t,"infobip-email":t,mailersend:t,mailgun:m,mailjet:u,mailtrap:t,mandrill:t,netcore:t,"novu-email":f,outlook365:t,plunk:t,postmark:t,resend:t,sendgrid:g,sendinblue:t,ses:t,sparkpost:t};var pe={type:"object",properties:{},required:[],additionalProperties:!1},b={output:pe};var v={novu:b};var T={anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{name:{type:"string"},volume:{type:"number"},critical:{type:"number"}},required:["name","volume","critical"]}]},he={type:"object",properties:{topic:{type:"string",description:"The destination topic for the notification."},id:{type:"string",description:"A UUID to identify the notification with APNS. If an id is not supplied, APNS will generate one automatically. If an error occurs the response will contain the id. This property populates the apns-id header."},expiry:{type:"number",description:"A UNIX timestamp when the notification should expire. If the notification cannot be delivered to the device, APNS will retry until it expires. An expiry of 0 indicates that the notification expires immediately, therefore no retries will be attempted."},priority:{type:"number",description:`Provide one of the following values:
|
|
1
|
+
"use strict";var l=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var W=Object.prototype.hasOwnProperty;var G=(n,i)=>{for(var e in i)l(n,e,{get:i[e],enumerable:!0})},X=(n,i,e,d)=>{if(i&&typeof i=="object"||typeof i=="function")for(let a of _(i))!W.call(n,a)&&a!==e&&l(n,a,{get:()=>i[a],enumerable:!(d=B(i,a))||d.enumerable});return n};var K=n=>X(l({},"__esModule",{value:!0}),n);var Je={};G(Je,{actionStepSchemas:()=>U,channelStepSchemas:()=>H,providerSchemas:()=>I,step:()=>c});module.exports=K(Je);function V(n,i,e){return{type:"email",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function Y(n,i,e){return{type:"sms",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function $(n,i,e){return{type:"chat",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function Q(n,i,e){return{type:"push",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function Z(n,i,e){return{type:"in_app",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function ee(n,i,e){return{type:"delay",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip}}function te(n,i,e){return{type:"digest",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip}}function ie(n,i,e){return{type:"throttle",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip}}var c={email:V,sms:Y,chat:$,push:Q,inApp:Z,delay:ee,digest:te,throttle:ie};var t={output:{type:"object",properties:{},required:[],additionalProperties:!0}};var ne={type:"object",properties:{webhookUrl:{type:"string",format:"uri"},text:{type:"string"},blocks:{type:"array",items:{type:"object",properties:{type:{enum:["image","context","actions","divider","section","input","file","header","video","rich_text"]}},required:["type"],additionalProperties:!0}}},additionalProperties:!0},p={output:ne};var h={"chat-webhook":t,discord:t,getstream:t,"grafana-on-call":t,mattermost:t,msteams:t,"rocket-chat":t,ryver:t,sendblue:t,slack:p,"whatsapp-business":t,zulip:t,telegram:t};var se={type:"object",properties:{to:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:'Email address of the recipient(s). Example: "Bob bob@host.com". You can use commas to separate multiple recipients (e.g.: "test@example.com,test@example.com" or ["test@example.com", "test@example.com"]).'},from:{type:"string"},subject:{type:"string",description:"Subject of the message."},text:{type:"string",description:"Text version of the message."},html:{type:"string",description:"HTML version of the message."},message:{type:"string",description:"MIME string of the message. Make sure to use multipart/form-data to send this as a file upload."},cc:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Same as To but for carbon copy"},bcc:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Same as To but for blind carbon copy"},ampHtml:{type:"string"},tVersion:{type:"string"},tText:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},oTag:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Tag string. See Tagging for more information."},oDkim:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Enables/disabled DKIM signatures on per-message basis. Pass yes or no"},oDeliverytime:{type:"string",description:"Desired time of delivery. See Date Format. Note: Messages can be scheduled for a maximum of 3 days in the future."},oDeliverytimeOptimizePeriod:{type:"string"},oTimeZoneLocalize:{type:"string"},oTestmode:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Enables sending in test mode. Pass yes if needed. See Sending in Test Mode"},oTracking:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Toggles tracking on a per-message basis, see Tracking Messages for details. Pass yes or no."},oTrackingClicks:{anyOf:[{type:"string",enum:["yes","no","htmlonly"]},{type:"boolean"}],description:"Toggles clicks tracking on a per-message basis. Has higher priority than domain-level setting. Pass yes, no or htmlonly."},oTrackingOpens:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Toggles opens tracking on a per-message basis. Has higher priority than domain-level setting. Pass yes or no."},oRequireTls:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},oSkipVerification:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},recipientVariables:{type:"string"}},required:[],additionalProperties:!0},m={output:se};var o={type:"object",properties:{name:{type:"string"},email:{type:"string"}},description:'JSON object, containing 2 properties: Name and Email address of a previously validated and active sender. Including the Name property in the JSON is optional. This property is not mandatory in case you use TemplateID and you specified a From address for the template. Format : { "Email":"value", "Name":"value" }.',required:["Email"],additionalProperties:!0},oe={type:"object",properties:{contentType:{type:"string"},filename:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},ae={type:"object",properties:{filename:{type:"string"},contentType:{type:"string"},contentId:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},re={type:"object",properties:{from:o,sender:o,to:{type:"array",items:o},cc:{type:"array",items:o},bcc:{type:"array",items:o},replyTo:o,subject:{type:"string"},textPart:{type:"string",description:"Content of the message, sent in Text and/or HTML format. At least one of these content types needs to be specified. When the HTML part is the only part provided, Mailjet will not generate a Text-part from the HTML version. The property can't be set when you use TemplateID"},htmlPart:{type:"string",description:"Content of the message, sent in Text and/or HTML format. At least one of these content types needs to be specified. When the HTML part is the only part provided, Mailjet will not generate a Text-part from the HTML version. The property can't be set when you use TemplateID"},templateId:{type:"number",description:"an ID for a template that is previously created and stored in Mailjet's system. It is mandatory when From and TextPart and/or HtmlPart are not provided. "},templateLanguage:{type:"boolean"},templateErrorReporting:o,templateErrorDeliver:{type:"boolean"},attachments:{type:"array",items:oe},inlineAttachments:{type:"array",items:ae},priority:{type:"number"},customCampaign:{type:"string"},deduplicateCampaign:{type:"boolean"},trackOpens:{type:"string",enum:["account_default","disabled","enabled"]},trackClicks:{type:"string",enum:["account_default","disabled","enabled"]},customId:{type:"string"},eventPayload:{type:"string"},urlTags:{type:"string"},headers:{type:"object",additionalProperties:!0},variables:{type:"object",additionalProperties:!0}},required:[],additionalProperties:!0},u={output:re};var s={type:"object",properties:{address:{type:"string"},name:{type:"string"}},additionalProperties:!0},r={type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0},le={type:"object",properties:{from:{anyOf:[{type:"string"},s]},sender:{anyOf:[{type:"string"},s]},to:{anyOf:[{type:"string"},s,{type:"array",items:s}]},cc:{anyOf:[{type:"string"},s,{type:"array",items:s}]},bcc:{anyOf:[{type:"string"},s,{type:"array",items:s}]},replyTo:{anyOf:[{type:"string"},s,{type:"array",items:s}]},inReplyTo:{anyOf:[{type:"string"},s]},references:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},subject:{type:"string"},text:{anyOf:[{type:"string"},r]},html:{anyOf:[{type:"string"},r]},watchHtml:{anyOf:[{type:"string"},r]},amp:{anyOf:[{type:"string"},{type:"object",properties:{content:{type:"string"},path:{type:"string"},href:{type:"string"},encoding:{type:"string"},contentType:{type:"string"},raw:{anyOf:[{type:"string"},r]}}}]},icalEvent:{anyOf:[{type:"string"},{type:"object",properties:{content:{type:"string"},path:{type:"string"},method:{type:"string"},filename:{anyOf:[{type:"string"},{type:"boolean"}]},href:{type:"string"},encoding:{type:"string"}}}]},headers:{anyOf:[{type:"object",additionalProperties:!0},{type:"array",items:{type:"object",additionalProperties:!0}}]},list:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},attachments:{type:"array",items:{type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0}}},required:[],additionalProperties:!0},y={output:le};var de={type:"object",properties:{},required:[],additionalProperties:!1},f={output:de};var ce={type:"object",properties:{personalizations:{type:"array",description:"An array of messages and their metadata. Each object within personalizations can be thought of as an envelope - it defines who should receive an individual message and how that message should be handled. See our [Personalizations documentation](https://sendgrid.com/docs/for-developers/sending-email/personalizations/) for examples.",uniqueItems:!1,maxItems:1e3,items:{type:"object",properties:{from:{title:"From Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account."},name:{type:"string",description:"A name or title associated with the sending email address."}},required:["email"]},to:{title:"To Email Array",type:"array",items:{type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},cc:{type:"array",description:"An array of recipients who will receive a copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.",maxItems:1e3,items:{title:"CC BCC Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},bcc:{type:"array",description:"An array of recipients who will receive a blind carbon copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.",maxItems:1e3,items:{title:"CC BCC Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},subject:{type:"string",description:"The subject of your email. See character length requirements according to [RFC 2822](http://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit#answer-1592310).",minLength:1},headers:{type:"object",description:"A collection of JSON key/value pairs allowing you to specify handling instructions for your email. You may not overwrite the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`"},substitutions:{type:"object",description:'Substitutions allow you to insert data without using Dynamic Transactional Templates. This field should **not** be used in combination with a Dynamic Transactional Template, which can be identified by a `templateId` starting with `d-`. This field is a collection of key/value pairs following the pattern "substitutionTag":"value to substitute". The key/value pairs must be strings. These substitutions will apply to the text and html content of the body of your email, in addition to the `subject` and `reply-to` parameters. The total collective size of your substitutions may not exceed 10,000 bytes per personalization object.',maxProperties:1e4},dynamicTemplateData:{type:"object",description:'Dynamic template data is available using Handlebars syntax in Dynamic Transactional Templates. This field should be used in combination with a Dynamic Transactional Template, which can be identified by a `templateId` starting with `d-`. This field is a collection of key/value pairs following the pattern "variable_name":"value to insert".'},customArgs:{type:"object",description:"Values that are specific to this personalization that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This field may not exceed 10,000 bytes.",maxProperties:1e4},sendAt:{type:"integer",description:"A unix timestamp allowing you to specify when your email should be delivered. Scheduling delivery more than 72 hours in advance is forbidden."}},required:["to"]}},from:{title:"From Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account."},name:{type:"string",description:"A name or title associated with the sending email address."}},required:["email"]},replyTo:{title:"Reply_to Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The email address where any replies or bounces will be returned."},name:{type:"string",description:"A name or title associated with the `replyTo` email address."}},required:["email"]},replyToList:{type:"array",description:"An array of recipients who will receive replies and/or bounces. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name. You can either choose to use \u201CreplyTo\u201D field or \u201CreplyToList\u201D but not both.",uniqueItems:!0,maxItems:1e3,items:{type:"object",properties:{email:{type:"string",description:"The email address where any replies or bounces will be returned.",format:"email"},name:{type:"string",description:"A name or title associated with the `replyToList` email address."}},required:["email"]}},subject:{type:"string",description:"The global or 'message level' subject of your email. This may be overridden by subject lines set in personalizations.",minLength:1},content:{type:"array",description:"An array where you can specify the content of your email. You can include multiple [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of content, but you must specify at least one MIME type. To include more than one MIME type, add another object to the array containing the `type` and `value` parameters.",items:{type:"object",properties:{type:{type:"string",description:"The MIME type of the content you are including in your email (e.g., `\u201Ctext/plain\u201D` or `\u201Ctext/html\u201D`).",minLength:1},value:{type:"string",description:"The actual content of the specified MIME type that you are including in your email.",minLength:1}},required:["type","value"]}},attachments:{type:"array",description:"An array of objects where you can specify any attachments you want to include.",items:{type:"object",properties:{content:{type:"string",description:"The Base64 encoded content of the attachment.",minLength:1},type:{type:"string",description:"The MIME type of the content you are attaching (e.g., `\u201Ctext/plain\u201D` or `\u201Ctext/html\u201D`).",minLength:1},filename:{type:"string",description:"The attachment's filename."},disposition:{type:"string",default:"attachment",description:"The attachment's content-disposition, specifying how you would like the attachment to be displayed. For example, `\u201Cinline\u201D` results in the attached file are displayed automatically within the message while `\u201Cattachment\u201D` results in the attached file require some action to be taken before it is displayed, such as opening or downloading the file.",enum:["inline","attachment"]},contentId:{type:"string",description:"The attachment's content ID. This is used when the disposition is set to `\u201Cinline\u201D` and the attachment is an image, allowing the file to be displayed within the body of your email."}},required:["content","filename"]}},templateId:{type:"string",description:"An email template ID. A template that contains a subject and content \u2014 either text or html \u2014 will override any subject and content values specified at the personalizations or message level."},headers:{description:"An object containing key/value pairs of header names and the value to substitute for them. The key/value pairs must be strings. You must ensure these are properly encoded if they contain unicode characters. These headers cannot be one of the reserved headers.",type:"object"},categories:{type:"array",description:"An array of category names for this message. Each category name may not exceed 255 characters. ",uniqueItems:!0,maxItems:10,items:{type:"string",maxLength:255}},customArgs:{description:"Values that are specific to the entire send that will be carried along with the email and its activity data. Key/value pairs must be strings. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This parameter is overridden by `customArgs` set at the personalizations level. Total `customArgs` size may not exceed 10,000 bytes.",type:"string"},sendAt:{type:"integer",description:"A unix timestamp allowing you to specify when you want your email to be delivered. This may be overridden by the `sendAt` parameter set at the personalizations level. Delivery cannot be scheduled more than 72 hours in advance. If you have the flexibility, it's better to schedule mail for off-peak times. Most emails are scheduled and sent at the top of the hour or half hour. Scheduling email to avoid peak times \u2014 for example, scheduling at 10:53 \u2014 can result in lower deferral rates due to the reduced traffic during off-peak times."},batchId:{type:"string",description:"An ID representing a batch of emails to be sent at the same time. Including a `batchId` in your request allows you include this email in that batch. It also enables you to cancel or pause the delivery of that batch. For more information, see the [Cancel Scheduled Sends API](https://sendgrid.com/docs/api-reference/)."},asm:{type:"object",description:"An object allowing you to specify how to handle unsubscribes.",properties:{groupId:{type:"integer",description:"The unsubscribe group to associate with this email."},groupsToDisplay:{type:"array",description:"An array containing the unsubscribe groups that you would like to be displayed on the unsubscribe preferences page.",maxItems:25,items:{type:"integer"}}},required:["groupId"]},ipPoolName:{type:"string",description:"The IP Pool that you would like to send this email from.",minLength:2,maxLength:64},mailSettings:{type:"object",description:"A collection of different mail settings that you can use to specify how you would like this email to be handled.",properties:{bypassListManagement:{type:"object",description:"Allows you to bypass all unsubscribe groups and suppressions to ensure that the email is delivered to every single recipient. This should only be used in emergencies when it is absolutely necessary that every recipient receives your email. This filter cannot be combined with any other bypass filters. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassSpamManagement:{type:"object",description:"Allows you to bypass the spam report list to ensure that the email is delivered to recipients. Bounce and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassBounceManagement:{type:"object",description:"Allows you to bypass the bounce list to ensure that the email is delivered to recipients. Spam report and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassUnsubscribeManagement:{type:"object",description:"Allows you to bypass the global unsubscribe list to ensure that the email is delivered to recipients. Bounce and spam report lists will still be checked; addresses on these other lists will not receive the message. This filter applies only to global unsubscribes and will not bypass group unsubscribes. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},footer:{type:"object",description:"The default footer that you would like included on every email.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},text:{type:"string",description:"The plain text content of your footer."},html:{type:"string",description:"The HTML content of your footer."}}},sandboxMode:{type:"object",description:"Sandbox Mode allows you to send a test email to ensure that your request body is valid and formatted correctly.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}}}},trackingSettings:{type:"object",description:"Settings to determine how you would like to track the metrics of how your recipients interact with your email.",properties:{clickTracking:{type:"object",description:"Allows you to track if a recipient clicked a link in your email.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},enableText:{type:"boolean",description:"Indicates if this setting should be included in the `text/plain` portion of your email."}}},openTracking:{type:"object",description:"Allows you to track if the email was opened by including a single pixel image in the body of the content. When the pixel is loaded, Twilio SendGrid can log that the email was opened.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},substitutionTag:{type:"string",description:"Allows you to specify a substitution tag that you can insert in the body of your email at a location that you desire. This tag will be replaced by the open tracking pixel."}}},subscriptionTracking:{type:"object",description:"Allows you to insert a subscription management link at the bottom of the text and HTML bodies of your email. If you would like to specify the location of the link within your email, you may use the `substitutionTag`.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},text:{type:"string",description:"Text to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>"},html:{type:"string",description:"HTML to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>"},substitutionTag:{type:"string",description:"A tag that will be replaced with the unsubscribe URL. for example: `[unsubscribe_url]`. If this parameter is used, it will override both the `text` and `html` parameters. The URL of the link will be placed at the substitution tag\u2019s location with no additional formatting."}}},ganalytics:{type:"object",description:"Allows you to enable tracking provided by Google Analytics.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},utmSource:{type:"string",description:"Name of the referrer source. (e.g. Google, SomeDomain.com, or Marketing Email)"},utmMedium:{type:"string",description:"Name of the marketing medium. (e.g. Email)"},utmTerm:{type:"string",description:"Used to identify any paid keywords."},utmContent:{type:"string",description:"Used to differentiate your campaign from advertisements."},utmCampaign:{type:"string",description:"The name of the campaign."}}}}}},required:[],additionalProperties:!1},g={output:ce};var S={anypost:t,braze:t,clickatell:t,nodemailer:y,emailjs:t,"email-webhook":t,"infobip-email":t,mailersend:t,mailgun:m,mailjet:u,mailtrap:t,mandrill:t,netcore:t,"novu-email":f,outlook365:t,plunk:t,postmark:t,resend:t,sendgrid:g,sendinblue:t,ses:t,sparkpost:t};var pe={type:"object",properties:{},required:[],additionalProperties:!1},b={output:pe};var v={novu:b};var T={anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{name:{type:"string"},volume:{type:"number"},critical:{type:"number"}},required:["name","volume","critical"]}]},he={type:"object",properties:{topic:{type:"string",description:"The destination topic for the notification."},id:{type:"string",description:"A UUID to identify the notification with APNS. If an id is not supplied, APNS will generate one automatically. If an error occurs the response will contain the id. This property populates the apns-id header."},expiry:{type:"number",description:"A UNIX timestamp when the notification should expire. If the notification cannot be delivered to the device, APNS will retry until it expires. An expiry of 0 indicates that the notification expires immediately, therefore no retries will be attempted."},priority:{type:"number",description:`Provide one of the following values:
|
|
2
2
|
|
|
3
3
|
10 - The push notification is sent to the device immediately. (Default)
|
|
4
4
|
The push notification must trigger an alert, sound, or badge on the device. It is an error to use this priority for a push notification that contains only the content-available key.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { S as Subscriber, C as ContextResolved, E as EnvironmentSystemVariables,
|
|
2
|
-
export {
|
|
1
|
+
import { S as Subscriber, C as ContextResolved, E as EnvironmentSystemVariables, G as EmailOutputUnvalidated, p as providerSchemas, W as WithPassthrough, R as SmsOutputUnvalidated, h as ChatOutputUnvalidated, M as PushOutputUnvalidated, J as InAppOutputUnvalidated, n as DelayOutputUnvalidated, v as DigestOutputUnvalidated, Y as ThrottleOutputUnvalidated } from './subscriber.types-DubxcL8q.cjs';
|
|
2
|
+
export { _ as actionStepSchemas, $ as channelStepSchemas } from './subscriber.types-DubxcL8q.cjs';
|
|
3
|
+
import { A as Awaitable } from './util.types-DaFfsxgy.cjs';
|
|
3
4
|
import { S as Schema, a as FromSchema } from './base.schema.types-BApIn9jr.cjs';
|
|
4
5
|
import 'json-schema-to-ts';
|
|
5
6
|
import 'zod';
|
|
@@ -1,81 +1,5 @@
|
|
|
1
1
|
import { F as FromSchemaUnvalidated, S as Schema, a as FromSchema } from './base.schema.types-BApIn9jr.cjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A type that represents either `A` or `B`. Shared properties retain their
|
|
5
|
-
* types and unique properties are marked as optional.
|
|
6
|
-
*/
|
|
7
|
-
type Either<A, B> = Partial<A> & Partial<B> & (A | B);
|
|
8
|
-
/**
|
|
9
|
-
* A type that represents a value that may be a promise or a regular value.
|
|
10
|
-
*/
|
|
11
|
-
type Awaitable<T> = T | Promise<T>;
|
|
12
|
-
/**
|
|
13
|
-
* A type that represents a type that is a prettified version of the original type.
|
|
14
|
-
* The prettified type has all generics removed from intellisense and displays a flat object.
|
|
15
|
-
*/
|
|
16
|
-
type Prettify<T> = {
|
|
17
|
-
[K in keyof T]: T[K];
|
|
18
|
-
} & {};
|
|
19
|
-
/**
|
|
20
|
-
* Mark properties of T as optional if Condition is true
|
|
21
|
-
*/
|
|
22
|
-
type ConditionalPartial<T extends Obj, Condition extends boolean> = Condition extends true ? Partial<T> : T;
|
|
23
|
-
/**
|
|
24
|
-
* Same as Nullable except without `null`.
|
|
25
|
-
*/
|
|
26
|
-
type Optional<T> = T | undefined;
|
|
27
|
-
/**
|
|
28
|
-
* Types that can be used to index native JavaScript types, (Object, Array, etc.).
|
|
29
|
-
*/
|
|
30
|
-
type IndexSignature = string | number | symbol;
|
|
31
|
-
/**
|
|
32
|
-
* An object of any index-able type to avoid conflicts between `{}`, `Record`, `object`, etc.
|
|
33
|
-
*/
|
|
34
|
-
type Obj<O extends Record<IndexSignature, unknown> | object = Record<IndexSignature, unknown> | object> = {
|
|
35
|
-
[K in keyof O as K extends never ? never : K]: K extends never ? never : O[K] extends never ? never : O[K];
|
|
36
|
-
} & Omit<O, never>;
|
|
37
|
-
/**
|
|
38
|
-
* Any type that is indexable using `string`, `number`, or `symbol`.
|
|
39
|
-
*/
|
|
40
|
-
type Indexable<ValueTypes = unknown> = {
|
|
41
|
-
[K: IndexSignature]: ValueTypes;
|
|
42
|
-
} | Obj;
|
|
43
|
-
/**
|
|
44
|
-
* Picks only the optional properties from a type, removing the required ones.
|
|
45
|
-
* Optionally, recurses through nested objects if `DEEP` is true.
|
|
46
|
-
*/
|
|
47
|
-
type PickOptional<T, DEEP extends boolean = true> = {
|
|
48
|
-
[K in keyof T as undefined extends T[K] ? K : never]: DEEP extends false ? T[K] : T[K] extends Optional<Indexable> ? PickOptional<T[K], DEEP> : T[K];
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* Picks only the required fields out of a type, removing the optional ones.
|
|
52
|
-
* Optionally, recurses through nested objects if `DEEP` is true.
|
|
53
|
-
*/
|
|
54
|
-
type PickRequired<T, DEEP extends boolean = true> = {
|
|
55
|
-
[K in keyof T as K extends keyof PickOptional<T, DEEP> ? never : K]: T[K] extends Indexable ? PickRequired<T[K], DEEP> : T[K];
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Picks only the required keys out of a type, removing the optional ones.
|
|
59
|
-
* Optionally, recurses through nested objects if `DEEP` is true.
|
|
60
|
-
*/
|
|
61
|
-
type PickRequiredKeys<T, DEEP extends boolean = true> = keyof PickRequired<T, DEEP>;
|
|
62
|
-
/**
|
|
63
|
-
* Picks only the optional keys out of a type, removing the required ones.
|
|
64
|
-
* Optionally, recurses through nested objects if `DEEP` is true.
|
|
65
|
-
*/
|
|
66
|
-
type PickOptionalKeys<T, DEEP extends boolean = true> = keyof PickOptional<T, DEEP>;
|
|
67
|
-
/**
|
|
68
|
-
* Recursively make all properties of type `T` optional.
|
|
69
|
-
*/
|
|
70
|
-
type DeepPartial<T> = T extends object ? {
|
|
71
|
-
[P in keyof T]?: DeepPartial<T[P]>;
|
|
72
|
-
} : T;
|
|
73
|
-
/**
|
|
74
|
-
* Recursively make all properties of type `T` required.
|
|
75
|
-
*/
|
|
76
|
-
type DeepRequired<T> = T extends object ? {
|
|
77
|
-
[P in keyof T]-?: DeepRequired<T[P]>;
|
|
78
|
-
} : T;
|
|
2
|
+
import { a as Prettify, A as Awaitable } from './util.types-DaFfsxgy.cjs';
|
|
79
3
|
|
|
80
4
|
type ContextType = string;
|
|
81
5
|
type ContextId = string;
|
|
@@ -255,6 +179,14 @@ declare const providerSchemas: {
|
|
|
255
179
|
readonly additionalProperties: true;
|
|
256
180
|
};
|
|
257
181
|
};
|
|
182
|
+
readonly sendblue: {
|
|
183
|
+
output: {
|
|
184
|
+
readonly type: "object";
|
|
185
|
+
readonly properties: {};
|
|
186
|
+
readonly required: readonly [];
|
|
187
|
+
readonly additionalProperties: true;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
258
190
|
readonly slack: {
|
|
259
191
|
output: {
|
|
260
192
|
readonly type: "object";
|
|
@@ -724,6 +656,14 @@ declare const providerSchemas: {
|
|
|
724
656
|
};
|
|
725
657
|
};
|
|
726
658
|
readonly email: {
|
|
659
|
+
readonly anypost: {
|
|
660
|
+
output: {
|
|
661
|
+
readonly type: "object";
|
|
662
|
+
readonly properties: {};
|
|
663
|
+
readonly required: readonly [];
|
|
664
|
+
readonly additionalProperties: true;
|
|
665
|
+
};
|
|
666
|
+
};
|
|
727
667
|
readonly braze: {
|
|
728
668
|
output: {
|
|
729
669
|
readonly type: "object";
|
|
@@ -4589,4 +4529,4 @@ type Subscriber = {
|
|
|
4589
4529
|
data?: Record<string, unknown> | null;
|
|
4590
4530
|
};
|
|
4591
4531
|
|
|
4592
|
-
export {
|
|
4532
|
+
export { channelStepSchemas as $, ActionStepEnum as A, type DigestTimedOutputUnvalidated as B, type ContextResolved as C, type DelayDynamicOutput as D, type EnvironmentSystemVariables as E, type EmailOutput as F, type EmailOutputUnvalidated as G, type EmailResult as H, type InAppOutput as I, type InAppOutputUnvalidated as J, type InAppResult as K, JobStatusEnum as L, type PushOutputUnvalidated as M, type PushResult as N, type Skip as O, type PushOutput as P, type SmsOutput as Q, type SmsOutputUnvalidated as R, type Subscriber as S, type SmsResult as T, type StepContext as U, type StepOutput as V, type WithPassthrough as W, type ThrottleOutput as X, type ThrottleOutputUnvalidated as Y, type ThrottleResult as Z, actionStepSchemas as _, type ContextPayload as a, type Step as b, ChannelStepEnum as c, type StepOptions as d, type ActionStep as e, type ChannelStep as f, type ChatOutput as g, type ChatOutputUnvalidated as h, type ChatResult as i, type ContextValue as j, type CustomStep as k, type DelayDynamicOutputUnvalidated as l, type DelayOutput as m, type DelayOutputUnvalidated as n, type DelayRegularOutput as o, providerSchemas as p, type DelayRegularOutputUnvalidated as q, type DelayResult as r, type DelayTimedOutput as s, type DelayTimedOutputUnvalidated as t, type DigestOutput as u, type DigestOutputUnvalidated as v, type DigestRegularOutput as w, type DigestRegularOutputUnvalidated as x, type DigestResult as y, type DigestTimedOutput as z };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A type that represents either `A` or `B`. Shared properties retain their
|
|
3
|
+
* types and unique properties are marked as optional.
|
|
4
|
+
*/
|
|
5
|
+
type Either<A, B> = Partial<A> & Partial<B> & (A | B);
|
|
6
|
+
/**
|
|
7
|
+
* A type that represents a value that may be a promise or a regular value.
|
|
8
|
+
*/
|
|
9
|
+
type Awaitable<T> = T | Promise<T>;
|
|
10
|
+
/**
|
|
11
|
+
* A type that represents a type that is a prettified version of the original type.
|
|
12
|
+
* The prettified type has all generics removed from intellisense and displays a flat object.
|
|
13
|
+
*/
|
|
14
|
+
type Prettify<T> = {
|
|
15
|
+
[K in keyof T]: T[K];
|
|
16
|
+
} & {};
|
|
17
|
+
/**
|
|
18
|
+
* Mark properties of T as optional if Condition is true
|
|
19
|
+
*/
|
|
20
|
+
type ConditionalPartial<T extends Obj, Condition extends boolean> = Condition extends true ? Partial<T> : T;
|
|
21
|
+
/**
|
|
22
|
+
* Same as Nullable except without `null`.
|
|
23
|
+
*/
|
|
24
|
+
type Optional<T> = T | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Types that can be used to index native JavaScript types, (Object, Array, etc.).
|
|
27
|
+
*/
|
|
28
|
+
type IndexSignature = string | number | symbol;
|
|
29
|
+
/**
|
|
30
|
+
* An object of any index-able type to avoid conflicts between `{}`, `Record`, `object`, etc.
|
|
31
|
+
*/
|
|
32
|
+
type Obj<O extends Record<IndexSignature, unknown> | object = Record<IndexSignature, unknown> | object> = {
|
|
33
|
+
[K in keyof O as K extends never ? never : K]: K extends never ? never : O[K] extends never ? never : O[K];
|
|
34
|
+
} & Omit<O, never>;
|
|
35
|
+
/**
|
|
36
|
+
* Any type that is indexable using `string`, `number`, or `symbol`.
|
|
37
|
+
*/
|
|
38
|
+
type Indexable<ValueTypes = unknown> = {
|
|
39
|
+
[K: IndexSignature]: ValueTypes;
|
|
40
|
+
} | Obj;
|
|
41
|
+
/**
|
|
42
|
+
* Picks only the optional properties from a type, removing the required ones.
|
|
43
|
+
* Optionally, recurses through nested objects if `DEEP` is true.
|
|
44
|
+
*/
|
|
45
|
+
type PickOptional<T, DEEP extends boolean = true> = {
|
|
46
|
+
[K in keyof T as undefined extends T[K] ? K : never]: DEEP extends false ? T[K] : T[K] extends Optional<Indexable> ? PickOptional<T[K], DEEP> : T[K];
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Picks only the required fields out of a type, removing the optional ones.
|
|
50
|
+
* Optionally, recurses through nested objects if `DEEP` is true.
|
|
51
|
+
*/
|
|
52
|
+
type PickRequired<T, DEEP extends boolean = true> = {
|
|
53
|
+
[K in keyof T as K extends keyof PickOptional<T, DEEP> ? never : K]: T[K] extends Indexable ? PickRequired<T[K], DEEP> : T[K];
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Picks only the required keys out of a type, removing the optional ones.
|
|
57
|
+
* Optionally, recurses through nested objects if `DEEP` is true.
|
|
58
|
+
*/
|
|
59
|
+
type PickRequiredKeys<T, DEEP extends boolean = true> = keyof PickRequired<T, DEEP>;
|
|
60
|
+
/**
|
|
61
|
+
* Picks only the optional keys out of a type, removing the required ones.
|
|
62
|
+
* Optionally, recurses through nested objects if `DEEP` is true.
|
|
63
|
+
*/
|
|
64
|
+
type PickOptionalKeys<T, DEEP extends boolean = true> = keyof PickOptional<T, DEEP>;
|
|
65
|
+
/**
|
|
66
|
+
* Recursively make all properties of type `T` optional.
|
|
67
|
+
*/
|
|
68
|
+
type DeepPartial<T> = T extends object ? {
|
|
69
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
70
|
+
} : T;
|
|
71
|
+
/**
|
|
72
|
+
* Recursively make all properties of type `T` required.
|
|
73
|
+
*/
|
|
74
|
+
type DeepRequired<T> = T extends object ? {
|
|
75
|
+
[P in keyof T]-?: DeepRequired<T[P]>;
|
|
76
|
+
} : T;
|
|
77
|
+
|
|
78
|
+
export type { Awaitable as A, ConditionalPartial as C, DeepPartial as D, Either as E, Indexable as I, PickRequiredKeys as P, Prettify as a, DeepRequired as b, PickOptional as c, PickOptionalKeys as d, PickRequired as e };
|
package/dist/cjs/validators.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var m=Object.create;var
|
|
1
|
+
"use strict";var m=Object.create;var r=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var s=Object.getPrototypeOf,t=Object.prototype.hasOwnProperty;var y=(e,_)=>{for(var T in _)r(e,T,{get:_[T],enumerable:!0})},V=(e,_,T,R)=>{if(_&&typeof _=="object"||typeof _=="function")for(let A of L(_))!t.call(e,A)&&A!==T&&r(e,A,{get:()=>_[A],enumerable:!(R=v(_,A))||R.enumerable});return e};var c=(e,_,T)=>(T=e!=null?m(s(e)):{},V(_||!e||!e.__esModule?r(T,"default",{value:e,enumerable:!0}):T,e)),g=e=>V(r({},"__esModule",{value:!0}),e);var W={};y(W,{transformSchema:()=>f,validateData:()=>h});module.exports=g(W);var U=c(require("ajv"),1),P=c(require("ajv-formats"),1);var S=e=>typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e));var i=(a=>(a.BRIDGE_ERROR="BridgeError",a.EXECUTION_EVENT_CONTROL_INVALID_ERROR="ExecutionEventControlInvalidError",a.EXECUTION_EVENT_PAYLOAD_INVALID_ERROR="ExecutionEventPayloadInvalidError",a.EXECUTION_PROVIDER_OUTPUT_INVALID_ERROR="ExecutionProviderOutputInvalidError",a.EXECUTION_STATE_CONTROL_INVALID_ERROR="ExecutionStateControlInvalidError",a.EXECUTION_STATE_CORRUPT_ERROR="ExecutionStateCorruptError",a.EXECUTION_STATE_OUTPUT_INVALID_ERROR="ExecutionStateOutputInvalidError",a.EXECUTION_STATE_RESULT_INVALID_ERROR="ExecutionStateResultInvalidError",a.INVALID_ACTION_ERROR="InvalidActionError",a.METHOD_NOT_ALLOWED_ERROR="MethodNotAllowedError",a.MISSING_DEPENDENCY_ERROR="MissingDependencyError",a.MISSING_SECRET_KEY_ERROR="MissingSecretKeyError",a.PROVIDER_EXECUTION_FAILED_ERROR="ProviderExecutionFailedError",a.PROVIDER_NOT_FOUND_ERROR="ProviderNotFoundError",a.SIGNATURE_EXPIRED_ERROR="SignatureExpiredError",a.SIGNATURE_INVALID_ERROR="SignatureInvalidError",a.SIGNATURE_MISMATCH_ERROR="SignatureMismatchError",a.SIGNATURE_NOT_FOUND_ERROR="SignatureNotFoundError",a.SIGNATURE_VERSION_INVALID_ERROR="SignatureVersionInvalidError",a.SIGNING_KEY_NOT_FOUND_ERROR="SigningKeyNotFoundError",a.STEP_ALREADY_EXISTS_ERROR="StepAlreadyExistsError",a.STEP_CONTROL_COMPILATION_FAILED_ERROR="StepControlCompilationFailedError",a.STEP_EXECUTION_FAILED_ERROR="StepExecutionFailedError",a.STEP_NOT_FOUND_ERROR="StepNotFoundError",a.WORKFLOW_ALREADY_EXISTS_ERROR="WorkflowAlreadyExistsError",a.WORKFLOW_NOT_FOUND_ERROR="WorkflowNotFoundError",a.WORKFLOW_PAYLOAD_INVALID_ERROR="WorkflowPayloadInvalidError",a))(i||{});var G=e=>{var T,R;if(typeof e!="object"||e===null)return!1;let _=Object.getPrototypeOf(e);return(R=(T=_==null?void 0:_.constructor)==null?void 0:T.name.endsWith("Error"))!=null?R:!1},Y=class extends Error{};var N=class extends Y{constructor(_,{cause:T}={}){var R;G(T)?(super(`${_}: ${T.message}`),this.data={stack:(R=T.stack)!=null?R:_}):(super(`${_}${T?`: ${JSON.stringify(T,null,2)}`:""}`),this.data={stack:_})}};var o=class extends N{constructor(T,R){let A=R.length===1?"it":"them";super(`Tried to use a ${T} in @novu/framework without ${R.join(", ")} installed. Please install ${A} by running \`npm install ${R.join(" ")}\`.`);this.statusCode=500;this.code="MissingDependencyError"}};var I=async(e,_)=>{let T=new Set;if((await Promise.allSettled(e.map(A=>A.import))).forEach((A,M)=>{let O=e[M];A.status==="fulfilled"&&O.exports.every(F=>A.value[F]!==void 0)||T.add(O.name)}),T.size>0)throw new o(_,Array.from(T))};var E=class{constructor(){this.requiredImports=[];this.ajv=new U.default({useDefaults:!0,removeAdditional:"failing",strict:!1}),(0,P.default)(this.ajv),this.compiledSchemas=new Map}async canHandle(_){let T=_.type==="object"||!!_.anyOf||!!_.allOf||!!_.oneOf;return T&&await I(this.requiredImports,"JSON schema"),T}async validate(_,T){let R=this.compiledSchemas.get(T);R||(R=this.ajv.compile(T),this.compiledSchemas.set(T,R));let A=S(_);return R(A)?{success:!0,data:A}:{success:!1,errors:R.errors.map(O=>({path:O.instancePath,message:O.message}))}}async transformToJsonSchema(_){return _}};var l=class{constructor(){this.requiredImports=[{name:"zod",import:import("zod"),exports:["ZodType"]},{name:"zod-to-json-schema",import:import("zod-to-json-schema"),exports:["zodToJsonSchema"]}]}async canHandle(_){let T=_.safeParseAsync!==void 0;return T&&await I(this.requiredImports,"Zod schema"),T}async validate(_,T){let R=await T.safeParseAsync(_);return R.success?{success:!0,data:R.data}:{success:!1,errors:R.error.issues.map(A=>({path:`/${A.path.join("/")}`,message:A.message}))}}async transformToJsonSchema(_){let{zodToJsonSchema:T}=await import("zod-to-json-schema");return T(_)}};var D=new l,d=new E,h=async(e,_)=>{if(await D.canHandle(e))return D.validate(_,e);if(await d.canHandle(e))return d.validate(_,e);throw new Error("Invalid schema")},f=async e=>{if(await D.canHandle(e))return D.transformToJsonSchema(e);if(await d.canHandle(e))return d.transformToJsonSchema(e);throw new Error("Invalid schema")};0&&(module.exports={transformSchema,validateData});
|