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

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 (60) 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 +62 -0
  5. package/models/components/actorfeeditemdto.d.ts.map +1 -0
  6. package/models/components/actorfeeditemdto.js +85 -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/notificationfeeditemdto.d.ts +281 -0
  22. package/models/components/notificationfeeditemdto.d.ts.map +1 -0
  23. package/models/components/notificationfeeditemdto.js +233 -0
  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 +134 -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/notificationfeeditemdto.ts +502 -0
  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 +0 -248
  56. package/models/components/notificationdto.d.ts.map +0 -1
  57. package/models/components/notificationdto.js +0 -187
  58. package/models/components/notificationdto.js.map +0 -1
  59. package/src/models/components/actor.ts +0 -123
  60. package/src/models/components/notificationdto.ts +0 -367
@@ -16,34 +16,76 @@ import {
16
16
 
17
17
  export type SubscriberResponseDto = {
18
18
  /**
19
- * The internal id novu generated for your subscriber, this is not the subscriberId matching your query. See `subscriberId` for that
19
+ * 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.
20
20
  */
21
21
  id?: string | undefined;
22
+ /**
23
+ * The first name of the subscriber.
24
+ */
22
25
  firstName?: string | undefined;
26
+ /**
27
+ * The last name of the subscriber.
28
+ */
23
29
  lastName?: string | undefined;
30
+ /**
31
+ * The email address of the subscriber.
32
+ */
24
33
  email?: string | undefined;
34
+ /**
35
+ * The phone number of the subscriber.
36
+ */
25
37
  phone?: string | undefined;
38
+ /**
39
+ * The URL of the subscriber's avatar image.
40
+ */
26
41
  avatar?: string | undefined;
42
+ /**
43
+ * The locale setting of the subscriber, indicating their preferred language or region.
44
+ */
27
45
  locale?: string | undefined;
28
46
  /**
29
- * The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems
47
+ * The identifier used to create this subscriber, which typically corresponds to the user ID in your system.
30
48
  */
31
49
  subscriberId: string;
32
50
  /**
33
- * Channels settings for subscriber
51
+ * An array of channel settings associated with the subscriber.
34
52
  */
35
53
  channels?: Array<ChannelSettings> | undefined;
36
54
  /**
37
- * Topics that subscriber belongs to
55
+ * An array of topics that the subscriber is subscribed to.
38
56
  */
39
57
  topics?: Array<string> | undefined;
58
+ /**
59
+ * Indicates whether the subscriber is currently online.
60
+ */
40
61
  isOnline?: boolean | undefined;
62
+ /**
63
+ * The timestamp indicating when the subscriber was last online, in ISO 8601 format.
64
+ */
41
65
  lastOnlineAt?: string | undefined;
66
+ /**
67
+ * The unique identifier of the organization to which the subscriber belongs.
68
+ */
42
69
  organizationId: string;
70
+ /**
71
+ * The unique identifier of the environment associated with this subscriber.
72
+ */
43
73
  environmentId: string;
74
+ /**
75
+ * Indicates whether the subscriber has been deleted.
76
+ */
44
77
  deleted: boolean;
78
+ /**
79
+ * The timestamp indicating when the subscriber was created, in ISO 8601 format.
80
+ */
45
81
  createdAt: string;
82
+ /**
83
+ * The timestamp indicating when the subscriber was last updated, in ISO 8601 format.
84
+ */
46
85
  updatedAt: string;
86
+ /**
87
+ * The version of the subscriber document.
88
+ */
47
89
  v?: number | undefined;
48
90
  };
49
91
 
@@ -40,7 +40,7 @@ export type To = TopicPayloadDto | SubscriberPayloadDto | string;
40
40
  *
41
41
  * If a new actor object is provided, we will create a new subscriber in our system
42
42
  */
43
- export type TriggerEventRequestDtoActor = SubscriberPayloadDto | string;
43
+ export type Actor = SubscriberPayloadDto | string;
44
44
 
45
45
  /**
46
46
  * It is used to specify a tenant context during trigger event.
@@ -149,54 +149,43 @@ export function toFromJSON(
149
149
  }
150
150
 
151
151
  /** @internal */
152
- export const TriggerEventRequestDtoActor$inboundSchema: z.ZodType<
153
- TriggerEventRequestDtoActor,
154
- z.ZodTypeDef,
155
- unknown
156
- > = z.union([SubscriberPayloadDto$inboundSchema, z.string()]);
152
+ export const Actor$inboundSchema: z.ZodType<Actor, z.ZodTypeDef, unknown> = z
153
+ .union([SubscriberPayloadDto$inboundSchema, z.string()]);
157
154
 
158
155
  /** @internal */
159
- export type TriggerEventRequestDtoActor$Outbound =
160
- | SubscriberPayloadDto$Outbound
161
- | string;
156
+ export type Actor$Outbound = SubscriberPayloadDto$Outbound | string;
162
157
 
163
158
  /** @internal */
164
- export const TriggerEventRequestDtoActor$outboundSchema: z.ZodType<
165
- TriggerEventRequestDtoActor$Outbound,
159
+ export const Actor$outboundSchema: z.ZodType<
160
+ Actor$Outbound,
166
161
  z.ZodTypeDef,
167
- TriggerEventRequestDtoActor
162
+ Actor
168
163
  > = z.union([SubscriberPayloadDto$outboundSchema, z.string()]);
169
164
 
170
165
  /**
171
166
  * @internal
172
167
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
173
168
  */
174
- export namespace TriggerEventRequestDtoActor$ {
175
- /** @deprecated use `TriggerEventRequestDtoActor$inboundSchema` instead. */
176
- export const inboundSchema = TriggerEventRequestDtoActor$inboundSchema;
177
- /** @deprecated use `TriggerEventRequestDtoActor$outboundSchema` instead. */
178
- export const outboundSchema = TriggerEventRequestDtoActor$outboundSchema;
179
- /** @deprecated use `TriggerEventRequestDtoActor$Outbound` instead. */
180
- export type Outbound = TriggerEventRequestDtoActor$Outbound;
169
+ export namespace Actor$ {
170
+ /** @deprecated use `Actor$inboundSchema` instead. */
171
+ export const inboundSchema = Actor$inboundSchema;
172
+ /** @deprecated use `Actor$outboundSchema` instead. */
173
+ export const outboundSchema = Actor$outboundSchema;
174
+ /** @deprecated use `Actor$Outbound` instead. */
175
+ export type Outbound = Actor$Outbound;
181
176
  }
182
177
 
183
- export function triggerEventRequestDtoActorToJSON(
184
- triggerEventRequestDtoActor: TriggerEventRequestDtoActor,
185
- ): string {
186
- return JSON.stringify(
187
- TriggerEventRequestDtoActor$outboundSchema.parse(
188
- triggerEventRequestDtoActor,
189
- ),
190
- );
178
+ export function actorToJSON(actor: Actor): string {
179
+ return JSON.stringify(Actor$outboundSchema.parse(actor));
191
180
  }
192
181
 
193
- export function triggerEventRequestDtoActorFromJSON(
182
+ export function actorFromJSON(
194
183
  jsonString: string,
195
- ): SafeParseResult<TriggerEventRequestDtoActor, SDKValidationError> {
184
+ ): SafeParseResult<Actor, SDKValidationError> {
196
185
  return safeParse(
197
186
  jsonString,
198
- (x) => TriggerEventRequestDtoActor$inboundSchema.parse(JSON.parse(x)),
199
- `Failed to parse 'TriggerEventRequestDtoActor' from JSON`,
187
+ (x) => Actor$inboundSchema.parse(JSON.parse(x)),
188
+ `Failed to parse 'Actor' from JSON`,
200
189
  );
201
190
  }
202
191
 
@@ -10,6 +10,9 @@ import * as components from "../components/index.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
12
  export type MessagesControllerGetMessagesRequest = {
13
+ /**
14
+ * The channel through which the notification is sent.
15
+ */
13
16
  channel?: components.ChannelTypeEnum | undefined;
14
17
  subscriberId?: string | undefined;
15
18
  transactionId?: Array<string> | undefined;
@@ -1,62 +0,0 @@
1
- import * as z from "zod";
2
- import { Result as SafeParseResult } from "../../types/fp.js";
3
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
- import { ActorTypeEnum } from "./actortypeenum.js";
5
- /**
6
- * The data associated with the actor, can be null if not applicable.
7
- */
8
- export type ActorData = {};
9
- export type Actor = {
10
- /**
11
- * The data associated with the actor, can be null if not applicable.
12
- */
13
- data: ActorData | null;
14
- /**
15
- * The type of the actor, indicating the role in the notification process.
16
- */
17
- type: ActorTypeEnum;
18
- };
19
- /** @internal */
20
- export declare const ActorData$inboundSchema: z.ZodType<ActorData, z.ZodTypeDef, unknown>;
21
- /** @internal */
22
- export type ActorData$Outbound = {};
23
- /** @internal */
24
- export declare const ActorData$outboundSchema: z.ZodType<ActorData$Outbound, z.ZodTypeDef, ActorData>;
25
- /**
26
- * @internal
27
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
28
- */
29
- export declare namespace ActorData$ {
30
- /** @deprecated use `ActorData$inboundSchema` instead. */
31
- const inboundSchema: z.ZodType<ActorData, z.ZodTypeDef, unknown>;
32
- /** @deprecated use `ActorData$outboundSchema` instead. */
33
- const outboundSchema: z.ZodType<ActorData$Outbound, z.ZodTypeDef, ActorData>;
34
- /** @deprecated use `ActorData$Outbound` instead. */
35
- type Outbound = ActorData$Outbound;
36
- }
37
- export declare function actorDataToJSON(actorData: ActorData): string;
38
- export declare function actorDataFromJSON(jsonString: string): SafeParseResult<ActorData, SDKValidationError>;
39
- /** @internal */
40
- export declare const Actor$inboundSchema: z.ZodType<Actor, z.ZodTypeDef, unknown>;
41
- /** @internal */
42
- export type Actor$Outbound = {
43
- data: ActorData$Outbound | null;
44
- type: string;
45
- };
46
- /** @internal */
47
- export declare const Actor$outboundSchema: z.ZodType<Actor$Outbound, z.ZodTypeDef, Actor>;
48
- /**
49
- * @internal
50
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
51
- */
52
- export declare namespace Actor$ {
53
- /** @deprecated use `Actor$inboundSchema` instead. */
54
- const inboundSchema: z.ZodType<Actor, z.ZodTypeDef, unknown>;
55
- /** @deprecated use `Actor$outboundSchema` instead. */
56
- const outboundSchema: z.ZodType<Actor$Outbound, z.ZodTypeDef, Actor>;
57
- /** @deprecated use `Actor$Outbound` instead. */
58
- type Outbound = Actor$Outbound;
59
- }
60
- export declare function actorToJSON(actor: Actor): string;
61
- export declare function actorFromJSON(jsonString: string): SafeParseResult<Actor, SDKValidationError>;
62
- //# sourceMappingURL=actor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"actor.d.ts","sourceRoot":"","sources":["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AAEL,gBAAgB;AAChB,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,OAAO,CAC1C,cAAc,EACd,CAAC,CAAC,UAAU,EACZ,KAAK,CAIL,CAAC;AAEH;;;GAGG;AACH,yBAAiB,MAAM,CAAC;IACtB,qDAAqD;IAC9C,MAAM,aAAa,yCAAsB,CAAC;IACjD,sDAAsD;IAC/C,MAAM,cAAc,gDAAuB,CAAC;IACnD,gDAAgD;IAChD,KAAY,QAAQ,GAAG,cAAc,CAAC;CACvC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAEhD;AAED,wBAAgB,aAAa,CAC3B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAM5C"}
@@ -1,86 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.actorFromJSON = exports.actorToJSON = exports.Actor$ = exports.Actor$outboundSchema = exports.Actor$inboundSchema = exports.actorDataFromJSON = exports.actorDataToJSON = exports.ActorData$ = exports.ActorData$outboundSchema = exports.ActorData$inboundSchema = void 0;
30
- const z = __importStar(require("zod"));
31
- const schemas_js_1 = require("../../lib/schemas.js");
32
- const actortypeenum_js_1 = require("./actortypeenum.js");
33
- /** @internal */
34
- exports.ActorData$inboundSchema = z.object({});
35
- /** @internal */
36
- exports.ActorData$outboundSchema = z.object({});
37
- /**
38
- * @internal
39
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
40
- */
41
- var ActorData$;
42
- (function (ActorData$) {
43
- /** @deprecated use `ActorData$inboundSchema` instead. */
44
- ActorData$.inboundSchema = exports.ActorData$inboundSchema;
45
- /** @deprecated use `ActorData$outboundSchema` instead. */
46
- ActorData$.outboundSchema = exports.ActorData$outboundSchema;
47
- })(ActorData$ || (exports.ActorData$ = ActorData$ = {}));
48
- function actorDataToJSON(actorData) {
49
- return JSON.stringify(exports.ActorData$outboundSchema.parse(actorData));
50
- }
51
- exports.actorDataToJSON = actorDataToJSON;
52
- function actorDataFromJSON(jsonString) {
53
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ActorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ActorData' from JSON`);
54
- }
55
- exports.actorDataFromJSON = actorDataFromJSON;
56
- /** @internal */
57
- exports.Actor$inboundSchema = z
58
- .object({
59
- data: z.nullable(z.lazy(() => exports.ActorData$inboundSchema)),
60
- type: actortypeenum_js_1.ActorTypeEnum$inboundSchema,
61
- });
62
- /** @internal */
63
- exports.Actor$outboundSchema = z.object({
64
- data: z.nullable(z.lazy(() => exports.ActorData$outboundSchema)),
65
- type: actortypeenum_js_1.ActorTypeEnum$outboundSchema,
66
- });
67
- /**
68
- * @internal
69
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
70
- */
71
- var Actor$;
72
- (function (Actor$) {
73
- /** @deprecated use `Actor$inboundSchema` instead. */
74
- Actor$.inboundSchema = exports.Actor$inboundSchema;
75
- /** @deprecated use `Actor$outboundSchema` instead. */
76
- Actor$.outboundSchema = exports.Actor$outboundSchema;
77
- })(Actor$ || (exports.Actor$ = Actor$ = {}));
78
- function actorToJSON(actor) {
79
- return JSON.stringify(exports.Actor$outboundSchema.parse(actor));
80
- }
81
- exports.actorToJSON = actorToJSON;
82
- function actorFromJSON(jsonString) {
83
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Actor$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Actor' from JSON`);
84
- }
85
- exports.actorFromJSON = actorFromJSON;
86
- //# sourceMappingURL=actor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"actor.js","sourceRoot":"","sources":["../../src/models/components/actor.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,qDAAiD;AAGjD,yDAI4B;AAkB5B,gBAAgB;AACH,QAAA,uBAAuB,GAIhC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAKjB,gBAAgB;AACH,QAAA,wBAAwB,GAIjC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEjB;;;GAGG;AACH,IAAiB,UAAU,CAO1B;AAPD,WAAiB,UAAU;IACzB,yDAAyD;IAC5C,wBAAa,GAAG,+BAAuB,CAAC;IACrD,0DAA0D;IAC7C,yBAAc,GAAG,gCAAwB,CAAC;AAGzD,CAAC,EAPgB,UAAU,0BAAV,UAAU,QAO1B;AAED,SAAgB,eAAe,CAAC,SAAoB;IAClD,OAAO,IAAI,CAAC,SAAS,CAAC,gCAAwB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;AACnE,CAAC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AQC"}
@@ -1,248 +0,0 @@
1
- import * as z from "zod";
2
- import { ClosedEnum } from "../../types/enums.js";
3
- import { Result as SafeParseResult } from "../../types/fp.js";
4
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
5
- import { Actor, Actor$Outbound } from "./actor.js";
6
- import { MessageCTA, MessageCTA$Outbound } from "./messagecta.js";
7
- import { SubscriberResponseDto, SubscriberResponseDto$Outbound } from "./subscriberresponsedto.js";
8
- /**
9
- * The channel through which the notification is sent.
10
- */
11
- export declare const NotificationDtoChannel: {
12
- readonly InApp: "in_app";
13
- readonly Email: "email";
14
- readonly Sms: "sms";
15
- readonly Chat: "chat";
16
- readonly Push: "push";
17
- };
18
- /**
19
- * The channel through which the notification is sent.
20
- */
21
- export type NotificationDtoChannel = ClosedEnum<typeof NotificationDtoChannel>;
22
- /**
23
- * Current status of the notification.
24
- */
25
- export declare const NotificationDtoStatus: {
26
- readonly Sent: "sent";
27
- readonly Error: "error";
28
- readonly Warning: "warning";
29
- };
30
- /**
31
- * Current status of the notification.
32
- */
33
- export type NotificationDtoStatus = ClosedEnum<typeof NotificationDtoStatus>;
34
- export type NotificationDto = {
35
- /**
36
- * Unique identifier for the notification.
37
- */
38
- id: string;
39
- /**
40
- * Identifier for the template used to generate the notification.
41
- */
42
- templateId: string;
43
- /**
44
- * Identifier for the environment where the notification is sent.
45
- */
46
- environmentId: string;
47
- /**
48
- * Identifier for the message template used.
49
- */
50
- messageTemplateId: string;
51
- /**
52
- * Identifier for the organization sending the notification.
53
- */
54
- organizationId: string;
55
- /**
56
- * Unique identifier for the notification instance.
57
- */
58
- notificationId: string;
59
- /**
60
- * Unique identifier for the subscriber receiving the notification.
61
- */
62
- subscriberId: string;
63
- /**
64
- * Identifier for the feed associated with the notification.
65
- */
66
- feedId: string;
67
- /**
68
- * Identifier for the job that triggered the notification.
69
- */
70
- jobId: string;
71
- /**
72
- * Timestamp indicating when the notification was created.
73
- */
74
- createdAt?: Date | null | undefined;
75
- /**
76
- * Timestamp indicating when the notification was last updated.
77
- */
78
- updatedAt?: Date | null | undefined;
79
- /**
80
- * Actor details related to the notification, if applicable.
81
- */
82
- actor?: Actor | undefined;
83
- /**
84
- * Subscriber details associated with this notification.
85
- */
86
- subscriber?: SubscriberResponseDto | undefined;
87
- /**
88
- * Unique identifier for the transaction associated with the notification.
89
- */
90
- transactionId: string;
91
- /**
92
- * Identifier for the template used, if applicable.
93
- */
94
- templateIdentifier?: string | null | undefined;
95
- /**
96
- * Identifier for the provider that sends the notification.
97
- */
98
- providerId?: string | null | undefined;
99
- /**
100
- * The main content of the notification.
101
- */
102
- content: string;
103
- /**
104
- * The subject line for email notifications, if applicable.
105
- */
106
- subject?: string | null | undefined;
107
- /**
108
- * The channel through which the notification is sent.
109
- */
110
- channel: NotificationDtoChannel;
111
- /**
112
- * Indicates whether the notification has been read by the subscriber.
113
- */
114
- read: boolean;
115
- /**
116
- * Indicates whether the notification has been seen by the subscriber.
117
- */
118
- seen: boolean;
119
- /**
120
- * Indicates whether the notification has been deleted.
121
- */
122
- deleted: boolean;
123
- /**
124
- * Device tokens for push notifications, if applicable.
125
- */
126
- deviceTokens?: Array<string> | null | undefined;
127
- /**
128
- * Call-to-action information associated with the notification.
129
- */
130
- cta: MessageCTA;
131
- /**
132
- * Current status of the notification.
133
- */
134
- status: NotificationDtoStatus;
135
- /**
136
- * The payload that was used to send the notification trigger.
137
- */
138
- payload?: {
139
- [k: string]: any;
140
- } | undefined;
141
- /**
142
- * Provider-specific overrides used when triggering the notification.
143
- */
144
- overrides?: {
145
- [k: string]: any;
146
- } | undefined;
147
- };
148
- /** @internal */
149
- export declare const NotificationDtoChannel$inboundSchema: z.ZodNativeEnum<typeof NotificationDtoChannel>;
150
- /** @internal */
151
- export declare const NotificationDtoChannel$outboundSchema: z.ZodNativeEnum<typeof NotificationDtoChannel>;
152
- /**
153
- * @internal
154
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
155
- */
156
- export declare namespace NotificationDtoChannel$ {
157
- /** @deprecated use `NotificationDtoChannel$inboundSchema` instead. */
158
- const inboundSchema: z.ZodNativeEnum<{
159
- readonly InApp: "in_app";
160
- readonly Email: "email";
161
- readonly Sms: "sms";
162
- readonly Chat: "chat";
163
- readonly Push: "push";
164
- }>;
165
- /** @deprecated use `NotificationDtoChannel$outboundSchema` instead. */
166
- const outboundSchema: z.ZodNativeEnum<{
167
- readonly InApp: "in_app";
168
- readonly Email: "email";
169
- readonly Sms: "sms";
170
- readonly Chat: "chat";
171
- readonly Push: "push";
172
- }>;
173
- }
174
- /** @internal */
175
- export declare const NotificationDtoStatus$inboundSchema: z.ZodNativeEnum<typeof NotificationDtoStatus>;
176
- /** @internal */
177
- export declare const NotificationDtoStatus$outboundSchema: z.ZodNativeEnum<typeof NotificationDtoStatus>;
178
- /**
179
- * @internal
180
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
181
- */
182
- export declare namespace NotificationDtoStatus$ {
183
- /** @deprecated use `NotificationDtoStatus$inboundSchema` instead. */
184
- const inboundSchema: z.ZodNativeEnum<{
185
- readonly Sent: "sent";
186
- readonly Error: "error";
187
- readonly Warning: "warning";
188
- }>;
189
- /** @deprecated use `NotificationDtoStatus$outboundSchema` instead. */
190
- const outboundSchema: z.ZodNativeEnum<{
191
- readonly Sent: "sent";
192
- readonly Error: "error";
193
- readonly Warning: "warning";
194
- }>;
195
- }
196
- /** @internal */
197
- export declare const NotificationDto$inboundSchema: z.ZodType<NotificationDto, z.ZodTypeDef, unknown>;
198
- /** @internal */
199
- export type NotificationDto$Outbound = {
200
- _id: string;
201
- _templateId: string;
202
- _environmentId: string;
203
- _messageTemplateId: string;
204
- _organizationId: string;
205
- _notificationId: string;
206
- _subscriberId: string;
207
- _feedId: string;
208
- _jobId: string;
209
- createdAt?: string | null | undefined;
210
- updatedAt?: string | null | undefined;
211
- actor?: Actor$Outbound | undefined;
212
- subscriber?: SubscriberResponseDto$Outbound | undefined;
213
- transactionId: string;
214
- templateIdentifier?: string | null | undefined;
215
- providerId?: string | null | undefined;
216
- content: string;
217
- subject?: string | null | undefined;
218
- channel: string;
219
- read: boolean;
220
- seen: boolean;
221
- deleted: boolean;
222
- deviceTokens?: Array<string> | null | undefined;
223
- cta: MessageCTA$Outbound;
224
- status: string;
225
- payload?: {
226
- [k: string]: any;
227
- } | undefined;
228
- overrides?: {
229
- [k: string]: any;
230
- } | undefined;
231
- };
232
- /** @internal */
233
- export declare const NotificationDto$outboundSchema: z.ZodType<NotificationDto$Outbound, z.ZodTypeDef, NotificationDto>;
234
- /**
235
- * @internal
236
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
237
- */
238
- export declare namespace NotificationDto$ {
239
- /** @deprecated use `NotificationDto$inboundSchema` instead. */
240
- const inboundSchema: z.ZodType<NotificationDto, z.ZodTypeDef, unknown>;
241
- /** @deprecated use `NotificationDto$outboundSchema` instead. */
242
- const outboundSchema: z.ZodType<NotificationDto$Outbound, z.ZodTypeDef, NotificationDto>;
243
- /** @deprecated use `NotificationDto$Outbound` instead. */
244
- type Outbound = NotificationDto$Outbound;
245
- }
246
- export declare function notificationDtoToJSON(notificationDto: NotificationDto): string;
247
- export declare function notificationDtoFromJSON(jsonString: string): SafeParseResult<NotificationDto, SDKValidationError>;
248
- //# sourceMappingURL=notificationdto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notificationdto.d.ts","sourceRoot":"","sources":["../../src/models/components/notificationdto.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,KAAK,EAEL,cAAc,EAEf,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,UAAU,EAEV,mBAAmB,EAEp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