@wix/auto_sdk_email-subscriptions_email-subscriptions 1.0.13 → 1.0.15

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.
@@ -0,0 +1,152 @@
1
+ import * as z from 'zod';
2
+
3
+ declare const QueryEmailSubscriptionsRequest: z.ZodObject<{
4
+ filter: z.ZodRecord<z.ZodString, z.ZodAny>;
5
+ options: z.ZodOptional<z.ZodObject<{
6
+ paging: z.ZodOptional<z.ZodObject<{
7
+ limit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
8
+ offset: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
9
+ }, z.core.$strip>>;
10
+ }, z.core.$strip>>;
11
+ }, z.core.$strip>;
12
+ declare const QueryEmailSubscriptionsResponse: z.ZodObject<{
13
+ subscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
14
+ _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
15
+ email: z.ZodOptional<z.ZodString>;
16
+ subscriptionStatus: z.ZodOptional<z.ZodEnum<{
17
+ UNKNOWN: "UNKNOWN";
18
+ NOT_SET: "NOT_SET";
19
+ PENDING: "PENDING";
20
+ SUBSCRIBED: "SUBSCRIBED";
21
+ UNSUBSCRIBED: "UNSUBSCRIBED";
22
+ }>>;
23
+ deliverabilityStatus: z.ZodOptional<z.ZodEnum<{
24
+ NOT_SET: "NOT_SET";
25
+ VALID: "VALID";
26
+ BOUNCED: "BOUNCED";
27
+ SPAM_COMPLAINT: "SPAM_COMPLAINT";
28
+ INACTIVE: "INACTIVE";
29
+ }>>;
30
+ _createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
31
+ _updatedDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
32
+ }, z.core.$strip>>>;
33
+ metadata: z.ZodOptional<z.ZodObject<{
34
+ count: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
35
+ offset: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
36
+ total: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
37
+ tooManyToCount: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
38
+ }, z.core.$strip>>;
39
+ }, z.core.$strip>;
40
+ declare const UpsertEmailSubscriptionRequest: z.ZodObject<{
41
+ options: z.ZodOptional<z.ZodObject<{
42
+ subscription: z.ZodOptional<z.ZodObject<{
43
+ _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
44
+ email: z.ZodString;
45
+ subscriptionStatus: z.ZodOptional<z.ZodEnum<{
46
+ UNKNOWN: "UNKNOWN";
47
+ NOT_SET: "NOT_SET";
48
+ PENDING: "PENDING";
49
+ SUBSCRIBED: "SUBSCRIBED";
50
+ UNSUBSCRIBED: "UNSUBSCRIBED";
51
+ }>>;
52
+ deliverabilityStatus: z.ZodOptional<z.ZodEnum<{
53
+ NOT_SET: "NOT_SET";
54
+ VALID: "VALID";
55
+ BOUNCED: "BOUNCED";
56
+ SPAM_COMPLAINT: "SPAM_COMPLAINT";
57
+ INACTIVE: "INACTIVE";
58
+ }>>;
59
+ _createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
60
+ _updatedDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
61
+ }, z.core.$strip>>;
62
+ }, z.core.$strip>>;
63
+ }, z.core.$strip>;
64
+ declare const UpsertEmailSubscriptionResponse: z.ZodObject<{
65
+ subscription: z.ZodOptional<z.ZodObject<{
66
+ _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
67
+ email: z.ZodOptional<z.ZodString>;
68
+ subscriptionStatus: z.ZodOptional<z.ZodEnum<{
69
+ UNKNOWN: "UNKNOWN";
70
+ NOT_SET: "NOT_SET";
71
+ PENDING: "PENDING";
72
+ SUBSCRIBED: "SUBSCRIBED";
73
+ UNSUBSCRIBED: "UNSUBSCRIBED";
74
+ }>>;
75
+ deliverabilityStatus: z.ZodOptional<z.ZodEnum<{
76
+ NOT_SET: "NOT_SET";
77
+ VALID: "VALID";
78
+ BOUNCED: "BOUNCED";
79
+ SPAM_COMPLAINT: "SPAM_COMPLAINT";
80
+ INACTIVE: "INACTIVE";
81
+ }>>;
82
+ _createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
83
+ _updatedDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
84
+ }, z.core.$strip>>;
85
+ }, z.core.$strip>;
86
+ declare const BulkUpsertEmailSubscriptionRequest: z.ZodObject<{
87
+ subscriptions: z.ZodArray<z.ZodObject<{
88
+ _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
89
+ email: z.ZodOptional<z.ZodString>;
90
+ subscriptionStatus: z.ZodOptional<z.ZodEnum<{
91
+ UNKNOWN: "UNKNOWN";
92
+ NOT_SET: "NOT_SET";
93
+ PENDING: "PENDING";
94
+ SUBSCRIBED: "SUBSCRIBED";
95
+ UNSUBSCRIBED: "UNSUBSCRIBED";
96
+ }>>;
97
+ deliverabilityStatus: z.ZodOptional<z.ZodEnum<{
98
+ NOT_SET: "NOT_SET";
99
+ VALID: "VALID";
100
+ BOUNCED: "BOUNCED";
101
+ SPAM_COMPLAINT: "SPAM_COMPLAINT";
102
+ INACTIVE: "INACTIVE";
103
+ }>>;
104
+ _createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
105
+ _updatedDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
106
+ }, z.core.$strip>>;
107
+ }, z.core.$strip>;
108
+ declare const BulkUpsertEmailSubscriptionResponse: z.ZodObject<{
109
+ results: z.ZodOptional<z.ZodArray<z.ZodObject<{
110
+ originalIndex: z.ZodOptional<z.ZodNumber>;
111
+ emailSubscription: z.ZodOptional<z.ZodObject<{
112
+ _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
113
+ email: z.ZodOptional<z.ZodString>;
114
+ subscriptionStatus: z.ZodOptional<z.ZodEnum<{
115
+ UNKNOWN: "UNKNOWN";
116
+ NOT_SET: "NOT_SET";
117
+ PENDING: "PENDING";
118
+ SUBSCRIBED: "SUBSCRIBED";
119
+ UNSUBSCRIBED: "UNSUBSCRIBED";
120
+ }>>;
121
+ deliverabilityStatus: z.ZodOptional<z.ZodEnum<{
122
+ NOT_SET: "NOT_SET";
123
+ VALID: "VALID";
124
+ BOUNCED: "BOUNCED";
125
+ SPAM_COMPLAINT: "SPAM_COMPLAINT";
126
+ INACTIVE: "INACTIVE";
127
+ }>>;
128
+ _createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
129
+ _updatedDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
130
+ }, z.core.$strip>>;
131
+ error: z.ZodOptional<z.ZodObject<{
132
+ errorCode: z.ZodOptional<z.ZodString>;
133
+ message: z.ZodOptional<z.ZodString>;
134
+ }, z.core.$strip>>;
135
+ }, z.core.$strip>>>;
136
+ metadata: z.ZodOptional<z.ZodObject<{
137
+ totalSuccess: z.ZodOptional<z.ZodNumber>;
138
+ totalFailure: z.ZodOptional<z.ZodNumber>;
139
+ }, z.core.$strip>>;
140
+ }, z.core.$strip>;
141
+ declare const GenerateUnsubscribeLinkRequest: z.ZodObject<{
142
+ emailAddress: z.ZodString;
143
+ options: z.ZodOptional<z.ZodObject<{
144
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
145
+ language: z.ZodNullable<z.ZodOptional<z.ZodString>>;
146
+ }, z.core.$strip>>;
147
+ }, z.core.$strip>;
148
+ declare const GenerateUnsubscribeLinkResponse: z.ZodObject<{
149
+ link: z.ZodOptional<z.ZodString>;
150
+ }, z.core.$strip>;
151
+
152
+ export { BulkUpsertEmailSubscriptionRequest, BulkUpsertEmailSubscriptionResponse, GenerateUnsubscribeLinkRequest, GenerateUnsubscribeLinkResponse, QueryEmailSubscriptionsRequest, QueryEmailSubscriptionsResponse, UpsertEmailSubscriptionRequest, UpsertEmailSubscriptionResponse };
@@ -0,0 +1,210 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // schemas.ts
31
+ var schemas_exports = {};
32
+ __export(schemas_exports, {
33
+ BulkUpsertEmailSubscriptionRequest: () => BulkUpsertEmailSubscriptionRequest,
34
+ BulkUpsertEmailSubscriptionResponse: () => BulkUpsertEmailSubscriptionResponse,
35
+ GenerateUnsubscribeLinkRequest: () => GenerateUnsubscribeLinkRequest,
36
+ GenerateUnsubscribeLinkResponse: () => GenerateUnsubscribeLinkResponse,
37
+ QueryEmailSubscriptionsRequest: () => QueryEmailSubscriptionsRequest,
38
+ QueryEmailSubscriptionsResponse: () => QueryEmailSubscriptionsResponse,
39
+ UpsertEmailSubscriptionRequest: () => UpsertEmailSubscriptionRequest,
40
+ UpsertEmailSubscriptionResponse: () => UpsertEmailSubscriptionResponse
41
+ });
42
+ module.exports = __toCommonJS(schemas_exports);
43
+
44
+ // src/emailsubscriptions-v1-emailsubscription-email-subscriptions.schemas.ts
45
+ var z = __toESM(require("zod"));
46
+ var QueryEmailSubscriptionsRequest = z.object({
47
+ filter: z.record(z.string(), z.any()).describe(
48
+ "Filter options.\nCurrently, querying is supported on the `email` field\nwith the `$in` array filter."
49
+ ),
50
+ options: z.object({
51
+ paging: z.object({
52
+ limit: z.number().int().describe("Number of items to load.").min(0).optional().nullable(),
53
+ offset: z.number().int().describe("Number of items to skip in the current sort order.").min(0).optional().nullable()
54
+ }).describe(
55
+ "Pagination options. For more information, see\n[Pagination](https://dev.wix.com/api/rest/getting-started/pagination)."
56
+ ).optional()
57
+ }).optional()
58
+ });
59
+ var QueryEmailSubscriptionsResponse = z.object({
60
+ subscriptions: z.array(
61
+ z.object({
62
+ _id: z.string().describe("Email subscription ID.").regex(
63
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
64
+ "Must be a valid GUID"
65
+ ).optional().nullable(),
66
+ email: z.string().describe("Email address.").email().optional(),
67
+ subscriptionStatus: z.enum(["UNKNOWN", "NOT_SET", "PENDING", "SUBSCRIBED", "UNSUBSCRIBED"]).describe(
68
+ "Indicates the recipient's opt-in or opt-out status\nfor marketing emails.\n\nDefault: `NOT_SET`."
69
+ ).optional(),
70
+ deliverabilityStatus: z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).describe(
71
+ "Indicates last reported status of sent emails.\n\nDefault: `NOT_SET`."
72
+ ).optional(),
73
+ _createdDate: z.date().describe("Date and time the email subscription was created.").optional().nullable(),
74
+ _updatedDate: z.date().describe("Date and time the email subscription was last updated.").optional().nullable()
75
+ })
76
+ ).optional(),
77
+ metadata: z.object({
78
+ count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
79
+ offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
80
+ total: z.number().int().describe("Total number of items that match the query.").optional().nullable(),
81
+ tooManyToCount: z.boolean().describe(
82
+ "Flag that indicates the server failed to calculate the `total` field."
83
+ ).optional().nullable()
84
+ }).describe("Metadata for the paginated results.").optional()
85
+ });
86
+ var UpsertEmailSubscriptionRequest = z.object({
87
+ options: z.object({
88
+ subscription: z.object({
89
+ _id: z.string().describe("Email subscription ID.").regex(
90
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
91
+ "Must be a valid GUID"
92
+ ).optional().nullable(),
93
+ email: z.string().describe("Email address.").email(),
94
+ subscriptionStatus: z.enum([
95
+ "UNKNOWN",
96
+ "NOT_SET",
97
+ "PENDING",
98
+ "SUBSCRIBED",
99
+ "UNSUBSCRIBED"
100
+ ]).optional(),
101
+ deliverabilityStatus: z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).optional(),
102
+ _createdDate: z.date().describe("Date and time the email subscription was created.").optional().nullable(),
103
+ _updatedDate: z.date().describe("Date and time the email subscription was last updated.").optional().nullable()
104
+ }).describe("Email subscription to update or create.").optional()
105
+ }).optional()
106
+ });
107
+ var UpsertEmailSubscriptionResponse = z.object({
108
+ subscription: z.object({
109
+ _id: z.string().describe("Email subscription ID.").regex(
110
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
111
+ "Must be a valid GUID"
112
+ ).optional().nullable(),
113
+ email: z.string().describe("Email address.").email().optional(),
114
+ subscriptionStatus: z.enum(["UNKNOWN", "NOT_SET", "PENDING", "SUBSCRIBED", "UNSUBSCRIBED"]).describe(
115
+ "Indicates the recipient's opt-in or opt-out status\nfor marketing emails.\n\nDefault: `NOT_SET`."
116
+ ).optional(),
117
+ deliverabilityStatus: z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).describe(
118
+ "Indicates last reported status of sent emails.\n\nDefault: `NOT_SET`."
119
+ ).optional(),
120
+ _createdDate: z.date().describe("Date and time the email subscription was created.").optional().nullable(),
121
+ _updatedDate: z.date().describe("Date and time the email subscription was last updated.").optional().nullable()
122
+ }).describe("Updated or created email subscription.").optional()
123
+ });
124
+ var BulkUpsertEmailSubscriptionRequest = z.object({
125
+ subscriptions: z.array(
126
+ z.object({
127
+ _id: z.string().describe("Email subscription ID.").regex(
128
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
129
+ "Must be a valid GUID"
130
+ ).optional().nullable(),
131
+ email: z.string().describe("Email address.").email().optional(),
132
+ subscriptionStatus: z.enum(["UNKNOWN", "NOT_SET", "PENDING", "SUBSCRIBED", "UNSUBSCRIBED"]).optional(),
133
+ deliverabilityStatus: z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).optional(),
134
+ _createdDate: z.date().describe("Date and time the email subscription was created.").optional().nullable(),
135
+ _updatedDate: z.date().describe("Date and time the email subscription was last updated.").optional().nullable()
136
+ })
137
+ ).min(1).max(100)
138
+ });
139
+ var BulkUpsertEmailSubscriptionResponse = z.object({
140
+ results: z.array(
141
+ z.object({
142
+ originalIndex: z.number().int().describe(
143
+ "Position of the requested email subscription in the bulk array."
144
+ ).optional(),
145
+ emailSubscription: z.object({
146
+ _id: z.string().describe("Email subscription ID.").regex(
147
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
148
+ "Must be a valid GUID"
149
+ ).optional().nullable(),
150
+ email: z.string().describe("Email address.").email().optional(),
151
+ subscriptionStatus: z.enum([
152
+ "UNKNOWN",
153
+ "NOT_SET",
154
+ "PENDING",
155
+ "SUBSCRIBED",
156
+ "UNSUBSCRIBED"
157
+ ]).describe(
158
+ "Indicates the recipient's opt-in or opt-out status\nfor marketing emails.\n\nDefault: `NOT_SET`."
159
+ ).optional(),
160
+ deliverabilityStatus: z.enum([
161
+ "NOT_SET",
162
+ "VALID",
163
+ "BOUNCED",
164
+ "SPAM_COMPLAINT",
165
+ "INACTIVE"
166
+ ]).describe(
167
+ "Indicates last reported status of sent emails.\n\nDefault: `NOT_SET`."
168
+ ).optional(),
169
+ _createdDate: z.date().describe("Date and time the email subscription was created.").optional().nullable(),
170
+ _updatedDate: z.date().describe(
171
+ "Date and time the email subscription was last updated."
172
+ ).optional().nullable()
173
+ }).describe("New or updated email subscription.").optional(),
174
+ error: z.object({
175
+ errorCode: z.string().describe("Error code.").optional(),
176
+ message: z.string().describe("Message that contains details about the error.").optional()
177
+ }).describe(
178
+ "Error information if the action failed.\nOmitted from successful actions."
179
+ ).optional()
180
+ })
181
+ ).optional(),
182
+ metadata: z.object({
183
+ totalSuccess: z.number().int().describe("Number of successful actions.").optional(),
184
+ totalFailure: z.number().int().describe("Number of failed actions.").optional()
185
+ }).describe("Numbers of successful and failed actions.").optional()
186
+ });
187
+ var GenerateUnsubscribeLinkRequest = z.object({
188
+ emailAddress: z.string().describe("Email address the unsubscribe link is for.").email(),
189
+ options: z.object({
190
+ metadata: z.record(z.string(), z.string()).describe("Arbitrary parameters for closing-the-loop.").optional(),
191
+ language: z.string().describe(
192
+ "Language for displaying unsubscribe confirmation page.\n\n2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n\nDefault: `EN`"
193
+ ).optional().nullable()
194
+ }).optional()
195
+ });
196
+ var GenerateUnsubscribeLinkResponse = z.object({
197
+ link: z.string().describe("The unsubscribe link.").optional()
198
+ });
199
+ // Annotate the CommonJS export names for ESM import in node:
200
+ 0 && (module.exports = {
201
+ BulkUpsertEmailSubscriptionRequest,
202
+ BulkUpsertEmailSubscriptionResponse,
203
+ GenerateUnsubscribeLinkRequest,
204
+ GenerateUnsubscribeLinkResponse,
205
+ QueryEmailSubscriptionsRequest,
206
+ QueryEmailSubscriptionsResponse,
207
+ UpsertEmailSubscriptionRequest,
208
+ UpsertEmailSubscriptionResponse
209
+ });
210
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../schemas.ts","../../src/emailsubscriptions-v1-emailsubscription-email-subscriptions.schemas.ts"],"sourcesContent":["export * from './src/emailsubscriptions-v1-emailsubscription-email-subscriptions.schemas.js';\n","import * as z from 'zod';\n\nexport const QueryEmailSubscriptionsRequest = z.object({\n filter: z\n .record(z.string(), z.any())\n .describe(\n 'Filter options.\\nCurrently, querying is supported on the `email` field\\nwith the `$in` array filter.'\n ),\n options: z\n .object({\n paging: z\n .object({\n limit: z\n .number()\n .int()\n .describe('Number of items to load.')\n .min(0)\n .optional()\n .nullable(),\n offset: z\n .number()\n .int()\n .describe('Number of items to skip in the current sort order.')\n .min(0)\n .optional()\n .nullable(),\n })\n .describe(\n 'Pagination options. For more information, see\\n[Pagination](https://dev.wix.com/api/rest/getting-started/pagination).'\n )\n .optional(),\n })\n .optional(),\n});\nexport const QueryEmailSubscriptionsResponse = z.object({\n subscriptions: z\n .array(\n z.object({\n _id: z\n .string()\n .describe('Email subscription ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n email: z.string().describe('Email address.').email().optional(),\n subscriptionStatus: z\n .enum(['UNKNOWN', 'NOT_SET', 'PENDING', 'SUBSCRIBED', 'UNSUBSCRIBED'])\n .describe(\n \"Indicates the recipient's opt-in or opt-out status\\nfor marketing emails.\\n\\nDefault: `NOT_SET`.\"\n )\n .optional(),\n deliverabilityStatus: z\n .enum(['NOT_SET', 'VALID', 'BOUNCED', 'SPAM_COMPLAINT', 'INACTIVE'])\n .describe(\n 'Indicates last reported status of sent emails.\\n\\nDefault: `NOT_SET`.'\n )\n .optional(),\n _createdDate: z\n .date()\n .describe('Date and time the email subscription was created.')\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe('Date and time the email subscription was last updated.')\n .optional()\n .nullable(),\n })\n )\n .optional(),\n metadata: z\n .object({\n count: z\n .number()\n .int()\n .describe('Number of items returned in the response.')\n .optional()\n .nullable(),\n offset: z\n .number()\n .int()\n .describe('Offset that was requested.')\n .optional()\n .nullable(),\n total: z\n .number()\n .int()\n .describe('Total number of items that match the query.')\n .optional()\n .nullable(),\n tooManyToCount: z\n .boolean()\n .describe(\n 'Flag that indicates the server failed to calculate the `total` field.'\n )\n .optional()\n .nullable(),\n })\n .describe('Metadata for the paginated results.')\n .optional(),\n});\nexport const UpsertEmailSubscriptionRequest = z.object({\n options: z\n .object({\n subscription: z\n .object({\n _id: z\n .string()\n .describe('Email subscription ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n email: z.string().describe('Email address.').email(),\n subscriptionStatus: z\n .enum([\n 'UNKNOWN',\n 'NOT_SET',\n 'PENDING',\n 'SUBSCRIBED',\n 'UNSUBSCRIBED',\n ])\n .optional(),\n deliverabilityStatus: z\n .enum(['NOT_SET', 'VALID', 'BOUNCED', 'SPAM_COMPLAINT', 'INACTIVE'])\n .optional(),\n _createdDate: z\n .date()\n .describe('Date and time the email subscription was created.')\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe('Date and time the email subscription was last updated.')\n .optional()\n .nullable(),\n })\n .describe('Email subscription to update or create.')\n .optional(),\n })\n .optional(),\n});\nexport const UpsertEmailSubscriptionResponse = z.object({\n subscription: z\n .object({\n _id: z\n .string()\n .describe('Email subscription ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n email: z.string().describe('Email address.').email().optional(),\n subscriptionStatus: z\n .enum(['UNKNOWN', 'NOT_SET', 'PENDING', 'SUBSCRIBED', 'UNSUBSCRIBED'])\n .describe(\n \"Indicates the recipient's opt-in or opt-out status\\nfor marketing emails.\\n\\nDefault: `NOT_SET`.\"\n )\n .optional(),\n deliverabilityStatus: z\n .enum(['NOT_SET', 'VALID', 'BOUNCED', 'SPAM_COMPLAINT', 'INACTIVE'])\n .describe(\n 'Indicates last reported status of sent emails.\\n\\nDefault: `NOT_SET`.'\n )\n .optional(),\n _createdDate: z\n .date()\n .describe('Date and time the email subscription was created.')\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe('Date and time the email subscription was last updated.')\n .optional()\n .nullable(),\n })\n .describe('Updated or created email subscription.')\n .optional(),\n});\nexport const BulkUpsertEmailSubscriptionRequest = z.object({\n subscriptions: z\n .array(\n z.object({\n _id: z\n .string()\n .describe('Email subscription ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n email: z.string().describe('Email address.').email().optional(),\n subscriptionStatus: z\n .enum(['UNKNOWN', 'NOT_SET', 'PENDING', 'SUBSCRIBED', 'UNSUBSCRIBED'])\n .optional(),\n deliverabilityStatus: z\n .enum(['NOT_SET', 'VALID', 'BOUNCED', 'SPAM_COMPLAINT', 'INACTIVE'])\n .optional(),\n _createdDate: z\n .date()\n .describe('Date and time the email subscription was created.')\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe('Date and time the email subscription was last updated.')\n .optional()\n .nullable(),\n })\n )\n .min(1)\n .max(100),\n});\nexport const BulkUpsertEmailSubscriptionResponse = z.object({\n results: z\n .array(\n z.object({\n originalIndex: z\n .number()\n .int()\n .describe(\n 'Position of the requested email subscription in the bulk array.'\n )\n .optional(),\n emailSubscription: z\n .object({\n _id: z\n .string()\n .describe('Email subscription ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n email: z.string().describe('Email address.').email().optional(),\n subscriptionStatus: z\n .enum([\n 'UNKNOWN',\n 'NOT_SET',\n 'PENDING',\n 'SUBSCRIBED',\n 'UNSUBSCRIBED',\n ])\n .describe(\n \"Indicates the recipient's opt-in or opt-out status\\nfor marketing emails.\\n\\nDefault: `NOT_SET`.\"\n )\n .optional(),\n deliverabilityStatus: z\n .enum([\n 'NOT_SET',\n 'VALID',\n 'BOUNCED',\n 'SPAM_COMPLAINT',\n 'INACTIVE',\n ])\n .describe(\n 'Indicates last reported status of sent emails.\\n\\nDefault: `NOT_SET`.'\n )\n .optional(),\n _createdDate: z\n .date()\n .describe('Date and time the email subscription was created.')\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe(\n 'Date and time the email subscription was last updated.'\n )\n .optional()\n .nullable(),\n })\n .describe('New or updated email subscription.')\n .optional(),\n error: z\n .object({\n errorCode: z.string().describe('Error code.').optional(),\n message: z\n .string()\n .describe('Message that contains details about the error.')\n .optional(),\n })\n .describe(\n 'Error information if the action failed.\\nOmitted from successful actions.'\n )\n .optional(),\n })\n )\n .optional(),\n metadata: z\n .object({\n totalSuccess: z\n .number()\n .int()\n .describe('Number of successful actions.')\n .optional(),\n totalFailure: z\n .number()\n .int()\n .describe('Number of failed actions.')\n .optional(),\n })\n .describe('Numbers of successful and failed actions.')\n .optional(),\n});\nexport const GenerateUnsubscribeLinkRequest = z.object({\n emailAddress: z\n .string()\n .describe('Email address the unsubscribe link is for.')\n .email(),\n options: z\n .object({\n metadata: z\n .record(z.string(), z.string())\n .describe('Arbitrary parameters for closing-the-loop.')\n .optional(),\n language: z\n .string()\n .describe(\n 'Language for displaying unsubscribe confirmation page.\\n\\n2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\\n\\nDefault: `EN`'\n )\n .optional()\n .nullable(),\n })\n .optional(),\n});\nexport const GenerateUnsubscribeLinkResponse = z.object({\n link: z.string().describe('The unsubscribe link.').optional(),\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,QAAmB;AAEZ,IAAM,iCAAmC,SAAO;AAAA,EACrD,QACG,SAAS,SAAO,GAAK,MAAI,CAAC,EAC1B;AAAA,IACC;AAAA,EACF;AAAA,EACF,SACG,SAAO;AAAA,IACN,QACG,SAAO;AAAA,MACN,OACG,SAAO,EACP,IAAI,EACJ,SAAS,0BAA0B,EACnC,IAAI,CAAC,EACL,SAAS,EACT,SAAS;AAAA,MACZ,QACG,SAAO,EACP,IAAI,EACJ,SAAS,oDAAoD,EAC7D,IAAI,CAAC,EACL,SAAS,EACT,SAAS;AAAA,IACd,CAAC,EACA;AAAA,MACC;AAAA,IACF,EACC,SAAS;AAAA,EACd,CAAC,EACA,SAAS;AACd,CAAC;AACM,IAAM,kCAAoC,SAAO;AAAA,EACtD,eACG;AAAA,IACG,SAAO;AAAA,MACP,KACG,SAAO,EACP,SAAS,wBAAwB,EACjC;AAAA,QACC;AAAA,QACA;AAAA,MACF,EACC,SAAS,EACT,SAAS;AAAA,MACZ,OAAS,SAAO,EAAE,SAAS,gBAAgB,EAAE,MAAM,EAAE,SAAS;AAAA,MAC9D,oBACG,OAAK,CAAC,WAAW,WAAW,WAAW,cAAc,cAAc,CAAC,EACpE;AAAA,QACC;AAAA,MACF,EACC,SAAS;AAAA,MACZ,sBACG,OAAK,CAAC,WAAW,SAAS,WAAW,kBAAkB,UAAU,CAAC,EAClE;AAAA,QACC;AAAA,M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