@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 @@
|
|
1
|
+
export * as emailSubscriptions from '@wix/email-subscriptions_email-subscriptions/context';
|
@@ -24,5 +24,5 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
24
24
|
};
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
26
|
exports.emailSubscriptions = void 0;
|
27
|
-
exports.emailSubscriptions = __importStar(require("
|
28
|
-
//# sourceMappingURL=
|
27
|
+
exports.emailSubscriptions = __importStar(require("@wix/email-subscriptions_email-subscriptions/context"));
|
28
|
+
//# sourceMappingURL=context.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2GAA2F"}
|
package/build/cjs/index.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * as emailSubscriptions from '
|
1
|
+
export * as emailSubscriptions from '@wix/email-subscriptions_email-subscriptions';
|
package/build/cjs/index.js
CHANGED
@@ -24,5 +24,5 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
24
24
|
};
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
26
|
exports.emailSubscriptions = void 0;
|
27
|
-
exports.emailSubscriptions = __importStar(require("
|
27
|
+
exports.emailSubscriptions = __importStar(require("@wix/email-subscriptions_email-subscriptions"));
|
28
28
|
//# sourceMappingURL=index.js.map
|
package/build/cjs/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mGAAmF"}
|
package/build/cjs/meta.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * as emailSubscriptions from '
|
1
|
+
export * as emailSubscriptions from '@wix/email-subscriptions_email-subscriptions/meta';
|
package/build/cjs/meta.js
CHANGED
@@ -24,5 +24,5 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
24
24
|
};
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
26
|
exports.emailSubscriptions = void 0;
|
27
|
-
exports.emailSubscriptions = __importStar(require("
|
27
|
+
exports.emailSubscriptions = __importStar(require("@wix/email-subscriptions_email-subscriptions/meta"));
|
28
28
|
//# sourceMappingURL=meta.js.map
|
package/build/cjs/meta.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wGAAwF"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * as emailSubscriptions from '@wix/email-subscriptions_email-subscriptions/context';
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,sDAAsD,CAAC"}
|
package/build/es/index.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * as emailSubscriptions from '
|
1
|
+
export * as emailSubscriptions from '@wix/email-subscriptions_email-subscriptions';
|
package/build/es/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export * as emailSubscriptions from '
|
1
|
+
export * as emailSubscriptions from '@wix/email-subscriptions_email-subscriptions';
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/build/es/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,8CAA8C,CAAC"}
|
package/build/es/meta.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * as emailSubscriptions from '
|
1
|
+
export * as emailSubscriptions from '@wix/email-subscriptions_email-subscriptions/meta';
|
package/build/es/meta.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export * as emailSubscriptions from '
|
1
|
+
export * as emailSubscriptions from '@wix/email-subscriptions_email-subscriptions/meta';
|
2
2
|
//# sourceMappingURL=meta.js.map
|
package/build/es/meta.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,mDAAmD,CAAC"}
|
package/meta/package.json
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@wix/email-subscriptions",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.16",
|
4
4
|
"publishConfig": {
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
6
6
|
"access": "public"
|
@@ -9,29 +9,39 @@
|
|
9
9
|
"module": "build/es/index.js",
|
10
10
|
"main": "build/cjs/index.js",
|
11
11
|
"typings": "./build/cjs/index.d.ts",
|
12
|
+
"typesBundle": "./type-bundles/index.bundle.d.ts",
|
12
13
|
"files": [
|
13
14
|
"build",
|
14
15
|
"frontend/package.json",
|
15
|
-
"meta"
|
16
|
+
"meta",
|
17
|
+
"context",
|
18
|
+
"type-bundles"
|
16
19
|
],
|
17
20
|
"dependencies": {
|
18
|
-
"@wix/
|
19
|
-
"@wix/sdk-types": "^1.5.3",
|
20
|
-
"@wix/sdk-runtime": "^0.2.7",
|
21
|
-
"@wix/motion-edm-autogen-query-wrapper": "^1.0.37"
|
21
|
+
"@wix/email-subscriptions_email-subscriptions": "1.0.2"
|
22
22
|
},
|
23
23
|
"devDependencies": {
|
24
|
+
"@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz",
|
25
|
+
"glob": "^10.4.1",
|
26
|
+
"rollup": "^4.18.0",
|
27
|
+
"rollup-plugin-dts": "^6.1.1",
|
24
28
|
"typescript": "^5.3.2"
|
25
29
|
},
|
26
30
|
"scripts": {
|
27
|
-
"build": "tsc -b tsconfig.json tsconfig.esm.json",
|
31
|
+
"build": "tsc -b tsconfig.json tsconfig.esm.json && npm run build:dts-bundles",
|
32
|
+
"build:dts-bundles": "test -f config/rollup-config.js && rollup --config config/rollup-config.js || echo 'Warning: config/rollup-config.js not found!'",
|
28
33
|
"test": ":"
|
29
34
|
},
|
30
35
|
"wix": {
|
31
36
|
"artifact": {
|
37
|
+
"groupId": "com.wixpress.public-sdk-autogen",
|
32
38
|
"artifactId": "email-subscriptions-public-sdk-autogen",
|
33
|
-
"
|
39
|
+
"isRootPublicSdk": true
|
40
|
+
},
|
41
|
+
"sdkDependency": {
|
42
|
+
"fqdnNamespace": "",
|
43
|
+
"fqdn": ""
|
34
44
|
}
|
35
45
|
},
|
36
|
-
"falconPackageHash": "
|
46
|
+
"falconPackageHash": "70480b3bd092f8a9a416e0edb528f2835102f8566cd057214bdf8e05"
|
37
47
|
}
|
@@ -0,0 +1,283 @@
|
|
1
|
+
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
|
+
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
|
+
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
|
+
interface EmailSubscriptionChanged {
|
70
|
+
/** subscription */
|
71
|
+
subscription?: EmailSubscription;
|
72
|
+
}
|
73
|
+
interface Paging {
|
74
|
+
/** Number of items to load. */
|
75
|
+
limit?: number | null;
|
76
|
+
/** Number of items to skip in the current sort order. */
|
77
|
+
offset?: number | null;
|
78
|
+
}
|
79
|
+
interface QueryEmailSubscriptionsResponse {
|
80
|
+
/** List of subscribed emails that matched the query options. */
|
81
|
+
subscriptions?: EmailSubscription[];
|
82
|
+
/** Metadata for the paginated results. */
|
83
|
+
metadata?: PagingMetadata;
|
84
|
+
}
|
85
|
+
interface PagingMetadata {
|
86
|
+
/** Number of items returned in the response. */
|
87
|
+
count?: number | null;
|
88
|
+
/** Offset that was requested. */
|
89
|
+
offset?: number | null;
|
90
|
+
/** Total number of items that match the query. */
|
91
|
+
total?: number | null;
|
92
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
93
|
+
tooManyToCount?: boolean | null;
|
94
|
+
}
|
95
|
+
interface UpsertEmailSubscriptionResponse {
|
96
|
+
/** Updated or created email subscription. */
|
97
|
+
subscription?: EmailSubscription;
|
98
|
+
}
|
99
|
+
interface BulkUpsertEmailSubscriptionResponse {
|
100
|
+
/** List of updated or created email subscriptions. */
|
101
|
+
results?: BulkUpsertEmailSubscriptionResult[];
|
102
|
+
/** Numbers of successful and failed actions. */
|
103
|
+
metadata?: Metadata;
|
104
|
+
}
|
105
|
+
interface BulkUpsertEmailSubscriptionResult {
|
106
|
+
/** Position of the requested email subscription in the bulk array. */
|
107
|
+
originalIndex?: number;
|
108
|
+
/** New or updated email subscription. */
|
109
|
+
emailSubscription?: EmailSubscription;
|
110
|
+
/**
|
111
|
+
* Error information if the action failed.
|
112
|
+
* Omitted from successful actions.
|
113
|
+
*/
|
114
|
+
error?: Error;
|
115
|
+
}
|
116
|
+
interface Error {
|
117
|
+
/** Error code. */
|
118
|
+
errorCode?: string;
|
119
|
+
/** Message that contains details about the error. */
|
120
|
+
message?: string;
|
121
|
+
}
|
122
|
+
interface Metadata {
|
123
|
+
/** Number of successful actions. */
|
124
|
+
totalSuccess?: number;
|
125
|
+
/** Number of failed actions. */
|
126
|
+
totalFailure?: number;
|
127
|
+
}
|
128
|
+
interface GenerateUnsubscribeLinkResponse {
|
129
|
+
/** The unsubscribe link. */
|
130
|
+
link?: string;
|
131
|
+
}
|
132
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
133
|
+
/** ID of a site visitor that has not logged in to the site. */
|
134
|
+
anonymousVisitorId?: string;
|
135
|
+
/** ID of a site visitor that has logged in to the site. */
|
136
|
+
memberId?: string;
|
137
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
138
|
+
wixUserId?: string;
|
139
|
+
/** ID of an app. */
|
140
|
+
appId?: string;
|
141
|
+
/** @readonly */
|
142
|
+
identityType?: WebhookIdentityType;
|
143
|
+
}
|
144
|
+
/** @oneof */
|
145
|
+
interface IdentificationDataIdOneOf {
|
146
|
+
/** ID of a site visitor that has not logged in to the site. */
|
147
|
+
anonymousVisitorId?: string;
|
148
|
+
/** ID of a site visitor that has logged in to the site. */
|
149
|
+
memberId?: string;
|
150
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
151
|
+
wixUserId?: string;
|
152
|
+
/** ID of an app. */
|
153
|
+
appId?: string;
|
154
|
+
}
|
155
|
+
declare enum WebhookIdentityType {
|
156
|
+
UNKNOWN = "UNKNOWN",
|
157
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
158
|
+
MEMBER = "MEMBER",
|
159
|
+
WIX_USER = "WIX_USER",
|
160
|
+
APP = "APP"
|
161
|
+
}
|
162
|
+
interface QueryEmailSubscriptionsResponseNonNullableFields {
|
163
|
+
subscriptions: {
|
164
|
+
email: string;
|
165
|
+
subscriptionStatus: SubscriptionEnumStatus;
|
166
|
+
deliverabilityStatus: Status;
|
167
|
+
}[];
|
168
|
+
}
|
169
|
+
interface UpsertEmailSubscriptionResponseNonNullableFields {
|
170
|
+
subscription?: {
|
171
|
+
email: string;
|
172
|
+
subscriptionStatus: SubscriptionEnumStatus;
|
173
|
+
deliverabilityStatus: Status;
|
174
|
+
};
|
175
|
+
}
|
176
|
+
interface BulkUpsertEmailSubscriptionResponseNonNullableFields {
|
177
|
+
results: {
|
178
|
+
originalIndex: number;
|
179
|
+
emailSubscription?: {
|
180
|
+
email: string;
|
181
|
+
subscriptionStatus: SubscriptionEnumStatus;
|
182
|
+
deliverabilityStatus: Status;
|
183
|
+
};
|
184
|
+
error?: {
|
185
|
+
errorCode: string;
|
186
|
+
message: string;
|
187
|
+
};
|
188
|
+
}[];
|
189
|
+
metadata?: {
|
190
|
+
totalSuccess: number;
|
191
|
+
totalFailure: number;
|
192
|
+
};
|
193
|
+
}
|
194
|
+
interface GenerateUnsubscribeLinkResponseNonNullableFields {
|
195
|
+
link: string;
|
196
|
+
}
|
197
|
+
interface BaseEventMetadata {
|
198
|
+
/** App instance ID. */
|
199
|
+
instanceId?: string | null;
|
200
|
+
/** Event type. */
|
201
|
+
eventType?: string;
|
202
|
+
/** The identification type and identity data. */
|
203
|
+
identity?: IdentificationData;
|
204
|
+
}
|
205
|
+
interface EmailsubscriptionEmailSubscriptionChangedEnvelope {
|
206
|
+
data: EmailSubscriptionChanged;
|
207
|
+
metadata: BaseEventMetadata;
|
208
|
+
}
|
209
|
+
interface QueryEmailSubscriptionsOptions {
|
210
|
+
/**
|
211
|
+
* Pagination options. For more information, see
|
212
|
+
* [Pagination](https://dev.wix.com/api/rest/getting-started/pagination).
|
213
|
+
*/
|
214
|
+
paging?: Paging;
|
215
|
+
}
|
216
|
+
interface UpsertEmailSubscriptionOptions {
|
217
|
+
/** Email subscription to update or create. */
|
218
|
+
subscription?: EmailSubscription;
|
219
|
+
}
|
220
|
+
interface GenerateUnsubscribeLinkOptions {
|
221
|
+
/** Arbitrary parameters for closing-the-loop. */
|
222
|
+
metadata?: Record<string, string>;
|
223
|
+
/** Language for displaying unsubscribe confirmation page (optional - default EN). */
|
224
|
+
language?: string | null;
|
225
|
+
}
|
226
|
+
|
227
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
228
|
+
interface HttpClient {
|
229
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
230
|
+
}
|
231
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
232
|
+
type HttpResponse<T = any> = {
|
233
|
+
data: T;
|
234
|
+
status: number;
|
235
|
+
statusText: string;
|
236
|
+
headers: any;
|
237
|
+
request?: any;
|
238
|
+
};
|
239
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
240
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
241
|
+
url: string;
|
242
|
+
data?: Data;
|
243
|
+
params?: URLSearchParams;
|
244
|
+
} & APIMetadata;
|
245
|
+
type APIMetadata = {
|
246
|
+
methodFqn?: string;
|
247
|
+
entityFqdn?: string;
|
248
|
+
packageName?: string;
|
249
|
+
};
|
250
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
251
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
252
|
+
__type: 'event-definition';
|
253
|
+
type: Type;
|
254
|
+
isDomainEvent?: boolean;
|
255
|
+
transformations?: unknown;
|
256
|
+
__payload: Payload;
|
257
|
+
};
|
258
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
259
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
260
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
261
|
+
|
262
|
+
declare function queryEmailSubscriptions$1(httpClient: HttpClient): (filter: Record<string, any> | null, options?: QueryEmailSubscriptionsOptions) => Promise<QueryEmailSubscriptionsResponse & QueryEmailSubscriptionsResponseNonNullableFields>;
|
263
|
+
declare function upsertEmailSubscription$1(httpClient: HttpClient): (options?: UpsertEmailSubscriptionOptions) => Promise<UpsertEmailSubscriptionResponse & UpsertEmailSubscriptionResponseNonNullableFields>;
|
264
|
+
declare function bulkUpsertEmailSubscription$1(httpClient: HttpClient): (subscriptions: EmailSubscription[]) => Promise<BulkUpsertEmailSubscriptionResponse & BulkUpsertEmailSubscriptionResponseNonNullableFields>;
|
265
|
+
declare function generateUnsubscribeLink$1(httpClient: HttpClient): (emailAddress: string, options?: GenerateUnsubscribeLinkOptions) => Promise<GenerateUnsubscribeLinkResponse & GenerateUnsubscribeLinkResponseNonNullableFields>;
|
266
|
+
declare const onEmailsubscriptionEmailSubscriptionChanged$1: EventDefinition<EmailsubscriptionEmailSubscriptionChangedEnvelope, "com.wixpress.emailsubscriptions.v1.EmailSubscriptionChanged">;
|
267
|
+
|
268
|
+
declare const queryEmailSubscriptions: BuildRESTFunction<typeof queryEmailSubscriptions$1>;
|
269
|
+
declare const upsertEmailSubscription: BuildRESTFunction<typeof upsertEmailSubscription$1>;
|
270
|
+
declare const bulkUpsertEmailSubscription: BuildRESTFunction<typeof bulkUpsertEmailSubscription$1>;
|
271
|
+
declare const generateUnsubscribeLink: BuildRESTFunction<typeof generateUnsubscribeLink$1>;
|
272
|
+
declare const onEmailsubscriptionEmailSubscriptionChanged: BuildEventDefinition<typeof onEmailsubscriptionEmailSubscriptionChanged$1>;
|
273
|
+
|
274
|
+
declare const context_bulkUpsertEmailSubscription: typeof bulkUpsertEmailSubscription;
|
275
|
+
declare const context_generateUnsubscribeLink: typeof generateUnsubscribeLink;
|
276
|
+
declare const context_onEmailsubscriptionEmailSubscriptionChanged: typeof onEmailsubscriptionEmailSubscriptionChanged;
|
277
|
+
declare const context_queryEmailSubscriptions: typeof queryEmailSubscriptions;
|
278
|
+
declare const context_upsertEmailSubscription: typeof upsertEmailSubscription;
|
279
|
+
declare namespace context {
|
280
|
+
export { context_bulkUpsertEmailSubscription as bulkUpsertEmailSubscription, context_generateUnsubscribeLink as generateUnsubscribeLink, context_onEmailsubscriptionEmailSubscriptionChanged as onEmailsubscriptionEmailSubscriptionChanged, context_queryEmailSubscriptions as queryEmailSubscriptions, context_upsertEmailSubscription as upsertEmailSubscription };
|
281
|
+
}
|
282
|
+
|
283
|
+
export { context as emailSubscriptions };
|