@wix/auto_sdk_email-marketing_campaigns 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.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/email-marketing-v1-campaign-campaigns.context.d.ts +64 -0
  11. package/build/cjs/src/email-marketing-v1-campaign-campaigns.context.js +86 -0
  12. package/build/cjs/src/email-marketing-v1-campaign-campaigns.context.js.map +1 -0
  13. package/build/cjs/src/email-marketing-v1-campaign-campaigns.http.d.ts +63 -0
  14. package/build/cjs/src/email-marketing-v1-campaign-campaigns.http.js +680 -0
  15. package/build/cjs/src/email-marketing-v1-campaign-campaigns.http.js.map +1 -0
  16. package/build/cjs/src/email-marketing-v1-campaign-campaigns.meta.d.ts +44 -0
  17. package/build/cjs/src/email-marketing-v1-campaign-campaigns.meta.js +294 -0
  18. package/build/cjs/src/email-marketing-v1-campaign-campaigns.meta.js.map +1 -0
  19. package/build/cjs/src/email-marketing-v1-campaign-campaigns.public.d.ts +161 -0
  20. package/build/cjs/src/email-marketing-v1-campaign-campaigns.public.js +180 -0
  21. package/build/cjs/src/email-marketing-v1-campaign-campaigns.public.js.map +1 -0
  22. package/build/cjs/src/email-marketing-v1-campaign-campaigns.types.d.ts +1433 -0
  23. package/build/cjs/src/email-marketing-v1-campaign-campaigns.types.js +206 -0
  24. package/build/cjs/src/email-marketing-v1-campaign-campaigns.types.js.map +1 -0
  25. package/build/cjs/src/email-marketing-v1-campaign-campaigns.universal.d.ts +1912 -0
  26. package/build/cjs/src/email-marketing-v1-campaign-campaigns.universal.js +787 -0
  27. package/build/cjs/src/email-marketing-v1-campaign-campaigns.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/email-marketing-v1-campaign-campaigns.context.d.ts +64 -0
  39. package/build/es/src/email-marketing-v1-campaign-campaigns.context.js +64 -0
  40. package/build/es/src/email-marketing-v1-campaign-campaigns.context.js.map +1 -0
  41. package/build/es/src/email-marketing-v1-campaign-campaigns.http.d.ts +63 -0
  42. package/build/es/src/email-marketing-v1-campaign-campaigns.http.js +663 -0
  43. package/build/es/src/email-marketing-v1-campaign-campaigns.http.js.map +1 -0
  44. package/build/es/src/email-marketing-v1-campaign-campaigns.meta.d.ts +44 -0
  45. package/build/es/src/email-marketing-v1-campaign-campaigns.meta.js +254 -0
  46. package/build/es/src/email-marketing-v1-campaign-campaigns.meta.js.map +1 -0
  47. package/build/es/src/email-marketing-v1-campaign-campaigns.public.d.ts +161 -0
  48. package/build/es/src/email-marketing-v1-campaign-campaigns.public.js +144 -0
  49. package/build/es/src/email-marketing-v1-campaign-campaigns.public.js.map +1 -0
  50. package/build/es/src/email-marketing-v1-campaign-campaigns.types.d.ts +1433 -0
  51. package/build/es/src/email-marketing-v1-campaign-campaigns.types.js +203 -0
  52. package/build/es/src/email-marketing-v1-campaign-campaigns.types.js.map +1 -0
  53. package/build/es/src/email-marketing-v1-campaign-campaigns.universal.d.ts +1912 -0
  54. package/build/es/src/email-marketing-v1-campaign-campaigns.universal.js +747 -0
  55. package/build/es/src/email-marketing-v1-campaign-campaigns.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/email-marketing-v1-campaign-campaigns.context.d.ts +64 -0
  66. package/build/internal/cjs/src/email-marketing-v1-campaign-campaigns.context.js +86 -0
  67. package/build/internal/cjs/src/email-marketing-v1-campaign-campaigns.context.js.map +1 -0
  68. package/build/internal/cjs/src/email-marketing-v1-campaign-campaigns.http.d.ts +63 -0
  69. package/build/internal/cjs/src/email-marketing-v1-campaign-campaigns.http.js +680 -0
  70. package/build/internal/cjs/src/email-marketing-v1-campaign-campaigns.http.js.map +1 -0
  71. package/build/internal/cjs/src/email-marketing-v1-campaign-campaigns.meta.d.ts +44 -0
  72. package/build/internal/cjs/src/email-marketing-v1-campaign-campaigns.meta.js +294 -0
  73. package/build/internal/cjs/src/email-marketing-v1-campaign-campaigns.meta.js.map +1 -0
  74. package/build/internal/cjs/src/email-marketing-v1-campaign-campaigns.public.d.ts +161 -0
  75. package/build/internal/cjs/src/email-marketing-v1-campaign-campaigns.public.js +180 -0
  76. package/build/internal/cjs/src/email-marketing-v1-campaign-campaigns.public.js.map +1 -0
  77. package/build/internal/cjs/src/email-marketing-v1-campaign-campaigns.types.d.ts +1433 -0
  78. package/build/internal/cjs/src/email-marketing-v1-campaign-campaigns.types.js +206 -0
  79. package/build/internal/cjs/src/email-marketing-v1-campaign-campaigns.types.js.map +1 -0
  80. package/build/internal/cjs/src/email-marketing-v1-campaign-campaigns.universal.d.ts +1912 -0
  81. package/build/internal/cjs/src/email-marketing-v1-campaign-campaigns.universal.js +787 -0
  82. package/build/internal/cjs/src/email-marketing-v1-campaign-campaigns.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/email-marketing-v1-campaign-campaigns.context.d.ts +64 -0
  93. package/build/internal/es/src/email-marketing-v1-campaign-campaigns.context.js +64 -0
  94. package/build/internal/es/src/email-marketing-v1-campaign-campaigns.context.js.map +1 -0
  95. package/build/internal/es/src/email-marketing-v1-campaign-campaigns.http.d.ts +63 -0
  96. package/build/internal/es/src/email-marketing-v1-campaign-campaigns.http.js +663 -0
  97. package/build/internal/es/src/email-marketing-v1-campaign-campaigns.http.js.map +1 -0
  98. package/build/internal/es/src/email-marketing-v1-campaign-campaigns.meta.d.ts +44 -0
  99. package/build/internal/es/src/email-marketing-v1-campaign-campaigns.meta.js +254 -0
  100. package/build/internal/es/src/email-marketing-v1-campaign-campaigns.meta.js.map +1 -0
  101. package/build/internal/es/src/email-marketing-v1-campaign-campaigns.public.d.ts +161 -0
  102. package/build/internal/es/src/email-marketing-v1-campaign-campaigns.public.js +144 -0
  103. package/build/internal/es/src/email-marketing-v1-campaign-campaigns.public.js.map +1 -0
  104. package/build/internal/es/src/email-marketing-v1-campaign-campaigns.types.d.ts +1433 -0
  105. package/build/internal/es/src/email-marketing-v1-campaign-campaigns.types.js +203 -0
  106. package/build/internal/es/src/email-marketing-v1-campaign-campaigns.types.js.map +1 -0
  107. package/build/internal/es/src/email-marketing-v1-campaign-campaigns.universal.d.ts +1912 -0
  108. package/build/internal/es/src/email-marketing-v1-campaign-campaigns.universal.js +747 -0
  109. package/build/internal/es/src/email-marketing-v1-campaign-campaigns.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,1912 @@
1
+ export interface Campaign {
2
+ /** Campaign ID. */
3
+ campaignId?: string;
4
+ /** Marketing campaign title. If you don't provide the value, the title automatically gets the value of an email subject. */
5
+ title?: string | null;
6
+ /** URL of the first image after the logo. */
7
+ firstImageUrl?: string | null;
8
+ /**
9
+ * Landing page snapshot URL. <br>
10
+ * This field is deprecated and snapshot images are no longer supported. Instead, use the `firstImageUrl` field.
11
+ * The value of this field will soon become the same as the value of the `firstImageUrl` field.
12
+ * @deprecated Landing page snapshot URL. <br>
13
+ * This field is deprecated and snapshot images are no longer supported. Instead, use the `firstImageUrl` field.
14
+ * The value of this field will soon become the same as the value of the `firstImageUrl` field.
15
+ * @replacedBy firstImageUrl
16
+ * @targetRemovalDate 2024-12-01
17
+ */
18
+ snapshotImageUrl?: string | null;
19
+ /**
20
+ * Editor type. Either web app, or mobile app. One of:
21
+ * + `'WEB'`
22
+ * + `'MOBILE'`
23
+ */
24
+ editorType?: CampaignEditorTypeEnum;
25
+ /**
26
+ * Campaign status. One of:
27
+ * + `'ACTIVE'`
28
+ * + `'ARCHIVED'`
29
+ * + `'DELETED'`
30
+ */
31
+ status?: CampaignStatusEnum;
32
+ /**
33
+ * Campaign visibility status. One of:
34
+ * + `'DRAFT'`
35
+ * + `'PUBLISHED'`
36
+ * + `'TEMPLATE'`
37
+ */
38
+ visibilityStatus?: CampaignVisibilityStatusEnum;
39
+ /**
40
+ * Campaign distribution status. One of:
41
+ * + `'NOT_STARTED'`
42
+ * + `'SCHEDULED'`
43
+ * + `'IN_DETECTION'`
44
+ * + `'IN_MODERATION'`
45
+ * + `'SAMPLING'`
46
+ * + `'SENDING'`
47
+ * + `'REJECTED'`
48
+ * + `'TERMINATED'`
49
+ * + `'DISTRIBUTED'`
50
+ * + `'PAUSED'`
51
+ */
52
+ distributionStatus?: Enum;
53
+ /** Publishing data. The field is returned empty if the campaign isn't published. */
54
+ publishingData?: PublishingData;
55
+ /** Date and time when the campaign was created. */
56
+ dateCreated?: Date | null;
57
+ /** Date and time when the campaign was updated. */
58
+ dateUpdated?: Date | null;
59
+ /**
60
+ * Email subject of the campaign (initially copied from the template).
61
+ * TODO: Deprecated (moved to "GetComposerResponse").
62
+ * @deprecated
63
+ */
64
+ emailSubject?: string;
65
+ }
66
+ export declare enum CampaignEditorTypeEnum {
67
+ /** Unknown editor. This value isn't used. */
68
+ UNKNOWN = "UNKNOWN",
69
+ /** Classic web editor. */
70
+ WEB = "WEB",
71
+ /** Classic mobile editor. */
72
+ MOBILE = "MOBILE",
73
+ /** Chat (AI) based web editor. */
74
+ MJML = "MJML"
75
+ }
76
+ export declare enum CampaignStatusEnum {
77
+ /** Unknown campaign. This value isn't used. */
78
+ UNKNOWN = "UNKNOWN",
79
+ /** Campaign is active. */
80
+ ACTIVE = "ACTIVE",
81
+ /** Campaign is archived. */
82
+ ARCHIVED = "ARCHIVED",
83
+ /** Campaign is deleted. */
84
+ DELETED = "DELETED"
85
+ }
86
+ export declare enum CampaignVisibilityStatusEnum {
87
+ /** Unknown status. This value isn't used. */
88
+ UNKNOWN = "UNKNOWN",
89
+ /** Campaign isn't published yet. */
90
+ DRAFT = "DRAFT",
91
+ /** Campaign is published. */
92
+ PUBLISHED = "PUBLISHED",
93
+ /** Campaign is a template. */
94
+ TEMPLATE = "TEMPLATE"
95
+ }
96
+ export declare enum Enum {
97
+ /** Unknown distribution status. */
98
+ UNKNOWN = "UNKNOWN",
99
+ /** Campaign isn't distributed to recipients yet. */
100
+ NOT_STARTED = "NOT_STARTED",
101
+ /** Campaign is scheduled for distribution. */
102
+ SCHEDULED = "SCHEDULED",
103
+ /** Campaign is in screening for malicious content. */
104
+ IN_DETECTION = "IN_DETECTION",
105
+ /** Campaign is in review by the site moderators. */
106
+ IN_MODERATION = "IN_MODERATION",
107
+ /** Several recipients are selected for campaign testing, and campaign is sent out to them. */
108
+ SAMPLING = "SAMPLING",
109
+ /** Campaign is being sent out to all recipients. */
110
+ SENDING = "SENDING",
111
+ /** Campaign is rejected. */
112
+ REJECTED = "REJECTED",
113
+ /** Campaign is terminated after a failed sampling test. */
114
+ TERMINATED = "TERMINATED",
115
+ /** Campaign is fully distributed to all recipients. */
116
+ DISTRIBUTED = "DISTRIBUTED",
117
+ /** Scheduled campaign is paused. */
118
+ PAUSED = "PAUSED"
119
+ }
120
+ export interface PublishingData {
121
+ /** Landing page URL. */
122
+ landingPageUrl?: string;
123
+ /** Marketing campaign statistics. */
124
+ statistics?: CampaignStatistics;
125
+ /** Marketing campaign publish date. */
126
+ datePublished?: Date | null;
127
+ }
128
+ export interface CampaignStatistics {
129
+ /** Landing page statistics of a marketing campaign. */
130
+ landingPage?: LandingPageStatistics;
131
+ /** Email distribution statistics of a marketing campaign. */
132
+ emailCampaign?: DistributionStatistics;
133
+ /** Combined statistics of landing page and email distribution. */
134
+ total?: TotalStatistics;
135
+ }
136
+ export interface LandingPageStatistics {
137
+ /** Number of times when a landing page was loaded or viewed. */
138
+ opened?: number;
139
+ /** Number of times a link was clicked in a landing page. */
140
+ clicked?: number;
141
+ }
142
+ export interface DistributionStatistics {
143
+ /** Number of delivered emails. */
144
+ delivered?: number;
145
+ /**
146
+ * Number of recipients who opened an email.
147
+ *
148
+ * If the same recipient opened the same email twice, it is counted as a one unique open.
149
+ */
150
+ opened?: number;
151
+ /**
152
+ * Number of recipients who clicked a link in the email.
153
+ *
154
+ * If the same recipient clicked the same link twice, it is counted as a one unique click.
155
+ *
156
+ * If the same recipient clicked different links, it is counted as a one unique click.
157
+ */
158
+ clicked?: number;
159
+ /** Number of emails that didn't reach the recipient. */
160
+ bounced?: number;
161
+ /** Number of recipients who reported the email as a spam. */
162
+ complained?: number;
163
+ /** Number of emails that weren't sent due to the campaign termination. */
164
+ notSent?: number;
165
+ }
166
+ export interface TotalStatistics {
167
+ /** Total number of emails sent. */
168
+ mailsSent?: number;
169
+ /** Number of landing page views and opened emails. */
170
+ opened?: number;
171
+ /** Number of landing page and email link clicks. */
172
+ clicked?: number;
173
+ }
174
+ export interface RejectionData {
175
+ rejectionReasons?: RejectionReasonEnum[];
176
+ }
177
+ export declare enum RejectionReasonEnum {
178
+ UNKNOWN = "UNKNOWN",
179
+ LOW_ENGAGEMENT = "LOW_ENGAGEMENT",
180
+ SENDER_DETAILS = "SENDER_DETAILS",
181
+ SPAM_TRAPS = "SPAM_TRAPS",
182
+ OTHER = "OTHER",
183
+ ADULT_SEXUAL_CONTENT = "ADULT_SEXUAL_CONTENT",
184
+ AFFILIATE_MARKETING = "AFFILIATE_MARKETING",
185
+ BETTING_OR_GAMBLING = "BETTING_OR_GAMBLING",
186
+ CREDIT_REPAIR_OR_DEBT_RELIEF = "CREDIT_REPAIR_OR_DEBT_RELIEF",
187
+ GET_RICH_QUICK_SCHEME = "GET_RICH_QUICK_SCHEME",
188
+ ILLEGAL_SUBSTANCES_OR_WEAPONS = "ILLEGAL_SUBSTANCES_OR_WEAPONS",
189
+ MISLEADING_SUBJECT_LINE = "MISLEADING_SUBJECT_LINE",
190
+ TRADING_OR_CRYPTOCURRENCIES = "TRADING_OR_CRYPTOCURRENCIES",
191
+ UNSOLICITED_CONTENT = "UNSOLICITED_CONTENT"
192
+ }
193
+ export declare enum CampaignSendingStateEnum {
194
+ /** Campaign not yet published. */
195
+ DRAFT = "DRAFT",
196
+ /** Campaign is being reviewed. */
197
+ REVIEW = "REVIEW",
198
+ /** Campaign was rejected. */
199
+ REJECTED = "REJECTED",
200
+ /** Campaign is scheduled. */
201
+ SCHEDULED = "SCHEDULED",
202
+ /** Scheduled campaign was paused. */
203
+ PAUSED = "PAUSED",
204
+ /** Campaign is published. */
205
+ PUBLISHED = "PUBLISHED",
206
+ /** Campaign is being send. */
207
+ SENDING = "SENDING",
208
+ /**
209
+ * Campaign was partially sent.
210
+ * Happens when too many recipients bounce.
211
+ */
212
+ PARTIALLY_SENT = "PARTIALLY_SENT",
213
+ /** Campaign was sent. */
214
+ SENT = "SENT"
215
+ }
216
+ export declare enum CampaignTypeEnum {
217
+ UNKNOWN = "UNKNOWN",
218
+ /** Regular email marketing campaign. */
219
+ EMAIL_MARKETING = "EMAIL_MARKETING",
220
+ /** mobile place invitation email */
221
+ INVITATION = "INVITATION",
222
+ /** automation */
223
+ AUTOMATION = "AUTOMATION",
224
+ /** triggered email */
225
+ TRIGGERED = "TRIGGERED"
226
+ }
227
+ export interface EstimateFilterSizeRequest {
228
+ /** Contacts filter expression. */
229
+ filter?: Record<string, any> | null;
230
+ /** Should "inactive" contacts be excluded or not (default value "false"). */
231
+ activeContactsOnly?: boolean;
232
+ /** Contacts plain text search expression (searches in name, phone and email fields). */
233
+ search?: string | null;
234
+ }
235
+ export interface EstimateFilterSizeResponse {
236
+ /** Mailing list size estimation. */
237
+ estimation?: number;
238
+ }
239
+ export interface EstimateAudienceSizeRequest {
240
+ /** Contact IDs of a campaign audience. */
241
+ contactIds?: string[];
242
+ /** Label IDs of a campaign audience. */
243
+ labelIds?: string[];
244
+ /** Contacts filter expression (json). */
245
+ contactsFilter?: Record<string, any> | null;
246
+ /** Contacts plain text search expression (searches in name, phone and email fields). */
247
+ search?: string | null;
248
+ /** Segment ids of a campaign audience. */
249
+ segmentIds?: string[];
250
+ /** Should "inactive" contacts be excluded or not (default value "false"). */
251
+ activeContactsOnly?: boolean;
252
+ /** Id of a campaign that is to be resent. */
253
+ resendCampaignId?: string | null;
254
+ /** Should total number of contacts in provided audience be returned or not (default value "false"). */
255
+ withTotal?: boolean;
256
+ }
257
+ export interface EstimateAudienceSizeResponse {
258
+ /** Audience size (estimated number of emails to be sent). */
259
+ estimation?: number;
260
+ /** Total number of contacts in provided audience (optional). */
261
+ total?: number | null;
262
+ }
263
+ export interface ReconcileContactRequest {
264
+ /** Email address of the contact. */
265
+ emailAddress?: string;
266
+ }
267
+ export interface ReconcileContactResponse {
268
+ /** Created or retrieved contact. */
269
+ contact?: Contact;
270
+ }
271
+ export interface Contact {
272
+ /** Unique ID of the contact entity. */
273
+ _id?: string;
274
+ /** Primary email address of the contact. */
275
+ emailAddress?: string;
276
+ /** Full name of the contact (optional). */
277
+ fullName?: string | null;
278
+ /** Profile picture of the contact (optional). */
279
+ pictureUrl?: string | null;
280
+ }
281
+ export interface SearchContactsRequest {
282
+ /** Text to search contacts by - can search by name or email address. */
283
+ searchTerm?: string;
284
+ /** Should "inactive" contacts be excluded or not (default value "false"). */
285
+ activeContactsOnly?: boolean;
286
+ /** Page size (default 50, max 1000). */
287
+ pageSize?: number | null;
288
+ }
289
+ export interface SearchContactsResponse {
290
+ /** Search results. */
291
+ contacts?: Contact[];
292
+ }
293
+ export interface GetLabelsRequest {
294
+ /** Should "inactive" contacts be excluded or not (default value "false"). */
295
+ activeContactsOnly?: boolean;
296
+ }
297
+ export interface GetLabelsResponse {
298
+ /** Returned labels with contact counts. */
299
+ labels?: Label[];
300
+ }
301
+ export interface Label {
302
+ /** Unique ID of the label entity. */
303
+ _id?: string;
304
+ /** Name of the label. */
305
+ name?: string;
306
+ /** Amount of contacts assigned to the label. */
307
+ contactsCount?: number;
308
+ }
309
+ export interface SubscribeFromLandingPageRequest {
310
+ /** Campaign ID that the subscription is happening from. */
311
+ campaignId?: string;
312
+ /** Email address that is entered into subscription field. */
313
+ emailAddress?: string;
314
+ /** Did UoU explicitly consent to terms of use or not (optional, default value "false") */
315
+ consent?: boolean;
316
+ }
317
+ export interface SubscribeFromLandingPageResponse {
318
+ contactId?: string;
319
+ }
320
+ export interface GetPlaceholderKeysRequest {
321
+ /** Campaign ID. */
322
+ campaignId?: string;
323
+ }
324
+ export interface GetPlaceholderKeysResponse {
325
+ /** Keys of placeholders used in the campaign. */
326
+ placeholderKeys?: string[];
327
+ }
328
+ export interface GetDefaultComponentsRequest {
329
+ }
330
+ export interface GetDefaultComponentsResponse {
331
+ footer?: Record<string, any> | null;
332
+ logo?: Record<string, any> | null;
333
+ follow?: Record<string, any> | null;
334
+ }
335
+ export interface ValidateLinkRequest {
336
+ /** URL to validate. */
337
+ url: string;
338
+ }
339
+ export interface ValidateLinkResponse {
340
+ /** Whether the link is valid. */
341
+ valid?: boolean;
342
+ }
343
+ export interface ValidateHtmlLinksRequest {
344
+ /** HTML string with links. */
345
+ html: string;
346
+ }
347
+ export interface ValidateHtmlLinksResponse {
348
+ /** Non-valid links. */
349
+ blacklistedLinks?: string[];
350
+ }
351
+ export interface ListStatisticsRequest {
352
+ /** IDs of the campaigns to retrieve (max 100 campaigns). */
353
+ campaignIds: string[];
354
+ }
355
+ export interface ListStatisticsResponse {
356
+ /** List of statistics. */
357
+ statistics?: CampaignStatisticsContainer[];
358
+ }
359
+ export interface CampaignStatisticsContainer {
360
+ /** Campaign ID. */
361
+ campaignId?: string;
362
+ /** Landing page statistics. */
363
+ landingPage?: LandingPageStatistics;
364
+ /** Email campaign statistics. */
365
+ email?: DistributionStatistics;
366
+ }
367
+ export interface ListRecipientsRequest {
368
+ /** Campaign ID. */
369
+ campaignId: string;
370
+ /**
371
+ * __Required.__ Email activity to filter for. One of:
372
+ * + `'DELIVERED'`
373
+ * + `'OPENED'`
374
+ * + `'CLICKED'`
375
+ * + `'BOUNCED'`
376
+ * + `'NOT_SENT'`
377
+ */
378
+ activity: RecipientsActivityEnum;
379
+ /** Pagination options. */
380
+ paging?: CursorPaging;
381
+ }
382
+ export declare enum RecipientsActivityEnum {
383
+ UNKNOWN = "UNKNOWN",
384
+ DELIVERED = "DELIVERED",
385
+ OPENED = "OPENED",
386
+ CLICKED = "CLICKED",
387
+ BOUNCED = "BOUNCED",
388
+ NOT_SENT = "NOT_SENT",
389
+ SENT = "SENT",
390
+ NOT_OPENED = "NOT_OPENED"
391
+ }
392
+ export interface CursorPaging {
393
+ /** Number of items to load. */
394
+ limit?: number | null;
395
+ /**
396
+ * Pointer to the next or previous page in the list of results.
397
+ *
398
+ * You can get the relevant cursor token
399
+ * from the `pagingMetadata` object in the previous call's response.
400
+ * Not relevant for the first request.
401
+ */
402
+ cursor?: string | null;
403
+ }
404
+ export interface ListRecipientsResponse {
405
+ /** List of recipients. */
406
+ recipients?: CampaignRecipientDetails[];
407
+ /** Details on the paged set of returned results. */
408
+ pagingMetadata?: PagingMetadataV2;
409
+ }
410
+ export interface CampaignRecipientDetails {
411
+ /** Contact ID. */
412
+ contactId?: string;
413
+ /** Date and time of the last activity. */
414
+ lastActivityDate?: Date | null;
415
+ /** Primary email address of the contact. */
416
+ emailAddress?: string;
417
+ /** Full name of the contact (optional). */
418
+ fullName?: string | null;
419
+ /** Is this contact currently deleted from the site or not. */
420
+ contactDeleted?: boolean;
421
+ }
422
+ export interface PagingMetadataV2 {
423
+ /** Number of items returned in the response. */
424
+ count?: number | null;
425
+ /** Offset that was requested. */
426
+ offset?: number | null;
427
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
428
+ total?: number | null;
429
+ /** Flag that indicates the server failed to calculate the `total` field. */
430
+ tooManyToCount?: boolean | null;
431
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
432
+ cursors?: Cursors;
433
+ }
434
+ export interface Cursors {
435
+ /** Cursor string pointing to the next page in the list of results. */
436
+ next?: string | null;
437
+ /** Cursor pointing to the previous page in the list of results. */
438
+ prev?: string | null;
439
+ }
440
+ export interface GetCampaignMappingRequest {
441
+ /** rule ID in automations */
442
+ automationRuleId?: string;
443
+ /** template ID configured for the automation */
444
+ templateId?: string;
445
+ }
446
+ export interface GetCampaignMappingResponse {
447
+ campaignId?: string;
448
+ }
449
+ export interface GetPingCampaignMappingRequest {
450
+ /** ping stream ID. */
451
+ streamId?: string;
452
+ /** template ID configured for the ping automation. */
453
+ templateId?: string;
454
+ /** ID of the initiating vertical. */
455
+ appDefId?: string;
456
+ /** Ping template ID. */
457
+ pingTemplateId?: string | null;
458
+ /** Preferred language. */
459
+ language?: string;
460
+ /** rule ID in automations */
461
+ automationRuleId?: string;
462
+ }
463
+ export interface GetPingCampaignMappingResponse {
464
+ campaignId?: string;
465
+ }
466
+ export interface QueryAutomationTemplatesRequest {
467
+ /** https://github.com/wix-private/p13n/blob/master/protos/query/src/main/proto/wix/common/query.proto */
468
+ query?: Query;
469
+ }
470
+ export interface Query {
471
+ /**
472
+ * Filter object in the following format:
473
+ * `"filter" : {
474
+ * "fieldName1": "value1",
475
+ * "fieldName2":{"$operator":"value2"}
476
+ * }`
477
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
478
+ */
479
+ filter?: any;
480
+ /**
481
+ * Sort object in the following format:
482
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
483
+ */
484
+ sort?: Sorting[];
485
+ /** Paging options to limit and skip the number of items. */
486
+ paging?: Paging;
487
+ /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
488
+ fields?: string[];
489
+ /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
490
+ fieldsets?: string[];
491
+ }
492
+ export interface Sorting {
493
+ /** Name of the field to sort by. */
494
+ fieldName?: string;
495
+ /** Sort order. */
496
+ order?: SortOrder;
497
+ }
498
+ export declare enum SortOrder {
499
+ ASC = "ASC",
500
+ DESC = "DESC"
501
+ }
502
+ export interface Paging {
503
+ /** Number of items to load. */
504
+ limit?: number | null;
505
+ /** Number of items to skip in the current sort order. */
506
+ offset?: number | null;
507
+ }
508
+ export interface QueryAutomationTemplatesResponse {
509
+ entries?: AutomationTemplateContainer[];
510
+ metaData?: QueryMetadata;
511
+ total?: number;
512
+ }
513
+ export interface AutomationTemplateContainer {
514
+ automationTemplate?: AutomationTemplate;
515
+ enrichmentData?: AutomationTemplateEnrichmentData;
516
+ }
517
+ export interface AutomationTemplate {
518
+ /**
519
+ * Automation template ID (unique)
520
+ * @readonly
521
+ */
522
+ _id?: string | null;
523
+ /**
524
+ * Automation template current revision
525
+ * @readonly
526
+ */
527
+ revision?: number | null;
528
+ /** Automation template name */
529
+ name?: string | null;
530
+ /** Automation template description */
531
+ description?: string | null;
532
+ /** Automation template rule configuration */
533
+ rule?: RuleConfiguration;
534
+ /** Automation template correlation id - TODO: rename */
535
+ correlationId?: string | null;
536
+ /** Automation template type */
537
+ templateType?: TemplateType;
538
+ /** Automation template preconditions */
539
+ preconditions?: Precondition[];
540
+ /** used to determine which users will see the Automation template while in internal state */
541
+ groupIds?: string[];
542
+ /**
543
+ * Automation template state
544
+ * @readonly
545
+ */
546
+ templateState?: TemplateState;
547
+ /**
548
+ * Automation template created date
549
+ * @readonly
550
+ */
551
+ _createdDate?: Date | null;
552
+ /**
553
+ * Automation template updated date
554
+ * @readonly
555
+ */
556
+ _updatedDate?: Date | null;
557
+ /** @readonly */
558
+ translation?: Translation;
559
+ /**
560
+ * key -> english value, we will include those keys in the translator json and send them for translations.
561
+ * in the "search rules" api they will be resolved with their translation
562
+ */
563
+ additionalTranslations?: Record<string, string>;
564
+ }
565
+ export interface RuleConfiguration {
566
+ /** Rule configuration name */
567
+ name?: string;
568
+ /** Rule configuration description */
569
+ description?: string;
570
+ /** Trigger configuration */
571
+ trigger?: TriggerConfiguration;
572
+ /** Actions configuration */
573
+ actions?: ActionConfiguration[];
574
+ /** Rule status */
575
+ ruleStatus?: RuleStatus;
576
+ /** Activation cycle */
577
+ activationCycle?: ActivationCycle;
578
+ metadata?: RuleMetadata;
579
+ }
580
+ export interface ConditionConfiguration {
581
+ /** Condition schema key */
582
+ schemaKey?: string;
583
+ /** Condition operator */
584
+ operator?: Operator;
585
+ /** Condition values */
586
+ values?: string[];
587
+ }
588
+ export declare enum Operator {
589
+ UNDEFINED = "UNDEFINED",
590
+ IN = "IN"
591
+ }
592
+ export interface TriggerConfiguration {
593
+ /** Trigger source app def id */
594
+ appDefId?: string;
595
+ /** Trigger name */
596
+ triggerName?: string;
597
+ /** Trigger schema */
598
+ triggerSchema?: string;
599
+ /** Condition configuration */
600
+ conditions?: ConditionConfiguration[];
601
+ /** TODO - might need to replace the entire object */
602
+ triggerConfigurationId?: string | null;
603
+ /** Trigger Reengagement delay internal in sec */
604
+ reengagementDelaySec?: number | null;
605
+ }
606
+ export interface ActionConfiguration {
607
+ _id?: string | null;
608
+ /** Action source app def id */
609
+ appDefId?: string;
610
+ /** Action name */
611
+ actionName?: string;
612
+ /** Action configuration */
613
+ configuration?: string;
614
+ /** Delay interval in seconds */
615
+ delayIntervalSec?: number;
616
+ }
617
+ export declare enum RuleStatus {
618
+ UnknownStatus = "UnknownStatus",
619
+ Active = "Active",
620
+ Suspended = "Suspended"
621
+ }
622
+ export interface ActivationCycle {
623
+ /** set a time frame in minutes for the once_per_user attribute, use 0 for infinite */
624
+ timeFrame?: number;
625
+ /** number of activations allowed in the given time_frame */
626
+ activations?: number;
627
+ rateLimitingJsonata?: string | null;
628
+ }
629
+ export interface RuleMetadata {
630
+ /** default value is 'true', when this is set to 'false' user wont be able to toggle off the rule */
631
+ canBeSuspended?: boolean | null;
632
+ /** additional notes to describe the rule */
633
+ notes?: string | null;
634
+ /** will be used to indicate to user how urgent is this change during "version" changes */
635
+ versionType?: VersionType;
636
+ }
637
+ export declare enum VersionType {
638
+ UNKNOWN_VERSION_TYPE = "UNKNOWN_VERSION_TYPE",
639
+ MINOR = "MINOR",
640
+ MAJOR = "MAJOR"
641
+ }
642
+ /** Type */
643
+ export declare enum TemplateType {
644
+ UNKNOWN_TEMPLATE_TYPE = "UNKNOWN_TEMPLATE_TYPE",
645
+ PREINSTALLED = "PREINSTALLED",
646
+ RECIPE = "RECIPE"
647
+ }
648
+ /**
649
+ * {
650
+ * State message examples:
651
+ * precondition_type: PreconditionType.Petri,
652
+ * key: ‘specs.crm.InvoicesSendViaAutomationsABC’,
653
+ * value: ‘C’
654
+ * },
655
+ * {
656
+ * precondition_type: PreconditionType.STATE,
657
+ * key: ‘<froms_app_def_id>:double_opt_in’,
658
+ * value: ‘true’
659
+ * },
660
+ * {
661
+ * precondition_type: PreconditionType.APP_DEPENDENCY,
662
+ * key: ‘<paid_plans_app_def_id>’,
663
+ * value: ‘true’
664
+ * }
665
+ */
666
+ export interface Precondition {
667
+ /** Precondition type */
668
+ preconditionType?: PreconditionType;
669
+ /** Precondition unique key */
670
+ key?: string;
671
+ /** Precondition value */
672
+ value?: string;
673
+ /** Precondition fallback */
674
+ fallback?: boolean | null;
675
+ }
676
+ export declare enum PreconditionType {
677
+ UNKNOWN_PRECONDITION_TYPE = "UNKNOWN_PRECONDITION_TYPE",
678
+ PETRI = "PETRI",
679
+ STATE = "STATE",
680
+ APP_DEPENDENCY = "APP_DEPENDENCY",
681
+ DEALER_OFFERING = "DEALER_OFFERING"
682
+ }
683
+ export declare enum TemplateState {
684
+ UNKNOWN_TEMPLATE_STATUS = "UNKNOWN_TEMPLATE_STATUS",
685
+ INTERNAL = "INTERNAL",
686
+ PUBLIC = "PUBLIC",
687
+ ARCHIVED = "ARCHIVED",
688
+ LIVE = "LIVE"
689
+ }
690
+ export interface Translation {
691
+ state?: TranslationState;
692
+ }
693
+ export declare enum TranslationState {
694
+ UNKNOWN_TRANSLATION_STATE = "UNKNOWN_TRANSLATION_STATE",
695
+ NOT_REQUESTED = "NOT_REQUESTED",
696
+ PENDING = "PENDING",
697
+ PARTIAL = "PARTIAL",
698
+ TRANSLATED = "TRANSLATED"
699
+ }
700
+ export interface AutomationTemplateEnrichmentData {
701
+ campaignId?: string;
702
+ metaSiteId?: string;
703
+ }
704
+ export interface QueryMetadata {
705
+ /** Number of returned items */
706
+ items?: number;
707
+ /** Offset that was applied to the request */
708
+ offset?: number;
709
+ }
710
+ export interface QueryAppTemplatesRequest {
711
+ queryType?: TemplateQueryType;
712
+ }
713
+ export declare enum TemplateQueryType {
714
+ TRIGGERED_EMAILS = "TRIGGERED_EMAILS",
715
+ PING = "PING"
716
+ }
717
+ export interface QueryAppTemplatesResponse {
718
+ template?: TemplateData[];
719
+ }
720
+ export interface TemplateData {
721
+ templateName?: string;
722
+ templateId?: string;
723
+ }
724
+ export interface CampaignLookupRequest {
725
+ campaignId?: string;
726
+ }
727
+ export interface CampaignLookupResponse {
728
+ campaignId?: string;
729
+ instanceId?: string;
730
+ metasiteId?: string;
731
+ }
732
+ export interface CampaignLookupBatchRequest {
733
+ campaignIds?: string[];
734
+ }
735
+ export interface CampaignLookupBatchResponse {
736
+ responses?: CampaignLookupResponse[];
737
+ }
738
+ export interface UpsertTranslationRequest {
739
+ /** Campaign ID. */
740
+ campaignId?: string;
741
+ /** Composer data. */
742
+ composer?: Composer;
743
+ /** Translation language (optional, default value "EN"). */
744
+ language?: string | null;
745
+ /** For BI event [36:1031] only (optional, default value "n/a"). */
746
+ automationRuleId?: string | null;
747
+ /** Should campaign also be published or not (default value "false"). */
748
+ publish?: boolean;
749
+ /** Campaign subject (optional). */
750
+ emailSubject?: string | null;
751
+ /** Campaign preheader (optional). */
752
+ emailPreheader?: string | null;
753
+ }
754
+ export interface Composer {
755
+ /** Internal data structure for editor/viewer to render the campaign. */
756
+ composerDataJson?: string;
757
+ /** Default values of existing placeholders. */
758
+ defaultValues?: DefaultValues;
759
+ }
760
+ export interface DefaultValues {
761
+ map?: Record<string, string>;
762
+ }
763
+ export interface UpsertTranslationResponse {
764
+ }
765
+ export interface GetUsedPlaceholderKeysRequest {
766
+ /** Campaign ID. */
767
+ campaignId?: string;
768
+ }
769
+ export interface GetUsedPlaceholderKeysResponse {
770
+ /** Keys of placeholders used in the automation. */
771
+ placeholderKeys?: string[];
772
+ }
773
+ export interface LookupCampaignMappingRequest {
774
+ /** rule ID in automations */
775
+ automationRuleId?: string;
776
+ /** template ID configured for the automation */
777
+ templateId?: string;
778
+ }
779
+ export interface LookupCampaignMappingResponse {
780
+ campaignId?: string | null;
781
+ }
782
+ export interface UpsertAutomationTranslatorContentRequest {
783
+ /** Campaign ID that the content belongs to */
784
+ campaignId?: string;
785
+ /** Automation translator content */
786
+ automationTranslatorContent?: AutomationTranslatorContent;
787
+ }
788
+ /** Automation Translator Content */
789
+ export interface AutomationTranslatorContent {
790
+ /** AutomationTranslatorContent ID */
791
+ _id?: string;
792
+ /** Content that can contain multiple strings. It represents a json file, that is stored on Smartling */
793
+ json?: string;
794
+ }
795
+ export interface UpsertAutomationTranslatorContentResponse {
796
+ }
797
+ export interface GetAutomationTranslatorContentRequest {
798
+ /** Campaign ID */
799
+ campaignId?: string;
800
+ }
801
+ export interface GetAutomationTranslatorContentResponse {
802
+ /** Automation translator content */
803
+ automationTranslatorContent?: AutomationTranslatorContent;
804
+ }
805
+ export interface GetCampaignRequest {
806
+ /** Campaign ID. */
807
+ campaignId: string;
808
+ /**
809
+ * Whether a returned campaign object should include `publishingData.statistics`.
810
+ *
811
+ * Default: `false`.
812
+ */
813
+ optionIncludeStatistics?: boolean;
814
+ }
815
+ export interface GetCampaignResponse {
816
+ /** Campaign information. */
817
+ campaign?: Campaign;
818
+ }
819
+ export interface ListCampaignsRequest {
820
+ /** Paging parameters. */
821
+ paging?: Paging;
822
+ /**
823
+ * Whether to include `publishingData.statistics` in the returned campaign object.
824
+ *
825
+ * Default: `false`.
826
+ */
827
+ optionIncludeStatistics?: boolean;
828
+ /**
829
+ * Include campaigns with the following statuses (no filtering by default). One of:
830
+ * + `'ACTIVE'`
831
+ * + `'ARCHIVED'`
832
+ * + `'DELETED'`
833
+ */
834
+ statuses?: CampaignStatusEnum[];
835
+ /**
836
+ * Include campaigns with the following visibility statuses (no filtering by default). One of:
837
+ * + `'DRAFT'`
838
+ * + `'PUBLISHED'`
839
+ * + `'TEMPLATE'`
840
+ */
841
+ visibilityStatuses?: CampaignVisibilityStatusEnum[];
842
+ }
843
+ export interface ListCampaignsResponse {
844
+ /** Paging parameters. */
845
+ paging?: Paging;
846
+ /** List of campaigns. */
847
+ campaigns?: Campaign[];
848
+ }
849
+ export interface CountCampaignsRequest {
850
+ /** Since when should we start counting (optional, default value "1970-01-01T00:00:00.000Z") */
851
+ dateFrom?: Date | null;
852
+ }
853
+ export interface CountCampaignsResponse {
854
+ /** "drafts" + "scheduled" + "published" (excluding "archived"). */
855
+ total?: number;
856
+ /** Non published (draft) campaigns. */
857
+ drafts?: number;
858
+ /** Campaigns scheduled for publishing in the future. */
859
+ scheduled?: number;
860
+ /** Campaigns published or sent. */
861
+ published?: number;
862
+ /** Campaigns moved to archive (regardless of the status). */
863
+ archived?: number;
864
+ }
865
+ export interface CreateFromTemplateRequest {
866
+ /** ID of the template to fork. */
867
+ templateId?: string;
868
+ /** Values to replace template placeholders with (unique for each template). */
869
+ variables?: Record<string, string>;
870
+ /** Campaign editor type. */
871
+ campaignEditorType?: CampaignEditorTypeEnum;
872
+ }
873
+ export interface CreateFromTemplateResponse {
874
+ /** Campaign information. */
875
+ campaign?: Campaign;
876
+ }
877
+ export interface CreateUserTemplateRequest {
878
+ /** ID of campaign to create template from. */
879
+ campaignId?: string;
880
+ /** Title of template. */
881
+ title?: string | null;
882
+ }
883
+ export interface CreateUserTemplateResponse {
884
+ /** Created user template information. */
885
+ campaign?: Campaign;
886
+ }
887
+ export interface CreateFromUserTemplateRequest {
888
+ /** ID of the user template campaign to use. */
889
+ campaignId?: string;
890
+ }
891
+ export interface CreateFromUserTemplateResponse {
892
+ /** Campaign created from user template. */
893
+ campaign?: Campaign;
894
+ }
895
+ export interface PublishCampaignRequest {
896
+ /** Campaign ID */
897
+ campaignId: string;
898
+ /** Email distribution options. Pass this object in the request if you need to distribute your marketing campaign with emails. */
899
+ emailDistributionOptions?: EmailDistributionOptions;
900
+ }
901
+ export interface EmailDistributionOptions {
902
+ /** The subject line for the email campaign, which appears in recipients’ inboxes. */
903
+ emailSubject?: string | null;
904
+ /** Contact label IDs. */
905
+ labelIds?: string[];
906
+ /** IDs of contacts to whom to send out the campaign. */
907
+ contactIds?: string[];
908
+ /**
909
+ * Filter ids to send campaign to (unsupported).
910
+ * @deprecated Filter ids to send campaign to (unsupported).
911
+ * @replacedBy contacts_filter
912
+ * @targetRemovalDate 2023-10-10
913
+ */
914
+ filterIds?: string[];
915
+ /** Campaign scheduling. You can schedule the campaign no less than 30 minutes until the sending time. [Upgrade your plan](https://support.wix.com/en/article/email-marketing-upgrading-your-email-marketing-plan) to schedule the campaign. */
916
+ sendAt?: Date | null;
917
+ }
918
+ export interface PublishCampaignResponse {
919
+ /** Publishing info. */
920
+ publishingData?: PublishingData;
921
+ }
922
+ export interface Rejected {
923
+ /** ID of the campaign that was rejected. */
924
+ campaignId?: string;
925
+ }
926
+ export interface Published {
927
+ /** ID of the campaign that was published. */
928
+ campaignId?: string;
929
+ /** Campaign landing page URL. */
930
+ landingPageUrl?: string;
931
+ /** Estimation of recipient list size (optional). */
932
+ mailingListSizeEstimate?: number | null;
933
+ }
934
+ export interface Terminated {
935
+ /** ID of the campaign that was terminated. */
936
+ campaignId?: string;
937
+ }
938
+ export interface Distributed {
939
+ /** ID of the campaign that was distributed. */
940
+ campaignId?: string;
941
+ }
942
+ export interface EmailActivityUpdated extends EmailActivityUpdatedEventTypeOneOf {
943
+ /** Recipient clicked on an email. */
944
+ click?: Click;
945
+ /** Recipient opened an email. */
946
+ open?: Open;
947
+ /**
948
+ * Email soft bounced when sent to a recipient.
949
+ *
950
+ * Indicates a temporary issue sending your email. For example, the email server receiving the email is under a heavy load.
951
+ * For soft bounces, you should wait and try again at a later time.
952
+ */
953
+ softBounce?: SoftBounce;
954
+ /**
955
+ * Email hard bounced when sent to a recipient.
956
+ *
957
+ * Indicates a permanent error sending your email. For example, the email address does not exist.
958
+ */
959
+ hardBounce?: HardBounce;
960
+ /** Campaign ID. */
961
+ campaignId?: string;
962
+ /** [Contact ID](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/contact-object) of a recipient. */
963
+ contactId?: string;
964
+ /** Email address of a recipient. */
965
+ recipientEmailAddress?: string;
966
+ /** Date and time of the event. */
967
+ timestamp?: Date | null;
968
+ activityType?: ActivityType;
969
+ /** email metadata */
970
+ metadata?: Record<string, string>;
971
+ }
972
+ /** @oneof */
973
+ export interface EmailActivityUpdatedEventTypeOneOf {
974
+ /** Recipient clicked on an email. */
975
+ click?: Click;
976
+ /** Recipient opened an email. */
977
+ open?: Open;
978
+ /**
979
+ * Email soft bounced when sent to a recipient.
980
+ *
981
+ * Indicates a temporary issue sending your email. For example, the email server receiving the email is under a heavy load.
982
+ * For soft bounces, you should wait and try again at a later time.
983
+ */
984
+ softBounce?: SoftBounce;
985
+ /**
986
+ * Email hard bounced when sent to a recipient.
987
+ *
988
+ * Indicates a permanent error sending your email. For example, the email address does not exist.
989
+ */
990
+ hardBounce?: HardBounce;
991
+ }
992
+ /** The type of email activity that triggered the webhook. */
993
+ export declare enum ActivityType {
994
+ /** Triggered when an email is delivered to the recipient. */
995
+ DELIVERY = "DELIVERY",
996
+ /** Triggered when the recipient clicks on a URL inside of the email. */
997
+ CLICK = "CLICK",
998
+ /** Triggered when the email is opened by the recipient. */
999
+ OPEN = "OPEN",
1000
+ /** Triggered when the email is bounced softly. */
1001
+ SOFT_BOUNCE = "SOFT_BOUNCE",
1002
+ /** Triggered when the email bounces. */
1003
+ HARD_BOUNCED = "HARD_BOUNCED"
1004
+ }
1005
+ export interface Click {
1006
+ /** URL that was clicked. */
1007
+ url?: string;
1008
+ /** Browser user agent of the recipient. */
1009
+ userAgent?: string;
1010
+ }
1011
+ export interface Open {
1012
+ /** Browser user agent of the recipient. */
1013
+ userAgent?: string;
1014
+ }
1015
+ export interface SoftBounce {
1016
+ /** Reason the email soft bounced. */
1017
+ reason?: string;
1018
+ }
1019
+ export interface HardBounce {
1020
+ /** Reason the email hard bounced. */
1021
+ reason?: string;
1022
+ }
1023
+ export interface Scheduled {
1024
+ /** ID of the campaign that was scheduled. */
1025
+ campaignId?: string;
1026
+ /** The timestamp campaign is scheduled for. */
1027
+ sendAt?: Date | null;
1028
+ /** Shows if this is a rescheduling of previously scheduled campaign. */
1029
+ rescheduled?: boolean;
1030
+ }
1031
+ export interface SendTestRequest {
1032
+ /** Campaign ID. */
1033
+ campaignId: string;
1034
+ /** Email subject. */
1035
+ emailSubject?: string | null;
1036
+ /** Recipient email address. */
1037
+ toEmailAddress: string;
1038
+ }
1039
+ export interface PlaceholderContent extends PlaceholderContentValueOneOf {
1040
+ text?: PlainText;
1041
+ html?: Html;
1042
+ money?: Money;
1043
+ dateTime?: DateTime;
1044
+ map?: Map;
1045
+ array?: _Array;
1046
+ enum?: PlaceholderContentEnum;
1047
+ attachment?: Attachment;
1048
+ integer?: Integer;
1049
+ decimal?: Decimal;
1050
+ }
1051
+ /** @oneof */
1052
+ export interface PlaceholderContentValueOneOf {
1053
+ text?: PlainText;
1054
+ html?: Html;
1055
+ money?: Money;
1056
+ dateTime?: DateTime;
1057
+ map?: Map;
1058
+ array?: _Array;
1059
+ enum?: PlaceholderContentEnum;
1060
+ attachment?: Attachment;
1061
+ integer?: Integer;
1062
+ decimal?: Decimal;
1063
+ }
1064
+ export interface PlainText {
1065
+ text?: string;
1066
+ }
1067
+ export interface Html {
1068
+ html?: string;
1069
+ }
1070
+ /**
1071
+ * Money.
1072
+ * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
1073
+ */
1074
+ export interface Money {
1075
+ /** Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative. */
1076
+ value?: string;
1077
+ /** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */
1078
+ currency?: string;
1079
+ /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */
1080
+ formattedValue?: string | null;
1081
+ }
1082
+ export interface DateTime {
1083
+ timestamp?: Date | null;
1084
+ /** optional time zone is the full name. example: "Asia/Jerusalem" */
1085
+ timeZone?: string | null;
1086
+ }
1087
+ export interface Map {
1088
+ variables?: Record<string, PlaceholderContent>;
1089
+ }
1090
+ export interface _Array {
1091
+ items?: PlaceholderContent[];
1092
+ }
1093
+ export interface PlaceholderContentEnum {
1094
+ value?: string;
1095
+ translation?: string;
1096
+ }
1097
+ export interface Attachment {
1098
+ fileName?: string;
1099
+ downloadUrl?: string;
1100
+ }
1101
+ export interface Integer {
1102
+ /** min value: -2147483648, max value: 2147483647 */
1103
+ value?: number;
1104
+ }
1105
+ export interface Decimal {
1106
+ /**
1107
+ * when converted from Double, has a limitation of max 16 digits (including fractional part)
1108
+ * highest possible value for precise representation is 9999999999999998 (9999999999999999 is represented as 10000000000000000)
1109
+ */
1110
+ value?: string;
1111
+ }
1112
+ export interface SendTestResponse {
1113
+ }
1114
+ export interface PauseSchedulingRequest {
1115
+ /** Campaign ID. */
1116
+ campaignId: string;
1117
+ }
1118
+ export interface PauseSchedulingResponse {
1119
+ }
1120
+ export interface Paused {
1121
+ /** ID of the campaign that was paused. */
1122
+ campaignId?: string;
1123
+ }
1124
+ export interface RescheduleRequest {
1125
+ /** ID of the campaign to reschedule. */
1126
+ campaignId: string;
1127
+ /** New time for sending out the campaign. */
1128
+ sendAt: Date | null;
1129
+ }
1130
+ export interface RescheduleResponse {
1131
+ }
1132
+ export interface ArchiveCampaignRequest {
1133
+ /** ID of the campaign to archive. */
1134
+ campaignId?: string;
1135
+ }
1136
+ export interface ArchiveCampaignResponse {
1137
+ }
1138
+ /** Sent when status of the campaign is changed from "Active" to "Archived" */
1139
+ export interface Archived {
1140
+ /** ID of the campaign that was archived. */
1141
+ campaignId?: string;
1142
+ }
1143
+ export interface UnarchiveCampaignRequest {
1144
+ /** ID of the campaign to unarchive. */
1145
+ campaignId?: string;
1146
+ }
1147
+ export interface UnarchiveCampaignResponse {
1148
+ }
1149
+ /** Sent when status of the campaign is changed from "Archived" to "Active" */
1150
+ export interface Unarchived {
1151
+ /** ID of the campaign whose status was changed to active. */
1152
+ campaignId?: string;
1153
+ }
1154
+ export interface UpdateTitleRequest {
1155
+ /** ID of the campaign to change title of. */
1156
+ campaignId?: string;
1157
+ /** New title to set. */
1158
+ title?: string;
1159
+ }
1160
+ export interface UpdateTitleResponse {
1161
+ }
1162
+ export interface DeleteCampaignRequest {
1163
+ /** Campaign ID. */
1164
+ campaignId: string;
1165
+ }
1166
+ export interface DeleteCampaignResponse {
1167
+ }
1168
+ export interface ReuseCampaignRequest {
1169
+ /** ID of the message to be duplicated. */
1170
+ campaignId: string;
1171
+ }
1172
+ export interface ReuseCampaignResponse {
1173
+ /** Campaign information. */
1174
+ campaign?: Campaign;
1175
+ }
1176
+ export interface PreviewCampaignRequest {
1177
+ /** ID of the campaign to preview. */
1178
+ campaignId?: string;
1179
+ /** Preferred language for campaign content (optional). */
1180
+ language?: string | null;
1181
+ /** Values to replace campaign placeholders with (unique for each campaign). */
1182
+ placeholders?: Record<string, PlaceholderContent>;
1183
+ /** Whether to hide the ad (default value "false"). */
1184
+ forceHideAd?: boolean;
1185
+ }
1186
+ export interface PreviewCampaignResponse {
1187
+ /** Preview HTML. */
1188
+ html?: string;
1189
+ }
1190
+ export interface GetComposerRequest {
1191
+ /** Campaign ID. */
1192
+ campaignId?: string;
1193
+ /** Preferred language for campaign content (optional). */
1194
+ language?: string | null;
1195
+ }
1196
+ export interface GetComposerResponse {
1197
+ /** Composer. */
1198
+ composer?: Composer;
1199
+ /** Campaign subject. */
1200
+ emailSubject?: string;
1201
+ /** Campaign preheader (optional). */
1202
+ emailPreheader?: string | null;
1203
+ }
1204
+ export interface UpdateComposerRequest {
1205
+ /** Campaign ID. */
1206
+ campaignId?: string;
1207
+ /** Campaign composer. */
1208
+ composer?: Composer;
1209
+ /** Campaign editor type (optional, default "WEB"). */
1210
+ campaignEditorType?: CampaignEditorType;
1211
+ /** Campaign subject (optional). */
1212
+ emailSubject?: string | null;
1213
+ /** Campaign preheader (optional). */
1214
+ emailPreheader?: string | null;
1215
+ }
1216
+ /** specifies if campaign is being created and edited in web or mobile app */
1217
+ export interface CampaignEditorType {
1218
+ value?: CampaignEditorTypeEnum;
1219
+ }
1220
+ export interface UpdateComposerResponse {
1221
+ }
1222
+ export interface CreateCampaignRequest {
1223
+ /** Campaign composer. */
1224
+ composer?: Composer;
1225
+ /** Campaign editor type (optional, default "WEB"). */
1226
+ campaignEditorType?: CampaignEditorType;
1227
+ /** Campaign subject (optional). */
1228
+ emailSubject?: string | null;
1229
+ /** Campaign preheader (optional). */
1230
+ emailPreheader?: string | null;
1231
+ }
1232
+ export interface CreateCampaignResponse {
1233
+ /** Campaign information. */
1234
+ campaign?: Campaign;
1235
+ }
1236
+ export interface ResendToNonOpenersRequest {
1237
+ /** ID of the campaign to resend. */
1238
+ campaignId?: string;
1239
+ /** Subject line to use with the resent copy of campaign. */
1240
+ emailSubject?: string | null;
1241
+ }
1242
+ export interface ResendToNonOpenersResponse {
1243
+ /** ID of the newly created and resent campaign. */
1244
+ campaignId?: string;
1245
+ }
1246
+ export interface GetAudienceRequest {
1247
+ /** Campaign ID. */
1248
+ campaignId: string;
1249
+ }
1250
+ export interface GetAudienceResponse {
1251
+ /** Campaign audience. */
1252
+ audience?: CampaignAudience;
1253
+ }
1254
+ export interface CampaignAudience {
1255
+ /** IDs of contacts to whom to send the campaign. */
1256
+ contactIds?: string[];
1257
+ /** Labels IDs. */
1258
+ labelIds?: string[];
1259
+ /** Segment IDs. */
1260
+ segmentIds?: string[];
1261
+ /** Filter for contacts in JSON format. */
1262
+ contactsFilter?: Record<string, any> | null;
1263
+ /** Contacts plain text search expression (searches in name, phone and email fields). */
1264
+ contactsSearchTerm?: string | null;
1265
+ /** Should "inactive" contacts be excluded or not. */
1266
+ activeContactsOnly?: boolean;
1267
+ }
1268
+ export interface IdentifySenderAddressRequest {
1269
+ /** Email address to verify. */
1270
+ emailAddress: string;
1271
+ }
1272
+ export interface IdentifySenderAddressResponse {
1273
+ /** Actual "from" address that will be used for sending emails. */
1274
+ senderAddress?: string;
1275
+ }
1276
+ export interface DomainEvent extends DomainEventBodyOneOf {
1277
+ createdEvent?: EntityCreatedEvent;
1278
+ updatedEvent?: EntityUpdatedEvent;
1279
+ deletedEvent?: EntityDeletedEvent;
1280
+ actionEvent?: ActionEvent;
1281
+ /**
1282
+ * Unique event ID.
1283
+ * Allows clients to ignore duplicate webhooks.
1284
+ */
1285
+ _id?: string;
1286
+ /**
1287
+ * Assumes actions are also always typed to an entity_type
1288
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1289
+ */
1290
+ entityFqdn?: string;
1291
+ /**
1292
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1293
+ * This is although the created/updated/deleted notion is duplication of the oneof types
1294
+ * Example: created/updated/deleted/started/completed/email_opened
1295
+ */
1296
+ slug?: string;
1297
+ /** ID of the entity associated with the event. */
1298
+ entityId?: string;
1299
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
1300
+ eventTime?: Date | null;
1301
+ /**
1302
+ * Whether the event was triggered as a result of a privacy regulation application
1303
+ * (for example, GDPR).
1304
+ */
1305
+ triggeredByAnonymizeRequest?: boolean | null;
1306
+ /** If present, indicates the action that triggered the event. */
1307
+ originatedFrom?: string | null;
1308
+ /**
1309
+ * A sequence number defining the order of updates to the underlying entity.
1310
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
1311
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1312
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1313
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
1314
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1315
+ */
1316
+ entityEventSequence?: string | null;
1317
+ }
1318
+ /** @oneof */
1319
+ export interface DomainEventBodyOneOf {
1320
+ createdEvent?: EntityCreatedEvent;
1321
+ updatedEvent?: EntityUpdatedEvent;
1322
+ deletedEvent?: EntityDeletedEvent;
1323
+ actionEvent?: ActionEvent;
1324
+ }
1325
+ export interface EntityCreatedEvent {
1326
+ entity?: string;
1327
+ }
1328
+ export interface RestoreInfo {
1329
+ deletedDate?: Date | null;
1330
+ }
1331
+ export interface EntityUpdatedEvent {
1332
+ /**
1333
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1334
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1335
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1336
+ */
1337
+ currentEntity?: string;
1338
+ }
1339
+ export interface EntityDeletedEvent {
1340
+ /** Entity that was deleted */
1341
+ deletedEntity?: string | null;
1342
+ }
1343
+ export interface ActionEvent {
1344
+ body?: string;
1345
+ }
1346
+ export interface MessageEnvelope {
1347
+ /** App instance ID. */
1348
+ instanceId?: string | null;
1349
+ /** Event type. */
1350
+ eventType?: string;
1351
+ /** The identification type and identity data. */
1352
+ identity?: IdentificationData;
1353
+ /** Stringify payload. */
1354
+ data?: string;
1355
+ }
1356
+ export interface IdentificationData extends IdentificationDataIdOneOf {
1357
+ /** ID of a site visitor that has not logged in to the site. */
1358
+ anonymousVisitorId?: string;
1359
+ /** ID of a site visitor that has logged in to the site. */
1360
+ memberId?: string;
1361
+ /** ID of a Wix user (site owner, contributor, etc.). */
1362
+ wixUserId?: string;
1363
+ /** ID of an app. */
1364
+ appId?: string;
1365
+ /** @readonly */
1366
+ identityType?: WebhookIdentityType;
1367
+ }
1368
+ /** @oneof */
1369
+ export interface IdentificationDataIdOneOf {
1370
+ /** ID of a site visitor that has not logged in to the site. */
1371
+ anonymousVisitorId?: string;
1372
+ /** ID of a site visitor that has logged in to the site. */
1373
+ memberId?: string;
1374
+ /** ID of a Wix user (site owner, contributor, etc.). */
1375
+ wixUserId?: string;
1376
+ /** ID of an app. */
1377
+ appId?: string;
1378
+ }
1379
+ export declare enum WebhookIdentityType {
1380
+ UNKNOWN = "UNKNOWN",
1381
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1382
+ MEMBER = "MEMBER",
1383
+ WIX_USER = "WIX_USER",
1384
+ APP = "APP"
1385
+ }
1386
+ export interface ValidateLinkResponseNonNullableFields {
1387
+ valid: boolean;
1388
+ }
1389
+ export interface ValidateHtmlLinksResponseNonNullableFields {
1390
+ blacklistedLinks: string[];
1391
+ }
1392
+ interface LandingPageStatisticsNonNullableFields {
1393
+ opened: number;
1394
+ clicked: number;
1395
+ }
1396
+ interface DistributionStatisticsNonNullableFields {
1397
+ delivered: number;
1398
+ opened: number;
1399
+ clicked: number;
1400
+ bounced: number;
1401
+ complained: number;
1402
+ notSent: number;
1403
+ }
1404
+ interface CampaignStatisticsContainerNonNullableFields {
1405
+ campaignId: string;
1406
+ landingPage?: LandingPageStatisticsNonNullableFields;
1407
+ email?: DistributionStatisticsNonNullableFields;
1408
+ }
1409
+ export interface ListStatisticsResponseNonNullableFields {
1410
+ statistics: CampaignStatisticsContainerNonNullableFields[];
1411
+ }
1412
+ interface CampaignRecipientDetailsNonNullableFields {
1413
+ contactId: string;
1414
+ emailAddress: string;
1415
+ contactDeleted: boolean;
1416
+ }
1417
+ export interface ListRecipientsResponseNonNullableFields {
1418
+ recipients: CampaignRecipientDetailsNonNullableFields[];
1419
+ }
1420
+ interface TotalStatisticsNonNullableFields {
1421
+ mailsSent: number;
1422
+ opened: number;
1423
+ clicked: number;
1424
+ }
1425
+ interface CampaignStatisticsNonNullableFields {
1426
+ landingPage?: LandingPageStatisticsNonNullableFields;
1427
+ emailCampaign?: DistributionStatisticsNonNullableFields;
1428
+ total?: TotalStatisticsNonNullableFields;
1429
+ }
1430
+ interface PublishingDataNonNullableFields {
1431
+ landingPageUrl: string;
1432
+ statistics?: CampaignStatisticsNonNullableFields;
1433
+ wasResentToNonOpeners: boolean;
1434
+ }
1435
+ interface RejectionDataNonNullableFields {
1436
+ rejectionReasons: RejectionReasonEnum[];
1437
+ }
1438
+ export interface CampaignNonNullableFields {
1439
+ campaignId: string;
1440
+ editorType: CampaignEditorTypeEnum;
1441
+ status: CampaignStatusEnum;
1442
+ visibilityStatus: CampaignVisibilityStatusEnum;
1443
+ distributionStatus: Enum;
1444
+ publishingData?: PublishingDataNonNullableFields;
1445
+ rejectionData?: RejectionDataNonNullableFields;
1446
+ sendingState: CampaignSendingStateEnum;
1447
+ campaignType: CampaignTypeEnum;
1448
+ emailSubject: string;
1449
+ }
1450
+ export interface GetCampaignResponseNonNullableFields {
1451
+ campaign?: CampaignNonNullableFields;
1452
+ }
1453
+ export interface ListCampaignsResponseNonNullableFields {
1454
+ campaigns: CampaignNonNullableFields[];
1455
+ }
1456
+ export interface PublishCampaignResponseNonNullableFields {
1457
+ publishingData?: PublishingDataNonNullableFields;
1458
+ }
1459
+ export interface ReuseCampaignResponseNonNullableFields {
1460
+ campaign?: CampaignNonNullableFields;
1461
+ }
1462
+ interface CampaignAudienceNonNullableFields {
1463
+ contactIds: string[];
1464
+ labelIds: string[];
1465
+ segmentIds: string[];
1466
+ activeContactsOnly: boolean;
1467
+ }
1468
+ export interface GetAudienceResponseNonNullableFields {
1469
+ audience?: CampaignAudienceNonNullableFields;
1470
+ }
1471
+ export interface IdentifySenderAddressResponseNonNullableFields {
1472
+ senderAddress: string;
1473
+ }
1474
+ export interface BaseEventMetadata {
1475
+ /** App instance ID. */
1476
+ instanceId?: string | null;
1477
+ /** Event type. */
1478
+ eventType?: string;
1479
+ /** The identification type and identity data. */
1480
+ identity?: IdentificationData;
1481
+ }
1482
+ export interface EventMetadata extends BaseEventMetadata {
1483
+ /**
1484
+ * Unique event ID.
1485
+ * Allows clients to ignore duplicate webhooks.
1486
+ */
1487
+ _id?: string;
1488
+ /**
1489
+ * Assumes actions are also always typed to an entity_type
1490
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1491
+ */
1492
+ entityFqdn?: string;
1493
+ /**
1494
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1495
+ * This is although the created/updated/deleted notion is duplication of the oneof types
1496
+ * Example: created/updated/deleted/started/completed/email_opened
1497
+ */
1498
+ slug?: string;
1499
+ /** ID of the entity associated with the event. */
1500
+ entityId?: string;
1501
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
1502
+ eventTime?: Date | null;
1503
+ /**
1504
+ * Whether the event was triggered as a result of a privacy regulation application
1505
+ * (for example, GDPR).
1506
+ */
1507
+ triggeredByAnonymizeRequest?: boolean | null;
1508
+ /** If present, indicates the action that triggered the event. */
1509
+ originatedFrom?: string | null;
1510
+ /**
1511
+ * A sequence number defining the order of updates to the underlying entity.
1512
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
1513
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1514
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1515
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
1516
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1517
+ */
1518
+ entityEventSequence?: string | null;
1519
+ }
1520
+ export interface CampaignDistributedEnvelope {
1521
+ data: Distributed;
1522
+ metadata: EventMetadata;
1523
+ }
1524
+ /**
1525
+ * Triggered when a campaign is successfully distributed to all recipients.
1526
+ * @permissionScope Read Email Marketing
1527
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1528
+ * @permissionScope Manage Email Marketing
1529
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1530
+ * @permissionId Shoutout.Read
1531
+ * @webhook
1532
+ * @eventType wix.email_marketing.v1.campaign_campaign_distributed_event
1533
+ */
1534
+ export declare function onCampaignDistributedEvent(handler: (event: CampaignDistributedEnvelope) => void | Promise<void>): void;
1535
+ export interface CampaignPausedEnvelope {
1536
+ data: Paused;
1537
+ metadata: EventMetadata;
1538
+ }
1539
+ /**
1540
+ * Triggered when a scheduled campaign is paused.
1541
+ * @permissionScope Read Email Marketing
1542
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1543
+ * @permissionScope Manage Email Marketing
1544
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1545
+ * @permissionId Shoutout.Read
1546
+ * @webhook
1547
+ * @eventType wix.email_marketing.v1.campaign_campaign_paused_event
1548
+ */
1549
+ export declare function onCampaignPausedEvent(handler: (event: CampaignPausedEnvelope) => void | Promise<void>): void;
1550
+ export interface CampaignPublishedEnvelope {
1551
+ data: Published;
1552
+ metadata: EventMetadata;
1553
+ }
1554
+ /**
1555
+ * Triggered when a draft campaign is published.
1556
+ * @permissionScope Read Email Marketing
1557
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1558
+ * @permissionScope Manage Email Marketing
1559
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1560
+ * @permissionId Shoutout.Read
1561
+ * @webhook
1562
+ * @eventType wix.email_marketing.v1.campaign_campaign_published_event
1563
+ */
1564
+ export declare function onCampaignPublishedEvent(handler: (event: CampaignPublishedEnvelope) => void | Promise<void>): void;
1565
+ export interface CampaignRejectedEnvelope {
1566
+ data: Rejected;
1567
+ metadata: EventMetadata;
1568
+ }
1569
+ /**
1570
+ * Triggered when a campaign is identified as abusive and rejected without sending emails to recipients.
1571
+ * @permissionScope Read Email Marketing
1572
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1573
+ * @permissionScope Manage Email Marketing
1574
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1575
+ * @permissionId Shoutout.Read
1576
+ * @webhook
1577
+ * @eventType wix.email_marketing.v1.campaign_campaign_rejected_event
1578
+ */
1579
+ export declare function onCampaignRejectedEvent(handler: (event: CampaignRejectedEnvelope) => void | Promise<void>): void;
1580
+ export interface CampaignScheduledEnvelope {
1581
+ data: Scheduled;
1582
+ metadata: EventMetadata;
1583
+ }
1584
+ /**
1585
+ * Triggered when a campaign is scheduled to be sent out at the specific time.
1586
+ * @permissionScope Read Email Marketing
1587
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1588
+ * @permissionScope Manage Email Marketing
1589
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1590
+ * @permissionId Shoutout.Read
1591
+ * @webhook
1592
+ * @eventType wix.email_marketing.v1.campaign_campaign_scheduled_event
1593
+ */
1594
+ export declare function onCampaignScheduledEvent(handler: (event: CampaignScheduledEnvelope) => void | Promise<void>): void;
1595
+ export interface CampaignTerminatedEnvelope {
1596
+ data: Terminated;
1597
+ metadata: EventMetadata;
1598
+ }
1599
+ /**
1600
+ * Triggered when the mailing list isn't clean and campaign was terminated.
1601
+ * @permissionScope Read Email Marketing
1602
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1603
+ * @permissionScope Manage Email Marketing
1604
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1605
+ * @permissionId Shoutout.Read
1606
+ * @webhook
1607
+ * @eventType wix.email_marketing.v1.campaign_campaign_terminated_event
1608
+ */
1609
+ export declare function onCampaignTerminatedEvent(handler: (event: CampaignTerminatedEnvelope) => void | Promise<void>): void;
1610
+ export interface CampaignCreatedEnvelope {
1611
+ entity: Campaign;
1612
+ metadata: EventMetadata;
1613
+ }
1614
+ /**
1615
+ * Triggered when a campaign is created.
1616
+ * @permissionScope Read Email Marketing
1617
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1618
+ * @permissionScope Manage Email Marketing
1619
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1620
+ * @permissionId Shoutout.Read
1621
+ * @webhook
1622
+ * @eventType wix.email_marketing.v1.campaign_created
1623
+ */
1624
+ export declare function onCampaignCreated(handler: (event: CampaignCreatedEnvelope) => void | Promise<void>): void;
1625
+ export interface CampaignDeletedEnvelope {
1626
+ metadata: EventMetadata;
1627
+ }
1628
+ /**
1629
+ * Triggered when a campaign is deleted.
1630
+ * @permissionScope Read Email Marketing
1631
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1632
+ * @permissionScope Manage Email Marketing
1633
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1634
+ * @permissionId Shoutout.Read
1635
+ * @webhook
1636
+ * @eventType wix.email_marketing.v1.campaign_deleted
1637
+ */
1638
+ export declare function onCampaignDeleted(handler: (event: CampaignDeletedEnvelope) => void | Promise<void>): void;
1639
+ export interface CampaignEmailActivityUpdatedEnvelope {
1640
+ data: EmailActivityUpdated;
1641
+ metadata: EventMetadata;
1642
+ }
1643
+ /**
1644
+ * Triggered when an email campaign has a new recipient activity.
1645
+ * @permissionScope Read Email Marketing
1646
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1647
+ * @permissionScope Manage Email Marketing
1648
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1649
+ * @permissionId Shoutout.Read
1650
+ * @webhook
1651
+ * @eventType wix.email_marketing.v1.campaign_email_activity_updated
1652
+ */
1653
+ export declare function onCampaignEmailActivityUpdated(handler: (event: CampaignEmailActivityUpdatedEnvelope) => void | Promise<void>): void;
1654
+ /**
1655
+ * Validates any provided link. Use this method when you want to check whether the link complies with the abuse rules and can be used in a campaign.
1656
+ *
1657
+ * If you provide a link as a placeholder, it's returned in a response as valid.
1658
+ * @param url - URL to validate.
1659
+ * @public
1660
+ * @documentationMaturity preview
1661
+ * @requiredField url
1662
+ * @permissionId Shoutout.Manage
1663
+ * @permissionScope Manage Email Marketing
1664
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1665
+ * @applicableIdentity APP
1666
+ * @fqn wix.emailmarketing.api.v1.CampaignValidationService.ValidateLink
1667
+ */
1668
+ export declare function validateLink(url: string): Promise<ValidateLinkResponse & ValidateLinkResponseNonNullableFields>;
1669
+ /**
1670
+ * Validates links that are inside the provided HTML. This method automatically takes out links from the HTML block and validates them. Use this method when you want to check whether the link complies with the abuse rules and can be used in a campaign.
1671
+ * @param html - HTML string with links.
1672
+ * @public
1673
+ * @documentationMaturity preview
1674
+ * @requiredField html
1675
+ * @permissionId Shoutout.Manage
1676
+ * @permissionScope Manage Email Marketing
1677
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1678
+ * @applicableIdentity APP
1679
+ * @fqn wix.emailmarketing.api.v1.CampaignValidationService.ValidateHtmlLinks
1680
+ */
1681
+ export declare function validateHtmlLinks(html: string): Promise<ValidateHtmlLinksResponse & ValidateHtmlLinksResponseNonNullableFields>;
1682
+ /**
1683
+ * Retrieves a list of statistics for up to 100 selected campaigns.
1684
+ *
1685
+ * For each campaign, you receive the total activity count for the campaign's landing page and email. For example, the total
1686
+ * amount of times the landing page was opened, or the total amount of email recipients that clicked a link in an email.
1687
+ *
1688
+ * Use [List Campaigns](#listcampaigns) to retrieve additional information for your campaigns.
1689
+ * Use [List Recipients](#listrecipients) to retrieve a list of recipients and their activities related to a selected campaign.
1690
+ * @param campaignIds - IDs of the campaigns to retrieve (max 100 campaigns).
1691
+ * @public
1692
+ * @requiredField campaignIds
1693
+ * @permissionId Shoutout.Read
1694
+ * @permissionScope Read Email Marketing
1695
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1696
+ * @permissionScope Manage Email Marketing
1697
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1698
+ * @applicableIdentity APP
1699
+ * @fqn wix.emailmarketing.api.v1.CampaignStatisticsService.ListStatistics
1700
+ */
1701
+ export declare function listStatistics(campaignIds: string[]): Promise<ListStatisticsResponse & ListStatisticsResponseNonNullableFields>;
1702
+ /**
1703
+ * Retrieves a list of recipients for a selected campaign based on a specific recipient activity.
1704
+ *
1705
+ * Pages are returned with a maximum of 1,000 recipients per page and defaults to 40 recipients per page.
1706
+ *
1707
+ * Use [List Statistics](#liststatistics) to retrieve a list of activity for selected campaigns.
1708
+ * Use [List Campaigns](#listcampaigns) to retrieve additional information for your campaigns.
1709
+ *
1710
+ * If no `activity` is included, this endpoint returns an error.
1711
+ *
1712
+ * @param campaignId - Campaign ID.
1713
+ * @param activity - __Required.__ Email activity to filter for. One of:
1714
+ * + `'DELIVERED'`
1715
+ * + `'OPENED'`
1716
+ * + `'CLICKED'`
1717
+ * + `'BOUNCED'`
1718
+ * + `'NOT_SENT'`
1719
+ * @public
1720
+ * @requiredField activity
1721
+ * @requiredField campaignId
1722
+ * @param options - Options to use when getting the list of recipients.
1723
+ * @permissionId Shoutout.Read
1724
+ * @permissionScope Read Email Marketing
1725
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1726
+ * @permissionScope Manage Email Marketing
1727
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1728
+ * @applicableIdentity APP
1729
+ * @fqn wix.emailmarketing.api.v1.CampaignStatisticsService.ListRecipients
1730
+ */
1731
+ export declare function listRecipients(campaignId: string, activity: RecipientsActivityEnum, options?: ListRecipientsOptions): Promise<ListRecipientsResponse & ListRecipientsResponseNonNullableFields>;
1732
+ export interface ListRecipientsOptions {
1733
+ /** Pagination options. */
1734
+ paging?: CursorPaging;
1735
+ }
1736
+ /**
1737
+ * Retrieves information about an email campaign.
1738
+ * @param campaignId - Campaign ID.
1739
+ * @public
1740
+ * @requiredField campaignId
1741
+ * @param options - Options to use when getting a campaign.
1742
+ * @permissionId Shoutout.Manage
1743
+ * @permissionScope Manage Email Marketing
1744
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1745
+ * @applicableIdentity APP
1746
+ * @returns Campaign information.
1747
+ * @fqn wix.emailmarketing.api.v1.CampaignService.Get
1748
+ */
1749
+ export declare function getCampaign(campaignId: string, options?: GetCampaignOptions): Promise<Campaign & CampaignNonNullableFields>;
1750
+ export interface GetCampaignOptions {
1751
+ /**
1752
+ * Whether a returned campaign object should include `publishingData.statistics`.
1753
+ *
1754
+ * Default: `false`.
1755
+ */
1756
+ optionIncludeStatistics?: boolean;
1757
+ }
1758
+ /**
1759
+ * Returns a list of email campaigns.
1760
+ *
1761
+ * By default sorts by the `dateUpdated` field in the `DESC` order.
1762
+ * @public
1763
+ * @param options - Options to use when getting the list of campaigns.
1764
+ * @permissionId Shoutout.Read
1765
+ * @permissionScope Read Email Marketing
1766
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1767
+ * @permissionScope Manage Email Marketing
1768
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1769
+ * @applicableIdentity APP
1770
+ * @fqn wix.emailmarketing.api.v1.CampaignService.List
1771
+ */
1772
+ export declare function listCampaigns(options?: ListCampaignsOptions): Promise<ListCampaignsResponse & ListCampaignsResponseNonNullableFields>;
1773
+ export interface ListCampaignsOptions {
1774
+ /** Paging parameters. */
1775
+ paging?: Paging;
1776
+ /**
1777
+ * Whether to include `publishingData.statistics` in the returned campaign object.
1778
+ *
1779
+ * Default: `false`.
1780
+ */
1781
+ optionIncludeStatistics?: boolean;
1782
+ /**
1783
+ * Include campaigns with the following statuses (no filtering by default). One of:
1784
+ * + `'ACTIVE'`
1785
+ * + `'ARCHIVED'`
1786
+ * + `'DELETED'`
1787
+ */
1788
+ statuses?: CampaignStatusEnum[];
1789
+ /**
1790
+ * Include campaigns with the following visibility statuses (no filtering by default). One of:
1791
+ * + `'ACTIVE'`
1792
+ * + `'ARCHIVED'`
1793
+ * + `'DELETED'`
1794
+ */
1795
+ visibilityStatuses?: CampaignVisibilityStatusEnum[];
1796
+ }
1797
+ /**
1798
+ * Publishes and sends a specified campaign.
1799
+ *
1800
+ * If the `email_distribution_options` object isn't passed in the request, the campaign is only published as a landing page.
1801
+ * @param campaignId - Campaign ID
1802
+ * @public
1803
+ * @requiredField campaignId
1804
+ * @param options - Options to use when publishing a campaign.
1805
+ * @permissionId Shoutout.Manage
1806
+ * @permissionScope Manage Email Marketing
1807
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1808
+ * @applicableIdentity APP
1809
+ * @fqn wix.emailmarketing.api.v1.CampaignService.Publish
1810
+ */
1811
+ export declare function publishCampaign(campaignId: string, options?: PublishCampaignOptions): Promise<PublishCampaignResponse & PublishCampaignResponseNonNullableFields>;
1812
+ export interface PublishCampaignOptions {
1813
+ /** Email distribution options. Pass this object in the request if you need to distribute your marketing campaign with emails. */
1814
+ emailDistributionOptions?: EmailDistributionOptions;
1815
+ }
1816
+ /**
1817
+ * Sends a test email. Use this method to preview your email campaign.
1818
+ *
1819
+ * We strongly recommend you calling this method only a few times in a row, as it has a rate limit.
1820
+ * @param campaignId - Campaign ID.
1821
+ * @public
1822
+ * @requiredField campaignId
1823
+ * @requiredField options.toEmailAddress
1824
+ * @param options - Options for sending a test email.
1825
+ * @permissionId Shoutout.Manage
1826
+ * @permissionScope Manage Email Marketing
1827
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1828
+ * @applicableIdentity APP
1829
+ * @fqn wix.emailmarketing.api.v1.CampaignService.SendTest
1830
+ */
1831
+ export declare function sendTest(campaignId: string, options?: SendTestOptions): Promise<void>;
1832
+ export interface SendTestOptions {
1833
+ /** Email subject. */
1834
+ emailSubject?: string | null;
1835
+ /** Recipient email address. */
1836
+ toEmailAddress: string;
1837
+ }
1838
+ /**
1839
+ * Pauses a scheduled campaign.
1840
+ * @param campaignId - Campaign ID.
1841
+ * @public
1842
+ * @requiredField campaignId
1843
+ * @permissionId Shoutout.Manage
1844
+ * @permissionScope Manage Email Marketing
1845
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1846
+ * @applicableIdentity APP
1847
+ * @fqn wix.emailmarketing.api.v1.CampaignService.PauseScheduling
1848
+ */
1849
+ export declare function pauseScheduling(campaignId: string): Promise<void>;
1850
+ /**
1851
+ * Changes the sending time for an already scheduled campaign.
1852
+ * @param campaignId - ID of the campaign to reschedule.
1853
+ * @param sendAt - New time for sending out the campaign.
1854
+ * @public
1855
+ * @requiredField campaignId
1856
+ * @requiredField sendAt
1857
+ * @permissionId Shoutout.Manage
1858
+ * @permissionScope Manage Email Marketing
1859
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1860
+ * @applicableIdentity APP
1861
+ * @fqn wix.emailmarketing.api.v1.CampaignService.Reschedule
1862
+ */
1863
+ export declare function reschedule(campaignId: string, sendAt: Date | null): Promise<void>;
1864
+ /**
1865
+ * Permanently deletes a campaign.
1866
+ * @param campaignId - Campaign ID.
1867
+ * @public
1868
+ * @requiredField campaignId
1869
+ * @permissionId Shoutout.Manage
1870
+ * @permissionScope Manage Email Marketing
1871
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1872
+ * @applicableIdentity APP
1873
+ * @fqn wix.emailmarketing.api.v1.CampaignService._delete
1874
+ */
1875
+ export declare function deleteCampaign(campaignId: string): Promise<void>;
1876
+ /**
1877
+ * Creates a copy of an existing campaign.
1878
+ * @param campaignId - ID of the message to be duplicated.
1879
+ * @public
1880
+ * @requiredField campaignId
1881
+ * @permissionId Shoutout.Manage
1882
+ * @permissionScope Manage Email Marketing
1883
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1884
+ * @applicableIdentity APP
1885
+ * @fqn wix.emailmarketing.api.v1.CampaignService.Reuse
1886
+ */
1887
+ export declare function reuseCampaign(campaignId: string): Promise<ReuseCampaignResponse & ReuseCampaignResponseNonNullableFields>;
1888
+ /**
1889
+ * Retrieves the audience of a paused campaign. Use this method to retrieve all selected audience of the paused campaign at once, so they can be passed in bulk when the campaign is published again after being paused.
1890
+ * @param campaignId - Campaign ID.
1891
+ * @public
1892
+ * @requiredField campaignId
1893
+ * @permissionId Shoutout.Manage
1894
+ * @permissionScope Manage Email Marketing
1895
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1896
+ * @applicableIdentity APP
1897
+ * @fqn wix.emailmarketing.api.v1.CampaignService.GetAudience
1898
+ */
1899
+ export declare function getAudience(campaignId: string): Promise<GetAudienceResponse & GetAudienceResponseNonNullableFields>;
1900
+ /**
1901
+ * Checks if the sender's email address will be used as the "from" address or will it be replaced and to what exactly.
1902
+ * @param emailAddress - Email address to verify.
1903
+ * @public
1904
+ * @requiredField emailAddress
1905
+ * @permissionId Shoutout.Manage
1906
+ * @permissionScope Manage Email Marketing
1907
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1908
+ * @applicableIdentity APP
1909
+ * @fqn wix.emailmarketing.api.v1.CampaignService.IdentifySenderAddress
1910
+ */
1911
+ export declare function identifySenderAddress(emailAddress: string): Promise<IdentifySenderAddressResponse & IdentifySenderAddressResponseNonNullableFields>;
1912
+ export {};