@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/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-Mor_4K8F.js';
2
- export { A as ActionStep, a1 as ActionStepEnum, Z as Awaitable, l as CancelEventTriggerResponse, v as ChannelStep, a0 as ChannelStepEnum, G as ChatOutput, I as ChatResult, C as Client, d as ClientOptions, c as CodeResult, u as CustomStep, M as DelayOutput, O as DelayResult, T as DigestOutput, U as DigestResult, h as DiscoverOutput, D as DiscoverProviderOutput, f as DiscoverStepOutput, g as DiscoverWorkflowOutput, Y as Either, w as EmailOutput, x as EmailResult, m as Event, j as EventTriggerParams, k as EventTriggerResponse, i as EventTriggerResult, $ as ExecuteInput, p as ExecuteOutput, o as ExecuteOutputMetadata, H as HealthCheck, K as InAppOutput, L as InAppResult, t as JobStatusEnum, N as NovuRequestHandler, _ as Prettify, P as PushOutput, B as PushResult, b as ServeHandlerOptions, r as Skip, y as SmsOutput, z as SmsResult, n as State, V as Step, s as StepOptions, e as StepType, X as Subscriber, q as SupportedFrameworkName, Q as digestRegularOutput, R as digestTimedOutput } from './handler-Mor_4K8F.js';
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
- PLATFORM_ERROR = "PlatformError",
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
- NOVU_FRAMEWORK_API = "novu-framework-api",
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, FromSchema, GetActionEnum, HttpHeaderKeysEnum, HttpMethodEnum, HttpQueryKeysEnum, HttpStatusEnum, JsonSchema, NovuApiEndpointsEnum, PostActionEnum, RETRYABLE_ERROR_STATUS_CODES, ResourceEnum, SIGNATURE_TIMESTAMP_TOLERANCE, SIGNATURE_TIMESTAMP_TOLERANCE_MINUTES, Schema, type ValidateFunction, type ValidateResult, type ValidationError, type Validator, Workflow, WorkflowOptions, workflow };
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 };