@novu/framework 2.10.0 → 2.10.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/cjs/{health-check.types-DwKatX-8.d.cts → health-check.types-Nhsa_lGZ.d.cts} +28 -9
  2. package/dist/cjs/index-naFCU9MB.d.cts +268 -0
  3. package/dist/cjs/index.cjs +148 -92
  4. package/dist/cjs/index.d.cts +4 -3
  5. package/dist/cjs/internal/index.cjs +1 -1
  6. package/dist/cjs/internal/index.d.cts +6 -4
  7. package/dist/cjs/jsx-dev-runtime.cjs +1 -0
  8. package/dist/cjs/jsx-dev-runtime.d.cts +1 -0
  9. package/dist/cjs/jsx-runtime.cjs +1 -0
  10. package/dist/cjs/jsx-runtime.d.cts +1 -0
  11. package/dist/cjs/servers/express.cjs +148 -92
  12. package/dist/cjs/servers/express.d.cts +5 -4
  13. package/dist/cjs/servers/h3.cjs +148 -92
  14. package/dist/cjs/servers/h3.d.cts +5 -4
  15. package/dist/cjs/servers/lambda.cjs +148 -92
  16. package/dist/cjs/servers/lambda.d.cts +6 -5
  17. package/dist/cjs/servers/nest.cjs +148 -92
  18. package/dist/cjs/servers/nest.d.cts +14 -10
  19. package/dist/cjs/servers/next.cjs +148 -92
  20. package/dist/cjs/servers/next.d.cts +5 -4
  21. package/dist/cjs/servers/nuxt.cjs +148 -92
  22. package/dist/cjs/servers/nuxt.d.cts +5 -4
  23. package/dist/cjs/servers/remix.cjs +148 -92
  24. package/dist/cjs/servers/remix.d.cts +5 -4
  25. package/dist/cjs/servers/sveltekit.cjs +148 -92
  26. package/dist/cjs/servers/sveltekit.d.cts +5 -4
  27. package/dist/cjs/step-resolver.cjs +4 -4
  28. package/dist/cjs/step-resolver.d.cts +85 -36
  29. package/dist/cjs/{subscriber.types-CftO3aFY.d.cts → subscriber.types-CNLicO8m.d.cts} +12 -1
  30. package/dist/cjs/validators.cjs +1 -1
  31. package/dist/esm/chunk-2GCKOQK4.js +0 -0
  32. package/dist/esm/chunk-2M25EATE.js +1 -0
  33. package/dist/esm/chunk-52LSX2V5.js +1 -0
  34. package/dist/esm/chunk-6GCCKYZC.js +1 -0
  35. package/dist/esm/{chunk-RCWIURDJ.js → chunk-CBLKARLC.js} +4 -4
  36. package/dist/esm/chunk-EWC7I6UD.js +1 -0
  37. package/dist/esm/chunk-T2VIX2ZH.js +22 -0
  38. package/dist/esm/{chunk-JKG63DBC.js → chunk-U3IL7QCI.js} +1 -1
  39. package/dist/esm/chunk-WUP5SBTV.js +130 -0
  40. package/dist/esm/{health-check.types-C4vZDz5x.d.ts → health-check.types-zMcfbkrA.d.ts} +28 -9
  41. package/dist/esm/index-cfmN-nqZ.d.ts +268 -0
  42. package/dist/esm/index.d.ts +4 -3
  43. package/dist/esm/index.js +1 -1
  44. package/dist/esm/internal/index.d.ts +6 -4
  45. package/dist/esm/internal/index.js +1 -1
  46. package/dist/esm/jsx-dev-runtime.d.ts +1 -0
  47. package/dist/esm/jsx-dev-runtime.js +1 -0
  48. package/dist/esm/jsx-runtime.d.ts +1 -0
  49. package/dist/esm/jsx-runtime.js +1 -0
  50. package/dist/esm/servers/express.d.ts +5 -4
  51. package/dist/esm/servers/express.js +1 -1
  52. package/dist/esm/servers/h3.d.ts +5 -4
  53. package/dist/esm/servers/h3.js +1 -1
  54. package/dist/esm/servers/lambda.d.ts +6 -5
  55. package/dist/esm/servers/lambda.js +1 -1
  56. package/dist/esm/servers/nest.d.ts +14 -10
  57. package/dist/esm/servers/nest.js +1 -1
  58. package/dist/esm/servers/next.d.ts +5 -4
  59. package/dist/esm/servers/next.js +1 -1
  60. package/dist/esm/servers/nuxt.d.ts +5 -4
  61. package/dist/esm/servers/nuxt.js +1 -1
  62. package/dist/esm/servers/remix.d.ts +5 -4
  63. package/dist/esm/servers/remix.js +1 -1
  64. package/dist/esm/servers/sveltekit.d.ts +5 -4
  65. package/dist/esm/servers/sveltekit.js +1 -1
  66. package/dist/esm/step-resolver.d.ts +85 -36
  67. package/dist/esm/step-resolver.js +1 -1
  68. package/dist/esm/{subscriber.types-CfRj4acH.d.ts → subscriber.types-B0sKq6v3.d.ts} +12 -1
  69. package/dist/esm/validators.js +1 -1
  70. package/jsx-dev-runtime/package.json +3 -0
  71. package/jsx-runtime/package.json +3 -0
  72. package/package.json +26 -3
  73. package/dist/cjs/index-BTTxx1ad.d.cts +0 -141
  74. package/dist/esm/chunk-APAOD3BG.js +0 -1
  75. package/dist/esm/chunk-LPE4ME2M.js +0 -1
  76. package/dist/esm/chunk-MQSAHSED.js +0 -1
  77. package/dist/esm/chunk-PLPQUHX6.js +0 -1
  78. package/dist/esm/chunk-WSQ6EEHO.js +0 -95
  79. package/dist/esm/index-D4Rt1gOC.d.ts +0 -141
@@ -1,4 +1,4 @@
1
- import { a as ContextPayload, b as ConditionalPartial, P as PickRequiredKeys, c as Step, d as Prettify, S as Subscriber, C as ContextResolved, D as DeepPartial$1, e as ChannelStepEnum, A as ActionStepEnum, f as Awaitable, W as WithPassthrough, g as StepOptions } from './subscriber.types-CfRj4acH.js';
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-B0sKq6v3.js';
2
2
  import { S as Schema, J as JsonSchema } from './base.schema.types-BApIn9jr.js';
3
3
 
4
4
  type CodeResult = {
@@ -39,7 +39,8 @@ type ClientOptions = {
39
39
  declare enum PostActionEnum {
40
40
  TRIGGER = "trigger",
41
41
  EXECUTE = "execute",
42
- PREVIEW = "preview"
42
+ PREVIEW = "preview",
43
+ AGENT_EVENT = "agent-event"
43
44
  }
44
45
  declare enum GetActionEnum {
45
46
  DISCOVER = "discover",
@@ -387,15 +388,22 @@ declare enum SeverityLevelEnum {
387
388
  /**
388
389
  * The parameters for the workflow function.
389
390
  */
390
- type ExecuteInput<T_Payload extends Record<string, unknown>, T_Controls extends Record<string, unknown>> = {
391
+ type ExecuteInput<T_Payload extends Record<string, unknown>, T_Controls extends Record<string, unknown>, T_Env extends Record<string, unknown> = Record<string, unknown>> = {
391
392
  /** Define a step in your workflow. */
392
393
  step: Step;
393
394
  /** The payload for the event, provided during trigger. */
394
395
  payload: T_Payload;
395
396
  /** The subscriber for the event, provided during trigger. */
396
397
  subscriber: Prettify<Subscriber>;
397
- /** The environment the workflow is running in. */
398
- environment: Record<string, unknown>;
398
+ /**
399
+ * Environment variables defined in the Novu Dashboard, merged with built-in
400
+ * environment system variables (`name`, `type`).
401
+ *
402
+ * @example `env.name` — name of the current Novu environment
403
+ * @example `env.type` — type of the current Novu environment ("dev" | "prod")
404
+ * @example `env.MY_SECRET` — a user-defined environment variable
405
+ */
406
+ env: T_Env & EnvironmentSystemVariables;
399
407
  /** The controls for the event. Provided via the Dashboard. */
400
408
  controls: T_Controls;
401
409
  /** The resolved context for the event. */
@@ -404,7 +412,7 @@ type ExecuteInput<T_Payload extends Record<string, unknown>, T_Controls extends
404
412
  /**
405
413
  * The function to execute the workflow.
406
414
  */
407
- type Execute<T_Payload extends Record<string, unknown>, T_Controls extends Record<string, unknown>> = (event: ExecuteInput<T_Payload, T_Controls>) => Promise<void>;
415
+ type Execute<T_Payload extends Record<string, unknown>, T_Controls extends Record<string, unknown>, T_Env extends Record<string, unknown> = Record<string, unknown>> = (event: ExecuteInput<T_Payload, T_Controls, T_Env>) => Promise<void>;
408
416
  /**
409
417
  * A preference for a notification delivery workflow.
410
418
  *
@@ -461,11 +469,13 @@ type WorkflowPreferences = DeepPartial$1<{
461
469
  /**
462
470
  * The options for the workflow.
463
471
  */
464
- type WorkflowOptions<T_PayloadSchema extends Schema, T_ControlSchema extends Schema> = {
472
+ type WorkflowOptions<T_PayloadSchema extends Schema, T_ControlSchema extends Schema, T_EnvSchema extends Schema = Schema> = {
465
473
  /** The schema for the payload. */
466
474
  payloadSchema?: T_PayloadSchema;
467
475
  /** The schema for the controls. */
468
476
  controlSchema?: T_ControlSchema;
477
+ /** The schema for the environment variables. */
478
+ envSchema?: T_EnvSchema;
469
479
  /**
470
480
  * The preferences for the notification workflow.
471
481
  *
@@ -597,6 +607,10 @@ type DiscoverWorkflowOutput = {
597
607
  schema: JsonSchema;
598
608
  unknownSchema: Schema;
599
609
  };
610
+ env: {
611
+ schema: JsonSchema;
612
+ unknownSchema: Schema;
613
+ };
600
614
  preferences: WorkflowPreferencesPartial;
601
615
  tags: string[];
602
616
  name?: string;
@@ -629,8 +643,12 @@ type Workflow<T_Payload = never> = {
629
643
  */
630
644
  discover: () => Promise<DiscoverWorkflowOutput>;
631
645
  };
646
+ type DiscoverAgentOutput = {
647
+ agentId: string;
648
+ };
632
649
  type DiscoverOutput = {
633
650
  workflows: Array<DiscoverWorkflowOutput>;
651
+ agents: Array<DiscoverAgentOutput>;
634
652
  };
635
653
 
636
654
  type Event = {
@@ -642,7 +660,8 @@ type Event = {
642
660
  action: Exclude<PostActionEnum, PostActionEnum.TRIGGER>;
643
661
  subscriber: Subscriber;
644
662
  context: ContextResolved;
645
- env?: Record<string, string>;
663
+ /** User-defined env vars merged with environment system variables (name, type). */
664
+ env: EnvironmentSystemVariables & Record<string, string>;
646
665
  };
647
666
  type State = {
648
667
  stepId: string;
@@ -680,4 +699,4 @@ type HealthCheck = {
680
699
  };
681
700
  };
682
701
 
683
- export { type ClientOptions as C, type DiscoverOutput 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 DiscoverProviderOutput as e, type DiscoverStepOutput as f, type DiscoverWorkflowOutput as g, type Event as h, type EventTriggerParams as i, type EventTriggerResponse as j, type EventTriggerResult as k, type Execute as l, type ExecuteOutput as m, type ExecuteOutputMetadata as n, type ExecuteOutputOptions as o, type State as p, type StepType as q, WorkflowChannelEnum as r, type WorkflowOptions as s, type WorkflowPreference as t, type WorkflowPreferences as u };
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 };
@@ -0,0 +1,268 @@
1
+ import { ChatElement } 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-zMcfbkrA.js';
3
+ import { g as Awaitable } from './subscriber.types-B0sKq6v3.js';
4
+ import { S as Schema, a as FromSchema, F as FromSchemaUnvalidated } from './base.schema.types-BApIn9jr.js';
5
+ import './step-resolver.js';
6
+
7
+ interface AgentMessageAuthor {
8
+ userId: string;
9
+ fullName: string;
10
+ userName: string;
11
+ isBot: boolean | 'unknown';
12
+ }
13
+ interface AgentMessage {
14
+ text: string;
15
+ platformMessageId: string;
16
+ author: AgentMessageAuthor;
17
+ timestamp: string;
18
+ }
19
+ interface AgentConversation {
20
+ identifier: string;
21
+ status: string;
22
+ metadata: Record<string, unknown>;
23
+ messageCount: number;
24
+ createdAt: string;
25
+ lastActivityAt: string;
26
+ }
27
+ interface AgentSubscriber {
28
+ subscriberId: string;
29
+ firstName?: string;
30
+ lastName?: string;
31
+ email?: string;
32
+ phone?: string;
33
+ avatar?: string;
34
+ locale?: string;
35
+ data?: Record<string, unknown>;
36
+ }
37
+ interface AgentHistoryEntry {
38
+ role: string;
39
+ type: string;
40
+ content: string;
41
+ senderName?: string;
42
+ signalData?: {
43
+ type: string;
44
+ payload?: Record<string, unknown>;
45
+ };
46
+ createdAt: string;
47
+ }
48
+ interface AgentPlatformContext {
49
+ threadId: string;
50
+ channelId: string;
51
+ isDM: boolean;
52
+ }
53
+ interface FileRef {
54
+ filename: string;
55
+ mimeType?: string;
56
+ /** Base64-encoded file data (< 1 MB decoded) */
57
+ data?: string;
58
+ /** Publicly-accessible HTTPS URL */
59
+ url?: string;
60
+ }
61
+ /**
62
+ * Content accepted by ctx.reply() and ctx.update().
63
+ *
64
+ * - `string` — plain text
65
+ * - `{ markdown, files? }` — markdown-formatted text, optionally with file attachments
66
+ * - `ChatElement` — interactive card built with Card(), Button(), etc.
67
+ * (must be a CardElement at runtime; validated by serializeContent)
68
+ */
69
+ type MessageContent = string | {
70
+ markdown: string;
71
+ files?: FileRef[];
72
+ } | ChatElement;
73
+ interface AgentAction {
74
+ actionId: string;
75
+ value?: string;
76
+ }
77
+ interface AgentReaction {
78
+ messageId: string;
79
+ emoji: {
80
+ name: string;
81
+ };
82
+ added: boolean;
83
+ message: AgentMessage | null;
84
+ }
85
+ interface AgentContext {
86
+ readonly event: string;
87
+ readonly action: AgentAction | null;
88
+ readonly message: AgentMessage | null;
89
+ readonly reaction: AgentReaction | null;
90
+ readonly conversation: AgentConversation;
91
+ readonly subscriber: AgentSubscriber | null;
92
+ readonly history: AgentHistoryEntry[];
93
+ readonly platform: string;
94
+ readonly platformContext: AgentPlatformContext;
95
+ reply(content: MessageContent): Promise<void>;
96
+ update(content: MessageContent): Promise<void>;
97
+ resolve(summary?: string): void;
98
+ metadata: {
99
+ set(key: string, value: unknown): void;
100
+ };
101
+ trigger(workflowId: string, opts?: {
102
+ to?: string;
103
+ payload?: Record<string, unknown>;
104
+ }): void;
105
+ }
106
+ interface AgentHandlers {
107
+ onMessage: (ctx: AgentContext) => Promise<void>;
108
+ onReaction?: (ctx: AgentContext) => Promise<void>;
109
+ onAction?: (ctx: AgentContext) => Promise<void>;
110
+ onResolve?: (ctx: AgentContext) => Promise<void>;
111
+ }
112
+ interface Agent {
113
+ id: string;
114
+ handlers: AgentHandlers;
115
+ }
116
+
117
+ /**
118
+ * Define a new conversational agent.
119
+ *
120
+ * @param agentId - Unique identifier matching the agent entity created in Novu (e.g. 'wine-bot')
121
+ * @param handlers - Handler functions for agent events
122
+ */
123
+ declare function agent(agentId: string, handlers: AgentHandlers): Agent;
124
+
125
+ declare class Client {
126
+ private discoveredWorkflows;
127
+ private discoverWorkflowPromises;
128
+ private registeredAgents;
129
+ private templateEngine;
130
+ secretKey: string;
131
+ apiUrl: string;
132
+ version: string;
133
+ strictAuthentication: boolean;
134
+ verbose: boolean;
135
+ constructor(options?: ClientOptions);
136
+ private buildOptions;
137
+ private log;
138
+ /**
139
+ * Adds workflows to the client.
140
+ *
141
+ * A locking mechanism is used to ensure that duplicate workflows are not added.
142
+ *
143
+ * @param workflows - The workflows to add.
144
+ */
145
+ addWorkflows(workflows: Array<Workflow>): Promise<void>;
146
+ addAgents(agents: Array<Agent>): void;
147
+ getAgent(agentId: string): Agent | undefined;
148
+ private addWorkflow;
149
+ healthCheck(): HealthCheck;
150
+ private getWorkflow;
151
+ private getStep;
152
+ private getRegisteredWorkflows;
153
+ discover(): DiscoverOutput;
154
+ /**
155
+ * Mocks data based on the given schema.
156
+ * The `default` value in the schema is used as the base data.
157
+ * If no `default` value is provided, the data is generated using JSONSchemaFaker.
158
+ *
159
+ * @param schema
160
+ * @returns mocked data
161
+ */
162
+ private mock;
163
+ private validate;
164
+ private throwInvalidProvider;
165
+ private throwInvalidStep;
166
+ private throwInvalidEvent;
167
+ private executeStepFactory;
168
+ private shouldSanitize;
169
+ private shouldSkip;
170
+ executeWorkflow(event: Event): Promise<ExecuteOutput>;
171
+ private createExecutionPayload;
172
+ private prettyPrintExecute;
173
+ private executeProviders;
174
+ private previewProvider;
175
+ private executeProvider;
176
+ private executeStep;
177
+ private compileControls;
178
+ /**
179
+ * Preprocesses standalone translation patterns.
180
+ * Transforms {{t.key}} to [T:key] placeholder (not Liquid syntax, passes through unchanged).
181
+ */
182
+ private preprocessTranslationPatterns;
183
+ /**
184
+ * Preprocesses translation keys used as filter arguments.
185
+ * Transforms 't.key' to '[T:key]' placeholder (not Liquid syntax, passes through unchanged).
186
+ * Example: pluralize: 't.apple', 't.apples' → pluralize: '[T:apple]', '[T:apples]'
187
+ */
188
+ private preprocessFilterTranslationArgs;
189
+ /**
190
+ * Post-processes placeholders back to translation markers after Liquid render.
191
+ * Transforms [T:key] back to {{t.key}} for the translation service.
192
+ */
193
+ private postprocessTranslationMarkers;
194
+ /**
195
+ * Create the controls for a step, taking both the event controls and the default controls into account
196
+ *
197
+ * @param step The step to create the controls for
198
+ * @param event The event that triggered the step
199
+ * @returns The controls for the step
200
+ */
201
+ private createStepControls;
202
+ private previewStep;
203
+ private constructStepForPreview;
204
+ private extractMockDataForPreviousSteps;
205
+ private previewRequiredStep;
206
+ private getStepState;
207
+ private getStepCode;
208
+ private getWorkflowCode;
209
+ getCode(workflowId: string, stepId?: string): CodeResult;
210
+ }
211
+
212
+ interface ServeHandlerOptions {
213
+ client?: Client;
214
+ workflows?: Array<Workflow>;
215
+ agents?: Array<Agent>;
216
+ }
217
+ type INovuRequestHandlerOptions<Input extends any[] = any[], Output = any> = ServeHandlerOptions & {
218
+ frameworkName: string;
219
+ client?: Client;
220
+ workflows?: Array<Workflow>;
221
+ agents?: Array<Agent>;
222
+ handler: Handler<Input, Output>;
223
+ };
224
+ type Handler<Input extends any[] = any[], Output = any> = (...args: Input) => HandlerResponse<Output>;
225
+ type HandlerResponse<Output = any> = {
226
+ body: () => Awaitable<any>;
227
+ headers: (key: string) => Awaitable<string | null | undefined>;
228
+ method: () => Awaitable<string>;
229
+ queryString?: (key: string, url: URL) => Awaitable<string | null | undefined>;
230
+ url: () => Awaitable<URL>;
231
+ transformResponse: (res: IActionResponse<string>) => Output;
232
+ waitUntil?: (promise: Promise<unknown>) => void;
233
+ };
234
+ type IActionResponse<TBody extends string = string> = {
235
+ status: number;
236
+ headers: Record<string, string>;
237
+ body: TBody;
238
+ };
239
+ declare class NovuRequestHandler<Input extends any[] = any[], Output = any> {
240
+ readonly frameworkName: string;
241
+ readonly handler: Handler<Input, Output>;
242
+ readonly client: Client;
243
+ private readonly hmacEnabled;
244
+ private readonly http;
245
+ private readonly workflows;
246
+ private readonly agents;
247
+ constructor(options: INovuRequestHandlerOptions<Input, Output>);
248
+ createHandler(): (...args: Input) => Promise<Output>;
249
+ private getStaticHeaders;
250
+ private createResponse;
251
+ private createError;
252
+ private handleAction;
253
+ private getPostActionMap;
254
+ triggerAction(triggerEvent: EventTriggerParams): () => Promise<IActionResponse<string>>;
255
+ private getGetActionMap;
256
+ private handlePostAction;
257
+ private handleGetAction;
258
+ private runAgentHandler;
259
+ private handleError;
260
+ private validateHmac;
261
+ }
262
+
263
+ /**
264
+ * Define a new notification workflow.
265
+ */
266
+ 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>;
267
+
268
+ export { type Agent as A, Client as C, type FileRef as F, type INovuRequestHandlerOptions as I, type MessageContent as M, NovuRequestHandler as N, type ServeHandlerOptions as S, type AgentContext as a, type AgentHandlers as b, type AgentReaction as c, agent as d, workflow as w };
@@ -1,7 +1,8 @@
1
- export { C as Client, N as NovuRequestHandler, S as ServeHandlerOptions, w as workflow } from './index-D4Rt1gOC.js';
2
- export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from './health-check.types-C4vZDz5x.js';
1
+ export { A as Agent, a as AgentContext, b as AgentHandlers, c as AgentReaction, C as Client, F as FileRef, M as MessageContent, N as NovuRequestHandler, S as ServeHandlerOptions, d as agent, w as workflow } from './index-cfmN-nqZ.js';
2
+ export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from './health-check.types-zMcfbkrA.js';
3
+ export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
3
4
  export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from './step-resolver.js';
4
- export { C as ContextResolved, S as Subscriber, p as providerSchemas } from './subscriber.types-CfRj4acH.js';
5
+ export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from './subscriber.types-B0sKq6v3.js';
5
6
  import './base.schema.types-BApIn9jr.js';
6
7
  import 'json-schema-to-ts';
7
8
  import 'zod';
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- import{b,c,d as f}from"./chunk-WSQ6EEHO.js";import{a as g}from"./chunk-MQSAHSED.js";import"./chunk-JKG63DBC.js";import{S as e}from"./chunk-APAOD3BG.js";import{a as d}from"./chunk-RCWIURDJ.js";import{f as a}from"./chunk-LPE4ME2M.js";import"./chunk-PLPQUHX6.js";export{b as Client,a as CronExpression,c as NovuRequestHandler,e as SeverityLevelEnum,d as providerSchemas,g as step,f as workflow};
1
+ import{b,c,d,e,f,g,h,i,j,k,l,m,n as p}from"./chunk-WUP5SBTV.js";import"./chunk-T2VIX2ZH.js";import{a as q}from"./chunk-2M25EATE.js";import"./chunk-U3IL7QCI.js";import{O as o}from"./chunk-6GCCKYZC.js";import{a as n}from"./chunk-CBLKARLC.js";import{f as a}from"./chunk-EWC7I6UD.js";import"./chunk-52LSX2V5.js";export{c as Actions,d as Button,e as Card,f as CardLink,g as CardText,b as Client,a as CronExpression,h as Divider,m as NovuRequestHandler,i as Select,j as SelectOption,o as SeverityLevelEnum,k as TextInput,l as agent,n as providerSchemas,q as step,p as workflow};
@@ -1,6 +1,6 @@
1
- import { P as PostActionEnum } from '../health-check.types-C4vZDz5x.js';
2
- export { b as CancelEventTriggerResponse, c as ChannelPreference, C as ClientOptions, d as CodeResult, a as CronExpression, D as DiscoverOutput, e as DiscoverProviderOutput, f as DiscoverStepOutput, g as DiscoverWorkflowOutput, h as Event, i as EventTriggerParams, j as EventTriggerResponse, k as EventTriggerResult, l as Execute, E as ExecuteInput, m as ExecuteOutput, n as ExecuteOutputMetadata, o as ExecuteOutputOptions, G as GetActionEnum, H as HealthCheck, S as SeverityLevelEnum, p as State, q as StepType, W as Workflow, r as WorkflowChannelEnum, s as WorkflowOptions, t as WorkflowPreference, u as WorkflowPreferences } from '../health-check.types-C4vZDz5x.js';
3
- export { h as ActionStep, A as ActionStepEnum, f as Awaitable, i as ChannelStep, e as ChannelStepEnum, j as ChatOutput, k as ChatOutputUnvalidated, l as ChatResult, b as ConditionalPartial, a as ContextPayload, C as ContextResolved, m as ContextValue, n as CustomStep, D as DeepPartial, o as DeepRequired, q as DelayDynamicOutput, r as DelayDynamicOutputUnvalidated, s as DelayOutput, t as DelayOutputUnvalidated, u as DelayRegularOutput, v as DelayRegularOutputUnvalidated, w as DelayResult, x as DelayTimedOutput, y as DelayTimedOutputUnvalidated, z as DigestOutput, B as DigestOutputUnvalidated, F as DigestRegularOutput, G as DigestRegularOutputUnvalidated, H as DigestResult, I as DigestTimedOutput, J as DigestTimedOutputUnvalidated, E as Either, K as EmailOutput, L as EmailOutputUnvalidated, M as EmailResult, N as InAppOutput, O as InAppOutputUnvalidated, Q as InAppResult, R as Indexable, T as JobStatusEnum, U as PickOptional, V as PickOptionalKeys, X as PickRequired, P as PickRequiredKeys, d as Prettify, Y as PushOutput, Z as PushOutputUnvalidated, _ as PushResult, $ as Skip, a0 as SmsOutput, a1 as SmsOutputUnvalidated, a2 as SmsResult, c as Step, a3 as StepContext, g as StepOptions, a4 as StepOutput, S as Subscriber, a5 as ThrottleOutput, a6 as ThrottleOutputUnvalidated, a7 as ThrottleResult, a8 as actionStepSchemas, a9 as channelStepSchemas } from '../subscriber.types-CfRj4acH.js';
1
+ import { P as PostActionEnum } from '../health-check.types-zMcfbkrA.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-zMcfbkrA.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-B0sKq6v3.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';
@@ -71,7 +71,9 @@ declare enum HttpQueryKeysEnum {
71
71
  WORKFLOW_ID = "workflowId",
72
72
  STEP_ID = "stepId",
73
73
  ACTION = "action",
74
- SOURCE = "source"
74
+ SOURCE = "source",
75
+ AGENT_ID = "agentId",
76
+ EVENT = "event"
75
77
  }
76
78
 
77
79
  declare enum HttpStatusEnum {
@@ -1 +1 @@
1
- import{A as Z,B as $,C as rr,D as er,E as or,F as tr,H as ir,I as mr,J as pr,K as r,L as e,P as o,R as ar,S as fr,a as R,b as T,c as k,d as D,e as O,f as _,g as b,h as j,i as v,j as w,k as z,m as B,n as C,o as G,p as H,q as J,r as K,s as M,t as N,u as P,v as Q,w as U,x as W,y as X,z as Y}from"../chunk-APAOD3BG.js";import{b as t}from"../chunk-RCWIURDJ.js";import{a as i,b as m,c as p,d as a,e as f,f as n,g as s,h as x,i as c,j as l,k as S,l as d,m as u,n as F,o as L,p as g,q as I,r as V,s as h,t as q,u as y,v as A,w as E}from"../chunk-LPE4ME2M.js";import"../chunk-PLPQUHX6.js";var sr={toSentence:r};export{F as ActionStepEnum,h as BadRequestError,R as BridgeError,u as ChannelStepEnum,A as ConflictError,n as CronExpression,s as ErrorCodeEnum,D as ExecutionEventControlsInvalidError,k as ExecutionEventPayloadInvalidError,v as ExecutionProviderOutputInvalidError,O as ExecutionStateControlsInvalidError,T as ExecutionStateCorruptError,_ as ExecutionStateOutputInvalidError,b as ExecutionStateResultInvalidError,sr as FILTER_VALIDATORS,E as ForbiddenError,I as FrameworkError,m as GetActionEnum,x as HttpHeaderKeysEnum,c as HttpMethodEnum,l as HttpQueryKeysEnum,S as HttpStatusEnum,C as InvalidActionError,ar as JobStatusEnum,B as MethodNotAllowedError,G as MissingSecretKeyError,V as NotFoundError,p as NovuApiEndpointsEnum,H as PlatformError,i as PostActionEnum,P as ProviderExecutionFailedError,N as ProviderNotFoundError,J as ResourceConflictError,d as ResourceEnum,M as ResourceExecutionFailed,K as ResourceNotFoundError,f as SIGNATURE_TIMESTAMP_TOLERANCE,a as SIGNATURE_TIMESTAMP_TOLERANCE_MINUTES,y as ServerError,fr as SeverityLevelEnum,X as SignatureExpiredError,W as SignatureInvalidError,Q as SignatureMismatchError,U as SignatureNotFoundError,Z as SignatureVersionInvalidError,Y as SigningKeyNotFoundError,rr as StepAlreadyExistsError,j as StepControlCompilationFailedError,er as StepExecutionFailedError,$ as StepNotFoundError,q as UnauthorizedError,tr as WorkflowAlreadyExistsError,L as WorkflowChannelEnum,or as WorkflowNotFoundError,w as WorkflowPayloadInvalidError,o as actionStepSchemas,t as channelStepSchemas,e as createLiquidEngine,ir as digest,z as isFrameworkError,g as isNativeError,mr as pluralize,pr as toSentence,r as toSentenceArgsValidator};
1
+ import{A as Z,B as $,C as rr,D as er,E as or,F as tr,H as ir,I as mr,J as pr,K as r,L as e,N as ar,O as fr,a as R,b as T,c as k,d as D,e as O,f as _,g as b,h as j,i as v,j as w,k as z,m as B,n as C,o as G,p as H,q as J,r as K,s as M,t as N,u as P,v as Q,w as U,x as W,y as X,z as Y}from"../chunk-6GCCKYZC.js";import{e as o,f as t}from"../chunk-CBLKARLC.js";import{a as i,b as m,c as p,d as a,e as f,f as n,g as s,h as x,i as c,j as l,k as S,l as d,m as u,n as F,o as L,p as g,q as I,r as V,s as h,t as q,u as y,v as A,w as E}from"../chunk-EWC7I6UD.js";import"../chunk-52LSX2V5.js";var sr={toSentence:r};export{F as ActionStepEnum,h as BadRequestError,R as BridgeError,u as ChannelStepEnum,A as ConflictError,n as CronExpression,s as ErrorCodeEnum,D as ExecutionEventControlsInvalidError,k as ExecutionEventPayloadInvalidError,v as ExecutionProviderOutputInvalidError,O as ExecutionStateControlsInvalidError,T as ExecutionStateCorruptError,_ as ExecutionStateOutputInvalidError,b as ExecutionStateResultInvalidError,sr as FILTER_VALIDATORS,E as ForbiddenError,I as FrameworkError,m as GetActionEnum,x as HttpHeaderKeysEnum,c as HttpMethodEnum,l as HttpQueryKeysEnum,S as HttpStatusEnum,C as InvalidActionError,ar as JobStatusEnum,B as MethodNotAllowedError,G as MissingSecretKeyError,V as NotFoundError,p as NovuApiEndpointsEnum,H as PlatformError,i as PostActionEnum,P as ProviderExecutionFailedError,N as ProviderNotFoundError,J as ResourceConflictError,d as ResourceEnum,M as ResourceExecutionFailed,K as ResourceNotFoundError,f as SIGNATURE_TIMESTAMP_TOLERANCE,a as SIGNATURE_TIMESTAMP_TOLERANCE_MINUTES,y as ServerError,fr as SeverityLevelEnum,X as SignatureExpiredError,W as SignatureInvalidError,Q as SignatureMismatchError,U as SignatureNotFoundError,Z as SignatureVersionInvalidError,Y as SigningKeyNotFoundError,rr as StepAlreadyExistsError,j as StepControlCompilationFailedError,er as StepExecutionFailedError,$ as StepNotFoundError,q as UnauthorizedError,tr as WorkflowAlreadyExistsError,L as WorkflowChannelEnum,or as WorkflowNotFoundError,w as WorkflowPayloadInvalidError,o as actionStepSchemas,t as channelStepSchemas,e as createLiquidEngine,ir as digest,z as isFrameworkError,g as isNativeError,mr as pluralize,pr as toSentence,r as toSentenceArgsValidator};
@@ -0,0 +1 @@
1
+ export { Fragment, JSX, jsx, jsxDEV, jsxs } from 'chat/jsx-runtime';
@@ -0,0 +1 @@
1
+ import"./chunk-2GCKOQK4.js";import{p as s,q as x,r as e,s as j}from"./chunk-T2VIX2ZH.js";import"./chunk-52LSX2V5.js";export{j as Fragment,s as jsx,e as jsxDEV,x as jsxs};
@@ -0,0 +1 @@
1
+ export { Fragment, JSX, jsx, jsxDEV, jsxs } from 'chat/jsx-runtime';
@@ -0,0 +1 @@
1
+ import"./chunk-2GCKOQK4.js";import{p as a,q as b,r as c,s as d}from"./chunk-T2VIX2ZH.js";import"./chunk-52LSX2V5.js";export{d as Fragment,a as jsx,c as jsxDEV,b as jsxs};
@@ -1,8 +1,9 @@
1
- import { S as ServeHandlerOptions } from '../index-D4Rt1gOC.js';
2
- export { C as Client, N as NovuRequestHandler, w as workflow } from '../index-D4Rt1gOC.js';
3
- export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-C4vZDz5x.js';
4
- export { C as ContextResolved, S as Subscriber, p as providerSchemas } from '../subscriber.types-CfRj4acH.js';
1
+ import { S as ServeHandlerOptions } from '../index-cfmN-nqZ.js';
2
+ export { A as Agent, a as AgentContext, b as AgentHandlers, c as AgentReaction, C as Client, F as FileRef, M as MessageContent, N as NovuRequestHandler, d as agent, w as workflow } from '../index-cfmN-nqZ.js';
3
+ export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-zMcfbkrA.js';
4
+ export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-B0sKq6v3.js';
5
5
  import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
6
+ export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
6
7
  export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.js';
7
8
  import '../base.schema.types-BApIn9jr.js';
8
9
  import 'json-schema-to-ts';
@@ -1 +1 @@
1
- import{b as h,c as a,d as f}from"../chunk-WSQ6EEHO.js";import{a as H}from"../chunk-MQSAHSED.js";import"../chunk-JKG63DBC.js";import{S as m}from"../chunk-APAOD3BG.js";import{a as c}from"../chunk-RCWIURDJ.js";import{f as y}from"../chunk-LPE4ME2M.js";import"../chunk-PLPQUHX6.js";var l="express",E=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{h as Client,y as CronExpression,a as NovuRequestHandler,m as SeverityLevelEnum,l as frameworkName,c as providerSchemas,E as serve,H as step,f as workflow};
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 a,n as V}from"../chunk-WUP5SBTV.js";import"../chunk-T2VIX2ZH.js";import{a as b}from"../chunk-2M25EATE.js";import"../chunk-U3IL7QCI.js";import{O as R}from"../chunk-6GCCKYZC.js";import{a as N}from"../chunk-CBLKARLC.js";import{f as y}from"../chunk-EWC7I6UD.js";import"../chunk-52LSX2V5.js";var l="express",$=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,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,R as SeverityLevelEnum,x as TextInput,A as agent,l as frameworkName,N as providerSchemas,$ as serve,b as step,V as workflow};
@@ -1,10 +1,11 @@
1
1
  import * as h3 from 'h3';
2
2
  import { H3Event } from 'h3';
3
- import { S as ServeHandlerOptions } from '../index-D4Rt1gOC.js';
4
- export { C as Client, N as NovuRequestHandler, w as workflow } from '../index-D4Rt1gOC.js';
5
- export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-C4vZDz5x.js';
6
- export { C as ContextResolved, S as Subscriber, p as providerSchemas } from '../subscriber.types-CfRj4acH.js';
3
+ import { S as ServeHandlerOptions } from '../index-cfmN-nqZ.js';
4
+ export { A as Agent, a as AgentContext, b as AgentHandlers, c as AgentReaction, C as Client, F as FileRef, M as MessageContent, N as NovuRequestHandler, d as agent, w as workflow } from '../index-cfmN-nqZ.js';
5
+ export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-zMcfbkrA.js';
6
+ export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-B0sKq6v3.js';
7
7
  import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
8
+ export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
8
9
  export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.js';
9
10
  import '../base.schema.types-BApIn9jr.js';
10
11
  import 'json-schema-to-ts';
@@ -1 +1 @@
1
- import{b as y,c as t,d as i}from"../chunk-WSQ6EEHO.js";import{a as f}from"../chunk-MQSAHSED.js";import"../chunk-JKG63DBC.js";import{S}from"../chunk-APAOD3BG.js";import{a as H}from"../chunk-RCWIURDJ.js";import{f as l}from"../chunk-LPE4ME2M.js";import"../chunk-PLPQUHX6.js";import{getHeader as o,getQuery as a,readBody as p,send as n,setHeaders as m}from"h3";var h="h3",w=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{y as Client,l as CronExpression,t as NovuRequestHandler,S as SeverityLevelEnum,h as frameworkName,H as providerSchemas,w as serve,f as step,i as workflow};
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 t,n as b}from"../chunk-WUP5SBTV.js";import"../chunk-T2VIX2ZH.js";import{a as q}from"../chunk-2M25EATE.js";import"../chunk-U3IL7QCI.js";import{O}from"../chunk-6GCCKYZC.js";import{a as x}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",B=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,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,O as SeverityLevelEnum,E as TextInput,k as agent,h as frameworkName,x as providerSchemas,B as serve,q as step,b as workflow};
@@ -1,11 +1,12 @@
1
1
  import * as aws_lambda from 'aws-lambda';
2
2
  import { APIGatewayProxyEventV2, APIGatewayProxyResult } from 'aws-lambda';
3
- import { S as ServeHandlerOptions } from '../index-D4Rt1gOC.js';
4
- export { C as Client, N as NovuRequestHandler, w as workflow } from '../index-D4Rt1gOC.js';
5
- export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-C4vZDz5x.js';
6
- import { E as Either } from '../subscriber.types-CfRj4acH.js';
7
- export { C as ContextResolved, S as Subscriber, p as providerSchemas } from '../subscriber.types-CfRj4acH.js';
3
+ import { S as ServeHandlerOptions } from '../index-cfmN-nqZ.js';
4
+ export { A as Agent, a as AgentContext, b as AgentHandlers, c as AgentReaction, C as Client, F as FileRef, M as MessageContent, N as NovuRequestHandler, d as agent, w as workflow } from '../index-cfmN-nqZ.js';
5
+ export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-zMcfbkrA.js';
6
+ import { a as Either } from '../subscriber.types-B0sKq6v3.js';
7
+ export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-B0sKq6v3.js';
8
8
  import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
9
+ export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
9
10
  export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.js';
10
11
  import '../base.schema.types-BApIn9jr.js';
11
12
  import 'json-schema-to-ts';
@@ -1 +1 @@
1
- import{b as u,c as n,d as i}from"../chunk-WSQ6EEHO.js";import{a as w}from"../chunk-MQSAHSED.js";import"../chunk-JKG63DBC.js";import{S as h}from"../chunk-APAOD3BG.js";import{a as P}from"../chunk-RCWIURDJ.js";import{f as m}from"../chunk-LPE4ME2M.js";import"../chunk-PLPQUHX6.js";var p="lambda",f=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{u as Client,m as CronExpression,n as NovuRequestHandler,h as SeverityLevelEnum,p as frameworkName,P as providerSchemas,f as serve,w as step,i as workflow};
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 n,n as S}from"../chunk-WUP5SBTV.js";import"../chunk-T2VIX2ZH.js";import{a as b}from"../chunk-2M25EATE.js";import"../chunk-U3IL7QCI.js";import{O as G}from"../chunk-6GCCKYZC.js";import{a as A}from"../chunk-CBLKARLC.js";import{f as m}from"../chunk-EWC7I6UD.js";import"../chunk-52LSX2V5.js";var p="lambda",g=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,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,G as SeverityLevelEnum,E as TextInput,I as agent,p as frameworkName,A as providerSchemas,g as serve,b as step,S as workflow};
@@ -1,10 +1,11 @@
1
- import { I as INovuRequestHandlerOptions, N as NovuRequestHandler, S as ServeHandlerOptions, C as Client } from '../index-D4Rt1gOC.js';
2
- export { w as workflow } from '../index-D4Rt1gOC.js';
3
- import { W as Workflow } from '../health-check.types-C4vZDz5x.js';
4
- export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum } from '../health-check.types-C4vZDz5x.js';
1
+ import { I as INovuRequestHandlerOptions, N as NovuRequestHandler, S as ServeHandlerOptions, C as Client, A as Agent } from '../index-cfmN-nqZ.js';
2
+ export { a as AgentContext, b as AgentHandlers, c as AgentReaction, F as FileRef, M as MessageContent, d as agent, w as workflow } from '../index-cfmN-nqZ.js';
3
+ import { W as Workflow } from '../health-check.types-zMcfbkrA.js';
4
+ export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum } from '../health-check.types-zMcfbkrA.js';
5
+ export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
5
6
  export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.js';
6
- import { E as Either } from '../subscriber.types-CfRj4acH.js';
7
- export { C as ContextResolved, S as Subscriber, p as providerSchemas } from '../subscriber.types-CfRj4acH.js';
7
+ import { a as Either } from '../subscriber.types-B0sKq6v3.js';
8
+ export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-B0sKq6v3.js';
8
9
  import { Request, Response } from 'express';
9
10
  import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
10
11
  import { VercelRequest, VercelResponse } from '@vercel/node';
@@ -35,7 +36,8 @@ type NovuModuleOptions = ServeHandlerOptions & {
35
36
  declare const NovuBaseModule: _nestjs_common.ConfigurableModuleCls<NovuModuleOptions, "register", "createNovuModuleOptions", (definition: NovuModuleOptions) => {
36
37
  isGlobal: boolean;
37
38
  client?: Client;
38
- workflows: Array<Workflow>;
39
+ workflows?: Array<Workflow>;
40
+ agents?: Array<Agent>;
39
41
  apiPath: string;
40
42
  controllerDecorators?: ClassDecorator[];
41
43
  }>;
@@ -46,14 +48,16 @@ declare const OPTIONS_TYPE: ServeHandlerOptions & {
46
48
  } & Partial<(definition: NovuModuleOptions) => {
47
49
  isGlobal: boolean;
48
50
  client?: Client;
49
- workflows: Array<Workflow>;
51
+ workflows?: Array<Workflow>;
52
+ agents?: Array<Agent>;
50
53
  apiPath: string;
51
54
  controllerDecorators?: ClassDecorator[];
52
55
  }>;
53
56
  declare const ASYNC_OPTIONS_TYPE: _nestjs_common.ConfigurableModuleAsyncOptions<NovuModuleOptions, "createNovuModuleOptions"> & Partial<(definition: NovuModuleOptions) => {
54
57
  isGlobal: boolean;
55
58
  client?: Client;
56
- workflows: Array<Workflow>;
59
+ workflows?: Array<Workflow>;
60
+ agents?: Array<Agent>;
57
61
  apiPath: string;
58
62
  controllerDecorators?: ClassDecorator[];
59
63
  }>;
@@ -124,4 +128,4 @@ declare class NovuModule extends NovuBaseModule {
124
128
  */
125
129
  declare const registerApiPath: FactoryProvider;
126
130
 
127
- export { Client, NOVU_OPTIONS, NovuClient, NovuController, NovuHandler, NovuModule, type NovuModuleOptions, NovuRequestHandler, REGISTER_API_PATH, ServeHandlerOptions, Workflow, frameworkName, registerApiPath };
131
+ export { Agent, Client, NOVU_OPTIONS, NovuClient, NovuController, NovuHandler, NovuModule, type NovuModuleOptions, NovuRequestHandler, REGISTER_API_PATH, ServeHandlerOptions, Workflow, frameworkName, registerApiPath };
@@ -1 +1 @@
1
- import{b as g,c as y,d as j}from"../chunk-WSQ6EEHO.js";import{a as C}from"../chunk-MQSAHSED.js";import"../chunk-JKG63DBC.js";import{S as U}from"../chunk-APAOD3BG.js";import{a as G}from"../chunk-RCWIURDJ.js";import{f as V}from"../chunk-LPE4ME2M.js";import{a,b as n}from"../chunk-PLPQUHX6.js";import{Inject as R,Injectable as E}from"@nestjs/common";import{ConfigurableModuleBuilder as x}from"@nestjs/common";var{ConfigurableModuleClass:d,MODULE_OPTIONS_TOKEN:m,OPTIONS_TYPE:F,ASYNC_OPTIONS_TYPE:k}=new x().setClassMethodName("register").setFactoryMethodName("createNovuModuleOptions").setExtras(l=>({...l,isGlobal:!0})).build();var P="REGISTER_API_PATH";import{Injectable as I}from"@nestjs/common";var i=class{handler(e,r){return{body:()=>e.body,headers:t=>{let p=e.headers[t.toLowerCase()];return Array.isArray(p)?p[0]:p},method:()=>e.method||"GET",queryString:t=>{let p=e.query[t];return Array.isArray(p)?p[0]:p},url:()=>{let t=e.headers.host||"",p=t!=null&&t.includes("://")?"":`${e.protocol||"https"}://`;return new URL(e.originalUrl||e.url||"",`${p}${t||""}`)},transformResponse:({body:t,headers:p,status:T})=>(Object.entries(p).forEach(([N,S])=>{r.setHeader(N,S)}),r.status(T).send(t))}}};i=a([I()],i);var _="nest",u=class{constructor(e,r){this.options=e;this.novuHandler=r;this.novuRequestHandler=new y({frameworkName:_,...this.options,handler:this.novuHandler.handler})}async handleRequest(e,r){await this.novuRequestHandler.createHandler()(e,r)}};u=a([E(),n(0,R(m)),n(1,R(i))],u);import{Controller as A,Get as H,Inject as q,Options as b,Post as w,Req as f,Res as O}from"@nestjs/common";var s=class{constructor(e){this.novuService=e}async handleGet(e,r){await this.novuService.handleRequest(e,r)}async handlePost(e,r){await this.novuService.handleRequest(e,r)}async handleOptions(e,r){await this.novuService.handleRequest(e,r)}};a([H(),n(0,f()),n(1,O())],s.prototype,"handleGet",1),a([w(),n(0,f()),n(1,O())],s.prototype,"handlePost",1),a([b(),n(0,f()),n(1,O())],s.prototype,"handleOptions",1),s=a([A(),n(0,q(u))],s);import{Module as Y}from"@nestjs/common";import{PATH_METADATA as M}from"@nestjs/common/constants";var h={provide:P,useFactory:l=>{if(!l.apiPath)throw new Error("`apiPath` must be provided to set the controller path");Reflect.defineMetadata(M,l.apiPath,s)},inject:[m]};function v(l,e=[]){return e.reduce((r,o)=>o(r),l)}var c=class extends d{static register(e,r){var t;let o=d.register(e);return o.controllers=[v(s,e.controllerDecorators||[])],(t=o.providers)==null||t.push(h,u,i,...r||[]),o.exports=[u,i],o}static registerAsync(e,r){var t;let o=d.registerAsync(e);return o.controllers=[s],(t=o.providers)==null||t.push(h,u,i,...r||[]),o.exports=[u,i],o}};c=a([Y({})],c);export{g as Client,V as CronExpression,m as NOVU_OPTIONS,u as NovuClient,s as NovuController,i as NovuHandler,c as NovuModule,y as NovuRequestHandler,P as REGISTER_API_PATH,U as SeverityLevelEnum,_ as frameworkName,G as providerSchemas,h as registerApiPath,C as step,j as workflow};
1
+ import{b as g,c as G,d as U,e as j,f as C,g as D,h as F,i as k,j as B,k as L,l as $,m as y,n as J}from"../chunk-WUP5SBTV.js";import"../chunk-T2VIX2ZH.js";import{a as Q}from"../chunk-2M25EATE.js";import"../chunk-U3IL7QCI.js";import{O as z}from"../chunk-6GCCKYZC.js";import{a as K}from"../chunk-CBLKARLC.js";import{f as V}from"../chunk-EWC7I6UD.js";import{d as a,e as n}from"../chunk-52LSX2V5.js";import{Inject as R,Injectable as E}from"@nestjs/common";import{ConfigurableModuleBuilder as x}from"@nestjs/common";var{ConfigurableModuleClass:d,MODULE_OPTIONS_TOKEN:m,OPTIONS_TYPE:X,ASYNC_OPTIONS_TYPE:Z}=new x().setClassMethodName("register").setFactoryMethodName("createNovuModuleOptions").setExtras(l=>({...l,isGlobal:!0})).build();var P="REGISTER_API_PATH";import{Injectable as I}from"@nestjs/common";var i=class{handler(e,r){return{body:()=>e.body,headers:t=>{let p=e.headers[t.toLowerCase()];return Array.isArray(p)?p[0]:p},method:()=>e.method||"GET",queryString:t=>{let p=e.query[t];return Array.isArray(p)?p[0]:p},url:()=>{let t=e.headers.host||"",p=t!=null&&t.includes("://")?"":`${e.protocol||"https"}://`;return new URL(e.originalUrl||e.url||"",`${p}${t||""}`)},transformResponse:({body:t,headers:p,status:T})=>(Object.entries(p).forEach(([N,S])=>{r.setHeader(N,S)}),r.status(T).send(t))}}};i=a([I()],i);var _="nest",u=class{constructor(e,r){this.options=e;this.novuHandler=r;this.novuRequestHandler=new y({frameworkName:_,...this.options,handler:this.novuHandler.handler})}async handleRequest(e,r){await this.novuRequestHandler.createHandler()(e,r)}};u=a([E(),n(0,R(m)),n(1,R(i))],u);import{Controller as A,Get as H,Inject as q,Options as b,Post as w,Req as f,Res as O}from"@nestjs/common";var s=class{constructor(e){this.novuService=e}async handleGet(e,r){await this.novuService.handleRequest(e,r)}async handlePost(e,r){await this.novuService.handleRequest(e,r)}async handleOptions(e,r){await this.novuService.handleRequest(e,r)}};a([H(),n(0,f()),n(1,O())],s.prototype,"handleGet",1),a([w(),n(0,f()),n(1,O())],s.prototype,"handlePost",1),a([b(),n(0,f()),n(1,O())],s.prototype,"handleOptions",1),s=a([A(),n(0,q(u))],s);import{Module as Y}from"@nestjs/common";import{PATH_METADATA as M}from"@nestjs/common/constants";var h={provide:P,useFactory:l=>{if(!l.apiPath)throw new Error("`apiPath` must be provided to set the controller path");Reflect.defineMetadata(M,l.apiPath,s)},inject:[m]};function v(l,e=[]){return e.reduce((r,o)=>o(r),l)}var c=class extends d{static register(e,r){var t;let o=d.register(e);return o.controllers=[v(s,e.controllerDecorators||[])],(t=o.providers)==null||t.push(h,u,i,...r||[]),o.exports=[u,i],o}static registerAsync(e,r){var t;let o=d.registerAsync(e);return o.controllers=[s],(t=o.providers)==null||t.push(h,u,i,...r||[]),o.exports=[u,i],o}};c=a([Y({})],c);export{G as Actions,U as Button,j as Card,C as CardLink,D as CardText,g as Client,V as CronExpression,F as Divider,m as NOVU_OPTIONS,u as NovuClient,s as NovuController,i as NovuHandler,c as NovuModule,y as NovuRequestHandler,P as REGISTER_API_PATH,k as Select,B as SelectOption,z as SeverityLevelEnum,L as TextInput,$ as agent,_ as frameworkName,K as providerSchemas,h as registerApiPath,Q as step,J as workflow};
@@ -1,9 +1,10 @@
1
1
  import { NextRequest } from 'next/server';
2
- import { S as ServeHandlerOptions } from '../index-D4Rt1gOC.js';
3
- export { C as Client, N as NovuRequestHandler, w as workflow } from '../index-D4Rt1gOC.js';
4
- export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-C4vZDz5x.js';
5
- export { C as ContextResolved, S as Subscriber, p as providerSchemas } from '../subscriber.types-CfRj4acH.js';
2
+ import { S as ServeHandlerOptions } from '../index-cfmN-nqZ.js';
3
+ export { A as Agent, a as AgentContext, b as AgentHandlers, c as AgentReaction, C as Client, F as FileRef, M as MessageContent, N as NovuRequestHandler, d as agent, w as workflow } from '../index-cfmN-nqZ.js';
4
+ export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-zMcfbkrA.js';
5
+ export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-B0sKq6v3.js';
6
6
  import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
7
+ export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
7
8
  export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.js';
8
9
  import '../base.schema.types-BApIn9jr.js';
9
10
  import 'json-schema-to-ts';