@novu/api 0.0.1-alpha.128 → 0.0.1-alpha.131

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 (44) hide show
  1. package/lib/config.d.ts +2 -2
  2. package/lib/config.js +2 -2
  3. package/models/components/activitygraphstatesresponse.d.ts +8 -8
  4. package/models/components/activitygraphstatesresponse.d.ts.map +1 -1
  5. package/models/components/activitygraphstatesresponse.js +14 -13
  6. package/models/components/activitygraphstatesresponse.js.map +1 -1
  7. package/models/components/activitynotificationexecutiondetailresponsedto.d.ts +3 -2
  8. package/models/components/activitynotificationexecutiondetailresponsedto.d.ts.map +1 -1
  9. package/models/components/activitynotificationexecutiondetailresponsedto.js +3 -2
  10. package/models/components/activitynotificationexecutiondetailresponsedto.js.map +1 -1
  11. package/models/components/activitynotificationjobresponsedto.d.ts +3 -2
  12. package/models/components/activitynotificationjobresponsedto.d.ts.map +1 -1
  13. package/models/components/activitynotificationjobresponsedto.js +3 -2
  14. package/models/components/activitynotificationjobresponsedto.js.map +1 -1
  15. package/models/components/activitynotificationresponsedto.d.ts +3 -58
  16. package/models/components/activitynotificationresponsedto.d.ts.map +1 -1
  17. package/models/components/activitynotificationresponsedto.js +4 -33
  18. package/models/components/activitynotificationresponsedto.js.map +1 -1
  19. package/models/components/activitynotificationstepresponsedto.d.ts +2 -2
  20. package/models/components/activitynotificationstepresponsedto.d.ts.map +1 -1
  21. package/models/components/activitynotificationstepresponsedto.js +2 -2
  22. package/models/components/activitynotificationstepresponsedto.js.map +1 -1
  23. package/models/components/index.d.ts +2 -0
  24. package/models/components/index.d.ts.map +1 -1
  25. package/models/components/index.js +2 -0
  26. package/models/components/index.js.map +1 -1
  27. package/models/components/providersidenum.d.ts +235 -0
  28. package/models/components/providersidenum.d.ts.map +1 -0
  29. package/models/components/providersidenum.js +120 -0
  30. package/models/components/providersidenum.js.map +1 -0
  31. package/models/components/steptypeenum.d.ts +55 -0
  32. package/models/components/steptypeenum.d.ts.map +1 -0
  33. package/models/components/steptypeenum.js +60 -0
  34. package/models/components/steptypeenum.js.map +1 -0
  35. package/package.json +1 -1
  36. package/src/lib/config.ts +2 -2
  37. package/src/models/components/activitygraphstatesresponse.ts +14 -20
  38. package/src/models/components/activitynotificationexecutiondetailresponsedto.ts +9 -4
  39. package/src/models/components/activitynotificationjobresponsedto.ts +9 -4
  40. package/src/models/components/activitynotificationresponsedto.ts +9 -46
  41. package/src/models/components/activitynotificationstepresponsedto.ts +4 -4
  42. package/src/models/components/index.ts +2 -0
  43. package/src/models/components/providersidenum.ts +106 -0
  44. package/src/models/components/steptypeenum.ts +44 -0
@@ -19,6 +19,11 @@ import {
19
19
  ActivityNotificationStepResponseDto$Outbound,
20
20
  ActivityNotificationStepResponseDto$outboundSchema,
21
21
  } from "./activitynotificationstepresponsedto.js";
22
+ import {
23
+ ProvidersIdEnum,
24
+ ProvidersIdEnum$inboundSchema,
25
+ ProvidersIdEnum$outboundSchema,
26
+ } from "./providersidenum.js";
22
27
 
23
28
  /**
24
29
  * Optional digest for the job
@@ -58,7 +63,7 @@ export type ActivityNotificationJobResponseDto = {
58
63
  /**
59
64
  * Provider ID of the job
60
65
  */
61
- providerId: number;
66
+ providerId: ProvidersIdEnum;
62
67
  /**
63
68
  * Status of the job
64
69
  */
@@ -161,7 +166,7 @@ export const ActivityNotificationJobResponseDto$inboundSchema: z.ZodType<
161
166
  ),
162
167
  step: ActivityNotificationStepResponseDto$inboundSchema,
163
168
  payload: z.lazy(() => Payload$inboundSchema).optional(),
164
- providerId: z.number(),
169
+ providerId: ProvidersIdEnum$inboundSchema,
165
170
  status: z.string(),
166
171
  }).transform((v) => {
167
172
  return remap$(v, {
@@ -179,7 +184,7 @@ export type ActivityNotificationJobResponseDto$Outbound = {
179
184
  >;
180
185
  step: ActivityNotificationStepResponseDto$Outbound;
181
186
  payload?: Payload$Outbound | undefined;
182
- providerId: number;
187
+ providerId: string;
183
188
  status: string;
184
189
  };
185
190
 
@@ -197,7 +202,7 @@ export const ActivityNotificationJobResponseDto$outboundSchema: z.ZodType<
197
202
  ),
198
203
  step: ActivityNotificationStepResponseDto$outboundSchema,
199
204
  payload: z.lazy(() => Payload$outboundSchema).optional(),
200
- providerId: z.number(),
205
+ providerId: ProvidersIdEnum$outboundSchema,
201
206
  status: z.string(),
202
207
  }).transform((v) => {
203
208
  return remap$(v, {
@@ -5,7 +5,6 @@
5
5
  import * as z from "zod";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
- import { ClosedEnum } from "../../types/enums.js";
9
8
  import { Result as SafeParseResult } from "../../types/fp.js";
10
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
10
  import {
@@ -26,25 +25,11 @@ import {
26
25
  ActivityNotificationTemplateResponseDto$Outbound,
27
26
  ActivityNotificationTemplateResponseDto$outboundSchema,
28
27
  } from "./activitynotificationtemplateresponsedto.js";
29
-
30
- /**
31
- * Channels of the notification
32
- */
33
- export const Channels = {
34
- InApp: "in_app",
35
- Email: "email",
36
- Sms: "sms",
37
- Chat: "chat",
38
- Push: "push",
39
- Digest: "digest",
40
- Trigger: "trigger",
41
- Delay: "delay",
42
- Custom: "custom",
43
- } as const;
44
- /**
45
- * Channels of the notification
46
- */
47
- export type Channels = ClosedEnum<typeof Channels>;
28
+ import {
29
+ StepTypeEnum,
30
+ StepTypeEnum$inboundSchema,
31
+ StepTypeEnum$outboundSchema,
32
+ } from "./steptypeenum.js";
48
33
 
49
34
  export type ActivityNotificationResponseDto = {
50
35
  /**
@@ -67,10 +52,7 @@ export type ActivityNotificationResponseDto = {
67
52
  * Creation time of the notification
68
53
  */
69
54
  createdAt?: string | undefined;
70
- /**
71
- * Channels of the notification
72
- */
73
- channels?: Channels | undefined;
55
+ channels?: Array<StepTypeEnum> | undefined;
74
56
  /**
75
57
  * Subscriber of the notification
76
58
  */
@@ -85,25 +67,6 @@ export type ActivityNotificationResponseDto = {
85
67
  jobs?: Array<ActivityNotificationJobResponseDto> | undefined;
86
68
  };
87
69
 
88
- /** @internal */
89
- export const Channels$inboundSchema: z.ZodNativeEnum<typeof Channels> = z
90
- .nativeEnum(Channels);
91
-
92
- /** @internal */
93
- export const Channels$outboundSchema: z.ZodNativeEnum<typeof Channels> =
94
- Channels$inboundSchema;
95
-
96
- /**
97
- * @internal
98
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
99
- */
100
- export namespace Channels$ {
101
- /** @deprecated use `Channels$inboundSchema` instead. */
102
- export const inboundSchema = Channels$inboundSchema;
103
- /** @deprecated use `Channels$outboundSchema` instead. */
104
- export const outboundSchema = Channels$outboundSchema;
105
- }
106
-
107
70
  /** @internal */
108
71
  export const ActivityNotificationResponseDto$inboundSchema: z.ZodType<
109
72
  ActivityNotificationResponseDto,
@@ -115,7 +78,7 @@ export const ActivityNotificationResponseDto$inboundSchema: z.ZodType<
115
78
  _organizationId: z.string(),
116
79
  transactionId: z.string(),
117
80
  createdAt: z.string().optional(),
118
- channels: Channels$inboundSchema.optional(),
81
+ channels: z.array(StepTypeEnum$inboundSchema).optional(),
119
82
  subscriber: ActivityNotificationSubscriberResponseDto$inboundSchema
120
83
  .optional(),
121
84
  template: ActivityNotificationTemplateResponseDto$inboundSchema.optional(),
@@ -135,7 +98,7 @@ export type ActivityNotificationResponseDto$Outbound = {
135
98
  _organizationId: string;
136
99
  transactionId: string;
137
100
  createdAt?: string | undefined;
138
- channels?: string | undefined;
101
+ channels?: Array<string> | undefined;
139
102
  subscriber?: ActivityNotificationSubscriberResponseDto$Outbound | undefined;
140
103
  template?: ActivityNotificationTemplateResponseDto$Outbound | undefined;
141
104
  jobs?: Array<ActivityNotificationJobResponseDto$Outbound> | undefined;
@@ -152,7 +115,7 @@ export const ActivityNotificationResponseDto$outboundSchema: z.ZodType<
152
115
  organizationId: z.string(),
153
116
  transactionId: z.string(),
154
117
  createdAt: z.string().optional(),
155
- channels: Channels$outboundSchema.optional(),
118
+ channels: z.array(StepTypeEnum$outboundSchema).optional(),
156
119
  subscriber: ActivityNotificationSubscriberResponseDto$outboundSchema
157
120
  .optional(),
158
121
  template: ActivityNotificationTemplateResponseDto$outboundSchema.optional(),
@@ -32,7 +32,7 @@ export type ActivityNotificationStepResponseDto = {
32
32
  /**
33
33
  * Filter criteria for the step
34
34
  */
35
- filters: StepFilter;
35
+ filters: Array<StepFilter>;
36
36
  /**
37
37
  * Optional template for the step
38
38
  */
@@ -47,7 +47,7 @@ export const ActivityNotificationStepResponseDto$inboundSchema: z.ZodType<
47
47
  > = z.object({
48
48
  _id: z.string(),
49
49
  active: z.boolean(),
50
- filters: StepFilter$inboundSchema,
50
+ filters: z.array(StepFilter$inboundSchema),
51
51
  template: MessageTemplateDto$inboundSchema.optional(),
52
52
  }).transform((v) => {
53
53
  return remap$(v, {
@@ -59,7 +59,7 @@ export const ActivityNotificationStepResponseDto$inboundSchema: z.ZodType<
59
59
  export type ActivityNotificationStepResponseDto$Outbound = {
60
60
  _id: string;
61
61
  active: boolean;
62
- filters: StepFilter$Outbound;
62
+ filters: Array<StepFilter$Outbound>;
63
63
  template?: MessageTemplateDto$Outbound | undefined;
64
64
  };
65
65
 
@@ -71,7 +71,7 @@ export const ActivityNotificationStepResponseDto$outboundSchema: z.ZodType<
71
71
  > = z.object({
72
72
  id: z.string(),
73
73
  active: z.boolean(),
74
- filters: StepFilter$outboundSchema,
74
+ filters: z.array(StepFilter$outboundSchema),
75
75
  template: MessageTemplateDto$outboundSchema.optional(),
76
76
  }).transform((v) => {
77
77
  return remap$(v, {
@@ -65,11 +65,13 @@ export * from "./notificationtrigger.js";
65
65
  export * from "./notificationtriggervariable.js";
66
66
  export * from "./preference.js";
67
67
  export * from "./preferencechannels.js";
68
+ export * from "./providersidenum.js";
68
69
  export * from "./removesubscribersrequestdto.js";
69
70
  export * from "./renametopicrequestdto.js";
70
71
  export * from "./renametopicresponsedto.js";
71
72
  export * from "./security.js";
72
73
  export * from "./stepfilter.js";
74
+ export * from "./steptypeenum.js";
73
75
  export * from "./subscriberchanneldto.js";
74
76
  export * from "./subscriberfeedresponsedto.js";
75
77
  export * from "./subscriberpayloaddto.js";
@@ -0,0 +1,106 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ /**
9
+ * Provider ID of the job
10
+ */
11
+ export const ProvidersIdEnum = {
12
+ Emailjs: "emailjs",
13
+ Mailgun: "mailgun",
14
+ Mailjet: "mailjet",
15
+ Mandrill: "mandrill",
16
+ Nodemailer: "nodemailer",
17
+ Postmark: "postmark",
18
+ Sendgrid: "sendgrid",
19
+ Sendinblue: "sendinblue",
20
+ Ses: "ses",
21
+ Netcore: "netcore",
22
+ InfobipEmail: "infobip-email",
23
+ Resend: "resend",
24
+ Plunk: "plunk",
25
+ Mailersend: "mailersend",
26
+ Mailtrap: "mailtrap",
27
+ Clickatell: "clickatell",
28
+ Outlook365: "outlook365",
29
+ NovuEmail: "novu-email",
30
+ Sparkpost: "sparkpost",
31
+ EmailWebhook: "email-webhook",
32
+ Braze: "braze",
33
+ Nexmo: "nexmo",
34
+ Plivo: "plivo",
35
+ Sms77: "sms77",
36
+ SmsCentral: "sms-central",
37
+ Sns: "sns",
38
+ Telnyx: "telnyx",
39
+ Twilio: "twilio",
40
+ Gupshup: "gupshup",
41
+ Firetext: "firetext",
42
+ InfobipSms: "infobip-sms",
43
+ BurstSms: "burst-sms",
44
+ BulkSms: "bulk-sms",
45
+ IsendSms: "isend-sms",
46
+ FortySixElks: "forty-six-elks",
47
+ Kannel: "kannel",
48
+ Maqsam: "maqsam",
49
+ Termii: "termii",
50
+ AfricasTalking: "africas-talking",
51
+ NovuSms: "novu-sms",
52
+ Sendchamp: "sendchamp",
53
+ GenericSms: "generic-sms",
54
+ Clicksend: "clicksend",
55
+ Bandwidth: "bandwidth",
56
+ Messagebird: "messagebird",
57
+ Simpletexting: "simpletexting",
58
+ AzureSms: "azure-sms",
59
+ RingCentral: "ring-central",
60
+ BrevoSms: "brevo-sms",
61
+ EazySms: "eazy-sms",
62
+ Mobishastra: "mobishastra",
63
+ Fcm: "fcm",
64
+ Apns: "apns",
65
+ Expo: "expo",
66
+ OneSignal: "one-signal",
67
+ Pushpad: "pushpad",
68
+ PushWebhook: "push-webhook",
69
+ PusherBeams: "pusher-beams",
70
+ Novu: "novu",
71
+ Slack: "slack",
72
+ Discord: "discord",
73
+ Msteams: "msteams",
74
+ Mattermost: "mattermost",
75
+ Ryver: "ryver",
76
+ Zulip: "zulip",
77
+ GrafanaOnCall: "grafana-on-call",
78
+ Getstream: "getstream",
79
+ RocketChat: "rocket-chat",
80
+ WhatsappBusiness: "whatsapp-business",
81
+ } as const;
82
+ /**
83
+ * Provider ID of the job
84
+ */
85
+ export type ProvidersIdEnum = ClosedEnum<typeof ProvidersIdEnum>;
86
+
87
+ /** @internal */
88
+ export const ProvidersIdEnum$inboundSchema: z.ZodNativeEnum<
89
+ typeof ProvidersIdEnum
90
+ > = z.nativeEnum(ProvidersIdEnum);
91
+
92
+ /** @internal */
93
+ export const ProvidersIdEnum$outboundSchema: z.ZodNativeEnum<
94
+ typeof ProvidersIdEnum
95
+ > = ProvidersIdEnum$inboundSchema;
96
+
97
+ /**
98
+ * @internal
99
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
100
+ */
101
+ export namespace ProvidersIdEnum$ {
102
+ /** @deprecated use `ProvidersIdEnum$inboundSchema` instead. */
103
+ export const inboundSchema = ProvidersIdEnum$inboundSchema;
104
+ /** @deprecated use `ProvidersIdEnum$outboundSchema` instead. */
105
+ export const outboundSchema = ProvidersIdEnum$outboundSchema;
106
+ }
@@ -0,0 +1,44 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ /**
9
+ * Channels of the notification
10
+ */
11
+ export const StepTypeEnum = {
12
+ InApp: "in_app",
13
+ Email: "email",
14
+ Sms: "sms",
15
+ Chat: "chat",
16
+ Push: "push",
17
+ Digest: "digest",
18
+ Trigger: "trigger",
19
+ Delay: "delay",
20
+ Custom: "custom",
21
+ } as const;
22
+ /**
23
+ * Channels of the notification
24
+ */
25
+ export type StepTypeEnum = ClosedEnum<typeof StepTypeEnum>;
26
+
27
+ /** @internal */
28
+ export const StepTypeEnum$inboundSchema: z.ZodNativeEnum<typeof StepTypeEnum> =
29
+ z.nativeEnum(StepTypeEnum);
30
+
31
+ /** @internal */
32
+ export const StepTypeEnum$outboundSchema: z.ZodNativeEnum<typeof StepTypeEnum> =
33
+ StepTypeEnum$inboundSchema;
34
+
35
+ /**
36
+ * @internal
37
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
38
+ */
39
+ export namespace StepTypeEnum$ {
40
+ /** @deprecated use `StepTypeEnum$inboundSchema` instead. */
41
+ export const inboundSchema = StepTypeEnum$inboundSchema;
42
+ /** @deprecated use `StepTypeEnum$outboundSchema` instead. */
43
+ export const outboundSchema = StepTypeEnum$outboundSchema;
44
+ }