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