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