@novu/api 0.0.1-alpha.77 → 0.0.1-alpha.79

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 (57) hide show
  1. package/lib/config.d.ts +3 -3
  2. package/lib/config.js +3 -3
  3. package/lib/config.js.map +1 -1
  4. package/models/components/actorfeeditemdto.d.ts +38 -0
  5. package/models/components/actorfeeditemdto.d.ts.map +1 -0
  6. package/models/components/actorfeeditemdto.js +62 -0
  7. package/models/components/actorfeeditemdto.js.map +1 -0
  8. package/models/components/channelsettings.d.ts +1 -1
  9. package/models/components/channeltypeenum.d.ts +6 -0
  10. package/models/components/channeltypeenum.d.ts.map +1 -1
  11. package/models/components/channeltypeenum.js +3 -0
  12. package/models/components/channeltypeenum.js.map +1 -1
  13. package/models/components/feedresponsedto.d.ts +3 -3
  14. package/models/components/feedresponsedto.d.ts.map +1 -1
  15. package/models/components/feedresponsedto.js +3 -3
  16. package/models/components/feedresponsedto.js.map +1 -1
  17. package/models/components/index.d.ts +3 -2
  18. package/models/components/index.d.ts.map +1 -1
  19. package/models/components/index.js +3 -2
  20. package/models/components/index.js.map +1 -1
  21. package/models/components/{notificationdto.d.ts → notificationfeeditemdto.d.ts} +30 -69
  22. package/models/components/notificationfeeditemdto.d.ts.map +1 -0
  23. package/models/components/{notificationdto.js → notificationfeeditemdto.js} +38 -62
  24. package/models/components/notificationfeeditemdto.js.map +1 -0
  25. package/models/components/subscriberfeedresponsedto.d.ts +52 -0
  26. package/models/components/subscriberfeedresponsedto.d.ts.map +1 -0
  27. package/models/components/subscriberfeedresponsedto.js +76 -0
  28. package/models/components/subscriberfeedresponsedto.js.map +1 -0
  29. package/models/components/subscriberresponsedto.d.ts +46 -4
  30. package/models/components/subscriberresponsedto.d.ts.map +1 -1
  31. package/models/components/subscriberresponsedto.js.map +1 -1
  32. package/models/components/triggereventrequestdto.d.ts +13 -13
  33. package/models/components/triggereventrequestdto.d.ts.map +1 -1
  34. package/models/components/triggereventrequestdto.js +17 -16
  35. package/models/components/triggereventrequestdto.js.map +1 -1
  36. package/models/operations/messagescontrollergetmessages.d.ts +3 -0
  37. package/models/operations/messagescontrollergetmessages.d.ts.map +1 -1
  38. package/models/operations/messagescontrollergetmessages.js.map +1 -1
  39. package/package.json +1 -1
  40. package/src/lib/config.ts +3 -3
  41. package/src/models/components/actorfeeditemdto.ts +81 -0
  42. package/src/models/components/channelsettings.ts +1 -1
  43. package/src/models/components/channeltypeenum.ts +6 -0
  44. package/src/models/components/feedresponsedto.ts +9 -9
  45. package/src/models/components/index.ts +3 -2
  46. package/src/models/components/{notificationdto.ts → notificationfeeditemdto.ts} +67 -94
  47. package/src/models/components/subscriberfeedresponsedto.ts +106 -0
  48. package/src/models/components/subscriberresponsedto.ts +46 -4
  49. package/src/models/components/triggereventrequestdto.ts +20 -31
  50. package/src/models/operations/messagescontrollergetmessages.ts +3 -0
  51. package/models/components/actor.d.ts +0 -62
  52. package/models/components/actor.d.ts.map +0 -1
  53. package/models/components/actor.js +0 -86
  54. package/models/components/actor.js.map +0 -1
  55. package/models/components/notificationdto.d.ts.map +0 -1
  56. package/models/components/notificationdto.js.map +0 -1
  57. package/src/models/components/actor.ts +0 -123
@@ -1 +1 @@
1
- {"version":3,"file":"messagescontrollergetmessages.js","sourceRoot":"","sources":["../../src/models/operations/messagescontrollergetmessages.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAEjD,mEAAqD;AAgBrD,gBAAgB;AACH,QAAA,kDAAkD,GAI3D,CAAC,CAAC,MAAM,CAAC;IACX,OAAO,EAAE,UAAU,CAAC,6BAA6B,CAAC,QAAQ,EAAE;IAC5D,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QA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AC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC1E,mEAAmE,CACpE,CAAC;AACJ,CAAC;AATD,sGASC"}
1
+ {"version":3,"file":"messagescontrollergetmessages.js","sourceRoot":"","sources":["../../src/models/operations/messagescontrollergetmessages.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAEjD,mEAAqD;AAmBrD,gBAAgB;AACH,QAAA,kDAAkD,GAI3D,CAAC,CAAC,MAAM,CAAC;IACX,OAAO,EAAE,UAAU,CAAC,6BAA6B,CAAC,QAAQ,EAAE;IAC5D,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC7C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;CAC9B,CAAC,CAAC;AAWH,gBAAgB;AACH,QAAA,mDAAmD,GAI5D,CAAC,CAAC,MAAM,CAAC;IACX,OAAO,EAAE,UAAU,CAAC,8BAA8B,CAAC,QAAQ,EAAE;IAC7D,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC7C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;CAC9B,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,qCAAqC,CASrD;AATD,WAAiB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AAE,SAAS;QAClB,MAAM,EAAE,QAAQ;KACjB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,sCAAsC,CAStD;AATD,WAAiB,sCAAsC;IACrD,qFAAqF;IACxE,oDAAa,GACxB,2DAAmD,CAAC;IACtD,sFAAsF;IACzE,qDAAc,GACzB,4DAAoD,CAAC;AAGzD,CAAC,EATgB,sCAAsC,sDAAtC,sCAAsC,QAStD;AAED,SAAgB,2CAA2C,CACzD,qCAA4E;IAE5E,OAAO,IAAI,CAAC,SAAS,CACnB,4DAAoD,CAAC,KAAK,CACxD,qCAAqC,CACtC,CACF,CAAC;AACJ,CAAC;AARD,kGAQC;AAED,SAAgB,6CAA6C,CAC3D,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CACJ,2DAAmD,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC1E,mEAAmE,CACpE,CAAC;AACJ,CAAC;AATD,sGASC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@novu/api",
3
- "version": "0.0.1-alpha.77",
3
+ "version": "0.0.1-alpha.79",
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.77",
59
- genVersion: "2.474.6",
60
- userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.77 2.474.6 1.0 @novu/api",
58
+ sdkVersion: "0.0.1-alpha.79",
59
+ genVersion: "2.474.15",
60
+ userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.79 2.474.15 1.0 @novu/api",
61
61
  } as const;
@@ -0,0 +1,81 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ ActorTypeEnum,
11
+ ActorTypeEnum$inboundSchema,
12
+ ActorTypeEnum$outboundSchema,
13
+ } from "./actortypeenum.js";
14
+
15
+ export type ActorFeedItemDto = {
16
+ /**
17
+ * The data associated with the actor, can be null if not applicable.
18
+ */
19
+ data: string | null;
20
+ /**
21
+ * The type of the actor, indicating the role in the notification process.
22
+ */
23
+ type: ActorTypeEnum;
24
+ };
25
+
26
+ /** @internal */
27
+ export const ActorFeedItemDto$inboundSchema: z.ZodType<
28
+ ActorFeedItemDto,
29
+ z.ZodTypeDef,
30
+ unknown
31
+ > = z.object({
32
+ data: z.nullable(z.string()),
33
+ type: ActorTypeEnum$inboundSchema,
34
+ });
35
+
36
+ /** @internal */
37
+ export type ActorFeedItemDto$Outbound = {
38
+ data: string | null;
39
+ type: string;
40
+ };
41
+
42
+ /** @internal */
43
+ export const ActorFeedItemDto$outboundSchema: z.ZodType<
44
+ ActorFeedItemDto$Outbound,
45
+ z.ZodTypeDef,
46
+ ActorFeedItemDto
47
+ > = z.object({
48
+ data: z.nullable(z.string()),
49
+ type: ActorTypeEnum$outboundSchema,
50
+ });
51
+
52
+ /**
53
+ * @internal
54
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
55
+ */
56
+ export namespace ActorFeedItemDto$ {
57
+ /** @deprecated use `ActorFeedItemDto$inboundSchema` instead. */
58
+ export const inboundSchema = ActorFeedItemDto$inboundSchema;
59
+ /** @deprecated use `ActorFeedItemDto$outboundSchema` instead. */
60
+ export const outboundSchema = ActorFeedItemDto$outboundSchema;
61
+ /** @deprecated use `ActorFeedItemDto$Outbound` instead. */
62
+ export type Outbound = ActorFeedItemDto$Outbound;
63
+ }
64
+
65
+ export function actorFeedItemDtoToJSON(
66
+ actorFeedItemDto: ActorFeedItemDto,
67
+ ): string {
68
+ return JSON.stringify(
69
+ ActorFeedItemDto$outboundSchema.parse(actorFeedItemDto),
70
+ );
71
+ }
72
+
73
+ export function actorFeedItemDtoFromJSON(
74
+ jsonString: string,
75
+ ): SafeParseResult<ActorFeedItemDto, SDKValidationError> {
76
+ return safeParse(
77
+ jsonString,
78
+ (x) => ActorFeedItemDto$inboundSchema.parse(JSON.parse(x)),
79
+ `Failed to parse 'ActorFeedItemDto' from JSON`,
80
+ );
81
+ }
@@ -58,7 +58,7 @@ export type ChannelSettings = {
58
58
  */
59
59
  credentials: ChannelCredentials;
60
60
  /**
61
- * Id of the integration that is used for this channel
61
+ * The unique identifier of the integration associated with this channel.
62
62
  */
63
63
  integrationId: string;
64
64
  };
@@ -5,6 +5,9 @@
5
5
  import * as z from "zod";
6
6
  import { ClosedEnum } from "../../types/enums.js";
7
7
 
8
+ /**
9
+ * The channel through which the notification is sent.
10
+ */
8
11
  export const ChannelTypeEnum = {
9
12
  InApp: "in_app",
10
13
  Email: "email",
@@ -12,6 +15,9 @@ export const ChannelTypeEnum = {
12
15
  Chat: "chat",
13
16
  Push: "push",
14
17
  } as const;
18
+ /**
19
+ * The channel through which the notification is sent.
20
+ */
15
21
  export type ChannelTypeEnum = ClosedEnum<typeof ChannelTypeEnum>;
16
22
 
17
23
  /** @internal */
@@ -7,11 +7,11 @@ import { safeParse } from "../../lib/schemas.js";
7
7
  import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
9
  import {
10
- NotificationDto,
11
- NotificationDto$inboundSchema,
12
- NotificationDto$Outbound,
13
- NotificationDto$outboundSchema,
14
- } from "./notificationdto.js";
10
+ NotificationFeedItemDto,
11
+ NotificationFeedItemDto$inboundSchema,
12
+ NotificationFeedItemDto$Outbound,
13
+ NotificationFeedItemDto$outboundSchema,
14
+ } from "./notificationfeeditemdto.js";
15
15
 
16
16
  export type FeedResponseDto = {
17
17
  /**
@@ -25,7 +25,7 @@ export type FeedResponseDto = {
25
25
  /**
26
26
  * Array of notifications returned in the response.
27
27
  */
28
- data: Array<NotificationDto>;
28
+ data: Array<NotificationFeedItemDto>;
29
29
  /**
30
30
  * The number of notifications returned in this response.
31
31
  */
@@ -44,7 +44,7 @@ export const FeedResponseDto$inboundSchema: z.ZodType<
44
44
  > = z.object({
45
45
  totalCount: z.number().optional(),
46
46
  hasMore: z.boolean(),
47
- data: z.array(NotificationDto$inboundSchema),
47
+ data: z.array(NotificationFeedItemDto$inboundSchema),
48
48
  pageSize: z.number(),
49
49
  page: z.number(),
50
50
  });
@@ -53,7 +53,7 @@ export const FeedResponseDto$inboundSchema: z.ZodType<
53
53
  export type FeedResponseDto$Outbound = {
54
54
  totalCount?: number | undefined;
55
55
  hasMore: boolean;
56
- data: Array<NotificationDto$Outbound>;
56
+ data: Array<NotificationFeedItemDto$Outbound>;
57
57
  pageSize: number;
58
58
  page: number;
59
59
  };
@@ -66,7 +66,7 @@ export const FeedResponseDto$outboundSchema: z.ZodType<
66
66
  > = z.object({
67
67
  totalCount: z.number().optional(),
68
68
  hasMore: z.boolean(),
69
- data: z.array(NotificationDto$outboundSchema),
69
+ data: z.array(NotificationFeedItemDto$outboundSchema),
70
70
  pageSize: z.number(),
71
71
  page: z.number(),
72
72
  });
@@ -8,7 +8,7 @@ export * from "./activitynotificationresponsedto.js";
8
8
  export * from "./activitynotificationsubscriberresponsedto.js";
9
9
  export * from "./activitynotificationtemplateresponsedto.js";
10
10
  export * from "./activitystatsresponsedto.js";
11
- export * from "./actor.js";
11
+ export * from "./actorfeeditemdto.js";
12
12
  export * from "./actortypeenum.js";
13
13
  export * from "./addsubscribersrequestdto.js";
14
14
  export * from "./apikey.js";
@@ -56,7 +56,7 @@ export * from "./messageentity.js";
56
56
  export * from "./messagemarkasrequestdto.js";
57
57
  export * from "./messageresponsedto.js";
58
58
  export * from "./messagetemplate.js";
59
- export * from "./notificationdto.js";
59
+ export * from "./notificationfeeditemdto.js";
60
60
  export * from "./notificationgroup.js";
61
61
  export * from "./notificationgroupresponsedto.js";
62
62
  export * from "./notificationstep.js";
@@ -71,6 +71,7 @@ export * from "./renametopicresponsedto.js";
71
71
  export * from "./security.js";
72
72
  export * from "./stepfilter.js";
73
73
  export * from "./subscriberchanneldto.js";
74
+ export * from "./subscriberfeedresponsedto.js";
74
75
  export * from "./subscriberpayloaddto.js";
75
76
  export * from "./subscriberresponsedto.js";
76
77
  export * from "./templateresponse.js";
@@ -9,11 +9,16 @@ 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
11
  import {
12
- Actor,
13
- Actor$inboundSchema,
14
- Actor$Outbound,
15
- Actor$outboundSchema,
16
- } from "./actor.js";
12
+ ActorFeedItemDto,
13
+ ActorFeedItemDto$inboundSchema,
14
+ ActorFeedItemDto$Outbound,
15
+ ActorFeedItemDto$outboundSchema,
16
+ } from "./actorfeeditemdto.js";
17
+ import {
18
+ ChannelTypeEnum,
19
+ ChannelTypeEnum$inboundSchema,
20
+ ChannelTypeEnum$outboundSchema,
21
+ } from "./channeltypeenum.js";
17
22
  import {
18
23
  MessageCTA,
19
24
  MessageCTA$inboundSchema,
@@ -21,31 +26,16 @@ import {
21
26
  MessageCTA$outboundSchema,
22
27
  } from "./messagecta.js";
23
28
  import {
24
- SubscriberResponseDto,
25
- SubscriberResponseDto$inboundSchema,
26
- SubscriberResponseDto$Outbound,
27
- SubscriberResponseDto$outboundSchema,
28
- } from "./subscriberresponsedto.js";
29
-
30
- /**
31
- * The channel through which the notification is sent.
32
- */
33
- export const NotificationDtoChannel = {
34
- InApp: "in_app",
35
- Email: "email",
36
- Sms: "sms",
37
- Chat: "chat",
38
- Push: "push",
39
- } as const;
40
- /**
41
- * The channel through which the notification is sent.
42
- */
43
- export type NotificationDtoChannel = ClosedEnum<typeof NotificationDtoChannel>;
29
+ SubscriberFeedResponseDto,
30
+ SubscriberFeedResponseDto$inboundSchema,
31
+ SubscriberFeedResponseDto$Outbound,
32
+ SubscriberFeedResponseDto$outboundSchema,
33
+ } from "./subscriberfeedresponsedto.js";
44
34
 
45
35
  /**
46
36
  * Current status of the notification.
47
37
  */
48
- export const NotificationDtoStatus = {
38
+ export const NotificationFeedItemDtoStatus = {
49
39
  Sent: "sent",
50
40
  Error: "error",
51
41
  Warning: "warning",
@@ -53,9 +43,11 @@ export const NotificationDtoStatus = {
53
43
  /**
54
44
  * Current status of the notification.
55
45
  */
56
- export type NotificationDtoStatus = ClosedEnum<typeof NotificationDtoStatus>;
46
+ export type NotificationFeedItemDtoStatus = ClosedEnum<
47
+ typeof NotificationFeedItemDtoStatus
48
+ >;
57
49
 
58
- export type NotificationDto = {
50
+ export type NotificationFeedItemDto = {
59
51
  /**
60
52
  * Unique identifier for the notification.
61
53
  */
@@ -103,11 +95,11 @@ export type NotificationDto = {
103
95
  /**
104
96
  * Actor details related to the notification, if applicable.
105
97
  */
106
- actor?: Actor | undefined;
98
+ actor?: ActorFeedItemDto | undefined;
107
99
  /**
108
100
  * Subscriber details associated with this notification.
109
101
  */
110
- subscriber?: SubscriberResponseDto | undefined;
102
+ subscriber?: SubscriberFeedResponseDto | undefined;
111
103
  /**
112
104
  * Unique identifier for the transaction associated with the notification.
113
105
  */
@@ -131,7 +123,7 @@ export type NotificationDto = {
131
123
  /**
132
124
  * The channel through which the notification is sent.
133
125
  */
134
- channel: NotificationDtoChannel;
126
+ channel: ChannelTypeEnum;
135
127
  /**
136
128
  * Indicates whether the notification has been read by the subscriber.
137
129
  */
@@ -155,7 +147,7 @@ export type NotificationDto = {
155
147
  /**
156
148
  * Current status of the notification.
157
149
  */
158
- status: NotificationDtoStatus;
150
+ status: NotificationFeedItemDtoStatus;
159
151
  /**
160
152
  * The payload that was used to send the notification trigger.
161
153
  */
@@ -167,50 +159,29 @@ export type NotificationDto = {
167
159
  };
168
160
 
169
161
  /** @internal */
170
- export const NotificationDtoChannel$inboundSchema: z.ZodNativeEnum<
171
- typeof NotificationDtoChannel
172
- > = z.nativeEnum(NotificationDtoChannel);
173
-
174
- /** @internal */
175
- export const NotificationDtoChannel$outboundSchema: z.ZodNativeEnum<
176
- typeof NotificationDtoChannel
177
- > = NotificationDtoChannel$inboundSchema;
178
-
179
- /**
180
- * @internal
181
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
182
- */
183
- export namespace NotificationDtoChannel$ {
184
- /** @deprecated use `NotificationDtoChannel$inboundSchema` instead. */
185
- export const inboundSchema = NotificationDtoChannel$inboundSchema;
186
- /** @deprecated use `NotificationDtoChannel$outboundSchema` instead. */
187
- export const outboundSchema = NotificationDtoChannel$outboundSchema;
188
- }
189
-
190
- /** @internal */
191
- export const NotificationDtoStatus$inboundSchema: z.ZodNativeEnum<
192
- typeof NotificationDtoStatus
193
- > = z.nativeEnum(NotificationDtoStatus);
162
+ export const NotificationFeedItemDtoStatus$inboundSchema: z.ZodNativeEnum<
163
+ typeof NotificationFeedItemDtoStatus
164
+ > = z.nativeEnum(NotificationFeedItemDtoStatus);
194
165
 
195
166
  /** @internal */
196
- export const NotificationDtoStatus$outboundSchema: z.ZodNativeEnum<
197
- typeof NotificationDtoStatus
198
- > = NotificationDtoStatus$inboundSchema;
167
+ export const NotificationFeedItemDtoStatus$outboundSchema: z.ZodNativeEnum<
168
+ typeof NotificationFeedItemDtoStatus
169
+ > = NotificationFeedItemDtoStatus$inboundSchema;
199
170
 
200
171
  /**
201
172
  * @internal
202
173
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
203
174
  */
204
- export namespace NotificationDtoStatus$ {
205
- /** @deprecated use `NotificationDtoStatus$inboundSchema` instead. */
206
- export const inboundSchema = NotificationDtoStatus$inboundSchema;
207
- /** @deprecated use `NotificationDtoStatus$outboundSchema` instead. */
208
- export const outboundSchema = NotificationDtoStatus$outboundSchema;
175
+ export namespace NotificationFeedItemDtoStatus$ {
176
+ /** @deprecated use `NotificationFeedItemDtoStatus$inboundSchema` instead. */
177
+ export const inboundSchema = NotificationFeedItemDtoStatus$inboundSchema;
178
+ /** @deprecated use `NotificationFeedItemDtoStatus$outboundSchema` instead. */
179
+ export const outboundSchema = NotificationFeedItemDtoStatus$outboundSchema;
209
180
  }
210
181
 
211
182
  /** @internal */
212
- export const NotificationDto$inboundSchema: z.ZodType<
213
- NotificationDto,
183
+ export const NotificationFeedItemDto$inboundSchema: z.ZodType<
184
+ NotificationFeedItemDto,
214
185
  z.ZodTypeDef,
215
186
  unknown
216
187
  > = z.object({
@@ -229,20 +200,20 @@ export const NotificationDto$inboundSchema: z.ZodType<
229
200
  updatedAt: z.nullable(
230
201
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
231
202
  ).optional(),
232
- actor: Actor$inboundSchema.optional(),
233
- subscriber: SubscriberResponseDto$inboundSchema.optional(),
203
+ actor: ActorFeedItemDto$inboundSchema.optional(),
204
+ subscriber: SubscriberFeedResponseDto$inboundSchema.optional(),
234
205
  transactionId: z.string(),
235
206
  templateIdentifier: z.nullable(z.string()).optional(),
236
207
  providerId: z.nullable(z.string()).optional(),
237
208
  content: z.string(),
238
209
  subject: z.nullable(z.string()).optional(),
239
- channel: NotificationDtoChannel$inboundSchema,
210
+ channel: ChannelTypeEnum$inboundSchema,
240
211
  read: z.boolean(),
241
212
  seen: z.boolean(),
242
213
  deleted: z.boolean(),
243
214
  deviceTokens: z.nullable(z.array(z.string())).optional(),
244
215
  cta: MessageCTA$inboundSchema,
245
- status: NotificationDtoStatus$inboundSchema,
216
+ status: NotificationFeedItemDtoStatus$inboundSchema,
246
217
  payload: z.record(z.any()).optional(),
247
218
  overrides: z.record(z.any()).optional(),
248
219
  }).transform((v) => {
@@ -260,7 +231,7 @@ export const NotificationDto$inboundSchema: z.ZodType<
260
231
  });
261
232
 
262
233
  /** @internal */
263
- export type NotificationDto$Outbound = {
234
+ export type NotificationFeedItemDto$Outbound = {
264
235
  _id: string;
265
236
  _templateId: string;
266
237
  _environmentId: string;
@@ -272,8 +243,8 @@ export type NotificationDto$Outbound = {
272
243
  _jobId: string;
273
244
  createdAt?: string | null | undefined;
274
245
  updatedAt?: string | null | undefined;
275
- actor?: Actor$Outbound | undefined;
276
- subscriber?: SubscriberResponseDto$Outbound | undefined;
246
+ actor?: ActorFeedItemDto$Outbound | undefined;
247
+ subscriber?: SubscriberFeedResponseDto$Outbound | undefined;
277
248
  transactionId: string;
278
249
  templateIdentifier?: string | null | undefined;
279
250
  providerId?: string | null | undefined;
@@ -291,10 +262,10 @@ export type NotificationDto$Outbound = {
291
262
  };
292
263
 
293
264
  /** @internal */
294
- export const NotificationDto$outboundSchema: z.ZodType<
295
- NotificationDto$Outbound,
265
+ export const NotificationFeedItemDto$outboundSchema: z.ZodType<
266
+ NotificationFeedItemDto$Outbound,
296
267
  z.ZodTypeDef,
297
- NotificationDto
268
+ NotificationFeedItemDto
298
269
  > = z.object({
299
270
  id: z.string(),
300
271
  templateId: z.string(),
@@ -307,20 +278,20 @@ export const NotificationDto$outboundSchema: z.ZodType<
307
278
  jobId: z.string(),
308
279
  createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
309
280
  updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
310
- actor: Actor$outboundSchema.optional(),
311
- subscriber: SubscriberResponseDto$outboundSchema.optional(),
281
+ actor: ActorFeedItemDto$outboundSchema.optional(),
282
+ subscriber: SubscriberFeedResponseDto$outboundSchema.optional(),
312
283
  transactionId: z.string(),
313
284
  templateIdentifier: z.nullable(z.string()).optional(),
314
285
  providerId: z.nullable(z.string()).optional(),
315
286
  content: z.string(),
316
287
  subject: z.nullable(z.string()).optional(),
317
- channel: NotificationDtoChannel$outboundSchema,
288
+ channel: ChannelTypeEnum$outboundSchema,
318
289
  read: z.boolean(),
319
290
  seen: z.boolean(),
320
291
  deleted: z.boolean(),
321
292
  deviceTokens: z.nullable(z.array(z.string())).optional(),
322
293
  cta: MessageCTA$outboundSchema,
323
- status: NotificationDtoStatus$outboundSchema,
294
+ status: NotificationFeedItemDtoStatus$outboundSchema,
324
295
  payload: z.record(z.any()).optional(),
325
296
  overrides: z.record(z.any()).optional(),
326
297
  }).transform((v) => {
@@ -341,27 +312,29 @@ export const NotificationDto$outboundSchema: z.ZodType<
341
312
  * @internal
342
313
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
343
314
  */
344
- export namespace NotificationDto$ {
345
- /** @deprecated use `NotificationDto$inboundSchema` instead. */
346
- export const inboundSchema = NotificationDto$inboundSchema;
347
- /** @deprecated use `NotificationDto$outboundSchema` instead. */
348
- export const outboundSchema = NotificationDto$outboundSchema;
349
- /** @deprecated use `NotificationDto$Outbound` instead. */
350
- export type Outbound = NotificationDto$Outbound;
315
+ export namespace NotificationFeedItemDto$ {
316
+ /** @deprecated use `NotificationFeedItemDto$inboundSchema` instead. */
317
+ export const inboundSchema = NotificationFeedItemDto$inboundSchema;
318
+ /** @deprecated use `NotificationFeedItemDto$outboundSchema` instead. */
319
+ export const outboundSchema = NotificationFeedItemDto$outboundSchema;
320
+ /** @deprecated use `NotificationFeedItemDto$Outbound` instead. */
321
+ export type Outbound = NotificationFeedItemDto$Outbound;
351
322
  }
352
323
 
353
- export function notificationDtoToJSON(
354
- notificationDto: NotificationDto,
324
+ export function notificationFeedItemDtoToJSON(
325
+ notificationFeedItemDto: NotificationFeedItemDto,
355
326
  ): string {
356
- return JSON.stringify(NotificationDto$outboundSchema.parse(notificationDto));
327
+ return JSON.stringify(
328
+ NotificationFeedItemDto$outboundSchema.parse(notificationFeedItemDto),
329
+ );
357
330
  }
358
331
 
359
- export function notificationDtoFromJSON(
332
+ export function notificationFeedItemDtoFromJSON(
360
333
  jsonString: string,
361
- ): SafeParseResult<NotificationDto, SDKValidationError> {
334
+ ): SafeParseResult<NotificationFeedItemDto, SDKValidationError> {
362
335
  return safeParse(
363
336
  jsonString,
364
- (x) => NotificationDto$inboundSchema.parse(JSON.parse(x)),
365
- `Failed to parse 'NotificationDto' from JSON`,
337
+ (x) => NotificationFeedItemDto$inboundSchema.parse(JSON.parse(x)),
338
+ `Failed to parse 'NotificationFeedItemDto' from JSON`,
366
339
  );
367
340
  }
@@ -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 { 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
+
11
+ export type SubscriberFeedResponseDto = {
12
+ /**
13
+ * The internal ID generated by Novu for your subscriber. This ID does not match the `subscriberId` used in your queries. Refer to `subscriberId` for that identifier.
14
+ */
15
+ id?: string | undefined;
16
+ /**
17
+ * The first name of the subscriber.
18
+ */
19
+ firstName?: string | undefined;
20
+ /**
21
+ * The last name of the subscriber.
22
+ */
23
+ lastName?: string | undefined;
24
+ /**
25
+ * The URL of the subscriber's avatar image.
26
+ */
27
+ avatar?: string | undefined;
28
+ /**
29
+ * The identifier used to create this subscriber, which typically corresponds to the user ID in your system.
30
+ */
31
+ subscriberId: string;
32
+ };
33
+
34
+ /** @internal */
35
+ export const SubscriberFeedResponseDto$inboundSchema: z.ZodType<
36
+ SubscriberFeedResponseDto,
37
+ z.ZodTypeDef,
38
+ unknown
39
+ > = z.object({
40
+ _id: z.string().optional(),
41
+ firstName: z.string().optional(),
42
+ lastName: z.string().optional(),
43
+ avatar: z.string().optional(),
44
+ subscriberId: z.string(),
45
+ }).transform((v) => {
46
+ return remap$(v, {
47
+ "_id": "id",
48
+ });
49
+ });
50
+
51
+ /** @internal */
52
+ export type SubscriberFeedResponseDto$Outbound = {
53
+ _id?: string | undefined;
54
+ firstName?: string | undefined;
55
+ lastName?: string | undefined;
56
+ avatar?: string | undefined;
57
+ subscriberId: string;
58
+ };
59
+
60
+ /** @internal */
61
+ export const SubscriberFeedResponseDto$outboundSchema: z.ZodType<
62
+ SubscriberFeedResponseDto$Outbound,
63
+ z.ZodTypeDef,
64
+ SubscriberFeedResponseDto
65
+ > = z.object({
66
+ id: z.string().optional(),
67
+ firstName: z.string().optional(),
68
+ lastName: z.string().optional(),
69
+ avatar: z.string().optional(),
70
+ subscriberId: z.string(),
71
+ }).transform((v) => {
72
+ return remap$(v, {
73
+ id: "_id",
74
+ });
75
+ });
76
+
77
+ /**
78
+ * @internal
79
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
80
+ */
81
+ export namespace SubscriberFeedResponseDto$ {
82
+ /** @deprecated use `SubscriberFeedResponseDto$inboundSchema` instead. */
83
+ export const inboundSchema = SubscriberFeedResponseDto$inboundSchema;
84
+ /** @deprecated use `SubscriberFeedResponseDto$outboundSchema` instead. */
85
+ export const outboundSchema = SubscriberFeedResponseDto$outboundSchema;
86
+ /** @deprecated use `SubscriberFeedResponseDto$Outbound` instead. */
87
+ export type Outbound = SubscriberFeedResponseDto$Outbound;
88
+ }
89
+
90
+ export function subscriberFeedResponseDtoToJSON(
91
+ subscriberFeedResponseDto: SubscriberFeedResponseDto,
92
+ ): string {
93
+ return JSON.stringify(
94
+ SubscriberFeedResponseDto$outboundSchema.parse(subscriberFeedResponseDto),
95
+ );
96
+ }
97
+
98
+ export function subscriberFeedResponseDtoFromJSON(
99
+ jsonString: string,
100
+ ): SafeParseResult<SubscriberFeedResponseDto, SDKValidationError> {
101
+ return safeParse(
102
+ jsonString,
103
+ (x) => SubscriberFeedResponseDto$inboundSchema.parse(JSON.parse(x)),
104
+ `Failed to parse 'SubscriberFeedResponseDto' from JSON`,
105
+ );
106
+ }