@wix/auto_sdk_email-subscriptions_email-subscriptions 1.0.0 → 1.0.2
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/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.context.d.ts +1 -1
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.http.d.ts +3 -3
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.http.js +3 -3
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.public.d.ts +3 -3
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.types.d.ts +110 -48
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.types.js +8 -10
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.types.js.map +1 -1
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.universal.d.ts +129 -54
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.universal.js +11 -13
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.universal.js.map +1 -1
- package/build/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.context.d.ts +1 -1
- package/build/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.http.d.ts +3 -3
- package/build/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.http.js +3 -3
- package/build/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.public.d.ts +3 -3
- package/build/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.types.d.ts +110 -48
- package/build/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.types.js +8 -10
- package/build/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.types.js.map +1 -1
- package/build/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.universal.d.ts +129 -54
- package/build/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.universal.js +11 -13
- package/build/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.universal.js.map +1 -1
- package/build/internal/cjs/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.context.d.ts +1 -1
- package/build/internal/cjs/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.http.d.ts +3 -3
- package/build/internal/cjs/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.http.js +3 -3
- package/build/internal/cjs/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.public.d.ts +3 -3
- package/build/internal/cjs/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.types.d.ts +110 -48
- package/build/internal/cjs/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.types.js +8 -10
- package/build/internal/cjs/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.types.js.map +1 -1
- package/build/internal/cjs/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.universal.d.ts +129 -54
- package/build/internal/cjs/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.universal.js +11 -13
- package/build/internal/cjs/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.universal.js.map +1 -1
- package/build/internal/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.context.d.ts +1 -1
- package/build/internal/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.http.d.ts +3 -3
- package/build/internal/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.http.js +3 -3
- package/build/internal/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.public.d.ts +3 -3
- package/build/internal/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.types.d.ts +110 -48
- package/build/internal/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.types.js +8 -10
- package/build/internal/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.types.js.map +1 -1
- package/build/internal/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.universal.d.ts +129 -54
- package/build/internal/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.universal.js +11 -13
- package/build/internal/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.universal.js.map +1 -1
- package/package.json +2 -2
package/build/internal/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.types.d.ts
CHANGED
@@ -1,22 +1,40 @@
|
|
1
1
|
export interface EmailSubscription {
|
2
2
|
/**
|
3
3
|
* Email subscription ID.
|
4
|
+
* @format GUID
|
4
5
|
* @readonly
|
5
6
|
*/
|
6
7
|
id?: string | null;
|
7
|
-
/**
|
8
|
+
/**
|
9
|
+
* Email address.
|
10
|
+
* @format EMAIL
|
11
|
+
*/
|
8
12
|
email?: string;
|
9
13
|
/**
|
10
14
|
* Indicates the recipient's opt-in or opt-out status
|
11
15
|
* for marketing emails.
|
12
16
|
*
|
13
|
-
*
|
17
|
+
* - `NOT_SET`: No status specified. This is the default, initial value before any info about the email address is known.
|
18
|
+
* - `PENDING`: Subscription confirmation was requested,
|
19
|
+
* but recipient hasn't confirmed yet.
|
20
|
+
* - `SUBSCRIBED`: Recipient has opted in to marketing emails.
|
21
|
+
* - `UNSUBSCRIBED`: Recipient has opted out of marketing emails.
|
22
|
+
*
|
23
|
+
* Defaults to `NOT_SET`.
|
14
24
|
*/
|
15
25
|
subscriptionStatus?: SubscriptionEnumStatus;
|
16
26
|
/**
|
17
27
|
* Indicates last reported status of sent emails.
|
18
28
|
*
|
19
|
-
*
|
29
|
+
* - `NOT_SET`: No status specified. This is the default, initial value before any info about the email address is known.
|
30
|
+
* - `VALID`: Emails to this email address are being delivered successfully.
|
31
|
+
* - `BOUNCED`: The last email to the recipient bounced or was rejected.
|
32
|
+
* - `SPAM_COMPLAINT`: The recipient registered a spam complaint
|
33
|
+
* with their email provider.
|
34
|
+
* - `INACTIVE`: Multiple campaigns have been delivered to this address without any engagement from the recipient. (No emails were opened and no content was clicked.)
|
35
|
+
* This status might impact subsequent emails sent to this address.
|
36
|
+
*
|
37
|
+
* Defaults to `NOT_SET`.
|
20
38
|
*/
|
21
39
|
deliverabilityStatus?: Status;
|
22
40
|
/**
|
@@ -31,55 +49,34 @@ export interface EmailSubscription {
|
|
31
49
|
updatedDate?: Date | null;
|
32
50
|
}
|
33
51
|
export declare enum SubscriptionEnumStatus {
|
34
|
-
/** Undefined status. */
|
35
52
|
UNKNOWN = "UNKNOWN",
|
36
|
-
/** No
|
53
|
+
/** No Subscription exists */
|
37
54
|
NOT_SET = "NOT_SET",
|
38
|
-
/** Subscription
|
55
|
+
/** Pending Subscription */
|
39
56
|
PENDING = "PENDING",
|
40
|
-
/**
|
57
|
+
/** Subscribed */
|
41
58
|
SUBSCRIBED = "SUBSCRIBED",
|
42
|
-
/**
|
59
|
+
/** UnSubscribed */
|
43
60
|
UNSUBSCRIBED = "UNSUBSCRIBED"
|
44
61
|
}
|
45
62
|
export declare enum Status {
|
46
|
-
/** No status specified. This is the initial default value before any info about the email address is known. */
|
47
63
|
NOT_SET = "NOT_SET",
|
48
|
-
/**
|
64
|
+
/** valid/deferral */
|
49
65
|
VALID = "VALID",
|
50
|
-
/**
|
66
|
+
/** bounced/rejected/invalid */
|
51
67
|
BOUNCED = "BOUNCED",
|
52
|
-
/**
|
68
|
+
/** spam/complaint */
|
53
69
|
SPAM_COMPLAINT = "SPAM_COMPLAINT",
|
54
|
-
/**
|
70
|
+
/** valid, but no activity reported */
|
55
71
|
INACTIVE = "INACTIVE"
|
56
72
|
}
|
57
|
-
|
58
|
-
/** Payload */
|
59
|
-
payload?: string;
|
60
|
-
/** Language */
|
61
|
-
language?: string | null;
|
62
|
-
}
|
63
|
-
export interface RawHttpResponse {
|
64
|
-
body?: Uint8Array;
|
65
|
-
statusCode?: number | null;
|
66
|
-
headers?: HeadersEntry[];
|
67
|
-
}
|
68
|
-
export interface HeadersEntry {
|
69
|
-
key?: string;
|
70
|
-
value?: string;
|
71
|
-
}
|
72
|
-
export interface V1ConfirmUnsubscribeActionRequest {
|
73
|
-
/** Payload */
|
74
|
-
payload?: string;
|
75
|
-
}
|
76
|
-
export interface Empty {
|
77
|
-
}
|
73
|
+
/** Triggered when an email subscription's status is changed. */
|
78
74
|
export interface EmailSubscriptionChanged {
|
79
|
-
/** subscription */
|
75
|
+
/** Email subscription that changed. */
|
80
76
|
subscription?: EmailSubscription;
|
81
77
|
}
|
82
78
|
export interface GetEmailSubscriptionRequest {
|
79
|
+
/** @format GUID */
|
83
80
|
id: string;
|
84
81
|
}
|
85
82
|
export interface GetEmailSubscriptionResponse {
|
@@ -138,7 +135,11 @@ export interface UpsertEmailSubscriptionResponse {
|
|
138
135
|
subscription?: EmailSubscription;
|
139
136
|
}
|
140
137
|
export interface BulkUpsertEmailSubscriptionRequest {
|
141
|
-
/**
|
138
|
+
/**
|
139
|
+
* List of email subscriptions to update or create.
|
140
|
+
* @minSize 1
|
141
|
+
* @maxSize 100
|
142
|
+
*/
|
142
143
|
subscriptions: EmailSubscription[];
|
143
144
|
}
|
144
145
|
export interface BulkUpsertEmailSubscriptionResponse {
|
@@ -171,11 +172,21 @@ export interface Metadata {
|
|
171
172
|
totalFailure?: number;
|
172
173
|
}
|
173
174
|
export interface GenerateUnsubscribeLinkRequest {
|
174
|
-
/**
|
175
|
+
/**
|
176
|
+
* Email address the unsubscribe link is for.
|
177
|
+
* @format EMAIL
|
178
|
+
*/
|
175
179
|
emailAddress: string;
|
176
180
|
/** Arbitrary parameters for closing-the-loop. */
|
177
181
|
metadata?: Record<string, string>;
|
178
|
-
/**
|
182
|
+
/**
|
183
|
+
* Language for displaying unsubscribe confirmation page.
|
184
|
+
*
|
185
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
186
|
+
*
|
187
|
+
* Default: `EN`
|
188
|
+
* @format LANGUAGE
|
189
|
+
*/
|
179
190
|
language?: string | null;
|
180
191
|
}
|
181
192
|
export interface GenerateUnsubscribeLinkResponse {
|
@@ -188,10 +199,21 @@ export interface RenderUnsubscribePageRequest {
|
|
188
199
|
/** Language */
|
189
200
|
language?: string | null;
|
190
201
|
}
|
202
|
+
export interface RawHttpResponse {
|
203
|
+
body?: Uint8Array;
|
204
|
+
statusCode?: number | null;
|
205
|
+
headers?: HeadersEntry[];
|
206
|
+
}
|
207
|
+
export interface HeadersEntry {
|
208
|
+
key?: string;
|
209
|
+
value?: string;
|
210
|
+
}
|
191
211
|
export interface ConfirmUnsubscribeActionRequest {
|
192
212
|
/** Payload */
|
193
213
|
payload?: string;
|
194
214
|
}
|
215
|
+
export interface Empty {
|
216
|
+
}
|
195
217
|
export interface DomainEvent extends DomainEventBodyOneOf {
|
196
218
|
createdEvent?: EntityCreatedEvent;
|
197
219
|
updatedEvent?: EntityUpdatedEvent;
|
@@ -265,9 +287,15 @@ export interface ActionEvent {
|
|
265
287
|
bodyAsJson?: string;
|
266
288
|
}
|
267
289
|
export interface MessageEnvelope {
|
268
|
-
/**
|
290
|
+
/**
|
291
|
+
* App instance ID.
|
292
|
+
* @format GUID
|
293
|
+
*/
|
269
294
|
instanceId?: string | null;
|
270
|
-
/**
|
295
|
+
/**
|
296
|
+
* Event type.
|
297
|
+
* @maxLength 150
|
298
|
+
*/
|
271
299
|
eventType?: string;
|
272
300
|
/** The identification type and identity data. */
|
273
301
|
identity?: IdentificationData;
|
@@ -275,26 +303,50 @@ export interface MessageEnvelope {
|
|
275
303
|
data?: string;
|
276
304
|
}
|
277
305
|
export interface IdentificationData extends IdentificationDataIdOneOf {
|
278
|
-
/**
|
306
|
+
/**
|
307
|
+
* ID of a site visitor that has not logged in to the site.
|
308
|
+
* @format GUID
|
309
|
+
*/
|
279
310
|
anonymousVisitorId?: string;
|
280
|
-
/**
|
311
|
+
/**
|
312
|
+
* ID of a site visitor that has logged in to the site.
|
313
|
+
* @format GUID
|
314
|
+
*/
|
281
315
|
memberId?: string;
|
282
|
-
/**
|
316
|
+
/**
|
317
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
318
|
+
* @format GUID
|
319
|
+
*/
|
283
320
|
wixUserId?: string;
|
284
|
-
/**
|
321
|
+
/**
|
322
|
+
* ID of an app.
|
323
|
+
* @format GUID
|
324
|
+
*/
|
285
325
|
appId?: string;
|
286
326
|
/** @readonly */
|
287
327
|
identityType?: WebhookIdentityType;
|
288
328
|
}
|
289
329
|
/** @oneof */
|
290
330
|
export interface IdentificationDataIdOneOf {
|
291
|
-
/**
|
331
|
+
/**
|
332
|
+
* ID of a site visitor that has not logged in to the site.
|
333
|
+
* @format GUID
|
334
|
+
*/
|
292
335
|
anonymousVisitorId?: string;
|
293
|
-
/**
|
336
|
+
/**
|
337
|
+
* ID of a site visitor that has logged in to the site.
|
338
|
+
* @format GUID
|
339
|
+
*/
|
294
340
|
memberId?: string;
|
295
|
-
/**
|
341
|
+
/**
|
342
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
343
|
+
* @format GUID
|
344
|
+
*/
|
296
345
|
wixUserId?: string;
|
297
|
-
/**
|
346
|
+
/**
|
347
|
+
* ID of an app.
|
348
|
+
* @format GUID
|
349
|
+
*/
|
298
350
|
appId?: string;
|
299
351
|
}
|
300
352
|
export declare enum WebhookIdentityType {
|
@@ -304,6 +356,16 @@ export declare enum WebhookIdentityType {
|
|
304
356
|
WIX_USER = "WIX_USER",
|
305
357
|
APP = "APP"
|
306
358
|
}
|
359
|
+
export interface V1RenderUnsubscribePageRequest {
|
360
|
+
/** Payload */
|
361
|
+
payload?: string;
|
362
|
+
/** Language */
|
363
|
+
language?: string | null;
|
364
|
+
}
|
365
|
+
export interface V1ConfirmUnsubscribeActionRequest {
|
366
|
+
/** Payload */
|
367
|
+
payload?: string;
|
368
|
+
}
|
307
369
|
interface EmailSubscriptionNonNullableFields {
|
308
370
|
email: string;
|
309
371
|
subscriptionStatus: SubscriptionEnumStatus;
|
package/build/internal/es/src/emailsubscriptions-v1-emailsubscription-email-subscriptions.types.js
CHANGED
@@ -1,27 +1,25 @@
|
|
1
1
|
export var SubscriptionEnumStatus;
|
2
2
|
(function (SubscriptionEnumStatus) {
|
3
|
-
/** Undefined status. */
|
4
3
|
SubscriptionEnumStatus["UNKNOWN"] = "UNKNOWN";
|
5
|
-
/** No
|
4
|
+
/** No Subscription exists */
|
6
5
|
SubscriptionEnumStatus["NOT_SET"] = "NOT_SET";
|
7
|
-
/** Subscription
|
6
|
+
/** Pending Subscription */
|
8
7
|
SubscriptionEnumStatus["PENDING"] = "PENDING";
|
9
|
-
/**
|
8
|
+
/** Subscribed */
|
10
9
|
SubscriptionEnumStatus["SUBSCRIBED"] = "SUBSCRIBED";
|
11
|
-
/**
|
10
|
+
/** UnSubscribed */
|
12
11
|
SubscriptionEnumStatus["UNSUBSCRIBED"] = "UNSUBSCRIBED";
|
13
12
|
})(SubscriptionEnumStatus || (SubscriptionEnumStatus = {}));
|
14
13
|
export var Status;
|
15
14
|
(function (Status) {
|
16
|
-
/** No status specified. This is the initial default value before any info about the email address is known. */
|
17
15
|
Status["NOT_SET"] = "NOT_SET";
|
18
|
-
/**
|
16
|
+
/** valid/deferral */
|
19
17
|
Status["VALID"] = "VALID";
|
20
|
-
/**
|
18
|
+
/** bounced/rejected/invalid */
|
21
19
|
Status["BOUNCED"] = "BOUNCED";
|
22
|
-
/**
|
20
|
+
/** spam/complaint */
|
23
21
|
Status["SPAM_COMPLAINT"] = "SPAM_COMPLAINT";
|
24
|
-
/**
|
22
|
+
/** valid, but no activity reported */
|
25
23
|
Status["INACTIVE"] = "INACTIVE";
|
26
24
|
})(Status || (Status = {}));
|
27
25
|
export var WebhookIdentityType;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"emailsubscriptions-v1-emailsubscription-email-subscriptions.types.js","sourceRoot":"","sources":["../../../../src/emailsubscriptions-v1-emailsubscription-email-subscriptions.types.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"emailsubscriptions-v1-emailsubscription-email-subscriptions.types.js","sourceRoot":"","sources":["../../../../src/emailsubscriptions-v1-emailsubscription-email-subscriptions.types.ts"],"names":[],"mappings":"AAmDA,MAAM,CAAN,IAAY,sBAUX;AAVD,WAAY,sBAAsB;IAChC,6CAAmB,CAAA;IACnB,6BAA6B;IAC7B,6CAAmB,CAAA;IACnB,2BAA2B;IAC3B,6CAAmB,CAAA;IACnB,iBAAiB;IACjB,mDAAyB,CAAA;IACzB,mBAAmB;IACnB,uDAA6B,CAAA;AAC/B,CAAC,EAVW,sBAAsB,KAAtB,sBAAsB,QAUjC;AAED,MAAM,CAAN,IAAY,MAUX;AAVD,WAAY,MAAM;IAChB,6BAAmB,CAAA;IACnB,qBAAqB;IACrB,yBAAe,CAAA;IACf,+BAA+B;IAC/B,6BAAmB,CAAA;IACnB,qBAAqB;IACrB,2CAAiC,CAAA;IACjC,sCAAsC;IACtC,+BAAqB,CAAA;AACvB,CAAC,EAVW,MAAM,KAAN,MAAM,QAUjB;AAyTD,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
|
@@ -1,22 +1,40 @@
|
|
1
1
|
export interface EmailSubscription {
|
2
2
|
/**
|
3
3
|
* Email subscription ID.
|
4
|
+
* @format GUID
|
4
5
|
* @readonly
|
5
6
|
*/
|
6
7
|
_id?: string | null;
|
7
|
-
/**
|
8
|
+
/**
|
9
|
+
* Email address.
|
10
|
+
* @format EMAIL
|
11
|
+
*/
|
8
12
|
email?: string;
|
9
13
|
/**
|
10
14
|
* Indicates the recipient's opt-in or opt-out status
|
11
15
|
* for marketing emails.
|
12
16
|
*
|
13
|
-
*
|
17
|
+
* - `NOT_SET`: No status specified. This is the default, initial value before any info about the email address is known.
|
18
|
+
* - `PENDING`: Subscription confirmation was requested,
|
19
|
+
* but recipient hasn't confirmed yet.
|
20
|
+
* - `SUBSCRIBED`: Recipient has opted in to marketing emails.
|
21
|
+
* - `UNSUBSCRIBED`: Recipient has opted out of marketing emails.
|
22
|
+
*
|
23
|
+
* Defaults to `NOT_SET`.
|
14
24
|
*/
|
15
25
|
subscriptionStatus?: SubscriptionEnumStatus;
|
16
26
|
/**
|
17
27
|
* Indicates last reported status of sent emails.
|
18
28
|
*
|
19
|
-
*
|
29
|
+
* - `NOT_SET`: No status specified. This is the default, initial value before any info about the email address is known.
|
30
|
+
* - `VALID`: Emails to this email address are being delivered successfully.
|
31
|
+
* - `BOUNCED`: The last email to the recipient bounced or was rejected.
|
32
|
+
* - `SPAM_COMPLAINT`: The recipient registered a spam complaint
|
33
|
+
* with their email provider.
|
34
|
+
* - `INACTIVE`: Multiple campaigns have been delivered to this address without any engagement from the recipient. (No emails were opened and no content was clicked.)
|
35
|
+
* This status might impact subsequent emails sent to this address.
|
36
|
+
*
|
37
|
+
* Defaults to `NOT_SET`.
|
20
38
|
*/
|
21
39
|
deliverabilityStatus?: Status;
|
22
40
|
/**
|
@@ -31,55 +49,34 @@ export interface EmailSubscription {
|
|
31
49
|
_updatedDate?: Date | null;
|
32
50
|
}
|
33
51
|
export declare enum SubscriptionEnumStatus {
|
34
|
-
/** Undefined status. */
|
35
52
|
UNKNOWN = "UNKNOWN",
|
36
|
-
/** No
|
53
|
+
/** No Subscription exists */
|
37
54
|
NOT_SET = "NOT_SET",
|
38
|
-
/** Subscription
|
55
|
+
/** Pending Subscription */
|
39
56
|
PENDING = "PENDING",
|
40
|
-
/**
|
57
|
+
/** Subscribed */
|
41
58
|
SUBSCRIBED = "SUBSCRIBED",
|
42
|
-
/**
|
59
|
+
/** UnSubscribed */
|
43
60
|
UNSUBSCRIBED = "UNSUBSCRIBED"
|
44
61
|
}
|
45
62
|
export declare enum Status {
|
46
|
-
/** No status specified. This is the initial default value before any info about the email address is known. */
|
47
63
|
NOT_SET = "NOT_SET",
|
48
|
-
/**
|
64
|
+
/** valid/deferral */
|
49
65
|
VALID = "VALID",
|
50
|
-
/**
|
66
|
+
/** bounced/rejected/invalid */
|
51
67
|
BOUNCED = "BOUNCED",
|
52
|
-
/**
|
68
|
+
/** spam/complaint */
|
53
69
|
SPAM_COMPLAINT = "SPAM_COMPLAINT",
|
54
|
-
/**
|
70
|
+
/** valid, but no activity reported */
|
55
71
|
INACTIVE = "INACTIVE"
|
56
72
|
}
|
57
|
-
|
58
|
-
/** Payload */
|
59
|
-
payload?: string;
|
60
|
-
/** Language */
|
61
|
-
language?: string | null;
|
62
|
-
}
|
63
|
-
export interface RawHttpResponse {
|
64
|
-
body?: Uint8Array;
|
65
|
-
statusCode?: number | null;
|
66
|
-
headers?: HeadersEntry[];
|
67
|
-
}
|
68
|
-
export interface HeadersEntry {
|
69
|
-
key?: string;
|
70
|
-
value?: string;
|
71
|
-
}
|
72
|
-
export interface V1ConfirmUnsubscribeActionRequest {
|
73
|
-
/** Payload */
|
74
|
-
payload?: string;
|
75
|
-
}
|
76
|
-
export interface Empty {
|
77
|
-
}
|
73
|
+
/** Triggered when an email subscription's status is changed. */
|
78
74
|
export interface EmailSubscriptionChanged {
|
79
|
-
/** subscription */
|
75
|
+
/** Email subscription that changed. */
|
80
76
|
subscription?: EmailSubscription;
|
81
77
|
}
|
82
78
|
export interface GetEmailSubscriptionRequest {
|
79
|
+
/** @format GUID */
|
83
80
|
_id: string;
|
84
81
|
}
|
85
82
|
export interface GetEmailSubscriptionResponse {
|
@@ -138,7 +135,11 @@ export interface UpsertEmailSubscriptionResponse {
|
|
138
135
|
subscription?: EmailSubscription;
|
139
136
|
}
|
140
137
|
export interface BulkUpsertEmailSubscriptionRequest {
|
141
|
-
/**
|
138
|
+
/**
|
139
|
+
* List of email subscriptions to update or create.
|
140
|
+
* @minSize 1
|
141
|
+
* @maxSize 100
|
142
|
+
*/
|
142
143
|
subscriptions: EmailSubscription[];
|
143
144
|
}
|
144
145
|
export interface BulkUpsertEmailSubscriptionResponse {
|
@@ -171,11 +172,21 @@ export interface Metadata {
|
|
171
172
|
totalFailure?: number;
|
172
173
|
}
|
173
174
|
export interface GenerateUnsubscribeLinkRequest {
|
174
|
-
/**
|
175
|
+
/**
|
176
|
+
* Email address the unsubscribe link is for.
|
177
|
+
* @format EMAIL
|
178
|
+
*/
|
175
179
|
emailAddress: string;
|
176
180
|
/** Arbitrary parameters for closing-the-loop. */
|
177
181
|
metadata?: Record<string, string>;
|
178
|
-
/**
|
182
|
+
/**
|
183
|
+
* Language for displaying unsubscribe confirmation page.
|
184
|
+
*
|
185
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
186
|
+
*
|
187
|
+
* Default: `EN`
|
188
|
+
* @format LANGUAGE
|
189
|
+
*/
|
179
190
|
language?: string | null;
|
180
191
|
}
|
181
192
|
export interface GenerateUnsubscribeLinkResponse {
|
@@ -188,10 +199,21 @@ export interface RenderUnsubscribePageRequest {
|
|
188
199
|
/** Language */
|
189
200
|
language?: string | null;
|
190
201
|
}
|
202
|
+
export interface RawHttpResponse {
|
203
|
+
body?: Uint8Array;
|
204
|
+
statusCode?: number | null;
|
205
|
+
headers?: HeadersEntry[];
|
206
|
+
}
|
207
|
+
export interface HeadersEntry {
|
208
|
+
key?: string;
|
209
|
+
value?: string;
|
210
|
+
}
|
191
211
|
export interface ConfirmUnsubscribeActionRequest {
|
192
212
|
/** Payload */
|
193
213
|
payload?: string;
|
194
214
|
}
|
215
|
+
export interface Empty {
|
216
|
+
}
|
195
217
|
export interface DomainEvent extends DomainEventBodyOneOf {
|
196
218
|
createdEvent?: EntityCreatedEvent;
|
197
219
|
updatedEvent?: EntityUpdatedEvent;
|
@@ -263,9 +285,15 @@ export interface ActionEvent {
|
|
263
285
|
body?: string;
|
264
286
|
}
|
265
287
|
export interface MessageEnvelope {
|
266
|
-
/**
|
288
|
+
/**
|
289
|
+
* App instance ID.
|
290
|
+
* @format GUID
|
291
|
+
*/
|
267
292
|
instanceId?: string | null;
|
268
|
-
/**
|
293
|
+
/**
|
294
|
+
* Event type.
|
295
|
+
* @maxLength 150
|
296
|
+
*/
|
269
297
|
eventType?: string;
|
270
298
|
/** The identification type and identity data. */
|
271
299
|
identity?: IdentificationData;
|
@@ -273,26 +301,50 @@ export interface MessageEnvelope {
|
|
273
301
|
data?: string;
|
274
302
|
}
|
275
303
|
export interface IdentificationData extends IdentificationDataIdOneOf {
|
276
|
-
/**
|
304
|
+
/**
|
305
|
+
* ID of a site visitor that has not logged in to the site.
|
306
|
+
* @format GUID
|
307
|
+
*/
|
277
308
|
anonymousVisitorId?: string;
|
278
|
-
/**
|
309
|
+
/**
|
310
|
+
* ID of a site visitor that has logged in to the site.
|
311
|
+
* @format GUID
|
312
|
+
*/
|
279
313
|
memberId?: string;
|
280
|
-
/**
|
314
|
+
/**
|
315
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
316
|
+
* @format GUID
|
317
|
+
*/
|
281
318
|
wixUserId?: string;
|
282
|
-
/**
|
319
|
+
/**
|
320
|
+
* ID of an app.
|
321
|
+
* @format GUID
|
322
|
+
*/
|
283
323
|
appId?: string;
|
284
324
|
/** @readonly */
|
285
325
|
identityType?: WebhookIdentityType;
|
286
326
|
}
|
287
327
|
/** @oneof */
|
288
328
|
export interface IdentificationDataIdOneOf {
|
289
|
-
/**
|
329
|
+
/**
|
330
|
+
* ID of a site visitor that has not logged in to the site.
|
331
|
+
* @format GUID
|
332
|
+
*/
|
290
333
|
anonymousVisitorId?: string;
|
291
|
-
/**
|
334
|
+
/**
|
335
|
+
* ID of a site visitor that has logged in to the site.
|
336
|
+
* @format GUID
|
337
|
+
*/
|
292
338
|
memberId?: string;
|
293
|
-
/**
|
339
|
+
/**
|
340
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
341
|
+
* @format GUID
|
342
|
+
*/
|
294
343
|
wixUserId?: string;
|
295
|
-
/**
|
344
|
+
/**
|
345
|
+
* ID of an app.
|
346
|
+
* @format GUID
|
347
|
+
*/
|
296
348
|
appId?: string;
|
297
349
|
}
|
298
350
|
export declare enum WebhookIdentityType {
|
@@ -302,6 +354,16 @@ export declare enum WebhookIdentityType {
|
|
302
354
|
WIX_USER = "WIX_USER",
|
303
355
|
APP = "APP"
|
304
356
|
}
|
357
|
+
export interface V1RenderUnsubscribePageRequest {
|
358
|
+
/** Payload */
|
359
|
+
payload?: string;
|
360
|
+
/** Language */
|
361
|
+
language?: string | null;
|
362
|
+
}
|
363
|
+
export interface V1ConfirmUnsubscribeActionRequest {
|
364
|
+
/** Payload */
|
365
|
+
payload?: string;
|
366
|
+
}
|
305
367
|
export interface EmailSubscriptionNonNullableFields {
|
306
368
|
email: string;
|
307
369
|
subscriptionStatus: SubscriptionEnumStatus;
|
@@ -337,9 +399,15 @@ export interface GenerateUnsubscribeLinkResponseNonNullableFields {
|
|
337
399
|
link: string;
|
338
400
|
}
|
339
401
|
export interface BaseEventMetadata {
|
340
|
-
/**
|
402
|
+
/**
|
403
|
+
* App instance ID.
|
404
|
+
* @format GUID
|
405
|
+
*/
|
341
406
|
instanceId?: string | null;
|
342
|
-
/**
|
407
|
+
/**
|
408
|
+
* Event type.
|
409
|
+
* @maxLength 150
|
410
|
+
*/
|
343
411
|
eventType?: string;
|
344
412
|
/** The identification type and identity data. */
|
345
413
|
identity?: IdentificationData;
|
@@ -377,7 +445,7 @@ export declare function getEmailSubscription(_id: string): Promise<EmailSubscrip
|
|
377
445
|
*
|
378
446
|
* Currently, querying is supported on the `email` field
|
379
447
|
* with the `$in` array filter.
|
380
|
-
* For example, to query for emails "me@my.com" and "you@your.org"
|
448
|
+
* For example, to query for emails `"me@my.com"`` and `"you@your.org"``,
|
381
449
|
* the filter should be formed like this:
|
382
450
|
*
|
383
451
|
* ```json
|
@@ -414,8 +482,8 @@ export interface QueryEmailSubscriptionsOptions {
|
|
414
482
|
/**
|
415
483
|
* Updates or creates an email subscription for the requested email.
|
416
484
|
*
|
417
|
-
* An email subscription is
|
418
|
-
*
|
485
|
+
* An email subscription is returned in the response
|
486
|
+
* whether it was updated or created.
|
419
487
|
* @public
|
420
488
|
* @documentationMaturity preview
|
421
489
|
* @requiredField options.subscription.email
|
@@ -462,7 +530,14 @@ export declare function generateUnsubscribeLink(emailAddress: string, options?:
|
|
462
530
|
export interface GenerateUnsubscribeLinkOptions {
|
463
531
|
/** Arbitrary parameters for closing-the-loop. */
|
464
532
|
metadata?: Record<string, string>;
|
465
|
-
/**
|
533
|
+
/**
|
534
|
+
* Language for displaying unsubscribe confirmation page.
|
535
|
+
*
|
536
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
537
|
+
*
|
538
|
+
* Default: `EN`
|
539
|
+
* @format LANGUAGE
|
540
|
+
*/
|
466
541
|
language?: string | null;
|
467
542
|
}
|
468
543
|
export {};
|
@@ -3,28 +3,26 @@ import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKR
|
|
3
3
|
import * as ambassadorWixEmailsubscriptionsV1Emailsubscription from './emailsubscriptions-v1-emailsubscription-email-subscriptions.http.js';
|
4
4
|
export var SubscriptionEnumStatus;
|
5
5
|
(function (SubscriptionEnumStatus) {
|
6
|
-
/** Undefined status. */
|
7
6
|
SubscriptionEnumStatus["UNKNOWN"] = "UNKNOWN";
|
8
|
-
/** No
|
7
|
+
/** No Subscription exists */
|
9
8
|
SubscriptionEnumStatus["NOT_SET"] = "NOT_SET";
|
10
|
-
/** Subscription
|
9
|
+
/** Pending Subscription */
|
11
10
|
SubscriptionEnumStatus["PENDING"] = "PENDING";
|
12
|
-
/**
|
11
|
+
/** Subscribed */
|
13
12
|
SubscriptionEnumStatus["SUBSCRIBED"] = "SUBSCRIBED";
|
14
|
-
/**
|
13
|
+
/** UnSubscribed */
|
15
14
|
SubscriptionEnumStatus["UNSUBSCRIBED"] = "UNSUBSCRIBED";
|
16
15
|
})(SubscriptionEnumStatus || (SubscriptionEnumStatus = {}));
|
17
16
|
export var Status;
|
18
17
|
(function (Status) {
|
19
|
-
/** No status specified. This is the initial default value before any info about the email address is known. */
|
20
18
|
Status["NOT_SET"] = "NOT_SET";
|
21
|
-
/**
|
19
|
+
/** valid/deferral */
|
22
20
|
Status["VALID"] = "VALID";
|
23
|
-
/**
|
21
|
+
/** bounced/rejected/invalid */
|
24
22
|
Status["BOUNCED"] = "BOUNCED";
|
25
|
-
/**
|
23
|
+
/** spam/complaint */
|
26
24
|
Status["SPAM_COMPLAINT"] = "SPAM_COMPLAINT";
|
27
|
-
/**
|
25
|
+
/** valid, but no activity reported */
|
28
26
|
Status["INACTIVE"] = "INACTIVE";
|
29
27
|
})(Status || (Status = {}));
|
30
28
|
export var WebhookIdentityType;
|
@@ -75,7 +73,7 @@ export async function getEmailSubscription(_id) {
|
|
75
73
|
*
|
76
74
|
* Currently, querying is supported on the `email` field
|
77
75
|
* with the `$in` array filter.
|
78
|
-
* For example, to query for emails "me@my.com" and "you@your.org"
|
76
|
+
* For example, to query for emails `"me@my.com"`` and `"you@your.org"``,
|
79
77
|
* the filter should be formed like this:
|
80
78
|
*
|
81
79
|
* ```json
|
@@ -128,8 +126,8 @@ export async function queryEmailSubscriptions(filter, options) {
|
|
128
126
|
/**
|
129
127
|
* Updates or creates an email subscription for the requested email.
|
130
128
|
*
|
131
|
-
* An email subscription is
|
132
|
-
*
|
129
|
+
* An email subscription is returned in the response
|
130
|
+
* whether it was updated or created.
|
133
131
|
* @public
|
134
132
|
* @documentationMaturity preview
|
135
133
|
* @requiredField options.subscription.email
|