@novu/framework 2.10.1-alpha.6 → 2.11.0
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/cjs/{health-check.types-S8oS3AQZ.d.cts → health-check.types-uaDLF5bo.d.cts} +3 -2
- package/dist/cjs/{index-BAY1Gj4h.d.cts → index-D-SLxj--.d.cts} +55 -27
- package/dist/cjs/index.cjs +82 -82
- package/dist/cjs/index.d.cts +3 -3
- package/dist/cjs/internal/index.cjs +1 -1
- package/dist/cjs/internal/index.d.cts +3 -3
- package/dist/cjs/jsx-dev-runtime.cjs +1 -1
- package/dist/cjs/jsx-runtime.cjs +1 -1
- package/dist/cjs/servers/express.cjs +90 -90
- package/dist/cjs/servers/express.d.cts +4 -4
- package/dist/cjs/servers/h3.cjs +86 -86
- package/dist/cjs/servers/h3.d.cts +4 -4
- package/dist/cjs/servers/lambda.cjs +86 -86
- package/dist/cjs/servers/lambda.d.cts +5 -5
- package/dist/cjs/servers/nest.cjs +90 -90
- package/dist/cjs/servers/nest.d.cts +6 -6
- package/dist/cjs/servers/next.cjs +86 -86
- package/dist/cjs/servers/next.d.cts +4 -4
- package/dist/cjs/servers/nuxt.cjs +86 -86
- package/dist/cjs/servers/nuxt.d.cts +4 -4
- package/dist/cjs/servers/remix.cjs +86 -86
- package/dist/cjs/servers/remix.d.cts +4 -4
- package/dist/cjs/servers/sveltekit.cjs +86 -86
- package/dist/cjs/servers/sveltekit.d.cts +4 -4
- package/dist/cjs/step-resolver.cjs +1 -1
- package/dist/cjs/step-resolver.d.cts +2 -2
- package/dist/cjs/{subscriber.types-DgRgSKMw.d.cts → subscriber.types-PRaHFLJu.d.cts} +8 -0
- package/dist/esm/{chunk-U3IL7QCI.js → chunk-DKQLYSZS.js} +1 -1
- package/dist/esm/chunk-FRWG7YTE.js +1 -0
- package/dist/esm/{chunk-T2VIX2ZH.js → chunk-K7PM3FEJ.js} +11 -11
- package/dist/esm/chunk-LJUUDK2J.js +130 -0
- package/dist/esm/{chunk-6GCCKYZC.js → chunk-N4PZBM53.js} +1 -1
- package/dist/esm/{chunk-CBLKARLC.js → chunk-QTWEINJ4.js} +1 -1
- package/dist/esm/{health-check.types-C5lg4csi.d.ts → health-check.types-XZwesagD.d.ts} +3 -2
- package/dist/esm/{index-DiFdSsia.d.ts → index-dylq0Kmx.d.ts} +55 -27
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/internal/index.d.ts +3 -3
- package/dist/esm/internal/index.js +1 -1
- package/dist/esm/jsx-dev-runtime.js +1 -1
- package/dist/esm/jsx-runtime.js +1 -1
- package/dist/esm/servers/express.d.ts +4 -4
- package/dist/esm/servers/express.js +1 -1
- package/dist/esm/servers/h3.d.ts +4 -4
- package/dist/esm/servers/h3.js +1 -1
- package/dist/esm/servers/lambda.d.ts +5 -5
- package/dist/esm/servers/lambda.js +1 -1
- package/dist/esm/servers/nest.d.ts +6 -6
- package/dist/esm/servers/nest.js +1 -1
- package/dist/esm/servers/next.d.ts +4 -4
- package/dist/esm/servers/next.js +1 -1
- package/dist/esm/servers/nuxt.d.ts +4 -4
- package/dist/esm/servers/nuxt.js +1 -1
- package/dist/esm/servers/remix.d.ts +4 -4
- package/dist/esm/servers/remix.js +1 -1
- package/dist/esm/servers/sveltekit.d.ts +4 -4
- package/dist/esm/servers/sveltekit.js +1 -1
- package/dist/esm/step-resolver.d.ts +2 -2
- package/dist/esm/step-resolver.js +1 -1
- package/dist/esm/{subscriber.types-CbMgjzR-.d.ts → subscriber.types-CC7F0JO_.d.ts} +8 -0
- package/dist/esm/validators.js +1 -1
- package/package.json +5 -5
- package/dist/esm/chunk-EWC7I6UD.js +0 -1
- package/dist/esm/chunk-H2XIPY7V.js +0 -130
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as C,g as l,i as w,q as A,r as k,s as i,t as f,u as x,v}from"./chunk-
|
|
1
|
+
import{d as C,g as l,i as w,q as A,r as k,s as i,t as f,u as x,v}from"./chunk-FRWG7YTE.js";var N=class extends x{constructor(t){super("Unknown BridgeError",{cause:t});this.statusCode=500;this.code="BridgeError"}};var P=class extends i{constructor(t,n){super(`Workflow with id: \`${t}\` has a corrupt state. Step with id: \`${n}\` does not exist. Please provide the missing state.`);this.code="ExecutionStateCorruptError";this.data={workflowId:t,stepId:n}}},I=class extends i{constructor(t,n){super(`Workflow with id: \`${t}\` has invalid \`payload\`. Please provide the correct event payload.`);this.code="ExecutionEventPayloadInvalidError";this.data=n}},D=class extends i{constructor(t,n){super(`Workflow with id: \`${t}\` has invalid \`controls\`. Please provide the correct event controls.`);this.code="ExecutionEventControlInvalidError";this.data=n}},F=class extends i{constructor(t,n,r){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${n}\` has invalid \`controls\`. Please provide the correct step controls.`);this.code="ExecutionStateControlInvalidError";this.data=r}},b=class extends i{constructor(t,n,r){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${n}\` has invalid output. Please provide the correct step output.`);this.code="ExecutionStateOutputInvalidError";this.data=r}},$=class extends i{constructor(t,n,r){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${n}\` has invalid result. Please provide the correct step result.`);this.code="ExecutionStateResultInvalidError";this.data=r}},L=class extends i{constructor(t,n,r){super(`Workflow with id: \`${t}\` has invalid controls syntax in step with id: \`${n}\`. Please correct step control syntax.`);this.code="StepControlCompilationFailedError";this.data=r}},W=class extends i{constructor(t,n,r,p){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${n}\` and provider with id: \`${r}\` has invalid output. Please provide the correct provider output.`);this.code="ExecutionProviderOutputInvalidError";this.data=p}},V=class extends i{constructor(t,n){super(`Workflow with id: \`${t}\` has invalid \`payload\`. Please provide the correct payload.`);this.code="WorkflowPayloadInvalidError";this.data=n}};var j=e=>Object.values(l).includes(e==null?void 0:e.code),Ie=e=>!j(e)&&typeof e.statusCode=="number"&&e.statusCode>=400&&e.statusCode<500;var E=e=>Object.values(e).map(o=>`\`${o}\``).join(", "),O=e=>e.replaceAll(/(\w)(\w*)/g,(o,t,n)=>t.toUpperCase()+n.toLowerCase()).replaceAll(/[\s-]+/g,"");var G=class extends A{constructor(){super(...arguments);this.code="MethodNotAllowedError";this.statusCode=405;this.message=`Method not allowed. Please use one of ${E(w)}`}},q=class extends i{constructor(t,n){super(`Invalid query string: \`action\`=\`${t}\`. Please use one of ${E(n)}`);this.code="InvalidActionError"}},M=class extends i{constructor(){super("Missing secret key. Set the `NOVU_SECRET_KEY` environment variable or pass `secretKey` to the client options.");this.code="MissingSecretKeyError"}};var H=class extends Error{constructor(o,t,n){super(),this.data={message:n},this.statusCode=o,this.code=t}};var R=class extends v{constructor(o,t){super(`${O(o)} with id: \`${t}\` already exists. Please use a different id.`)}},d=class extends k{constructor(o,t){super(`${O(o)} with id: \`${t}\` does not exist. Please provide a valid id.`)}},y=class extends x{constructor(t,n,r,p){super(`Failed to ${r} ${O(t)} with id: \`${n}\``,{cause:p});this.statusCode=502}};var K=class extends d{constructor(t){super("provider",t);this.code="ProviderNotFoundError"}},X=class extends y{constructor(t,n,r){super("provider",t,n,r);this.code="ProviderExecutionFailedError"}};var z=class extends f{constructor(){super("Signature does not match the expected signature. Please ensure the signature provided in the `novu-signature` header is correct and try again.");this.code="SignatureMismatchError"}},Q=class extends f{constructor(){super("Signature not found. Please provide a signature in the `novu-signature` header");this.code="SignatureNotFoundError"}},B=class extends f{constructor(){super("Signature is invalid. Please provide a valid signature in the `novu-signature` header");this.code="SignatureInvalidError"}},Z=class extends f{constructor(){super(`Signature expired. Please provide a signature with a timestamp no older than ${5} minutes in the \`novu-signature\` header`);this.code="SignatureExpiredError"}},J=class extends f{constructor(){super("Signature key not found. Please provide a valid key in the Client constructor `config.secretKey`");this.code="SigningKeyNotFoundError"}},ee=class extends f{constructor(){super("Signature version is invalid. Please provide a signature version with version `v1` in the `novu-signature` header");this.code="SignatureVersionInvalidError"}};var te=class extends d{constructor(t){super("step",t);this.code="StepNotFoundError"}},oe=class extends R{constructor(t){super("step",t);this.code="StepAlreadyExistsError"}},re=class extends y{constructor(t,n,r){super("step",t,n,r);this.code="StepExecutionFailedError"}};var ne=class extends d{constructor(t){super("workflow",t);this.code="WorkflowNotFoundError"}},se=class extends R{constructor(t){super("workflow",t);this.code="WorkflowAlreadyExistsError"}};function ge(e,o){let t={...e};for(let n of Object.keys(o)){let r=o[n];r&&typeof r=="object"&&!Array.isArray(r)?t[n]=ge(t[n]||{},r):(Array.isArray(r),t[n]=r)}return t}function _(e,o){let t=o.split(".").reduce((n,r)=>{if(n&&typeof n=="object")return n[r]},e);if(t==null)return"";if(typeof t=="string")return t;if(typeof t=="number"||typeof t=="boolean")return String(t);if(typeof t=="object"){let n=JSON.stringify(t);return n==="{}"?"":n}return""}function ae(e,o=2,t,n=", "){if(!Array.isArray(e)||e.length===0)return"";let r=t?e.map(s=>typeof s!="object"||!s?"":_(s,t)):e;if(r.length===1)return r[0];if(r.length===2)return`${r[0]} and ${r[1]}`;if(r.length===3&&o>=3)return`${r[0]}, ${n}${r[1]} and ${r[2]}`;let p=r.slice(0,o),m=r.length-o;return`${p.join(n)} and ${m} ${m===1?"other":"others"}`}import xe from"pluralize";function pe(e,o="",t="",n="true"){if(e==null)return"";let r=0;if(Array.isArray(e)?r=e.length:typeof e=="object"?r=Object.keys(e).length:typeof e=="string"?r=+e:typeof e=="number"?r=e:r=Number(e),Number.isNaN(r)&&(r=0),r<=0)return"";let p;return t?p=r===1?o:t:p=xe(o,r),n==="true"?`${r} ${p}`:p}import{TokenKind as ie}from"liquidjs";import Oe from"pluralize";import{z as h}from"zod";var ce="",le=2,me="other",de=", ",he=" and ",Se=", and ",ue={0:"keyPath",1:"limit",2:"overflowSuffix",3:"wordsConnector",4:"twoWordsConnector",5:"lastWordConnector"};function fe(e,o=ce,t=le,n=me,r=de,p=he,m=Se){if(!Array.isArray(e)||e.length===0)return"";let s=o?e.map(c=>typeof c!="object"||!c?"":_(c,o)):e,u=s.length;if(u===1)return s[0];if(u===2)return`${s[0]}${p}${s[1]}`;if(t>=u){let c=s.slice(0,u-1),T=s[u-1];return`${c.join(r)}${m}${T}`}let a=s.slice(0,t),S=u-t,g=t===1?p:m;return`${a.join(r)}${g}${S} ${Oe(n,S)}`}function Nt(e={},...o){let{requireKeyPath:t=!1}=e,n=[];if(o.length<1)return n.push({message:"Expected at least 1 argument",begin:0,end:0,value:""}),n;let r=h.object({keyPath:t?h.string().min(1,"must be non-empty"):h.string().optional().default(ce),limit:h.number().optional().default(le).refine(s=>s>=0,"must be greater than or equal to 0"),overflowSuffix:h.string().optional().default(me),wordsConnector:h.string().optional().default(de),twoWordsConnector:h.string().optional().default(he),lastWordConnector:h.string().optional().default(Se)}),p={};o.forEach((s,u)=>{if(!Array.isArray(s)){let a=s.getText();(s.kind===ie.Quoted||s.kind===ie.Number)&&(a=s.content);let S=ue[u];p[S]=a}});let m=r.safeParse(p);if(!m.success)for(let s of m.error.issues){let u="string";"type"in s&&(u=s.type);let a=s.path[0],S=Object.entries(ue).find(([T,ye])=>ye===a),g=S?parseInt(S[0],10):null,c=typeof g=="number"?o[g]:null;c&&!Array.isArray(c)&&n.push({message:`"toSentence" expects a ${u}${s.message?` that ${s.message}`:""} for argument "${a}"`,begin:c.begin,end:c.end,value:c.getText()})}return n}import{Liquid as _e}from"liquidjs";function Ee(e){return Array.isArray(e)||typeof e=="object"&&e!==null?Re(e):typeof e=="string"?e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"):e==null?"":String(e)}var Re=(e,o=0)=>Array.isArray(e)||typeof e=="object"&&e!==null?JSON.stringify(e,null,o).replace(/"/g,"'").replace(/\n/g,"\\n"):e==null?"":String(e);function $t(e){let o=new _e({outputEscape:Ee,...e});return o.registerFilter("json",(t,n)=>Re(t,n)),o.registerFilter("digest",ae),o.registerFilter("toSentence",fe),o.registerFilter("pluralize",pe),o}var Wt={type:"object",properties:{},required:[],additionalProperties:!1};var Te=(a=>(a.PENDING="pending",a.QUEUED="queued",a.RUNNING="running",a.COMPLETED="completed",a.FAILED="failed",a.DELAYED="delayed",a.CANCELED="canceled",a.MERGED="merged",a.SKIPPED="skipped",a))(Te||{});var Ce=(r=>(r.NONE="none",r.LOW="low",r.MEDIUM="medium",r.HIGH="high",r))(Ce||{});export{N as a,P as b,I as c,D as d,F as e,b as f,$ as g,L as h,W as i,V as j,j as k,Ie as l,G as m,q as n,M as o,H as p,R as q,d as r,y as s,K as t,X as u,z as v,Q as w,B as x,Z as y,J as z,ee as A,te as B,oe as C,re as D,ne as E,se as F,ge as G,ae as H,pe as I,fe as J,Nt as K,$t as L,Wt as M,Te as N,Ce as O};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var e={output:{type:"object",properties:{},required:[],additionalProperties:!0}};var M={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},s={output:M};var o={"chat-webhook":e,discord:e,getstream:e,"grafana-on-call":e,mattermost:e,msteams:e,"rocket-chat":e,ryver:e,slack:s,"whatsapp-business":e,zulip:e};var L={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},a={output:L};var i={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},R={type:"object",properties:{contentType:{type:"string"},filename:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},U={type:"object",properties:{filename:{type:"string"},contentType:{type:"string"},contentId:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},D={type:"object",properties:{from:i,sender:i,to:{type:"array",items:i},cc:{type:"array",items:i},bcc:{type:"array",items:i},replyTo:i,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:i,templateErrorDeliver:{type:"boolean"},attachments:{type:"array",items:R},inlineAttachments:{type:"array",items:U},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},r={output:D};var t={type:"object",properties:{address:{type:"string"},name:{type:"string"}},additionalProperties:!0},n={type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0},J={type:"object",properties:{from:{anyOf:[{type:"string"},t]},sender:{anyOf:[{type:"string"},t]},to:{anyOf:[{type:"string"},t,{type:"array",items:t}]},cc:{anyOf:[{type:"string"},t,{type:"array",items:t}]},bcc:{anyOf:[{type:"string"},t,{type:"array",items:t}]},replyTo:{anyOf:[{type:"string"},t,{type:"array",items:t}]},inReplyTo:{anyOf:[{type:"string"},t]},references:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},subject:{type:"string"},text:{anyOf:[{type:"string"},n]},html:{anyOf:[{type:"string"},n]},watchHtml:{anyOf:[{type:"string"},n]},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"},n]}}}]},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},p={output:J};var q={type:"object",properties:{},required:[],additionalProperties:!1},l={output:q};var F={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},d={output:F};var c={braze:e,clickatell:e,nodemailer:p,emailjs:e,"email-webhook":e,"infobip-email":e,mailersend:e,mailgun:a,mailjet:r,mailtrap:e,mandrill:e,netcore:e,"novu-email":l,outlook365:e,plunk:e,postmark:e,resend:e,sendgrid:d,sendinblue:e,ses:e,sparkpost:e};var H={type:"object",properties:{},required:[],additionalProperties:!1},u={output:H};var h={novu:u};var m={anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{name:{type:"string"},volume:{type:"number"},critical:{type:"number"}},required:["name","volume","critical"]}]},z={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
|
+
var e={output:{type:"object",properties:{},required:[],additionalProperties:!0}};var M={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},s={output:M};var o={"chat-webhook":e,discord:e,getstream:e,"grafana-on-call":e,mattermost:e,msteams:e,"rocket-chat":e,ryver:e,slack:s,"whatsapp-business":e,zulip:e,telegram:e};var L={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},a={output:L};var i={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},R={type:"object",properties:{contentType:{type:"string"},filename:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},U={type:"object",properties:{filename:{type:"string"},contentType:{type:"string"},contentId:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},D={type:"object",properties:{from:i,sender:i,to:{type:"array",items:i},cc:{type:"array",items:i},bcc:{type:"array",items:i},replyTo:i,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:i,templateErrorDeliver:{type:"boolean"},attachments:{type:"array",items:R},inlineAttachments:{type:"array",items:U},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},r={output:D};var t={type:"object",properties:{address:{type:"string"},name:{type:"string"}},additionalProperties:!0},n={type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0},J={type:"object",properties:{from:{anyOf:[{type:"string"},t]},sender:{anyOf:[{type:"string"},t]},to:{anyOf:[{type:"string"},t,{type:"array",items:t}]},cc:{anyOf:[{type:"string"},t,{type:"array",items:t}]},bcc:{anyOf:[{type:"string"},t,{type:"array",items:t}]},replyTo:{anyOf:[{type:"string"},t,{type:"array",items:t}]},inReplyTo:{anyOf:[{type:"string"},t]},references:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},subject:{type:"string"},text:{anyOf:[{type:"string"},n]},html:{anyOf:[{type:"string"},n]},watchHtml:{anyOf:[{type:"string"},n]},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"},n]}}}]},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},p={output:J};var q={type:"object",properties:{},required:[],additionalProperties:!1},l={output:q};var F={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},d={output:F};var c={braze:e,clickatell:e,nodemailer:p,emailjs:e,"email-webhook":e,"infobip-email":e,mailersend:e,mailgun:a,mailjet:r,mailtrap:e,mandrill:e,netcore:e,"novu-email":l,outlook365:e,plunk:e,postmark:e,resend:e,sendgrid:d,sendinblue:e,ses:e,sparkpost:e};var H={type:"object",properties:{},required:[],additionalProperties:!1},u={output:H};var h={novu:u};var m={anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{name:{type:"string"},volume:{type:"number"},critical:{type:"number"}},required:["name","volume","critical"]}]},z={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,4 +1,4 @@
|
|
|
1
|
-
import { b as ContextPayload, c as ConditionalPartial, P as PickRequiredKeys, d as Step, e as Prettify, S as Subscriber, E as EnvironmentSystemVariables, C as ContextResolved, D as DeepPartial$1, f as ChannelStepEnum, A as ActionStepEnum, g as Awaitable, W as WithPassthrough, h as StepOptions } from './subscriber.types-
|
|
1
|
+
import { b as ContextPayload, c as ConditionalPartial, P as PickRequiredKeys, d as Step, e as Prettify, S as Subscriber, E as EnvironmentSystemVariables, C as ContextResolved, D as DeepPartial$1, f as ChannelStepEnum, A as ActionStepEnum, g as Awaitable, W as WithPassthrough, h as StepOptions } from './subscriber.types-CC7F0JO_.js';
|
|
2
2
|
import { S as Schema, J as JsonSchema } from './base.schema.types-BApIn9jr.js';
|
|
3
3
|
|
|
4
4
|
declare enum ChannelTypeEnum {
|
|
@@ -66,7 +66,8 @@ declare enum ChatProviderIdEnum {
|
|
|
66
66
|
GetStream = "getstream",
|
|
67
67
|
RocketChat = "rocket-chat",
|
|
68
68
|
WhatsAppBusiness = "whatsapp-business",
|
|
69
|
-
ChatWebhook = "chat-webhook"
|
|
69
|
+
ChatWebhook = "chat-webhook",
|
|
70
|
+
Telegram = "telegram"
|
|
70
71
|
}
|
|
71
72
|
declare enum PushProviderIdEnum {
|
|
72
73
|
FCM = "fcm",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChatElement, Emoji, CardElement } from 'chat';
|
|
2
|
-
import { T as TriggerRecipientsPayload, C as ClientOptions, W as Workflow, H as HealthCheck, e as DiscoverOutput, i as Event, n as ExecuteOutput, d as CodeResult, j as EventTriggerParams, m as Execute, t as WorkflowOptions } from './health-check.types-
|
|
3
|
-
import { g as Awaitable } from './subscriber.types-
|
|
2
|
+
import { T as TriggerRecipientsPayload, C as ClientOptions, W as Workflow, H as HealthCheck, e as DiscoverOutput, i as Event, n as ExecuteOutput, d as CodeResult, j as EventTriggerParams, m as Execute, t as WorkflowOptions } from './health-check.types-XZwesagD.js';
|
|
3
|
+
import { g as Awaitable } from './subscriber.types-CC7F0JO_.js';
|
|
4
4
|
import { S as Schema, a as FromSchema, F as FromSchemaUnvalidated } from './base.schema.types-BApIn9jr.js';
|
|
5
5
|
import './step-resolver.js';
|
|
6
6
|
|
|
@@ -85,6 +85,27 @@ interface AgentHistoryEntry {
|
|
|
85
85
|
};
|
|
86
86
|
createdAt: string;
|
|
87
87
|
}
|
|
88
|
+
/** Resolved inbound email domain metadata (present when `platform === 'email'`). */
|
|
89
|
+
interface AgentEmailDomainContext {
|
|
90
|
+
id: string;
|
|
91
|
+
name: string;
|
|
92
|
+
data?: Record<string, string>;
|
|
93
|
+
}
|
|
94
|
+
/** Resolved inbound email route metadata (present when `platform === 'email'`). */
|
|
95
|
+
interface AgentEmailRouteContext {
|
|
96
|
+
address: string;
|
|
97
|
+
data?: Record<string, string>;
|
|
98
|
+
}
|
|
99
|
+
/** Resolved inbound email envelope (present when `platform === 'email'`). */
|
|
100
|
+
interface AgentEmailContext {
|
|
101
|
+
domain?: AgentEmailDomainContext;
|
|
102
|
+
route?: AgentEmailRouteContext;
|
|
103
|
+
/**
|
|
104
|
+
* Platform-native Message-ID of the message that started this email thread.
|
|
105
|
+
* Equals the current message ID on the first message of a thread.
|
|
106
|
+
*/
|
|
107
|
+
rootMessageId?: string;
|
|
108
|
+
}
|
|
88
109
|
/** Platform-specific identifiers for the thread and channel. */
|
|
89
110
|
interface AgentPlatformContext {
|
|
90
111
|
/** Platform-native thread ID (e.g. Slack thread `ts`, Teams conversation ID). */
|
|
@@ -93,6 +114,10 @@ interface AgentPlatformContext {
|
|
|
93
114
|
channelId: string;
|
|
94
115
|
/** Whether the message arrived in a direct message rather than a shared channel. */
|
|
95
116
|
isDM: boolean;
|
|
117
|
+
/** Platform-native raw message payload from the chat SDK adapter (e.g. email `NovuEmailRawMessage`). */
|
|
118
|
+
message?: unknown;
|
|
119
|
+
/** Resolved inbound email routing metadata extracted from the raw payload. */
|
|
120
|
+
email?: AgentEmailContext;
|
|
96
121
|
}
|
|
97
122
|
interface FileRef {
|
|
98
123
|
filename: string;
|
|
@@ -118,6 +143,7 @@ interface FileRef {
|
|
|
118
143
|
* - `ChatElement` — interactive card built with Card(), Button(), etc.
|
|
119
144
|
*
|
|
120
145
|
* For file attachments, pass a `files` array as the second argument to reply()/edit().
|
|
146
|
+
* Cards and files can be combined on platforms that support it (e.g. WhatsApp sends media then the card).
|
|
121
147
|
*/
|
|
122
148
|
type MessageContent = string | ChatElement;
|
|
123
149
|
/** Normalized content shape sent over HTTP to the reply endpoint. */
|
|
@@ -126,10 +152,15 @@ interface ReplyContent {
|
|
|
126
152
|
card?: CardElement;
|
|
127
153
|
files?: FileRef[];
|
|
128
154
|
}
|
|
129
|
-
/**
|
|
155
|
+
/**
|
|
156
|
+
* Data carried by a button click or other interactive action.
|
|
157
|
+
*
|
|
158
|
+
* Used both on the bridge wire (`AgentBridgeRequest.action`) and as the
|
|
159
|
+
* handler-facing argument passed to `onAction(action, ctx)`.
|
|
160
|
+
*/
|
|
130
161
|
interface AgentAction {
|
|
131
162
|
/** The `id` prop of the clicked `<Button>` or action element. */
|
|
132
|
-
|
|
163
|
+
id: string;
|
|
133
164
|
/** The `value` prop of the clicked element, if set. */
|
|
134
165
|
value?: string;
|
|
135
166
|
/** Platform-native message ID of the message containing the clicked button/action. */
|
|
@@ -258,8 +289,6 @@ interface AgentContextBase {
|
|
|
258
289
|
/** Context passed to the `onMessage` handler. */
|
|
259
290
|
interface AgentMessageContext extends AgentContextBase {
|
|
260
291
|
readonly event: 'onMessage';
|
|
261
|
-
/** The incoming message that triggered this handler. */
|
|
262
|
-
readonly message: AgentMessage;
|
|
263
292
|
}
|
|
264
293
|
/** Context passed to the `onAction` handler. */
|
|
265
294
|
interface AgentActionContext extends AgentContextBase {
|
|
@@ -282,42 +311,41 @@ type AgentContext = AgentMessageContext | AgentActionContext | AgentReactionCont
|
|
|
282
311
|
interface AgentHandlers {
|
|
283
312
|
/**
|
|
284
313
|
* Fires on every text message the user sends.
|
|
285
|
-
*
|
|
286
|
-
*
|
|
314
|
+
*
|
|
315
|
+
* @param message - The incoming message that triggered this handler.
|
|
316
|
+
* @param ctx - Conversation history, subscriber, metadata, and reply/trigger methods.
|
|
317
|
+
*
|
|
287
318
|
* Return a string or JSX card to reply, or call `ctx.reply()` directly
|
|
288
319
|
* for more control (e.g. editing a message in place).
|
|
289
320
|
*/
|
|
290
|
-
onMessage: (
|
|
291
|
-
message: AgentMessage;
|
|
292
|
-
ctx: AgentMessageContext;
|
|
293
|
-
}) => Awaitable<MessageContent | void>;
|
|
321
|
+
onMessage: (message: AgentMessage, ctx: AgentMessageContext) => Awaitable<MessageContent | void>;
|
|
294
322
|
/**
|
|
295
323
|
* Fires when the user adds or removes an emoji reaction to a message.
|
|
296
|
-
*
|
|
324
|
+
*
|
|
325
|
+
* @param reaction - The emoji reaction (carries the emoji and whether it was added or removed).
|
|
326
|
+
* @param ctx - Conversation context (history, subscriber, metadata, reply/trigger methods).
|
|
327
|
+
*
|
|
297
328
|
* Return a string or card to post a reply, or return nothing to silently acknowledge.
|
|
298
329
|
*/
|
|
299
|
-
onReaction?: (
|
|
300
|
-
reaction: AgentReaction;
|
|
301
|
-
ctx: AgentReactionContext;
|
|
302
|
-
}) => Awaitable<MessageContent | void>;
|
|
330
|
+
onReaction?: (reaction: AgentReaction, ctx: AgentReactionContext) => Awaitable<MessageContent | void>;
|
|
303
331
|
/**
|
|
304
332
|
* Fires when the user clicks a `<Button>` or other interactive element.
|
|
305
|
-
*
|
|
333
|
+
*
|
|
334
|
+
* @param action - The interactive action that triggered this handler.
|
|
335
|
+
* `action.id` is the `id` prop of the clicked element; `action.value` is its `value` prop.
|
|
336
|
+
* @param ctx - Conversation context (history, subscriber, metadata, reply/trigger methods).
|
|
337
|
+
*
|
|
306
338
|
* Return a string or card to reply, or return nothing to silently acknowledge the click.
|
|
307
339
|
*/
|
|
308
|
-
onAction?: (
|
|
309
|
-
actionId: string;
|
|
310
|
-
value?: string;
|
|
311
|
-
ctx: AgentActionContext;
|
|
312
|
-
}) => Awaitable<MessageContent | void>;
|
|
340
|
+
onAction?: (action: AgentAction, ctx: AgentActionContext) => Awaitable<MessageContent | void>;
|
|
313
341
|
/**
|
|
314
342
|
* Fires after `ctx.resolve()` is called and the conversation is marked resolved.
|
|
315
343
|
* Use for post-resolution side-effects (e.g. triggering a follow-up workflow).
|
|
316
|
-
*
|
|
344
|
+
*
|
|
345
|
+
* @param ctx - Conversation context. Access subscriber and conversation via
|
|
346
|
+
* `ctx.subscriber` and `ctx.conversation`.
|
|
317
347
|
*/
|
|
318
|
-
onResolve?: (
|
|
319
|
-
ctx: AgentResolveContext;
|
|
320
|
-
}) => Awaitable<MessageContent | void>;
|
|
348
|
+
onResolve?: (ctx: AgentResolveContext) => Awaitable<MessageContent | void>;
|
|
321
349
|
}
|
|
322
350
|
interface Agent {
|
|
323
351
|
id: string;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentBridgeRequest, e as AgentContext, f as AgentConversation, g as AgentDeliveryError, h as AgentEventEnum, 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 AgentReplyPayload, r as AgentResolveContext, s as AgentSubscriber, C as Client, E as EditPayload, F as FileRef, M as MessageContent, t as MetadataSignal, N as NovuRequestHandler, R as ReplyContent, u as ReplyHandle, v as SentMessageInfo, S as ServeHandlerOptions, w as Signal, T as TriggerSignal, x as agent, y as workflow } from './index-
|
|
2
|
-
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from './health-check.types-
|
|
1
|
+
export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentBridgeRequest, e as AgentContext, f as AgentConversation, g as AgentDeliveryError, h as AgentEventEnum, 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 AgentReplyPayload, r as AgentResolveContext, s as AgentSubscriber, C as Client, E as EditPayload, F as FileRef, M as MessageContent, t as MetadataSignal, N as NovuRequestHandler, R as ReplyContent, u as ReplyHandle, v as SentMessageInfo, S as ServeHandlerOptions, w as Signal, T as TriggerSignal, x as agent, y as workflow } from './index-dylq0Kmx.js';
|
|
2
|
+
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from './health-check.types-XZwesagD.js';
|
|
3
3
|
export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
|
|
4
4
|
export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from './step-resolver.js';
|
|
5
|
-
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from './subscriber.types-
|
|
5
|
+
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from './subscriber.types-CC7F0JO_.js';
|
|
6
6
|
import './base.schema.types-BApIn9jr.js';
|
|
7
7
|
import 'json-schema-to-ts';
|
|
8
8
|
import 'zod';
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b,c,d,e,f,g,h,i,j,k,l,m,n,o,p as r}from"./chunk-
|
|
1
|
+
import{b,c,d,e,f,g,h,i,j,k,l,m,n,o,p as r}from"./chunk-LJUUDK2J.js";import{O as q}from"./chunk-N4PZBM53.js";import"./chunk-K7PM3FEJ.js";import{a as s}from"./chunk-2M25EATE.js";import{a as p}from"./chunk-QTWEINJ4.js";import"./chunk-DKQLYSZS.js";import{f as a}from"./chunk-FRWG7YTE.js";import"./chunk-52LSX2V5.js";export{c as Actions,l as AgentDeliveryError,n as AgentEventEnum,d as Button,e as Card,f as CardLink,g as CardText,b as Client,a as CronExpression,h as Divider,o as NovuRequestHandler,i as Select,j as SelectOption,q as SeverityLevelEnum,k as TextInput,m as agent,p as providerSchemas,s as step,r as workflow};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PostActionEnum } from '../health-check.types-
|
|
2
|
-
export { b as CancelEventTriggerResponse, c as ChannelPreference, C as ClientOptions, d as CodeResult, a as CronExpression, D as DiscoverAgentOutput, e as DiscoverOutput, f as DiscoverProviderOutput, g as DiscoverStepOutput, h as DiscoverWorkflowOutput, i as Event, j as EventTriggerParams, k as EventTriggerResponse, l as EventTriggerResult, m as Execute, E as ExecuteInput, n as ExecuteOutput, o as ExecuteOutputMetadata, p as ExecuteOutputOptions, G as GetActionEnum, H as HealthCheck, S as SeverityLevelEnum, q as State, r as StepType, W as Workflow, s as WorkflowChannelEnum, t as WorkflowOptions, u as WorkflowPreference, v as WorkflowPreferences } from '../health-check.types-
|
|
3
|
-
export { i as ActionStep, A as ActionStepEnum, g as Awaitable, j as ChannelStep, f as ChannelStepEnum, k as ChatOutput, l as ChatOutputUnvalidated, m as ChatResult, c as ConditionalPartial, b as ContextPayload, C as ContextResolved, n as ContextValue, o as CustomStep, D as DeepPartial, q as DeepRequired, r as DelayDynamicOutput, s as DelayDynamicOutputUnvalidated, t as DelayOutput, u as DelayOutputUnvalidated, v as DelayRegularOutput, w as DelayRegularOutputUnvalidated, x as DelayResult, y as DelayTimedOutput, z as DelayTimedOutputUnvalidated, B as DigestOutput, F as DigestOutputUnvalidated, G as DigestRegularOutput, H as DigestRegularOutputUnvalidated, I as DigestResult, J as DigestTimedOutput, K as DigestTimedOutputUnvalidated, a as Either, L as EmailOutput, M as EmailOutputUnvalidated, N as EmailResult, E as EnvironmentSystemVariables, O as InAppOutput, Q as InAppOutputUnvalidated, R as InAppResult, T as Indexable, U as JobStatusEnum, V as PickOptional, X as PickOptionalKeys, Y as PickRequired, P as PickRequiredKeys, e as Prettify, Z as PushOutput, _ as PushOutputUnvalidated, $ as PushResult, a0 as Skip, a1 as SmsOutput, a2 as SmsOutputUnvalidated, a3 as SmsResult, d as Step, a4 as StepContext, h as StepOptions, a5 as StepOutput, S as Subscriber, a6 as ThrottleOutput, a7 as ThrottleOutputUnvalidated, a8 as ThrottleResult, a9 as actionStepSchemas, aa as channelStepSchemas } from '../subscriber.types-
|
|
1
|
+
import { P as PostActionEnum } from '../health-check.types-XZwesagD.js';
|
|
2
|
+
export { b as CancelEventTriggerResponse, c as ChannelPreference, C as ClientOptions, d as CodeResult, a as CronExpression, D as DiscoverAgentOutput, e as DiscoverOutput, f as DiscoverProviderOutput, g as DiscoverStepOutput, h as DiscoverWorkflowOutput, i as Event, j as EventTriggerParams, k as EventTriggerResponse, l as EventTriggerResult, m as Execute, E as ExecuteInput, n as ExecuteOutput, o as ExecuteOutputMetadata, p as ExecuteOutputOptions, G as GetActionEnum, H as HealthCheck, S as SeverityLevelEnum, q as State, r as StepType, W as Workflow, s as WorkflowChannelEnum, t as WorkflowOptions, u as WorkflowPreference, v as WorkflowPreferences } from '../health-check.types-XZwesagD.js';
|
|
3
|
+
export { i as ActionStep, A as ActionStepEnum, g as Awaitable, j as ChannelStep, f as ChannelStepEnum, k as ChatOutput, l as ChatOutputUnvalidated, m as ChatResult, c as ConditionalPartial, b as ContextPayload, C as ContextResolved, n as ContextValue, o as CustomStep, D as DeepPartial, q as DeepRequired, r as DelayDynamicOutput, s as DelayDynamicOutputUnvalidated, t as DelayOutput, u as DelayOutputUnvalidated, v as DelayRegularOutput, w as DelayRegularOutputUnvalidated, x as DelayResult, y as DelayTimedOutput, z as DelayTimedOutputUnvalidated, B as DigestOutput, F as DigestOutputUnvalidated, G as DigestRegularOutput, H as DigestRegularOutputUnvalidated, I as DigestResult, J as DigestTimedOutput, K as DigestTimedOutputUnvalidated, a as Either, L as EmailOutput, M as EmailOutputUnvalidated, N as EmailResult, E as EnvironmentSystemVariables, O as InAppOutput, Q as InAppOutputUnvalidated, R as InAppResult, T as Indexable, U as JobStatusEnum, V as PickOptional, X as PickOptionalKeys, Y as PickRequired, P as PickRequiredKeys, e as Prettify, Z as PushOutput, _ as PushOutputUnvalidated, $ as PushResult, a0 as Skip, a1 as SmsOutput, a2 as SmsOutputUnvalidated, a3 as SmsResult, d as Step, a4 as StepContext, h as StepOptions, a5 as StepOutput, S as Subscriber, a6 as ThrottleOutput, a7 as ThrottleOutputUnvalidated, a8 as ThrottleResult, a9 as actionStepSchemas, aa as channelStepSchemas } from '../subscriber.types-CC7F0JO_.js';
|
|
4
4
|
import { Filter, LiquidOptions, Liquid } from 'liquidjs';
|
|
5
5
|
export { a as FromSchema, F as FromSchemaUnvalidated, J as JsonSchema, S as Schema, Z as ZodSchema, b as ZodSchemaMinimal } from '../base.schema.types-BApIn9jr.js';
|
|
6
6
|
export { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as Z,B as $,C as rr,D as er,E as or,F as tr,H as ir,I as mr,J as pr,K as r,L as e,N as ar,O as fr,a as R,b as T,c as k,d as D,e as O,f as _,g as b,h as j,i as v,j as w,k as z,m as B,n as C,o as G,p as H,q as J,r as K,s as M,t as N,u as P,v as Q,w as U,x as W,y as X,z as Y}from"../chunk-
|
|
1
|
+
import{A as Z,B as $,C as rr,D as er,E as or,F as tr,H as ir,I as mr,J as pr,K as r,L as e,N as ar,O as fr,a as R,b as T,c as k,d as D,e as O,f as _,g as b,h as j,i as v,j as w,k as z,m as B,n as C,o as G,p as H,q as J,r as K,s as M,t as N,u as P,v as Q,w as U,x as W,y as X,z as Y}from"../chunk-N4PZBM53.js";import{e as o,f as t}from"../chunk-QTWEINJ4.js";import{a as i,b as m,c as p,d as a,e as f,f as n,g as s,h as x,i as c,j as l,k as S,l as d,m as u,n as F,o as L,p as g,q as I,r as V,s as h,t as q,u as y,v as A,w as E}from"../chunk-FRWG7YTE.js";import"../chunk-52LSX2V5.js";var sr={toSentence:r};export{F as ActionStepEnum,h as BadRequestError,R as BridgeError,u as ChannelStepEnum,A as ConflictError,n as CronExpression,s as ErrorCodeEnum,D as ExecutionEventControlsInvalidError,k as ExecutionEventPayloadInvalidError,v as ExecutionProviderOutputInvalidError,O as ExecutionStateControlsInvalidError,T as ExecutionStateCorruptError,_ as ExecutionStateOutputInvalidError,b as ExecutionStateResultInvalidError,sr as FILTER_VALIDATORS,E as ForbiddenError,I as FrameworkError,m as GetActionEnum,x as HttpHeaderKeysEnum,c as HttpMethodEnum,l as HttpQueryKeysEnum,S as HttpStatusEnum,C as InvalidActionError,ar as JobStatusEnum,B as MethodNotAllowedError,G as MissingSecretKeyError,V as NotFoundError,p as NovuApiEndpointsEnum,H as PlatformError,i as PostActionEnum,P as ProviderExecutionFailedError,N as ProviderNotFoundError,J as ResourceConflictError,d as ResourceEnum,M as ResourceExecutionFailed,K as ResourceNotFoundError,f as SIGNATURE_TIMESTAMP_TOLERANCE,a as SIGNATURE_TIMESTAMP_TOLERANCE_MINUTES,y as ServerError,fr as SeverityLevelEnum,X as SignatureExpiredError,W as SignatureInvalidError,Q as SignatureMismatchError,U as SignatureNotFoundError,Z as SignatureVersionInvalidError,Y as SigningKeyNotFoundError,rr as StepAlreadyExistsError,j as StepControlCompilationFailedError,er as StepExecutionFailedError,$ as StepNotFoundError,q as UnauthorizedError,tr as WorkflowAlreadyExistsError,L as WorkflowChannelEnum,or as WorkflowNotFoundError,w as WorkflowPayloadInvalidError,o as actionStepSchemas,t as channelStepSchemas,e as createLiquidEngine,ir as digest,z as isFrameworkError,g as isNativeError,mr as pluralize,pr as toSentence,r as toSentenceArgsValidator};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-2GCKOQK4.js";import{p as s,q as x,r as e,s as j}from"./chunk-
|
|
1
|
+
import"./chunk-2GCKOQK4.js";import{p as s,q as x,r as e,s as j}from"./chunk-K7PM3FEJ.js";import"./chunk-52LSX2V5.js";export{j as Fragment,s as jsx,e as jsxDEV,x as jsxs};
|
package/dist/esm/jsx-runtime.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-2GCKOQK4.js";import{p as a,q as b,r as c,s as d}from"./chunk-
|
|
1
|
+
import"./chunk-2GCKOQK4.js";import{p as a,q as b,r as c,s as d}from"./chunk-K7PM3FEJ.js";import"./chunk-52LSX2V5.js";export{d as Fragment,a as jsx,c as jsxDEV,b as jsxs};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as ServeHandlerOptions } from '../index-
|
|
2
|
-
export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentBridgeRequest, e as AgentContext, f as AgentConversation, g as AgentDeliveryError, h as AgentEventEnum, 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 AgentReplyPayload, r as AgentResolveContext, s as AgentSubscriber, C as Client, E as EditPayload, F as FileRef, M as MessageContent, t as MetadataSignal, N as NovuRequestHandler, R as ReplyContent, u as ReplyHandle, v as SentMessageInfo, w as Signal, T as TriggerSignal, x as agent, y as workflow } from '../index-
|
|
3
|
-
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-
|
|
4
|
-
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-
|
|
1
|
+
import { S as ServeHandlerOptions } from '../index-dylq0Kmx.js';
|
|
2
|
+
export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentBridgeRequest, e as AgentContext, f as AgentConversation, g as AgentDeliveryError, h as AgentEventEnum, 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 AgentReplyPayload, r as AgentResolveContext, s as AgentSubscriber, C as Client, E as EditPayload, F as FileRef, M as MessageContent, t as MetadataSignal, N as NovuRequestHandler, R as ReplyContent, u as ReplyHandle, v as SentMessageInfo, w as Signal, T as TriggerSignal, x as agent, y as workflow } from '../index-dylq0Kmx.js';
|
|
3
|
+
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-XZwesagD.js';
|
|
4
|
+
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-CC7F0JO_.js';
|
|
5
5
|
import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
|
|
6
6
|
export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
|
|
7
7
|
export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as h,c,d as m,e as f,f as H,g as v,h as w,i as E,j as S,k as x,l as A,m as N,n as R,o as a,p as k}from"../chunk-
|
|
1
|
+
import{b as h,c,d as m,e as f,f as H,g as v,h as w,i as E,j as S,k as x,l as A,m as N,n as R,o as a,p as k}from"../chunk-LJUUDK2J.js";import{O as b}from"../chunk-N4PZBM53.js";import"../chunk-K7PM3FEJ.js";import{a as O}from"../chunk-2M25EATE.js";import{a as V}from"../chunk-QTWEINJ4.js";import"../chunk-DKQLYSZS.js";import{f as y}from"../chunk-FRWG7YTE.js";import"../chunk-52LSX2V5.js";var l="express",F=p=>new a({frameworkName:l,...p,handler:(t,o)=>({body:()=>t.body,headers:e=>{let r=t.headers[e];return Array.isArray(r)?r[0]:r},method:()=>t.method||"GET",url:()=>{let e=t.headers.host||"",r=e!=null&&e.includes("://")?"":`${t.protocol||"https"}://`;return new URL(t.originalUrl||t.url||"",`${r}${e||""}`)},queryString:e=>{let r=t.query[e];return Array.isArray(r)?r[0]:r},transformResponse:({body:e,headers:r,status:s})=>(Object.entries(r).forEach(([n,d])=>{o.setHeader(n,d)}),o.status(s).send(e))})}).createHandler();export{c as Actions,A as AgentDeliveryError,R as AgentEventEnum,m as Button,f as Card,H as CardLink,v as CardText,h as Client,y as CronExpression,w as Divider,a as NovuRequestHandler,E as Select,S as SelectOption,b as SeverityLevelEnum,x as TextInput,N as agent,l as frameworkName,V as providerSchemas,F as serve,O as step,k as workflow};
|
package/dist/esm/servers/h3.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as h3 from 'h3';
|
|
2
2
|
import { H3Event } from 'h3';
|
|
3
|
-
import { S as ServeHandlerOptions } from '../index-
|
|
4
|
-
export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentBridgeRequest, e as AgentContext, f as AgentConversation, g as AgentDeliveryError, h as AgentEventEnum, 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 AgentReplyPayload, r as AgentResolveContext, s as AgentSubscriber, C as Client, E as EditPayload, F as FileRef, M as MessageContent, t as MetadataSignal, N as NovuRequestHandler, R as ReplyContent, u as ReplyHandle, v as SentMessageInfo, w as Signal, T as TriggerSignal, x as agent, y as workflow } from '../index-
|
|
5
|
-
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-
|
|
6
|
-
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-
|
|
3
|
+
import { S as ServeHandlerOptions } from '../index-dylq0Kmx.js';
|
|
4
|
+
export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentBridgeRequest, e as AgentContext, f as AgentConversation, g as AgentDeliveryError, h as AgentEventEnum, 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 AgentReplyPayload, r as AgentResolveContext, s as AgentSubscriber, C as Client, E as EditPayload, F as FileRef, M as MessageContent, t as MetadataSignal, N as NovuRequestHandler, R as ReplyContent, u as ReplyHandle, v as SentMessageInfo, w as Signal, T as TriggerSignal, x as agent, y as workflow } from '../index-dylq0Kmx.js';
|
|
5
|
+
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-XZwesagD.js';
|
|
6
|
+
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-CC7F0JO_.js';
|
|
7
7
|
import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
|
|
8
8
|
export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
|
|
9
9
|
export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.js';
|
package/dist/esm/servers/h3.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as y,c as H,d as S,e as i,f,g,h as N,i as w,j as c,k as E,l as k,m as x,n as O,o as t,p as F}from"../chunk-
|
|
1
|
+
import{b as y,c as H,d as S,e as i,f,g,h as N,i as w,j as c,k as E,l as k,m as x,n as O,o as t,p as F}from"../chunk-LJUUDK2J.js";import{O as q}from"../chunk-N4PZBM53.js";import"../chunk-K7PM3FEJ.js";import{a as $}from"../chunk-2M25EATE.js";import{a as b}from"../chunk-QTWEINJ4.js";import"../chunk-DKQLYSZS.js";import{f as l}from"../chunk-FRWG7YTE.js";import"../chunk-52LSX2V5.js";import{getHeader as o,getQuery as a,readBody as p,send as n,setHeaders as m}from"h3";var h="h3",D=d=>new t({frameworkName:h,...d,handler:r=>({body:()=>p(r),headers:e=>o(r,e),method:()=>r.method,url:()=>new URL(String(r.path),`${process.env.NODE_ENV==="development"?"http":"https"}://${String(o(r,"host"))}`),queryString:e=>String(a(r)[e]),transformResponse:e=>{let{res:s}=r.node;return s.statusCode=e.status,m(r,e.headers),n(r,e.body)}})}).createHandler();export{H as Actions,k as AgentDeliveryError,O as AgentEventEnum,S as Button,i as Card,f as CardLink,g as CardText,y as Client,l as CronExpression,N as Divider,t as NovuRequestHandler,w as Select,c as SelectOption,q as SeverityLevelEnum,E as TextInput,x as agent,h as frameworkName,b as providerSchemas,D as serve,$ as step,F as workflow};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as aws_lambda from 'aws-lambda';
|
|
2
2
|
import { APIGatewayProxyEventV2, APIGatewayProxyResult } from 'aws-lambda';
|
|
3
|
-
import { S as ServeHandlerOptions } from '../index-
|
|
4
|
-
export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentBridgeRequest, e as AgentContext, f as AgentConversation, g as AgentDeliveryError, h as AgentEventEnum, 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 AgentReplyPayload, r as AgentResolveContext, s as AgentSubscriber, C as Client, E as EditPayload, F as FileRef, M as MessageContent, t as MetadataSignal, N as NovuRequestHandler, R as ReplyContent, u as ReplyHandle, v as SentMessageInfo, w as Signal, T as TriggerSignal, x as agent, y as workflow } from '../index-
|
|
5
|
-
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-
|
|
6
|
-
import { a as Either } from '../subscriber.types-
|
|
7
|
-
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-
|
|
3
|
+
import { S as ServeHandlerOptions } from '../index-dylq0Kmx.js';
|
|
4
|
+
export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentBridgeRequest, e as AgentContext, f as AgentConversation, g as AgentDeliveryError, h as AgentEventEnum, 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 AgentReplyPayload, r as AgentResolveContext, s as AgentSubscriber, C as Client, E as EditPayload, F as FileRef, M as MessageContent, t as MetadataSignal, N as NovuRequestHandler, R as ReplyContent, u as ReplyHandle, v as SentMessageInfo, w as Signal, T as TriggerSignal, x as agent, y as workflow } from '../index-dylq0Kmx.js';
|
|
5
|
+
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-XZwesagD.js';
|
|
6
|
+
import { a as Either } from '../subscriber.types-CC7F0JO_.js';
|
|
7
|
+
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-CC7F0JO_.js';
|
|
8
8
|
import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
|
|
9
9
|
export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
|
|
10
10
|
export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as u,c as P,d as h,e as i,f as w,g as l,h as f,i as x,j as c,k as E,l as I,m as A,n as G,o as n,p as q}from"../chunk-
|
|
1
|
+
import{b as u,c as P,d as h,e as i,f as w,g as l,h as f,i as x,j as c,k as E,l as I,m as A,n as G,o as n,p as q}from"../chunk-LJUUDK2J.js";import{O as b}from"../chunk-N4PZBM53.js";import"../chunk-K7PM3FEJ.js";import{a as g}from"../chunk-2M25EATE.js";import{a as S}from"../chunk-QTWEINJ4.js";import"../chunk-DKQLYSZS.js";import{f as m}from"../chunk-FRWG7YTE.js";import"../chunk-52LSX2V5.js";var p="lambda",H=y=>new n({frameworkName:p,...y,handler:r=>{let s=(e=>e.version==="2.0")(r);return{url:()=>{let e=s?r.requestContext.http.path:r.path,t=r.headers["x-forwarded-proto"]||"https",a=new URL(e,`${t}://${r.headers.host||r.headers.Host||""}`);for(let o in r.queryStringParameters)o&&a.searchParams.set(o,r.queryStringParameters[o]);return a},body:()=>{let e="{}";return r.body&&(e=r.isBase64Encoded?Buffer.from(r.body,"base64").toString():r.body),JSON.parse(e)},headers:e=>r.headers[e],queryString:e=>{var t;return(t=r.queryStringParameters)==null?void 0:t[e]},transformResponse:({body:e,status:t,headers:a})=>Promise.resolve({body:e,statusCode:t,headers:a}),method:()=>s?r.requestContext.http.method:r.httpMethod}}}).createHandler();export{P as Actions,I as AgentDeliveryError,G as AgentEventEnum,h as Button,i as Card,w as CardLink,l as CardText,u as Client,m as CronExpression,f as Divider,n as NovuRequestHandler,x as Select,c as SelectOption,b as SeverityLevelEnum,E as TextInput,A as agent,p as frameworkName,S as providerSchemas,H as serve,g as step,q as workflow};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { I as INovuRequestHandlerOptions, N as NovuRequestHandler, S as ServeHandlerOptions, C as Client, A as Agent } from '../index-
|
|
2
|
-
export { a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentBridgeRequest, e as AgentContext, f as AgentConversation, g as AgentDeliveryError, h as AgentEventEnum, 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 AgentReplyPayload, r as AgentResolveContext, s as AgentSubscriber, E as EditPayload, F as FileRef, M as MessageContent, t as MetadataSignal, R as ReplyContent, u as ReplyHandle, v as SentMessageInfo, w as Signal, T as TriggerSignal, x as agent, y as workflow } from '../index-
|
|
3
|
-
import { W as Workflow } from '../health-check.types-
|
|
4
|
-
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum } from '../health-check.types-
|
|
1
|
+
import { I as INovuRequestHandlerOptions, N as NovuRequestHandler, S as ServeHandlerOptions, C as Client, A as Agent } from '../index-dylq0Kmx.js';
|
|
2
|
+
export { a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentBridgeRequest, e as AgentContext, f as AgentConversation, g as AgentDeliveryError, h as AgentEventEnum, 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 AgentReplyPayload, r as AgentResolveContext, s as AgentSubscriber, E as EditPayload, F as FileRef, M as MessageContent, t as MetadataSignal, R as ReplyContent, u as ReplyHandle, v as SentMessageInfo, w as Signal, T as TriggerSignal, x as agent, y as workflow } from '../index-dylq0Kmx.js';
|
|
3
|
+
import { W as Workflow } from '../health-check.types-XZwesagD.js';
|
|
4
|
+
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum } from '../health-check.types-XZwesagD.js';
|
|
5
5
|
export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
|
|
6
6
|
export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.js';
|
|
7
|
-
import { a as Either } from '../subscriber.types-
|
|
8
|
-
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-
|
|
7
|
+
import { a as Either } from '../subscriber.types-CC7F0JO_.js';
|
|
8
|
+
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-CC7F0JO_.js';
|
|
9
9
|
import { Request, Response } from 'express';
|
|
10
10
|
import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
|
|
11
11
|
import { VercelRequest, VercelResponse } from '@vercel/node';
|
package/dist/esm/servers/nest.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as g,c as G,d as U,e as j,f as C,g as D,h as F,i as k,j as B,k as L,l as $,m as K,n as z,o as y,p as W}from"../chunk-
|
|
1
|
+
import{b as g,c as G,d as U,e as j,f as C,g as D,h as F,i as k,j as B,k as L,l as $,m as K,n as z,o as y,p as W}from"../chunk-LJUUDK2J.js";import{O as Q}from"../chunk-N4PZBM53.js";import"../chunk-K7PM3FEJ.js";import{a as X}from"../chunk-2M25EATE.js";import{a as J}from"../chunk-QTWEINJ4.js";import"../chunk-DKQLYSZS.js";import{f as V}from"../chunk-FRWG7YTE.js";import{d as a,e as n}from"../chunk-52LSX2V5.js";import{Inject as R,Injectable as E}from"@nestjs/common";import{ConfigurableModuleBuilder as x}from"@nestjs/common";var{ConfigurableModuleClass:d,MODULE_OPTIONS_TOKEN:m,OPTIONS_TYPE:ee,ASYNC_OPTIONS_TYPE:re}=new x().setClassMethodName("register").setFactoryMethodName("createNovuModuleOptions").setExtras(l=>({...l,isGlobal:!0})).build();var P="REGISTER_API_PATH";import{Injectable as I}from"@nestjs/common";var i=class{handler(e,r){return{body:()=>e.body,headers:t=>{let p=e.headers[t.toLowerCase()];return Array.isArray(p)?p[0]:p},method:()=>e.method||"GET",queryString:t=>{let p=e.query[t];return Array.isArray(p)?p[0]:p},url:()=>{let t=e.headers.host||"",p=t!=null&&t.includes("://")?"":`${e.protocol||"https"}://`;return new URL(e.originalUrl||e.url||"",`${p}${t||""}`)},transformResponse:({body:t,headers:p,status:T})=>(Object.entries(p).forEach(([N,S])=>{r.setHeader(N,S)}),r.status(T).send(t))}}};i=a([I()],i);var _="nest",u=class{constructor(e,r){this.options=e;this.novuHandler=r;this.novuRequestHandler=new y({frameworkName:_,...this.options,handler:this.novuHandler.handler})}async handleRequest(e,r){await this.novuRequestHandler.createHandler()(e,r)}};u=a([E(),n(0,R(m)),n(1,R(i))],u);import{Controller as A,Get as H,Inject as q,Options as b,Post as w,Req as f,Res as O}from"@nestjs/common";var s=class{constructor(e){this.novuService=e}async handleGet(e,r){await this.novuService.handleRequest(e,r)}async handlePost(e,r){await this.novuService.handleRequest(e,r)}async handleOptions(e,r){await this.novuService.handleRequest(e,r)}};a([H(),n(0,f()),n(1,O())],s.prototype,"handleGet",1),a([w(),n(0,f()),n(1,O())],s.prototype,"handlePost",1),a([b(),n(0,f()),n(1,O())],s.prototype,"handleOptions",1),s=a([A(),n(0,q(u))],s);import{Module as Y}from"@nestjs/common";import{PATH_METADATA as M}from"@nestjs/common/constants";var h={provide:P,useFactory:l=>{if(!l.apiPath)throw new Error("`apiPath` must be provided to set the controller path");Reflect.defineMetadata(M,l.apiPath,s)},inject:[m]};function v(l,e=[]){return e.reduce((r,o)=>o(r),l)}var c=class extends d{static register(e,r){var t;let o=d.register(e);return o.controllers=[v(s,e.controllerDecorators||[])],(t=o.providers)==null||t.push(h,u,i,...r||[]),o.exports=[u,i],o}static registerAsync(e,r){var t;let o=d.registerAsync(e);return o.controllers=[s],(t=o.providers)==null||t.push(h,u,i,...r||[]),o.exports=[u,i],o}};c=a([Y({})],c);export{G as Actions,$ as AgentDeliveryError,z as AgentEventEnum,U as Button,j as Card,C as CardLink,D as CardText,g as Client,V as CronExpression,F as Divider,m as NOVU_OPTIONS,u as NovuClient,s as NovuController,i as NovuHandler,c as NovuModule,y as NovuRequestHandler,P as REGISTER_API_PATH,k as Select,B as SelectOption,Q as SeverityLevelEnum,L as TextInput,K as agent,_ as frameworkName,J as providerSchemas,h as registerApiPath,X as step,W as workflow};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { NextRequest } from 'next/server';
|
|
2
|
-
import { S as ServeHandlerOptions } from '../index-
|
|
3
|
-
export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentBridgeRequest, e as AgentContext, f as AgentConversation, g as AgentDeliveryError, h as AgentEventEnum, 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 AgentReplyPayload, r as AgentResolveContext, s as AgentSubscriber, C as Client, E as EditPayload, F as FileRef, M as MessageContent, t as MetadataSignal, N as NovuRequestHandler, R as ReplyContent, u as ReplyHandle, v as SentMessageInfo, w as Signal, T as TriggerSignal, x as agent, y as workflow } from '../index-
|
|
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-dylq0Kmx.js';
|
|
3
|
+
export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentBridgeRequest, e as AgentContext, f as AgentConversation, g as AgentDeliveryError, h as AgentEventEnum, 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 AgentReplyPayload, r as AgentResolveContext, s as AgentSubscriber, C as Client, E as EditPayload, F as FileRef, M as MessageContent, t as MetadataSignal, N as NovuRequestHandler, R as ReplyContent, u as ReplyHandle, v as SentMessageInfo, w as Signal, T as TriggerSignal, x as agent, y as workflow } from '../index-dylq0Kmx.js';
|
|
4
|
+
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-XZwesagD.js';
|
|
5
|
+
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-CC7F0JO_.js';
|
|
6
6
|
import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
|
|
7
7
|
export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
|
|
8
8
|
export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.js';
|
package/dist/esm/servers/next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l,b as x,c as q,d as S,e as T,f as w,g as P,h as A,i as E,j as b,k as v,l as g,m as F,n as j,o as c,p as I}from"../chunk-
|
|
1
|
+
import{a as l,b as x,c as q,d as S,e as T,f as w,g as P,h as A,i as E,j as b,k as v,l as g,m as F,n as j,o as c,p as I}from"../chunk-LJUUDK2J.js";import{O as G}from"../chunk-N4PZBM53.js";import"../chunk-K7PM3FEJ.js";import{a as U}from"../chunk-2M25EATE.js";import{a as k}from"../chunk-QTWEINJ4.js";import"../chunk-DKQLYSZS.js";import{f as O}from"../chunk-FRWG7YTE.js";import"../chunk-52LSX2V5.js";var m="next",N=o=>typeof o=="object"&&o!==null&&typeof o.setHeader=="function"&&typeof o.status=="function"&&typeof o.send=="function",D=o=>{let p=new c({frameworkName:m,...o,handler:(h,R,d)=>{let n=R,i=e=>{let t=typeof n.headers.get=="function"?n.headers.get(e):n.headers[e];return Array.isArray(t)?t[0]:t};return{body:()=>typeof n.json=="function"?n.json():n.body,headers:i,method:()=>h||n.method||"",queryString:(e,t)=>{var a;let r=((a=n.query)==null?void 0:a[e])||t.searchParams.get(e);return Array.isArray(r)?r[0]:r},url:()=>{let e;try{e=new URL(n.url)}catch{}if(e){let s=i("host");if(s){let u=new URL(s.includes("://")?s:`${e.protocol}//${s}`);e.protocol=u.protocol,e.host=u.host,e.port=u.port,e.username=u.username,e.password=u.password}return e}let t="https",r=i("host")||"";try{(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="dev")&&(t="http")}catch{}return new URL(n.url,`${t}://${r}`)},transformResponse:({body:e,headers:t,status:r})=>{if(N(d)){Object.entries(t).forEach(([s,u])=>{d.setHeader(s,u)}),d.status(r).send(e);return}let a=l();return new a(e,{status:r,headers:t})}}}}).createHandler(),f=p.bind(null,void 0);return Object.defineProperties(f,{GET:{value:p.bind(null,"GET")},POST:{value:p.bind(null,"POST")},OPTIONS:{value:p.bind(null,"OPTIONS")}})};export{q as Actions,g as AgentDeliveryError,j as AgentEventEnum,S as Button,T as Card,w as CardLink,P as CardText,x as Client,O as CronExpression,A as Divider,c as NovuRequestHandler,E as Select,b as SelectOption,G as SeverityLevelEnum,v as TextInput,F as agent,m as frameworkName,k as providerSchemas,D as serve,U as step,I as workflow};
|