@novu/framework 2.0.0-canary.4 → 2.0.0-canary.6
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 +4 -4
- package/dist/handler-908yagvL.d.ts +4422 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +447 -118
- package/dist/servers/express.d.ts +1 -1
- package/dist/servers/express.js +16 -16
- package/dist/servers/h3.d.ts +1 -1
- package/dist/servers/h3.js +17 -17
- package/dist/servers/lambda.d.ts +1 -1
- package/dist/servers/lambda.js +15 -15
- package/dist/servers/next.d.ts +1 -1
- package/dist/servers/next.js +15 -15
- package/dist/servers/nuxt.d.ts +1 -1
- package/dist/servers/nuxt.js +17 -17
- package/dist/servers/remix.d.ts +1 -1
- package/dist/servers/remix.js +16 -16
- package/dist/servers/sveltekit.d.ts +1 -1
- package/dist/servers/sveltekit.js +16 -16
- package/package.json +2 -3
- package/dist/handler-RA4Feq8s.d.ts +0 -3912
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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-908yagvL.js';
|
|
2
|
+
export { y as ActionStep, A as ActionStepEnum, a4 as Awaitable, m as CancelEventTriggerResponse, B as ChannelStep, c as ChannelStepEnum, R as ChatOutput, T as ChatResult, C as Client, e as ClientOptions, d as CodeResult, z as CustomStep, X as DelayOutput, Y as DelayResult, $ as DigestOutput, a0 as DigestResult, i as DiscoverOutput, D as DiscoverProviderOutput, g as DiscoverStepOutput, h as DiscoverWorkflowOutput, a3 as Either, I as EmailOutput, K as EmailResult, n as Event, k as EventTriggerParams, l as EventTriggerResponse, j as EventTriggerResult, a6 as ExecuteInput, r as ExecuteOutput, p as ExecuteOutputMetadata, q as ExecuteOutputOptions, G as GetActionEnum, H as HealthCheck, U as InAppOutput, V as InAppResult, v as JobStatusEnum, N as NovuRequestHandler, P as PostActionEnum, a5 as Prettify, O as PushOutput, Q as PushResult, b as ServeHandlerOptions, t as Skip, L as SmsOutput, M as SmsResult, o as State, a1 as Step, w as StepContext, u as StepOptions, x as StepOutput, f as StepType, a2 as Subscriber, s as SupportedFrameworkName, Z as digestRegularOutput, _ as digestTimedOutput } from './handler-908yagvL.js';
|
|
3
3
|
import { ValidateFunction as ValidateFunction$1 } from 'ajv';
|
|
4
4
|
import { ParseReturnType } from 'zod';
|
|
5
5
|
import 'json-schema-to-ts';
|
|
@@ -233,7 +233,7 @@ type ValidateResult<T> = {
|
|
|
233
233
|
data: T;
|
|
234
234
|
};
|
|
235
235
|
interface Validator<T_Schema extends Schema> {
|
|
236
|
-
validate: <T_Data
|
|
236
|
+
validate: <T_Data extends Record<string, unknown>>(data: T_Data, schema: T_Schema) => Promise<ValidateResult<T_Data>>;
|
|
237
237
|
isSchema: (schema: Schema) => schema is T_Schema;
|
|
238
238
|
transformToJsonSchema: (schema: T_Schema) => JsonSchema;
|
|
239
239
|
}
|
|
@@ -241,6 +241,6 @@ interface Validator<T_Schema extends Schema> {
|
|
|
241
241
|
/**
|
|
242
242
|
* Define a new notification workflow.
|
|
243
243
|
*/
|
|
244
|
-
declare function workflow<T_PayloadSchema extends Schema, T_ControlSchema extends Schema, T_Payload = FromSchema<T_PayloadSchema>,
|
|
244
|
+
declare function workflow<T_PayloadSchema extends Schema, T_ControlSchema extends Schema, T_Payload extends Record<string, unknown> = FromSchema<T_PayloadSchema>, T_Controls extends Record<string, unknown> = FromSchema<T_ControlSchema>>(workflowId: string, execute: Execute<T_Payload, T_Controls>, workflowOptions?: WorkflowOptions<T_PayloadSchema, T_ControlSchema>): Workflow<T_Payload>;
|
|
245
245
|
|
|
246
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 };
|