@wix/email-subscriptions 1.0.22 → 1.0.24

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.
@@ -1,401 +0,0 @@
1
- interface EmailSubscription$1 {
2
- /**
3
- * Email subscription ID.
4
- * @readonly
5
- */
6
- id?: string | null;
7
- /** Email address. */
8
- email?: string;
9
- /**
10
- * Indicates the recipient's opt-in or opt-out status
11
- * for marketing emails.
12
- *
13
- * - `NOT_SET`: No status specified. This is the default, initial value before any info about the email address is known.
14
- * - `PENDING`: Subscription confirmation was requested,
15
- * but recipient hasn't confirmed yet.
16
- * - `SUBSCRIBED`: Recipient has opted in to marketing emails.
17
- * - `UNSUBSCRIBED`: Recipient has opted out of marketing emails.
18
- *
19
- * Defaults to `NOT_SET`.
20
- */
21
- subscriptionStatus?: SubscriptionEnumStatus$1;
22
- /**
23
- * Indicates last reported status of sent emails.
24
- *
25
- * - `NOT_SET`: No status specified. This is the default, initial value before any info about the email address is known.
26
- * - `VALID`: Emails to this email address are being delivered successfully.
27
- * - `BOUNCED`: The last email to the recipient bounced or was rejected.
28
- * - `SPAM_COMPLAINT`: The recipient registered a spam complaint
29
- * with their email provider.
30
- * - `INACTIVE`: Multiple campaigns have been delivered to this address without any engagement from the recipient. (No emails were opened and no content was clicked.)
31
- * This status might impact subsequent emails sent to this address.
32
- *
33
- * Defaults to `NOT_SET`.
34
- */
35
- deliverabilityStatus?: Status$1;
36
- /**
37
- * Date and time the email subscription was created.
38
- * @readonly
39
- */
40
- createdDate?: Date;
41
- /**
42
- * Date and time the email subscription was last updated.
43
- * @readonly
44
- */
45
- updatedDate?: Date;
46
- }
47
- declare enum SubscriptionEnumStatus$1 {
48
- UNKNOWN = "UNKNOWN",
49
- /** No Subscription exists */
50
- NOT_SET = "NOT_SET",
51
- /** Pending Subscription */
52
- PENDING = "PENDING",
53
- /** Subscribed */
54
- SUBSCRIBED = "SUBSCRIBED",
55
- /** UnSubscribed */
56
- UNSUBSCRIBED = "UNSUBSCRIBED"
57
- }
58
- declare enum Status$1 {
59
- NOT_SET = "NOT_SET",
60
- /** valid/deferral */
61
- VALID = "VALID",
62
- /** bounced/rejected/invalid */
63
- BOUNCED = "BOUNCED",
64
- /** spam/complaint */
65
- SPAM_COMPLAINT = "SPAM_COMPLAINT",
66
- /** valid, but no activity reported */
67
- INACTIVE = "INACTIVE"
68
- }
69
- interface QueryEmailSubscriptionsRequest$1 {
70
- /**
71
- * Filter options.
72
- * Currently, querying is supported on the `email` field
73
- * with the `$in` array filter.
74
- */
75
- filter: Record<string, any> | null;
76
- /**
77
- * Pagination options. For more information, see
78
- * [Pagination](https://dev.wix.com/api/rest/getting-started/pagination).
79
- */
80
- paging?: Paging$1;
81
- }
82
- interface Paging$1 {
83
- /** Number of items to load. */
84
- limit?: number | null;
85
- /** Number of items to skip in the current sort order. */
86
- offset?: number | null;
87
- }
88
- interface QueryEmailSubscriptionsResponse$1 {
89
- /** List of subscribed emails that matched the query options. */
90
- subscriptions?: EmailSubscription$1[];
91
- /** Metadata for the paginated results. */
92
- metadata?: PagingMetadata$1;
93
- }
94
- interface PagingMetadata$1 {
95
- /** Number of items returned in the response. */
96
- count?: number | null;
97
- /** Offset that was requested. */
98
- offset?: number | null;
99
- /** Total number of items that match the query. */
100
- total?: number | null;
101
- /** Flag that indicates the server failed to calculate the `total` field. */
102
- tooManyToCount?: boolean | null;
103
- }
104
- interface UpsertEmailSubscriptionRequest$1 {
105
- /** Email subscription to update or create. */
106
- subscription?: EmailSubscription$1;
107
- }
108
- interface UpsertEmailSubscriptionResponse$1 {
109
- /** Updated or created email subscription. */
110
- subscription?: EmailSubscription$1;
111
- }
112
- interface BulkUpsertEmailSubscriptionRequest$1 {
113
- /** List of email subscriptions to update or create. */
114
- subscriptions: EmailSubscription$1[];
115
- }
116
- interface BulkUpsertEmailSubscriptionResponse$1 {
117
- /** List of updated or created email subscriptions. */
118
- results?: BulkUpsertEmailSubscriptionResult$1[];
119
- /** Numbers of successful and failed actions. */
120
- metadata?: Metadata$1;
121
- }
122
- interface BulkUpsertEmailSubscriptionResult$1 {
123
- /** Position of the requested email subscription in the bulk array. */
124
- originalIndex?: number;
125
- /** New or updated email subscription. */
126
- emailSubscription?: EmailSubscription$1;
127
- /**
128
- * Error information if the action failed.
129
- * Omitted from successful actions.
130
- */
131
- error?: Error$1;
132
- }
133
- interface Error$1 {
134
- /** Error code. */
135
- errorCode?: string;
136
- /** Message that contains details about the error. */
137
- message?: string;
138
- }
139
- interface Metadata$1 {
140
- /** Number of successful actions. */
141
- totalSuccess?: number;
142
- /** Number of failed actions. */
143
- totalFailure?: number;
144
- }
145
- interface GenerateUnsubscribeLinkRequest$1 {
146
- /** Email address the unsubscribe link is for. */
147
- emailAddress: string;
148
- /** Arbitrary parameters for closing-the-loop. */
149
- metadata?: Record<string, string>;
150
- /** Language for displaying unsubscribe confirmation page (optional - default EN). */
151
- language?: string | null;
152
- }
153
- interface GenerateUnsubscribeLinkResponse$1 {
154
- /** The unsubscribe link. */
155
- link?: string;
156
- }
157
- interface EmailSubscriptionNonNullableFields$1 {
158
- email: string;
159
- subscriptionStatus: SubscriptionEnumStatus$1;
160
- deliverabilityStatus: Status$1;
161
- }
162
- interface QueryEmailSubscriptionsResponseNonNullableFields$1 {
163
- subscriptions: EmailSubscriptionNonNullableFields$1[];
164
- }
165
- interface UpsertEmailSubscriptionResponseNonNullableFields$1 {
166
- subscription?: EmailSubscriptionNonNullableFields$1;
167
- }
168
- interface ErrorNonNullableFields$1 {
169
- errorCode: string;
170
- message: string;
171
- }
172
- interface BulkUpsertEmailSubscriptionResultNonNullableFields$1 {
173
- originalIndex: number;
174
- emailSubscription?: EmailSubscriptionNonNullableFields$1;
175
- error?: ErrorNonNullableFields$1;
176
- }
177
- interface MetadataNonNullableFields$1 {
178
- totalSuccess: number;
179
- totalFailure: number;
180
- }
181
- interface BulkUpsertEmailSubscriptionResponseNonNullableFields$1 {
182
- results: BulkUpsertEmailSubscriptionResultNonNullableFields$1[];
183
- metadata?: MetadataNonNullableFields$1;
184
- }
185
- interface GenerateUnsubscribeLinkResponseNonNullableFields$1 {
186
- link: string;
187
- }
188
-
189
- interface EmailSubscription {
190
- /**
191
- * Email subscription ID.
192
- * @readonly
193
- */
194
- _id?: string | null;
195
- /** Email address. */
196
- email?: string;
197
- /**
198
- * Indicates the recipient's opt-in or opt-out status
199
- * for marketing emails.
200
- *
201
- * - `NOT_SET`: No status specified. This is the default, initial value before any info about the email address is known.
202
- * - `PENDING`: Subscription confirmation was requested,
203
- * but recipient hasn't confirmed yet.
204
- * - `SUBSCRIBED`: Recipient has opted in to marketing emails.
205
- * - `UNSUBSCRIBED`: Recipient has opted out of marketing emails.
206
- *
207
- * Defaults to `NOT_SET`.
208
- */
209
- subscriptionStatus?: SubscriptionEnumStatus;
210
- /**
211
- * Indicates last reported status of sent emails.
212
- *
213
- * - `NOT_SET`: No status specified. This is the default, initial value before any info about the email address is known.
214
- * - `VALID`: Emails to this email address are being delivered successfully.
215
- * - `BOUNCED`: The last email to the recipient bounced or was rejected.
216
- * - `SPAM_COMPLAINT`: The recipient registered a spam complaint
217
- * with their email provider.
218
- * - `INACTIVE`: Multiple campaigns have been delivered to this address without any engagement from the recipient. (No emails were opened and no content was clicked.)
219
- * This status might impact subsequent emails sent to this address.
220
- *
221
- * Defaults to `NOT_SET`.
222
- */
223
- deliverabilityStatus?: Status;
224
- /**
225
- * Date and time the email subscription was created.
226
- * @readonly
227
- */
228
- _createdDate?: Date;
229
- /**
230
- * Date and time the email subscription was last updated.
231
- * @readonly
232
- */
233
- _updatedDate?: Date;
234
- }
235
- declare enum SubscriptionEnumStatus {
236
- UNKNOWN = "UNKNOWN",
237
- /** No Subscription exists */
238
- NOT_SET = "NOT_SET",
239
- /** Pending Subscription */
240
- PENDING = "PENDING",
241
- /** Subscribed */
242
- SUBSCRIBED = "SUBSCRIBED",
243
- /** UnSubscribed */
244
- UNSUBSCRIBED = "UNSUBSCRIBED"
245
- }
246
- declare enum Status {
247
- NOT_SET = "NOT_SET",
248
- /** valid/deferral */
249
- VALID = "VALID",
250
- /** bounced/rejected/invalid */
251
- BOUNCED = "BOUNCED",
252
- /** spam/complaint */
253
- SPAM_COMPLAINT = "SPAM_COMPLAINT",
254
- /** valid, but no activity reported */
255
- INACTIVE = "INACTIVE"
256
- }
257
- interface QueryEmailSubscriptionsRequest {
258
- /**
259
- * Filter options.
260
- * Currently, querying is supported on the `email` field
261
- * with the `$in` array filter.
262
- */
263
- filter: Record<string, any> | null;
264
- /**
265
- * Pagination options. For more information, see
266
- * [Pagination](https://dev.wix.com/api/rest/getting-started/pagination).
267
- */
268
- paging?: Paging;
269
- }
270
- interface Paging {
271
- /** Number of items to load. */
272
- limit?: number | null;
273
- /** Number of items to skip in the current sort order. */
274
- offset?: number | null;
275
- }
276
- interface QueryEmailSubscriptionsResponse {
277
- /** List of subscribed emails that matched the query options. */
278
- subscriptions?: EmailSubscription[];
279
- /** Metadata for the paginated results. */
280
- metadata?: PagingMetadata;
281
- }
282
- interface PagingMetadata {
283
- /** Number of items returned in the response. */
284
- count?: number | null;
285
- /** Offset that was requested. */
286
- offset?: number | null;
287
- /** Total number of items that match the query. */
288
- total?: number | null;
289
- /** Flag that indicates the server failed to calculate the `total` field. */
290
- tooManyToCount?: boolean | null;
291
- }
292
- interface UpsertEmailSubscriptionRequest {
293
- /** Email subscription to update or create. */
294
- subscription?: EmailSubscription;
295
- }
296
- interface UpsertEmailSubscriptionResponse {
297
- /** Updated or created email subscription. */
298
- subscription?: EmailSubscription;
299
- }
300
- interface BulkUpsertEmailSubscriptionRequest {
301
- /** List of email subscriptions to update or create. */
302
- subscriptions: EmailSubscription[];
303
- }
304
- interface BulkUpsertEmailSubscriptionResponse {
305
- /** List of updated or created email subscriptions. */
306
- results?: BulkUpsertEmailSubscriptionResult[];
307
- /** Numbers of successful and failed actions. */
308
- metadata?: Metadata;
309
- }
310
- interface BulkUpsertEmailSubscriptionResult {
311
- /** Position of the requested email subscription in the bulk array. */
312
- originalIndex?: number;
313
- /** New or updated email subscription. */
314
- emailSubscription?: EmailSubscription;
315
- /**
316
- * Error information if the action failed.
317
- * Omitted from successful actions.
318
- */
319
- error?: Error;
320
- }
321
- interface Error {
322
- /** Error code. */
323
- errorCode?: string;
324
- /** Message that contains details about the error. */
325
- message?: string;
326
- }
327
- interface Metadata {
328
- /** Number of successful actions. */
329
- totalSuccess?: number;
330
- /** Number of failed actions. */
331
- totalFailure?: number;
332
- }
333
- interface GenerateUnsubscribeLinkRequest {
334
- /** Email address the unsubscribe link is for. */
335
- emailAddress: string;
336
- /** Arbitrary parameters for closing-the-loop. */
337
- metadata?: Record<string, string>;
338
- /** Language for displaying unsubscribe confirmation page (optional - default EN). */
339
- language?: string | null;
340
- }
341
- interface GenerateUnsubscribeLinkResponse {
342
- /** The unsubscribe link. */
343
- link?: string;
344
- }
345
- interface EmailSubscriptionNonNullableFields {
346
- email: string;
347
- subscriptionStatus: SubscriptionEnumStatus;
348
- deliverabilityStatus: Status;
349
- }
350
- interface QueryEmailSubscriptionsResponseNonNullableFields {
351
- subscriptions: EmailSubscriptionNonNullableFields[];
352
- }
353
- interface UpsertEmailSubscriptionResponseNonNullableFields {
354
- subscription?: EmailSubscriptionNonNullableFields;
355
- }
356
- interface ErrorNonNullableFields {
357
- errorCode: string;
358
- message: string;
359
- }
360
- interface BulkUpsertEmailSubscriptionResultNonNullableFields {
361
- originalIndex: number;
362
- emailSubscription?: EmailSubscriptionNonNullableFields;
363
- error?: ErrorNonNullableFields;
364
- }
365
- interface MetadataNonNullableFields {
366
- totalSuccess: number;
367
- totalFailure: number;
368
- }
369
- interface BulkUpsertEmailSubscriptionResponseNonNullableFields {
370
- results: BulkUpsertEmailSubscriptionResultNonNullableFields[];
371
- metadata?: MetadataNonNullableFields;
372
- }
373
- interface GenerateUnsubscribeLinkResponseNonNullableFields {
374
- link: string;
375
- }
376
-
377
- type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
378
- getUrl: (context: any) => string;
379
- httpMethod: K;
380
- path: string;
381
- pathParams: M;
382
- __requestType: T;
383
- __originalRequestType: S;
384
- __responseType: Q;
385
- __originalResponseType: R;
386
- };
387
- declare function queryEmailSubscriptions(): __PublicMethodMetaInfo<'POST', {}, QueryEmailSubscriptionsRequest, QueryEmailSubscriptionsRequest$1, QueryEmailSubscriptionsResponse & QueryEmailSubscriptionsResponseNonNullableFields, QueryEmailSubscriptionsResponse$1 & QueryEmailSubscriptionsResponseNonNullableFields$1>;
388
- declare function upsertEmailSubscription(): __PublicMethodMetaInfo<'POST', {}, UpsertEmailSubscriptionRequest, UpsertEmailSubscriptionRequest$1, UpsertEmailSubscriptionResponse & UpsertEmailSubscriptionResponseNonNullableFields, UpsertEmailSubscriptionResponse$1 & UpsertEmailSubscriptionResponseNonNullableFields$1>;
389
- declare function bulkUpsertEmailSubscription(): __PublicMethodMetaInfo<'POST', {}, BulkUpsertEmailSubscriptionRequest, BulkUpsertEmailSubscriptionRequest$1, BulkUpsertEmailSubscriptionResponse & BulkUpsertEmailSubscriptionResponseNonNullableFields, BulkUpsertEmailSubscriptionResponse$1 & BulkUpsertEmailSubscriptionResponseNonNullableFields$1>;
390
- declare function generateUnsubscribeLink(): __PublicMethodMetaInfo<'POST', {}, GenerateUnsubscribeLinkRequest, GenerateUnsubscribeLinkRequest$1, GenerateUnsubscribeLinkResponse & GenerateUnsubscribeLinkResponseNonNullableFields, GenerateUnsubscribeLinkResponse$1 & GenerateUnsubscribeLinkResponseNonNullableFields$1>;
391
-
392
- type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
393
- declare const meta_bulkUpsertEmailSubscription: typeof bulkUpsertEmailSubscription;
394
- declare const meta_generateUnsubscribeLink: typeof generateUnsubscribeLink;
395
- declare const meta_queryEmailSubscriptions: typeof queryEmailSubscriptions;
396
- declare const meta_upsertEmailSubscription: typeof upsertEmailSubscription;
397
- declare namespace meta {
398
- export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_bulkUpsertEmailSubscription as bulkUpsertEmailSubscription, meta_generateUnsubscribeLink as generateUnsubscribeLink, meta_queryEmailSubscriptions as queryEmailSubscriptions, meta_upsertEmailSubscription as upsertEmailSubscription };
399
- }
400
-
401
- export { meta as emailSubscriptions };