@novu/framework 2.7.1 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{health-check.types-D6N1lsYH.d.cts → health-check.types-D_KcRiM_.d.cts} +310 -18
- package/dist/cjs/{index-UaShSD2O.d.cts → index-DMh2JJ5c.d.cts} +1 -1
- package/dist/cjs/index.cjs +62 -62
- package/dist/cjs/index.d.cts +2 -2
- package/dist/cjs/internal/index.cjs +2 -2
- package/dist/cjs/internal/index.d.cts +2 -2
- package/dist/cjs/servers/express.cjs +62 -62
- package/dist/cjs/servers/express.d.cts +3 -3
- package/dist/cjs/servers/h3.cjs +62 -62
- package/dist/cjs/servers/h3.d.cts +3 -3
- package/dist/cjs/servers/lambda.cjs +62 -62
- package/dist/cjs/servers/lambda.d.cts +4 -4
- package/dist/cjs/servers/nest.cjs +73 -73
- package/dist/cjs/servers/nest.d.cts +4 -4
- package/dist/cjs/servers/next.cjs +64 -64
- package/dist/cjs/servers/next.d.cts +3 -3
- package/dist/cjs/servers/nuxt.cjs +62 -62
- package/dist/cjs/servers/nuxt.d.cts +3 -3
- package/dist/cjs/servers/remix.cjs +62 -62
- package/dist/cjs/servers/remix.d.cts +3 -3
- package/dist/cjs/servers/sveltekit.cjs +63 -63
- package/dist/cjs/servers/sveltekit.d.cts +3 -3
- package/dist/esm/{chunk-HSWROI2Y.js → chunk-BEJRLOTZ.js} +62 -62
- package/dist/esm/{chunk-DWQMWDZR.js → chunk-YLCZR2QR.js} +5 -5
- package/dist/esm/{health-check.types-D6N1lsYH.d.ts → health-check.types-D_KcRiM_.d.ts} +310 -18
- package/dist/esm/{index-OaIxkkpR.d.ts → index-DnpUToB5.d.ts} +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/internal/index.d.ts +2 -2
- package/dist/esm/internal/index.js +1 -1
- package/dist/esm/servers/express.d.ts +3 -3
- package/dist/esm/servers/express.js +1 -1
- package/dist/esm/servers/h3.d.ts +3 -3
- package/dist/esm/servers/h3.js +1 -1
- package/dist/esm/servers/lambda.d.ts +4 -4
- package/dist/esm/servers/lambda.js +1 -1
- package/dist/esm/servers/nest.d.ts +4 -4
- package/dist/esm/servers/nest.js +1 -1
- package/dist/esm/servers/next.d.ts +3 -3
- package/dist/esm/servers/next.js +1 -1
- package/dist/esm/servers/nuxt.d.ts +3 -3
- package/dist/esm/servers/nuxt.js +1 -1
- package/dist/esm/servers/remix.d.ts +3 -3
- package/dist/esm/servers/remix.js +1 -1
- package/dist/esm/servers/sveltekit.d.ts +3 -3
- package/dist/esm/servers/sveltekit.js +1 -1
- package/package.json +2 -1
|
@@ -30,6 +30,103 @@ type ClientOptions = {
|
|
|
30
30
|
strictAuthentication?: boolean;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
+
type ContextType = string;
|
|
34
|
+
type ContextId = string;
|
|
35
|
+
type ContextData = Record<string, unknown>;
|
|
36
|
+
/**
|
|
37
|
+
* Context value can be either a simple string identifier or a rich object with additional data
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* // Simple string value
|
|
41
|
+
* "org-acme"
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* // Rich object with optional data
|
|
45
|
+
* {
|
|
46
|
+
* id: "org-acme",
|
|
47
|
+
* data: { name: "Acme Corp", plan: "enterprise" }
|
|
48
|
+
* }
|
|
49
|
+
*/
|
|
50
|
+
type ContextValue = string | {
|
|
51
|
+
id: ContextId;
|
|
52
|
+
data?: ContextData;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Context payload represents the raw context data provided by users when triggering workflows.
|
|
56
|
+
* It's a flexible structure that maps context types to their values.
|
|
57
|
+
*
|
|
58
|
+
* This is the input format that gets processed and resolved into ContextResolved.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* // Single context with string value
|
|
62
|
+
* { tenant: "org-acme" }
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* // Multiple contexts with string values
|
|
66
|
+
* { tenant: "org-acme", app: "jira", user: "john-doe" }
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* // Context with rich object containing additional data
|
|
70
|
+
* {
|
|
71
|
+
* tenant: {
|
|
72
|
+
* id: "org-acme",
|
|
73
|
+
* data: { name: "Acme Corp", plan: "enterprise" }
|
|
74
|
+
* }
|
|
75
|
+
* }
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* // Mixed context values (string and object)
|
|
79
|
+
* {
|
|
80
|
+
* tenant: { id: "org-acme", data: { name: "Acme Corp" } },
|
|
81
|
+
* app: "jira",
|
|
82
|
+
* user: "john-doe"
|
|
83
|
+
* }
|
|
84
|
+
*/
|
|
85
|
+
type ContextPayload = Partial<Record<ContextType, ContextValue>>;
|
|
86
|
+
/**
|
|
87
|
+
* Resolved contexts represent the normalized, fully-processed context data used internally
|
|
88
|
+
* throughout the application and framework. This ensures consistent structure regardless
|
|
89
|
+
* of the input format in ContextPayload.
|
|
90
|
+
*
|
|
91
|
+
* All contexts are normalized to have both an `id` and `data` field, even if the original
|
|
92
|
+
* payload only provided a string value (in which case `data` will be an empty object).
|
|
93
|
+
*
|
|
94
|
+
* This type is used to:
|
|
95
|
+
* - Pass context data between services without exposing full entity details
|
|
96
|
+
* - Ensure consistent context structure in workflow execution
|
|
97
|
+
* - Provide type safety for context access in templates and conditions
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* // Resolved from payload: { tenant: "org-acme", app: "jira" }
|
|
101
|
+
* {
|
|
102
|
+
* tenant: {
|
|
103
|
+
* id: "org-acme",
|
|
104
|
+
* data: {} // Empty data since only ID was provided
|
|
105
|
+
* },
|
|
106
|
+
* app: {
|
|
107
|
+
* id: "jira",
|
|
108
|
+
* data: {} // Empty data since only ID was provided
|
|
109
|
+
* }
|
|
110
|
+
* }
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* // Resolved from payload with rich data
|
|
114
|
+
* {
|
|
115
|
+
* tenant: {
|
|
116
|
+
* id: "org-acme",
|
|
117
|
+
* data: { name: "Acme Corp", plan: "enterprise", region: "us-east" }
|
|
118
|
+
* },
|
|
119
|
+
* app: {
|
|
120
|
+
* id: "jira",
|
|
121
|
+
* data: { version: "8.0", environment: "production" }
|
|
122
|
+
* }
|
|
123
|
+
* }
|
|
124
|
+
*/
|
|
125
|
+
type ContextResolved = Record<ContextType, {
|
|
126
|
+
id: ContextId;
|
|
127
|
+
data: ContextData;
|
|
128
|
+
}>;
|
|
129
|
+
|
|
33
130
|
declare enum PostActionEnum {
|
|
34
131
|
TRIGGER = "trigger",
|
|
35
132
|
EXECUTE = "execute",
|
|
@@ -140,6 +237,7 @@ declare enum ChannelStepEnum {
|
|
|
140
237
|
declare enum ActionStepEnum {
|
|
141
238
|
DIGEST = "digest",
|
|
142
239
|
DELAY = "delay",
|
|
240
|
+
THROTTLE = "throttle",
|
|
143
241
|
CUSTOM = "custom"
|
|
144
242
|
}
|
|
145
243
|
|
|
@@ -198,6 +296,7 @@ interface IChannelCredentials {
|
|
|
198
296
|
interface ITopic {
|
|
199
297
|
type: 'Topic';
|
|
200
298
|
topicKey: string;
|
|
299
|
+
exclude?: string[];
|
|
201
300
|
}
|
|
202
301
|
type TriggerRecipientsPayload = string | ISubscriberPayload | ITopic | ISubscriberPayload[] | ITopic[];
|
|
203
302
|
declare enum TriggerEventStatusEnum {
|
|
@@ -229,7 +328,8 @@ declare enum PushProviderIdEnum {
|
|
|
229
328
|
OneSignal = "one-signal",
|
|
230
329
|
Pushpad = "pushpad",
|
|
231
330
|
PushWebhook = "push-webhook",
|
|
232
|
-
PusherBeams = "pusher-beams"
|
|
331
|
+
PusherBeams = "pusher-beams",
|
|
332
|
+
AppIO = "appio"
|
|
233
333
|
}
|
|
234
334
|
/**
|
|
235
335
|
* A preference for a notification delivery workflow.
|
|
@@ -393,6 +493,10 @@ type EventTriggerParams<T_Payload = EventPayload> = {
|
|
|
393
493
|
* Actor to trigger the workflow from
|
|
394
494
|
*/
|
|
395
495
|
actor?: Actor;
|
|
496
|
+
/**
|
|
497
|
+
* Context to trigger the workflow with
|
|
498
|
+
*/
|
|
499
|
+
context?: ContextPayload;
|
|
396
500
|
/**
|
|
397
501
|
* Bridge url to trigger the workflow to
|
|
398
502
|
*/
|
|
@@ -961,6 +1065,22 @@ declare const providerSchemas: {
|
|
|
961
1065
|
readonly additionalProperties: true;
|
|
962
1066
|
};
|
|
963
1067
|
};
|
|
1068
|
+
readonly sinch: {
|
|
1069
|
+
output: {
|
|
1070
|
+
readonly type: "object";
|
|
1071
|
+
readonly properties: {};
|
|
1072
|
+
readonly required: readonly [];
|
|
1073
|
+
readonly additionalProperties: true;
|
|
1074
|
+
};
|
|
1075
|
+
};
|
|
1076
|
+
readonly 'isendpro-sms': {
|
|
1077
|
+
output: {
|
|
1078
|
+
readonly type: "object";
|
|
1079
|
+
readonly properties: {};
|
|
1080
|
+
readonly required: readonly [];
|
|
1081
|
+
readonly additionalProperties: true;
|
|
1082
|
+
};
|
|
1083
|
+
};
|
|
964
1084
|
};
|
|
965
1085
|
readonly email: {
|
|
966
1086
|
readonly braze: {
|
|
@@ -3959,6 +4079,14 @@ declare const providerSchemas: {
|
|
|
3959
4079
|
readonly additionalProperties: true;
|
|
3960
4080
|
};
|
|
3961
4081
|
};
|
|
4082
|
+
readonly appio: {
|
|
4083
|
+
output: {
|
|
4084
|
+
readonly type: "object";
|
|
4085
|
+
readonly properties: {};
|
|
4086
|
+
readonly required: readonly [];
|
|
4087
|
+
readonly additionalProperties: true;
|
|
4088
|
+
};
|
|
4089
|
+
};
|
|
3962
4090
|
};
|
|
3963
4091
|
readonly in_app: {
|
|
3964
4092
|
readonly novu: {
|
|
@@ -4124,25 +4252,56 @@ type Providers<T_StepType extends keyof typeof providerSchemas, T_Controls, T_Ou
|
|
|
4124
4252
|
declare const actionStepSchemas: {
|
|
4125
4253
|
delay: {
|
|
4126
4254
|
output: {
|
|
4127
|
-
readonly
|
|
4128
|
-
|
|
4129
|
-
readonly
|
|
4130
|
-
readonly
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4255
|
+
readonly oneOf: [{
|
|
4256
|
+
readonly type: "object";
|
|
4257
|
+
readonly properties: {
|
|
4258
|
+
readonly type: {
|
|
4259
|
+
readonly enum: readonly ["regular"];
|
|
4260
|
+
};
|
|
4261
|
+
readonly amount: {
|
|
4262
|
+
readonly type: "number";
|
|
4263
|
+
};
|
|
4264
|
+
readonly unit: {
|
|
4265
|
+
readonly type: "string";
|
|
4266
|
+
readonly enum: readonly ["seconds", "minutes", "hours", "days", "weeks", "months"];
|
|
4267
|
+
};
|
|
4268
|
+
readonly extendToSchedule: {
|
|
4269
|
+
readonly type: "boolean";
|
|
4270
|
+
};
|
|
4135
4271
|
};
|
|
4136
|
-
readonly
|
|
4137
|
-
|
|
4138
|
-
|
|
4272
|
+
readonly required: readonly ["amount", "unit"];
|
|
4273
|
+
readonly additionalProperties: false;
|
|
4274
|
+
}, {
|
|
4275
|
+
readonly type: "object";
|
|
4276
|
+
readonly properties: {
|
|
4277
|
+
readonly type: {
|
|
4278
|
+
readonly enum: readonly ["timed"];
|
|
4279
|
+
};
|
|
4280
|
+
readonly cron: {
|
|
4281
|
+
readonly type: "string";
|
|
4282
|
+
};
|
|
4283
|
+
readonly extendToSchedule: {
|
|
4284
|
+
readonly type: "boolean";
|
|
4285
|
+
};
|
|
4139
4286
|
};
|
|
4140
|
-
readonly
|
|
4141
|
-
|
|
4287
|
+
readonly required: readonly ["cron"];
|
|
4288
|
+
readonly additionalProperties: false;
|
|
4289
|
+
}, {
|
|
4290
|
+
readonly type: "object";
|
|
4291
|
+
readonly properties: {
|
|
4292
|
+
readonly type: {
|
|
4293
|
+
readonly enum: readonly ["dynamic"];
|
|
4294
|
+
};
|
|
4295
|
+
readonly dynamicKey: {
|
|
4296
|
+
readonly type: "string";
|
|
4297
|
+
};
|
|
4298
|
+
readonly extendToSchedule: {
|
|
4299
|
+
readonly type: "boolean";
|
|
4300
|
+
};
|
|
4142
4301
|
};
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4302
|
+
readonly required: readonly ["dynamicKey"];
|
|
4303
|
+
readonly additionalProperties: false;
|
|
4304
|
+
}];
|
|
4146
4305
|
};
|
|
4147
4306
|
result: {
|
|
4148
4307
|
readonly type: "object";
|
|
@@ -4160,6 +4319,9 @@ declare const actionStepSchemas: {
|
|
|
4160
4319
|
readonly oneOf: [{
|
|
4161
4320
|
readonly type: "object";
|
|
4162
4321
|
readonly properties: {
|
|
4322
|
+
readonly type: {
|
|
4323
|
+
readonly enum: readonly ["regular"];
|
|
4324
|
+
};
|
|
4163
4325
|
readonly amount: {
|
|
4164
4326
|
readonly type: "number";
|
|
4165
4327
|
};
|
|
@@ -4193,6 +4355,9 @@ declare const actionStepSchemas: {
|
|
|
4193
4355
|
}, {
|
|
4194
4356
|
readonly type: "object";
|
|
4195
4357
|
readonly properties: {
|
|
4358
|
+
readonly type: {
|
|
4359
|
+
readonly enum: readonly ["timed"];
|
|
4360
|
+
};
|
|
4196
4361
|
readonly cron: {
|
|
4197
4362
|
readonly type: "string";
|
|
4198
4363
|
};
|
|
@@ -4237,11 +4402,120 @@ declare const actionStepSchemas: {
|
|
|
4237
4402
|
readonly additionalProperties: false;
|
|
4238
4403
|
};
|
|
4239
4404
|
};
|
|
4405
|
+
throttle: {
|
|
4406
|
+
output: {
|
|
4407
|
+
readonly type: "object";
|
|
4408
|
+
readonly properties: {
|
|
4409
|
+
readonly type: {
|
|
4410
|
+
readonly type: "string";
|
|
4411
|
+
readonly enum: readonly ["fixed", "dynamic"];
|
|
4412
|
+
};
|
|
4413
|
+
readonly amount: {
|
|
4414
|
+
readonly type: "number";
|
|
4415
|
+
};
|
|
4416
|
+
readonly unit: {
|
|
4417
|
+
readonly type: "string";
|
|
4418
|
+
readonly enum: readonly ["minutes", "hours", "days"];
|
|
4419
|
+
};
|
|
4420
|
+
readonly dynamicKey: {
|
|
4421
|
+
readonly type: "string";
|
|
4422
|
+
};
|
|
4423
|
+
readonly threshold: {
|
|
4424
|
+
readonly type: "number";
|
|
4425
|
+
};
|
|
4426
|
+
readonly throttleKey: {
|
|
4427
|
+
readonly type: "string";
|
|
4428
|
+
};
|
|
4429
|
+
};
|
|
4430
|
+
readonly required: readonly ["type"];
|
|
4431
|
+
readonly additionalProperties: false;
|
|
4432
|
+
};
|
|
4433
|
+
result: {
|
|
4434
|
+
readonly type: "object";
|
|
4435
|
+
readonly properties: {
|
|
4436
|
+
readonly throttled: {
|
|
4437
|
+
readonly type: "boolean";
|
|
4438
|
+
readonly description: "Whether the workflow execution was throttled";
|
|
4439
|
+
};
|
|
4440
|
+
readonly executionCount: {
|
|
4441
|
+
readonly type: "number";
|
|
4442
|
+
readonly description: "Number of executions within the throttle window";
|
|
4443
|
+
};
|
|
4444
|
+
readonly threshold: {
|
|
4445
|
+
readonly type: "number";
|
|
4446
|
+
readonly description: "The throttle threshold that was applied";
|
|
4447
|
+
};
|
|
4448
|
+
readonly windowStart: {
|
|
4449
|
+
readonly type: "string";
|
|
4450
|
+
readonly format: "date-time";
|
|
4451
|
+
readonly description: "Start time of the throttle window";
|
|
4452
|
+
};
|
|
4453
|
+
};
|
|
4454
|
+
readonly required: readonly ["throttled"];
|
|
4455
|
+
readonly additionalProperties: false;
|
|
4456
|
+
};
|
|
4457
|
+
};
|
|
4458
|
+
};
|
|
4459
|
+
|
|
4460
|
+
declare const delayRegularOutputSchema: {
|
|
4461
|
+
readonly type: "object";
|
|
4462
|
+
readonly properties: {
|
|
4463
|
+
readonly type: {
|
|
4464
|
+
readonly enum: readonly ["regular"];
|
|
4465
|
+
};
|
|
4466
|
+
readonly amount: {
|
|
4467
|
+
readonly type: "number";
|
|
4468
|
+
};
|
|
4469
|
+
readonly unit: {
|
|
4470
|
+
readonly type: "string";
|
|
4471
|
+
readonly enum: readonly ["seconds", "minutes", "hours", "days", "weeks", "months"];
|
|
4472
|
+
};
|
|
4473
|
+
readonly extendToSchedule: {
|
|
4474
|
+
readonly type: "boolean";
|
|
4475
|
+
};
|
|
4476
|
+
};
|
|
4477
|
+
readonly required: readonly ["amount", "unit"];
|
|
4478
|
+
readonly additionalProperties: false;
|
|
4479
|
+
};
|
|
4480
|
+
declare const delayTimedOutputSchema: {
|
|
4481
|
+
readonly type: "object";
|
|
4482
|
+
readonly properties: {
|
|
4483
|
+
readonly type: {
|
|
4484
|
+
readonly enum: readonly ["timed"];
|
|
4485
|
+
};
|
|
4486
|
+
readonly cron: {
|
|
4487
|
+
readonly type: "string";
|
|
4488
|
+
};
|
|
4489
|
+
readonly extendToSchedule: {
|
|
4490
|
+
readonly type: "boolean";
|
|
4491
|
+
};
|
|
4492
|
+
};
|
|
4493
|
+
readonly required: readonly ["cron"];
|
|
4494
|
+
readonly additionalProperties: false;
|
|
4495
|
+
};
|
|
4496
|
+
declare const delayDynamicOutputSchema: {
|
|
4497
|
+
readonly type: "object";
|
|
4498
|
+
readonly properties: {
|
|
4499
|
+
readonly type: {
|
|
4500
|
+
readonly enum: readonly ["dynamic"];
|
|
4501
|
+
};
|
|
4502
|
+
readonly dynamicKey: {
|
|
4503
|
+
readonly type: "string";
|
|
4504
|
+
};
|
|
4505
|
+
readonly extendToSchedule: {
|
|
4506
|
+
readonly type: "boolean";
|
|
4507
|
+
};
|
|
4508
|
+
};
|
|
4509
|
+
readonly required: readonly ["dynamicKey"];
|
|
4510
|
+
readonly additionalProperties: false;
|
|
4240
4511
|
};
|
|
4241
4512
|
|
|
4242
4513
|
declare const digestRegularOutputSchema: {
|
|
4243
4514
|
readonly type: "object";
|
|
4244
4515
|
readonly properties: {
|
|
4516
|
+
readonly type: {
|
|
4517
|
+
readonly enum: readonly ["regular"];
|
|
4518
|
+
};
|
|
4245
4519
|
readonly amount: {
|
|
4246
4520
|
readonly type: "number";
|
|
4247
4521
|
};
|
|
@@ -4276,6 +4550,9 @@ declare const digestRegularOutputSchema: {
|
|
|
4276
4550
|
declare const digestTimedOutputSchema: {
|
|
4277
4551
|
readonly type: "object";
|
|
4278
4552
|
readonly properties: {
|
|
4553
|
+
readonly type: {
|
|
4554
|
+
readonly enum: readonly ["timed"];
|
|
4555
|
+
};
|
|
4279
4556
|
readonly cron: {
|
|
4280
4557
|
readonly type: "string";
|
|
4281
4558
|
};
|
|
@@ -4722,6 +4999,12 @@ type ChatResult = FromSchema<(typeof channelStepSchemas)['chat']['result']>;
|
|
|
4722
4999
|
type InAppOutput = FromSchema<(typeof channelStepSchemas)['in_app']['output']>;
|
|
4723
5000
|
type InAppOutputUnvalidated = FromSchemaUnvalidated<(typeof channelStepSchemas)['in_app']['output']>;
|
|
4724
5001
|
type InAppResult = FromSchema<(typeof channelStepSchemas)['in_app']['result']>;
|
|
5002
|
+
type DelayRegularOutput = FromSchema<typeof delayRegularOutputSchema>;
|
|
5003
|
+
type DelayRegularOutputUnvalidated = FromSchemaUnvalidated<typeof delayRegularOutputSchema>;
|
|
5004
|
+
type DelayTimedOutput = FromSchema<typeof delayTimedOutputSchema>;
|
|
5005
|
+
type DelayTimedOutputUnvalidated = FromSchemaUnvalidated<typeof delayTimedOutputSchema>;
|
|
5006
|
+
type DelayDynamicOutput = FromSchema<typeof delayDynamicOutputSchema>;
|
|
5007
|
+
type DelayDynamicOutputUnvalidated = FromSchemaUnvalidated<typeof delayDynamicOutputSchema>;
|
|
4725
5008
|
type DelayOutput = FromSchema<(typeof actionStepSchemas)['delay']['output']>;
|
|
4726
5009
|
type DelayOutputUnvalidated = FromSchemaUnvalidated<(typeof actionStepSchemas)['delay']['output']>;
|
|
4727
5010
|
type DelayResult = FromSchema<(typeof actionStepSchemas)['delay']['result']>;
|
|
@@ -4732,6 +5015,9 @@ type DigestTimedOutputUnvalidated = FromSchemaUnvalidated<typeof digestTimedOutp
|
|
|
4732
5015
|
type DigestOutput = FromSchema<(typeof actionStepSchemas)['digest']['output']>;
|
|
4733
5016
|
type DigestOutputUnvalidated = FromSchemaUnvalidated<(typeof actionStepSchemas)['digest']['output']>;
|
|
4734
5017
|
type DigestResult = FromSchema<(typeof actionStepSchemas)['digest']['result']>;
|
|
5018
|
+
type ThrottleOutput = FromSchema<(typeof actionStepSchemas)['throttle']['output']>;
|
|
5019
|
+
type ThrottleOutputUnvalidated = FromSchemaUnvalidated<(typeof actionStepSchemas)['throttle']['output']>;
|
|
5020
|
+
type ThrottleResult = FromSchema<(typeof actionStepSchemas)['throttle']['result']>;
|
|
4735
5021
|
/**
|
|
4736
5022
|
* The step type.
|
|
4737
5023
|
*/
|
|
@@ -4750,6 +5036,8 @@ type Step = {
|
|
|
4750
5036
|
digest: ActionStep<DigestOutputUnvalidated, DigestResult>;
|
|
4751
5037
|
/** Delay the workflow for a period of time. */
|
|
4752
5038
|
delay: ActionStep<DelayOutputUnvalidated, DelayResult>;
|
|
5039
|
+
/** Throttle workflow executions within a time window. */
|
|
5040
|
+
throttle: ActionStep<ThrottleOutputUnvalidated, ThrottleResult>;
|
|
4753
5041
|
/** Execute custom code */
|
|
4754
5042
|
custom: CustomStep;
|
|
4755
5043
|
};
|
|
@@ -4762,6 +5050,7 @@ type Subscriber = {
|
|
|
4762
5050
|
phone?: string | null;
|
|
4763
5051
|
avatar?: string | null;
|
|
4764
5052
|
locale?: string | null;
|
|
5053
|
+
data?: Record<string, unknown> | null;
|
|
4765
5054
|
};
|
|
4766
5055
|
|
|
4767
5056
|
/**
|
|
@@ -4787,6 +5076,8 @@ type ExecuteInput<T_Payload extends Record<string, unknown>, T_Controls extends
|
|
|
4787
5076
|
environment: Record<string, unknown>;
|
|
4788
5077
|
/** The controls for the event. Provided via the Dashboard. */
|
|
4789
5078
|
controls: T_Controls;
|
|
5079
|
+
/** The resolved context for the event. */
|
|
5080
|
+
context: ContextResolved;
|
|
4790
5081
|
};
|
|
4791
5082
|
/**
|
|
4792
5083
|
* The function to execute the workflow.
|
|
@@ -5028,6 +5319,7 @@ type Event = {
|
|
|
5028
5319
|
state: State[];
|
|
5029
5320
|
action: Exclude<PostActionEnum, PostActionEnum.TRIGGER>;
|
|
5030
5321
|
subscriber: Subscriber;
|
|
5322
|
+
context: ContextResolved;
|
|
5031
5323
|
};
|
|
5032
5324
|
type State = {
|
|
5033
5325
|
stepId: string;
|
|
@@ -5065,4 +5357,4 @@ type HealthCheck = {
|
|
|
5065
5357
|
};
|
|
5066
5358
|
};
|
|
5067
5359
|
|
|
5068
|
-
export { type
|
|
5360
|
+
export { type PushOutputUnvalidated as $, ActionStepEnum as A, type Skip as B, CronExpression as C, type DiscoverProviderOutput as D, type Either as E, type FromSchemaUnvalidated as F, GetActionEnum as G, type HealthCheck as H, type StepOptions as I, type JsonSchema as J, JobStatusEnum as K, type StepContext as L, type StepOutput as M, type ActionStep as N, type CustomStep as O, PostActionEnum as P, type ChannelStep as Q, type EmailOutput as R, SeverityLevelEnum as S, type EmailOutputUnvalidated as T, type EmailResult as U, type SmsOutput as V, type Workflow as W, type SmsOutputUnvalidated as X, type SmsResult as Y, type ZodSchema as Z, type PushOutput as _, type Schema as a, type PushResult as a0, type ChatOutput as a1, type ChatOutputUnvalidated as a2, type ChatResult as a3, type InAppOutput as a4, type InAppOutputUnvalidated as a5, type InAppResult as a6, type DelayRegularOutput as a7, type DelayRegularOutputUnvalidated as a8, type DelayTimedOutput as a9, type DeepPartial as aA, type DeepRequired as aB, type ExecuteInput as aC, type Execute as aD, type WorkflowPreference as aE, type ChannelPreference as aF, type WorkflowPreferences as aG, type WorkflowOptions as aH, type DelayTimedOutputUnvalidated as aa, type DelayDynamicOutput as ab, type DelayDynamicOutputUnvalidated as ac, type DelayOutput as ad, type DelayOutputUnvalidated as ae, type DelayResult as af, type DigestRegularOutput as ag, type DigestRegularOutputUnvalidated as ah, type DigestTimedOutput as ai, type DigestTimedOutputUnvalidated as aj, type DigestOutput as ak, type DigestOutputUnvalidated as al, type DigestResult as am, type ThrottleOutput as an, type ThrottleOutputUnvalidated as ao, type ThrottleResult as ap, type Step as aq, type Subscriber as ar, type Awaitable as as, type Prettify as at, type ConditionalPartial as au, type Indexable as av, type PickOptional as aw, type PickRequired as ax, type PickRequiredKeys as ay, type PickOptionalKeys as az, type FromSchema as b, actionStepSchemas as c, channelStepSchemas as d, ChannelStepEnum as e, WorkflowChannelEnum as f, type CodeResult as g, type ClientOptions as h, type ContextValue as i, type ContextPayload as j, type ContextResolved as k, type StepType as l, type DiscoverStepOutput as m, type DiscoverWorkflowOutput as n, type DiscoverOutput as o, providerSchemas as p, type EventTriggerResult as q, type EventTriggerParams as r, type EventTriggerResponse as s, type CancelEventTriggerResponse as t, type Event as u, type State as v, type ExecuteOutputMetadata as w, type ExecuteOutputOptions as x, type ExecuteOutput as y, type ZodSchemaMinimal as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as ClientOptions, W as Workflow, H as HealthCheck,
|
|
1
|
+
import { h as ClientOptions, W as Workflow, H as HealthCheck, o as DiscoverOutput, u as Event, y as ExecuteOutput, g as CodeResult, r as EventTriggerParams, as as Awaitable, a as Schema, b as FromSchema, F as FromSchemaUnvalidated, aD as Execute, aH as WorkflowOptions } from './health-check.types-D_KcRiM_.cjs';
|
|
2
2
|
|
|
3
3
|
declare class Client {
|
|
4
4
|
private discoveredWorkflows;
|