@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
@@ -1,74 +0,0 @@
|
|
1
|
-
import * as ambassadorWixEmailsubscriptionsV1Emailsubscription from './emailsubscriptions-v1-emailsubscription.http';
|
2
|
-
export function queryEmailSubscriptions() {
|
3
|
-
const payload = {};
|
4
|
-
const getRequestOptions = ambassadorWixEmailsubscriptionsV1Emailsubscription.queryEmailSubscriptions(payload);
|
5
|
-
const getUrl = (context) => {
|
6
|
-
const { url } = getRequestOptions(context);
|
7
|
-
return url;
|
8
|
-
};
|
9
|
-
return {
|
10
|
-
getUrl,
|
11
|
-
httpMethod: 'POST',
|
12
|
-
path: '/v1/email-subscriptions/query',
|
13
|
-
pathParams: {},
|
14
|
-
__requestType: null,
|
15
|
-
__originalRequestType: null,
|
16
|
-
__responseType: null,
|
17
|
-
__originalResponseType: null,
|
18
|
-
};
|
19
|
-
}
|
20
|
-
export function upsertEmailSubscription() {
|
21
|
-
const payload = {};
|
22
|
-
const getRequestOptions = ambassadorWixEmailsubscriptionsV1Emailsubscription.upsertEmailSubscription(payload);
|
23
|
-
const getUrl = (context) => {
|
24
|
-
const { url } = getRequestOptions(context);
|
25
|
-
return url;
|
26
|
-
};
|
27
|
-
return {
|
28
|
-
getUrl,
|
29
|
-
httpMethod: 'POST',
|
30
|
-
path: '/v1/email-subscriptions',
|
31
|
-
pathParams: {},
|
32
|
-
__requestType: null,
|
33
|
-
__originalRequestType: null,
|
34
|
-
__responseType: null,
|
35
|
-
__originalResponseType: null,
|
36
|
-
};
|
37
|
-
}
|
38
|
-
export function bulkUpsertEmailSubscription() {
|
39
|
-
const payload = {};
|
40
|
-
const getRequestOptions = ambassadorWixEmailsubscriptionsV1Emailsubscription.bulkUpsertEmailSubscription(payload);
|
41
|
-
const getUrl = (context) => {
|
42
|
-
const { url } = getRequestOptions(context);
|
43
|
-
return url;
|
44
|
-
};
|
45
|
-
return {
|
46
|
-
getUrl,
|
47
|
-
httpMethod: 'POST',
|
48
|
-
path: '/v1/email-subscriptions/bulk',
|
49
|
-
pathParams: {},
|
50
|
-
__requestType: null,
|
51
|
-
__originalRequestType: null,
|
52
|
-
__responseType: null,
|
53
|
-
__originalResponseType: null,
|
54
|
-
};
|
55
|
-
}
|
56
|
-
export function generateUnsubscribeLink() {
|
57
|
-
const payload = {};
|
58
|
-
const getRequestOptions = ambassadorWixEmailsubscriptionsV1Emailsubscription.generateUnsubscribeLink(payload);
|
59
|
-
const getUrl = (context) => {
|
60
|
-
const { url } = getRequestOptions(context);
|
61
|
-
return url;
|
62
|
-
};
|
63
|
-
return {
|
64
|
-
getUrl,
|
65
|
-
httpMethod: 'POST',
|
66
|
-
path: '/v1/email-subscriptions/unsubscribe-link',
|
67
|
-
pathParams: {},
|
68
|
-
__requestType: null,
|
69
|
-
__originalRequestType: null,
|
70
|
-
__responseType: null,
|
71
|
-
__originalResponseType: null,
|
72
|
-
};
|
73
|
-
}
|
74
|
-
//# sourceMappingURL=emailsubscriptions-v1-emailsubscription.meta.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"emailsubscriptions-v1-emailsubscription.meta.js","sourceRoot":"","sources":["../../../src/emailsubscriptions-v1-emailsubscription.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,kDAAkD,MAAM,gDAAgD,CAAC;AAsBrH,MAAM,UAAU,uBAAuB;IAUrC,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,kDAAkD,CAAC,uBAAuB,CACxE,OAAO,CACR,CAAC;IAEJ,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,+BAA+B;QACrC,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uBAAuB;IAUrC,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,kDAAkD,CAAC,uBAAuB,CACxE,OAAO,CACR,CAAC;IAEJ,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,yBAAyB;QAC/B,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,2BAA2B;IAUzC,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,kDAAkD,CAAC,2BAA2B,CAC5E,OAAO,CACR,CAAC;IAEJ,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,8BAA8B;QACpC,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uBAAuB;IAUrC,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,kDAAkD,CAAC,uBAAuB,CACxE,OAAO,CACR,CAAC;IAEJ,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,0CAA0C;QAChD,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC"}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import { HttpClient } from '@wix/sdk-types';
|
2
|
-
import { EmailSubscription, GenerateUnsubscribeLinkOptions, QueryEmailSubscriptionsOptions, UpsertEmailSubscriptionOptions } from './emailsubscriptions-v1-emailsubscription.universal';
|
3
|
-
export declare const __metadata: {
|
4
|
-
PACKAGE_NAME: string;
|
5
|
-
};
|
6
|
-
export declare function queryEmailSubscriptions(httpClient: HttpClient): (filter: Record<string, any> | null, options?: QueryEmailSubscriptionsOptions) => Promise<import("./emailsubscriptions-v1-emailsubscription.universal").QueryEmailSubscriptionsResponse & import("./emailsubscriptions-v1-emailsubscription.universal").QueryEmailSubscriptionsResponseNonNullableFields>;
|
7
|
-
export declare function upsertEmailSubscription(httpClient: HttpClient): (options?: UpsertEmailSubscriptionOptions) => Promise<import("./emailsubscriptions-v1-emailsubscription.universal").UpsertEmailSubscriptionResponse & import("./emailsubscriptions-v1-emailsubscription.universal").UpsertEmailSubscriptionResponseNonNullableFields>;
|
8
|
-
export declare function bulkUpsertEmailSubscription(httpClient: HttpClient): (subscriptions: EmailSubscription[]) => Promise<import("./emailsubscriptions-v1-emailsubscription.universal").BulkUpsertEmailSubscriptionResponse & import("./emailsubscriptions-v1-emailsubscription.universal").BulkUpsertEmailSubscriptionResponseNonNullableFields>;
|
9
|
-
export declare function generateUnsubscribeLink(httpClient: HttpClient): (emailAddress: string, options?: GenerateUnsubscribeLinkOptions) => Promise<import("./emailsubscriptions-v1-emailsubscription.universal").GenerateUnsubscribeLinkResponse & import("./emailsubscriptions-v1-emailsubscription.universal").GenerateUnsubscribeLinkResponseNonNullableFields>;
|
10
|
-
export { SubscriptionEnumStatus, Status, } from './emailsubscriptions-v1-emailsubscription.universal';
|
11
|
-
export { EmailSubscription, EmailSubscriptionChanged, GetEmailSubscriptionRequest, GetEmailSubscriptionResponse, UpdateEmailSubscriptionRequest, UpdateEmailSubscriptionResponse, QueryEmailSubscriptionsRequest, Paging, QueryEmailSubscriptionsResponse, PagingMetadata, UpsertEmailSubscriptionRequest, UpsertEmailSubscriptionResponse, BulkUpsertEmailSubscriptionRequest, BulkUpsertEmailSubscriptionResponse, BulkUpsertEmailSubscriptionResult, Error, Metadata, GenerateUnsubscribeLinkRequest, GenerateUnsubscribeLinkResponse, RenderUnsubscribePageRequest, RawHttpResponse, HeadersEntry, ConfirmUnsubscribeActionRequest, Empty, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityUpdatedEvent, EntityDeletedEvent, ActionEvent, QueryEmailSubscriptionsResponseNonNullableFields, UpsertEmailSubscriptionResponseNonNullableFields, BulkUpsertEmailSubscriptionResponseNonNullableFields, GenerateUnsubscribeLinkResponseNonNullableFields, QueryEmailSubscriptionsOptions, UpsertEmailSubscriptionOptions, GenerateUnsubscribeLinkOptions, } from './emailsubscriptions-v1-emailsubscription.universal';
|
@@ -1,24 +0,0 @@
|
|
1
|
-
import { queryEmailSubscriptions as universalQueryEmailSubscriptions, upsertEmailSubscription as universalUpsertEmailSubscription, bulkUpsertEmailSubscription as universalBulkUpsertEmailSubscription, generateUnsubscribeLink as universalGenerateUnsubscribeLink, } from './emailsubscriptions-v1-emailsubscription.universal';
|
2
|
-
export const __metadata = { PACKAGE_NAME: '@wix/email-subscriptions' };
|
3
|
-
export function queryEmailSubscriptions(httpClient) {
|
4
|
-
return (filter, options) => universalQueryEmailSubscriptions(filter, options,
|
5
|
-
// @ts-ignore
|
6
|
-
{ httpClient });
|
7
|
-
}
|
8
|
-
export function upsertEmailSubscription(httpClient) {
|
9
|
-
return (options) => universalUpsertEmailSubscription(options,
|
10
|
-
// @ts-ignore
|
11
|
-
{ httpClient });
|
12
|
-
}
|
13
|
-
export function bulkUpsertEmailSubscription(httpClient) {
|
14
|
-
return (subscriptions) => universalBulkUpsertEmailSubscription(subscriptions,
|
15
|
-
// @ts-ignore
|
16
|
-
{ httpClient });
|
17
|
-
}
|
18
|
-
export function generateUnsubscribeLink(httpClient) {
|
19
|
-
return (emailAddress, options) => universalGenerateUnsubscribeLink(emailAddress, options,
|
20
|
-
// @ts-ignore
|
21
|
-
{ httpClient });
|
22
|
-
}
|
23
|
-
export { SubscriptionEnumStatus, Status, } from './emailsubscriptions-v1-emailsubscription.universal';
|
24
|
-
//# sourceMappingURL=emailsubscriptions-v1-emailsubscription.public.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"emailsubscriptions-v1-emailsubscription.public.js","sourceRoot":"","sources":["../../../src/emailsubscriptions-v1-emailsubscription.public.ts"],"names":[],"mappings":"AACA,OAAO,EACL,uBAAuB,IAAI,gCAAgC,EAC3D,uBAAuB,IAAI,gCAAgC,EAC3D,2BAA2B,IAAI,oCAAoC,EACnE,uBAAuB,IAAI,gCAAgC,GAK5D,MAAM,qDAAqD,CAAC;AAE7D,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,0BAA0B,EAAE,CAAC;AAEvE,MAAM,UAAU,uBAAuB,CAAC,UAAsB;IAC5D,OAAO,CACL,MAAkC,EAClC,OAAwC,EACxC,EAAE,CACF,gCAAgC,CAC9B,MAAM,EACN,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,UAAsB;IAC5D,OAAO,CAAC,OAAwC,EAAE,EAAE,CAClD,gCAAgC,CAC9B,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,UAAsB;IAChE,OAAO,CAAC,aAAkC,EAAE,EAAE,CAC5C,oCAAoC,CAClC,aAAa;IACb,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,UAAsB;IAC5D,OAAO,CAAC,YAAoB,EAAE,OAAwC,EAAE,EAAE,CACxE,gCAAgC,CAC9B,YAAY,EACZ,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,OAAO,EACL,sBAAsB,EACtB,MAAM,GACP,MAAM,qDAAqD,CAAC"}
|
@@ -1,298 +0,0 @@
|
|
1
|
-
export interface EmailSubscription {
|
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;
|
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;
|
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
|
-
export declare enum SubscriptionEnumStatus {
|
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
|
-
export declare enum Status {
|
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
|
-
export interface EmailSubscriptionChanged {
|
70
|
-
/** subscription */
|
71
|
-
subscription?: EmailSubscription;
|
72
|
-
}
|
73
|
-
export interface GetEmailSubscriptionRequest {
|
74
|
-
id?: string;
|
75
|
-
}
|
76
|
-
export interface GetEmailSubscriptionResponse {
|
77
|
-
/** Returned email subscription */
|
78
|
-
emailSubscription?: EmailSubscription;
|
79
|
-
}
|
80
|
-
export interface UpdateEmailSubscriptionRequest {
|
81
|
-
/** Email subscription to update */
|
82
|
-
subscription?: EmailSubscription;
|
83
|
-
}
|
84
|
-
export interface UpdateEmailSubscriptionResponse {
|
85
|
-
/** Updated email subscription */
|
86
|
-
subscription?: EmailSubscription;
|
87
|
-
}
|
88
|
-
export interface QueryEmailSubscriptionsRequest {
|
89
|
-
/**
|
90
|
-
* Filter options.
|
91
|
-
* Currently, querying is supported on the `email` field
|
92
|
-
* with the `$in` array filter.
|
93
|
-
*/
|
94
|
-
filter: Record<string, any> | null;
|
95
|
-
/**
|
96
|
-
* Pagination options. For more information, see
|
97
|
-
* [Pagination](https://dev.wix.com/api/rest/getting-started/pagination).
|
98
|
-
*/
|
99
|
-
paging?: Paging;
|
100
|
-
}
|
101
|
-
export interface Paging {
|
102
|
-
/** Number of items to load. */
|
103
|
-
limit?: number | null;
|
104
|
-
/** Number of items to skip in the current sort order. */
|
105
|
-
offset?: number | null;
|
106
|
-
}
|
107
|
-
export interface QueryEmailSubscriptionsResponse {
|
108
|
-
/** List of subscribed emails that matched the query options. */
|
109
|
-
subscriptions?: EmailSubscription[];
|
110
|
-
/** Metadata for the paginated results. */
|
111
|
-
metadata?: PagingMetadata;
|
112
|
-
}
|
113
|
-
export interface PagingMetadata {
|
114
|
-
/** Number of items returned in the response. */
|
115
|
-
count?: number | null;
|
116
|
-
/** Offset that was requested. */
|
117
|
-
offset?: number | null;
|
118
|
-
/** Total number of items that match the query. */
|
119
|
-
total?: number | null;
|
120
|
-
/** Flag that indicates the server failed to calculate the `total` field. */
|
121
|
-
tooManyToCount?: boolean | null;
|
122
|
-
}
|
123
|
-
export interface UpsertEmailSubscriptionRequest {
|
124
|
-
/** Email subscription to update or create. */
|
125
|
-
subscription?: EmailSubscription;
|
126
|
-
}
|
127
|
-
export interface UpsertEmailSubscriptionResponse {
|
128
|
-
/** Updated or created email subscription. */
|
129
|
-
subscription?: EmailSubscription;
|
130
|
-
}
|
131
|
-
export interface BulkUpsertEmailSubscriptionRequest {
|
132
|
-
/** List of email subscriptions to update or create. */
|
133
|
-
subscriptions: EmailSubscription[];
|
134
|
-
}
|
135
|
-
export interface BulkUpsertEmailSubscriptionResponse {
|
136
|
-
/** List of updated or created email subscriptions. */
|
137
|
-
results?: BulkUpsertEmailSubscriptionResult[];
|
138
|
-
/** Numbers of successful and failed actions. */
|
139
|
-
metadata?: Metadata;
|
140
|
-
}
|
141
|
-
export interface BulkUpsertEmailSubscriptionResult {
|
142
|
-
/** Position of the requested email subscription in the bulk array. */
|
143
|
-
originalIndex?: number;
|
144
|
-
/** New or updated email subscription. */
|
145
|
-
emailSubscription?: EmailSubscription;
|
146
|
-
/**
|
147
|
-
* Error information if the action failed.
|
148
|
-
* Omitted from successful actions.
|
149
|
-
*/
|
150
|
-
error?: Error;
|
151
|
-
}
|
152
|
-
export interface Error {
|
153
|
-
/** Error code. */
|
154
|
-
errorCode?: string;
|
155
|
-
/** Message that contains details about the error. */
|
156
|
-
message?: string;
|
157
|
-
}
|
158
|
-
export interface Metadata {
|
159
|
-
/** Number of successful actions. */
|
160
|
-
totalSuccess?: number;
|
161
|
-
/** Number of failed actions. */
|
162
|
-
totalFailure?: number;
|
163
|
-
}
|
164
|
-
export interface GenerateUnsubscribeLinkRequest {
|
165
|
-
/** Email address the unsubscribe link is for. */
|
166
|
-
emailAddress: string;
|
167
|
-
/** Arbitrary parameters for closing-the-loop. */
|
168
|
-
metadata?: Record<string, string>;
|
169
|
-
/** Language for displaying unsubscribe confirmation page (optional - default EN). */
|
170
|
-
language?: string | null;
|
171
|
-
}
|
172
|
-
export interface GenerateUnsubscribeLinkResponse {
|
173
|
-
/** The unsubscribe link. */
|
174
|
-
link?: string;
|
175
|
-
}
|
176
|
-
export interface RenderUnsubscribePageRequest {
|
177
|
-
/** Payload */
|
178
|
-
payload?: string;
|
179
|
-
/** Language */
|
180
|
-
language?: string | null;
|
181
|
-
}
|
182
|
-
export interface RawHttpResponse {
|
183
|
-
body?: Uint8Array;
|
184
|
-
statusCode?: number | null;
|
185
|
-
headers?: HeadersEntry[];
|
186
|
-
}
|
187
|
-
export interface HeadersEntry {
|
188
|
-
key?: string;
|
189
|
-
value?: string;
|
190
|
-
}
|
191
|
-
export interface ConfirmUnsubscribeActionRequest {
|
192
|
-
/** Payload */
|
193
|
-
payload?: string;
|
194
|
-
}
|
195
|
-
export interface Empty {
|
196
|
-
}
|
197
|
-
export interface DomainEvent extends DomainEventBodyOneOf {
|
198
|
-
createdEvent?: EntityCreatedEvent;
|
199
|
-
updatedEvent?: EntityUpdatedEvent;
|
200
|
-
deletedEvent?: EntityDeletedEvent;
|
201
|
-
actionEvent?: ActionEvent;
|
202
|
-
/**
|
203
|
-
* Unique event ID.
|
204
|
-
* Allows clients to ignore duplicate webhooks.
|
205
|
-
*/
|
206
|
-
id?: string;
|
207
|
-
/**
|
208
|
-
* Assumes actions are also always typed to an entity_type
|
209
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
210
|
-
*/
|
211
|
-
entityFqdn?: string;
|
212
|
-
/**
|
213
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
214
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
215
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
216
|
-
*/
|
217
|
-
slug?: string;
|
218
|
-
/** ID of the entity associated with the event. */
|
219
|
-
entityId?: string;
|
220
|
-
/** Event timestamp. */
|
221
|
-
eventTime?: Date;
|
222
|
-
/**
|
223
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
224
|
-
* (for example, GDPR).
|
225
|
-
*/
|
226
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
227
|
-
/** If present, indicates the action that triggered the event. */
|
228
|
-
originatedFrom?: string | null;
|
229
|
-
/**
|
230
|
-
* A sequence number defining the order of updates to the underlying entity.
|
231
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
232
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
233
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
234
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
235
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
236
|
-
*/
|
237
|
-
entityEventSequence?: string | null;
|
238
|
-
}
|
239
|
-
/** @oneof */
|
240
|
-
export interface DomainEventBodyOneOf {
|
241
|
-
createdEvent?: EntityCreatedEvent;
|
242
|
-
updatedEvent?: EntityUpdatedEvent;
|
243
|
-
deletedEvent?: EntityDeletedEvent;
|
244
|
-
actionEvent?: ActionEvent;
|
245
|
-
}
|
246
|
-
export interface EntityCreatedEvent {
|
247
|
-
entityAsJson?: string;
|
248
|
-
}
|
249
|
-
export interface EntityUpdatedEvent {
|
250
|
-
/**
|
251
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
252
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
253
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
254
|
-
*/
|
255
|
-
currentEntityAsJson?: string;
|
256
|
-
}
|
257
|
-
export interface EntityDeletedEvent {
|
258
|
-
/** Entity that was deleted */
|
259
|
-
deletedEntityAsJson?: string | null;
|
260
|
-
}
|
261
|
-
export interface ActionEvent {
|
262
|
-
bodyAsJson?: string;
|
263
|
-
}
|
264
|
-
export interface QueryEmailSubscriptionsResponseNonNullableFields {
|
265
|
-
subscriptions: {
|
266
|
-
email: string;
|
267
|
-
subscriptionStatus: SubscriptionEnumStatus;
|
268
|
-
deliverabilityStatus: Status;
|
269
|
-
}[];
|
270
|
-
}
|
271
|
-
export interface UpsertEmailSubscriptionResponseNonNullableFields {
|
272
|
-
subscription?: {
|
273
|
-
email: string;
|
274
|
-
subscriptionStatus: SubscriptionEnumStatus;
|
275
|
-
deliverabilityStatus: Status;
|
276
|
-
};
|
277
|
-
}
|
278
|
-
export interface BulkUpsertEmailSubscriptionResponseNonNullableFields {
|
279
|
-
results: {
|
280
|
-
originalIndex: number;
|
281
|
-
emailSubscription?: {
|
282
|
-
email: string;
|
283
|
-
subscriptionStatus: SubscriptionEnumStatus;
|
284
|
-
deliverabilityStatus: Status;
|
285
|
-
};
|
286
|
-
error?: {
|
287
|
-
errorCode: string;
|
288
|
-
message: string;
|
289
|
-
};
|
290
|
-
}[];
|
291
|
-
metadata?: {
|
292
|
-
totalSuccess: number;
|
293
|
-
totalFailure: number;
|
294
|
-
};
|
295
|
-
}
|
296
|
-
export interface GenerateUnsubscribeLinkResponseNonNullableFields {
|
297
|
-
link: string;
|
298
|
-
}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
export var SubscriptionEnumStatus;
|
2
|
-
(function (SubscriptionEnumStatus) {
|
3
|
-
SubscriptionEnumStatus["UNKNOWN"] = "UNKNOWN";
|
4
|
-
/** No Subscription exists */
|
5
|
-
SubscriptionEnumStatus["NOT_SET"] = "NOT_SET";
|
6
|
-
/** Pending Subscription */
|
7
|
-
SubscriptionEnumStatus["PENDING"] = "PENDING";
|
8
|
-
/** Subscribed */
|
9
|
-
SubscriptionEnumStatus["SUBSCRIBED"] = "SUBSCRIBED";
|
10
|
-
/** UnSubscribed */
|
11
|
-
SubscriptionEnumStatus["UNSUBSCRIBED"] = "UNSUBSCRIBED";
|
12
|
-
})(SubscriptionEnumStatus || (SubscriptionEnumStatus = {}));
|
13
|
-
export var Status;
|
14
|
-
(function (Status) {
|
15
|
-
Status["NOT_SET"] = "NOT_SET";
|
16
|
-
/** valid/deferral */
|
17
|
-
Status["VALID"] = "VALID";
|
18
|
-
/** bounced/rejected/invalid */
|
19
|
-
Status["BOUNCED"] = "BOUNCED";
|
20
|
-
/** spam/complaint */
|
21
|
-
Status["SPAM_COMPLAINT"] = "SPAM_COMPLAINT";
|
22
|
-
/** valid, but no activity reported */
|
23
|
-
Status["INACTIVE"] = "INACTIVE";
|
24
|
-
})(Status || (Status = {}));
|
25
|
-
//# sourceMappingURL=emailsubscriptions-v1-emailsubscription.types.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"emailsubscriptions-v1-emailsubscription.types.js","sourceRoot":"","sources":["../../../src/emailsubscriptions-v1-emailsubscription.types.ts"],"names":[],"mappings":"AA+CA,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"}
|