@novu/framework 2.10.1-alpha.2 → 2.10.1-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{health-check.types-Nhsa_lGZ.d.cts → health-check.types-S8oS3AQZ.d.cts} +138 -138
- package/dist/cjs/{index-gi0_Wcu3.d.cts → index-ZVAtl8F3.d.cts} +102 -21
- package/dist/cjs/index.cjs +59 -59
- package/dist/cjs/index.d.cts +3 -3
- package/dist/cjs/internal/index.d.cts +3 -3
- package/dist/cjs/servers/express.cjs +59 -59
- package/dist/cjs/servers/express.d.cts +4 -4
- package/dist/cjs/servers/h3.cjs +59 -59
- package/dist/cjs/servers/h3.d.cts +4 -4
- package/dist/cjs/servers/lambda.cjs +59 -59
- package/dist/cjs/servers/lambda.d.cts +5 -5
- package/dist/cjs/servers/nest.cjs +59 -59
- package/dist/cjs/servers/nest.d.cts +6 -6
- package/dist/cjs/servers/next.cjs +59 -59
- package/dist/cjs/servers/next.d.cts +4 -4
- package/dist/cjs/servers/nuxt.cjs +59 -59
- package/dist/cjs/servers/nuxt.d.cts +4 -4
- package/dist/cjs/servers/remix.cjs +59 -59
- package/dist/cjs/servers/remix.d.cts +4 -4
- package/dist/cjs/servers/sveltekit.cjs +59 -59
- package/dist/cjs/servers/sveltekit.d.cts +4 -4
- package/dist/cjs/step-resolver.d.cts +2 -2
- package/dist/esm/{chunk-FURRAVE4.js → chunk-FI2YN7IA.js} +56 -56
- package/dist/esm/{health-check.types-zMcfbkrA.d.ts → health-check.types-C5lg4csi.d.ts} +138 -138
- package/dist/esm/{index-DBjXwxNK.d.ts → index-D0d-O6LJ.d.ts} +102 -21
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/internal/index.d.ts +3 -3
- package/dist/esm/servers/express.d.ts +4 -4
- package/dist/esm/servers/express.js +1 -1
- package/dist/esm/servers/h3.d.ts +4 -4
- package/dist/esm/servers/h3.js +1 -1
- package/dist/esm/servers/lambda.d.ts +5 -5
- package/dist/esm/servers/lambda.js +1 -1
- package/dist/esm/servers/nest.d.ts +6 -6
- package/dist/esm/servers/nest.js +1 -1
- package/dist/esm/servers/next.d.ts +4 -4
- package/dist/esm/servers/next.js +1 -1
- package/dist/esm/servers/nuxt.d.ts +4 -4
- package/dist/esm/servers/nuxt.js +1 -1
- package/dist/esm/servers/remix.d.ts +4 -4
- package/dist/esm/servers/remix.js +1 -1
- package/dist/esm/servers/sveltekit.d.ts +4 -4
- package/dist/esm/servers/sveltekit.js +1 -1
- package/dist/esm/step-resolver.d.ts +2 -2
- package/package.json +2 -2
- package/dist/cjs/{subscriber.types-CNLicO8m.d.cts → subscriber.types-DgRgSKMw.d.cts} +77 -77
- package/dist/esm/{subscriber.types-B0sKq6v3.d.ts → subscriber.types-CbMgjzR-.d.ts} +77 -77
|
@@ -1,6 +1,142 @@
|
|
|
1
|
-
import { b as ContextPayload, c as ConditionalPartial, P as PickRequiredKeys, d as Step, e as Prettify, S as Subscriber, E as EnvironmentSystemVariables, C as ContextResolved, D as DeepPartial$1, f as ChannelStepEnum, A as ActionStepEnum, g as Awaitable, W as WithPassthrough, h as StepOptions } from './subscriber.types-
|
|
1
|
+
import { b as ContextPayload, c as ConditionalPartial, P as PickRequiredKeys, d as Step, e as Prettify, S as Subscriber, E as EnvironmentSystemVariables, C as ContextResolved, D as DeepPartial$1, f as ChannelStepEnum, A as ActionStepEnum, g as Awaitable, W as WithPassthrough, h as StepOptions } from './subscriber.types-CbMgjzR-.js';
|
|
2
2
|
import { S as Schema, J as JsonSchema } from './base.schema.types-BApIn9jr.js';
|
|
3
3
|
|
|
4
|
+
declare enum ChannelTypeEnum {
|
|
5
|
+
IN_APP = "in_app",
|
|
6
|
+
EMAIL = "email",
|
|
7
|
+
SMS = "sms",
|
|
8
|
+
CHAT = "chat",
|
|
9
|
+
PUSH = "push"
|
|
10
|
+
}
|
|
11
|
+
interface IAttachmentOptions {
|
|
12
|
+
mime: string;
|
|
13
|
+
file: Buffer;
|
|
14
|
+
name?: string;
|
|
15
|
+
channels?: ChannelTypeEnum[];
|
|
16
|
+
cid?: string;
|
|
17
|
+
disposition?: string;
|
|
18
|
+
}
|
|
19
|
+
interface ITriggerPayload {
|
|
20
|
+
attachments?: IAttachmentOptions[];
|
|
21
|
+
[key: string]: string | string[] | boolean | number | undefined | IAttachmentOptions | IAttachmentOptions[] | Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
interface ISubscriberPayload {
|
|
24
|
+
subscriberId: string;
|
|
25
|
+
firstName?: string;
|
|
26
|
+
lastName?: string;
|
|
27
|
+
email?: string;
|
|
28
|
+
phone?: string;
|
|
29
|
+
avatar?: string;
|
|
30
|
+
locale?: string;
|
|
31
|
+
data?: Record<string, unknown>;
|
|
32
|
+
channels?: ISubscriberChannel[];
|
|
33
|
+
}
|
|
34
|
+
interface ISubscriberChannel {
|
|
35
|
+
providerId: ChatProviderIdEnum | PushProviderIdEnum;
|
|
36
|
+
integrationIdentifier?: string;
|
|
37
|
+
credentials: IChannelCredentials;
|
|
38
|
+
}
|
|
39
|
+
interface IChannelCredentials {
|
|
40
|
+
webhookUrl?: string;
|
|
41
|
+
deviceTokens?: string[];
|
|
42
|
+
}
|
|
43
|
+
interface ITopic {
|
|
44
|
+
type: 'Topic';
|
|
45
|
+
topicKey: string;
|
|
46
|
+
exclude?: string[];
|
|
47
|
+
}
|
|
48
|
+
type TriggerRecipientsPayload = string | ISubscriberPayload | ITopic | ISubscriberPayload[] | ITopic[];
|
|
49
|
+
declare enum TriggerEventStatusEnum {
|
|
50
|
+
ERROR = "error",
|
|
51
|
+
NOT_ACTIVE = "trigger_not_active",
|
|
52
|
+
NO_WORKFLOW_ACTIVE_STEPS = "no_workflow_active_steps_defined",
|
|
53
|
+
NO_WORKFLOW_STEPS = "no_workflow_steps_defined",
|
|
54
|
+
PROCESSED = "processed",
|
|
55
|
+
SUBSCRIBER_MISSING = "subscriber_id_missing",
|
|
56
|
+
TENANT_MISSING = "no_tenant_found"
|
|
57
|
+
}
|
|
58
|
+
declare enum ChatProviderIdEnum {
|
|
59
|
+
Slack = "slack",
|
|
60
|
+
Discord = "discord",
|
|
61
|
+
MsTeams = "msteams",
|
|
62
|
+
Mattermost = "mattermost",
|
|
63
|
+
Ryver = "ryver",
|
|
64
|
+
Zulip = "zulip",
|
|
65
|
+
GrafanaOnCall = "grafana-on-call",
|
|
66
|
+
GetStream = "getstream",
|
|
67
|
+
RocketChat = "rocket-chat",
|
|
68
|
+
WhatsAppBusiness = "whatsapp-business",
|
|
69
|
+
ChatWebhook = "chat-webhook"
|
|
70
|
+
}
|
|
71
|
+
declare enum PushProviderIdEnum {
|
|
72
|
+
FCM = "fcm",
|
|
73
|
+
APNS = "apns",
|
|
74
|
+
EXPO = "expo",
|
|
75
|
+
OneSignal = "one-signal",
|
|
76
|
+
Pushpad = "pushpad",
|
|
77
|
+
PushWebhook = "push-webhook",
|
|
78
|
+
PusherBeams = "pusher-beams",
|
|
79
|
+
AppIO = "appio"
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* A preference for a notification delivery workflow.
|
|
83
|
+
*
|
|
84
|
+
* This provides a shortcut to setting all channels to the same preference.
|
|
85
|
+
*/
|
|
86
|
+
type WorkflowPreference$1 = {
|
|
87
|
+
/**
|
|
88
|
+
* A flag specifying if notification delivery is enabled for the workflow.
|
|
89
|
+
*
|
|
90
|
+
* If `true`, notification delivery is enabled by default for all channels.
|
|
91
|
+
*
|
|
92
|
+
* This setting can be overridden by the channel preferences.
|
|
93
|
+
*
|
|
94
|
+
* @default true
|
|
95
|
+
*/
|
|
96
|
+
enabled: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* A flag specifying if the preference is read-only.
|
|
99
|
+
*
|
|
100
|
+
* If `true`, the preference cannot be changed by the Subscriber.
|
|
101
|
+
*
|
|
102
|
+
* @default false
|
|
103
|
+
*/
|
|
104
|
+
readOnly: boolean;
|
|
105
|
+
};
|
|
106
|
+
/** A preference for a notification delivery channel. */
|
|
107
|
+
type ChannelPreference$1 = {
|
|
108
|
+
/**
|
|
109
|
+
* A flag specifying if notification delivery is enabled for the channel.
|
|
110
|
+
*
|
|
111
|
+
* If `true`, notification delivery is enabled.
|
|
112
|
+
*
|
|
113
|
+
* @default true
|
|
114
|
+
*/
|
|
115
|
+
enabled: boolean;
|
|
116
|
+
};
|
|
117
|
+
type WorkflowPreferences$1 = {
|
|
118
|
+
/**
|
|
119
|
+
* A preference for the workflow.
|
|
120
|
+
*
|
|
121
|
+
* The values specified here will be used if no preference is specified for a channel.
|
|
122
|
+
*/
|
|
123
|
+
all: WorkflowPreference$1;
|
|
124
|
+
/**
|
|
125
|
+
* A preference for each notification delivery channel.
|
|
126
|
+
*
|
|
127
|
+
* If no preference is specified for a channel, the `all` preference will be used.
|
|
128
|
+
*/
|
|
129
|
+
channels: Record<ChannelTypeEnum, ChannelPreference$1>;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Recursively make all properties of type `T` optional.
|
|
133
|
+
*/
|
|
134
|
+
type DeepPartial<T> = T extends object ? {
|
|
135
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
136
|
+
} : T;
|
|
137
|
+
/** A partial set of workflow preferences. */
|
|
138
|
+
type WorkflowPreferencesPartial = DeepPartial<WorkflowPreferences$1>;
|
|
139
|
+
|
|
4
140
|
type CodeResult = {
|
|
5
141
|
code: string;
|
|
6
142
|
};
|
|
@@ -151,142 +287,6 @@ declare enum WorkflowChannelEnum {
|
|
|
151
287
|
IN_APP = "inApp"
|
|
152
288
|
}
|
|
153
289
|
|
|
154
|
-
declare enum ChannelTypeEnum {
|
|
155
|
-
IN_APP = "in_app",
|
|
156
|
-
EMAIL = "email",
|
|
157
|
-
SMS = "sms",
|
|
158
|
-
CHAT = "chat",
|
|
159
|
-
PUSH = "push"
|
|
160
|
-
}
|
|
161
|
-
interface IAttachmentOptions {
|
|
162
|
-
mime: string;
|
|
163
|
-
file: Buffer;
|
|
164
|
-
name?: string;
|
|
165
|
-
channels?: ChannelTypeEnum[];
|
|
166
|
-
cid?: string;
|
|
167
|
-
disposition?: string;
|
|
168
|
-
}
|
|
169
|
-
interface ITriggerPayload {
|
|
170
|
-
attachments?: IAttachmentOptions[];
|
|
171
|
-
[key: string]: string | string[] | boolean | number | undefined | IAttachmentOptions | IAttachmentOptions[] | Record<string, unknown>;
|
|
172
|
-
}
|
|
173
|
-
interface ISubscriberPayload {
|
|
174
|
-
subscriberId: string;
|
|
175
|
-
firstName?: string;
|
|
176
|
-
lastName?: string;
|
|
177
|
-
email?: string;
|
|
178
|
-
phone?: string;
|
|
179
|
-
avatar?: string;
|
|
180
|
-
locale?: string;
|
|
181
|
-
data?: Record<string, unknown>;
|
|
182
|
-
channels?: ISubscriberChannel[];
|
|
183
|
-
}
|
|
184
|
-
interface ISubscriberChannel {
|
|
185
|
-
providerId: ChatProviderIdEnum | PushProviderIdEnum;
|
|
186
|
-
integrationIdentifier?: string;
|
|
187
|
-
credentials: IChannelCredentials;
|
|
188
|
-
}
|
|
189
|
-
interface IChannelCredentials {
|
|
190
|
-
webhookUrl?: string;
|
|
191
|
-
deviceTokens?: string[];
|
|
192
|
-
}
|
|
193
|
-
interface ITopic {
|
|
194
|
-
type: 'Topic';
|
|
195
|
-
topicKey: string;
|
|
196
|
-
exclude?: string[];
|
|
197
|
-
}
|
|
198
|
-
type TriggerRecipientsPayload = string | ISubscriberPayload | ITopic | ISubscriberPayload[] | ITopic[];
|
|
199
|
-
declare enum TriggerEventStatusEnum {
|
|
200
|
-
ERROR = "error",
|
|
201
|
-
NOT_ACTIVE = "trigger_not_active",
|
|
202
|
-
NO_WORKFLOW_ACTIVE_STEPS = "no_workflow_active_steps_defined",
|
|
203
|
-
NO_WORKFLOW_STEPS = "no_workflow_steps_defined",
|
|
204
|
-
PROCESSED = "processed",
|
|
205
|
-
SUBSCRIBER_MISSING = "subscriber_id_missing",
|
|
206
|
-
TENANT_MISSING = "no_tenant_found"
|
|
207
|
-
}
|
|
208
|
-
declare enum ChatProviderIdEnum {
|
|
209
|
-
Slack = "slack",
|
|
210
|
-
Discord = "discord",
|
|
211
|
-
MsTeams = "msteams",
|
|
212
|
-
Mattermost = "mattermost",
|
|
213
|
-
Ryver = "ryver",
|
|
214
|
-
Zulip = "zulip",
|
|
215
|
-
GrafanaOnCall = "grafana-on-call",
|
|
216
|
-
GetStream = "getstream",
|
|
217
|
-
RocketChat = "rocket-chat",
|
|
218
|
-
WhatsAppBusiness = "whatsapp-business",
|
|
219
|
-
ChatWebhook = "chat-webhook"
|
|
220
|
-
}
|
|
221
|
-
declare enum PushProviderIdEnum {
|
|
222
|
-
FCM = "fcm",
|
|
223
|
-
APNS = "apns",
|
|
224
|
-
EXPO = "expo",
|
|
225
|
-
OneSignal = "one-signal",
|
|
226
|
-
Pushpad = "pushpad",
|
|
227
|
-
PushWebhook = "push-webhook",
|
|
228
|
-
PusherBeams = "pusher-beams",
|
|
229
|
-
AppIO = "appio"
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* A preference for a notification delivery workflow.
|
|
233
|
-
*
|
|
234
|
-
* This provides a shortcut to setting all channels to the same preference.
|
|
235
|
-
*/
|
|
236
|
-
type WorkflowPreference$1 = {
|
|
237
|
-
/**
|
|
238
|
-
* A flag specifying if notification delivery is enabled for the workflow.
|
|
239
|
-
*
|
|
240
|
-
* If `true`, notification delivery is enabled by default for all channels.
|
|
241
|
-
*
|
|
242
|
-
* This setting can be overridden by the channel preferences.
|
|
243
|
-
*
|
|
244
|
-
* @default true
|
|
245
|
-
*/
|
|
246
|
-
enabled: boolean;
|
|
247
|
-
/**
|
|
248
|
-
* A flag specifying if the preference is read-only.
|
|
249
|
-
*
|
|
250
|
-
* If `true`, the preference cannot be changed by the Subscriber.
|
|
251
|
-
*
|
|
252
|
-
* @default false
|
|
253
|
-
*/
|
|
254
|
-
readOnly: boolean;
|
|
255
|
-
};
|
|
256
|
-
/** A preference for a notification delivery channel. */
|
|
257
|
-
type ChannelPreference$1 = {
|
|
258
|
-
/**
|
|
259
|
-
* A flag specifying if notification delivery is enabled for the channel.
|
|
260
|
-
*
|
|
261
|
-
* If `true`, notification delivery is enabled.
|
|
262
|
-
*
|
|
263
|
-
* @default true
|
|
264
|
-
*/
|
|
265
|
-
enabled: boolean;
|
|
266
|
-
};
|
|
267
|
-
type WorkflowPreferences$1 = {
|
|
268
|
-
/**
|
|
269
|
-
* A preference for the workflow.
|
|
270
|
-
*
|
|
271
|
-
* The values specified here will be used if no preference is specified for a channel.
|
|
272
|
-
*/
|
|
273
|
-
all: WorkflowPreference$1;
|
|
274
|
-
/**
|
|
275
|
-
* A preference for each notification delivery channel.
|
|
276
|
-
*
|
|
277
|
-
* If no preference is specified for a channel, the `all` preference will be used.
|
|
278
|
-
*/
|
|
279
|
-
channels: Record<ChannelTypeEnum, ChannelPreference$1>;
|
|
280
|
-
};
|
|
281
|
-
/**
|
|
282
|
-
* Recursively make all properties of type `T` optional.
|
|
283
|
-
*/
|
|
284
|
-
type DeepPartial<T> = T extends object ? {
|
|
285
|
-
[P in keyof T]?: DeepPartial<T[P]>;
|
|
286
|
-
} : T;
|
|
287
|
-
/** A partial set of workflow preferences. */
|
|
288
|
-
type WorkflowPreferencesPartial = DeepPartial<WorkflowPreferences$1>;
|
|
289
|
-
|
|
290
290
|
type EventPayload = ITriggerPayload;
|
|
291
291
|
type Actor = string | ISubscriberPayload;
|
|
292
292
|
type Recipients = TriggerRecipientsPayload;
|
|
@@ -699,4 +699,4 @@ type HealthCheck = {
|
|
|
699
699
|
};
|
|
700
700
|
};
|
|
701
701
|
|
|
702
|
-
export { type ClientOptions as C, type DiscoverAgentOutput as D, type ExecuteInput as E, GetActionEnum as G, type HealthCheck as H, PostActionEnum as P, SeverityLevelEnum as S, type Workflow as W, CronExpression as a, type CancelEventTriggerResponse as b, type ChannelPreference as c, type CodeResult as d, type DiscoverOutput as e, type DiscoverProviderOutput as f, type DiscoverStepOutput as g, type DiscoverWorkflowOutput as h, type Event as i, type EventTriggerParams as j, type EventTriggerResponse as k, type EventTriggerResult as l, type Execute as m, type ExecuteOutput as n, type ExecuteOutputMetadata as o, type ExecuteOutputOptions as p, type State as q, type StepType as r, WorkflowChannelEnum as s, type WorkflowOptions as t, type WorkflowPreference as u, type WorkflowPreferences as v };
|
|
702
|
+
export { type ClientOptions as C, type DiscoverAgentOutput as D, type ExecuteInput as E, GetActionEnum as G, type HealthCheck as H, PostActionEnum as P, SeverityLevelEnum as S, type TriggerRecipientsPayload as T, type Workflow as W, CronExpression as a, type CancelEventTriggerResponse as b, type ChannelPreference as c, type CodeResult as d, type DiscoverOutput as e, type DiscoverProviderOutput as f, type DiscoverStepOutput as g, type DiscoverWorkflowOutput as h, type Event as i, type EventTriggerParams as j, type EventTriggerResponse as k, type EventTriggerResult as l, type Execute as m, type ExecuteOutput as n, type ExecuteOutputMetadata as o, type ExecuteOutputOptions as p, type State as q, type StepType as r, WorkflowChannelEnum as s, type WorkflowOptions as t, type WorkflowPreference as u, type WorkflowPreferences as v };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ChatElement, CardElement } from 'chat';
|
|
2
|
-
import { C as ClientOptions, W as Workflow, H as HealthCheck, e as DiscoverOutput, i as Event, n as ExecuteOutput, d as CodeResult, j as EventTriggerParams, m as Execute, t as WorkflowOptions } from './health-check.types-
|
|
3
|
-
import { g as Awaitable } from './subscriber.types-
|
|
1
|
+
import { ChatElement, Emoji, CardElement } from 'chat';
|
|
2
|
+
import { T as TriggerRecipientsPayload, C as ClientOptions, W as Workflow, H as HealthCheck, e as DiscoverOutput, i as Event, n as ExecuteOutput, d as CodeResult, j as EventTriggerParams, m as Execute, t as WorkflowOptions } from './health-check.types-C5lg4csi.js';
|
|
3
|
+
import { g as Awaitable } from './subscriber.types-CbMgjzR-.js';
|
|
4
4
|
import { S as Schema, a as FromSchema, F as FromSchemaUnvalidated } from './base.schema.types-BApIn9jr.js';
|
|
5
5
|
import './step-resolver.js';
|
|
6
6
|
|
|
@@ -76,18 +76,14 @@ interface FileRef {
|
|
|
76
76
|
/**
|
|
77
77
|
* Content accepted by ctx.reply() and handle.edit().
|
|
78
78
|
*
|
|
79
|
-
* - `string` — plain text
|
|
80
|
-
* - `{ markdown, files? }` — markdown-formatted text, optionally with file attachments
|
|
79
|
+
* - `string` — plain text or markdown; converted to platform format by the chat SDK
|
|
81
80
|
* - `ChatElement` — interactive card built with Card(), Button(), etc.
|
|
82
|
-
*
|
|
81
|
+
*
|
|
82
|
+
* For file attachments, pass a `files` array as the second argument to reply()/edit().
|
|
83
83
|
*/
|
|
84
|
-
type MessageContent = string |
|
|
85
|
-
markdown: string;
|
|
86
|
-
files?: FileRef[];
|
|
87
|
-
} | ChatElement;
|
|
84
|
+
type MessageContent = string | ChatElement;
|
|
88
85
|
/** Normalized content shape sent over HTTP to the reply endpoint. */
|
|
89
86
|
interface ReplyContent {
|
|
90
|
-
text?: string;
|
|
91
87
|
markdown?: string;
|
|
92
88
|
card?: CardElement;
|
|
93
89
|
files?: FileRef[];
|
|
@@ -115,7 +111,9 @@ interface ReplyHandle {
|
|
|
115
111
|
/** Platform-native thread id this message lives in. */
|
|
116
112
|
readonly platformThreadId: string;
|
|
117
113
|
/** Edit this message in place with new content. Returns the same handle for chaining. */
|
|
118
|
-
edit(content: MessageContent
|
|
114
|
+
edit(content: MessageContent, options?: {
|
|
115
|
+
files?: FileRef[];
|
|
116
|
+
}): Promise<ReplyHandle>;
|
|
119
117
|
}
|
|
120
118
|
interface AgentContext {
|
|
121
119
|
readonly event: string;
|
|
@@ -133,24 +131,63 @@ interface AgentContext {
|
|
|
133
131
|
*
|
|
134
132
|
* @example
|
|
135
133
|
* const msg = await ctx.reply('Thinking…');
|
|
136
|
-
* // ... do work ...
|
|
137
134
|
* await msg.edit('Here is the answer');
|
|
135
|
+
*
|
|
136
|
+
* @example with file attachment
|
|
137
|
+
* await ctx.reply('Here is your report', {
|
|
138
|
+
* files: [{ filename: 'report.pdf', url: 'https://...' }],
|
|
139
|
+
* });
|
|
138
140
|
*/
|
|
139
|
-
reply(content: MessageContent
|
|
141
|
+
reply(content: MessageContent, options?: {
|
|
142
|
+
files?: FileRef[];
|
|
143
|
+
}): Promise<ReplyHandle>;
|
|
140
144
|
resolve(summary?: string): void;
|
|
141
145
|
metadata: {
|
|
142
146
|
set(key: string, value: unknown): void;
|
|
143
147
|
};
|
|
148
|
+
/**
|
|
149
|
+
* Trigger a Novu workflow from within this agent handler.
|
|
150
|
+
*
|
|
151
|
+
* Signals are batched and flushed with the next `ctx.reply()`, or automatically when the
|
|
152
|
+
* handler completes. The workflow executes asynchronously — the agent reply is not blocked.
|
|
153
|
+
*
|
|
154
|
+
* @param workflowId - Workflow identifier (e.g. `'escalation-email'`).
|
|
155
|
+
* @param opts.to - Recipient(s). Omit to target the conversation's resolved subscriber.
|
|
156
|
+
* @param opts.payload - Data forwarded to the workflow payload schema.
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* // Target the conversation subscriber automatically
|
|
160
|
+
* ctx.trigger('follow-up-email', { payload: { reason: 'unresolved' } });
|
|
161
|
+
*
|
|
162
|
+
* // Explicit recipient
|
|
163
|
+
* ctx.trigger('escalation-email', { to: 'agent-inbox', payload: { priority: 'high' } });
|
|
164
|
+
*
|
|
165
|
+
* // Topic broadcast
|
|
166
|
+
* ctx.trigger('team-alert', { to: { type: 'Topic', topicKey: 'support-team' } });
|
|
167
|
+
*/
|
|
144
168
|
trigger(workflowId: string, opts?: {
|
|
145
|
-
to?:
|
|
169
|
+
to?: TriggerRecipientsPayload;
|
|
146
170
|
payload?: Record<string, unknown>;
|
|
147
171
|
}): void;
|
|
172
|
+
/**
|
|
173
|
+
* Add an emoji reaction to any platform message.
|
|
174
|
+
* Reactions are queued and sent with the next `ctx.reply()`, or flushed automatically
|
|
175
|
+
* when the handler completes (same batching contract as `ctx.trigger()`).
|
|
176
|
+
*
|
|
177
|
+
* @param messageId - Platform-native message ID to react to (e.g. Slack `ts`).
|
|
178
|
+
* @param emojiName - Emoji short-name (e.g. `'thumbs_up'`, `'check_mark'`).
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* ctx.addReaction(ctx.reaction!.messageId, 'check_mark');
|
|
182
|
+
* await ctx.reply('Done!');
|
|
183
|
+
*/
|
|
184
|
+
addReaction(messageId: string, emojiName: Emoji): void;
|
|
148
185
|
}
|
|
149
186
|
interface AgentHandlers {
|
|
150
|
-
onMessage: (ctx: AgentContext) =>
|
|
151
|
-
onReaction?: (ctx: AgentContext) =>
|
|
152
|
-
onAction?: (ctx: AgentContext) =>
|
|
153
|
-
onResolve?: (ctx: AgentContext) =>
|
|
187
|
+
onMessage: (ctx: AgentContext) => Awaitable<MessageContent | void>;
|
|
188
|
+
onReaction?: (ctx: AgentContext) => Awaitable<MessageContent | void>;
|
|
189
|
+
onAction?: (ctx: AgentContext) => Awaitable<MessageContent | void>;
|
|
190
|
+
onResolve?: (ctx: AgentContext) => Awaitable<MessageContent | void>;
|
|
154
191
|
}
|
|
155
192
|
interface Agent {
|
|
156
193
|
id: string;
|
|
@@ -179,10 +216,19 @@ type MetadataSignal = {
|
|
|
179
216
|
key: string;
|
|
180
217
|
value: unknown;
|
|
181
218
|
};
|
|
219
|
+
/**
|
|
220
|
+
* Queued by `ctx.trigger()` — instructs Novu to fire a workflow from inside an agent handler.
|
|
221
|
+
*
|
|
222
|
+
* - `workflowId` — the workflow identifier (same string used in `novu.events.trigger()`).
|
|
223
|
+
* - `to` — recipient(s) for the workflow. Accepts a subscriberId string, a subscriber object,
|
|
224
|
+
* a topic, or arrays thereof. When omitted, Novu falls back to the conversation's resolved
|
|
225
|
+
* subscriber. If no subscriber can be resolved, the trigger is skipped and a warning is logged.
|
|
226
|
+
* - `payload` — arbitrary data forwarded to the workflow's payload schema.
|
|
227
|
+
*/
|
|
182
228
|
type TriggerSignal = {
|
|
183
229
|
type: 'trigger';
|
|
184
230
|
workflowId: string;
|
|
185
|
-
to?:
|
|
231
|
+
to?: TriggerRecipientsPayload;
|
|
186
232
|
payload?: Record<string, unknown>;
|
|
187
233
|
};
|
|
188
234
|
type Signal = MetadataSignal | TriggerSignal;
|
|
@@ -191,6 +237,11 @@ interface EditPayload {
|
|
|
191
237
|
messageId: string;
|
|
192
238
|
content: ReplyContent;
|
|
193
239
|
}
|
|
240
|
+
/** An emoji reaction to be added to a platform message. */
|
|
241
|
+
interface AddReactionPayload {
|
|
242
|
+
messageId: string;
|
|
243
|
+
emojiName: Emoji;
|
|
244
|
+
}
|
|
194
245
|
interface AgentReplyPayload {
|
|
195
246
|
conversationId: string;
|
|
196
247
|
integrationIdentifier: string;
|
|
@@ -200,6 +251,7 @@ interface AgentReplyPayload {
|
|
|
200
251
|
summary?: string;
|
|
201
252
|
};
|
|
202
253
|
signals?: Signal[];
|
|
254
|
+
addReactions?: AddReactionPayload[];
|
|
203
255
|
}
|
|
204
256
|
/** Shape returned by /agents/:id/reply when a reply or edit was delivered. */
|
|
205
257
|
interface SentMessageInfo {
|
|
@@ -207,6 +259,35 @@ interface SentMessageInfo {
|
|
|
207
259
|
platformThreadId: string;
|
|
208
260
|
}
|
|
209
261
|
|
|
262
|
+
/**
|
|
263
|
+
* Thrown by `ctx.reply()` and `handle.edit()` when the upstream message delivery
|
|
264
|
+
* fails — e.g. the configured email provider returns 401, Slack rejects the token,
|
|
265
|
+
* or Teams rejects the request.
|
|
266
|
+
*
|
|
267
|
+
* `message` is always a short, human-readable summary.
|
|
268
|
+
* `responseBody` preserves the raw upstream body for debugging.
|
|
269
|
+
*
|
|
270
|
+
* @example
|
|
271
|
+
* ```ts
|
|
272
|
+
* import { AgentDeliveryError } from '@novu/framework';
|
|
273
|
+
*
|
|
274
|
+
* try {
|
|
275
|
+
* await ctx.reply('Hello!');
|
|
276
|
+
* } catch (err) {
|
|
277
|
+
* if (err instanceof AgentDeliveryError) {
|
|
278
|
+
* console.error('Delivery failed:', err.message);
|
|
279
|
+
* return;
|
|
280
|
+
* }
|
|
281
|
+
* throw err;
|
|
282
|
+
* }
|
|
283
|
+
* ```
|
|
284
|
+
*/
|
|
285
|
+
declare class AgentDeliveryError extends Error {
|
|
286
|
+
readonly statusCode: number;
|
|
287
|
+
readonly responseBody: string;
|
|
288
|
+
constructor(statusCode: number, responseBody: string);
|
|
289
|
+
}
|
|
290
|
+
|
|
210
291
|
/**
|
|
211
292
|
* Define a new conversational agent.
|
|
212
293
|
*
|
|
@@ -358,4 +439,4 @@ declare class NovuRequestHandler<Input extends any[] = any[], Output = any> {
|
|
|
358
439
|
*/
|
|
359
440
|
declare function workflow<T_PayloadSchema extends Schema, T_ControlSchema extends Schema, T_EnvSchema extends Schema, T_PayloadValidated extends Record<string, unknown> = FromSchema<T_PayloadSchema>, T_PayloadUnvalidated extends Record<string, unknown> = FromSchemaUnvalidated<T_PayloadSchema>, T_Controls extends Record<string, unknown> = FromSchema<T_ControlSchema>, T_Env extends Record<string, unknown> = FromSchema<T_EnvSchema>>(workflowId: string, execute: Execute<T_PayloadValidated, T_Controls, T_Env>, workflowOptions?: WorkflowOptions<T_PayloadSchema, T_ControlSchema, T_EnvSchema>): Workflow<T_PayloadUnvalidated>;
|
|
360
441
|
|
|
361
|
-
export { type Agent as A, Client as C, type EditPayload as E, type FileRef as F, type INovuRequestHandlerOptions as I, type MessageContent as M, NovuRequestHandler as N, type ReplyContent as R, type ServeHandlerOptions as S, type TriggerSignal as T, type AgentAction as a, type AgentAttachment as b, type AgentBridgeRequest as c, type AgentContext as d, type AgentConversation as e,
|
|
442
|
+
export { type Agent as A, Client as C, type EditPayload as E, type FileRef as F, type INovuRequestHandlerOptions as I, type MessageContent as M, NovuRequestHandler as N, type ReplyContent as R, type ServeHandlerOptions as S, type TriggerSignal as T, type AgentAction as a, type AgentAttachment as b, type AgentBridgeRequest as c, type AgentContext as d, type AgentConversation as e, AgentDeliveryError as f, AgentEventEnum as g, type AgentHandlers as h, type AgentHistoryEntry as i, type AgentMessage as j, type AgentMessageAuthor as k, type AgentPlatformContext as l, type AgentReaction as m, type AgentReplyPayload as n, type AgentSubscriber as o, type MetadataSignal as p, type ReplyHandle as q, type SentMessageInfo as r, type Signal as s, agent as t, workflow as w };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { A as Agent, a as AgentAction, b as AgentAttachment, c as AgentBridgeRequest, d as AgentContext, e as AgentConversation, f as
|
|
2
|
-
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from './health-check.types-
|
|
1
|
+
export { A as Agent, a as AgentAction, b as AgentAttachment, c as AgentBridgeRequest, d as AgentContext, e as AgentConversation, f as AgentDeliveryError, g as AgentEventEnum, h as AgentHandlers, i as AgentHistoryEntry, j as AgentMessage, k as AgentMessageAuthor, l as AgentPlatformContext, m as AgentReaction, n as AgentReplyPayload, o as AgentSubscriber, C as Client, E as EditPayload, F as FileRef, M as MessageContent, p as MetadataSignal, N as NovuRequestHandler, R as ReplyContent, q as ReplyHandle, r as SentMessageInfo, S as ServeHandlerOptions, s as Signal, T as TriggerSignal, t as agent, w as workflow } from './index-D0d-O6LJ.js';
|
|
2
|
+
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from './health-check.types-C5lg4csi.js';
|
|
3
3
|
export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
|
|
4
4
|
export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from './step-resolver.js';
|
|
5
|
-
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from './subscriber.types-
|
|
5
|
+
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from './subscriber.types-CbMgjzR-.js';
|
|
6
6
|
import './base.schema.types-BApIn9jr.js';
|
|
7
7
|
import 'json-schema-to-ts';
|
|
8
8
|
import 'zod';
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b,c,d,e,f,g,h,i,j,k,l,m,n,o as
|
|
1
|
+
import{b,c,d,e,f,g,h,i,j,k,l,m,n,o,p as r}from"./chunk-FI2YN7IA.js";import"./chunk-T2VIX2ZH.js";import{a as s}from"./chunk-2M25EATE.js";import"./chunk-U3IL7QCI.js";import{O as q}from"./chunk-6GCCKYZC.js";import{a as p}from"./chunk-CBLKARLC.js";import{f as a}from"./chunk-EWC7I6UD.js";import"./chunk-52LSX2V5.js";export{c as Actions,l as AgentDeliveryError,n as AgentEventEnum,d as Button,e as Card,f as CardLink,g as CardText,b as Client,a as CronExpression,h as Divider,o as NovuRequestHandler,i as Select,j as SelectOption,q as SeverityLevelEnum,k as TextInput,m as agent,p as providerSchemas,s as step,r as workflow};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PostActionEnum } from '../health-check.types-
|
|
2
|
-
export { b as CancelEventTriggerResponse, c as ChannelPreference, C as ClientOptions, d as CodeResult, a as CronExpression, D as DiscoverAgentOutput, e as DiscoverOutput, f as DiscoverProviderOutput, g as DiscoverStepOutput, h as DiscoverWorkflowOutput, i as Event, j as EventTriggerParams, k as EventTriggerResponse, l as EventTriggerResult, m as Execute, E as ExecuteInput, n as ExecuteOutput, o as ExecuteOutputMetadata, p as ExecuteOutputOptions, G as GetActionEnum, H as HealthCheck, S as SeverityLevelEnum, q as State, r as StepType, W as Workflow, s as WorkflowChannelEnum, t as WorkflowOptions, u as WorkflowPreference, v as WorkflowPreferences } from '../health-check.types-
|
|
3
|
-
export { i as ActionStep, A as ActionStepEnum, g as Awaitable, j as ChannelStep, f as ChannelStepEnum, k as ChatOutput, l as ChatOutputUnvalidated, m as ChatResult, c as ConditionalPartial, b as ContextPayload, C as ContextResolved, n as ContextValue, o as CustomStep, D as DeepPartial, q as DeepRequired, r as DelayDynamicOutput, s as DelayDynamicOutputUnvalidated, t as DelayOutput, u as DelayOutputUnvalidated, v as DelayRegularOutput, w as DelayRegularOutputUnvalidated, x as DelayResult, y as DelayTimedOutput, z as DelayTimedOutputUnvalidated, B as DigestOutput, F as DigestOutputUnvalidated, G as DigestRegularOutput, H as DigestRegularOutputUnvalidated, I as DigestResult, J as DigestTimedOutput, K as DigestTimedOutputUnvalidated, a as Either, L as EmailOutput, M as EmailOutputUnvalidated, N as EmailResult, E as EnvironmentSystemVariables, O as InAppOutput, Q as InAppOutputUnvalidated, R as InAppResult, T as Indexable, U as JobStatusEnum, V as PickOptional, X as PickOptionalKeys, Y as PickRequired, P as PickRequiredKeys, e as Prettify, Z as PushOutput, _ as PushOutputUnvalidated, $ as PushResult, a0 as Skip, a1 as SmsOutput, a2 as SmsOutputUnvalidated, a3 as SmsResult, d as Step, a4 as StepContext, h as StepOptions, a5 as StepOutput, S as Subscriber, a6 as ThrottleOutput, a7 as ThrottleOutputUnvalidated, a8 as ThrottleResult, a9 as actionStepSchemas, aa as channelStepSchemas } from '../subscriber.types-
|
|
1
|
+
import { P as PostActionEnum } from '../health-check.types-C5lg4csi.js';
|
|
2
|
+
export { b as CancelEventTriggerResponse, c as ChannelPreference, C as ClientOptions, d as CodeResult, a as CronExpression, D as DiscoverAgentOutput, e as DiscoverOutput, f as DiscoverProviderOutput, g as DiscoverStepOutput, h as DiscoverWorkflowOutput, i as Event, j as EventTriggerParams, k as EventTriggerResponse, l as EventTriggerResult, m as Execute, E as ExecuteInput, n as ExecuteOutput, o as ExecuteOutputMetadata, p as ExecuteOutputOptions, G as GetActionEnum, H as HealthCheck, S as SeverityLevelEnum, q as State, r as StepType, W as Workflow, s as WorkflowChannelEnum, t as WorkflowOptions, u as WorkflowPreference, v as WorkflowPreferences } from '../health-check.types-C5lg4csi.js';
|
|
3
|
+
export { i as ActionStep, A as ActionStepEnum, g as Awaitable, j as ChannelStep, f as ChannelStepEnum, k as ChatOutput, l as ChatOutputUnvalidated, m as ChatResult, c as ConditionalPartial, b as ContextPayload, C as ContextResolved, n as ContextValue, o as CustomStep, D as DeepPartial, q as DeepRequired, r as DelayDynamicOutput, s as DelayDynamicOutputUnvalidated, t as DelayOutput, u as DelayOutputUnvalidated, v as DelayRegularOutput, w as DelayRegularOutputUnvalidated, x as DelayResult, y as DelayTimedOutput, z as DelayTimedOutputUnvalidated, B as DigestOutput, F as DigestOutputUnvalidated, G as DigestRegularOutput, H as DigestRegularOutputUnvalidated, I as DigestResult, J as DigestTimedOutput, K as DigestTimedOutputUnvalidated, a as Either, L as EmailOutput, M as EmailOutputUnvalidated, N as EmailResult, E as EnvironmentSystemVariables, O as InAppOutput, Q as InAppOutputUnvalidated, R as InAppResult, T as Indexable, U as JobStatusEnum, V as PickOptional, X as PickOptionalKeys, Y as PickRequired, P as PickRequiredKeys, e as Prettify, Z as PushOutput, _ as PushOutputUnvalidated, $ as PushResult, a0 as Skip, a1 as SmsOutput, a2 as SmsOutputUnvalidated, a3 as SmsResult, d as Step, a4 as StepContext, h as StepOptions, a5 as StepOutput, S as Subscriber, a6 as ThrottleOutput, a7 as ThrottleOutputUnvalidated, a8 as ThrottleResult, a9 as actionStepSchemas, aa as channelStepSchemas } from '../subscriber.types-CbMgjzR-.js';
|
|
4
4
|
import { Filter, LiquidOptions, Liquid } from 'liquidjs';
|
|
5
5
|
export { a as FromSchema, F as FromSchemaUnvalidated, J as JsonSchema, S as Schema, Z as ZodSchema, b as ZodSchemaMinimal } from '../base.schema.types-BApIn9jr.js';
|
|
6
6
|
export { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as ServeHandlerOptions } from '../index-
|
|
2
|
-
export { A as Agent, a as AgentAction, b as AgentAttachment, c as AgentBridgeRequest, d as AgentContext, e as AgentConversation, f as
|
|
3
|
-
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-
|
|
4
|
-
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-
|
|
1
|
+
import { S as ServeHandlerOptions } from '../index-D0d-O6LJ.js';
|
|
2
|
+
export { A as Agent, a as AgentAction, b as AgentAttachment, c as AgentBridgeRequest, d as AgentContext, e as AgentConversation, f as AgentDeliveryError, g as AgentEventEnum, h as AgentHandlers, i as AgentHistoryEntry, j as AgentMessage, k as AgentMessageAuthor, l as AgentPlatformContext, m as AgentReaction, n as AgentReplyPayload, o as AgentSubscriber, C as Client, E as EditPayload, F as FileRef, M as MessageContent, p as MetadataSignal, N as NovuRequestHandler, R as ReplyContent, q as ReplyHandle, r as SentMessageInfo, s as Signal, T as TriggerSignal, t as agent, w as workflow } from '../index-D0d-O6LJ.js';
|
|
3
|
+
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-C5lg4csi.js';
|
|
4
|
+
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-CbMgjzR-.js';
|
|
5
5
|
import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
|
|
6
6
|
export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
|
|
7
7
|
export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as h,c,d as m,e as f,f as H,g as v,h as w,i as E,j as S,k as x,l as A,m as N,n as
|
|
1
|
+
import{b as h,c,d as m,e as f,f as H,g as v,h as w,i as E,j as S,k as x,l as A,m as N,n as R,o as a,p as k}from"../chunk-FI2YN7IA.js";import"../chunk-T2VIX2ZH.js";import{a as O}from"../chunk-2M25EATE.js";import"../chunk-U3IL7QCI.js";import{O as b}from"../chunk-6GCCKYZC.js";import{a as V}from"../chunk-CBLKARLC.js";import{f as y}from"../chunk-EWC7I6UD.js";import"../chunk-52LSX2V5.js";var l="express",F=p=>new a({frameworkName:l,...p,handler:(t,o)=>({body:()=>t.body,headers:e=>{let r=t.headers[e];return Array.isArray(r)?r[0]:r},method:()=>t.method||"GET",url:()=>{let e=t.headers.host||"",r=e!=null&&e.includes("://")?"":`${t.protocol||"https"}://`;return new URL(t.originalUrl||t.url||"",`${r}${e||""}`)},queryString:e=>{let r=t.query[e];return Array.isArray(r)?r[0]:r},transformResponse:({body:e,headers:r,status:s})=>(Object.entries(r).forEach(([n,d])=>{o.setHeader(n,d)}),o.status(s).send(e))})}).createHandler();export{c as Actions,A as AgentDeliveryError,R as AgentEventEnum,m as Button,f as Card,H as CardLink,v as CardText,h as Client,y as CronExpression,w as Divider,a as NovuRequestHandler,E as Select,S as SelectOption,b as SeverityLevelEnum,x as TextInput,N as agent,l as frameworkName,V as providerSchemas,F as serve,O as step,k as workflow};
|
package/dist/esm/servers/h3.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as h3 from 'h3';
|
|
2
2
|
import { H3Event } from 'h3';
|
|
3
|
-
import { S as ServeHandlerOptions } from '../index-
|
|
4
|
-
export { A as Agent, a as AgentAction, b as AgentAttachment, c as AgentBridgeRequest, d as AgentContext, e as AgentConversation, f as
|
|
5
|
-
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-
|
|
6
|
-
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-
|
|
3
|
+
import { S as ServeHandlerOptions } from '../index-D0d-O6LJ.js';
|
|
4
|
+
export { A as Agent, a as AgentAction, b as AgentAttachment, c as AgentBridgeRequest, d as AgentContext, e as AgentConversation, f as AgentDeliveryError, g as AgentEventEnum, h as AgentHandlers, i as AgentHistoryEntry, j as AgentMessage, k as AgentMessageAuthor, l as AgentPlatformContext, m as AgentReaction, n as AgentReplyPayload, o as AgentSubscriber, C as Client, E as EditPayload, F as FileRef, M as MessageContent, p as MetadataSignal, N as NovuRequestHandler, R as ReplyContent, q as ReplyHandle, r as SentMessageInfo, s as Signal, T as TriggerSignal, t as agent, w as workflow } from '../index-D0d-O6LJ.js';
|
|
5
|
+
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-C5lg4csi.js';
|
|
6
|
+
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-CbMgjzR-.js';
|
|
7
7
|
import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
|
|
8
8
|
export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
|
|
9
9
|
export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.js';
|
package/dist/esm/servers/h3.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as y,c as H,d as S,e as i,f,g,h as N,i as w,j as c,k as E,l as k,m as x,n as
|
|
1
|
+
import{b as y,c as H,d as S,e as i,f,g,h as N,i as w,j as c,k as E,l as k,m as x,n as O,o as t,p as F}from"../chunk-FI2YN7IA.js";import"../chunk-T2VIX2ZH.js";import{a as $}from"../chunk-2M25EATE.js";import"../chunk-U3IL7QCI.js";import{O as q}from"../chunk-6GCCKYZC.js";import{a as b}from"../chunk-CBLKARLC.js";import{f as l}from"../chunk-EWC7I6UD.js";import"../chunk-52LSX2V5.js";import{getHeader as o,getQuery as a,readBody as p,send as n,setHeaders as m}from"h3";var h="h3",D=d=>new t({frameworkName:h,...d,handler:r=>({body:()=>p(r),headers:e=>o(r,e),method:()=>r.method,url:()=>new URL(String(r.path),`${process.env.NODE_ENV==="development"?"http":"https"}://${String(o(r,"host"))}`),queryString:e=>String(a(r)[e]),transformResponse:e=>{let{res:s}=r.node;return s.statusCode=e.status,m(r,e.headers),n(r,e.body)}})}).createHandler();export{H as Actions,k as AgentDeliveryError,O as AgentEventEnum,S as Button,i as Card,f as CardLink,g as CardText,y as Client,l as CronExpression,N as Divider,t as NovuRequestHandler,w as Select,c as SelectOption,q as SeverityLevelEnum,E as TextInput,x as agent,h as frameworkName,b as providerSchemas,D as serve,$ as step,F as workflow};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as aws_lambda from 'aws-lambda';
|
|
2
2
|
import { APIGatewayProxyEventV2, APIGatewayProxyResult } from 'aws-lambda';
|
|
3
|
-
import { S as ServeHandlerOptions } from '../index-
|
|
4
|
-
export { A as Agent, a as AgentAction, b as AgentAttachment, c as AgentBridgeRequest, d as AgentContext, e as AgentConversation, f as
|
|
5
|
-
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-
|
|
6
|
-
import { a as Either } from '../subscriber.types-
|
|
7
|
-
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-
|
|
3
|
+
import { S as ServeHandlerOptions } from '../index-D0d-O6LJ.js';
|
|
4
|
+
export { A as Agent, a as AgentAction, b as AgentAttachment, c as AgentBridgeRequest, d as AgentContext, e as AgentConversation, f as AgentDeliveryError, g as AgentEventEnum, h as AgentHandlers, i as AgentHistoryEntry, j as AgentMessage, k as AgentMessageAuthor, l as AgentPlatformContext, m as AgentReaction, n as AgentReplyPayload, o as AgentSubscriber, C as Client, E as EditPayload, F as FileRef, M as MessageContent, p as MetadataSignal, N as NovuRequestHandler, R as ReplyContent, q as ReplyHandle, r as SentMessageInfo, s as Signal, T as TriggerSignal, t as agent, w as workflow } from '../index-D0d-O6LJ.js';
|
|
5
|
+
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-C5lg4csi.js';
|
|
6
|
+
import { a as Either } from '../subscriber.types-CbMgjzR-.js';
|
|
7
|
+
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-CbMgjzR-.js';
|
|
8
8
|
import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
|
|
9
9
|
export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
|
|
10
10
|
export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as u,c as P,d as h,e as i,f as w,g as l,h as f,i as x,j as c,k as E,l as I,m as A,n,o as
|
|
1
|
+
import{b as u,c as P,d as h,e as i,f as w,g as l,h as f,i as x,j as c,k as E,l as I,m as A,n as G,o as n,p as q}from"../chunk-FI2YN7IA.js";import"../chunk-T2VIX2ZH.js";import{a as g}from"../chunk-2M25EATE.js";import"../chunk-U3IL7QCI.js";import{O as b}from"../chunk-6GCCKYZC.js";import{a as S}from"../chunk-CBLKARLC.js";import{f as m}from"../chunk-EWC7I6UD.js";import"../chunk-52LSX2V5.js";var p="lambda",H=y=>new n({frameworkName:p,...y,handler:r=>{let s=(e=>e.version==="2.0")(r);return{url:()=>{let e=s?r.requestContext.http.path:r.path,t=r.headers["x-forwarded-proto"]||"https",a=new URL(e,`${t}://${r.headers.host||r.headers.Host||""}`);for(let o in r.queryStringParameters)o&&a.searchParams.set(o,r.queryStringParameters[o]);return a},body:()=>{let e="{}";return r.body&&(e=r.isBase64Encoded?Buffer.from(r.body,"base64").toString():r.body),JSON.parse(e)},headers:e=>r.headers[e],queryString:e=>{var t;return(t=r.queryStringParameters)==null?void 0:t[e]},transformResponse:({body:e,status:t,headers:a})=>Promise.resolve({body:e,statusCode:t,headers:a}),method:()=>s?r.requestContext.http.method:r.httpMethod}}}).createHandler();export{P as Actions,I as AgentDeliveryError,G as AgentEventEnum,h as Button,i as Card,w as CardLink,l as CardText,u as Client,m as CronExpression,f as Divider,n as NovuRequestHandler,x as Select,c as SelectOption,b as SeverityLevelEnum,E as TextInput,A as agent,p as frameworkName,S as providerSchemas,H as serve,g as step,q as workflow};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { I as INovuRequestHandlerOptions, N as NovuRequestHandler, S as ServeHandlerOptions, C as Client, A as Agent } from '../index-
|
|
2
|
-
export { a as AgentAction, b as AgentAttachment, c as AgentBridgeRequest, d as AgentContext, e as AgentConversation, f as
|
|
3
|
-
import { W as Workflow } from '../health-check.types-
|
|
4
|
-
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum } from '../health-check.types-
|
|
1
|
+
import { I as INovuRequestHandlerOptions, N as NovuRequestHandler, S as ServeHandlerOptions, C as Client, A as Agent } from '../index-D0d-O6LJ.js';
|
|
2
|
+
export { a as AgentAction, b as AgentAttachment, c as AgentBridgeRequest, d as AgentContext, e as AgentConversation, f as AgentDeliveryError, g as AgentEventEnum, h as AgentHandlers, i as AgentHistoryEntry, j as AgentMessage, k as AgentMessageAuthor, l as AgentPlatformContext, m as AgentReaction, n as AgentReplyPayload, o as AgentSubscriber, E as EditPayload, F as FileRef, M as MessageContent, p as MetadataSignal, R as ReplyContent, q as ReplyHandle, r as SentMessageInfo, s as Signal, T as TriggerSignal, t as agent, w as workflow } from '../index-D0d-O6LJ.js';
|
|
3
|
+
import { W as Workflow } from '../health-check.types-C5lg4csi.js';
|
|
4
|
+
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum } from '../health-check.types-C5lg4csi.js';
|
|
5
5
|
export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
|
|
6
6
|
export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.js';
|
|
7
|
-
import { a as Either } from '../subscriber.types-
|
|
8
|
-
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-
|
|
7
|
+
import { a as Either } from '../subscriber.types-CbMgjzR-.js';
|
|
8
|
+
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-CbMgjzR-.js';
|
|
9
9
|
import { Request, Response } from 'express';
|
|
10
10
|
import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
|
|
11
11
|
import { VercelRequest, VercelResponse } from '@vercel/node';
|