@novu/framework 2.13.0 → 2.13.1-rc.72c80d5b17
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/{agent.types-Dqm2VBTO.d.cts → agent.types-B5VnP69G.d.cts} +48 -2
- package/dist/cjs/ai-sdk/index.d.cts +1 -1
- package/dist/cjs/cards.cjs +1 -1
- package/dist/cjs/{health-check.types-B9FbzRbm.d.cts → health-check.types-CtWQ_YSy.d.cts} +4 -3
- package/dist/cjs/{index-CLZZRnNV.d.cts → index-vgb88C84.d.cts} +3 -3
- package/dist/cjs/index.cjs +88 -88
- package/dist/cjs/index.d.cts +5 -5
- package/dist/cjs/internal/index.cjs +43 -43
- package/dist/cjs/internal/index.d.cts +19 -15
- package/dist/cjs/langchain/index.cjs +1 -1
- package/dist/cjs/langchain/index.d.cts +15 -1
- package/dist/cjs/servers/express.cjs +88 -88
- package/dist/cjs/servers/express.d.cts +6 -6
- package/dist/cjs/servers/h3.cjs +86 -86
- package/dist/cjs/servers/h3.d.cts +6 -6
- package/dist/cjs/servers/hono.cjs +86 -86
- package/dist/cjs/servers/hono.d.cts +6 -6
- package/dist/cjs/servers/lambda.cjs +88 -88
- package/dist/cjs/servers/lambda.d.cts +6 -6
- package/dist/cjs/servers/nest.cjs +96 -96
- package/dist/cjs/servers/nest.d.cts +8 -8
- package/dist/cjs/servers/next.cjs +90 -90
- package/dist/cjs/servers/next.d.cts +6 -6
- package/dist/cjs/servers/nuxt.cjs +86 -86
- package/dist/cjs/servers/nuxt.d.cts +6 -6
- package/dist/cjs/servers/remix.cjs +86 -86
- package/dist/cjs/servers/remix.d.cts +6 -6
- package/dist/cjs/servers/sveltekit.cjs +74 -74
- package/dist/cjs/servers/sveltekit.d.cts +6 -6
- package/dist/cjs/step-resolver.cjs +4 -4
- package/dist/cjs/step-resolver.d.cts +17 -4
- package/dist/cjs/{subscriber.types-DubxcL8q.d.cts → subscriber.types-CyNKT0nZ.d.cts} +67 -2
- package/dist/cjs/validators.cjs +1 -1
- package/dist/esm/{agent.types-E3sxq6xr.d.ts → agent.types-HUDhyXrV.d.ts} +48 -2
- package/dist/esm/ai-sdk/index.d.ts +1 -1
- package/dist/esm/cards.js +1 -1
- package/dist/esm/{chunk-WDBIT4NK.js → chunk-CGZ5P44A.js} +66 -66
- package/dist/esm/chunk-FMKD6TON.js +1 -0
- package/dist/esm/{chunk-CANJPWLT.js → chunk-SPS3KBKF.js} +4 -4
- package/dist/esm/{chunk-FRWG7YTE.js → chunk-VY27ZAO7.js} +1 -1
- package/dist/esm/{chunk-46AHJTS7.js → chunk-X5AZIKIR.js} +8 -8
- package/dist/esm/{chunk-22DBAEUX.js → chunk-XIVU4VDS.js} +1 -1
- package/dist/esm/{chunk-2M25EATE.js → chunk-YLCLZVYS.js} +1 -1
- package/dist/esm/{health-check.types-BNocZ4Wk.d.ts → health-check.types-0Rv-l8yD.d.ts} +4 -3
- package/dist/esm/{index-CWldA6G5.d.ts → index-C0oUWDlb.d.ts} +3 -3
- package/dist/esm/index.d.ts +5 -5
- package/dist/esm/index.js +1 -1
- package/dist/esm/internal/index.d.ts +10 -6
- package/dist/esm/internal/index.js +1 -1
- package/dist/esm/jsx-dev-runtime.js +1 -1
- package/dist/esm/{jsx-runtime-P2HN3TPO.js → jsx-runtime-5ZWEWA4A.js} +1 -1
- package/dist/esm/jsx-runtime.js +1 -1
- package/dist/esm/langchain/index.d.ts +15 -1
- package/dist/esm/langchain/index.js +1 -1
- package/dist/esm/servers/express.d.ts +6 -6
- package/dist/esm/servers/express.js +1 -1
- package/dist/esm/servers/h3.d.ts +6 -6
- package/dist/esm/servers/h3.js +1 -1
- package/dist/esm/servers/hono.d.ts +6 -6
- package/dist/esm/servers/hono.js +1 -1
- package/dist/esm/servers/lambda.d.ts +6 -6
- package/dist/esm/servers/lambda.js +1 -1
- package/dist/esm/servers/nest.d.ts +8 -8
- package/dist/esm/servers/nest.js +1 -1
- package/dist/esm/servers/next.d.ts +6 -6
- package/dist/esm/servers/next.js +1 -1
- package/dist/esm/servers/nuxt.d.ts +6 -6
- package/dist/esm/servers/nuxt.js +1 -1
- package/dist/esm/servers/remix.d.ts +6 -6
- package/dist/esm/servers/remix.js +1 -1
- package/dist/esm/servers/sveltekit.d.ts +6 -6
- package/dist/esm/servers/sveltekit.js +1 -1
- package/dist/esm/step-resolver.d.ts +17 -4
- package/dist/esm/step-resolver.js +1 -1
- package/dist/esm/{subscriber.types-CmybpXhA.d.ts → subscriber.types-g7VnI_ZQ.d.ts} +67 -2
- package/dist/esm/validators.js +1 -1
- package/langchain/package.json +4 -0
- package/nest/package.json +2 -1
- package/package.json +2 -2
- package/dist/esm/chunk-LHU5A7DI.js +0 -1
- /package/dist/esm/{chunk-3ZWME5KT.js → chunk-7C3QBYLB.js} +0 -0
- /package/dist/esm/{chunk-XEHQJMMQ.js → chunk-RBTQQ5IZ.js} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { RequestEvent } from '@sveltejs/kit';
|
|
2
|
-
import { S as ServeHandlerOptions } from '../index-
|
|
3
|
-
export { C as Client, N as NovuRequestHandler, a as agent, w 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-vgb88C84.cjs';
|
|
3
|
+
export { C as Client, N as NovuRequestHandler, a as agent, w as workflow } from '../index-vgb88C84.cjs';
|
|
4
|
+
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-CtWQ_YSy.cjs';
|
|
5
|
+
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-CyNKT0nZ.cjs';
|
|
6
6
|
import { S as SupportedFrameworkName } from '../server.types-Cc6o5eYH.cjs';
|
|
7
7
|
export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
|
|
8
|
-
export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentContext, e as
|
|
9
|
-
export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.cjs';
|
|
8
|
+
export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentContext, e as AgentContextPayload, f as AgentContextValue, g as AgentConversation, h as AgentDeliveryError, i as AgentError, j as AgentHandlerContext, k as AgentHandlers, l as AgentHistoryEntry, m as AgentMessage, n as AgentMessageAuthor, o as AgentMessageContext, p as AgentPlatformContext, q as AgentReaction, r as AgentReactionContext, s as AgentResolveContext, t as AgentSubscriber, u as AgentSubscriberAccess, v as AgentToolCall, F as FileRef, M as MessageContent, R as ReplyHandle, T as ToolApprovalCard, w as ToolApprovalConfig, x as ToolApprovalDecision, y as toAgentError } from '../agent.types-B5VnP69G.cjs';
|
|
9
|
+
export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, ToolStepResolver, step } from '../step-resolver.cjs';
|
|
10
10
|
import '../util.types-DaFfsxgy.cjs';
|
|
11
11
|
import '../base.schema.types-BApIn9jr.cjs';
|
|
12
12
|
import 'json-schema-to-ts';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";var l=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var W=Object.prototype.hasOwnProperty;var G=(n,i)=>{for(var e in i)l(n,e,{get:i[e],enumerable:!0})},X=(n,i,e,d)=>{if(i&&typeof i=="object"||typeof i=="function")for(let a of _(i))!W.call(n,a)&&a!==e&&l(n,a,{get:()=>i[a],enumerable:!(d=B(i,a))||d.enumerable});return n};var K=n=>X(l({},"__esModule",{value:!0}),n);var Je={};G(Je,{actionStepSchemas:()=>U,channelStepSchemas:()=>H,providerSchemas:()=>I,step:()=>c});module.exports=K(Je);function V(n,i,e){return{type:"email",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function Y(n,i,e){return{type:"sms",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function $(n,i,e){return{type:"chat",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function Q(n,i,e){return{type:"push",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function Z(n,i,e){return{type:"in_app",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function ee(n,i,e){return{type:"delay",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip}}function te(n,i,e){return{type:"digest",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip}}function ie(n,i,e){return{type:"throttle",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip}}var c={email:V,sms:Y,chat:$,push:Q,inApp:Z,delay:ee,digest:te,throttle:ie};var t={output:{type:"object",properties:{},required:[],additionalProperties:!0}};var ne={type:"object",properties:{webhookUrl:{type:"string",format:"uri"},text:{type:"string"},blocks:{type:"array",items:{type:"object",properties:{type:{enum:["image","context","actions","divider","section","input","file","header","video","rich_text"]}},required:["type"],additionalProperties:!0}}},additionalProperties:!0},p={output:ne};var h={"chat-webhook":t,discord:t,getstream:t,"grafana-on-call":t,mattermost:t,msteams:t,"rocket-chat":t,ryver:t,sendblue:t,slack:p,"whatsapp-business":t,zulip:t,telegram:t};var se={type:"object",properties:{to:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:'Email address of the recipient(s). Example: "Bob bob@host.com". You can use commas to separate multiple recipients (e.g.: "test@example.com,test@example.com" or ["test@example.com", "test@example.com"]).'},from:{type:"string"},subject:{type:"string",description:"Subject of the message."},text:{type:"string",description:"Text version of the message."},html:{type:"string",description:"HTML version of the message."},message:{type:"string",description:"MIME string of the message. Make sure to use multipart/form-data to send this as a file upload."},cc:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Same as To but for carbon copy"},bcc:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Same as To but for blind carbon copy"},ampHtml:{type:"string"},tVersion:{type:"string"},tText:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},oTag:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Tag string. See Tagging for more information."},oDkim:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Enables/disabled DKIM signatures on per-message basis. Pass yes or no"},oDeliverytime:{type:"string",description:"Desired time of delivery. See Date Format. Note: Messages can be scheduled for a maximum of 3 days in the future."},oDeliverytimeOptimizePeriod:{type:"string"},oTimeZoneLocalize:{type:"string"},oTestmode:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Enables sending in test mode. Pass yes if needed. See Sending in Test Mode"},oTracking:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Toggles tracking on a per-message basis, see Tracking Messages for details. Pass yes or no."},oTrackingClicks:{anyOf:[{type:"string",enum:["yes","no","htmlonly"]},{type:"boolean"}],description:"Toggles clicks tracking on a per-message basis. Has higher priority than domain-level setting. Pass yes, no or htmlonly."},oTrackingOpens:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Toggles opens tracking on a per-message basis. Has higher priority than domain-level setting. Pass yes or no."},oRequireTls:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},oSkipVerification:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},recipientVariables:{type:"string"}},required:[],additionalProperties:!0},m={output:se};var o={type:"object",properties:{name:{type:"string"},email:{type:"string"}},description:'JSON object, containing 2 properties: Name and Email address of a previously validated and active sender. Including the Name property in the JSON is optional. This property is not mandatory in case you use TemplateID and you specified a From address for the template. Format : { "Email":"value", "Name":"value" }.',required:["Email"],additionalProperties:!0},oe={type:"object",properties:{contentType:{type:"string"},filename:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},ae={type:"object",properties:{filename:{type:"string"},contentType:{type:"string"},contentId:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},re={type:"object",properties:{from:o,sender:o,to:{type:"array",items:o},cc:{type:"array",items:o},bcc:{type:"array",items:o},replyTo:o,subject:{type:"string"},textPart:{type:"string",description:"Content of the message, sent in Text and/or HTML format. At least one of these content types needs to be specified. When the HTML part is the only part provided, Mailjet will not generate a Text-part from the HTML version. The property can't be set when you use TemplateID"},htmlPart:{type:"string",description:"Content of the message, sent in Text and/or HTML format. At least one of these content types needs to be specified. When the HTML part is the only part provided, Mailjet will not generate a Text-part from the HTML version. The property can't be set when you use TemplateID"},templateId:{type:"number",description:"an ID for a template that is previously created and stored in Mailjet's system. It is mandatory when From and TextPart and/or HtmlPart are not provided. "},templateLanguage:{type:"boolean"},templateErrorReporting:o,templateErrorDeliver:{type:"boolean"},attachments:{type:"array",items:oe},inlineAttachments:{type:"array",items:ae},priority:{type:"number"},customCampaign:{type:"string"},deduplicateCampaign:{type:"boolean"},trackOpens:{type:"string",enum:["account_default","disabled","enabled"]},trackClicks:{type:"string",enum:["account_default","disabled","enabled"]},customId:{type:"string"},eventPayload:{type:"string"},urlTags:{type:"string"},headers:{type:"object",additionalProperties:!0},variables:{type:"object",additionalProperties:!0}},required:[],additionalProperties:!0},u={output:re};var s={type:"object",properties:{address:{type:"string"},name:{type:"string"}},additionalProperties:!0},r={type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0},le={type:"object",properties:{from:{anyOf:[{type:"string"},s]},sender:{anyOf:[{type:"string"},s]},to:{anyOf:[{type:"string"},s,{type:"array",items:s}]},cc:{anyOf:[{type:"string"},s,{type:"array",items:s}]},bcc:{anyOf:[{type:"string"},s,{type:"array",items:s}]},replyTo:{anyOf:[{type:"string"},s,{type:"array",items:s}]},inReplyTo:{anyOf:[{type:"string"},s]},references:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},subject:{type:"string"},text:{anyOf:[{type:"string"},r]},html:{anyOf:[{type:"string"},r]},watchHtml:{anyOf:[{type:"string"},r]},amp:{anyOf:[{type:"string"},{type:"object",properties:{content:{type:"string"},path:{type:"string"},href:{type:"string"},encoding:{type:"string"},contentType:{type:"string"},raw:{anyOf:[{type:"string"},r]}}}]},icalEvent:{anyOf:[{type:"string"},{type:"object",properties:{content:{type:"string"},path:{type:"string"},method:{type:"string"},filename:{anyOf:[{type:"string"},{type:"boolean"}]},href:{type:"string"},encoding:{type:"string"}}}]},headers:{anyOf:[{type:"object",additionalProperties:!0},{type:"array",items:{type:"object",additionalProperties:!0}}]},list:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},attachments:{type:"array",items:{type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0}}},required:[],additionalProperties:!0},y={output:le};var de={type:"object",properties:{},required:[],additionalProperties:!1},f={output:de};var ce={type:"object",properties:{personalizations:{type:"array",description:"An array of messages and their metadata. Each object within personalizations can be thought of as an envelope - it defines who should receive an individual message and how that message should be handled. See our [Personalizations documentation](https://sendgrid.com/docs/for-developers/sending-email/personalizations/) for examples.",uniqueItems:!1,maxItems:1e3,items:{type:"object",properties:{from:{title:"From Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account."},name:{type:"string",description:"A name or title associated with the sending email address."}},required:["email"]},to:{title:"To Email Array",type:"array",items:{type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},cc:{type:"array",description:"An array of recipients who will receive a copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.",maxItems:1e3,items:{title:"CC BCC Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},bcc:{type:"array",description:"An array of recipients who will receive a blind carbon copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.",maxItems:1e3,items:{title:"CC BCC Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},subject:{type:"string",description:"The subject of your email. See character length requirements according to [RFC 2822](http://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit#answer-1592310).",minLength:1},headers:{type:"object",description:"A collection of JSON key/value pairs allowing you to specify handling instructions for your email. You may not overwrite the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`"},substitutions:{type:"object",description:'Substitutions allow you to insert data without using Dynamic Transactional Templates. This field should **not** be used in combination with a Dynamic Transactional Template, which can be identified by a `templateId` starting with `d-`. This field is a collection of key/value pairs following the pattern "substitutionTag":"value to substitute". The key/value pairs must be strings. These substitutions will apply to the text and html content of the body of your email, in addition to the `subject` and `reply-to` parameters. The total collective size of your substitutions may not exceed 10,000 bytes per personalization object.',maxProperties:1e4},dynamicTemplateData:{type:"object",description:'Dynamic template data is available using Handlebars syntax in Dynamic Transactional Templates. This field should be used in combination with a Dynamic Transactional Template, which can be identified by a `templateId` starting with `d-`. This field is a collection of key/value pairs following the pattern "variable_name":"value to insert".'},customArgs:{type:"object",description:"Values that are specific to this personalization that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This field may not exceed 10,000 bytes.",maxProperties:1e4},sendAt:{type:"integer",description:"A unix timestamp allowing you to specify when your email should be delivered. Scheduling delivery more than 72 hours in advance is forbidden."}},required:["to"]}},from:{title:"From Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account."},name:{type:"string",description:"A name or title associated with the sending email address."}},required:["email"]},replyTo:{title:"Reply_to Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The email address where any replies or bounces will be returned."},name:{type:"string",description:"A name or title associated with the `replyTo` email address."}},required:["email"]},replyToList:{type:"array",description:"An array of recipients who will receive replies and/or bounces. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name. You can either choose to use \u201CreplyTo\u201D field or \u201CreplyToList\u201D but not both.",uniqueItems:!0,maxItems:1e3,items:{type:"object",properties:{email:{type:"string",description:"The email address where any replies or bounces will be returned.",format:"email"},name:{type:"string",description:"A name or title associated with the `replyToList` email address."}},required:["email"]}},subject:{type:"string",description:"The global or 'message level' subject of your email. This may be overridden by subject lines set in personalizations.",minLength:1},content:{type:"array",description:"An array where you can specify the content of your email. You can include multiple [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of content, but you must specify at least one MIME type. To include more than one MIME type, add another object to the array containing the `type` and `value` parameters.",items:{type:"object",properties:{type:{type:"string",description:"The MIME type of the content you are including in your email (e.g., `\u201Ctext/plain\u201D` or `\u201Ctext/html\u201D`).",minLength:1},value:{type:"string",description:"The actual content of the specified MIME type that you are including in your email.",minLength:1}},required:["type","value"]}},attachments:{type:"array",description:"An array of objects where you can specify any attachments you want to include.",items:{type:"object",properties:{content:{type:"string",description:"The Base64 encoded content of the attachment.",minLength:1},type:{type:"string",description:"The MIME type of the content you are attaching (e.g., `\u201Ctext/plain\u201D` or `\u201Ctext/html\u201D`).",minLength:1},filename:{type:"string",description:"The attachment's filename."},disposition:{type:"string",default:"attachment",description:"The attachment's content-disposition, specifying how you would like the attachment to be displayed. For example, `\u201Cinline\u201D` results in the attached file are displayed automatically within the message while `\u201Cattachment\u201D` results in the attached file require some action to be taken before it is displayed, such as opening or downloading the file.",enum:["inline","attachment"]},contentId:{type:"string",description:"The attachment's content ID. This is used when the disposition is set to `\u201Cinline\u201D` and the attachment is an image, allowing the file to be displayed within the body of your email."}},required:["content","filename"]}},templateId:{type:"string",description:"An email template ID. A template that contains a subject and content \u2014 either text or html \u2014 will override any subject and content values specified at the personalizations or message level."},headers:{description:"An object containing key/value pairs of header names and the value to substitute for them. The key/value pairs must be strings. You must ensure these are properly encoded if they contain unicode characters. These headers cannot be one of the reserved headers.",type:"object"},categories:{type:"array",description:"An array of category names for this message. Each category name may not exceed 255 characters. ",uniqueItems:!0,maxItems:10,items:{type:"string",maxLength:255}},customArgs:{description:"Values that are specific to the entire send that will be carried along with the email and its activity data. Key/value pairs must be strings. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This parameter is overridden by `customArgs` set at the personalizations level. Total `customArgs` size may not exceed 10,000 bytes.",type:"string"},sendAt:{type:"integer",description:"A unix timestamp allowing you to specify when you want your email to be delivered. This may be overridden by the `sendAt` parameter set at the personalizations level. Delivery cannot be scheduled more than 72 hours in advance. If you have the flexibility, it's better to schedule mail for off-peak times. Most emails are scheduled and sent at the top of the hour or half hour. Scheduling email to avoid peak times \u2014 for example, scheduling at 10:53 \u2014 can result in lower deferral rates due to the reduced traffic during off-peak times."},batchId:{type:"string",description:"An ID representing a batch of emails to be sent at the same time. Including a `batchId` in your request allows you include this email in that batch. It also enables you to cancel or pause the delivery of that batch. For more information, see the [Cancel Scheduled Sends API](https://sendgrid.com/docs/api-reference/)."},asm:{type:"object",description:"An object allowing you to specify how to handle unsubscribes.",properties:{groupId:{type:"integer",description:"The unsubscribe group to associate with this email."},groupsToDisplay:{type:"array",description:"An array containing the unsubscribe groups that you would like to be displayed on the unsubscribe preferences page.",maxItems:25,items:{type:"integer"}}},required:["groupId"]},ipPoolName:{type:"string",description:"The IP Pool that you would like to send this email from.",minLength:2,maxLength:64},mailSettings:{type:"object",description:"A collection of different mail settings that you can use to specify how you would like this email to be handled.",properties:{bypassListManagement:{type:"object",description:"Allows you to bypass all unsubscribe groups and suppressions to ensure that the email is delivered to every single recipient. This should only be used in emergencies when it is absolutely necessary that every recipient receives your email. This filter cannot be combined with any other bypass filters. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassSpamManagement:{type:"object",description:"Allows you to bypass the spam report list to ensure that the email is delivered to recipients. Bounce and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassBounceManagement:{type:"object",description:"Allows you to bypass the bounce list to ensure that the email is delivered to recipients. Spam report and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassUnsubscribeManagement:{type:"object",description:"Allows you to bypass the global unsubscribe list to ensure that the email is delivered to recipients. Bounce and spam report lists will still be checked; addresses on these other lists will not receive the message. This filter applies only to global unsubscribes and will not bypass group unsubscribes. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},footer:{type:"object",description:"The default footer that you would like included on every email.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},text:{type:"string",description:"The plain text content of your footer."},html:{type:"string",description:"The HTML content of your footer."}}},sandboxMode:{type:"object",description:"Sandbox Mode allows you to send a test email to ensure that your request body is valid and formatted correctly.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}}}},trackingSettings:{type:"object",description:"Settings to determine how you would like to track the metrics of how your recipients interact with your email.",properties:{clickTracking:{type:"object",description:"Allows you to track if a recipient clicked a link in your email.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},enableText:{type:"boolean",description:"Indicates if this setting should be included in the `text/plain` portion of your email."}}},openTracking:{type:"object",description:"Allows you to track if the email was opened by including a single pixel image in the body of the content. When the pixel is loaded, Twilio SendGrid can log that the email was opened.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},substitutionTag:{type:"string",description:"Allows you to specify a substitution tag that you can insert in the body of your email at a location that you desire. This tag will be replaced by the open tracking pixel."}}},subscriptionTracking:{type:"object",description:"Allows you to insert a subscription management link at the bottom of the text and HTML bodies of your email. If you would like to specify the location of the link within your email, you may use the `substitutionTag`.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},text:{type:"string",description:"Text to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>"},html:{type:"string",description:"HTML to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>"},substitutionTag:{type:"string",description:"A tag that will be replaced with the unsubscribe URL. for example: `[unsubscribe_url]`. If this parameter is used, it will override both the `text` and `html` parameters. The URL of the link will be placed at the substitution tag\u2019s location with no additional formatting."}}},ganalytics:{type:"object",description:"Allows you to enable tracking provided by Google Analytics.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},utmSource:{type:"string",description:"Name of the referrer source. (e.g. Google, SomeDomain.com, or Marketing Email)"},utmMedium:{type:"string",description:"Name of the marketing medium. (e.g. Email)"},utmTerm:{type:"string",description:"Used to identify any paid keywords."},utmContent:{type:"string",description:"Used to differentiate your campaign from advertisements."},utmCampaign:{type:"string",description:"The name of the campaign."}}}}}},required:[],additionalProperties:!1},g={output:ce};var S={anypost:t,braze:t,clickatell:t,nodemailer:y,emailjs:t,"email-webhook":t,"infobip-email":t,mailersend:t,mailgun:m,mailjet:u,mailtrap:t,mandrill:t,netcore:t,"novu-email":f,outlook365:t,plunk:t,postmark:t,resend:t,sendgrid:g,sendinblue:t,ses:t,sparkpost:t};var pe={type:"object",properties:{},required:[],additionalProperties:!1},b={output:pe};var v={novu:b};var T={anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{name:{type:"string"},volume:{type:"number"},critical:{type:"number"}},required:["name","volume","critical"]}]},he={type:"object",properties:{topic:{type:"string",description:"The destination topic for the notification."},id:{type:"string",description:"A UUID to identify the notification with APNS. If an id is not supplied, APNS will generate one automatically. If an error occurs the response will contain the id. This property populates the apns-id header."},expiry:{type:"number",description:"A UNIX timestamp when the notification should expire. If the notification cannot be delivered to the device, APNS will retry until it expires. An expiry of 0 indicates that the notification expires immediately, therefore no retries will be attempted."},priority:{type:"number",description:`Provide one of the following values:
|
|
1
|
+
"use strict";var l=Object.defineProperty;var W=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var X=Object.prototype.hasOwnProperty;var K=(n,i)=>{for(var e in i)l(n,e,{get:i[e],enumerable:!0})},V=(n,i,e,d)=>{if(i&&typeof i=="object"||typeof i=="function")for(let s of G(i))!X.call(n,s)&&s!==e&&l(n,s,{get:()=>i[s],enumerable:!(d=W(i,s))||d.enumerable});return n};var Y=n=>V(l({},"__esModule",{value:!0}),n);var He={};K(He,{actionStepSchemas:()=>M,channelStepSchemas:()=>_,providerSchemas:()=>I,step:()=>c});module.exports=Y(He);function $(n,i,e){return{type:"email",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function Q(n,i,e){return{type:"sms",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function Z(n,i,e){return{type:"chat",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function ee(n,i,e){return{type:"push",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function te(n,i,e){return{type:"in_app",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function ie(n,i,e){return{type:"tool",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip,providers:e==null?void 0:e.providers,disableOutputSanitization:e==null?void 0:e.disableOutputSanitization}}function ne(n,i,e){return{type:"delay",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip}}function oe(n,i,e){return{type:"digest",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip}}function ae(n,i,e){return{type:"throttle",stepId:n,resolve:i,controlSchema:e==null?void 0:e.controlSchema,payloadSchema:e==null?void 0:e.payloadSchema,envSchema:e==null?void 0:e.envSchema,skip:e==null?void 0:e.skip}}var c={email:$,sms:Q,chat:Z,push:ee,inApp:te,tool:ie,delay:ne,digest:oe,throttle:ae};var t={output:{type:"object",properties:{},required:[],additionalProperties:!0}};var se={type:"object",properties:{webhookUrl:{type:"string",format:"uri"},text:{type:"string"},blocks:{type:"array",items:{type:"object",properties:{type:{enum:["image","context","actions","divider","section","input","file","header","video","rich_text"]}},required:["type"],additionalProperties:!0}}},additionalProperties:!0},p={output:se};var h={"chat-webhook":t,discord:t,getstream:t,"grafana-on-call":t,mattermost:t,msteams:t,"rocket-chat":t,ryver:t,sendblue:t,slack:p,"whatsapp-business":t,zulip:t,telegram:t};var re={type:"object",properties:{to:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:'Email address of the recipient(s). Example: "Bob bob@host.com". You can use commas to separate multiple recipients (e.g.: "test@example.com,test@example.com" or ["test@example.com", "test@example.com"]).'},from:{type:"string"},subject:{type:"string",description:"Subject of the message."},text:{type:"string",description:"Text version of the message."},html:{type:"string",description:"HTML version of the message."},message:{type:"string",description:"MIME string of the message. Make sure to use multipart/form-data to send this as a file upload."},cc:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Same as To but for carbon copy"},bcc:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Same as To but for blind carbon copy"},ampHtml:{type:"string"},tVersion:{type:"string"},tText:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},oTag:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Tag string. See Tagging for more information."},oDkim:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Enables/disabled DKIM signatures on per-message basis. Pass yes or no"},oDeliverytime:{type:"string",description:"Desired time of delivery. See Date Format. Note: Messages can be scheduled for a maximum of 3 days in the future."},oDeliverytimeOptimizePeriod:{type:"string"},oTimeZoneLocalize:{type:"string"},oTestmode:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Enables sending in test mode. Pass yes if needed. See Sending in Test Mode"},oTracking:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Toggles tracking on a per-message basis, see Tracking Messages for details. Pass yes or no."},oTrackingClicks:{anyOf:[{type:"string",enum:["yes","no","htmlonly"]},{type:"boolean"}],description:"Toggles clicks tracking on a per-message basis. Has higher priority than domain-level setting. Pass yes, no or htmlonly."},oTrackingOpens:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Toggles opens tracking on a per-message basis. Has higher priority than domain-level setting. Pass yes or no."},oRequireTls:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},oSkipVerification:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},recipientVariables:{type:"string"}},required:[],additionalProperties:!0},m={output:re};var a={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},le={type:"object",properties:{contentType:{type:"string"},filename:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},de={type:"object",properties:{filename:{type:"string"},contentType:{type:"string"},contentId:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},ce={type:"object",properties:{from:a,sender:a,to:{type:"array",items:a},cc:{type:"array",items:a},bcc:{type:"array",items:a},replyTo:a,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:a,templateErrorDeliver:{type:"boolean"},attachments:{type:"array",items:le},inlineAttachments:{type:"array",items:de},priority:{type:"number"},customCampaign:{type:"string"},deduplicateCampaign:{type:"boolean"},trackOpens:{type:"string",enum:["account_default","disabled","enabled"]},trackClicks:{type:"string",enum:["account_default","disabled","enabled"]},customId:{type:"string"},eventPayload:{type:"string"},urlTags:{type:"string"},headers:{type:"object",additionalProperties:!0},variables:{type:"object",additionalProperties:!0}},required:[],additionalProperties:!0},u={output:ce};var o={type:"object",properties:{address:{type:"string"},name:{type:"string"}},additionalProperties:!0},r={type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0},pe={type:"object",properties:{from:{anyOf:[{type:"string"},o]},sender:{anyOf:[{type:"string"},o]},to:{anyOf:[{type:"string"},o,{type:"array",items:o}]},cc:{anyOf:[{type:"string"},o,{type:"array",items:o}]},bcc:{anyOf:[{type:"string"},o,{type:"array",items:o}]},replyTo:{anyOf:[{type:"string"},o,{type:"array",items:o}]},inReplyTo:{anyOf:[{type:"string"},o]},references:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},subject:{type:"string"},text:{anyOf:[{type:"string"},r]},html:{anyOf:[{type:"string"},r]},watchHtml:{anyOf:[{type:"string"},r]},amp:{anyOf:[{type:"string"},{type:"object",properties:{content:{type:"string"},path:{type:"string"},href:{type:"string"},encoding:{type:"string"},contentType:{type:"string"},raw:{anyOf:[{type:"string"},r]}}}]},icalEvent:{anyOf:[{type:"string"},{type:"object",properties:{content:{type:"string"},path:{type:"string"},method:{type:"string"},filename:{anyOf:[{type:"string"},{type:"boolean"}]},href:{type:"string"},encoding:{type:"string"}}}]},headers:{anyOf:[{type:"object",additionalProperties:!0},{type:"array",items:{type:"object",additionalProperties:!0}}]},list:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},attachments:{type:"array",items:{type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0}}},required:[],additionalProperties:!0},y={output:pe};var he={type:"object",properties:{},required:[],additionalProperties:!1},f={output:he};var me={type:"object",properties:{personalizations:{type:"array",description:"An array of messages and their metadata. Each object within personalizations can be thought of as an envelope - it defines who should receive an individual message and how that message should be handled. See our [Personalizations documentation](https://sendgrid.com/docs/for-developers/sending-email/personalizations/) for examples.",uniqueItems:!1,maxItems:1e3,items:{type:"object",properties:{from:{title:"From Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account."},name:{type:"string",description:"A name or title associated with the sending email address."}},required:["email"]},to:{title:"To Email Array",type:"array",items:{type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},cc:{type:"array",description:"An array of recipients who will receive a copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.",maxItems:1e3,items:{title:"CC BCC Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},bcc:{type:"array",description:"An array of recipients who will receive a blind carbon copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.",maxItems:1e3,items:{title:"CC BCC Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},subject:{type:"string",description:"The subject of your email. See character length requirements according to [RFC 2822](http://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit#answer-1592310).",minLength:1},headers:{type:"object",description:"A collection of JSON key/value pairs allowing you to specify handling instructions for your email. You may not overwrite the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`"},substitutions:{type:"object",description:'Substitutions allow you to insert data without using Dynamic Transactional Templates. This field should **not** be used in combination with a Dynamic Transactional Template, which can be identified by a `templateId` starting with `d-`. This field is a collection of key/value pairs following the pattern "substitutionTag":"value to substitute". The key/value pairs must be strings. These substitutions will apply to the text and html content of the body of your email, in addition to the `subject` and `reply-to` parameters. The total collective size of your substitutions may not exceed 10,000 bytes per personalization object.',maxProperties:1e4},dynamicTemplateData:{type:"object",description:'Dynamic template data is available using Handlebars syntax in Dynamic Transactional Templates. This field should be used in combination with a Dynamic Transactional Template, which can be identified by a `templateId` starting with `d-`. This field is a collection of key/value pairs following the pattern "variable_name":"value to insert".'},customArgs:{type:"object",description:"Values that are specific to this personalization that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This field may not exceed 10,000 bytes.",maxProperties:1e4},sendAt:{type:"integer",description:"A unix timestamp allowing you to specify when your email should be delivered. Scheduling delivery more than 72 hours in advance is forbidden."}},required:["to"]}},from:{title:"From Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account."},name:{type:"string",description:"A name or title associated with the sending email address."}},required:["email"]},replyTo:{title:"Reply_to Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The email address where any replies or bounces will be returned."},name:{type:"string",description:"A name or title associated with the `replyTo` email address."}},required:["email"]},replyToList:{type:"array",description:"An array of recipients who will receive replies and/or bounces. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name. You can either choose to use \u201CreplyTo\u201D field or \u201CreplyToList\u201D but not both.",uniqueItems:!0,maxItems:1e3,items:{type:"object",properties:{email:{type:"string",description:"The email address where any replies or bounces will be returned.",format:"email"},name:{type:"string",description:"A name or title associated with the `replyToList` email address."}},required:["email"]}},subject:{type:"string",description:"The global or 'message level' subject of your email. This may be overridden by subject lines set in personalizations.",minLength:1},content:{type:"array",description:"An array where you can specify the content of your email. You can include multiple [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of content, but you must specify at least one MIME type. To include more than one MIME type, add another object to the array containing the `type` and `value` parameters.",items:{type:"object",properties:{type:{type:"string",description:"The MIME type of the content you are including in your email (e.g., `\u201Ctext/plain\u201D` or `\u201Ctext/html\u201D`).",minLength:1},value:{type:"string",description:"The actual content of the specified MIME type that you are including in your email.",minLength:1}},required:["type","value"]}},attachments:{type:"array",description:"An array of objects where you can specify any attachments you want to include.",items:{type:"object",properties:{content:{type:"string",description:"The Base64 encoded content of the attachment.",minLength:1},type:{type:"string",description:"The MIME type of the content you are attaching (e.g., `\u201Ctext/plain\u201D` or `\u201Ctext/html\u201D`).",minLength:1},filename:{type:"string",description:"The attachment's filename."},disposition:{type:"string",default:"attachment",description:"The attachment's content-disposition, specifying how you would like the attachment to be displayed. For example, `\u201Cinline\u201D` results in the attached file are displayed automatically within the message while `\u201Cattachment\u201D` results in the attached file require some action to be taken before it is displayed, such as opening or downloading the file.",enum:["inline","attachment"]},contentId:{type:"string",description:"The attachment's content ID. This is used when the disposition is set to `\u201Cinline\u201D` and the attachment is an image, allowing the file to be displayed within the body of your email."}},required:["content","filename"]}},templateId:{type:"string",description:"An email template ID. A template that contains a subject and content \u2014 either text or html \u2014 will override any subject and content values specified at the personalizations or message level."},headers:{description:"An object containing key/value pairs of header names and the value to substitute for them. The key/value pairs must be strings. You must ensure these are properly encoded if they contain unicode characters. These headers cannot be one of the reserved headers.",type:"object"},categories:{type:"array",description:"An array of category names for this message. Each category name may not exceed 255 characters. ",uniqueItems:!0,maxItems:10,items:{type:"string",maxLength:255}},customArgs:{description:"Values that are specific to the entire send that will be carried along with the email and its activity data. Key/value pairs must be strings. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This parameter is overridden by `customArgs` set at the personalizations level. Total `customArgs` size may not exceed 10,000 bytes.",type:"string"},sendAt:{type:"integer",description:"A unix timestamp allowing you to specify when you want your email to be delivered. This may be overridden by the `sendAt` parameter set at the personalizations level. Delivery cannot be scheduled more than 72 hours in advance. If you have the flexibility, it's better to schedule mail for off-peak times. Most emails are scheduled and sent at the top of the hour or half hour. Scheduling email to avoid peak times \u2014 for example, scheduling at 10:53 \u2014 can result in lower deferral rates due to the reduced traffic during off-peak times."},batchId:{type:"string",description:"An ID representing a batch of emails to be sent at the same time. Including a `batchId` in your request allows you include this email in that batch. It also enables you to cancel or pause the delivery of that batch. For more information, see the [Cancel Scheduled Sends API](https://sendgrid.com/docs/api-reference/)."},asm:{type:"object",description:"An object allowing you to specify how to handle unsubscribes.",properties:{groupId:{type:"integer",description:"The unsubscribe group to associate with this email."},groupsToDisplay:{type:"array",description:"An array containing the unsubscribe groups that you would like to be displayed on the unsubscribe preferences page.",maxItems:25,items:{type:"integer"}}},required:["groupId"]},ipPoolName:{type:"string",description:"The IP Pool that you would like to send this email from.",minLength:2,maxLength:64},mailSettings:{type:"object",description:"A collection of different mail settings that you can use to specify how you would like this email to be handled.",properties:{bypassListManagement:{type:"object",description:"Allows you to bypass all unsubscribe groups and suppressions to ensure that the email is delivered to every single recipient. This should only be used in emergencies when it is absolutely necessary that every recipient receives your email. This filter cannot be combined with any other bypass filters. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassSpamManagement:{type:"object",description:"Allows you to bypass the spam report list to ensure that the email is delivered to recipients. Bounce and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassBounceManagement:{type:"object",description:"Allows you to bypass the bounce list to ensure that the email is delivered to recipients. Spam report and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassUnsubscribeManagement:{type:"object",description:"Allows you to bypass the global unsubscribe list to ensure that the email is delivered to recipients. Bounce and spam report lists will still be checked; addresses on these other lists will not receive the message. This filter applies only to global unsubscribes and will not bypass group unsubscribes. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},footer:{type:"object",description:"The default footer that you would like included on every email.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},text:{type:"string",description:"The plain text content of your footer."},html:{type:"string",description:"The HTML content of your footer."}}},sandboxMode:{type:"object",description:"Sandbox Mode allows you to send a test email to ensure that your request body is valid and formatted correctly.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}}}},trackingSettings:{type:"object",description:"Settings to determine how you would like to track the metrics of how your recipients interact with your email.",properties:{clickTracking:{type:"object",description:"Allows you to track if a recipient clicked a link in your email.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},enableText:{type:"boolean",description:"Indicates if this setting should be included in the `text/plain` portion of your email."}}},openTracking:{type:"object",description:"Allows you to track if the email was opened by including a single pixel image in the body of the content. When the pixel is loaded, Twilio SendGrid can log that the email was opened.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},substitutionTag:{type:"string",description:"Allows you to specify a substitution tag that you can insert in the body of your email at a location that you desire. This tag will be replaced by the open tracking pixel."}}},subscriptionTracking:{type:"object",description:"Allows you to insert a subscription management link at the bottom of the text and HTML bodies of your email. If you would like to specify the location of the link within your email, you may use the `substitutionTag`.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},text:{type:"string",description:"Text to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>"},html:{type:"string",description:"HTML to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>"},substitutionTag:{type:"string",description:"A tag that will be replaced with the unsubscribe URL. for example: `[unsubscribe_url]`. If this parameter is used, it will override both the `text` and `html` parameters. The URL of the link will be placed at the substitution tag\u2019s location with no additional formatting."}}},ganalytics:{type:"object",description:"Allows you to enable tracking provided by Google Analytics.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},utmSource:{type:"string",description:"Name of the referrer source. (e.g. Google, SomeDomain.com, or Marketing Email)"},utmMedium:{type:"string",description:"Name of the marketing medium. (e.g. Email)"},utmTerm:{type:"string",description:"Used to identify any paid keywords."},utmContent:{type:"string",description:"Used to differentiate your campaign from advertisements."},utmCampaign:{type:"string",description:"The name of the campaign."}}}}}},required:[],additionalProperties:!1},g={output:me};var S={anypost:t,braze:t,clickatell:t,nodemailer:y,emailjs:t,"email-webhook":t,"infobip-email":t,mailersend:t,mailgun:m,mailjet:u,mailtrap:t,mandrill:t,netcore:t,"novu-email":f,outlook365:t,plunk:t,postmark:t,resend:t,sendgrid:g,sendinblue:t,ses:t,sparkpost:t};var ue={type:"object",properties:{},required:[],additionalProperties:!1},b={output:ue};var v={novu:b};var T={anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{name:{type:"string"},volume:{type:"number"},critical:{type:"number"}},required:["name","volume","critical"]}]},ye={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.
|
|
5
5
|
|
|
6
6
|
5 - The push message is sent at a time that conserves power on the device receiving it.`},collapseId:{type:"string"},pushType:{type:"string",enum:["background","alert","voip"],description:`The type of the notification. The value of this header is alert or background. Specify alert when the delivery of your notification displays an alert, plays a sound, or badges your app's icon. Specify background for silent notifications that do not interact with the user.
|
|
7
7
|
|
|
8
|
-
The value of this header must accurately reflect the contents of your notification's payload. If there is a mismatch, or if the header is missing on required systems, APNs may delay the delivery of the notification or drop it altogether.`},threadId:{type:"string"},payload:{type:"object",additionalProperties:!0},aps:{type:"object",additionalProperties:!0,properties:{badge:{type:"number"},sound:T,category:{type:"string"},contentAvailable:{type:"number"},launchImage:{type:"number"},mutableContent:{type:"number"},urlArgs:{type:"array",items:{type:"string"}}}},rawPayload:{type:"object",additionalProperties:!0},badge:{type:"number"},sound:T,alert:{anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{title:{type:"string"},body:{type:"string"},subtitle:{type:"string"},titleLocKey:{type:"string"},titleLocArgs:{type:"array",items:{type:"string"}},actionLocKey:{type:"string"},locKey:{type:"string"},locArgs:{type:"array",items:{type:"string"}},launchImage:{type:"string"}},required:["body"]}]},contentAvailable:{type:"boolean"},mutableContent:{type:"boolean"},mdm:{anyOf:[{type:"string"},{type:"object",additionalProperties:!0}]},urlArgs:{type:"array",items:{type:"string"}}},required:[],additionalProperties:!0},w={output:
|
|
8
|
+
The value of this header must accurately reflect the contents of your notification's payload. If there is a mismatch, or if the header is missing on required systems, APNs may delay the delivery of the notification or drop it altogether.`},threadId:{type:"string"},payload:{type:"object",additionalProperties:!0},aps:{type:"object",additionalProperties:!0,properties:{badge:{type:"number"},sound:T,category:{type:"string"},contentAvailable:{type:"number"},launchImage:{type:"number"},mutableContent:{type:"number"},urlArgs:{type:"array",items:{type:"string"}}}},rawPayload:{type:"object",additionalProperties:!0},badge:{type:"number"},sound:T,alert:{anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{title:{type:"string"},body:{type:"string"},subtitle:{type:"string"},titleLocKey:{type:"string"},titleLocArgs:{type:"array",items:{type:"string"}},actionLocKey:{type:"string"},locKey:{type:"string"},locArgs:{type:"array",items:{type:"string"}},launchImage:{type:"string"}},required:["body"]}]},contentAvailable:{type:"boolean"},mutableContent:{type:"boolean"},mdm:{anyOf:[{type:"string"},{type:"object",additionalProperties:!0}]},urlArgs:{type:"array",items:{type:"string"}}},required:[],additionalProperties:!0},w={output:ye};var fe={type:"object",properties:{to:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"An Expo push token or an array of Expo push tokens specifying the recipient(s) of this message."},data:{type:"object",additionalProperties:!0,description:'A JSON object delivered to your app. It may be up to about 4KiB; the total notification payload sent to Apple and Google must be at most 4KiB or else you will get a "Message Too Big" error.'},title:{type:"string",description:"The title to display in the notification. Often displayed above the notification body."},subtitle:{type:"string",description:"The subtitle to display in the notification below the title."},body:{type:"string",description:"The message to display in the notification."},sound:{anyOf:[{type:"string"},{type:"null"},{type:"object",properties:{name:{anyOf:[{type:"string",enum:["default"]},{type:"null"}]},volume:{type:"number"},critical:{type:"boolean"}},additionalProperties:!0}],description:"Play a sound when the recipient receives this notification. Specify default to play the device's default notification sound, or omit this field to play no sound. Custom sounds are not supported."},ttl:{type:"number",description:"Time to Live: the number of seconds for which the message may be kept around for redelivery if it hasn't been delivered yet. Defaults to undefined to use the respective defaults of each provider (2419200 (4 weeks) for Android/FCM and 0 for iOS/APNs)."},expiration:{type:"number",description:"Timestamp since the Unix epoch specifying when the message expires. Same effect as ttl (ttl takes precedence over expiration)."},priority:{type:"string",enum:["default","normal","high"],description:'The delivery priority of the message. Specify default or omit this field to use the default priority on each platform ("normal" on Android and "high" on iOS).'},badge:{type:"number",description:"Number to display in the badge on the app icon. Specify zero to clear the badge."},channelId:{type:"string",description:"ID of the Notification Channel through which to display this notification. If an ID is specified but the corresponding channel does not exist on the device (that has not yet been created by your app), the notification will not be displayed to the user."},categoryId:{type:"string",description:"ID of the notification category that this notification is associated with."},mutableContent:{type:"boolean",description:"Specifies whether this notification can be intercepted by the client app. In Expo Go, this defaults to true, and if you change that to false, you may experience issues. In standalone and bare apps, this defaults to false."}},required:[],additionalProperties:!0},x={output:fe};var ge={type:"object",properties:{to:{description:`This parameter specifies the recipient of a message.
|
|
9
9
|
The value must be a registration token, notification key, or topic. Do not set this field when sending to multiple topics. See **condition**.
|
|
10
10
|
`,type:"string"},registrationIds:{description:`This parameter specifies a list of devices (registration tokens, or IDs) receiving a multicast message. It must contain at least 1 and at most 1000 registration tokens.
|
|
11
11
|
Use this parameter only for multicast messaging, not for single recipients. Multicast messages (sending to more than 1 registration tokens) are allowed using HTTP JSON format only.
|
|
@@ -41,7 +41,7 @@ If set, and a notification with the same tag is already being shown, the new not
|
|
|
41
41
|
`,type:"string"},titleLocArgs:{description:`Indicates the string value to replace format specifiers in the title string for localization.
|
|
42
42
|
* iOS: Corresponds to "title-loc-args" in the APNs payload.
|
|
43
43
|
* android: See [Formatting strings](https://developer.android.com/guide/topics/resources/string-resource.html#FormattingAndStyling).
|
|
44
|
-
`,type:"string"}}}},required:[],additionalProperties:!0},P={output:
|
|
44
|
+
`,type:"string"}}}},required:[],additionalProperties:!0},P={output:ge};var Se={allOf:[{allOf:[{anyOf:[{type:"object",properties:{includedSegments:{type:"array",description:`The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excludedSegments.
|
|
45
45
|
Example: ["Active Users", "Inactive Users"]
|
|
46
46
|
`,items:{type:"string"}},excludedSegments:{type:"array",description:`Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in includedSegments. This targeting parameter is only compatible with includedSegments.
|
|
47
47
|
Example: ["Active Users", "Inactive Users"]
|
|
@@ -408,4 +408,4 @@ Examples: All examples are the exact same date & time.
|
|
|
408
408
|
"Sept 24 2015 14:00:00 GMT-0700"
|
|
409
409
|
"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)"
|
|
410
410
|
Note: SMS currently only supports sendAfter parameter.
|
|
411
|
-
`,writeOnly:!0,nullable:!0}}}],required:[],additionalProperties:!0},C={output:ye};var O={apns:w,expo:x,fcm:P,"one-signal":C,"pusher-beams":t,pushpad:t,"push-webhook":t,appio:t};var fe={type:"object",properties:{},required:[],additionalProperties:!1},A={output:fe};var ge={type:"object",properties:{to:{type:"string",pattern:"^\\+[1-9]\\d{1,14}$",description:"The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), e.g. `whatsapp:+15552229999`."},statusCallback:{type:"string",format:"uri",description:"The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messagingServiceSid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource). "},applicationSid:{type:"string",minLength:34,maxLength:34,pattern:"^AP[0-9a-fA-F]{32}$",description:"The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `statusCallback` URL. Note that the `statusCallback` parameter of a request takes priority over the `applicationSid` parameter; if both are included `applicationSid` is ignored."},maxPrice:{type:"number",description:"[OBSOLETE] This parameter will no longer have any effect as of 2024-06-03."},provideFeedback:{type:"boolean",description:"Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`."},attempt:{type:"integer",description:"Total number of attempts made (including this request) to send the message regardless of the provider used"},validityPeriod:{type:"integer",description:"The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validityPeriod`, the Message is not sent. Accepted values are integers from `1` to `36000`. Default value is `36000`. A `validityPeriod` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html)"},forceDelivery:{type:"boolean",description:"Reserved"},contentRetention:{type:"string",enum:["retain","discard"],description:"Determines if the message content can be stored or redacted based on privacy settings"},addressRetention:{type:"string",enum:["retain","obfuscate"],description:"Determines if the address can be stored or obfuscated based on privacy settings"},smartEncoded:{type:"boolean",description:"Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`."},persistentAction:{type:"array",items:{type:"string"},description:"Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp)."},shortenUrls:{type:"boolean",description:"For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messagingServiceSid` parameter must also be provided."},scheduleType:{type:"string",enum:["fixed"],description:"For Messaging Services only: Include this parameter with a value of `fixed` in conjunction with the `sendAt` parameter in order to [schedule a Message](https://www.twilio.com/docs/messaging/features/message-scheduling)."},sendAt:{type:"string",format:"date-time",description:"The time that Twilio will send the message. Must be in ISO 8601 format."},sendAsMms:{type:"boolean",description:"If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media."},contentVariables:{type:"string",description:"For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `contentSid` parameter must also be provided. If values are not defined in the `contentVariables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used."},riskCheck:{type:"string",enum:["enable","disable"],description:"Include this parameter with a value of `disable` to skip any kind of risk check on the respective message request."},from:{type:"string",pattern:"^\\+[1-9]\\d{1,14}$",description:"The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messagingServiceSid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool."},messagingServiceSid:{type:"string",minLength:34,maxLength:34,pattern:"^MG[0-9a-fA-F]{32}$",description:"The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool."},body:{type:"string",description:"The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [sendAsMms parameter](https://www.twilio.com/blog/mms-for-long-text-messages)."},mediaUrl:{type:"array",items:{type:"string",format:"uri"},description:"The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/messaging/guides/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `mediaUrl` parameters in the POST request. You can include up to ten `mediaUrl` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply."},contentSid:{type:"string",minLength:34,maxLength:34,pattern:"^HX[0-9a-fA-F]{32}$",description:"For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources)."}},required:[],additionalProperties:!0},E={output:ge};var k={"africas-talking":t,"azure-sms":t,bandwidth:t,"brevo-sms":t,"bulk-sms":t,"burst-sms":t,clickatell:t,clicksend:t,"eazy-sms":t,firetext:t,"forty-six-elks":t,"generic-sms":t,gupshup:t,"infobip-sms":t,"isend-sms":t,kannel:t,maqsam:t,messagebird:t,mobishastra:t,nexmo:t,"novu-sms":A,plivo:t,"ring-central":t,sendchamp:t,simpletexting:t,sms77:t,"sms-central":t,smsmode:t,sns:t,telnyx:t,termii:t,twilio:E,"afro-message":t,unifonic:t,imedia:t,sinch:t,"isendpro-sms":t};var I={chat:h,sms:k,email:S,push:O,in_app:v};var Se={type:"object",properties:{type:{enum:["regular"]},amount:{type:"number"},unit:{type:"string",enum:["seconds","minutes","hours","days","weeks","months"]},extendToSchedule:{type:"boolean"}},required:["amount","unit"],additionalProperties:!1},be={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},ve={type:"object",properties:{type:{enum:["dynamic"]},dynamicKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["dynamicKey"],additionalProperties:!1},Te={oneOf:[Se,be,ve]},we={type:"object",properties:{duration:{type:"number"}},required:["duration"],additionalProperties:!1},R={output:Te,result:we};var xe={type:"object",properties:{type:{enum:["regular"]},amount:{type:"number"},unit:{type:"string",enum:["seconds","minutes","hours","days","weeks","months"]},digestKey:{type:"string"},lookBackWindow:{type:"object",properties:{amount:{type:"number"},unit:{type:"string",enum:["seconds","minutes","hours","days","weeks","months"]}},required:["amount","unit"],additionalProperties:!1},extendToSchedule:{type:"boolean"}},required:["amount","unit"],additionalProperties:!1},Pe={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},digestKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},Ce={oneOf:[xe,Pe]},Oe={type:"object",properties:{eventCount:{type:"number"},events:{type:"array",items:{type:"object",properties:{id:{type:"string"},time:{type:"string"},payload:{type:"object"}},required:["id","time","payload"],additionalProperties:!1}}},required:["events"],additionalProperties:!1},j={output:Ce,result:Oe};var N={output:{type:"object",properties:{type:{type:"string",enum:["fixed","dynamic"]},amount:{type:"number"},unit:{type:"string",enum:["minutes","hours","days"]},dynamicKey:{type:"string"},threshold:{type:"number"},throttleKey:{type:"string"}},required:["type"],additionalProperties:!1},result:{type:"object",properties:{throttled:{type:"boolean",description:"Whether the workflow execution was throttled"},executionCount:{type:"number",description:"Number of executions within the throttle window"},threshold:{type:"number",description:"The throttle threshold that was applied"},windowStart:{type:"string",format:"date-time",description:"Start time of the throttle window"}},required:["throttled"],additionalProperties:!1}};var U={delay:R,digest:j,throttle:N};var Ae={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},Ee={type:"object",properties:{},required:[],additionalProperties:!1},M={output:Ae,result:Ee};var ke={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string"},from:{type:"object",properties:{email:{type:"string"},name:{type:"string"}},additionalProperties:!1}},required:["subject","body"],additionalProperties:!1},Ie={type:"object",properties:{},required:[],additionalProperties:!1},L={output:ke,result:Ie};var Re="^(?!mailto:)(?:(https?):\\/\\/[^\\s/$.?#].[^\\s]*)|^(\\/[^\\s]*)$",J={type:"object",properties:{url:{type:"string",pattern:Re},target:{type:"string",enum:["_self","_blank","_parent","_top","_unfencedTop"],default:"_blank"}},if:{properties:{url:{type:"string",pattern:"^/"}}},then:{properties:{target:{default:"_self"}}},else:{properties:{target:{default:"_blank"}}},required:["url"],additionalProperties:!1},D={type:"object",properties:{label:{type:"string"},redirect:J},required:["label"],additionalProperties:!1},je={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string",minLength:1},avatar:{type:"string",format:"uri"},primaryAction:D,secondaryAction:D,data:{type:"object",additionalProperties:!0},redirect:J},anyOf:[{required:["subject"]},{required:["body"]}],additionalProperties:!1},Ne={type:"object",properties:{seen:{type:"boolean"},read:{type:"boolean"},lastSeenDate:{type:"string",format:"date-time",nullable:!0},lastReadDate:{type:"string",format:"date-time",nullable:!0}},required:["seen","read","lastSeenDate","lastReadDate"],additionalProperties:!1},F={output:je,result:Ne};var Ue={type:"object",properties:{subject:{type:"string"},body:{type:"string"}},required:["subject","body"],additionalProperties:!1},Me={type:"object",properties:{},required:[],additionalProperties:!1},q={output:Ue,result:Me};var Le={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},De={type:"object",properties:{},required:[],additionalProperties:!1},z={output:Le,result:De};var H={chat:M,sms:z,push:q,email:L,in_app:F};0&&(module.exports={actionStepSchemas,channelStepSchemas,providerSchemas,step});
|
|
411
|
+
`,writeOnly:!0,nullable:!0}}}],required:[],additionalProperties:!0},C={output:Se};var O={apns:w,expo:x,fcm:P,"one-signal":C,"pusher-beams":t,pushpad:t,"push-webhook":t,appio:t};var be={type:"object",properties:{},required:[],additionalProperties:!1},E={output:be};var ve={type:"object",properties:{to:{type:"string",pattern:"^\\+[1-9]\\d{1,14}$",description:"The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), e.g. `whatsapp:+15552229999`."},statusCallback:{type:"string",format:"uri",description:"The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messagingServiceSid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource). "},applicationSid:{type:"string",minLength:34,maxLength:34,pattern:"^AP[0-9a-fA-F]{32}$",description:"The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `statusCallback` URL. Note that the `statusCallback` parameter of a request takes priority over the `applicationSid` parameter; if both are included `applicationSid` is ignored."},maxPrice:{type:"number",description:"[OBSOLETE] This parameter will no longer have any effect as of 2024-06-03."},provideFeedback:{type:"boolean",description:"Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`."},attempt:{type:"integer",description:"Total number of attempts made (including this request) to send the message regardless of the provider used"},validityPeriod:{type:"integer",description:"The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validityPeriod`, the Message is not sent. Accepted values are integers from `1` to `36000`. Default value is `36000`. A `validityPeriod` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html)"},forceDelivery:{type:"boolean",description:"Reserved"},contentRetention:{type:"string",enum:["retain","discard"],description:"Determines if the message content can be stored or redacted based on privacy settings"},addressRetention:{type:"string",enum:["retain","obfuscate"],description:"Determines if the address can be stored or obfuscated based on privacy settings"},smartEncoded:{type:"boolean",description:"Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`."},persistentAction:{type:"array",items:{type:"string"},description:"Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp)."},shortenUrls:{type:"boolean",description:"For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messagingServiceSid` parameter must also be provided."},scheduleType:{type:"string",enum:["fixed"],description:"For Messaging Services only: Include this parameter with a value of `fixed` in conjunction with the `sendAt` parameter in order to [schedule a Message](https://www.twilio.com/docs/messaging/features/message-scheduling)."},sendAt:{type:"string",format:"date-time",description:"The time that Twilio will send the message. Must be in ISO 8601 format."},sendAsMms:{type:"boolean",description:"If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media."},contentVariables:{type:"string",description:"For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `contentSid` parameter must also be provided. If values are not defined in the `contentVariables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used."},riskCheck:{type:"string",enum:["enable","disable"],description:"Include this parameter with a value of `disable` to skip any kind of risk check on the respective message request."},from:{type:"string",pattern:"^\\+[1-9]\\d{1,14}$",description:"The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messagingServiceSid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool."},messagingServiceSid:{type:"string",minLength:34,maxLength:34,pattern:"^MG[0-9a-fA-F]{32}$",description:"The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool."},body:{type:"string",description:"The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [sendAsMms parameter](https://www.twilio.com/blog/mms-for-long-text-messages)."},mediaUrl:{type:"array",items:{type:"string",format:"uri"},description:"The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/messaging/guides/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `mediaUrl` parameters in the POST request. You can include up to ten `mediaUrl` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply."},contentSid:{type:"string",minLength:34,maxLength:34,pattern:"^HX[0-9a-fA-F]{32}$",description:"For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources)."}},required:[],additionalProperties:!0},A={output:ve};var k={"africas-talking":t,"azure-sms":t,bandwidth:t,"brevo-sms":t,"bulk-sms":t,"burst-sms":t,clickatell:t,clicksend:t,"eazy-sms":t,firetext:t,"forty-six-elks":t,"generic-sms":t,gupshup:t,"infobip-sms":t,"isend-sms":t,kannel:t,maqsam:t,messagebird:t,mobishastra:t,nexmo:t,"novu-sms":E,plivo:t,"ring-central":t,sendchamp:t,simpletexting:t,sms77:t,"sms-central":t,smsmode:t,sns:t,telnyx:t,termii:t,twilio:A,"afro-message":t,unifonic:t,imedia:t,sinch:t,"isendpro-sms":t,"ruach-sms":t};var R={pagerduty:t,opsgenie:t,"tool-webhook":t};var I={chat:h,sms:k,email:S,push:O,in_app:v,tool:R};var Te={type:"object",properties:{type:{enum:["regular"]},amount:{type:"number"},unit:{type:"string",enum:["seconds","minutes","hours","days","weeks","months"]},extendToSchedule:{type:"boolean"}},required:["amount","unit"],additionalProperties:!1},we={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},xe={type:"object",properties:{type:{enum:["dynamic"]},dynamicKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["dynamicKey"],additionalProperties:!1},Pe={oneOf:[Te,we,xe]},Ce={type:"object",properties:{duration:{type:"number"}},required:["duration"],additionalProperties:!1},j={output:Pe,result:Ce};var Oe={type:"object",properties:{type:{enum:["regular"]},amount:{type:"number"},unit:{type:"string",enum:["seconds","minutes","hours","days","weeks","months"]},digestKey:{type:"string"},lookBackWindow:{type:"object",properties:{amount:{type:"number"},unit:{type:"string",enum:["seconds","minutes","hours","days","weeks","months"]}},required:["amount","unit"],additionalProperties:!1},extendToSchedule:{type:"boolean"}},required:["amount","unit"],additionalProperties:!1},Ee={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},digestKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},Ae={oneOf:[Oe,Ee]},ke={type:"object",properties:{eventCount:{type:"number"},events:{type:"array",items:{type:"object",properties:{id:{type:"string"},time:{type:"string"},payload:{type:"object"}},required:["id","time","payload"],additionalProperties:!1}}},required:["events"],additionalProperties:!1},N={output:Ae,result:ke};var U={output:{type:"object",properties:{type:{type:"string",enum:["fixed","dynamic"]},amount:{type:"number"},unit:{type:"string",enum:["minutes","hours","days"]},dynamicKey:{type:"string"},threshold:{type:"number"},throttleKey:{type:"string"}},required:["type"],additionalProperties:!1},result:{type:"object",properties:{throttled:{type:"boolean",description:"Whether the workflow execution was throttled"},executionCount:{type:"number",description:"Number of executions within the throttle window"},threshold:{type:"number",description:"The throttle threshold that was applied"},windowStart:{type:"string",format:"date-time",description:"Start time of the throttle window"}},required:["throttled"],additionalProperties:!1}};var M={delay:j,digest:N,throttle:U};var Re={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},Ie={type:"object",properties:{},required:[],additionalProperties:!1},L={output:Re,result:Ie};var je={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string"},from:{type:"object",properties:{email:{type:"string"},name:{type:"string"}},additionalProperties:!1}},required:["subject","body"],additionalProperties:!1},Ne={type:"object",properties:{},required:[],additionalProperties:!1},D={output:je,result:Ne};var Ue="^(?!mailto:)(?:(https?):\\/\\/[^\\s/$.?#].[^\\s]*)|^(\\/[^\\s]*)$",q={type:"object",properties:{url:{type:"string",pattern:Ue},target:{type:"string",enum:["_self","_blank","_parent","_top","_unfencedTop"],default:"_blank"}},if:{properties:{url:{type:"string",pattern:"^/"}}},then:{properties:{target:{default:"_self"}}},else:{properties:{target:{default:"_blank"}}},required:["url"],additionalProperties:!1},J={type:"object",properties:{label:{type:"string"},redirect:q},required:["label"],additionalProperties:!1},Me={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string",minLength:1},avatar:{type:"string",format:"uri"},primaryAction:J,secondaryAction:J,data:{type:"object",additionalProperties:!0},redirect:q},anyOf:[{required:["subject"]},{required:["body"]}],additionalProperties:!1},Le={type:"object",properties:{seen:{type:"boolean"},read:{type:"boolean"},lastSeenDate:{type:"string",format:"date-time",nullable:!0},lastReadDate:{type:"string",format:"date-time",nullable:!0}},required:["seen","read","lastSeenDate","lastReadDate"],additionalProperties:!1},F={output:Me,result:Le};var De={type:"object",properties:{subject:{type:"string"},body:{type:"string"}},required:["subject","body"],additionalProperties:!1},Je={type:"object",properties:{},required:[],additionalProperties:!1},z={output:De,result:Je};var qe={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},Fe={type:"object",properties:{},required:[],additionalProperties:!1},B={output:qe,result:Fe};var ze={type:"object",properties:{body:{type:"string"},providerOverrides:{type:"object",additionalProperties:{type:"object",additionalProperties:!0}}},required:["body"],additionalProperties:!1},Be={type:"object",properties:{},required:[],additionalProperties:!1},H={output:ze,result:Be};var _={chat:L,sms:B,push:z,email:D,in_app:F,tool:H};0&&(module.exports={actionStepSchemas,channelStepSchemas,providerSchemas,step});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as Subscriber, C as ContextResolved, E as EnvironmentSystemVariables, G as EmailOutputUnvalidated, p as providerSchemas, W as WithPassthrough, R as SmsOutputUnvalidated, h as ChatOutputUnvalidated, M as PushOutputUnvalidated, J as InAppOutputUnvalidated, n as DelayOutputUnvalidated, v as DigestOutputUnvalidated, Y as ThrottleOutputUnvalidated } from './subscriber.types-
|
|
2
|
-
export {
|
|
1
|
+
import { S as Subscriber, C as ContextResolved, E as EnvironmentSystemVariables, G as EmailOutputUnvalidated, p as providerSchemas, W as WithPassthrough, R as SmsOutputUnvalidated, h as ChatOutputUnvalidated, M as PushOutputUnvalidated, J as InAppOutputUnvalidated, $ as ToolOutputUnvalidated, n as DelayOutputUnvalidated, v as DigestOutputUnvalidated, Y as ThrottleOutputUnvalidated } from './subscriber.types-CyNKT0nZ.cjs';
|
|
2
|
+
export { a0 as actionStepSchemas, a1 as channelStepSchemas } from './subscriber.types-CyNKT0nZ.cjs';
|
|
3
3
|
import { A as Awaitable } from './util.types-DaFfsxgy.cjs';
|
|
4
4
|
import { S as Schema, a as FromSchema } from './base.schema.types-BApIn9jr.cjs';
|
|
5
5
|
import 'json-schema-to-ts';
|
|
@@ -93,6 +93,17 @@ type InAppStepResolver<TControlSchema extends Schema | undefined = undefined, TP
|
|
|
93
93
|
providers?: StepResolverProviders<'in_app', ResolveControls<TControlSchema>, InAppOutputUnvalidated, ResolveControls<TPayloadSchema>, ResolveEnv<TEnvSchema>>;
|
|
94
94
|
disableOutputSanitization?: boolean;
|
|
95
95
|
};
|
|
96
|
+
type ToolStepResolver<TControlSchema extends Schema | undefined = undefined, TPayloadSchema extends Schema | undefined = undefined, TEnvSchema extends Schema | undefined = undefined> = {
|
|
97
|
+
type: 'tool';
|
|
98
|
+
stepId: string;
|
|
99
|
+
resolve: (controls: ResolveControls<TControlSchema>, ctx: StepResolverContext<ResolveControls<TPayloadSchema>, ResolveEnv<TEnvSchema>>) => Promise<ToolOutputUnvalidated>;
|
|
100
|
+
controlSchema?: TControlSchema;
|
|
101
|
+
payloadSchema?: TPayloadSchema;
|
|
102
|
+
envSchema?: TEnvSchema;
|
|
103
|
+
skip?: BaseStepResolverOptions<TControlSchema, TPayloadSchema, TEnvSchema>['skip'];
|
|
104
|
+
providers?: StepResolverProviders<'tool', ResolveControls<TControlSchema>, ToolOutputUnvalidated, ResolveControls<TPayloadSchema>, ResolveEnv<TEnvSchema>>;
|
|
105
|
+
disableOutputSanitization?: boolean;
|
|
106
|
+
};
|
|
96
107
|
type DelayStepResolver<TControlSchema extends Schema | undefined = undefined, TPayloadSchema extends Schema | undefined = undefined, TEnvSchema extends Schema | undefined = undefined> = {
|
|
97
108
|
type: 'delay';
|
|
98
109
|
stepId: string;
|
|
@@ -120,12 +131,13 @@ type ThrottleStepResolver<TControlSchema extends Schema | undefined = undefined,
|
|
|
120
131
|
envSchema?: TEnvSchema;
|
|
121
132
|
skip?: BaseStepResolverOptions<TControlSchema, TPayloadSchema, TEnvSchema>['skip'];
|
|
122
133
|
};
|
|
123
|
-
type AnyStepResolver = EmailStepResolver<Schema | undefined, Schema | undefined, Schema | undefined> | SmsStepResolver<Schema | undefined, Schema | undefined, Schema | undefined> | ChatStepResolver<Schema | undefined, Schema | undefined, Schema | undefined> | PushStepResolver<Schema | undefined, Schema | undefined, Schema | undefined> | InAppStepResolver<Schema | undefined, Schema | undefined, Schema | undefined> | DelayStepResolver<Schema | undefined, Schema | undefined, Schema | undefined> | DigestStepResolver<Schema | undefined, Schema | undefined, Schema | undefined> | ThrottleStepResolver<Schema | undefined, Schema | undefined, Schema | undefined>;
|
|
134
|
+
type AnyStepResolver = EmailStepResolver<Schema | undefined, Schema | undefined, Schema | undefined> | SmsStepResolver<Schema | undefined, Schema | undefined, Schema | undefined> | ChatStepResolver<Schema | undefined, Schema | undefined, Schema | undefined> | PushStepResolver<Schema | undefined, Schema | undefined, Schema | undefined> | InAppStepResolver<Schema | undefined, Schema | undefined, Schema | undefined> | ToolStepResolver<Schema | undefined, Schema | undefined, Schema | undefined> | DelayStepResolver<Schema | undefined, Schema | undefined, Schema | undefined> | DigestStepResolver<Schema | undefined, Schema | undefined, Schema | undefined> | ThrottleStepResolver<Schema | undefined, Schema | undefined, Schema | undefined>;
|
|
124
135
|
declare function email<TControlSchema extends Schema | undefined = undefined, TPayloadSchema extends Schema | undefined = undefined, TEnvSchema extends Schema | undefined = undefined>(stepId: string, resolve: (controls: ResolveControls<TControlSchema>, ctx: StepResolverContext<ResolveControls<TPayloadSchema>, ResolveEnv<TEnvSchema>>) => Promise<EmailOutputUnvalidated>, options?: ChannelStepResolverOptions<'email', TControlSchema, TPayloadSchema, EmailOutputUnvalidated, TEnvSchema>): EmailStepResolver<TControlSchema, TPayloadSchema, TEnvSchema>;
|
|
125
136
|
declare function sms<TControlSchema extends Schema | undefined = undefined, TPayloadSchema extends Schema | undefined = undefined, TEnvSchema extends Schema | undefined = undefined>(stepId: string, resolve: (controls: ResolveControls<TControlSchema>, ctx: StepResolverContext<ResolveControls<TPayloadSchema>, ResolveEnv<TEnvSchema>>) => Promise<SmsOutputUnvalidated>, options?: ChannelStepResolverOptions<'sms', TControlSchema, TPayloadSchema, SmsOutputUnvalidated, TEnvSchema>): SmsStepResolver<TControlSchema, TPayloadSchema, TEnvSchema>;
|
|
126
137
|
declare function chat<TControlSchema extends Schema | undefined = undefined, TPayloadSchema extends Schema | undefined = undefined, TEnvSchema extends Schema | undefined = undefined>(stepId: string, resolve: (controls: ResolveControls<TControlSchema>, ctx: StepResolverContext<ResolveControls<TPayloadSchema>, ResolveEnv<TEnvSchema>>) => Promise<ChatOutputUnvalidated>, options?: ChannelStepResolverOptions<'chat', TControlSchema, TPayloadSchema, ChatOutputUnvalidated, TEnvSchema>): ChatStepResolver<TControlSchema, TPayloadSchema, TEnvSchema>;
|
|
127
138
|
declare function push<TControlSchema extends Schema | undefined = undefined, TPayloadSchema extends Schema | undefined = undefined, TEnvSchema extends Schema | undefined = undefined>(stepId: string, resolve: (controls: ResolveControls<TControlSchema>, ctx: StepResolverContext<ResolveControls<TPayloadSchema>, ResolveEnv<TEnvSchema>>) => Promise<PushOutputUnvalidated>, options?: ChannelStepResolverOptions<'push', TControlSchema, TPayloadSchema, PushOutputUnvalidated, TEnvSchema>): PushStepResolver<TControlSchema, TPayloadSchema, TEnvSchema>;
|
|
128
139
|
declare function inApp<TControlSchema extends Schema | undefined = undefined, TPayloadSchema extends Schema | undefined = undefined, TEnvSchema extends Schema | undefined = undefined>(stepId: string, resolve: (controls: ResolveControls<TControlSchema>, ctx: StepResolverContext<ResolveControls<TPayloadSchema>, ResolveEnv<TEnvSchema>>) => Promise<InAppOutputUnvalidated>, options?: ChannelStepResolverOptions<'in_app', TControlSchema, TPayloadSchema, InAppOutputUnvalidated, TEnvSchema>): InAppStepResolver<TControlSchema, TPayloadSchema, TEnvSchema>;
|
|
140
|
+
declare function tool<TControlSchema extends Schema | undefined = undefined, TPayloadSchema extends Schema | undefined = undefined, TEnvSchema extends Schema | undefined = undefined>(stepId: string, resolve: (controls: ResolveControls<TControlSchema>, ctx: StepResolverContext<ResolveControls<TPayloadSchema>, ResolveEnv<TEnvSchema>>) => Promise<ToolOutputUnvalidated>, options?: ChannelStepResolverOptions<'tool', TControlSchema, TPayloadSchema, ToolOutputUnvalidated, TEnvSchema>): ToolStepResolver<TControlSchema, TPayloadSchema, TEnvSchema>;
|
|
129
141
|
declare function delay<TControlSchema extends Schema | undefined = undefined, TPayloadSchema extends Schema | undefined = undefined, TEnvSchema extends Schema | undefined = undefined>(stepId: string, resolve: (controls: ResolveControls<TControlSchema>, ctx: StepResolverContext<ResolveControls<TPayloadSchema>, ResolveEnv<TEnvSchema>>) => Promise<DelayOutputUnvalidated>, options?: BaseStepResolverOptions<TControlSchema, TPayloadSchema, TEnvSchema>): DelayStepResolver<TControlSchema, TPayloadSchema, TEnvSchema>;
|
|
130
142
|
declare function digest<TControlSchema extends Schema | undefined = undefined, TPayloadSchema extends Schema | undefined = undefined, TEnvSchema extends Schema | undefined = undefined>(stepId: string, resolve: (controls: ResolveControls<TControlSchema>, ctx: StepResolverContext<ResolveControls<TPayloadSchema>, ResolveEnv<TEnvSchema>>) => Promise<DigestOutputUnvalidated>, options?: BaseStepResolverOptions<TControlSchema, TPayloadSchema, TEnvSchema>): DigestStepResolver<TControlSchema, TPayloadSchema, TEnvSchema>;
|
|
131
143
|
declare function throttle<TControlSchema extends Schema | undefined = undefined, TPayloadSchema extends Schema | undefined = undefined, TEnvSchema extends Schema | undefined = undefined>(stepId: string, resolve: (controls: ResolveControls<TControlSchema>, ctx: StepResolverContext<ResolveControls<TPayloadSchema>, ResolveEnv<TEnvSchema>>) => Promise<ThrottleOutputUnvalidated>, options?: BaseStepResolverOptions<TControlSchema, TPayloadSchema, TEnvSchema>): ThrottleStepResolver<TControlSchema, TPayloadSchema, TEnvSchema>;
|
|
@@ -135,9 +147,10 @@ declare const step: {
|
|
|
135
147
|
chat: typeof chat;
|
|
136
148
|
push: typeof push;
|
|
137
149
|
inApp: typeof inApp;
|
|
150
|
+
tool: typeof tool;
|
|
138
151
|
delay: typeof delay;
|
|
139
152
|
digest: typeof digest;
|
|
140
153
|
throttle: typeof throttle;
|
|
141
154
|
};
|
|
142
155
|
|
|
143
|
-
export { type AnyStepResolver, type ChatStepResolver, ContextResolved, type DelayStepResolver, type DigestStepResolver, type EmailStepResolver, type InAppStepResolver, type PushStepResolver, type SmsStepResolver, type StepResolverContext, Subscriber, type ThrottleStepResolver, WithPassthrough, providerSchemas, step };
|
|
156
|
+
export { type AnyStepResolver, type ChatStepResolver, ContextResolved, type DelayStepResolver, type DigestStepResolver, type EmailStepResolver, type InAppStepResolver, type PushStepResolver, type SmsStepResolver, type StepResolverContext, Subscriber, type ThrottleStepResolver, type ToolStepResolver, WithPassthrough, providerSchemas, step };
|
|
@@ -103,7 +103,8 @@ declare enum ChannelStepEnum {
|
|
|
103
103
|
SMS = "sms",
|
|
104
104
|
PUSH = "push",
|
|
105
105
|
CHAT = "chat",
|
|
106
|
-
IN_APP = "in_app"
|
|
106
|
+
IN_APP = "in_app",
|
|
107
|
+
TOOL = "tool"
|
|
107
108
|
}
|
|
108
109
|
declare enum ActionStepEnum {
|
|
109
110
|
DIGEST = "digest",
|
|
@@ -654,6 +655,14 @@ declare const providerSchemas: {
|
|
|
654
655
|
readonly additionalProperties: true;
|
|
655
656
|
};
|
|
656
657
|
};
|
|
658
|
+
readonly 'ruach-sms': {
|
|
659
|
+
output: {
|
|
660
|
+
readonly type: "object";
|
|
661
|
+
readonly properties: {};
|
|
662
|
+
readonly required: readonly [];
|
|
663
|
+
readonly additionalProperties: true;
|
|
664
|
+
};
|
|
665
|
+
};
|
|
657
666
|
};
|
|
658
667
|
readonly email: {
|
|
659
668
|
readonly anypost: {
|
|
@@ -3679,6 +3688,32 @@ declare const providerSchemas: {
|
|
|
3679
3688
|
};
|
|
3680
3689
|
};
|
|
3681
3690
|
};
|
|
3691
|
+
readonly tool: {
|
|
3692
|
+
readonly pagerduty: {
|
|
3693
|
+
output: {
|
|
3694
|
+
readonly type: "object";
|
|
3695
|
+
readonly properties: {};
|
|
3696
|
+
readonly required: readonly [];
|
|
3697
|
+
readonly additionalProperties: true;
|
|
3698
|
+
};
|
|
3699
|
+
};
|
|
3700
|
+
readonly opsgenie: {
|
|
3701
|
+
output: {
|
|
3702
|
+
readonly type: "object";
|
|
3703
|
+
readonly properties: {};
|
|
3704
|
+
readonly required: readonly [];
|
|
3705
|
+
readonly additionalProperties: true;
|
|
3706
|
+
};
|
|
3707
|
+
};
|
|
3708
|
+
readonly 'tool-webhook': {
|
|
3709
|
+
output: {
|
|
3710
|
+
readonly type: "object";
|
|
3711
|
+
readonly properties: {};
|
|
3712
|
+
readonly required: readonly [];
|
|
3713
|
+
readonly additionalProperties: true;
|
|
3714
|
+
};
|
|
3715
|
+
};
|
|
3716
|
+
};
|
|
3682
3717
|
};
|
|
3683
3718
|
|
|
3684
3719
|
type Passthrough = {
|
|
@@ -4298,6 +4333,31 @@ declare const channelStepSchemas: {
|
|
|
4298
4333
|
readonly additionalProperties: false;
|
|
4299
4334
|
};
|
|
4300
4335
|
};
|
|
4336
|
+
readonly tool: {
|
|
4337
|
+
output: {
|
|
4338
|
+
readonly type: "object";
|
|
4339
|
+
readonly properties: {
|
|
4340
|
+
readonly body: {
|
|
4341
|
+
readonly type: "string";
|
|
4342
|
+
};
|
|
4343
|
+
readonly providerOverrides: {
|
|
4344
|
+
readonly type: "object";
|
|
4345
|
+
readonly additionalProperties: {
|
|
4346
|
+
readonly type: "object";
|
|
4347
|
+
readonly additionalProperties: true;
|
|
4348
|
+
};
|
|
4349
|
+
};
|
|
4350
|
+
};
|
|
4351
|
+
readonly required: readonly ["body"];
|
|
4352
|
+
readonly additionalProperties: false;
|
|
4353
|
+
};
|
|
4354
|
+
result: {
|
|
4355
|
+
readonly type: "object";
|
|
4356
|
+
readonly properties: {};
|
|
4357
|
+
readonly required: readonly [];
|
|
4358
|
+
readonly additionalProperties: false;
|
|
4359
|
+
};
|
|
4360
|
+
};
|
|
4301
4361
|
};
|
|
4302
4362
|
|
|
4303
4363
|
type Skip<T> = (controls: T) => Awaitable<boolean>;
|
|
@@ -4464,6 +4524,9 @@ type ChatResult = FromSchema<(typeof channelStepSchemas)['chat']['result']>;
|
|
|
4464
4524
|
type InAppOutput = FromSchema<(typeof channelStepSchemas)['in_app']['output']>;
|
|
4465
4525
|
type InAppOutputUnvalidated = FromSchemaUnvalidated<(typeof channelStepSchemas)['in_app']['output']>;
|
|
4466
4526
|
type InAppResult = FromSchema<(typeof channelStepSchemas)['in_app']['result']>;
|
|
4527
|
+
type ToolOutput = FromSchema<(typeof channelStepSchemas)['tool']['output']>;
|
|
4528
|
+
type ToolOutputUnvalidated = FromSchemaUnvalidated<(typeof channelStepSchemas)['tool']['output']>;
|
|
4529
|
+
type ToolResult = FromSchema<(typeof channelStepSchemas)['tool']['result']>;
|
|
4467
4530
|
type DelayRegularOutput = FromSchema<typeof delayRegularOutputSchema>;
|
|
4468
4531
|
type DelayRegularOutputUnvalidated = FromSchemaUnvalidated<typeof delayRegularOutputSchema>;
|
|
4469
4532
|
type DelayTimedOutput = FromSchema<typeof delayTimedOutputSchema>;
|
|
@@ -4497,6 +4560,8 @@ type Step = {
|
|
|
4497
4560
|
chat: ChannelStep<ChannelStepEnum.CHAT, ChatOutputUnvalidated, ChatResult>;
|
|
4498
4561
|
/** Send an in-app notification. */
|
|
4499
4562
|
inApp: ChannelStep<ChannelStepEnum.IN_APP, InAppOutputUnvalidated, InAppResult>;
|
|
4563
|
+
/** Deliver a tool payload to an external system (e.g. PagerDuty, Opsgenie, webhook). */
|
|
4564
|
+
tool: ChannelStep<ChannelStepEnum.TOOL, ToolOutputUnvalidated, ToolResult>;
|
|
4500
4565
|
/** Aggregate events for a period of time. */
|
|
4501
4566
|
digest: ActionStep<DigestOutputUnvalidated, DigestResult>;
|
|
4502
4567
|
/** Delay the workflow for a period of time. */
|
|
@@ -4529,4 +4594,4 @@ type Subscriber = {
|
|
|
4529
4594
|
data?: Record<string, unknown> | null;
|
|
4530
4595
|
};
|
|
4531
4596
|
|
|
4532
|
-
export {
|
|
4597
|
+
export { type ToolOutputUnvalidated as $, ActionStepEnum as A, type DigestTimedOutputUnvalidated as B, type ContextResolved as C, type DelayDynamicOutput as D, type EnvironmentSystemVariables as E, type EmailOutput as F, type EmailOutputUnvalidated as G, type EmailResult as H, type InAppOutput as I, type InAppOutputUnvalidated as J, type InAppResult as K, JobStatusEnum as L, type PushOutputUnvalidated as M, type PushResult as N, type Skip as O, type PushOutput as P, type SmsOutput as Q, type SmsOutputUnvalidated as R, type Subscriber as S, type SmsResult as T, type StepContext as U, type StepOutput as V, type WithPassthrough as W, type ThrottleOutput as X, type ThrottleOutputUnvalidated as Y, type ThrottleResult as Z, type ToolOutput as _, type ContextPayload as a, actionStepSchemas as a0, channelStepSchemas as a1, type Step as b, ChannelStepEnum as c, type StepOptions as d, type ActionStep as e, type ChannelStep as f, type ChatOutput as g, type ChatOutputUnvalidated as h, type ChatResult as i, type ContextValue as j, type CustomStep as k, type DelayDynamicOutputUnvalidated as l, type DelayOutput as m, type DelayOutputUnvalidated as n, type DelayRegularOutput as o, providerSchemas as p, type DelayRegularOutputUnvalidated as q, type DelayResult as r, type DelayTimedOutput as s, type DelayTimedOutputUnvalidated as t, type DigestOutput as u, type DigestOutputUnvalidated as v, type DigestRegularOutput as w, type DigestRegularOutputUnvalidated as x, type DigestResult as y, type DigestTimedOutput as z };
|
package/dist/cjs/validators.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var L=Object.create;var r=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var s=Object.getPrototypeOf,t=Object.prototype.hasOwnProperty;var y=(e,_)=>{for(var T in _)r(e,T,{get:_[T],enumerable:!0})},V=(e,_,T,R)=>{if(_&&typeof _=="object"||typeof _=="function")for(let A of v(_))!t.call(e,A)&&A!==T&&r(e,A,{get:()=>_[A],enumerable:!(R=m(_,A))||R.enumerable});return e};var c=(e,_,T)=>(T=e!=null?L(s(e)):{},V(_||!e||!e.__esModule?r(T,"default",{value:e,enumerable:!0}):T,e)),g=e=>V(r({},"__esModule",{value:!0}),e);var W={};y(W,{transformSchema:()=>f,validateData:()=>h});module.exports=g(W);var U=c(require("ajv"),1),P=c(require("ajv-formats"),1);var S=e=>typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e));var i=(a=>(a.BRIDGE_ERROR="BridgeError",a.EXECUTION_EVENT_CONTROL_INVALID_ERROR="ExecutionEventControlInvalidError",a.EXECUTION_EVENT_PAYLOAD_INVALID_ERROR="ExecutionEventPayloadInvalidError",a.EXECUTION_PROVIDER_OUTPUT_INVALID_ERROR="ExecutionProviderOutputInvalidError",a.EXECUTION_STATE_CONTROL_INVALID_ERROR="ExecutionStateControlInvalidError",a.EXECUTION_STATE_CORRUPT_ERROR="ExecutionStateCorruptError",a.EXECUTION_STATE_OUTPUT_INVALID_ERROR="ExecutionStateOutputInvalidError",a.EXECUTION_STATE_RESULT_INVALID_ERROR="ExecutionStateResultInvalidError",a.INVALID_ACTION_ERROR="InvalidActionError",a.METHOD_NOT_ALLOWED_ERROR="MethodNotAllowedError",a.MISSING_DEPENDENCY_ERROR="MissingDependencyError",a.MISSING_SECRET_KEY_ERROR="MissingSecretKeyError",a.PROVIDER_EXECUTION_FAILED_ERROR="ProviderExecutionFailedError",a.PROVIDER_NOT_FOUND_ERROR="ProviderNotFoundError",a.SIGNATURE_EXPIRED_ERROR="SignatureExpiredError",a.SIGNATURE_INVALID_ERROR="SignatureInvalidError",a.SIGNATURE_MISMATCH_ERROR="SignatureMismatchError",a.SIGNATURE_NOT_FOUND_ERROR="SignatureNotFoundError",a.SIGNATURE_VERSION_INVALID_ERROR="SignatureVersionInvalidError",a.SIGNING_KEY_NOT_FOUND_ERROR="SigningKeyNotFoundError",a.STEP_ALREADY_EXISTS_ERROR="StepAlreadyExistsError",a.STEP_CONTROL_COMPILATION_FAILED_ERROR="StepControlCompilationFailedError",a.STEP_EXECUTION_FAILED_ERROR="StepExecutionFailedError",a.STEP_NOT_FOUND_ERROR="StepNotFoundError",a.WORKFLOW_ALREADY_EXISTS_ERROR="WorkflowAlreadyExistsError",a.WORKFLOW_NOT_FOUND_ERROR="WorkflowNotFoundError",a.WORKFLOW_PAYLOAD_INVALID_ERROR="WorkflowPayloadInvalidError",a))(i||{});var G=e=>{var T,R;if(typeof e!="object"||e===null)return!1;let _=Object.getPrototypeOf(e);return(R=(T=_==null?void 0:_.constructor)==null?void 0:T.name.endsWith("Error"))!=null?R:!1},Y=class extends Error{};var N=class extends Y{constructor(_,{cause:T}={}){var R;G(T)?(super(`${_}: ${T.message}`),this.data={stack:(R=T.stack)!=null?R:_}):(super(`${_}${T?`: ${JSON.stringify(T,null,2)}`:""}`),this.data={stack:_})}};var o=class extends N{constructor(T,R){let A=R.length===1?"it":"them";super(`Tried to use a ${T} in @novu/framework without ${R.join(", ")} installed. Please install ${A} by running \`npm install ${R.join(" ")}\`.`);this.statusCode=500;this.code="MissingDependencyError"}};var I=async(e,_)=>{let T=new Set;if((await Promise.allSettled(e.map(A=>A.import))).forEach((A,M)=>{let O=e[M];A.status==="fulfilled"&&O.exports.every(F=>A.value[F]!==void 0)||T.add(O.name)}),T.size>0)throw new o(_,Array.from(T))};var E=class{constructor(){this.requiredImports=[];this.ajv=new U.default({useDefaults:!0,removeAdditional:"failing",strict:!1}),(0,P.default)(this.ajv),this.compiledSchemas=new Map}async canHandle(_){let T=_.type==="object"||!!_.anyOf||!!_.allOf||!!_.oneOf;return T&&await I(this.requiredImports,"JSON schema"),T}async validate(_,T){let R=this.compiledSchemas.get(T);R||(R=this.ajv.compile(T),this.compiledSchemas.set(T,R));let A=S(_);return R(A)?{success:!0,data:A}:{success:!1,errors:R.errors.map(O=>({path:O.instancePath,message:O.message}))}}async transformToJsonSchema(_){return _}};var l=class{constructor(){this.requiredImports=[{name:"zod",import:import("zod"),exports:["ZodType"]},{name:"zod-to-json-schema",import:import("zod-to-json-schema"),exports:["zodToJsonSchema"]}]}async canHandle(_){let T=_.safeParseAsync!==void 0;return T&&await I(this.requiredImports,"Zod schema"),T}async validate(_,T){let R=await T.safeParseAsync(_);return R.success?{success:!0,data:R.data}:{success:!1,errors:R.error.issues.map(A=>({path:`/${A.path.join("/")}`,message:A.message}))}}async transformToJsonSchema(_){let{zodToJsonSchema:T}=await import("zod-to-json-schema");return T(_)}};var D=new l,d=new E,h=async(e,_)=>{if(await D.canHandle(e))return D.validate(_,e);if(await d.canHandle(e))return d.validate(_,e);throw new Error("Invalid schema")},f=async e=>{if(await D.canHandle(e))return D.transformToJsonSchema(e);if(await d.canHandle(e))return d.transformToJsonSchema(e);throw new Error("Invalid schema")};0&&(module.exports={transformSchema,validateData});
|
|
@@ -47,7 +47,8 @@ declare enum ChannelTypeEnum {
|
|
|
47
47
|
EMAIL = "email",
|
|
48
48
|
SMS = "sms",
|
|
49
49
|
CHAT = "chat",
|
|
50
|
-
PUSH = "push"
|
|
50
|
+
PUSH = "push",
|
|
51
|
+
TOOL = "tool"
|
|
51
52
|
}
|
|
52
53
|
interface IAttachmentOptions {
|
|
53
54
|
mime: string;
|
|
@@ -241,6 +242,24 @@ interface AgentConversation {
|
|
|
241
242
|
createdAt: string;
|
|
242
243
|
lastActivityAt: string;
|
|
243
244
|
}
|
|
245
|
+
/**
|
|
246
|
+
* A single connect-time context value: either a bare string id, or a rich object with an `id`
|
|
247
|
+
* and arbitrary `data`. Mirrors Novu's `ContextValue`.
|
|
248
|
+
*/
|
|
249
|
+
type AgentContextValue = string | {
|
|
250
|
+
id: string;
|
|
251
|
+
data?: Record<string, unknown>;
|
|
252
|
+
};
|
|
253
|
+
/**
|
|
254
|
+
* Connect-time context bound to the channel connection and resolved server-side for the current
|
|
255
|
+
* turn.
|
|
256
|
+
*
|
|
257
|
+
* Populated by Novu from the context an integrator passes to the Connect button (e.g. the Slack
|
|
258
|
+
* connect flow persists it on the `ChannelConnection`). It lets a single hosted agent serve many
|
|
259
|
+
* tenants: the agent reads its own tenant/org out of the context to scope writes. Keys are
|
|
260
|
+
* integrator-defined context types (e.g. `tenant`), mirroring Novu's `ContextPayload`.
|
|
261
|
+
*/
|
|
262
|
+
type AgentContextPayload = Record<string, AgentContextValue>;
|
|
244
263
|
/** The Novu subscriber who initiated or is participating in the conversation. */
|
|
245
264
|
interface AgentSubscriber {
|
|
246
265
|
/** Stable Novu subscriber ID. */
|
|
@@ -441,6 +460,14 @@ interface ToolApprovalConfig {
|
|
|
441
460
|
approvalCard: (overrides?: Omit<ToolApprovalCard, 'type'>) => ToolApprovalCard;
|
|
442
461
|
}) => MessageContent | ToolApprovalCard;
|
|
443
462
|
}
|
|
463
|
+
/**
|
|
464
|
+
* How Novu treats unknown/unlinked senders of a distributed agent, mirrored onto
|
|
465
|
+
* the bridge wire so the framework can gate before running a handler:
|
|
466
|
+
* - `open`: anyone may talk to the agent (unknown senders are auto-provisioned).
|
|
467
|
+
* - `restricted`: only authenticated, linked subscribers proceed; unlinked authors
|
|
468
|
+
* are shown an auth CTA and short-circuited.
|
|
469
|
+
*/
|
|
470
|
+
type AgentSubscriberAccess = 'open' | 'restricted';
|
|
444
471
|
/** Passed to `onToolApproval` when the user clicks Approve or Deny. */
|
|
445
472
|
interface ToolApprovalDecision {
|
|
446
473
|
/** The tool that was awaiting approval. */
|
|
@@ -500,6 +527,12 @@ interface AgentHandlerContext {
|
|
|
500
527
|
* resolve a subscriber for this conversation.
|
|
501
528
|
*/
|
|
502
529
|
readonly subscriber: AgentSubscriber | null;
|
|
530
|
+
/**
|
|
531
|
+
* Connect-time context resolved for this turn from the channel connection, or `null` when none
|
|
532
|
+
* was bound. Populated server-side (trusted) — safe to use for authorizing and scoping writes
|
|
533
|
+
* (e.g. reading the customer's tenant/organization out of it).
|
|
534
|
+
*/
|
|
535
|
+
readonly context: AgentContextPayload | null;
|
|
503
536
|
/**
|
|
504
537
|
* Full conversation history as an ordered array of entries.
|
|
505
538
|
* Map to your LLM's message format before making a model call:
|
|
@@ -728,6 +761,19 @@ interface AgentBridgeRequest {
|
|
|
728
761
|
reaction: AgentReaction | null;
|
|
729
762
|
conversation: AgentConversation;
|
|
730
763
|
subscriber: AgentSubscriber | null;
|
|
764
|
+
/**
|
|
765
|
+
* Effective subscriber-access policy for this agent (`open` | `restricted`),
|
|
766
|
+
* resolved server-side. Drives the framework's built-in auth gate: on a
|
|
767
|
+
* `restricted` agent an unlinked author is short-circuited with an auth CTA
|
|
768
|
+
* before any handler runs. Optional on the wire for backward compatibility;
|
|
769
|
+
* absent is treated as `open` (no gating).
|
|
770
|
+
*/
|
|
771
|
+
subscriberAccess?: AgentSubscriberAccess;
|
|
772
|
+
/**
|
|
773
|
+
* Connect-time context resolved server-side for this turn (trusted). Optional on the wire so
|
|
774
|
+
* older API versions that don't send it remain compatible; absent → `ctx.context` is `null`.
|
|
775
|
+
*/
|
|
776
|
+
context?: AgentContextPayload | null;
|
|
731
777
|
history: AgentHistoryEntry[];
|
|
732
778
|
platform: string;
|
|
733
779
|
platformContext: AgentPlatformContext;
|
|
@@ -823,4 +869,4 @@ interface SentMessageInfo {
|
|
|
823
869
|
platformThreadId: string;
|
|
824
870
|
}
|
|
825
871
|
|
|
826
|
-
export { type Agent as A, type
|
|
872
|
+
export { type Agent as A, type ISubscriberPayload as B, TriggerEventStatusEnum as C, type ToolResult as D, type ToolApprovalRequestPayload as E, type FileRef as F, AgentEventEnum as G, type TypingControl as H, type ITriggerPayload as I, type ToolApprovalControl as J, type AgentBridgeRequest as K, type AgentReplyPayload as L, type MessageContent as M, type DeleteMessagePayload as N, type EditPayload as O, type MetadataSignal as P, type ParsedApprovalAction as Q, type ReplyHandle as R, type SentMessageInfo as S, type ToolApprovalCard as T, type ReplyContent as U, type Signal as V, type WorkflowPreferencesPartial as W, type TriggerSignal as X, buildApprovalActionId as Y, parseApprovalActionId as Z, type AgentAction as a, type AgentActionContext as b, type AgentAttachment as c, type AgentContext as d, type AgentContextPayload as e, type AgentContextValue as f, type AgentConversation as g, AgentDeliveryError as h, AgentError as i, type AgentHandlerContext as j, type AgentHandlers as k, type AgentHistoryEntry as l, type AgentMessage as m, type AgentMessageAuthor as n, type AgentMessageContext as o, type AgentPlatformContext as p, type AgentReaction as q, type AgentReactionContext as r, type AgentResolveContext as s, type AgentSubscriber as t, type AgentSubscriberAccess as u, type AgentToolCall as v, type ToolApprovalConfig as w, type ToolApprovalDecision as x, toAgentError as y, type TriggerRecipientsPayload as z };
|