@wix/email-subscriptions 1.0.0
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/index.d.ts +1 -0
- package/build/cjs/index.js +24 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription.http.d.ts +40 -0
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription.http.js +204 -0
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription.http.js.map +1 -0
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription.public.d.ts +11 -0
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription.public.js +33 -0
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription.public.js.map +1 -0
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription.types.d.ts +258 -0
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription.types.js +28 -0
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription.types.js.map +1 -0
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription.universal.d.ts +338 -0
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription.universal.js +316 -0
- package/build/cjs/src/emailsubscriptions-v1-emailsubscription.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/src/emailsubscriptions-v1-emailsubscription.http.d.ts +40 -0
- package/build/es/src/emailsubscriptions-v1-emailsubscription.http.js +197 -0
- package/build/es/src/emailsubscriptions-v1-emailsubscription.http.js.map +1 -0
- package/build/es/src/emailsubscriptions-v1-emailsubscription.public.d.ts +11 -0
- package/build/es/src/emailsubscriptions-v1-emailsubscription.public.js +24 -0
- package/build/es/src/emailsubscriptions-v1-emailsubscription.public.js.map +1 -0
- package/build/es/src/emailsubscriptions-v1-emailsubscription.types.d.ts +258 -0
- package/build/es/src/emailsubscriptions-v1-emailsubscription.types.js +25 -0
- package/build/es/src/emailsubscriptions-v1-emailsubscription.types.js.map +1 -0
- package/build/es/src/emailsubscriptions-v1-emailsubscription.universal.d.ts +338 -0
- package/build/es/src/emailsubscriptions-v1-emailsubscription.universal.js +290 -0
- package/build/es/src/emailsubscriptions-v1-emailsubscription.universal.js.map +1 -0
- package/package.json +37 -0
@@ -0,0 +1 @@
|
|
1
|
+
export * as emailSubscriptions from './src/emailsubscriptions-v1-emailsubscription.public';
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
5
|
+
}) : (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
o[k2] = m[k];
|
8
|
+
}));
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
11
|
+
}) : function(o, v) {
|
12
|
+
o["default"] = v;
|
13
|
+
});
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
15
|
+
if (mod && mod.__esModule) return mod;
|
16
|
+
var result = {};
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
18
|
+
__setModuleDefault(result, mod);
|
19
|
+
return result;
|
20
|
+
};
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
22
|
+
exports.emailSubscriptions = void 0;
|
23
|
+
exports.emailSubscriptions = __importStar(require("./src/emailsubscriptions-v1-emailsubscription.public"));
|
24
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2GAA2F"}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { RequestOptionsFactory } from '@wix/sdk-types';
|
2
|
+
import { BulkUpsertEmailSubscriptionRequest, BulkUpsertEmailSubscriptionResponse, GenerateUnsubscribeLinkRequest, GenerateUnsubscribeLinkResponse, QueryEmailSubscriptionsRequest, QueryEmailSubscriptionsResponse, UpsertEmailSubscriptionRequest, UpsertEmailSubscriptionResponse } 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>;
|
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>;
|
32
|
+
/** Updates or creates multiple email subscriptions. */
|
33
|
+
export declare function bulkUpsertEmailSubscription(payload: BulkUpsertEmailSubscriptionRequest): RequestOptionsFactory<BulkUpsertEmailSubscriptionResponse>;
|
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>;
|
@@ -0,0 +1,204 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.generateUnsubscribeLink = exports.bulkUpsertEmailSubscription = exports.upsertEmailSubscription = exports.queryEmailSubscriptions = void 0;
|
4
|
+
const ambassador_1 = require("@wix/metro-runtime/ambassador");
|
5
|
+
const metro_runtime_1 = require("@wix/metro-runtime");
|
6
|
+
const _bulkUpsertEmailSubscriptionRequest = {
|
7
|
+
subscriptions: '_emailSubscription',
|
8
|
+
};
|
9
|
+
const _bulkUpsertEmailSubscriptionResponse = {
|
10
|
+
results: '_bulkUpsertEmailSubscriptionResult',
|
11
|
+
};
|
12
|
+
const _bulkUpsertEmailSubscriptionResult = {
|
13
|
+
emailSubscription: '_emailSubscription',
|
14
|
+
};
|
15
|
+
const _emailSubscription = {
|
16
|
+
createdDate: 'google.protobuf.Timestamp',
|
17
|
+
updatedDate: 'google.protobuf.Timestamp',
|
18
|
+
};
|
19
|
+
const _generateUnsubscribeLinkRequest = {};
|
20
|
+
const _generateUnsubscribeLinkResponse = {};
|
21
|
+
const _queryEmailSubscriptionsRequest = {};
|
22
|
+
const _queryEmailSubscriptionsResponse = {
|
23
|
+
subscriptions: '_emailSubscription',
|
24
|
+
};
|
25
|
+
const _upsertEmailSubscriptionRequest = { subscription: '_emailSubscription' };
|
26
|
+
const _upsertEmailSubscriptionResponse = { subscription: '_emailSubscription' };
|
27
|
+
function resolveComWixpressEmailsubscriptionsV1EmailSubscriptionsServiceUrl(opts) {
|
28
|
+
const domainToMappings = {
|
29
|
+
'api._api_base_domain_': [
|
30
|
+
{
|
31
|
+
srcPath: '/email-subscriptions-app',
|
32
|
+
destPath: '',
|
33
|
+
},
|
34
|
+
],
|
35
|
+
'www.wixapis.com': [
|
36
|
+
{
|
37
|
+
srcPath: '/email-marketing/v1/email-subscriptions',
|
38
|
+
destPath: '/v1/email-subscriptions',
|
39
|
+
},
|
40
|
+
],
|
41
|
+
'manage._base_domain_': [
|
42
|
+
{
|
43
|
+
srcPath: '/_api/email-marketing/v1/email-subscriptions',
|
44
|
+
destPath: '/v1/email-subscriptions',
|
45
|
+
},
|
46
|
+
],
|
47
|
+
'www._base_domain_': [
|
48
|
+
{
|
49
|
+
srcPath: '/_api/email-marketing/v1/email-subscriptions',
|
50
|
+
destPath: '/v1/email-subscriptions',
|
51
|
+
},
|
52
|
+
],
|
53
|
+
'editor._base_domain_': [
|
54
|
+
{
|
55
|
+
srcPath: '/_api/email-marketing/v1/email-subscriptions',
|
56
|
+
destPath: '/v1/email-subscriptions',
|
57
|
+
},
|
58
|
+
],
|
59
|
+
'blocks._base_domain_': [
|
60
|
+
{
|
61
|
+
srcPath: '/_api/email-marketing/v1/email-subscriptions',
|
62
|
+
destPath: '/v1/email-subscriptions',
|
63
|
+
},
|
64
|
+
],
|
65
|
+
'create.editorx': [
|
66
|
+
{
|
67
|
+
srcPath: '/_api/email-marketing/v1/email-subscriptions',
|
68
|
+
destPath: '/v1/email-subscriptions',
|
69
|
+
},
|
70
|
+
],
|
71
|
+
};
|
72
|
+
return (0, metro_runtime_1.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
73
|
+
}
|
74
|
+
/**
|
75
|
+
* Retrieves email subscriptions,
|
76
|
+
* given the provided paging, filtering, and sorting.
|
77
|
+
*
|
78
|
+
* Currently, querying is supported on the `email` field
|
79
|
+
* with the `$in` array filter.
|
80
|
+
* For example, to query for emails "me@my.com" and "you@your.org",
|
81
|
+
* the filter should be formed like this:
|
82
|
+
*
|
83
|
+
* ```json
|
84
|
+
* { "filter": {
|
85
|
+
* "email": {
|
86
|
+
* "$in": ["me@my.com", "you@your.org"]
|
87
|
+
* }
|
88
|
+
* }
|
89
|
+
* }
|
90
|
+
* ```
|
91
|
+
*
|
92
|
+
* To learn how to query email subscriptions, see
|
93
|
+
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
94
|
+
*/
|
95
|
+
function queryEmailSubscriptions(payload) {
|
96
|
+
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_queryEmailSubscriptionsRequest, {});
|
97
|
+
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_queryEmailSubscriptionsResponse, {
|
98
|
+
_emailSubscription,
|
99
|
+
});
|
100
|
+
function __queryEmailSubscriptions({ host }) {
|
101
|
+
const serializedData = toReq(payload);
|
102
|
+
const metadata = {
|
103
|
+
entityFqdn: 'wix.emailsubscriptions.v1.emailsubscription',
|
104
|
+
method: 'POST',
|
105
|
+
methodFqn: 'com.wixpress.emailsubscriptions.v1.EmailSubscriptionsService.QueryEmailSubscriptions',
|
106
|
+
url: resolveComWixpressEmailsubscriptionsV1EmailSubscriptionsServiceUrl({
|
107
|
+
protoPath: '/v1/email-subscriptions/query',
|
108
|
+
data: serializedData,
|
109
|
+
host,
|
110
|
+
}),
|
111
|
+
data: serializedData,
|
112
|
+
transformResponse: fromRes,
|
113
|
+
};
|
114
|
+
return metadata;
|
115
|
+
}
|
116
|
+
__queryEmailSubscriptions.fromReq = fromReq;
|
117
|
+
return __queryEmailSubscriptions;
|
118
|
+
}
|
119
|
+
exports.queryEmailSubscriptions = queryEmailSubscriptions;
|
120
|
+
/**
|
121
|
+
* Updates or creates an email subscription for the requested email.
|
122
|
+
*
|
123
|
+
* An email subscription is always returned in the response,
|
124
|
+
* regardless of whether it was updated or created.
|
125
|
+
*/
|
126
|
+
function upsertEmailSubscription(payload) {
|
127
|
+
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_upsertEmailSubscriptionRequest, { _emailSubscription });
|
128
|
+
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_upsertEmailSubscriptionResponse, {
|
129
|
+
_emailSubscription,
|
130
|
+
});
|
131
|
+
function __upsertEmailSubscription({ host }) {
|
132
|
+
const serializedData = toReq(payload);
|
133
|
+
const metadata = {
|
134
|
+
entityFqdn: 'wix.emailsubscriptions.v1.emailsubscription',
|
135
|
+
method: 'POST',
|
136
|
+
methodFqn: 'com.wixpress.emailsubscriptions.v1.EmailSubscriptionsService.UpsertEmailSubscription',
|
137
|
+
url: resolveComWixpressEmailsubscriptionsV1EmailSubscriptionsServiceUrl({
|
138
|
+
protoPath: '/v1/email-subscriptions',
|
139
|
+
data: serializedData,
|
140
|
+
host,
|
141
|
+
}),
|
142
|
+
data: serializedData,
|
143
|
+
transformResponse: fromRes,
|
144
|
+
};
|
145
|
+
return metadata;
|
146
|
+
}
|
147
|
+
__upsertEmailSubscription.fromReq = fromReq;
|
148
|
+
return __upsertEmailSubscription;
|
149
|
+
}
|
150
|
+
exports.upsertEmailSubscription = upsertEmailSubscription;
|
151
|
+
/** Updates or creates multiple email subscriptions. */
|
152
|
+
function bulkUpsertEmailSubscription(payload) {
|
153
|
+
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_bulkUpsertEmailSubscriptionRequest, { _emailSubscription });
|
154
|
+
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_bulkUpsertEmailSubscriptionResponse, { _bulkUpsertEmailSubscriptionResult, _emailSubscription });
|
155
|
+
function __bulkUpsertEmailSubscription({ host }) {
|
156
|
+
const serializedData = toReq(payload);
|
157
|
+
const metadata = {
|
158
|
+
entityFqdn: 'wix.emailsubscriptions.v1.emailsubscription',
|
159
|
+
method: 'POST',
|
160
|
+
methodFqn: 'com.wixpress.emailsubscriptions.v1.EmailSubscriptionsService.BulkUpsertEmailSubscription',
|
161
|
+
url: resolveComWixpressEmailsubscriptionsV1EmailSubscriptionsServiceUrl({
|
162
|
+
protoPath: '/v1/email-subscriptions/bulk',
|
163
|
+
data: serializedData,
|
164
|
+
host,
|
165
|
+
}),
|
166
|
+
data: serializedData,
|
167
|
+
transformResponse: fromRes,
|
168
|
+
};
|
169
|
+
return metadata;
|
170
|
+
}
|
171
|
+
__bulkUpsertEmailSubscription.fromReq = fromReq;
|
172
|
+
return __bulkUpsertEmailSubscription;
|
173
|
+
}
|
174
|
+
exports.bulkUpsertEmailSubscription = bulkUpsertEmailSubscription;
|
175
|
+
/**
|
176
|
+
* Creates an unsubscribe link to be shared with the relevant recipient.
|
177
|
+
*
|
178
|
+
* If someone clicks the **Unsubscribe** button on the confirmation page,
|
179
|
+
* the recipient's `subscriptionStatus` is changed to `UNSUBSCRIBED`.
|
180
|
+
*/
|
181
|
+
function generateUnsubscribeLink(payload) {
|
182
|
+
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_generateUnsubscribeLinkRequest, {});
|
183
|
+
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_generateUnsubscribeLinkResponse, {});
|
184
|
+
function __generateUnsubscribeLink({ host }) {
|
185
|
+
const serializedData = toReq(payload);
|
186
|
+
const metadata = {
|
187
|
+
entityFqdn: 'wix.emailsubscriptions.v1.emailsubscription',
|
188
|
+
method: 'POST',
|
189
|
+
methodFqn: 'com.wixpress.emailsubscriptions.v1.EmailSubscriptionsService.GenerateUnsubscribeLink',
|
190
|
+
url: resolveComWixpressEmailsubscriptionsV1EmailSubscriptionsServiceUrl({
|
191
|
+
protoPath: '/v1/email-subscriptions/unsubscribe-link',
|
192
|
+
data: serializedData,
|
193
|
+
host,
|
194
|
+
}),
|
195
|
+
data: serializedData,
|
196
|
+
transformResponse: fromRes,
|
197
|
+
};
|
198
|
+
return metadata;
|
199
|
+
}
|
200
|
+
__generateUnsubscribeLink.fromReq = fromReq;
|
201
|
+
return __generateUnsubscribeLink;
|
202
|
+
}
|
203
|
+
exports.generateUnsubscribeLink = generateUnsubscribeLink;
|
204
|
+
//# sourceMappingURL=emailsubscriptions-v1-emailsubscription.http.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"emailsubscriptions-v1-emailsubscription.http.js","sourceRoot":"","sources":["../../../src/emailsubscriptions-v1-emailsubscription.http.ts"],"names":[],"mappings":"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"}
|
@@ -0,0 +1,11 @@
|
|
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 | undefined) => Promise<import("./emailsubscriptions-v1-emailsubscription.universal").QueryEmailSubscriptionsResponse>;
|
7
|
+
export declare function upsertEmailSubscription(httpClient: HttpClient): (options?: UpsertEmailSubscriptionOptions | undefined) => Promise<import("./emailsubscriptions-v1-emailsubscription.universal").UpsertEmailSubscriptionResponse>;
|
8
|
+
export declare function bulkUpsertEmailSubscription(httpClient: HttpClient): (subscriptions: EmailSubscription[]) => Promise<import("./emailsubscriptions-v1-emailsubscription.universal").BulkUpsertEmailSubscriptionResponse>;
|
9
|
+
export declare function generateUnsubscribeLink(httpClient: HttpClient): (emailAddress: string, options?: GenerateUnsubscribeLinkOptions | undefined) => Promise<import("./emailsubscriptions-v1-emailsubscription.universal").GenerateUnsubscribeLinkResponse>;
|
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, ExtendedFieldsUpdatedEvent, QueryEmailSubscriptionsOptions, UpsertEmailSubscriptionOptions, GenerateUnsubscribeLinkOptions, } from './emailsubscriptions-v1-emailsubscription.universal';
|
@@ -0,0 +1,33 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Status = exports.SubscriptionEnumStatus = exports.generateUnsubscribeLink = exports.bulkUpsertEmailSubscription = exports.upsertEmailSubscription = exports.queryEmailSubscriptions = exports.__metadata = void 0;
|
4
|
+
const emailsubscriptions_v1_emailsubscription_universal_1 = require("./emailsubscriptions-v1-emailsubscription.universal");
|
5
|
+
exports.__metadata = { PACKAGE_NAME: '@wix/email-subscriptions' };
|
6
|
+
function queryEmailSubscriptions(httpClient) {
|
7
|
+
return (filter, options) => (0, emailsubscriptions_v1_emailsubscription_universal_1.queryEmailSubscriptions)(filter, options,
|
8
|
+
// @ts-ignore
|
9
|
+
{ httpClient });
|
10
|
+
}
|
11
|
+
exports.queryEmailSubscriptions = queryEmailSubscriptions;
|
12
|
+
function upsertEmailSubscription(httpClient) {
|
13
|
+
return (options) => (0, emailsubscriptions_v1_emailsubscription_universal_1.upsertEmailSubscription)(options,
|
14
|
+
// @ts-ignore
|
15
|
+
{ httpClient });
|
16
|
+
}
|
17
|
+
exports.upsertEmailSubscription = upsertEmailSubscription;
|
18
|
+
function bulkUpsertEmailSubscription(httpClient) {
|
19
|
+
return (subscriptions) => (0, emailsubscriptions_v1_emailsubscription_universal_1.bulkUpsertEmailSubscription)(subscriptions,
|
20
|
+
// @ts-ignore
|
21
|
+
{ httpClient });
|
22
|
+
}
|
23
|
+
exports.bulkUpsertEmailSubscription = bulkUpsertEmailSubscription;
|
24
|
+
function generateUnsubscribeLink(httpClient) {
|
25
|
+
return (emailAddress, options) => (0, emailsubscriptions_v1_emailsubscription_universal_1.generateUnsubscribeLink)(emailAddress, options,
|
26
|
+
// @ts-ignore
|
27
|
+
{ httpClient });
|
28
|
+
}
|
29
|
+
exports.generateUnsubscribeLink = generateUnsubscribeLink;
|
30
|
+
var emailsubscriptions_v1_emailsubscription_universal_2 = require("./emailsubscriptions-v1-emailsubscription.universal");
|
31
|
+
Object.defineProperty(exports, "SubscriptionEnumStatus", { enumerable: true, get: function () { return emailsubscriptions_v1_emailsubscription_universal_2.SubscriptionEnumStatus; } });
|
32
|
+
Object.defineProperty(exports, "Status", { enumerable: true, get: function () { return emailsubscriptions_v1_emailsubscription_universal_2.Status; } });
|
33
|
+
//# sourceMappingURL=emailsubscriptions-v1-emailsubscription.public.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"emailsubscriptions-v1-emailsubscription.public.js","sourceRoot":"","sources":["../../../src/emailsubscriptions-v1-emailsubscription.public.ts"],"names":[],"mappings":";;;AACA,2HAS6D;AAEhD,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,0BAA0B,EAAE,CAAC;AAEvE,SAAgB,uBAAuB,CAAC,UAAsB;IAC5D,OAAO,CACL,MAAkC,EAClC,OAAwC,EACxC,EAAE,CACF,IAAA,2EAAgC,EAC9B,MAAM,EACN,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAXD,0DAWC;AAED,SAAgB,uBAAuB,CAAC,UAAsB;IAC5D,OAAO,CAAC,OAAwC,EAAE,EAAE,CAClD,IAAA,2EAAgC,EAC9B,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,0DAOC;AAED,SAAgB,2BAA2B,CAAC,UAAsB;IAChE,OAAO,CAAC,aAAkC,EAAE,EAAE,CAC5C,IAAA,+EAAoC,EAClC,aAAa;IACb,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,kEAOC;AAED,SAAgB,uBAAuB,CAAC,UAAsB;IAC5D,OAAO,CAAC,YAAoB,EAAE,OAAwC,EAAE,EAAE,CACxE,IAAA,2EAAgC,EAC9B,YAAY,EACZ,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,0DAQC;AAED,yHAG6D;AAF3D,2JAAA,sBAAsB,OAAA;AACtB,2IAAA,MAAM,OAAA"}
|
@@ -0,0 +1,258 @@
|
|
1
|
+
export interface EmailSubscription {
|
2
|
+
/** @readonly */
|
3
|
+
id?: string | null;
|
4
|
+
/** Email address. */
|
5
|
+
email?: string;
|
6
|
+
/**
|
7
|
+
* Indicates the recipient's opt-in or opt-out status
|
8
|
+
* for marketing emails.
|
9
|
+
*
|
10
|
+
* - `NOT_SET`: No status specified.
|
11
|
+
* - `PENDING`: Subscription confirmation was requested,
|
12
|
+
* but recipient hasn't confirmed yet.
|
13
|
+
* - `SUBSCRIBED`: Recipient has opted in to marketing emails.
|
14
|
+
* - `UNSUBSCRIBED`: Recipient has opted out of marketing emails.
|
15
|
+
*
|
16
|
+
* Defaults to `NOT_SET`.
|
17
|
+
*/
|
18
|
+
subscriptionStatus?: SubscriptionEnumStatus;
|
19
|
+
/**
|
20
|
+
* Indicates last reported status of sent emails.
|
21
|
+
*
|
22
|
+
* - `NOT_SET`: No status specified.
|
23
|
+
* - `VALID`: Emails haven't bounced,
|
24
|
+
* but the recipient hasn't actively subscribed or unsubscribed.
|
25
|
+
* - `BOUNCED`: The last email to the recipient bounced or was rejected.
|
26
|
+
* - `SPAM_COMPLAINT`: Recipient registered a spam complaint
|
27
|
+
* with their email provider.
|
28
|
+
* - `INACTIVE`: No activity has been reported.
|
29
|
+
*
|
30
|
+
* Defaults to `NOT_SET`.
|
31
|
+
*/
|
32
|
+
deliverabilityStatus?: Status;
|
33
|
+
/** @readonly */
|
34
|
+
createdDate?: Date;
|
35
|
+
/** @readonly */
|
36
|
+
updatedDate?: Date;
|
37
|
+
}
|
38
|
+
export declare enum SubscriptionEnumStatus {
|
39
|
+
UNKNOWN = "UNKNOWN",
|
40
|
+
/** No Subscription exists */
|
41
|
+
NOT_SET = "NOT_SET",
|
42
|
+
/** Pending Subscription */
|
43
|
+
PENDING = "PENDING",
|
44
|
+
/** Subscribed */
|
45
|
+
SUBSCRIBED = "SUBSCRIBED",
|
46
|
+
/** UnSubscribed */
|
47
|
+
UNSUBSCRIBED = "UNSUBSCRIBED"
|
48
|
+
}
|
49
|
+
export declare enum Status {
|
50
|
+
NOT_SET = "NOT_SET",
|
51
|
+
/** valid/deferral */
|
52
|
+
VALID = "VALID",
|
53
|
+
/** bounced/rejected/invalid */
|
54
|
+
BOUNCED = "BOUNCED",
|
55
|
+
/** spam/complaint */
|
56
|
+
SPAM_COMPLAINT = "SPAM_COMPLAINT",
|
57
|
+
/** valid, but no activity reported */
|
58
|
+
INACTIVE = "INACTIVE"
|
59
|
+
}
|
60
|
+
export interface EmailSubscriptionChanged {
|
61
|
+
/** subscription */
|
62
|
+
subscription?: EmailSubscription;
|
63
|
+
}
|
64
|
+
export interface GetEmailSubscriptionRequest {
|
65
|
+
id?: string;
|
66
|
+
}
|
67
|
+
export interface GetEmailSubscriptionResponse {
|
68
|
+
/** Returned email subscription */
|
69
|
+
emailSubscription?: EmailSubscription;
|
70
|
+
}
|
71
|
+
export interface UpdateEmailSubscriptionRequest {
|
72
|
+
/** Email subscription to update */
|
73
|
+
subscription?: EmailSubscription;
|
74
|
+
}
|
75
|
+
export interface UpdateEmailSubscriptionResponse {
|
76
|
+
/** Updated email subscription */
|
77
|
+
subscription?: EmailSubscription;
|
78
|
+
}
|
79
|
+
export interface QueryEmailSubscriptionsRequest {
|
80
|
+
/**
|
81
|
+
* Filter options.
|
82
|
+
* Currently, querying is supported on the `email` field
|
83
|
+
* with the `$in` array filter.
|
84
|
+
*/
|
85
|
+
filter: Record<string, any> | null;
|
86
|
+
/**
|
87
|
+
* Pagination options. For more information, see
|
88
|
+
* [Pagination](https://dev.wix.com/api/rest/getting-started/pagination).
|
89
|
+
*/
|
90
|
+
paging?: Paging;
|
91
|
+
}
|
92
|
+
export interface Paging {
|
93
|
+
/** Number of items to load. */
|
94
|
+
limit?: number | null;
|
95
|
+
/** Number of items to skip in the current sort order. */
|
96
|
+
offset?: number | null;
|
97
|
+
}
|
98
|
+
export interface QueryEmailSubscriptionsResponse {
|
99
|
+
/** List of subscribed emails that matched the query options. */
|
100
|
+
subscriptions?: EmailSubscription[];
|
101
|
+
/** Metadata for the paginated results. */
|
102
|
+
metadata?: PagingMetadata;
|
103
|
+
}
|
104
|
+
export interface PagingMetadata {
|
105
|
+
/** Number of items returned in the response. */
|
106
|
+
count?: number | null;
|
107
|
+
/** Offset that was requested. */
|
108
|
+
offset?: number | null;
|
109
|
+
/** Total number of items that match the query. */
|
110
|
+
total?: number | null;
|
111
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
112
|
+
tooManyToCount?: boolean | null;
|
113
|
+
}
|
114
|
+
export interface UpsertEmailSubscriptionRequest {
|
115
|
+
/** Email subscription to update or create. */
|
116
|
+
subscription?: EmailSubscription;
|
117
|
+
}
|
118
|
+
export interface UpsertEmailSubscriptionResponse {
|
119
|
+
/** Updated or created email subscription. */
|
120
|
+
subscription?: EmailSubscription;
|
121
|
+
}
|
122
|
+
export interface BulkUpsertEmailSubscriptionRequest {
|
123
|
+
/** List of email subscriptions to update or create. */
|
124
|
+
subscriptions: EmailSubscription[];
|
125
|
+
}
|
126
|
+
export interface BulkUpsertEmailSubscriptionResponse {
|
127
|
+
/** List of updated or created email subscriptions. */
|
128
|
+
results?: BulkUpsertEmailSubscriptionResult[];
|
129
|
+
/** Numbers of successful and failed actions. */
|
130
|
+
metadata?: Metadata;
|
131
|
+
}
|
132
|
+
export interface BulkUpsertEmailSubscriptionResult {
|
133
|
+
/** Position of the requested email subscription in the bulk array. */
|
134
|
+
originalIndex?: number;
|
135
|
+
/** New or updated email subscription. */
|
136
|
+
emailSubscription?: EmailSubscription;
|
137
|
+
/**
|
138
|
+
* Error information if the action failed.
|
139
|
+
* Omitted from successful actions.
|
140
|
+
*/
|
141
|
+
error?: Error;
|
142
|
+
}
|
143
|
+
export interface Error {
|
144
|
+
/** Error code. */
|
145
|
+
errorCode?: string;
|
146
|
+
/** Message that contains details about the error. */
|
147
|
+
message?: string;
|
148
|
+
}
|
149
|
+
export interface Metadata {
|
150
|
+
/** Number of successful actions. */
|
151
|
+
totalSuccess?: number;
|
152
|
+
/** Number of failed actions. */
|
153
|
+
totalFailure?: number;
|
154
|
+
}
|
155
|
+
export interface GenerateUnsubscribeLinkRequest {
|
156
|
+
/** Email address the unsubscribe link is for. */
|
157
|
+
emailAddress: string;
|
158
|
+
/** Arbitrary parameters for closing-the-loop. */
|
159
|
+
metadata?: Record<string, string>;
|
160
|
+
/** Language for displaying unsubscribe confirmation page (optional - default EN). */
|
161
|
+
language?: string | null;
|
162
|
+
}
|
163
|
+
export interface GenerateUnsubscribeLinkResponse {
|
164
|
+
/** The unsubscribe link. */
|
165
|
+
link?: string;
|
166
|
+
}
|
167
|
+
export interface RenderUnsubscribePageRequest {
|
168
|
+
/** Payload */
|
169
|
+
payload?: string;
|
170
|
+
/** Language */
|
171
|
+
language?: string | null;
|
172
|
+
}
|
173
|
+
export interface RawHttpResponse {
|
174
|
+
body?: Uint8Array;
|
175
|
+
statusCode?: number | null;
|
176
|
+
headers?: HeadersEntry[];
|
177
|
+
}
|
178
|
+
export interface HeadersEntry {
|
179
|
+
key?: string;
|
180
|
+
value?: string;
|
181
|
+
}
|
182
|
+
export interface ConfirmUnsubscribeActionRequest {
|
183
|
+
/** Payload */
|
184
|
+
payload?: string;
|
185
|
+
}
|
186
|
+
export interface Empty {
|
187
|
+
}
|
188
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
189
|
+
createdEvent?: EntityCreatedEvent;
|
190
|
+
updatedEvent?: EntityUpdatedEvent;
|
191
|
+
deletedEvent?: EntityDeletedEvent;
|
192
|
+
actionEvent?: ActionEvent;
|
193
|
+
extendedFieldsUpdatedEvent?: ExtendedFieldsUpdatedEvent;
|
194
|
+
/** random GUID so clients can tell if event was already handled */
|
195
|
+
id?: string;
|
196
|
+
/**
|
197
|
+
* Assumes actions are also always typed to an entity_type
|
198
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
199
|
+
*/
|
200
|
+
entityFqdn?: string;
|
201
|
+
/**
|
202
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
203
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
204
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
205
|
+
*/
|
206
|
+
slug?: string;
|
207
|
+
/**
|
208
|
+
* Assuming that all messages including Actions have id
|
209
|
+
* Example: The id of the specific order, the id of a specific campaign
|
210
|
+
*/
|
211
|
+
entityId?: string;
|
212
|
+
/** The time of the event. Useful if there was a delay in dispatching */
|
213
|
+
eventTime?: Date;
|
214
|
+
/**
|
215
|
+
* A field that should be set if this event was triggered by an anonymize request.
|
216
|
+
* For example you must set it to true when sending an event as a result of a GDPR right to be forgotten request.
|
217
|
+
* NOTE: This field is not relevant for `EntityCreatedEvent` but is located here for better ergonomics of consumers.
|
218
|
+
*/
|
219
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
220
|
+
/** If present, indicates the action that triggered the event. */
|
221
|
+
originatedFrom?: string | null;
|
222
|
+
/**
|
223
|
+
* A sequence number defining the order of updates to the underlying entity.
|
224
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
225
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
226
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
227
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
228
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
229
|
+
*/
|
230
|
+
entityEventSequence?: string | null;
|
231
|
+
}
|
232
|
+
/** @oneof */
|
233
|
+
export interface DomainEventBodyOneOf {
|
234
|
+
createdEvent?: EntityCreatedEvent;
|
235
|
+
updatedEvent?: EntityUpdatedEvent;
|
236
|
+
deletedEvent?: EntityDeletedEvent;
|
237
|
+
actionEvent?: ActionEvent;
|
238
|
+
extendedFieldsUpdatedEvent?: ExtendedFieldsUpdatedEvent;
|
239
|
+
}
|
240
|
+
export interface EntityCreatedEvent {
|
241
|
+
entityAsJson?: string;
|
242
|
+
}
|
243
|
+
export interface EntityUpdatedEvent {
|
244
|
+
/**
|
245
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
246
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
247
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
248
|
+
*/
|
249
|
+
currentEntityAsJson?: string;
|
250
|
+
}
|
251
|
+
export interface EntityDeletedEvent {
|
252
|
+
}
|
253
|
+
export interface ActionEvent {
|
254
|
+
bodyAsJson?: string;
|
255
|
+
}
|
256
|
+
export interface ExtendedFieldsUpdatedEvent {
|
257
|
+
currentEntityAsJson?: string;
|
258
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Status = exports.SubscriptionEnumStatus = void 0;
|
4
|
+
var SubscriptionEnumStatus;
|
5
|
+
(function (SubscriptionEnumStatus) {
|
6
|
+
SubscriptionEnumStatus["UNKNOWN"] = "UNKNOWN";
|
7
|
+
/** No Subscription exists */
|
8
|
+
SubscriptionEnumStatus["NOT_SET"] = "NOT_SET";
|
9
|
+
/** Pending Subscription */
|
10
|
+
SubscriptionEnumStatus["PENDING"] = "PENDING";
|
11
|
+
/** Subscribed */
|
12
|
+
SubscriptionEnumStatus["SUBSCRIBED"] = "SUBSCRIBED";
|
13
|
+
/** UnSubscribed */
|
14
|
+
SubscriptionEnumStatus["UNSUBSCRIBED"] = "UNSUBSCRIBED";
|
15
|
+
})(SubscriptionEnumStatus = exports.SubscriptionEnumStatus || (exports.SubscriptionEnumStatus = {}));
|
16
|
+
var Status;
|
17
|
+
(function (Status) {
|
18
|
+
Status["NOT_SET"] = "NOT_SET";
|
19
|
+
/** valid/deferral */
|
20
|
+
Status["VALID"] = "VALID";
|
21
|
+
/** bounced/rejected/invalid */
|
22
|
+
Status["BOUNCED"] = "BOUNCED";
|
23
|
+
/** spam/complaint */
|
24
|
+
Status["SPAM_COMPLAINT"] = "SPAM_COMPLAINT";
|
25
|
+
/** valid, but no activity reported */
|
26
|
+
Status["INACTIVE"] = "INACTIVE";
|
27
|
+
})(Status = exports.Status || (exports.Status = {}));
|
28
|
+
//# sourceMappingURL=emailsubscriptions-v1-emailsubscription.types.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"emailsubscriptions-v1-emailsubscription.types.js","sourceRoot":"","sources":["../../../src/emailsubscriptions-v1-emailsubscription.types.ts"],"names":[],"mappings":";;;AAsCA,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,GAAtB,8BAAsB,KAAtB,8BAAsB,QAUjC;AAED,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,GAAN,cAAM,KAAN,cAAM,QAUjB"}
|