@novu/api 0.0.1-alpha.110 → 0.0.1-alpha.114

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 (86) hide show
  1. package/docs/sdks/novunotifications/README.md +2 -2
  2. package/lib/config.d.ts +2 -2
  3. package/lib/config.js +2 -2
  4. package/models/components/activitiesresponsedto.d.ts +10 -1
  5. package/models/components/activitiesresponsedto.d.ts.map +1 -1
  6. package/models/components/activitiesresponsedto.js.map +1 -1
  7. package/models/components/activitynotificationexecutiondetailresponsedto.d.ts +153 -0
  8. package/models/components/activitynotificationexecutiondetailresponsedto.d.ts.map +1 -0
  9. package/models/components/activitynotificationexecutiondetailresponsedto.js +137 -0
  10. package/models/components/activitynotificationexecutiondetailresponsedto.js.map +1 -0
  11. package/models/components/activitynotificationjobresponsedto.d.ts +117 -0
  12. package/models/components/activitynotificationjobresponsedto.d.ts.map +1 -0
  13. package/models/components/activitynotificationjobresponsedto.js +131 -0
  14. package/models/components/activitynotificationjobresponsedto.js.map +1 -0
  15. package/models/components/activitynotificationresponsedto.d.ts +36 -2
  16. package/models/components/activitynotificationresponsedto.d.ts.map +1 -1
  17. package/models/components/activitynotificationresponsedto.js +6 -2
  18. package/models/components/activitynotificationresponsedto.js.map +1 -1
  19. package/models/components/activitynotificationstepresponsedto.d.ts +49 -0
  20. package/models/components/activitynotificationstepresponsedto.d.ts.map +1 -0
  21. package/models/components/activitynotificationstepresponsedto.js +76 -0
  22. package/models/components/activitynotificationstepresponsedto.js.map +1 -0
  23. package/models/components/activitynotificationsubscriberresponsedto.d.ts +15 -0
  24. package/models/components/activitynotificationsubscriberresponsedto.d.ts.map +1 -1
  25. package/models/components/activitynotificationsubscriberresponsedto.js.map +1 -1
  26. package/models/components/activitynotificationtemplateresponsedto.d.ts +12 -2
  27. package/models/components/activitynotificationtemplateresponsedto.d.ts.map +1 -1
  28. package/models/components/activitynotificationtemplateresponsedto.js +3 -2
  29. package/models/components/activitynotificationtemplateresponsedto.js.map +1 -1
  30. package/models/components/channelpreference.d.ts +8 -8
  31. package/models/components/channelpreference.d.ts.map +1 -1
  32. package/models/components/channelpreference.js +13 -13
  33. package/models/components/channelpreference.js.map +1 -1
  34. package/models/components/index.d.ts +4 -2
  35. package/models/components/index.d.ts.map +1 -1
  36. package/models/components/index.js +4 -2
  37. package/models/components/index.js.map +1 -1
  38. package/models/components/messageactionresult.d.ts +15 -15
  39. package/models/components/messageactionresult.d.ts.map +1 -1
  40. package/models/components/messageactionresult.js +18 -18
  41. package/models/components/messageactionresult.js.map +1 -1
  42. package/models/components/messagetemplatedto.d.ts +25 -0
  43. package/models/components/messagetemplatedto.d.ts.map +1 -0
  44. package/models/components/{builderfieldtype.js → messagetemplatedto.js} +20 -21
  45. package/models/components/messagetemplatedto.js.map +1 -0
  46. package/models/components/notificationtrigger.d.ts +26 -8
  47. package/models/components/notificationtrigger.d.ts.map +1 -1
  48. package/models/components/notificationtrigger.js +16 -13
  49. package/models/components/notificationtrigger.js.map +1 -1
  50. package/models/components/notificationtriggervariable.d.ts +3 -0
  51. package/models/components/notificationtriggervariable.d.ts.map +1 -1
  52. package/models/components/notificationtriggervariable.js.map +1 -1
  53. package/models/components/stepfilter.d.ts +2 -40
  54. package/models/components/stepfilter.d.ts.map +1 -1
  55. package/models/components/stepfilter.js +3 -34
  56. package/models/components/stepfilter.js.map +1 -1
  57. package/models/operations/subscriberscontrollergetunseencount.d.ts +9 -3
  58. package/models/operations/subscriberscontrollergetunseencount.d.ts.map +1 -1
  59. package/models/operations/subscriberscontrollergetunseencount.js +4 -4
  60. package/models/operations/subscriberscontrollergetunseencount.js.map +1 -1
  61. package/package.json +1 -1
  62. package/src/lib/config.ts +2 -2
  63. package/src/models/components/activitiesresponsedto.ts +10 -1
  64. package/src/models/components/activitynotificationexecutiondetailresponsedto.ts +225 -0
  65. package/src/models/components/activitynotificationjobresponsedto.ts +241 -0
  66. package/src/models/components/activitynotificationresponsedto.ts +43 -4
  67. package/src/models/components/activitynotificationstepresponsedto.ts +116 -0
  68. package/src/models/components/activitynotificationsubscriberresponsedto.ts +15 -0
  69. package/src/models/components/activitynotificationtemplateresponsedto.ts +19 -4
  70. package/src/models/components/channelpreference.ts +16 -15
  71. package/src/models/components/index.ts +4 -2
  72. package/src/models/components/messageactionresult.ts +31 -24
  73. package/src/models/components/messagetemplatedto.ts +58 -0
  74. package/src/models/components/notificationtrigger.ts +33 -18
  75. package/src/models/components/notificationtriggervariable.ts +3 -0
  76. package/src/models/components/stepfilter.ts +4 -62
  77. package/src/models/operations/subscriberscontrollergetunseencount.ts +13 -7
  78. package/models/components/builderfieldtype.d.ts +0 -46
  79. package/models/components/builderfieldtype.d.ts.map +0 -1
  80. package/models/components/builderfieldtype.js.map +0 -1
  81. package/models/components/fieldfilterpart.d.ts +0 -122
  82. package/models/components/fieldfilterpart.d.ts.map +0 -1
  83. package/models/components/fieldfilterpart.js +0 -116
  84. package/models/components/fieldfilterpart.js.map +0 -1
  85. package/src/models/components/builderfieldtype.ts +0 -39
  86. package/src/models/components/fieldfilterpart.ts +0 -137
@@ -1 +1 @@
1
- {"version":3,"file":"subscriberscontrollergetunseencount.js","sourceRoot":"","sources":["../../src/models/operations/subscriberscontrollergetunseencount.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAEjD,mEAAqD;AAcrD,gBAAgB;AACH,QAAA,wDAAwD,GAEjE,CAAC,CAAC,MAAM,CAAC;IACP,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE;IACjB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AASP,gBAAgB;AACH,QAAA,yDAAyD,GAKhE,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE;IACjB,YAAY,EAAE,CAAC,CA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AM,EAAE,UAAU,CAAC,kCAAkC;CACtD,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,QAAQ;KACjB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEL;;;GAGG;AACH,IAAiB,4CAA4C,CAS5D;AATD,WAAiB,4CAA4C;IAC3D,2FAA2F;IAC9E,0DAAa,GACxB,iEAAyD,CAAC;IAC5D,4FAA4F;IAC/E,2DAAc,GACzB,kEAA0D,CAAC;AAG/D,CAAC,EATgB,4CAA4C,4DAA5C,4CAA4C,QAS5D;AAED,SAAgB,iDAAiD,CAC/D,2CAC6C;IAE7C,OAAO,IAAI,CAAC,SAAS,CACnB,kEAA0D,CAAC,KAAK,CAC9D,2CAA2C,CAC5C,CACF,CAAC;AACJ,CAAC;AATD,8GASC;AAED,SAAgB,mDAAmD,CACjE,UAAkB;IAKlB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CACJ,iEAAyD,CAAC,KAAK,CAC7D,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CACd,EACH,yEAAyE,CAC1E,CAAC;AACJ,CAAC;AAdD,kHAcC"}
1
+ {"version":3,"file":"subscriberscontrollergetunseencount.js","sourceRoot":"","sources":["../../src/models/operations/subscriberscontrollergetunseencount.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAEjD,mEAAqD;AAoBrD,gBAAgB;AACH,QAAA,wDAAwD,GAEjE,CAAC,CAAC,MAAM,CAAC;IACP,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAChC,KAAK,EAAE,CAAC,CAAC,MAAM,E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AAS;QACpB,QAAQ,EAAE,QAAQ;KACnB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAQL,gBAAgB;AACH,QAAA,0DAA0D,GAKjE,CAAC,CAAC,MAAM,CAAC;IACX,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACtC,MAAM,EAAE,UAAU,CAAC,kCAAkC;CACtD,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,QAAQ;KACjB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEL;;;GAGG;AACH,IAAiB,4CAA4C,CAS5D;AATD,WAAiB,4CAA4C;IAC3D,2FAA2F;IAC9E,0DAAa,GACxB,iEAAyD,CAAC;IAC5D,4FAA4F;IAC/E,2DAAc,GACzB,kEAA0D,CAAC;AAG/D,CAAC,EATgB,4CAA4C,4DAA5C,4CAA4C,QAS5D;AAED,SAAgB,iDAAiD,CAC/D,2CAC6C;IAE7C,OAAO,IAAI,CAAC,SAAS,CACnB,kEAA0D,CAAC,KAAK,CAC9D,2CAA2C,CAC5C,CACF,CAAC;AACJ,CAAC;AATD,8GASC;AAED,SAAgB,mDAAmD,CACjE,UAAkB;IAKlB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CACJ,iEAAyD,CAAC,KAAK,CAC7D,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CACd,EACH,yEAAyE,CAC1E,CAAC;AACJ,CAAC;AAdD,kHAcC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@novu/api",
3
- "version": "0.0.1-alpha.110",
3
+ "version": "0.0.1-alpha.114",
4
4
  "author": "Novu",
5
5
  "main": "./index.js",
6
6
  "sideEffects": false,
package/src/lib/config.ts CHANGED
@@ -55,7 +55,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
55
55
  export const SDK_METADATA = {
56
56
  language: "typescript",
57
57
  openapiDocVersion: "1.0",
58
- sdkVersion: "0.0.1-alpha.110",
58
+ sdkVersion: "0.0.1-alpha.114",
59
59
  genVersion: "2.479.3",
60
- userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.110 2.479.3 1.0 @novu/api",
60
+ userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.114 2.479.3 1.0 @novu/api",
61
61
  } as const;
@@ -14,12 +14,21 @@ import {
14
14
  } from "./activitynotificationresponsedto.js";
15
15
 
16
16
  export type ActivitiesResponseDto = {
17
+ /**
18
+ * Whether there are more activities
19
+ */
17
20
  hasMore: boolean;
18
21
  /**
19
- * Array of Activity notifications
22
+ * Array of activity notifications
20
23
  */
21
24
  data: Array<ActivityNotificationResponseDto>;
25
+ /**
26
+ * Page size of the activities
27
+ */
22
28
  pageSize: number;
29
+ /**
30
+ * Current page of the activities
31
+ */
23
32
  page: number;
24
33
  };
25
34
 
@@ -0,0 +1,225 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ /**
13
+ * Status of the execution detail
14
+ */
15
+ export const ActivityNotificationExecutionDetailResponseDtoStatus = {
16
+ Success: "Success",
17
+ Warning: "Warning",
18
+ Failed: "Failed",
19
+ Pending: "Pending",
20
+ Queued: "Queued",
21
+ ReadConfirmation: "ReadConfirmation",
22
+ } as const;
23
+ /**
24
+ * Status of the execution detail
25
+ */
26
+ export type ActivityNotificationExecutionDetailResponseDtoStatus = ClosedEnum<
27
+ typeof ActivityNotificationExecutionDetailResponseDtoStatus
28
+ >;
29
+
30
+ /**
31
+ * Source of the execution detail
32
+ */
33
+ export const Source = {
34
+ Credentials: "Credentials",
35
+ Internal: "Internal",
36
+ Payload: "Payload",
37
+ Webhook: "Webhook",
38
+ } as const;
39
+ /**
40
+ * Source of the execution detail
41
+ */
42
+ export type Source = ClosedEnum<typeof Source>;
43
+
44
+ export type ActivityNotificationExecutionDetailResponseDto = {
45
+ /**
46
+ * Unique identifier of the execution detail
47
+ */
48
+ id: string;
49
+ /**
50
+ * Unique identifier of the job
51
+ */
52
+ jobId: string;
53
+ /**
54
+ * Status of the execution detail
55
+ */
56
+ status: ActivityNotificationExecutionDetailResponseDtoStatus;
57
+ /**
58
+ * Detailed information about the execution
59
+ */
60
+ detail: string;
61
+ /**
62
+ * Whether the execution is a retry or not
63
+ */
64
+ isRetry: boolean;
65
+ /**
66
+ * Whether the execution is a test or not
67
+ */
68
+ isTest: boolean;
69
+ /**
70
+ * Provider ID of the job
71
+ */
72
+ providerId: number;
73
+ /**
74
+ * Raw data of the execution
75
+ */
76
+ raw?: string | undefined;
77
+ /**
78
+ * Source of the execution detail
79
+ */
80
+ source: Source;
81
+ };
82
+
83
+ /** @internal */
84
+ export const ActivityNotificationExecutionDetailResponseDtoStatus$inboundSchema:
85
+ z.ZodNativeEnum<typeof ActivityNotificationExecutionDetailResponseDtoStatus> =
86
+ z.nativeEnum(ActivityNotificationExecutionDetailResponseDtoStatus);
87
+
88
+ /** @internal */
89
+ export const ActivityNotificationExecutionDetailResponseDtoStatus$outboundSchema:
90
+ z.ZodNativeEnum<typeof ActivityNotificationExecutionDetailResponseDtoStatus> =
91
+ ActivityNotificationExecutionDetailResponseDtoStatus$inboundSchema;
92
+
93
+ /**
94
+ * @internal
95
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
96
+ */
97
+ export namespace ActivityNotificationExecutionDetailResponseDtoStatus$ {
98
+ /** @deprecated use `ActivityNotificationExecutionDetailResponseDtoStatus$inboundSchema` instead. */
99
+ export const inboundSchema =
100
+ ActivityNotificationExecutionDetailResponseDtoStatus$inboundSchema;
101
+ /** @deprecated use `ActivityNotificationExecutionDetailResponseDtoStatus$outboundSchema` instead. */
102
+ export const outboundSchema =
103
+ ActivityNotificationExecutionDetailResponseDtoStatus$outboundSchema;
104
+ }
105
+
106
+ /** @internal */
107
+ export const Source$inboundSchema: z.ZodNativeEnum<typeof Source> = z
108
+ .nativeEnum(Source);
109
+
110
+ /** @internal */
111
+ export const Source$outboundSchema: z.ZodNativeEnum<typeof Source> =
112
+ Source$inboundSchema;
113
+
114
+ /**
115
+ * @internal
116
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
117
+ */
118
+ export namespace Source$ {
119
+ /** @deprecated use `Source$inboundSchema` instead. */
120
+ export const inboundSchema = Source$inboundSchema;
121
+ /** @deprecated use `Source$outboundSchema` instead. */
122
+ export const outboundSchema = Source$outboundSchema;
123
+ }
124
+
125
+ /** @internal */
126
+ export const ActivityNotificationExecutionDetailResponseDto$inboundSchema:
127
+ z.ZodType<
128
+ ActivityNotificationExecutionDetailResponseDto,
129
+ z.ZodTypeDef,
130
+ unknown
131
+ > = z.object({
132
+ _id: z.string(),
133
+ _jobId: z.string(),
134
+ status: ActivityNotificationExecutionDetailResponseDtoStatus$inboundSchema,
135
+ detail: z.string(),
136
+ isRetry: z.boolean(),
137
+ isTest: z.boolean(),
138
+ providerId: z.number(),
139
+ raw: z.string().optional(),
140
+ source: Source$inboundSchema,
141
+ }).transform((v) => {
142
+ return remap$(v, {
143
+ "_id": "id",
144
+ "_jobId": "jobId",
145
+ });
146
+ });
147
+
148
+ /** @internal */
149
+ export type ActivityNotificationExecutionDetailResponseDto$Outbound = {
150
+ _id: string;
151
+ _jobId: string;
152
+ status: string;
153
+ detail: string;
154
+ isRetry: boolean;
155
+ isTest: boolean;
156
+ providerId: number;
157
+ raw?: string | undefined;
158
+ source: string;
159
+ };
160
+
161
+ /** @internal */
162
+ export const ActivityNotificationExecutionDetailResponseDto$outboundSchema:
163
+ z.ZodType<
164
+ ActivityNotificationExecutionDetailResponseDto$Outbound,
165
+ z.ZodTypeDef,
166
+ ActivityNotificationExecutionDetailResponseDto
167
+ > = z.object({
168
+ id: z.string(),
169
+ jobId: z.string(),
170
+ status: ActivityNotificationExecutionDetailResponseDtoStatus$outboundSchema,
171
+ detail: z.string(),
172
+ isRetry: z.boolean(),
173
+ isTest: z.boolean(),
174
+ providerId: z.number(),
175
+ raw: z.string().optional(),
176
+ source: Source$outboundSchema,
177
+ }).transform((v) => {
178
+ return remap$(v, {
179
+ id: "_id",
180
+ jobId: "_jobId",
181
+ });
182
+ });
183
+
184
+ /**
185
+ * @internal
186
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
187
+ */
188
+ export namespace ActivityNotificationExecutionDetailResponseDto$ {
189
+ /** @deprecated use `ActivityNotificationExecutionDetailResponseDto$inboundSchema` instead. */
190
+ export const inboundSchema =
191
+ ActivityNotificationExecutionDetailResponseDto$inboundSchema;
192
+ /** @deprecated use `ActivityNotificationExecutionDetailResponseDto$outboundSchema` instead. */
193
+ export const outboundSchema =
194
+ ActivityNotificationExecutionDetailResponseDto$outboundSchema;
195
+ /** @deprecated use `ActivityNotificationExecutionDetailResponseDto$Outbound` instead. */
196
+ export type Outbound =
197
+ ActivityNotificationExecutionDetailResponseDto$Outbound;
198
+ }
199
+
200
+ export function activityNotificationExecutionDetailResponseDtoToJSON(
201
+ activityNotificationExecutionDetailResponseDto:
202
+ ActivityNotificationExecutionDetailResponseDto,
203
+ ): string {
204
+ return JSON.stringify(
205
+ ActivityNotificationExecutionDetailResponseDto$outboundSchema.parse(
206
+ activityNotificationExecutionDetailResponseDto,
207
+ ),
208
+ );
209
+ }
210
+
211
+ export function activityNotificationExecutionDetailResponseDtoFromJSON(
212
+ jsonString: string,
213
+ ): SafeParseResult<
214
+ ActivityNotificationExecutionDetailResponseDto,
215
+ SDKValidationError
216
+ > {
217
+ return safeParse(
218
+ jsonString,
219
+ (x) =>
220
+ ActivityNotificationExecutionDetailResponseDto$inboundSchema.parse(
221
+ JSON.parse(x),
222
+ ),
223
+ `Failed to parse 'ActivityNotificationExecutionDetailResponseDto' from JSON`,
224
+ );
225
+ }
@@ -0,0 +1,241 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ ActivityNotificationExecutionDetailResponseDto,
12
+ ActivityNotificationExecutionDetailResponseDto$inboundSchema,
13
+ ActivityNotificationExecutionDetailResponseDto$Outbound,
14
+ ActivityNotificationExecutionDetailResponseDto$outboundSchema,
15
+ } from "./activitynotificationexecutiondetailresponsedto.js";
16
+ import {
17
+ ActivityNotificationStepResponseDto,
18
+ ActivityNotificationStepResponseDto$inboundSchema,
19
+ ActivityNotificationStepResponseDto$Outbound,
20
+ ActivityNotificationStepResponseDto$outboundSchema,
21
+ } from "./activitynotificationstepresponsedto.js";
22
+
23
+ /**
24
+ * Optional digest for the job
25
+ */
26
+ export type Digest = {};
27
+
28
+ /**
29
+ * Optional payload for the job
30
+ */
31
+ export type Payload = {};
32
+
33
+ export type ActivityNotificationJobResponseDto = {
34
+ /**
35
+ * Unique identifier of the job
36
+ */
37
+ id: string;
38
+ /**
39
+ * Type of the job
40
+ */
41
+ type: string;
42
+ /**
43
+ * Optional digest for the job
44
+ */
45
+ digest?: Digest | undefined;
46
+ /**
47
+ * Execution details of the job
48
+ */
49
+ executionDetails: Array<ActivityNotificationExecutionDetailResponseDto>;
50
+ /**
51
+ * Step details of the job
52
+ */
53
+ step: ActivityNotificationStepResponseDto;
54
+ /**
55
+ * Optional payload for the job
56
+ */
57
+ payload?: Payload | undefined;
58
+ /**
59
+ * Provider ID of the job
60
+ */
61
+ providerId: number;
62
+ /**
63
+ * Status of the job
64
+ */
65
+ status: string;
66
+ };
67
+
68
+ /** @internal */
69
+ export const Digest$inboundSchema: z.ZodType<Digest, z.ZodTypeDef, unknown> = z
70
+ .object({});
71
+
72
+ /** @internal */
73
+ export type Digest$Outbound = {};
74
+
75
+ /** @internal */
76
+ export const Digest$outboundSchema: z.ZodType<
77
+ Digest$Outbound,
78
+ z.ZodTypeDef,
79
+ Digest
80
+ > = z.object({});
81
+
82
+ /**
83
+ * @internal
84
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
85
+ */
86
+ export namespace Digest$ {
87
+ /** @deprecated use `Digest$inboundSchema` instead. */
88
+ export const inboundSchema = Digest$inboundSchema;
89
+ /** @deprecated use `Digest$outboundSchema` instead. */
90
+ export const outboundSchema = Digest$outboundSchema;
91
+ /** @deprecated use `Digest$Outbound` instead. */
92
+ export type Outbound = Digest$Outbound;
93
+ }
94
+
95
+ export function digestToJSON(digest: Digest): string {
96
+ return JSON.stringify(Digest$outboundSchema.parse(digest));
97
+ }
98
+
99
+ export function digestFromJSON(
100
+ jsonString: string,
101
+ ): SafeParseResult<Digest, SDKValidationError> {
102
+ return safeParse(
103
+ jsonString,
104
+ (x) => Digest$inboundSchema.parse(JSON.parse(x)),
105
+ `Failed to parse 'Digest' from JSON`,
106
+ );
107
+ }
108
+
109
+ /** @internal */
110
+ export const Payload$inboundSchema: z.ZodType<Payload, z.ZodTypeDef, unknown> =
111
+ z.object({});
112
+
113
+ /** @internal */
114
+ export type Payload$Outbound = {};
115
+
116
+ /** @internal */
117
+ export const Payload$outboundSchema: z.ZodType<
118
+ Payload$Outbound,
119
+ z.ZodTypeDef,
120
+ Payload
121
+ > = z.object({});
122
+
123
+ /**
124
+ * @internal
125
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
126
+ */
127
+ export namespace Payload$ {
128
+ /** @deprecated use `Payload$inboundSchema` instead. */
129
+ export const inboundSchema = Payload$inboundSchema;
130
+ /** @deprecated use `Payload$outboundSchema` instead. */
131
+ export const outboundSchema = Payload$outboundSchema;
132
+ /** @deprecated use `Payload$Outbound` instead. */
133
+ export type Outbound = Payload$Outbound;
134
+ }
135
+
136
+ export function payloadToJSON(payload: Payload): string {
137
+ return JSON.stringify(Payload$outboundSchema.parse(payload));
138
+ }
139
+
140
+ export function payloadFromJSON(
141
+ jsonString: string,
142
+ ): SafeParseResult<Payload, SDKValidationError> {
143
+ return safeParse(
144
+ jsonString,
145
+ (x) => Payload$inboundSchema.parse(JSON.parse(x)),
146
+ `Failed to parse 'Payload' from JSON`,
147
+ );
148
+ }
149
+
150
+ /** @internal */
151
+ export const ActivityNotificationJobResponseDto$inboundSchema: z.ZodType<
152
+ ActivityNotificationJobResponseDto,
153
+ z.ZodTypeDef,
154
+ unknown
155
+ > = z.object({
156
+ _id: z.string(),
157
+ type: z.string(),
158
+ digest: z.lazy(() => Digest$inboundSchema).optional(),
159
+ executionDetails: z.array(
160
+ ActivityNotificationExecutionDetailResponseDto$inboundSchema,
161
+ ),
162
+ step: ActivityNotificationStepResponseDto$inboundSchema,
163
+ payload: z.lazy(() => Payload$inboundSchema).optional(),
164
+ providerId: z.number(),
165
+ status: z.string(),
166
+ }).transform((v) => {
167
+ return remap$(v, {
168
+ "_id": "id",
169
+ });
170
+ });
171
+
172
+ /** @internal */
173
+ export type ActivityNotificationJobResponseDto$Outbound = {
174
+ _id: string;
175
+ type: string;
176
+ digest?: Digest$Outbound | undefined;
177
+ executionDetails: Array<
178
+ ActivityNotificationExecutionDetailResponseDto$Outbound
179
+ >;
180
+ step: ActivityNotificationStepResponseDto$Outbound;
181
+ payload?: Payload$Outbound | undefined;
182
+ providerId: number;
183
+ status: string;
184
+ };
185
+
186
+ /** @internal */
187
+ export const ActivityNotificationJobResponseDto$outboundSchema: z.ZodType<
188
+ ActivityNotificationJobResponseDto$Outbound,
189
+ z.ZodTypeDef,
190
+ ActivityNotificationJobResponseDto
191
+ > = z.object({
192
+ id: z.string(),
193
+ type: z.string(),
194
+ digest: z.lazy(() => Digest$outboundSchema).optional(),
195
+ executionDetails: z.array(
196
+ ActivityNotificationExecutionDetailResponseDto$outboundSchema,
197
+ ),
198
+ step: ActivityNotificationStepResponseDto$outboundSchema,
199
+ payload: z.lazy(() => Payload$outboundSchema).optional(),
200
+ providerId: z.number(),
201
+ status: z.string(),
202
+ }).transform((v) => {
203
+ return remap$(v, {
204
+ id: "_id",
205
+ });
206
+ });
207
+
208
+ /**
209
+ * @internal
210
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
211
+ */
212
+ export namespace ActivityNotificationJobResponseDto$ {
213
+ /** @deprecated use `ActivityNotificationJobResponseDto$inboundSchema` instead. */
214
+ export const inboundSchema = ActivityNotificationJobResponseDto$inboundSchema;
215
+ /** @deprecated use `ActivityNotificationJobResponseDto$outboundSchema` instead. */
216
+ export const outboundSchema =
217
+ ActivityNotificationJobResponseDto$outboundSchema;
218
+ /** @deprecated use `ActivityNotificationJobResponseDto$Outbound` instead. */
219
+ export type Outbound = ActivityNotificationJobResponseDto$Outbound;
220
+ }
221
+
222
+ export function activityNotificationJobResponseDtoToJSON(
223
+ activityNotificationJobResponseDto: ActivityNotificationJobResponseDto,
224
+ ): string {
225
+ return JSON.stringify(
226
+ ActivityNotificationJobResponseDto$outboundSchema.parse(
227
+ activityNotificationJobResponseDto,
228
+ ),
229
+ );
230
+ }
231
+
232
+ export function activityNotificationJobResponseDtoFromJSON(
233
+ jsonString: string,
234
+ ): SafeParseResult<ActivityNotificationJobResponseDto, SDKValidationError> {
235
+ return safeParse(
236
+ jsonString,
237
+ (x) =>
238
+ ActivityNotificationJobResponseDto$inboundSchema.parse(JSON.parse(x)),
239
+ `Failed to parse 'ActivityNotificationJobResponseDto' from JSON`,
240
+ );
241
+ }
@@ -8,6 +8,12 @@ import { safeParse } from "../../lib/schemas.js";
8
8
  import { ClosedEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import {
12
+ ActivityNotificationJobResponseDto,
13
+ ActivityNotificationJobResponseDto$inboundSchema,
14
+ ActivityNotificationJobResponseDto$Outbound,
15
+ ActivityNotificationJobResponseDto$outboundSchema,
16
+ } from "./activitynotificationjobresponsedto.js";
11
17
  import {
12
18
  ActivityNotificationSubscriberResponseDto,
13
19
  ActivityNotificationSubscriberResponseDto$inboundSchema,
@@ -21,6 +27,9 @@ import {
21
27
  ActivityNotificationTemplateResponseDto$outboundSchema,
22
28
  } from "./activitynotificationtemplateresponsedto.js";
23
29
 
30
+ /**
31
+ * Channels of the notification
32
+ */
24
33
  export const Channels = {
25
34
  InApp: "in_app",
26
35
  Email: "email",
@@ -32,18 +41,48 @@ export const Channels = {
32
41
  Delay: "delay",
33
42
  Custom: "custom",
34
43
  } as const;
44
+ /**
45
+ * Channels of the notification
46
+ */
35
47
  export type Channels = ClosedEnum<typeof Channels>;
36
48
 
37
49
  export type ActivityNotificationResponseDto = {
50
+ /**
51
+ * Unique identifier of the notification
52
+ */
38
53
  id?: string | undefined;
54
+ /**
55
+ * Environment ID of the notification
56
+ */
39
57
  environmentId: string;
58
+ /**
59
+ * Organization ID of the notification
60
+ */
40
61
  organizationId: string;
62
+ /**
63
+ * Transaction ID of the notification
64
+ */
41
65
  transactionId: string;
66
+ /**
67
+ * Creation time of the notification
68
+ */
42
69
  createdAt?: string | undefined;
70
+ /**
71
+ * Channels of the notification
72
+ */
43
73
  channels?: Channels | undefined;
74
+ /**
75
+ * Subscriber of the notification
76
+ */
44
77
  subscriber?: ActivityNotificationSubscriberResponseDto | undefined;
78
+ /**
79
+ * Template of the notification
80
+ */
45
81
  template?: ActivityNotificationTemplateResponseDto | undefined;
46
- jobs?: Array<string> | undefined;
82
+ /**
83
+ * Jobs of the notification
84
+ */
85
+ jobs?: Array<ActivityNotificationJobResponseDto> | undefined;
47
86
  };
48
87
 
49
88
  /** @internal */
@@ -80,7 +119,7 @@ export const ActivityNotificationResponseDto$inboundSchema: z.ZodType<
80
119
  subscriber: ActivityNotificationSubscriberResponseDto$inboundSchema
81
120
  .optional(),
82
121
  template: ActivityNotificationTemplateResponseDto$inboundSchema.optional(),
83
- jobs: z.array(z.string()).optional(),
122
+ jobs: z.array(ActivityNotificationJobResponseDto$inboundSchema).optional(),
84
123
  }).transform((v) => {
85
124
  return remap$(v, {
86
125
  "_id": "id",
@@ -99,7 +138,7 @@ export type ActivityNotificationResponseDto$Outbound = {
99
138
  channels?: string | undefined;
100
139
  subscriber?: ActivityNotificationSubscriberResponseDto$Outbound | undefined;
101
140
  template?: ActivityNotificationTemplateResponseDto$Outbound | undefined;
102
- jobs?: Array<string> | undefined;
141
+ jobs?: Array<ActivityNotificationJobResponseDto$Outbound> | undefined;
103
142
  };
104
143
 
105
144
  /** @internal */
@@ -117,7 +156,7 @@ export const ActivityNotificationResponseDto$outboundSchema: z.ZodType<
117
156
  subscriber: ActivityNotificationSubscriberResponseDto$outboundSchema
118
157
  .optional(),
119
158
  template: ActivityNotificationTemplateResponseDto$outboundSchema.optional(),
120
- jobs: z.array(z.string()).optional(),
159
+ jobs: z.array(ActivityNotificationJobResponseDto$outboundSchema).optional(),
121
160
  }).transform((v) => {
122
161
  return remap$(v, {
123
162
  id: "_id",