@novu/framework 2.11.0 → 2.11.2-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 (85) hide show
  1. package/README.md +114 -9
  2. package/ai-sdk/package.json +4 -0
  3. package/cards/package.json +4 -0
  4. package/dist/{esm/index-dylq0Kmx.d.ts → cjs/agent.types-DdgaVUb7.d.cts} +356 -192
  5. package/dist/cjs/ai-sdk/index.cjs +1 -0
  6. package/dist/cjs/ai-sdk/index.d.cts +39 -0
  7. package/dist/cjs/cards.cjs +57 -0
  8. package/dist/cjs/cards.d.cts +2 -0
  9. package/dist/cjs/{health-check.types-uaDLF5bo.d.cts → health-check.types-CkUmYLNG.d.cts} +34 -140
  10. package/dist/cjs/index-BCp3U0UG.d.cts +189 -0
  11. package/dist/cjs/index.cjs +138 -135
  12. package/dist/cjs/index.d.cts +5 -3
  13. package/dist/cjs/internal/index.cjs +1 -1
  14. package/dist/cjs/internal/index.d.cts +96 -4
  15. package/dist/cjs/jsx-dev-runtime.cjs +1 -1
  16. package/dist/cjs/jsx-runtime.cjs +1 -1
  17. package/dist/cjs/langchain/index.cjs +1 -0
  18. package/dist/cjs/langchain/index.d.cts +105 -0
  19. package/dist/cjs/servers/express.cjs +137 -134
  20. package/dist/cjs/servers/express.d.cts +6 -4
  21. package/dist/cjs/servers/h3.cjs +136 -133
  22. package/dist/cjs/servers/h3.d.cts +6 -4
  23. package/dist/cjs/servers/lambda.cjs +138 -135
  24. package/dist/cjs/servers/lambda.d.cts +6 -5
  25. package/dist/cjs/servers/nest.cjs +136 -133
  26. package/dist/cjs/servers/nest.d.cts +21 -7
  27. package/dist/cjs/servers/next.cjs +138 -135
  28. package/dist/cjs/servers/next.d.cts +6 -4
  29. package/dist/cjs/servers/nuxt.cjs +136 -133
  30. package/dist/cjs/servers/nuxt.d.cts +6 -4
  31. package/dist/cjs/servers/remix.cjs +138 -135
  32. package/dist/cjs/servers/remix.d.cts +6 -4
  33. package/dist/cjs/servers/sveltekit.cjs +136 -133
  34. package/dist/cjs/servers/sveltekit.d.cts +6 -4
  35. package/dist/cjs/step-resolver.d.cts +3 -2
  36. package/dist/cjs/{subscriber.types-PRaHFLJu.d.cts → subscriber.types-DxMMRBIi.d.cts} +2 -78
  37. package/dist/cjs/util.types-DaFfsxgy.d.cts +78 -0
  38. package/dist/{cjs/index-D-SLxj--.d.cts → esm/agent.types-Bu3DhlVb.d.ts} +356 -192
  39. package/dist/esm/ai-sdk/index.d.ts +39 -0
  40. package/dist/esm/ai-sdk/index.js +1 -0
  41. package/dist/esm/cards.d.ts +2 -0
  42. package/dist/esm/cards.js +1 -0
  43. package/dist/esm/{chunk-K7PM3FEJ.js → chunk-3XT6S7TZ.js} +14 -14
  44. package/dist/esm/chunk-3ZWME5KT.js +0 -0
  45. package/dist/esm/chunk-C3P3ZH2I.js +36 -0
  46. package/dist/esm/chunk-FHYMHX3T.js +1 -0
  47. package/dist/esm/chunk-KLIOXJR3.js +1 -0
  48. package/dist/esm/chunk-W6DIBD4Z.js +1 -0
  49. package/dist/esm/chunk-YF62BBGH.js +98 -0
  50. package/dist/esm/{health-check.types-XZwesagD.d.ts → health-check.types-nDCnGlmX.d.ts} +34 -140
  51. package/dist/esm/index-DEehllqa.d.ts +189 -0
  52. package/dist/esm/index.d.ts +5 -3
  53. package/dist/esm/index.js +1 -1
  54. package/dist/esm/internal/index.d.ts +96 -4
  55. package/dist/esm/internal/index.js +1 -1
  56. package/dist/esm/jsx-dev-runtime.js +1 -1
  57. package/dist/esm/jsx-runtime-7EPQR56T.js +1 -0
  58. package/dist/esm/jsx-runtime.js +1 -1
  59. package/dist/esm/langchain/index.d.ts +105 -0
  60. package/dist/esm/langchain/index.js +1 -0
  61. package/dist/esm/servers/express.d.ts +6 -4
  62. package/dist/esm/servers/express.js +1 -1
  63. package/dist/esm/servers/h3.d.ts +6 -4
  64. package/dist/esm/servers/h3.js +1 -1
  65. package/dist/esm/servers/lambda.d.ts +6 -5
  66. package/dist/esm/servers/lambda.js +1 -1
  67. package/dist/esm/servers/nest.d.ts +21 -7
  68. package/dist/esm/servers/nest.js +1 -1
  69. package/dist/esm/servers/next.d.ts +6 -4
  70. package/dist/esm/servers/next.js +1 -1
  71. package/dist/esm/servers/nuxt.d.ts +6 -4
  72. package/dist/esm/servers/nuxt.js +1 -1
  73. package/dist/esm/servers/remix.d.ts +6 -4
  74. package/dist/esm/servers/remix.js +1 -1
  75. package/dist/esm/servers/sveltekit.d.ts +6 -4
  76. package/dist/esm/servers/sveltekit.js +1 -1
  77. package/dist/esm/step-resolver.d.ts +3 -2
  78. package/dist/esm/step-resolver.js +1 -1
  79. package/dist/esm/{subscriber.types-CC7F0JO_.d.ts → subscriber.types-BbyO_Cz6.d.ts} +2 -78
  80. package/dist/esm/util.types-DaFfsxgy.d.ts +78 -0
  81. package/dist/esm/validators.js +1 -1
  82. package/package.json +55 -7
  83. package/dist/esm/chunk-52LSX2V5.js +0 -1
  84. package/dist/esm/chunk-LJUUDK2J.js +0 -130
  85. package/dist/esm/chunk-N4PZBM53.js +0 -1
@@ -1,11 +1,13 @@
1
1
  import { RequestEvent } from '@sveltejs/kit';
2
- import { S as ServeHandlerOptions } from '../index-D-SLxj--.cjs';
3
- export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentBridgeRequest, e as AgentContext, f as AgentConversation, g as AgentDeliveryError, h as AgentEventEnum, i as AgentHandlers, j as AgentHistoryEntry, k as AgentMessage, l as AgentMessageAuthor, m as AgentMessageContext, n as AgentPlatformContext, o as AgentReaction, p as AgentReactionContext, q as AgentReplyPayload, r as AgentResolveContext, s as AgentSubscriber, C as Client, E as EditPayload, F as FileRef, M as MessageContent, t as MetadataSignal, N as NovuRequestHandler, R as ReplyContent, u as ReplyHandle, v as SentMessageInfo, w as Signal, T as TriggerSignal, x as agent, y as workflow } from '../index-D-SLxj--.cjs';
4
- export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-uaDLF5bo.cjs';
5
- export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-PRaHFLJu.cjs';
2
+ import { S as ServeHandlerOptions } from '../index-BCp3U0UG.cjs';
3
+ export { A as AgentDeliveryError, C as Client, N as NovuRequestHandler, a as agent, w as workflow } from '../index-BCp3U0UG.cjs';
4
+ export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-CkUmYLNG.cjs';
5
+ export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-DxMMRBIi.cjs';
6
6
  import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.cjs';
7
7
  export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
8
+ export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentContext, e as AgentConversation, f as AgentHandlerContext, g as AgentHandlers, h as AgentHistoryEntry, i as AgentMessage, j as AgentMessageAuthor, k as AgentMessageContext, l as AgentPlatformContext, m as AgentReaction, n as AgentReactionContext, o as AgentResolveContext, p as AgentSubscriber, q as AgentToolCall, F as FileRef, M as MessageContent, R as ReplyHandle, T as ToolApprovalCard, r as ToolApprovalConfig, s as ToolApprovalDecision } from '../agent.types-DdgaVUb7.cjs';
8
9
  export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.cjs';
10
+ import '../util.types-DaFfsxgy.cjs';
9
11
  import '../base.schema.types-BApIn9jr.cjs';
10
12
  import 'json-schema-to-ts';
11
13
  import 'zod';
@@ -1,5 +1,6 @@
1
- import { S as Subscriber, C as ContextResolved, E as EnvironmentSystemVariables, M as EmailOutputUnvalidated, g as Awaitable, p as providerSchemas, W as WithPassthrough, a2 as SmsOutputUnvalidated, l as ChatOutputUnvalidated, _ as PushOutputUnvalidated, Q as InAppOutputUnvalidated, u as DelayOutputUnvalidated, F as DigestOutputUnvalidated, a7 as ThrottleOutputUnvalidated } from './subscriber.types-PRaHFLJu.cjs';
2
- export { a9 as actionStepSchemas, aa as channelStepSchemas } from './subscriber.types-PRaHFLJu.cjs';
1
+ import { S as Subscriber, C as ContextResolved, E as EnvironmentSystemVariables, G as EmailOutputUnvalidated, p as providerSchemas, W as WithPassthrough, R as SmsOutputUnvalidated, h as ChatOutputUnvalidated, M as PushOutputUnvalidated, J as InAppOutputUnvalidated, n as DelayOutputUnvalidated, v as DigestOutputUnvalidated, Y as ThrottleOutputUnvalidated } from './subscriber.types-DxMMRBIi.cjs';
2
+ export { _ as actionStepSchemas, $ as channelStepSchemas } from './subscriber.types-DxMMRBIi.cjs';
3
+ import { A as Awaitable } from './util.types-DaFfsxgy.cjs';
3
4
  import { S as Schema, a as FromSchema } from './base.schema.types-BApIn9jr.cjs';
4
5
  import 'json-schema-to-ts';
5
6
  import 'zod';
@@ -1,81 +1,5 @@
1
1
  import { F as FromSchemaUnvalidated, S as Schema, a as FromSchema } from './base.schema.types-BApIn9jr.cjs';
2
-
3
- /**
4
- * A type that represents either `A` or `B`. Shared properties retain their
5
- * types and unique properties are marked as optional.
6
- */
7
- type Either<A, B> = Partial<A> & Partial<B> & (A | B);
8
- /**
9
- * A type that represents a value that may be a promise or a regular value.
10
- */
11
- type Awaitable<T> = T | Promise<T>;
12
- /**
13
- * A type that represents a type that is a prettified version of the original type.
14
- * The prettified type has all generics removed from intellisense and displays a flat object.
15
- */
16
- type Prettify<T> = {
17
- [K in keyof T]: T[K];
18
- } & {};
19
- /**
20
- * Mark properties of T as optional if Condition is true
21
- */
22
- type ConditionalPartial<T extends Obj, Condition extends boolean> = Condition extends true ? Partial<T> : T;
23
- /**
24
- * Same as Nullable except without `null`.
25
- */
26
- type Optional<T> = T | undefined;
27
- /**
28
- * Types that can be used to index native JavaScript types, (Object, Array, etc.).
29
- */
30
- type IndexSignature = string | number | symbol;
31
- /**
32
- * An object of any index-able type to avoid conflicts between `{}`, `Record`, `object`, etc.
33
- */
34
- type Obj<O extends Record<IndexSignature, unknown> | object = Record<IndexSignature, unknown> | object> = {
35
- [K in keyof O as K extends never ? never : K]: K extends never ? never : O[K] extends never ? never : O[K];
36
- } & Omit<O, never>;
37
- /**
38
- * Any type that is indexable using `string`, `number`, or `symbol`.
39
- */
40
- type Indexable<ValueTypes = unknown> = {
41
- [K: IndexSignature]: ValueTypes;
42
- } | Obj;
43
- /**
44
- * Picks only the optional properties from a type, removing the required ones.
45
- * Optionally, recurses through nested objects if `DEEP` is true.
46
- */
47
- type PickOptional<T, DEEP extends boolean = true> = {
48
- [K in keyof T as undefined extends T[K] ? K : never]: DEEP extends false ? T[K] : T[K] extends Optional<Indexable> ? PickOptional<T[K], DEEP> : T[K];
49
- };
50
- /**
51
- * Picks only the required fields out of a type, removing the optional ones.
52
- * Optionally, recurses through nested objects if `DEEP` is true.
53
- */
54
- type PickRequired<T, DEEP extends boolean = true> = {
55
- [K in keyof T as K extends keyof PickOptional<T, DEEP> ? never : K]: T[K] extends Indexable ? PickRequired<T[K], DEEP> : T[K];
56
- };
57
- /**
58
- * Picks only the required keys out of a type, removing the optional ones.
59
- * Optionally, recurses through nested objects if `DEEP` is true.
60
- */
61
- type PickRequiredKeys<T, DEEP extends boolean = true> = keyof PickRequired<T, DEEP>;
62
- /**
63
- * Picks only the optional keys out of a type, removing the required ones.
64
- * Optionally, recurses through nested objects if `DEEP` is true.
65
- */
66
- type PickOptionalKeys<T, DEEP extends boolean = true> = keyof PickOptional<T, DEEP>;
67
- /**
68
- * Recursively make all properties of type `T` optional.
69
- */
70
- type DeepPartial<T> = T extends object ? {
71
- [P in keyof T]?: DeepPartial<T[P]>;
72
- } : T;
73
- /**
74
- * Recursively make all properties of type `T` required.
75
- */
76
- type DeepRequired<T> = T extends object ? {
77
- [P in keyof T]-?: DeepRequired<T[P]>;
78
- } : T;
2
+ import { a as Prettify, A as Awaitable } from './util.types-DaFfsxgy.cjs';
79
3
 
80
4
  type ContextType = string;
81
5
  type ContextId = string;
@@ -4589,4 +4513,4 @@ type Subscriber = {
4589
4513
  data?: Record<string, unknown> | null;
4590
4514
  };
4591
4515
 
4592
- export { type PushResult as $, ActionStepEnum as A, type DigestOutput as B, type ContextResolved as C, type DeepPartial as D, type EnvironmentSystemVariables as E, type DigestOutputUnvalidated as F, type DigestRegularOutput as G, type DigestRegularOutputUnvalidated as H, type DigestResult as I, type DigestTimedOutput as J, type DigestTimedOutputUnvalidated as K, type EmailOutput as L, type EmailOutputUnvalidated as M, type EmailResult as N, type InAppOutput as O, type PickRequiredKeys as P, type InAppOutputUnvalidated as Q, type InAppResult as R, type Subscriber as S, type Indexable as T, JobStatusEnum as U, type PickOptional as V, type WithPassthrough as W, type PickOptionalKeys as X, type PickRequired as Y, type PushOutput as Z, type PushOutputUnvalidated as _, type Either as a, type Skip as a0, type SmsOutput as a1, type SmsOutputUnvalidated as a2, type SmsResult as a3, type StepContext as a4, type StepOutput as a5, type ThrottleOutput as a6, type ThrottleOutputUnvalidated as a7, type ThrottleResult as a8, actionStepSchemas as a9, channelStepSchemas as aa, type ContextPayload as b, type ConditionalPartial as c, type Step as d, type Prettify as e, ChannelStepEnum as f, type Awaitable as g, type StepOptions as h, type ActionStep as i, type ChannelStep as j, type ChatOutput as k, type ChatOutputUnvalidated as l, type ChatResult as m, type ContextValue as n, type CustomStep as o, providerSchemas as p, type DeepRequired as q, type DelayDynamicOutput as r, type DelayDynamicOutputUnvalidated as s, type DelayOutput as t, type DelayOutputUnvalidated as u, type DelayRegularOutput as v, type DelayRegularOutputUnvalidated as w, type DelayResult as x, type DelayTimedOutput as y, type DelayTimedOutputUnvalidated as z };
4516
+ export { channelStepSchemas as $, ActionStepEnum as A, type DigestTimedOutputUnvalidated as B, type ContextResolved as C, type DelayDynamicOutput as D, type EnvironmentSystemVariables as E, type EmailOutput as F, type EmailOutputUnvalidated as G, type EmailResult as H, type InAppOutput as I, type InAppOutputUnvalidated as J, type InAppResult as K, JobStatusEnum as L, type PushOutputUnvalidated as M, type PushResult as N, type Skip as O, type PushOutput as P, type SmsOutput as Q, type SmsOutputUnvalidated as R, type Subscriber as S, type SmsResult as T, type StepContext as U, type StepOutput as V, type WithPassthrough as W, type ThrottleOutput as X, type ThrottleOutputUnvalidated as Y, type ThrottleResult as Z, actionStepSchemas as _, type ContextPayload as a, type Step as b, ChannelStepEnum as c, type StepOptions as d, type ActionStep as e, type ChannelStep as f, type ChatOutput as g, type ChatOutputUnvalidated as h, type ChatResult as i, type ContextValue as j, type CustomStep as k, type DelayDynamicOutputUnvalidated as l, type DelayOutput as m, type DelayOutputUnvalidated as n, type DelayRegularOutput as o, providerSchemas as p, type DelayRegularOutputUnvalidated as q, type DelayResult as r, type DelayTimedOutput as s, type DelayTimedOutputUnvalidated as t, type DigestOutput as u, type DigestOutputUnvalidated as v, type DigestRegularOutput as w, type DigestRegularOutputUnvalidated as x, type DigestResult as y, type DigestTimedOutput as z };
@@ -0,0 +1,78 @@
1
+ /**
2
+ * A type that represents either `A` or `B`. Shared properties retain their
3
+ * types and unique properties are marked as optional.
4
+ */
5
+ type Either<A, B> = Partial<A> & Partial<B> & (A | B);
6
+ /**
7
+ * A type that represents a value that may be a promise or a regular value.
8
+ */
9
+ type Awaitable<T> = T | Promise<T>;
10
+ /**
11
+ * A type that represents a type that is a prettified version of the original type.
12
+ * The prettified type has all generics removed from intellisense and displays a flat object.
13
+ */
14
+ type Prettify<T> = {
15
+ [K in keyof T]: T[K];
16
+ } & {};
17
+ /**
18
+ * Mark properties of T as optional if Condition is true
19
+ */
20
+ type ConditionalPartial<T extends Obj, Condition extends boolean> = Condition extends true ? Partial<T> : T;
21
+ /**
22
+ * Same as Nullable except without `null`.
23
+ */
24
+ type Optional<T> = T | undefined;
25
+ /**
26
+ * Types that can be used to index native JavaScript types, (Object, Array, etc.).
27
+ */
28
+ type IndexSignature = string | number | symbol;
29
+ /**
30
+ * An object of any index-able type to avoid conflicts between `{}`, `Record`, `object`, etc.
31
+ */
32
+ type Obj<O extends Record<IndexSignature, unknown> | object = Record<IndexSignature, unknown> | object> = {
33
+ [K in keyof O as K extends never ? never : K]: K extends never ? never : O[K] extends never ? never : O[K];
34
+ } & Omit<O, never>;
35
+ /**
36
+ * Any type that is indexable using `string`, `number`, or `symbol`.
37
+ */
38
+ type Indexable<ValueTypes = unknown> = {
39
+ [K: IndexSignature]: ValueTypes;
40
+ } | Obj;
41
+ /**
42
+ * Picks only the optional properties from a type, removing the required ones.
43
+ * Optionally, recurses through nested objects if `DEEP` is true.
44
+ */
45
+ type PickOptional<T, DEEP extends boolean = true> = {
46
+ [K in keyof T as undefined extends T[K] ? K : never]: DEEP extends false ? T[K] : T[K] extends Optional<Indexable> ? PickOptional<T[K], DEEP> : T[K];
47
+ };
48
+ /**
49
+ * Picks only the required fields out of a type, removing the optional ones.
50
+ * Optionally, recurses through nested objects if `DEEP` is true.
51
+ */
52
+ type PickRequired<T, DEEP extends boolean = true> = {
53
+ [K in keyof T as K extends keyof PickOptional<T, DEEP> ? never : K]: T[K] extends Indexable ? PickRequired<T[K], DEEP> : T[K];
54
+ };
55
+ /**
56
+ * Picks only the required keys out of a type, removing the optional ones.
57
+ * Optionally, recurses through nested objects if `DEEP` is true.
58
+ */
59
+ type PickRequiredKeys<T, DEEP extends boolean = true> = keyof PickRequired<T, DEEP>;
60
+ /**
61
+ * Picks only the optional keys out of a type, removing the required ones.
62
+ * Optionally, recurses through nested objects if `DEEP` is true.
63
+ */
64
+ type PickOptionalKeys<T, DEEP extends boolean = true> = keyof PickOptional<T, DEEP>;
65
+ /**
66
+ * Recursively make all properties of type `T` optional.
67
+ */
68
+ type DeepPartial<T> = T extends object ? {
69
+ [P in keyof T]?: DeepPartial<T[P]>;
70
+ } : T;
71
+ /**
72
+ * Recursively make all properties of type `T` required.
73
+ */
74
+ type DeepRequired<T> = T extends object ? {
75
+ [P in keyof T]-?: DeepRequired<T[P]>;
76
+ } : T;
77
+
78
+ export type { Awaitable as A, ConditionalPartial as C, DeepPartial as D, Either as E, Indexable as I, PickRequiredKeys as P, Prettify as a, DeepRequired as b, PickOptional as c, PickOptionalKeys as d, PickRequired as e };