@novu/framework 2.0.0-canary.2 → 2.0.0-canary.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/README.md +15 -11
- package/dist/{handler-Mor_4K8F.d.ts → handler-RA4Feq8s.d.ts} +655 -100
- package/dist/index.d.ts +15 -23
- package/dist/index.js +74 -69
- package/dist/{express.d.ts → servers/express.d.ts} +1 -1
- package/dist/servers/express.js +30 -0
- package/dist/{h3.d.ts → servers/h3.d.ts} +1 -1
- package/dist/servers/h3.js +31 -0
- package/dist/servers/lambda.d.ts +24 -0
- package/dist/servers/lambda.js +30 -0
- package/dist/{next.d.ts → servers/next.d.ts} +1 -1
- package/dist/servers/next.js +30 -0
- package/dist/{nuxt.d.ts → servers/nuxt.d.ts} +1 -1
- package/dist/servers/nuxt.js +31 -0
- package/dist/{remix.d.ts → servers/remix.d.ts} +1 -1
- package/dist/servers/remix.js +30 -0
- package/dist/{sveltekit.d.ts → servers/sveltekit.d.ts} +1 -1
- package/dist/servers/sveltekit.js +30 -0
- package/package.json +40 -25
- package/dist/express.js +0 -27
- package/dist/h3.js +0 -28
- package/dist/next.js +0 -27
- package/dist/nuxt.js +0 -28
- package/dist/remix.js +0 -27
- package/dist/sveltekit.js +0 -27
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import { S as Schema, J as JsonSchema, F as FromSchema, E as Execute, W as WorkflowOptions, a as Workflow } from './handler-
|
|
2
|
-
export {
|
|
1
|
+
import { S as Schema, J as JsonSchema, F as FromSchema, E as Execute, W as WorkflowOptions, a as Workflow } from './handler-RA4Feq8s.js';
|
|
2
|
+
export { v as ActionStep, A as ActionStepEnum, a1 as Awaitable, m as CancelEventTriggerResponse, x as ChannelStep, c as ChannelStepEnum, M as ChatOutput, O as ChatResult, C as Client, e as ClientOptions, d as CodeResult, w as CustomStep, T as DelayOutput, U as DelayResult, Y as DigestOutput, Z as DigestResult, i as DiscoverOutput, D as DiscoverProviderOutput, g as DiscoverStepOutput, h as DiscoverWorkflowOutput, a0 as Either, y as EmailOutput, z as EmailResult, n as Event, k as EventTriggerParams, l as EventTriggerResponse, j as EventTriggerResult, a3 as ExecuteInput, q as ExecuteOutput, p as ExecuteOutputMetadata, G as GetActionEnum, H as HealthCheck, Q as InAppOutput, R as InAppResult, u as JobStatusEnum, N as NovuRequestHandler, P as PostActionEnum, a2 as Prettify, K as PushOutput, L as PushResult, b as ServeHandlerOptions, s as Skip, B as SmsOutput, I as SmsResult, o as State, _ as Step, t as StepOptions, f as StepType, $ as Subscriber, r as SupportedFrameworkName, V as digestRegularOutput, X as digestTimedOutput } from './handler-RA4Feq8s.js';
|
|
3
3
|
import { ValidateFunction as ValidateFunction$1 } from 'ajv';
|
|
4
4
|
import { ParseReturnType } from 'zod';
|
|
5
5
|
import 'json-schema-to-ts';
|
|
6
6
|
import '@novu/shared';
|
|
7
7
|
|
|
8
|
+
declare enum NovuApiEndpointsEnum {
|
|
9
|
+
SYNC = "/v1/bridge/sync",
|
|
10
|
+
DIFF = "/v1/bridge/diff"
|
|
11
|
+
}
|
|
12
|
+
declare const SIGNATURE_TIMESTAMP_TOLERANCE_MINUTES = 5;
|
|
13
|
+
declare const SIGNATURE_TIMESTAMP_TOLERANCE: number;
|
|
14
|
+
|
|
8
15
|
/**
|
|
9
16
|
* Cron expression helper.
|
|
10
17
|
*/
|
|
@@ -94,24 +101,6 @@ declare enum CronExpression {
|
|
|
94
101
|
MONDAY_TO_FRIDAY_AT_11PM = "0 0 23 * * 1-5"
|
|
95
102
|
}
|
|
96
103
|
|
|
97
|
-
declare enum PostActionEnum {
|
|
98
|
-
TRIGGER = "trigger",
|
|
99
|
-
EXECUTE = "execute",
|
|
100
|
-
PREVIEW = "preview"
|
|
101
|
-
}
|
|
102
|
-
declare enum GetActionEnum {
|
|
103
|
-
DISCOVER = "discover",
|
|
104
|
-
HEALTH_CHECK = "health-check",
|
|
105
|
-
CODE = "code"
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
declare enum NovuApiEndpointsEnum {
|
|
109
|
-
SYNC = "/v1/bridge/sync",
|
|
110
|
-
DIFF = "/v1/bridge/diff"
|
|
111
|
-
}
|
|
112
|
-
declare const SIGNATURE_TIMESTAMP_TOLERANCE_MINUTES = 5;
|
|
113
|
-
declare const SIGNATURE_TIMESTAMP_TOLERANCE: number;
|
|
114
|
-
|
|
115
104
|
declare enum ErrorCodeEnum {
|
|
116
105
|
WORKFLOW_NOT_FOUND_ERROR = "WorkflowNotFoundError",
|
|
117
106
|
WORKFLOW_ALREADY_EXISTS_ERROR = "WorkflowAlreadyExistsError",
|
|
@@ -136,7 +125,7 @@ declare enum ErrorCodeEnum {
|
|
|
136
125
|
SIGNATURE_INVALID_ERROR = "SignatureInvalidError",
|
|
137
126
|
SIGNATURE_EXPIRED_ERROR = "SignatureExpiredError",
|
|
138
127
|
SIGNING_KEY_NOT_FOUND_ERROR = "SigningKeyNotFoundError",
|
|
139
|
-
|
|
128
|
+
BRIDGE_ERROR = "BridgeError",
|
|
140
129
|
SIGNATURE_VERSION_INVALID_ERROR = "SignatureVersionInvalidError",
|
|
141
130
|
WORKFLOW_PAYLOAD_INVALID_ERROR = "WorkflowPayloadInvalidError"
|
|
142
131
|
}
|
|
@@ -147,7 +136,7 @@ declare enum HttpHeaderKeysEnum {
|
|
|
147
136
|
NOVU_SIGNATURE_DEPRECATED = "x-novu-signature",
|
|
148
137
|
NOVU_ANONYMOUS_DEPRECATED = "x-novu-anonymous",
|
|
149
138
|
NOVU_FRAMEWORK_SDK = "novu-framework-sdk",
|
|
150
|
-
|
|
139
|
+
NOVU_FRAMEWORK_SERVER = "novu-framework-server",
|
|
151
140
|
NOVU_FRAMEWORK_VERSION = "novu-framework-version",
|
|
152
141
|
USER_AGENT = "user-agent",
|
|
153
142
|
CONTENT_TYPE = "content-type",
|
|
@@ -228,6 +217,9 @@ declare enum ResourceEnum {
|
|
|
228
217
|
STEP = "step"
|
|
229
218
|
}
|
|
230
219
|
|
|
220
|
+
declare const SDK_VERSION: string;
|
|
221
|
+
declare const FRAMEWORK_VERSION = "2024-06-26";
|
|
222
|
+
|
|
231
223
|
type ValidateFunction<T = unknown> = ValidateFunction$1<T> | ((data: T) => ParseReturnType<T>);
|
|
232
224
|
type ValidationError = {
|
|
233
225
|
path: string;
|
|
@@ -251,4 +243,4 @@ interface Validator<T_Schema extends Schema> {
|
|
|
251
243
|
*/
|
|
252
244
|
declare function workflow<T_PayloadSchema extends Schema, T_ControlSchema extends Schema, T_Payload = FromSchema<T_PayloadSchema>, T_Control = FromSchema<T_ControlSchema>>(workflowId: string, execute: Execute<T_Payload, T_Control>, workflowOptions?: WorkflowOptions<T_PayloadSchema, T_ControlSchema>): Workflow<T_Payload>;
|
|
253
245
|
|
|
254
|
-
export { CronExpression, ErrorCodeEnum, Execute,
|
|
246
|
+
export { CronExpression, ErrorCodeEnum, Execute, FRAMEWORK_VERSION, FromSchema, HttpHeaderKeysEnum, HttpMethodEnum, HttpQueryKeysEnum, HttpStatusEnum, JsonSchema, NovuApiEndpointsEnum, RETRYABLE_ERROR_STATUS_CODES, ResourceEnum, SDK_VERSION, SIGNATURE_TIMESTAMP_TOLERANCE, SIGNATURE_TIMESTAMP_TOLERANCE_MINUTES, Schema, type ValidateFunction, type ValidateResult, type ValidationError, type Validator, Workflow, WorkflowOptions, workflow };
|