@wix/auto_sdk_email-transmissions_email-transmissions 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 +46 -0
- package/build/cjs/index.js +488 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +744 -0
- package/build/cjs/index.typings.js +434 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +551 -0
- package/build/cjs/meta.js +343 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/schemas.d.ts +423 -0
- package/build/cjs/schemas.js +748 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/index.d.mts +46 -0
- package/build/es/index.mjs +454 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +744 -0
- package/build/es/index.typings.mjs +399 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +551 -0
- package/build/es/meta.mjs +307 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/schemas.d.mts +423 -0
- package/build/es/schemas.mjs +704 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +46 -0
- package/build/internal/cjs/index.js +488 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +744 -0
- package/build/internal/cjs/index.typings.js +434 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +551 -0
- package/build/internal/cjs/meta.js +343 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/schemas.d.ts +423 -0
- package/build/internal/cjs/schemas.js +748 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/index.d.mts +46 -0
- package/build/internal/es/index.mjs +454 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/index.typings.d.mts +744 -0
- package/build/internal/es/index.typings.mjs +399 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +551 -0
- package/build/internal/es/meta.mjs +307 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/build/internal/es/schemas.d.mts +423 -0
- package/build/internal/es/schemas.mjs +704 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +61 -0
- package/schemas/package.json +3 -0
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
import { SendEmailTransmissionRequest as SendEmailTransmissionRequest$1, SendEmailTransmissionResponse as SendEmailTransmissionResponse$1, GetEmailTransmissionRequest as GetEmailTransmissionRequest$1, GetEmailTransmissionResponse as GetEmailTransmissionResponse$1, QueryEmailTransmissionsRequest as QueryEmailTransmissionsRequest$1, QueryEmailTransmissionsResponse as QueryEmailTransmissionsResponse$1, DeleteEmailTransmissionRequest as DeleteEmailTransmissionRequest$1, DeleteEmailTransmissionResponse as DeleteEmailTransmissionResponse$1 } from './index.typings.js';
|
|
2
|
+
import '@wix/sdk-types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* An EmailTransmission is entity used for sending emails.
|
|
6
|
+
* Creating an entity of this type will trigger an email to be sent to the specified recipients.
|
|
7
|
+
* The email will be sent asynchronously, and the status of the transmission can be tracked using the EmailTransmission entity.
|
|
8
|
+
*/
|
|
9
|
+
interface EmailTransmission extends EmailTransmissionTypeOptionsOneOf, EmailTransmissionStatusOptionsOneOf {
|
|
10
|
+
/** Options for marketing email. */
|
|
11
|
+
marketingOptions?: MarketingOptions;
|
|
12
|
+
/**
|
|
13
|
+
* Options for rejected email transmission.
|
|
14
|
+
* @readonly
|
|
15
|
+
*/
|
|
16
|
+
rejectedOptions?: RejectedOptions;
|
|
17
|
+
/**
|
|
18
|
+
* EmailTransmission ID.
|
|
19
|
+
* @format GUID
|
|
20
|
+
* @readonly
|
|
21
|
+
*/
|
|
22
|
+
id?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Date and time the EmailTransmission was created.
|
|
25
|
+
* @readonly
|
|
26
|
+
*/
|
|
27
|
+
createdDate?: Date | null;
|
|
28
|
+
/**
|
|
29
|
+
* Date and time the EmailTransmission was last updated.
|
|
30
|
+
* @readonly
|
|
31
|
+
*/
|
|
32
|
+
updatedDate?: Date | null;
|
|
33
|
+
/**
|
|
34
|
+
* Revision number, which increments by 1 each time the EmailTransmission is updated.
|
|
35
|
+
* @readonly
|
|
36
|
+
*/
|
|
37
|
+
revision?: string | null;
|
|
38
|
+
/**
|
|
39
|
+
* Email subject (optional). Default - empty.
|
|
40
|
+
* @maxLength 200
|
|
41
|
+
*/
|
|
42
|
+
emailSubject?: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* Full HTML content of the email to be sent.
|
|
45
|
+
* Note that this field is not returned in the QueryEmailTransmissions endpoint for performance reasons. Use GetEmailTransmission to retrieve the full content of a specific email transmission.
|
|
46
|
+
* Important: in order to save storage space, this field will only be stored for 30 days after the email transmission is created. After that, it will be deleted and will not be retrievable anymore.
|
|
47
|
+
* @maxLength 1000000
|
|
48
|
+
*/
|
|
49
|
+
emailHtmlContent?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Request metadata (optional). Default - empty.
|
|
52
|
+
* Provided values will be passed to the ESP and then included in various callbacks to identify the context in which an email was sent.
|
|
53
|
+
* Length of each key and value must be between 1 and 50 alphanumeric characters.
|
|
54
|
+
* @maxSize 10
|
|
55
|
+
*/
|
|
56
|
+
metadata?: Record<string, string>;
|
|
57
|
+
/**
|
|
58
|
+
* Sender name (optional). Default - empty.
|
|
59
|
+
* @minLength 1
|
|
60
|
+
* @maxLength 50
|
|
61
|
+
*/
|
|
62
|
+
senderName?: string | null;
|
|
63
|
+
/**
|
|
64
|
+
* Sender email address (optional). Default - wix owned email address (for example "no-reply@wixsitemail.com").
|
|
65
|
+
* If provided sender email address is unauthenticated and cannot be used for sending emails (for example gmail.com), it will be replaced with wix owned email address.
|
|
66
|
+
* In that case provided email address will be used as reply-to unless reply-to email address is provided explicitly.
|
|
67
|
+
* @format EMAIL
|
|
68
|
+
*/
|
|
69
|
+
senderEmailAddress?: string | null;
|
|
70
|
+
/** Recipient to whom replies will be sent (optional). Default - empty (which effectively resolves to "sender_email_address"). */
|
|
71
|
+
replyTo?: Recipient;
|
|
72
|
+
/**
|
|
73
|
+
* Recipients to whom the email will be sent.
|
|
74
|
+
* @minSize 1
|
|
75
|
+
* @maxSize 100
|
|
76
|
+
*/
|
|
77
|
+
toRecipients?: Recipient[];
|
|
78
|
+
/** Email type - transactional or marketing. */
|
|
79
|
+
type?: TypeWithLiterals;
|
|
80
|
+
/**
|
|
81
|
+
* Email transmission status.
|
|
82
|
+
* @readonly
|
|
83
|
+
*/
|
|
84
|
+
status?: StatusWithLiterals;
|
|
85
|
+
}
|
|
86
|
+
/** @oneof */
|
|
87
|
+
interface EmailTransmissionTypeOptionsOneOf {
|
|
88
|
+
/** Options for marketing email. */
|
|
89
|
+
marketingOptions?: MarketingOptions;
|
|
90
|
+
}
|
|
91
|
+
/** @oneof */
|
|
92
|
+
interface EmailTransmissionStatusOptionsOneOf {
|
|
93
|
+
/**
|
|
94
|
+
* Options for rejected email transmission.
|
|
95
|
+
* @readonly
|
|
96
|
+
*/
|
|
97
|
+
rejectedOptions?: RejectedOptions;
|
|
98
|
+
}
|
|
99
|
+
interface Recipient extends RecipientValueOneOf {
|
|
100
|
+
/**
|
|
101
|
+
* Recipient email address will be resolved from Contacts API.
|
|
102
|
+
* @format GUID
|
|
103
|
+
*/
|
|
104
|
+
contactId?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Recipient email address will be resolved from Users API.
|
|
107
|
+
* @format GUID
|
|
108
|
+
*/
|
|
109
|
+
userId?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Contact will be created with this email address if it does not exist yet.
|
|
112
|
+
* @format EMAIL
|
|
113
|
+
*/
|
|
114
|
+
emailAddress?: string;
|
|
115
|
+
/**
|
|
116
|
+
* Recipient name (optional). Default - empty.
|
|
117
|
+
* @minLength 1
|
|
118
|
+
* @maxLength 50
|
|
119
|
+
*/
|
|
120
|
+
name?: string | null;
|
|
121
|
+
/**
|
|
122
|
+
* Failure reason - filled if the recipient was skipped and the email was not sent to them. Otherwise, it will be NONE.
|
|
123
|
+
* @readonly
|
|
124
|
+
*/
|
|
125
|
+
failureReason?: FailureReasonWithLiterals;
|
|
126
|
+
}
|
|
127
|
+
/** @oneof */
|
|
128
|
+
interface RecipientValueOneOf {
|
|
129
|
+
/**
|
|
130
|
+
* Recipient email address will be resolved from Contacts API.
|
|
131
|
+
* @format GUID
|
|
132
|
+
*/
|
|
133
|
+
contactId?: string;
|
|
134
|
+
/**
|
|
135
|
+
* Recipient email address will be resolved from Users API.
|
|
136
|
+
* @format GUID
|
|
137
|
+
*/
|
|
138
|
+
userId?: string;
|
|
139
|
+
/**
|
|
140
|
+
* Contact will be created with this email address if it does not exist yet.
|
|
141
|
+
* @format EMAIL
|
|
142
|
+
*/
|
|
143
|
+
emailAddress?: string;
|
|
144
|
+
}
|
|
145
|
+
declare enum FailureReason {
|
|
146
|
+
/** Present in case of successfully sent email. */
|
|
147
|
+
NONE = "NONE",
|
|
148
|
+
/** Contact or user not found by given ID. */
|
|
149
|
+
RECIPIENT_NOT_FOUND = "RECIPIENT_NOT_FOUND",
|
|
150
|
+
/** Contact or user has empty email address. */
|
|
151
|
+
EMAIL_ADDRESS_MISSING = "EMAIL_ADDRESS_MISSING",
|
|
152
|
+
/** Email address is invalid (no such mailbox exist). */
|
|
153
|
+
EMAIL_ADDRESS_INVALID = "EMAIL_ADDRESS_INVALID",
|
|
154
|
+
/** Email address has bounced previously and cannot be sent to again. */
|
|
155
|
+
EMAIL_ADDRESS_BOUNCED = "EMAIL_ADDRESS_BOUNCED",
|
|
156
|
+
/** Recipient did not give consent to send marketing emails. */
|
|
157
|
+
MARKETING_CONSENT_NOT_GIVEN = "MARKETING_CONSENT_NOT_GIVEN",
|
|
158
|
+
/** User is currently not a collaborator on the site. */
|
|
159
|
+
NOT_SITE_COLLABORATOR = "NOT_SITE_COLLABORATOR"
|
|
160
|
+
}
|
|
161
|
+
/** @enumType */
|
|
162
|
+
type FailureReasonWithLiterals = FailureReason | 'NONE' | 'RECIPIENT_NOT_FOUND' | 'EMAIL_ADDRESS_MISSING' | 'EMAIL_ADDRESS_INVALID' | 'EMAIL_ADDRESS_BOUNCED' | 'MARKETING_CONSENT_NOT_GIVEN' | 'NOT_SITE_COLLABORATOR';
|
|
163
|
+
declare enum Type {
|
|
164
|
+
/** Email is mostly sent to a single recipient in response to an action they took. No unsubscribe link is added to the email. */
|
|
165
|
+
TRANSACTIONAL = "TRANSACTIONAL",
|
|
166
|
+
/** Email is sent to multiple recipients, usually as part of a marketing campaign. Unsubscribe link is added to the email. */
|
|
167
|
+
MARKETING = "MARKETING"
|
|
168
|
+
}
|
|
169
|
+
/** @enumType */
|
|
170
|
+
type TypeWithLiterals = Type | 'TRANSACTIONAL' | 'MARKETING';
|
|
171
|
+
interface MarketingOptions {
|
|
172
|
+
/**
|
|
173
|
+
* Placeholder that will be replaced with the actual unsubscribe URL in the email content (optional, case sensitive).
|
|
174
|
+
* Make sure it's unique and not used anywhere else in the email content.
|
|
175
|
+
* For example, you can use a placeholder like {{unsubscribe_url}} or [UNSUBSCRIBE_URL].
|
|
176
|
+
* If it's not provided, then unsubscribe URL (in site main language) text will be added to the bottom of the email.
|
|
177
|
+
* @maxLength 100
|
|
178
|
+
*/
|
|
179
|
+
unsubscribeUrlPlaceholder?: string | null;
|
|
180
|
+
}
|
|
181
|
+
declare enum Status {
|
|
182
|
+
/** Email transmission has been successfully created (and will be processed shortly). */
|
|
183
|
+
ACCEPTED = "ACCEPTED",
|
|
184
|
+
/** Email transmission is currently being processed (checking content, resolving recipients, sending emails). */
|
|
185
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
186
|
+
/** Email transmission has been fully processed (per recipient information is now available). */
|
|
187
|
+
PROCESSED = "PROCESSED",
|
|
188
|
+
/** Email transmission failed abuse check and no emails will be sent. */
|
|
189
|
+
REJECTED = "REJECTED"
|
|
190
|
+
}
|
|
191
|
+
/** @enumType */
|
|
192
|
+
type StatusWithLiterals = Status | 'ACCEPTED' | 'IN_PROGRESS' | 'PROCESSED' | 'REJECTED';
|
|
193
|
+
interface RejectedOptions {
|
|
194
|
+
/**
|
|
195
|
+
* Reasons for email transmission rejection.
|
|
196
|
+
* @minSize 1
|
|
197
|
+
* @maxSize 10
|
|
198
|
+
* @readonly
|
|
199
|
+
*/
|
|
200
|
+
rejectionReasons?: RejectionReasonWithLiterals[];
|
|
201
|
+
}
|
|
202
|
+
declare enum RejectionReason {
|
|
203
|
+
BLACKLISTED_SENDER_EMAIL = "BLACKLISTED_SENDER_EMAIL",
|
|
204
|
+
BLACKLISTED_SENDER_NAME = "BLACKLISTED_SENDER_NAME",
|
|
205
|
+
BLACKLISTED_REPLY_TO_EMAIL = "BLACKLISTED_REPLY_TO_EMAIL",
|
|
206
|
+
BLACKLISTED_REPLY_TO_NAME = "BLACKLISTED_REPLY_TO_NAME",
|
|
207
|
+
BLACKLISTED_LINK = "BLACKLISTED_LINK",
|
|
208
|
+
BLACKLISTED_TEXT = "BLACKLISTED_TEXT"
|
|
209
|
+
}
|
|
210
|
+
/** @enumType */
|
|
211
|
+
type RejectionReasonWithLiterals = RejectionReason | 'BLACKLISTED_SENDER_EMAIL' | 'BLACKLISTED_SENDER_NAME' | 'BLACKLISTED_REPLY_TO_EMAIL' | 'BLACKLISTED_REPLY_TO_NAME' | 'BLACKLISTED_LINK' | 'BLACKLISTED_TEXT';
|
|
212
|
+
interface SendEmailTransmissionRequest {
|
|
213
|
+
/** EmailTransmission to be created. */
|
|
214
|
+
emailTransmission: EmailTransmission;
|
|
215
|
+
/**
|
|
216
|
+
* Idempotency key used to prevent duplicate email transmissions (optional).
|
|
217
|
+
* If a request with the same idempotency key is received, the server will return the same response as the original request.
|
|
218
|
+
* @format GUID
|
|
219
|
+
*/
|
|
220
|
+
idempotencyKey?: string | null;
|
|
221
|
+
}
|
|
222
|
+
interface SendEmailTransmissionResponse {
|
|
223
|
+
/** The created EmailTransmission. */
|
|
224
|
+
emailTransmission?: EmailTransmission;
|
|
225
|
+
}
|
|
226
|
+
interface AccountSuspendedErrorDetails {
|
|
227
|
+
/**
|
|
228
|
+
* URL of the page where the user can contact support or learn more about the suspension.
|
|
229
|
+
* @format WEB_URL
|
|
230
|
+
*/
|
|
231
|
+
termsOfServicePageUrl?: string;
|
|
232
|
+
}
|
|
233
|
+
interface OutOfQuotaErrorDetails {
|
|
234
|
+
/**
|
|
235
|
+
* URL of the page where the user can upgrade their plan or purchase more quota.
|
|
236
|
+
* @format WEB_URL
|
|
237
|
+
*/
|
|
238
|
+
packagePickerUrl?: string;
|
|
239
|
+
}
|
|
240
|
+
interface GetEmailTransmissionRequest {
|
|
241
|
+
/**
|
|
242
|
+
* ID of the EmailTransmission to retrieve.
|
|
243
|
+
* @format GUID
|
|
244
|
+
*/
|
|
245
|
+
emailTransmissionId: string;
|
|
246
|
+
}
|
|
247
|
+
interface GetEmailTransmissionResponse {
|
|
248
|
+
/** The requested EmailTransmission. */
|
|
249
|
+
emailTransmission?: EmailTransmission;
|
|
250
|
+
}
|
|
251
|
+
interface QueryEmailTransmissionsRequest {
|
|
252
|
+
/** WQL expression. */
|
|
253
|
+
query?: CursorQuery;
|
|
254
|
+
}
|
|
255
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
256
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
257
|
+
cursorPaging?: CursorPaging;
|
|
258
|
+
/**
|
|
259
|
+
* Filter object in the following format:
|
|
260
|
+
* `"filter" : {
|
|
261
|
+
* "fieldName1": "value1",
|
|
262
|
+
* "fieldName2":{"$operator":"value2"}
|
|
263
|
+
* }`
|
|
264
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
265
|
+
*/
|
|
266
|
+
filter?: Record<string, any> | null;
|
|
267
|
+
/**
|
|
268
|
+
* Sort object in the following format:
|
|
269
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
270
|
+
* @maxSize 4
|
|
271
|
+
*/
|
|
272
|
+
sort?: Sorting[];
|
|
273
|
+
}
|
|
274
|
+
/** @oneof */
|
|
275
|
+
interface CursorQueryPagingMethodOneOf {
|
|
276
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
277
|
+
cursorPaging?: CursorPaging;
|
|
278
|
+
}
|
|
279
|
+
interface Sorting {
|
|
280
|
+
/**
|
|
281
|
+
* Name of the field to sort by.
|
|
282
|
+
* @minLength 1
|
|
283
|
+
* @maxLength 50
|
|
284
|
+
*/
|
|
285
|
+
fieldName?: string;
|
|
286
|
+
/** Sort order. */
|
|
287
|
+
order?: SortOrderWithLiterals;
|
|
288
|
+
}
|
|
289
|
+
declare enum SortOrder {
|
|
290
|
+
ASC = "ASC",
|
|
291
|
+
DESC = "DESC"
|
|
292
|
+
}
|
|
293
|
+
/** @enumType */
|
|
294
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
295
|
+
interface CursorPaging {
|
|
296
|
+
/**
|
|
297
|
+
* Number of items to load.
|
|
298
|
+
* @max 100
|
|
299
|
+
*/
|
|
300
|
+
limit?: number | null;
|
|
301
|
+
/**
|
|
302
|
+
* Pointer to the next or previous page in the list of results.
|
|
303
|
+
*
|
|
304
|
+
* You can get the relevant cursor token
|
|
305
|
+
* from the `pagingMetadata` object in the previous call's response.
|
|
306
|
+
* Not relevant for the first request.
|
|
307
|
+
* @maxLength 1000
|
|
308
|
+
*/
|
|
309
|
+
cursor?: string | null;
|
|
310
|
+
}
|
|
311
|
+
interface QueryEmailTransmissionsResponse {
|
|
312
|
+
/** List of EmailTransmissions. */
|
|
313
|
+
emailTransmissions?: EmailTransmission[];
|
|
314
|
+
/** Paging metadata */
|
|
315
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
316
|
+
}
|
|
317
|
+
interface CursorPagingMetadata {
|
|
318
|
+
/** Number of items returned in the response. */
|
|
319
|
+
count?: number | null;
|
|
320
|
+
/** Offset that was requested. */
|
|
321
|
+
cursors?: Cursors;
|
|
322
|
+
/**
|
|
323
|
+
* Indicates if there are more results after the current page.
|
|
324
|
+
* If `true`, another page of results can be retrieved.
|
|
325
|
+
* If `false`, this is the last page.
|
|
326
|
+
*/
|
|
327
|
+
hasNext?: boolean | null;
|
|
328
|
+
}
|
|
329
|
+
interface Cursors {
|
|
330
|
+
/**
|
|
331
|
+
* Cursor pointing to next page in the list of results.
|
|
332
|
+
* @maxLength 1000
|
|
333
|
+
*/
|
|
334
|
+
next?: string | null;
|
|
335
|
+
/**
|
|
336
|
+
* Cursor pointing to previous page in the list of results.
|
|
337
|
+
* @maxLength 1000
|
|
338
|
+
*/
|
|
339
|
+
prev?: string | null;
|
|
340
|
+
}
|
|
341
|
+
interface DeleteEmailTransmissionRequest {
|
|
342
|
+
/**
|
|
343
|
+
* Id of the EmailTransmission to delete.
|
|
344
|
+
* @format GUID
|
|
345
|
+
*/
|
|
346
|
+
emailTransmissionId: string;
|
|
347
|
+
}
|
|
348
|
+
interface DeleteEmailTransmissionResponse {
|
|
349
|
+
}
|
|
350
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
351
|
+
createdEvent?: EntityCreatedEvent;
|
|
352
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
353
|
+
deletedEvent?: EntityDeletedEvent;
|
|
354
|
+
actionEvent?: ActionEvent;
|
|
355
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
356
|
+
id?: string;
|
|
357
|
+
/**
|
|
358
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
359
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
360
|
+
*/
|
|
361
|
+
entityFqdn?: string;
|
|
362
|
+
/**
|
|
363
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
364
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
365
|
+
*/
|
|
366
|
+
slug?: string;
|
|
367
|
+
/** ID of the entity associated with the event. */
|
|
368
|
+
entityId?: string;
|
|
369
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
370
|
+
eventTime?: Date | null;
|
|
371
|
+
/**
|
|
372
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
373
|
+
* (for example, GDPR).
|
|
374
|
+
*/
|
|
375
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
376
|
+
/** If present, indicates the action that triggered the event. */
|
|
377
|
+
originatedFrom?: string | null;
|
|
378
|
+
/**
|
|
379
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
|
|
380
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
381
|
+
*/
|
|
382
|
+
entityEventSequence?: string | null;
|
|
383
|
+
}
|
|
384
|
+
/** @oneof */
|
|
385
|
+
interface DomainEventBodyOneOf {
|
|
386
|
+
createdEvent?: EntityCreatedEvent;
|
|
387
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
388
|
+
deletedEvent?: EntityDeletedEvent;
|
|
389
|
+
actionEvent?: ActionEvent;
|
|
390
|
+
}
|
|
391
|
+
interface EntityCreatedEvent {
|
|
392
|
+
entityAsJson?: string;
|
|
393
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
394
|
+
restoreInfo?: RestoreInfo;
|
|
395
|
+
}
|
|
396
|
+
interface RestoreInfo {
|
|
397
|
+
deletedDate?: Date | null;
|
|
398
|
+
}
|
|
399
|
+
interface EntityUpdatedEvent {
|
|
400
|
+
/**
|
|
401
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
402
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
403
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
404
|
+
*/
|
|
405
|
+
currentEntityAsJson?: string;
|
|
406
|
+
}
|
|
407
|
+
interface EntityDeletedEvent {
|
|
408
|
+
/** Entity that was deleted. */
|
|
409
|
+
deletedEntityAsJson?: string | null;
|
|
410
|
+
}
|
|
411
|
+
interface ActionEvent {
|
|
412
|
+
bodyAsJson?: string;
|
|
413
|
+
}
|
|
414
|
+
interface Empty {
|
|
415
|
+
}
|
|
416
|
+
interface MessageEnvelope {
|
|
417
|
+
/**
|
|
418
|
+
* App instance ID.
|
|
419
|
+
* @format GUID
|
|
420
|
+
*/
|
|
421
|
+
instanceId?: string | null;
|
|
422
|
+
/**
|
|
423
|
+
* Event type.
|
|
424
|
+
* @maxLength 150
|
|
425
|
+
*/
|
|
426
|
+
eventType?: string;
|
|
427
|
+
/** The identification type and identity data. */
|
|
428
|
+
identity?: IdentificationData;
|
|
429
|
+
/** Stringify payload. */
|
|
430
|
+
data?: string;
|
|
431
|
+
/** Details related to the account */
|
|
432
|
+
accountInfo?: AccountInfo;
|
|
433
|
+
}
|
|
434
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
435
|
+
/**
|
|
436
|
+
* ID of a site visitor that has not logged in to the site.
|
|
437
|
+
* @format GUID
|
|
438
|
+
*/
|
|
439
|
+
anonymousVisitorId?: string;
|
|
440
|
+
/**
|
|
441
|
+
* ID of a site visitor that has logged in to the site.
|
|
442
|
+
* @format GUID
|
|
443
|
+
*/
|
|
444
|
+
memberId?: string;
|
|
445
|
+
/**
|
|
446
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
447
|
+
* @format GUID
|
|
448
|
+
*/
|
|
449
|
+
wixUserId?: string;
|
|
450
|
+
/**
|
|
451
|
+
* ID of an app.
|
|
452
|
+
* @format GUID
|
|
453
|
+
*/
|
|
454
|
+
appId?: string;
|
|
455
|
+
/** @readonly */
|
|
456
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
457
|
+
}
|
|
458
|
+
/** @oneof */
|
|
459
|
+
interface IdentificationDataIdOneOf {
|
|
460
|
+
/**
|
|
461
|
+
* ID of a site visitor that has not logged in to the site.
|
|
462
|
+
* @format GUID
|
|
463
|
+
*/
|
|
464
|
+
anonymousVisitorId?: string;
|
|
465
|
+
/**
|
|
466
|
+
* ID of a site visitor that has logged in to the site.
|
|
467
|
+
* @format GUID
|
|
468
|
+
*/
|
|
469
|
+
memberId?: string;
|
|
470
|
+
/**
|
|
471
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
472
|
+
* @format GUID
|
|
473
|
+
*/
|
|
474
|
+
wixUserId?: string;
|
|
475
|
+
/**
|
|
476
|
+
* ID of an app.
|
|
477
|
+
* @format GUID
|
|
478
|
+
*/
|
|
479
|
+
appId?: string;
|
|
480
|
+
}
|
|
481
|
+
declare enum WebhookIdentityType {
|
|
482
|
+
UNKNOWN = "UNKNOWN",
|
|
483
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
484
|
+
MEMBER = "MEMBER",
|
|
485
|
+
WIX_USER = "WIX_USER",
|
|
486
|
+
APP = "APP"
|
|
487
|
+
}
|
|
488
|
+
/** @enumType */
|
|
489
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
490
|
+
interface AccountInfo {
|
|
491
|
+
/**
|
|
492
|
+
* ID of the Wix account associated with the event.
|
|
493
|
+
* @format GUID
|
|
494
|
+
*/
|
|
495
|
+
accountId?: string | null;
|
|
496
|
+
/**
|
|
497
|
+
* ID of the parent Wix account. Only included when accountId belongs to a child account.
|
|
498
|
+
* @format GUID
|
|
499
|
+
*/
|
|
500
|
+
parentAccountId?: string | null;
|
|
501
|
+
/**
|
|
502
|
+
* ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
|
|
503
|
+
* @format GUID
|
|
504
|
+
*/
|
|
505
|
+
siteId?: string | null;
|
|
506
|
+
}
|
|
507
|
+
/** @docsIgnore */
|
|
508
|
+
type SendEmailTransmissionApplicationErrors = {
|
|
509
|
+
code?: 'ACCOUNT_SUSPENDED';
|
|
510
|
+
description?: string;
|
|
511
|
+
data?: AccountSuspendedErrorDetails;
|
|
512
|
+
} | {
|
|
513
|
+
code?: 'UNVERIFIED_SENDER_EMAIL';
|
|
514
|
+
description?: string;
|
|
515
|
+
data?: Record<string, any>;
|
|
516
|
+
} | {
|
|
517
|
+
code?: 'OUT_OF_QUOTA';
|
|
518
|
+
description?: string;
|
|
519
|
+
data?: OutOfQuotaErrorDetails;
|
|
520
|
+
};
|
|
521
|
+
/** @docsIgnore */
|
|
522
|
+
type SendEmailTransmissionValidationErrors = {
|
|
523
|
+
ruleName?: 'INVALID_METADATA';
|
|
524
|
+
};
|
|
525
|
+
/** @docsIgnore */
|
|
526
|
+
type DeleteEmailTransmissionApplicationErrors = {
|
|
527
|
+
code?: 'EMAIL_TRANSMISSION_IS_IN_PROGRESS';
|
|
528
|
+
description?: string;
|
|
529
|
+
data?: Record<string, any>;
|
|
530
|
+
};
|
|
531
|
+
|
|
532
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
533
|
+
getUrl: (context: any) => string;
|
|
534
|
+
httpMethod: K;
|
|
535
|
+
path: string;
|
|
536
|
+
pathParams: M;
|
|
537
|
+
__requestType: T;
|
|
538
|
+
__originalRequestType: S;
|
|
539
|
+
__responseType: Q;
|
|
540
|
+
__originalResponseType: R;
|
|
541
|
+
};
|
|
542
|
+
declare function sendEmailTransmission(): __PublicMethodMetaInfo<'POST', {}, SendEmailTransmissionRequest$1, SendEmailTransmissionRequest, SendEmailTransmissionResponse$1, SendEmailTransmissionResponse>;
|
|
543
|
+
declare function getEmailTransmission(): __PublicMethodMetaInfo<'GET', {
|
|
544
|
+
emailTransmissionId: string;
|
|
545
|
+
}, GetEmailTransmissionRequest$1, GetEmailTransmissionRequest, GetEmailTransmissionResponse$1, GetEmailTransmissionResponse>;
|
|
546
|
+
declare function queryEmailTransmissions(): __PublicMethodMetaInfo<'POST', {}, QueryEmailTransmissionsRequest$1, QueryEmailTransmissionsRequest, QueryEmailTransmissionsResponse$1, QueryEmailTransmissionsResponse>;
|
|
547
|
+
declare function deleteEmailTransmission(): __PublicMethodMetaInfo<'DELETE', {
|
|
548
|
+
emailTransmissionId: string;
|
|
549
|
+
}, DeleteEmailTransmissionRequest$1, DeleteEmailTransmissionRequest, DeleteEmailTransmissionResponse$1, DeleteEmailTransmissionResponse>;
|
|
550
|
+
|
|
551
|
+
export { type AccountInfo as AccountInfoOriginal, type AccountSuspendedErrorDetails as AccountSuspendedErrorDetailsOriginal, type ActionEvent as ActionEventOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DeleteEmailTransmissionApplicationErrors as DeleteEmailTransmissionApplicationErrorsOriginal, type DeleteEmailTransmissionRequest as DeleteEmailTransmissionRequestOriginal, type DeleteEmailTransmissionResponse as DeleteEmailTransmissionResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EmailTransmission as EmailTransmissionOriginal, type EmailTransmissionStatusOptionsOneOf as EmailTransmissionStatusOptionsOneOfOriginal, type EmailTransmissionTypeOptionsOneOf as EmailTransmissionTypeOptionsOneOfOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, FailureReason as FailureReasonOriginal, type FailureReasonWithLiterals as FailureReasonWithLiteralsOriginal, type GetEmailTransmissionRequest as GetEmailTransmissionRequestOriginal, type GetEmailTransmissionResponse as GetEmailTransmissionResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MarketingOptions as MarketingOptionsOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type OutOfQuotaErrorDetails as OutOfQuotaErrorDetailsOriginal, type QueryEmailTransmissionsRequest as QueryEmailTransmissionsRequestOriginal, type QueryEmailTransmissionsResponse as QueryEmailTransmissionsResponseOriginal, type Recipient as RecipientOriginal, type RecipientValueOneOf as RecipientValueOneOfOriginal, type RejectedOptions as RejectedOptionsOriginal, RejectionReason as RejectionReasonOriginal, type RejectionReasonWithLiterals as RejectionReasonWithLiteralsOriginal, type RestoreInfo as RestoreInfoOriginal, type SendEmailTransmissionApplicationErrors as SendEmailTransmissionApplicationErrorsOriginal, type SendEmailTransmissionRequest as SendEmailTransmissionRequestOriginal, type SendEmailTransmissionResponse as SendEmailTransmissionResponseOriginal, type SendEmailTransmissionValidationErrors as SendEmailTransmissionValidationErrorsOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, Type as TypeOriginal, type TypeWithLiterals as TypeWithLiteralsOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, deleteEmailTransmission, getEmailTransmission, queryEmailTransmissions, sendEmailTransmission };
|