@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.
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/models/components/actorfeeditemdto.d.ts +62 -0
- package/models/components/actorfeeditemdto.d.ts.map +1 -0
- package/models/components/actorfeeditemdto.js +85 -0
- package/models/components/actorfeeditemdto.js.map +1 -0
- package/models/components/channelsettings.d.ts +1 -1
- package/models/components/channeltypeenum.d.ts +6 -0
- package/models/components/channeltypeenum.d.ts.map +1 -1
- package/models/components/channeltypeenum.js +3 -0
- package/models/components/channeltypeenum.js.map +1 -1
- package/models/components/feedresponsedto.d.ts +3 -3
- package/models/components/feedresponsedto.d.ts.map +1 -1
- package/models/components/feedresponsedto.js +3 -3
- package/models/components/feedresponsedto.js.map +1 -1
- package/models/components/index.d.ts +3 -2
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +3 -2
- package/models/components/index.js.map +1 -1
- package/models/components/notificationfeeditemdto.d.ts +281 -0
- package/models/components/notificationfeeditemdto.d.ts.map +1 -0
- package/models/components/notificationfeeditemdto.js +233 -0
- package/models/components/notificationfeeditemdto.js.map +1 -0
- package/models/components/subscriberfeedresponsedto.d.ts +52 -0
- package/models/components/subscriberfeedresponsedto.d.ts.map +1 -0
- package/models/components/subscriberfeedresponsedto.js +76 -0
- package/models/components/subscriberfeedresponsedto.js.map +1 -0
- package/models/components/subscriberresponsedto.d.ts +46 -4
- package/models/components/subscriberresponsedto.d.ts.map +1 -1
- package/models/components/subscriberresponsedto.js.map +1 -1
- package/models/components/triggereventrequestdto.d.ts +13 -13
- package/models/components/triggereventrequestdto.d.ts.map +1 -1
- package/models/components/triggereventrequestdto.js +17 -16
- package/models/components/triggereventrequestdto.js.map +1 -1
- package/models/operations/messagescontrollergetmessages.d.ts +3 -0
- package/models/operations/messagescontrollergetmessages.d.ts.map +1 -1
- package/models/operations/messagescontrollergetmessages.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/actorfeeditemdto.ts +134 -0
- package/src/models/components/channelsettings.ts +1 -1
- package/src/models/components/channeltypeenum.ts +6 -0
- package/src/models/components/feedresponsedto.ts +9 -9
- package/src/models/components/index.ts +3 -2
- package/src/models/components/notificationfeeditemdto.ts +502 -0
- package/src/models/components/subscriberfeedresponsedto.ts +106 -0
- package/src/models/components/subscriberresponsedto.ts +46 -4
- package/src/models/components/triggereventrequestdto.ts +20 -31
- package/src/models/operations/messagescontrollergetmessages.ts +3 -0
- package/models/components/actor.d.ts +0 -62
- package/models/components/actor.d.ts.map +0 -1
- package/models/components/actor.js +0 -86
- package/models/components/actor.js.map +0 -1
- package/models/components/notificationdto.d.ts +0 -248
- package/models/components/notificationdto.d.ts.map +0 -1
- package/models/components/notificationdto.js +0 -187
- package/models/components/notificationdto.js.map +0 -1
- package/src/models/components/actor.ts +0 -123
- package/src/models/components/notificationdto.ts +0 -367
|
@@ -1,187 +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.notificationDtoFromJSON = exports.notificationDtoToJSON = exports.NotificationDto$ = exports.NotificationDto$outboundSchema = exports.NotificationDto$inboundSchema = exports.NotificationDtoStatus$ = exports.NotificationDtoStatus$outboundSchema = exports.NotificationDtoStatus$inboundSchema = exports.NotificationDtoChannel$ = exports.NotificationDtoChannel$outboundSchema = exports.NotificationDtoChannel$inboundSchema = exports.NotificationDtoStatus = exports.NotificationDtoChannel = void 0;
|
|
30
|
-
const z = __importStar(require("zod"));
|
|
31
|
-
const primitives_js_1 = require("../../lib/primitives.js");
|
|
32
|
-
const schemas_js_1 = require("../../lib/schemas.js");
|
|
33
|
-
const actor_js_1 = require("./actor.js");
|
|
34
|
-
const messagecta_js_1 = require("./messagecta.js");
|
|
35
|
-
const subscriberresponsedto_js_1 = require("./subscriberresponsedto.js");
|
|
36
|
-
/**
|
|
37
|
-
* The channel through which the notification is sent.
|
|
38
|
-
*/
|
|
39
|
-
exports.NotificationDtoChannel = {
|
|
40
|
-
InApp: "in_app",
|
|
41
|
-
Email: "email",
|
|
42
|
-
Sms: "sms",
|
|
43
|
-
Chat: "chat",
|
|
44
|
-
Push: "push",
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Current status of the notification.
|
|
48
|
-
*/
|
|
49
|
-
exports.NotificationDtoStatus = {
|
|
50
|
-
Sent: "sent",
|
|
51
|
-
Error: "error",
|
|
52
|
-
Warning: "warning",
|
|
53
|
-
};
|
|
54
|
-
/** @internal */
|
|
55
|
-
exports.NotificationDtoChannel$inboundSchema = z.nativeEnum(exports.NotificationDtoChannel);
|
|
56
|
-
/** @internal */
|
|
57
|
-
exports.NotificationDtoChannel$outboundSchema = exports.NotificationDtoChannel$inboundSchema;
|
|
58
|
-
/**
|
|
59
|
-
* @internal
|
|
60
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
61
|
-
*/
|
|
62
|
-
var NotificationDtoChannel$;
|
|
63
|
-
(function (NotificationDtoChannel$) {
|
|
64
|
-
/** @deprecated use `NotificationDtoChannel$inboundSchema` instead. */
|
|
65
|
-
NotificationDtoChannel$.inboundSchema = exports.NotificationDtoChannel$inboundSchema;
|
|
66
|
-
/** @deprecated use `NotificationDtoChannel$outboundSchema` instead. */
|
|
67
|
-
NotificationDtoChannel$.outboundSchema = exports.NotificationDtoChannel$outboundSchema;
|
|
68
|
-
})(NotificationDtoChannel$ || (exports.NotificationDtoChannel$ = NotificationDtoChannel$ = {}));
|
|
69
|
-
/** @internal */
|
|
70
|
-
exports.NotificationDtoStatus$inboundSchema = z.nativeEnum(exports.NotificationDtoStatus);
|
|
71
|
-
/** @internal */
|
|
72
|
-
exports.NotificationDtoStatus$outboundSchema = exports.NotificationDtoStatus$inboundSchema;
|
|
73
|
-
/**
|
|
74
|
-
* @internal
|
|
75
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
76
|
-
*/
|
|
77
|
-
var NotificationDtoStatus$;
|
|
78
|
-
(function (NotificationDtoStatus$) {
|
|
79
|
-
/** @deprecated use `NotificationDtoStatus$inboundSchema` instead. */
|
|
80
|
-
NotificationDtoStatus$.inboundSchema = exports.NotificationDtoStatus$inboundSchema;
|
|
81
|
-
/** @deprecated use `NotificationDtoStatus$outboundSchema` instead. */
|
|
82
|
-
NotificationDtoStatus$.outboundSchema = exports.NotificationDtoStatus$outboundSchema;
|
|
83
|
-
})(NotificationDtoStatus$ || (exports.NotificationDtoStatus$ = NotificationDtoStatus$ = {}));
|
|
84
|
-
/** @internal */
|
|
85
|
-
exports.NotificationDto$inboundSchema = z.object({
|
|
86
|
-
_id: z.string(),
|
|
87
|
-
_templateId: z.string(),
|
|
88
|
-
_environmentId: z.string(),
|
|
89
|
-
_messageTemplateId: z.string(),
|
|
90
|
-
_organizationId: z.string(),
|
|
91
|
-
_notificationId: z.string(),
|
|
92
|
-
_subscriberId: z.string(),
|
|
93
|
-
_feedId: z.string(),
|
|
94
|
-
_jobId: z.string(),
|
|
95
|
-
createdAt: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
|
|
96
|
-
updatedAt: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
|
|
97
|
-
actor: actor_js_1.Actor$inboundSchema.optional(),
|
|
98
|
-
subscriber: subscriberresponsedto_js_1.SubscriberResponseDto$inboundSchema.optional(),
|
|
99
|
-
transactionId: z.string(),
|
|
100
|
-
templateIdentifier: z.nullable(z.string()).optional(),
|
|
101
|
-
providerId: z.nullable(z.string()).optional(),
|
|
102
|
-
content: z.string(),
|
|
103
|
-
subject: z.nullable(z.string()).optional(),
|
|
104
|
-
channel: exports.NotificationDtoChannel$inboundSchema,
|
|
105
|
-
read: z.boolean(),
|
|
106
|
-
seen: z.boolean(),
|
|
107
|
-
deleted: z.boolean(),
|
|
108
|
-
deviceTokens: z.nullable(z.array(z.string())).optional(),
|
|
109
|
-
cta: messagecta_js_1.MessageCTA$inboundSchema,
|
|
110
|
-
status: exports.NotificationDtoStatus$inboundSchema,
|
|
111
|
-
payload: z.record(z.any()).optional(),
|
|
112
|
-
overrides: z.record(z.any()).optional(),
|
|
113
|
-
}).transform((v) => {
|
|
114
|
-
return (0, primitives_js_1.remap)(v, {
|
|
115
|
-
"_id": "id",
|
|
116
|
-
"_templateId": "templateId",
|
|
117
|
-
"_environmentId": "environmentId",
|
|
118
|
-
"_messageTemplateId": "messageTemplateId",
|
|
119
|
-
"_organizationId": "organizationId",
|
|
120
|
-
"_notificationId": "notificationId",
|
|
121
|
-
"_subscriberId": "subscriberId",
|
|
122
|
-
"_feedId": "feedId",
|
|
123
|
-
"_jobId": "jobId",
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
/** @internal */
|
|
127
|
-
exports.NotificationDto$outboundSchema = z.object({
|
|
128
|
-
id: z.string(),
|
|
129
|
-
templateId: z.string(),
|
|
130
|
-
environmentId: z.string(),
|
|
131
|
-
messageTemplateId: z.string(),
|
|
132
|
-
organizationId: z.string(),
|
|
133
|
-
notificationId: z.string(),
|
|
134
|
-
subscriberId: z.string(),
|
|
135
|
-
feedId: z.string(),
|
|
136
|
-
jobId: z.string(),
|
|
137
|
-
createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
138
|
-
updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
139
|
-
actor: actor_js_1.Actor$outboundSchema.optional(),
|
|
140
|
-
subscriber: subscriberresponsedto_js_1.SubscriberResponseDto$outboundSchema.optional(),
|
|
141
|
-
transactionId: z.string(),
|
|
142
|
-
templateIdentifier: z.nullable(z.string()).optional(),
|
|
143
|
-
providerId: z.nullable(z.string()).optional(),
|
|
144
|
-
content: z.string(),
|
|
145
|
-
subject: z.nullable(z.string()).optional(),
|
|
146
|
-
channel: exports.NotificationDtoChannel$outboundSchema,
|
|
147
|
-
read: z.boolean(),
|
|
148
|
-
seen: z.boolean(),
|
|
149
|
-
deleted: z.boolean(),
|
|
150
|
-
deviceTokens: z.nullable(z.array(z.string())).optional(),
|
|
151
|
-
cta: messagecta_js_1.MessageCTA$outboundSchema,
|
|
152
|
-
status: exports.NotificationDtoStatus$outboundSchema,
|
|
153
|
-
payload: z.record(z.any()).optional(),
|
|
154
|
-
overrides: z.record(z.any()).optional(),
|
|
155
|
-
}).transform((v) => {
|
|
156
|
-
return (0, primitives_js_1.remap)(v, {
|
|
157
|
-
id: "_id",
|
|
158
|
-
templateId: "_templateId",
|
|
159
|
-
environmentId: "_environmentId",
|
|
160
|
-
messageTemplateId: "_messageTemplateId",
|
|
161
|
-
organizationId: "_organizationId",
|
|
162
|
-
notificationId: "_notificationId",
|
|
163
|
-
subscriberId: "_subscriberId",
|
|
164
|
-
feedId: "_feedId",
|
|
165
|
-
jobId: "_jobId",
|
|
166
|
-
});
|
|
167
|
-
});
|
|
168
|
-
/**
|
|
169
|
-
* @internal
|
|
170
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
171
|
-
*/
|
|
172
|
-
var NotificationDto$;
|
|
173
|
-
(function (NotificationDto$) {
|
|
174
|
-
/** @deprecated use `NotificationDto$inboundSchema` instead. */
|
|
175
|
-
NotificationDto$.inboundSchema = exports.NotificationDto$inboundSchema;
|
|
176
|
-
/** @deprecated use `NotificationDto$outboundSchema` instead. */
|
|
177
|
-
NotificationDto$.outboundSchema = exports.NotificationDto$outboundSchema;
|
|
178
|
-
})(NotificationDto$ || (exports.NotificationDto$ = NotificationDto$ = {}));
|
|
179
|
-
function notificationDtoToJSON(notificationDto) {
|
|
180
|
-
return JSON.stringify(exports.NotificationDto$outboundSchema.parse(notificationDto));
|
|
181
|
-
}
|
|
182
|
-
exports.notificationDtoToJSON = notificationDtoToJSON;
|
|
183
|
-
function notificationDtoFromJSON(jsonString) {
|
|
184
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.NotificationDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'NotificationDto' from JSON`);
|
|
185
|
-
}
|
|
186
|
-
exports.notificationDtoFromJSON = notificationDtoFromJSON;
|
|
187
|
-
//# sourceMappingURL=notificationdto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notificationdto.js","sourceRoot":"","sources":["../../src/models/components/notificationdto.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;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|
-
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
|
-
/**
|
|
16
|
-
* The data associated with the actor, can be null if not applicable.
|
|
17
|
-
*/
|
|
18
|
-
export type ActorData = {};
|
|
19
|
-
|
|
20
|
-
export type Actor = {
|
|
21
|
-
/**
|
|
22
|
-
* The data associated with the actor, can be null if not applicable.
|
|
23
|
-
*/
|
|
24
|
-
data: ActorData | null;
|
|
25
|
-
/**
|
|
26
|
-
* The type of the actor, indicating the role in the notification process.
|
|
27
|
-
*/
|
|
28
|
-
type: ActorTypeEnum;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
/** @internal */
|
|
32
|
-
export const ActorData$inboundSchema: z.ZodType<
|
|
33
|
-
ActorData,
|
|
34
|
-
z.ZodTypeDef,
|
|
35
|
-
unknown
|
|
36
|
-
> = z.object({});
|
|
37
|
-
|
|
38
|
-
/** @internal */
|
|
39
|
-
export type ActorData$Outbound = {};
|
|
40
|
-
|
|
41
|
-
/** @internal */
|
|
42
|
-
export const ActorData$outboundSchema: z.ZodType<
|
|
43
|
-
ActorData$Outbound,
|
|
44
|
-
z.ZodTypeDef,
|
|
45
|
-
ActorData
|
|
46
|
-
> = z.object({});
|
|
47
|
-
|
|
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 namespace ActorData$ {
|
|
53
|
-
/** @deprecated use `ActorData$inboundSchema` instead. */
|
|
54
|
-
export const inboundSchema = ActorData$inboundSchema;
|
|
55
|
-
/** @deprecated use `ActorData$outboundSchema` instead. */
|
|
56
|
-
export const outboundSchema = ActorData$outboundSchema;
|
|
57
|
-
/** @deprecated use `ActorData$Outbound` instead. */
|
|
58
|
-
export type Outbound = ActorData$Outbound;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function actorDataToJSON(actorData: ActorData): string {
|
|
62
|
-
return JSON.stringify(ActorData$outboundSchema.parse(actorData));
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export function actorDataFromJSON(
|
|
66
|
-
jsonString: string,
|
|
67
|
-
): SafeParseResult<ActorData, SDKValidationError> {
|
|
68
|
-
return safeParse(
|
|
69
|
-
jsonString,
|
|
70
|
-
(x) => ActorData$inboundSchema.parse(JSON.parse(x)),
|
|
71
|
-
`Failed to parse 'ActorData' from JSON`,
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/** @internal */
|
|
76
|
-
export const Actor$inboundSchema: z.ZodType<Actor, z.ZodTypeDef, unknown> = z
|
|
77
|
-
.object({
|
|
78
|
-
data: z.nullable(z.lazy(() => ActorData$inboundSchema)),
|
|
79
|
-
type: ActorTypeEnum$inboundSchema,
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
/** @internal */
|
|
83
|
-
export type Actor$Outbound = {
|
|
84
|
-
data: ActorData$Outbound | null;
|
|
85
|
-
type: string;
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
/** @internal */
|
|
89
|
-
export const Actor$outboundSchema: z.ZodType<
|
|
90
|
-
Actor$Outbound,
|
|
91
|
-
z.ZodTypeDef,
|
|
92
|
-
Actor
|
|
93
|
-
> = z.object({
|
|
94
|
-
data: z.nullable(z.lazy(() => ActorData$outboundSchema)),
|
|
95
|
-
type: ActorTypeEnum$outboundSchema,
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* @internal
|
|
100
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
101
|
-
*/
|
|
102
|
-
export namespace Actor$ {
|
|
103
|
-
/** @deprecated use `Actor$inboundSchema` instead. */
|
|
104
|
-
export const inboundSchema = Actor$inboundSchema;
|
|
105
|
-
/** @deprecated use `Actor$outboundSchema` instead. */
|
|
106
|
-
export const outboundSchema = Actor$outboundSchema;
|
|
107
|
-
/** @deprecated use `Actor$Outbound` instead. */
|
|
108
|
-
export type Outbound = Actor$Outbound;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export function actorToJSON(actor: Actor): string {
|
|
112
|
-
return JSON.stringify(Actor$outboundSchema.parse(actor));
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export function actorFromJSON(
|
|
116
|
-
jsonString: string,
|
|
117
|
-
): SafeParseResult<Actor, SDKValidationError> {
|
|
118
|
-
return safeParse(
|
|
119
|
-
jsonString,
|
|
120
|
-
(x) => Actor$inboundSchema.parse(JSON.parse(x)),
|
|
121
|
-
`Failed to parse 'Actor' from JSON`,
|
|
122
|
-
);
|
|
123
|
-
}
|
|
@@ -1,367 +0,0 @@
|
|
|
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
|
-
import {
|
|
12
|
-
Actor,
|
|
13
|
-
Actor$inboundSchema,
|
|
14
|
-
Actor$Outbound,
|
|
15
|
-
Actor$outboundSchema,
|
|
16
|
-
} from "./actor.js";
|
|
17
|
-
import {
|
|
18
|
-
MessageCTA,
|
|
19
|
-
MessageCTA$inboundSchema,
|
|
20
|
-
MessageCTA$Outbound,
|
|
21
|
-
MessageCTA$outboundSchema,
|
|
22
|
-
} from "./messagecta.js";
|
|
23
|
-
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>;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Current status of the notification.
|
|
47
|
-
*/
|
|
48
|
-
export const NotificationDtoStatus = {
|
|
49
|
-
Sent: "sent",
|
|
50
|
-
Error: "error",
|
|
51
|
-
Warning: "warning",
|
|
52
|
-
} as const;
|
|
53
|
-
/**
|
|
54
|
-
* Current status of the notification.
|
|
55
|
-
*/
|
|
56
|
-
export type NotificationDtoStatus = ClosedEnum<typeof NotificationDtoStatus>;
|
|
57
|
-
|
|
58
|
-
export type NotificationDto = {
|
|
59
|
-
/**
|
|
60
|
-
* Unique identifier for the notification.
|
|
61
|
-
*/
|
|
62
|
-
id: string;
|
|
63
|
-
/**
|
|
64
|
-
* Identifier for the template used to generate the notification.
|
|
65
|
-
*/
|
|
66
|
-
templateId: string;
|
|
67
|
-
/**
|
|
68
|
-
* Identifier for the environment where the notification is sent.
|
|
69
|
-
*/
|
|
70
|
-
environmentId: string;
|
|
71
|
-
/**
|
|
72
|
-
* Identifier for the message template used.
|
|
73
|
-
*/
|
|
74
|
-
messageTemplateId: string;
|
|
75
|
-
/**
|
|
76
|
-
* Identifier for the organization sending the notification.
|
|
77
|
-
*/
|
|
78
|
-
organizationId: string;
|
|
79
|
-
/**
|
|
80
|
-
* Unique identifier for the notification instance.
|
|
81
|
-
*/
|
|
82
|
-
notificationId: string;
|
|
83
|
-
/**
|
|
84
|
-
* Unique identifier for the subscriber receiving the notification.
|
|
85
|
-
*/
|
|
86
|
-
subscriberId: string;
|
|
87
|
-
/**
|
|
88
|
-
* Identifier for the feed associated with the notification.
|
|
89
|
-
*/
|
|
90
|
-
feedId: string;
|
|
91
|
-
/**
|
|
92
|
-
* Identifier for the job that triggered the notification.
|
|
93
|
-
*/
|
|
94
|
-
jobId: string;
|
|
95
|
-
/**
|
|
96
|
-
* Timestamp indicating when the notification was created.
|
|
97
|
-
*/
|
|
98
|
-
createdAt?: Date | null | undefined;
|
|
99
|
-
/**
|
|
100
|
-
* Timestamp indicating when the notification was last updated.
|
|
101
|
-
*/
|
|
102
|
-
updatedAt?: Date | null | undefined;
|
|
103
|
-
/**
|
|
104
|
-
* Actor details related to the notification, if applicable.
|
|
105
|
-
*/
|
|
106
|
-
actor?: Actor | undefined;
|
|
107
|
-
/**
|
|
108
|
-
* Subscriber details associated with this notification.
|
|
109
|
-
*/
|
|
110
|
-
subscriber?: SubscriberResponseDto | undefined;
|
|
111
|
-
/**
|
|
112
|
-
* Unique identifier for the transaction associated with the notification.
|
|
113
|
-
*/
|
|
114
|
-
transactionId: string;
|
|
115
|
-
/**
|
|
116
|
-
* Identifier for the template used, if applicable.
|
|
117
|
-
*/
|
|
118
|
-
templateIdentifier?: string | null | undefined;
|
|
119
|
-
/**
|
|
120
|
-
* Identifier for the provider that sends the notification.
|
|
121
|
-
*/
|
|
122
|
-
providerId?: string | null | undefined;
|
|
123
|
-
/**
|
|
124
|
-
* The main content of the notification.
|
|
125
|
-
*/
|
|
126
|
-
content: string;
|
|
127
|
-
/**
|
|
128
|
-
* The subject line for email notifications, if applicable.
|
|
129
|
-
*/
|
|
130
|
-
subject?: string | null | undefined;
|
|
131
|
-
/**
|
|
132
|
-
* The channel through which the notification is sent.
|
|
133
|
-
*/
|
|
134
|
-
channel: NotificationDtoChannel;
|
|
135
|
-
/**
|
|
136
|
-
* Indicates whether the notification has been read by the subscriber.
|
|
137
|
-
*/
|
|
138
|
-
read: boolean;
|
|
139
|
-
/**
|
|
140
|
-
* Indicates whether the notification has been seen by the subscriber.
|
|
141
|
-
*/
|
|
142
|
-
seen: boolean;
|
|
143
|
-
/**
|
|
144
|
-
* Indicates whether the notification has been deleted.
|
|
145
|
-
*/
|
|
146
|
-
deleted: boolean;
|
|
147
|
-
/**
|
|
148
|
-
* Device tokens for push notifications, if applicable.
|
|
149
|
-
*/
|
|
150
|
-
deviceTokens?: Array<string> | null | undefined;
|
|
151
|
-
/**
|
|
152
|
-
* Call-to-action information associated with the notification.
|
|
153
|
-
*/
|
|
154
|
-
cta: MessageCTA;
|
|
155
|
-
/**
|
|
156
|
-
* Current status of the notification.
|
|
157
|
-
*/
|
|
158
|
-
status: NotificationDtoStatus;
|
|
159
|
-
/**
|
|
160
|
-
* The payload that was used to send the notification trigger.
|
|
161
|
-
*/
|
|
162
|
-
payload?: { [k: string]: any } | undefined;
|
|
163
|
-
/**
|
|
164
|
-
* Provider-specific overrides used when triggering the notification.
|
|
165
|
-
*/
|
|
166
|
-
overrides?: { [k: string]: any } | undefined;
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
/** @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);
|
|
194
|
-
|
|
195
|
-
/** @internal */
|
|
196
|
-
export const NotificationDtoStatus$outboundSchema: z.ZodNativeEnum<
|
|
197
|
-
typeof NotificationDtoStatus
|
|
198
|
-
> = NotificationDtoStatus$inboundSchema;
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* @internal
|
|
202
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
203
|
-
*/
|
|
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;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/** @internal */
|
|
212
|
-
export const NotificationDto$inboundSchema: z.ZodType<
|
|
213
|
-
NotificationDto,
|
|
214
|
-
z.ZodTypeDef,
|
|
215
|
-
unknown
|
|
216
|
-
> = z.object({
|
|
217
|
-
_id: z.string(),
|
|
218
|
-
_templateId: z.string(),
|
|
219
|
-
_environmentId: z.string(),
|
|
220
|
-
_messageTemplateId: z.string(),
|
|
221
|
-
_organizationId: z.string(),
|
|
222
|
-
_notificationId: z.string(),
|
|
223
|
-
_subscriberId: z.string(),
|
|
224
|
-
_feedId: z.string(),
|
|
225
|
-
_jobId: z.string(),
|
|
226
|
-
createdAt: z.nullable(
|
|
227
|
-
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
228
|
-
).optional(),
|
|
229
|
-
updatedAt: z.nullable(
|
|
230
|
-
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
231
|
-
).optional(),
|
|
232
|
-
actor: Actor$inboundSchema.optional(),
|
|
233
|
-
subscriber: SubscriberResponseDto$inboundSchema.optional(),
|
|
234
|
-
transactionId: z.string(),
|
|
235
|
-
templateIdentifier: z.nullable(z.string()).optional(),
|
|
236
|
-
providerId: z.nullable(z.string()).optional(),
|
|
237
|
-
content: z.string(),
|
|
238
|
-
subject: z.nullable(z.string()).optional(),
|
|
239
|
-
channel: NotificationDtoChannel$inboundSchema,
|
|
240
|
-
read: z.boolean(),
|
|
241
|
-
seen: z.boolean(),
|
|
242
|
-
deleted: z.boolean(),
|
|
243
|
-
deviceTokens: z.nullable(z.array(z.string())).optional(),
|
|
244
|
-
cta: MessageCTA$inboundSchema,
|
|
245
|
-
status: NotificationDtoStatus$inboundSchema,
|
|
246
|
-
payload: z.record(z.any()).optional(),
|
|
247
|
-
overrides: z.record(z.any()).optional(),
|
|
248
|
-
}).transform((v) => {
|
|
249
|
-
return remap$(v, {
|
|
250
|
-
"_id": "id",
|
|
251
|
-
"_templateId": "templateId",
|
|
252
|
-
"_environmentId": "environmentId",
|
|
253
|
-
"_messageTemplateId": "messageTemplateId",
|
|
254
|
-
"_organizationId": "organizationId",
|
|
255
|
-
"_notificationId": "notificationId",
|
|
256
|
-
"_subscriberId": "subscriberId",
|
|
257
|
-
"_feedId": "feedId",
|
|
258
|
-
"_jobId": "jobId",
|
|
259
|
-
});
|
|
260
|
-
});
|
|
261
|
-
|
|
262
|
-
/** @internal */
|
|
263
|
-
export type NotificationDto$Outbound = {
|
|
264
|
-
_id: string;
|
|
265
|
-
_templateId: string;
|
|
266
|
-
_environmentId: string;
|
|
267
|
-
_messageTemplateId: string;
|
|
268
|
-
_organizationId: string;
|
|
269
|
-
_notificationId: string;
|
|
270
|
-
_subscriberId: string;
|
|
271
|
-
_feedId: string;
|
|
272
|
-
_jobId: string;
|
|
273
|
-
createdAt?: string | null | undefined;
|
|
274
|
-
updatedAt?: string | null | undefined;
|
|
275
|
-
actor?: Actor$Outbound | undefined;
|
|
276
|
-
subscriber?: SubscriberResponseDto$Outbound | undefined;
|
|
277
|
-
transactionId: string;
|
|
278
|
-
templateIdentifier?: string | null | undefined;
|
|
279
|
-
providerId?: string | null | undefined;
|
|
280
|
-
content: string;
|
|
281
|
-
subject?: string | null | undefined;
|
|
282
|
-
channel: string;
|
|
283
|
-
read: boolean;
|
|
284
|
-
seen: boolean;
|
|
285
|
-
deleted: boolean;
|
|
286
|
-
deviceTokens?: Array<string> | null | undefined;
|
|
287
|
-
cta: MessageCTA$Outbound;
|
|
288
|
-
status: string;
|
|
289
|
-
payload?: { [k: string]: any } | undefined;
|
|
290
|
-
overrides?: { [k: string]: any } | undefined;
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
/** @internal */
|
|
294
|
-
export const NotificationDto$outboundSchema: z.ZodType<
|
|
295
|
-
NotificationDto$Outbound,
|
|
296
|
-
z.ZodTypeDef,
|
|
297
|
-
NotificationDto
|
|
298
|
-
> = z.object({
|
|
299
|
-
id: z.string(),
|
|
300
|
-
templateId: z.string(),
|
|
301
|
-
environmentId: z.string(),
|
|
302
|
-
messageTemplateId: z.string(),
|
|
303
|
-
organizationId: z.string(),
|
|
304
|
-
notificationId: z.string(),
|
|
305
|
-
subscriberId: z.string(),
|
|
306
|
-
feedId: z.string(),
|
|
307
|
-
jobId: z.string(),
|
|
308
|
-
createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
309
|
-
updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
310
|
-
actor: Actor$outboundSchema.optional(),
|
|
311
|
-
subscriber: SubscriberResponseDto$outboundSchema.optional(),
|
|
312
|
-
transactionId: z.string(),
|
|
313
|
-
templateIdentifier: z.nullable(z.string()).optional(),
|
|
314
|
-
providerId: z.nullable(z.string()).optional(),
|
|
315
|
-
content: z.string(),
|
|
316
|
-
subject: z.nullable(z.string()).optional(),
|
|
317
|
-
channel: NotificationDtoChannel$outboundSchema,
|
|
318
|
-
read: z.boolean(),
|
|
319
|
-
seen: z.boolean(),
|
|
320
|
-
deleted: z.boolean(),
|
|
321
|
-
deviceTokens: z.nullable(z.array(z.string())).optional(),
|
|
322
|
-
cta: MessageCTA$outboundSchema,
|
|
323
|
-
status: NotificationDtoStatus$outboundSchema,
|
|
324
|
-
payload: z.record(z.any()).optional(),
|
|
325
|
-
overrides: z.record(z.any()).optional(),
|
|
326
|
-
}).transform((v) => {
|
|
327
|
-
return remap$(v, {
|
|
328
|
-
id: "_id",
|
|
329
|
-
templateId: "_templateId",
|
|
330
|
-
environmentId: "_environmentId",
|
|
331
|
-
messageTemplateId: "_messageTemplateId",
|
|
332
|
-
organizationId: "_organizationId",
|
|
333
|
-
notificationId: "_notificationId",
|
|
334
|
-
subscriberId: "_subscriberId",
|
|
335
|
-
feedId: "_feedId",
|
|
336
|
-
jobId: "_jobId",
|
|
337
|
-
});
|
|
338
|
-
});
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* @internal
|
|
342
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
343
|
-
*/
|
|
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;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
export function notificationDtoToJSON(
|
|
354
|
-
notificationDto: NotificationDto,
|
|
355
|
-
): string {
|
|
356
|
-
return JSON.stringify(NotificationDto$outboundSchema.parse(notificationDto));
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
export function notificationDtoFromJSON(
|
|
360
|
-
jsonString: string,
|
|
361
|
-
): SafeParseResult<NotificationDto, SDKValidationError> {
|
|
362
|
-
return safeParse(
|
|
363
|
-
jsonString,
|
|
364
|
-
(x) => NotificationDto$inboundSchema.parse(JSON.parse(x)),
|
|
365
|
-
`Failed to parse 'NotificationDto' from JSON`,
|
|
366
|
-
);
|
|
367
|
-
}
|