@wix/auto_sdk_email-marketing_campaigns 1.0.26 → 1.0.28

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 (46) hide show
  1. package/build/{internal → cjs}/index.d.ts +64 -37
  2. package/build/{internal → cjs}/index.js +187 -68
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/{email-marketing-v1-campaign-campaigns.universal-DhdBwhrW.d.mts → cjs/index.typings.d.ts} +801 -253
  5. package/build/cjs/index.typings.js +1048 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/{internal → cjs}/meta.d.ts +137 -112
  8. package/build/{meta.js → cjs/meta.js} +129 -36
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/{internal → es}/index.d.mts +64 -37
  11. package/build/{internal → es}/index.mjs +184 -67
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/{email-marketing-v1-campaign-campaigns.universal-DhdBwhrW.d.ts → es/index.typings.d.mts} +801 -253
  14. package/build/es/index.typings.mjs +1001 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/{internal → es}/meta.d.mts +137 -112
  17. package/build/{internal → es}/meta.mjs +126 -35
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/es/package.json +3 -0
  20. package/build/{index.d.ts → internal/cjs/index.d.ts} +64 -37
  21. package/build/{index.js → internal/cjs/index.js} +187 -68
  22. package/build/internal/cjs/index.js.map +1 -0
  23. package/build/internal/{email-marketing-v1-campaign-campaigns.universal-DhdBwhrW.d.ts → cjs/index.typings.d.ts} +801 -253
  24. package/build/internal/cjs/index.typings.js +1048 -0
  25. package/build/internal/cjs/index.typings.js.map +1 -0
  26. package/build/{meta.d.ts → internal/cjs/meta.d.ts} +137 -112
  27. package/build/internal/{meta.js → cjs/meta.js} +129 -36
  28. package/build/internal/cjs/meta.js.map +1 -0
  29. package/build/{index.d.mts → internal/es/index.d.mts} +64 -37
  30. package/build/{index.mjs → internal/es/index.mjs} +184 -67
  31. package/build/internal/es/index.mjs.map +1 -0
  32. package/build/internal/{email-marketing-v1-campaign-campaigns.universal-DhdBwhrW.d.mts → es/index.typings.d.mts} +801 -253
  33. package/build/internal/es/index.typings.mjs +1001 -0
  34. package/build/internal/es/index.typings.mjs.map +1 -0
  35. package/build/{meta.d.mts → internal/es/meta.d.mts} +137 -112
  36. package/build/{meta.mjs → internal/es/meta.mjs} +126 -35
  37. package/build/internal/es/meta.mjs.map +1 -0
  38. package/package.json +12 -11
  39. package/build/index.js.map +0 -1
  40. package/build/index.mjs.map +0 -1
  41. package/build/internal/index.js.map +0 -1
  42. package/build/internal/index.mjs.map +0 -1
  43. package/build/internal/meta.js.map +0 -1
  44. package/build/internal/meta.mjs.map +0 -1
  45. package/build/meta.js.map +0 -1
  46. package/build/meta.mjs.map +0 -1
@@ -1,3 +1,5 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
1
3
  interface Campaign {
2
4
  /**
3
5
  * Campaign ID.
@@ -195,6 +197,8 @@ declare enum CampaignSendingStateEnum {
195
197
  /** Campaign was sent. */
196
198
  SENT = "SENT"
197
199
  }
200
+ /** @enumType */
201
+ type CampaignSendingStateEnumWithLiterals = CampaignSendingStateEnum | 'DRAFT' | 'REVIEW' | 'REJECTED' | 'SCHEDULED' | 'PAUSED' | 'PUBLISHED' | 'SENDING' | 'PARTIALLY_SENT' | 'SENT';
198
202
  declare enum CampaignTypeEnum {
199
203
  UNKNOWN = "UNKNOWN",
200
204
  /** Email marketing campaign. */
@@ -206,6 +210,364 @@ declare enum CampaignTypeEnum {
206
210
  /** Triggered email. */
207
211
  TRIGGERED = "TRIGGERED"
208
212
  }
213
+ /** @enumType */
214
+ type CampaignTypeEnumWithLiterals = CampaignTypeEnum | 'UNKNOWN' | 'EMAIL_MARKETING' | 'INVITATION' | 'AUTOMATION' | 'TRIGGERED';
215
+ interface GetCampaignMappingRequest {
216
+ /**
217
+ * rule ID in automations
218
+ * @format GUID
219
+ */
220
+ automationRuleId?: string;
221
+ /**
222
+ * template ID configured for the automation
223
+ * @format GUID
224
+ */
225
+ templateId?: string;
226
+ }
227
+ interface GetCampaignMappingResponse {
228
+ /** @format GUID */
229
+ campaignId?: string;
230
+ }
231
+ interface UpsertTranslationRequest {
232
+ /**
233
+ * Campaign ID.
234
+ * @format GUID
235
+ */
236
+ campaignId?: string;
237
+ /** Composer data. */
238
+ composer?: Composer;
239
+ /**
240
+ * Translation language (optional, default value "EN").
241
+ * @format LANGUAGE
242
+ */
243
+ language?: string | null;
244
+ /**
245
+ * For BI event [36:1031] only (optional, default value "n/a").
246
+ * @format GUID
247
+ */
248
+ automationRuleId?: string | null;
249
+ /** Should campaign also be published or not (default value "false"). */
250
+ publish?: boolean;
251
+ /**
252
+ * Campaign subject (optional).
253
+ * @maxLength 1000
254
+ */
255
+ emailSubject?: string | null;
256
+ /**
257
+ * Campaign preheader (optional).
258
+ * @maxLength 1000
259
+ */
260
+ emailPreheader?: string | null;
261
+ }
262
+ interface Composer {
263
+ /**
264
+ * Internal data structure for editor/viewer to render the campaign.
265
+ * @maxLength 10000000
266
+ */
267
+ composerDataJson?: string;
268
+ /** Default values of existing placeholders. */
269
+ defaultValues?: DefaultValues;
270
+ }
271
+ interface DefaultValues {
272
+ /** @maxSize 500 */
273
+ map?: Record<string, string>;
274
+ }
275
+ interface UpsertTranslationResponse {
276
+ }
277
+ interface GetUsedPlaceholderKeysRequest {
278
+ /**
279
+ * Campaign ID.
280
+ * @format GUID
281
+ */
282
+ campaignId?: string;
283
+ }
284
+ interface GetUsedPlaceholderKeysResponse {
285
+ /**
286
+ * Keys of placeholders used in the automation.
287
+ * @maxLength 200
288
+ * @maxSize 300
289
+ */
290
+ placeholderKeys?: string[];
291
+ }
292
+ interface LookupCampaignMappingRequest {
293
+ /**
294
+ * rule ID in automations
295
+ * @format GUID
296
+ */
297
+ automationRuleId?: string;
298
+ /**
299
+ * template ID configured for the automation
300
+ * @format GUID
301
+ */
302
+ templateId?: string;
303
+ }
304
+ interface LookupCampaignMappingResponse {
305
+ /** @format GUID */
306
+ campaignId?: string | null;
307
+ }
308
+ interface UpsertAutomationTranslatorContentRequest {
309
+ /**
310
+ * Campaign ID that the content belongs to
311
+ * @format GUID
312
+ */
313
+ campaignId?: string;
314
+ /** Automation translator content */
315
+ automationTranslatorContent?: AutomationTranslatorContent;
316
+ }
317
+ /** Automation Translator Content */
318
+ interface AutomationTranslatorContent {
319
+ /**
320
+ * AutomationTranslatorContent ID
321
+ * @minLength 1
322
+ * @maxLength 256
323
+ * @immutable
324
+ */
325
+ _id?: string;
326
+ /**
327
+ * Content that can contain multiple strings. It represents a json file, that is stored on Smartling
328
+ * @minLength 1
329
+ * @maxLength 800000
330
+ */
331
+ json?: string;
332
+ }
333
+ interface UpsertAutomationTranslatorContentResponse {
334
+ }
335
+ interface GetAutomationTranslatorContentRequest {
336
+ /**
337
+ * Campaign ID
338
+ * @format GUID
339
+ */
340
+ campaignId?: string;
341
+ }
342
+ interface GetAutomationTranslatorContentResponse {
343
+ /** Automation translator content */
344
+ automationTranslatorContent?: AutomationTranslatorContent;
345
+ }
346
+ interface SendTestBulkRequest {
347
+ /**
348
+ * Campaign ID
349
+ * @format GUID
350
+ */
351
+ campaignId?: string;
352
+ /**
353
+ * Recipient email address
354
+ * @format EMAIL
355
+ */
356
+ toEmailAddress?: string;
357
+ /** Values to replace campaign placeholders with (unique for each campaign) */
358
+ placeholders?: Record<string, PlaceholderContent>;
359
+ /**
360
+ * Sender from name
361
+ * @maxLength 100
362
+ */
363
+ fromName?: string | null;
364
+ /**
365
+ * Reply-to email address
366
+ * @format EMAIL
367
+ */
368
+ replyToEmailAddress?: string | null;
369
+ /**
370
+ * Preferred language for campaign content (optional). If not provided, a test email for each campaign language is sent
371
+ * @format LANGUAGE
372
+ */
373
+ language?: string | null;
374
+ }
375
+ interface PlaceholderContent extends PlaceholderContentValueOneOf {
376
+ text?: PlainText;
377
+ html?: Html;
378
+ money?: Money;
379
+ dateTime?: DateTime;
380
+ map?: Map;
381
+ array?: _Array;
382
+ enum?: PlaceholderContentEnum;
383
+ attachment?: Attachment;
384
+ integer?: Integer;
385
+ decimal?: Decimal;
386
+ }
387
+ /** @oneof */
388
+ interface PlaceholderContentValueOneOf {
389
+ text?: PlainText;
390
+ html?: Html;
391
+ money?: Money;
392
+ dateTime?: DateTime;
393
+ map?: Map;
394
+ array?: _Array;
395
+ enum?: PlaceholderContentEnum;
396
+ attachment?: Attachment;
397
+ integer?: Integer;
398
+ decimal?: Decimal;
399
+ }
400
+ interface PlainText {
401
+ text?: string;
402
+ }
403
+ interface Html {
404
+ html?: string;
405
+ }
406
+ /**
407
+ * Money.
408
+ * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
409
+ */
410
+ interface Money {
411
+ /**
412
+ * 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.
413
+ * @format DECIMAL_VALUE
414
+ */
415
+ value?: string;
416
+ /**
417
+ * Currency code. Must be valid ISO 4217 currency code (e.g., USD).
418
+ * @format CURRENCY
419
+ */
420
+ currency?: string;
421
+ /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */
422
+ formattedValue?: string | null;
423
+ }
424
+ interface DateTime {
425
+ timestamp?: Date | null;
426
+ /** optional time zone is the full name. example: "Asia/Jerusalem" */
427
+ timeZone?: string | null;
428
+ }
429
+ interface Map {
430
+ variables?: Record<string, PlaceholderContent>;
431
+ }
432
+ interface _Array {
433
+ items?: PlaceholderContent[];
434
+ }
435
+ interface PlaceholderContentEnum {
436
+ value?: string;
437
+ translation?: string;
438
+ }
439
+ interface Attachment {
440
+ fileName?: string;
441
+ downloadUrl?: string;
442
+ }
443
+ interface Integer {
444
+ /** min value: -2147483648, max value: 2147483647 */
445
+ value?: number;
446
+ }
447
+ interface Decimal {
448
+ /**
449
+ * when converted from Double, has a limitation of max 16 digits (including fractional part)
450
+ * highest possible value for precise representation is 9999999999999998 (9999999999999999 is represented as 10000000000000000)
451
+ * @format DECIMAL_VALUE
452
+ */
453
+ value?: string;
454
+ }
455
+ interface SendTestBulkResponse {
456
+ }
457
+ interface ListStatisticsRequest {
458
+ /**
459
+ * IDs of the campaigns to retrieve (max 100 campaigns).
460
+ * @format GUID
461
+ * @minSize 1
462
+ * @maxSize 100
463
+ */
464
+ campaignIds: string[];
465
+ }
466
+ interface ListStatisticsResponse {
467
+ /** List of statistics. */
468
+ statistics?: CampaignStatisticsContainer[];
469
+ }
470
+ interface CampaignStatisticsContainer {
471
+ /**
472
+ * Campaign ID.
473
+ * @format GUID
474
+ */
475
+ campaignId?: string;
476
+ /** Landing page statistics. */
477
+ landingPage?: LandingPageStatistics;
478
+ /** Email campaign statistics. */
479
+ email?: DistributionStatistics;
480
+ }
481
+ interface ListRecipientsRequest {
482
+ /**
483
+ * Campaign ID.
484
+ * @format GUID
485
+ */
486
+ campaignId: string;
487
+ /** Email activity to filter. */
488
+ activity: RecipientsActivityEnumWithLiterals;
489
+ /** Pagination options. */
490
+ paging?: CursorPaging;
491
+ }
492
+ declare enum RecipientsActivityEnum {
493
+ UNKNOWN = "UNKNOWN",
494
+ DELIVERED = "DELIVERED",
495
+ OPENED = "OPENED",
496
+ CLICKED = "CLICKED",
497
+ BOUNCED = "BOUNCED",
498
+ NOT_SENT = "NOT_SENT",
499
+ SENT = "SENT",
500
+ NOT_OPENED = "NOT_OPENED"
501
+ }
502
+ /** @enumType */
503
+ type RecipientsActivityEnumWithLiterals = RecipientsActivityEnum | 'UNKNOWN' | 'DELIVERED' | 'OPENED' | 'CLICKED' | 'BOUNCED' | 'NOT_SENT' | 'SENT' | 'NOT_OPENED';
504
+ interface CursorPaging {
505
+ /**
506
+ * Number of items to load.
507
+ * @max 1000
508
+ */
509
+ limit?: number | null;
510
+ /**
511
+ * Pointer to the next or previous page in the list of results.
512
+ *
513
+ * You can get the relevant cursor token
514
+ * from the `pagingMetadata` object in the previous call's response.
515
+ * Not relevant for the first request.
516
+ * @maxLength 1000
517
+ */
518
+ cursor?: string | null;
519
+ }
520
+ interface ListRecipientsResponse {
521
+ /** List of recipients. */
522
+ recipients?: CampaignRecipientDetails[];
523
+ /** Details on the paged set of returned results. */
524
+ pagingMetadata?: PagingMetadataV2;
525
+ }
526
+ interface CampaignRecipientDetails {
527
+ /**
528
+ * Contact ID.
529
+ * @format GUID
530
+ */
531
+ contactId?: string;
532
+ /** Date and time of the last activity. */
533
+ lastActivityDate?: Date | null;
534
+ /**
535
+ * Primary email address of the contact.
536
+ * @format EMAIL
537
+ */
538
+ emailAddress?: string;
539
+ /**
540
+ * Full name of the contact (optional).
541
+ * @maxLength 100
542
+ */
543
+ fullName?: string | null;
544
+ /** Is this contact currently deleted from the site or not. */
545
+ contactDeleted?: boolean;
546
+ }
547
+ interface PagingMetadataV2 {
548
+ /** Number of items returned in the response. */
549
+ count?: number | null;
550
+ /** Offset that was requested. */
551
+ offset?: number | null;
552
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
553
+ total?: number | null;
554
+ /** Flag that indicates the server failed to calculate the `total` field. */
555
+ tooManyToCount?: boolean | null;
556
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
557
+ cursors?: Cursors;
558
+ }
559
+ interface Cursors {
560
+ /**
561
+ * Cursor string pointing to the next page in the list of results.
562
+ * @maxLength 16000
563
+ */
564
+ next?: string | null;
565
+ /**
566
+ * Cursor pointing to the previous page in the list of results.
567
+ * @maxLength 16000
568
+ */
569
+ prev?: string | null;
570
+ }
209
571
  interface GetCampaignRequest {
210
572
  /**
211
573
  * Campaign ID.
@@ -455,133 +817,53 @@ declare enum ActivityType {
455
817
  /** Triggered when the email bounces. */
456
818
  HARD_BOUNCED = "HARD_BOUNCED"
457
819
  }
458
- /** @enumType */
459
- type ActivityTypeWithLiterals = ActivityType | 'DELIVERY' | 'CLICK' | 'OPEN' | 'SOFT_BOUNCE' | 'HARD_BOUNCED';
460
- interface Click {
461
- /** URL that was clicked. */
462
- url?: string;
463
- /** Browser user agent of the recipient. */
464
- userAgent?: string;
465
- }
466
- interface Open {
467
- /** Browser user agent of the recipient. */
468
- userAgent?: string;
469
- }
470
- interface SoftBounce {
471
- /** Reason the email soft bounced. */
472
- reason?: string;
473
- }
474
- interface HardBounce {
475
- /** Reason the email hard bounced. */
476
- reason?: string;
477
- }
478
- interface Scheduled {
479
- /**
480
- * ID of the campaign that was scheduled.
481
- * @format GUID
482
- */
483
- campaignId?: string;
484
- /** The timestamp campaign is scheduled for. */
485
- sendAt?: Date | null;
486
- /** Shows if this is a rescheduling of previously scheduled campaign. */
487
- rescheduled?: boolean;
488
- }
489
- interface SendTestRequest {
490
- /**
491
- * Campaign ID.
492
- * @format GUID
493
- */
494
- campaignId: string;
495
- /**
496
- * Email subject.
497
- * @maxLength 1000
498
- */
499
- emailSubject?: string | null;
500
- /**
501
- * Recipient email address.
502
- * @format EMAIL
503
- */
504
- toEmailAddress: string;
505
- }
506
- interface PlaceholderContent extends PlaceholderContentValueOneOf {
507
- text?: PlainText;
508
- html?: Html;
509
- money?: Money;
510
- dateTime?: DateTime;
511
- map?: Map;
512
- array?: _Array;
513
- enum?: PlaceholderContentEnum;
514
- attachment?: Attachment;
515
- integer?: Integer;
516
- decimal?: Decimal;
517
- }
518
- /** @oneof */
519
- interface PlaceholderContentValueOneOf {
520
- text?: PlainText;
521
- html?: Html;
522
- money?: Money;
523
- dateTime?: DateTime;
524
- map?: Map;
525
- array?: _Array;
526
- enum?: PlaceholderContentEnum;
527
- attachment?: Attachment;
528
- integer?: Integer;
529
- decimal?: Decimal;
530
- }
531
- interface PlainText {
532
- text?: string;
533
- }
534
- interface Html {
535
- html?: string;
536
- }
537
- /**
538
- * Money.
539
- * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
540
- */
541
- interface Money {
542
- /**
543
- * 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.
544
- * @format DECIMAL_VALUE
545
- */
546
- value?: string;
547
- /**
548
- * Currency code. Must be valid ISO 4217 currency code (e.g., USD).
549
- * @format CURRENCY
550
- */
551
- currency?: string;
552
- /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */
553
- formattedValue?: string | null;
554
- }
555
- interface DateTime {
556
- timestamp?: Date | null;
557
- /** optional time zone is the full name. example: "Asia/Jerusalem" */
558
- timeZone?: string | null;
559
- }
560
- interface Map {
561
- variables?: Record<string, PlaceholderContent>;
562
- }
563
- interface _Array {
564
- items?: PlaceholderContent[];
820
+ /** @enumType */
821
+ type ActivityTypeWithLiterals = ActivityType | 'DELIVERY' | 'CLICK' | 'OPEN' | 'SOFT_BOUNCE' | 'HARD_BOUNCED';
822
+ interface Click {
823
+ /** URL that was clicked. */
824
+ url?: string;
825
+ /** Browser user agent of the recipient. */
826
+ userAgent?: string;
565
827
  }
566
- interface PlaceholderContentEnum {
567
- value?: string;
568
- translation?: string;
828
+ interface Open {
829
+ /** Browser user agent of the recipient. */
830
+ userAgent?: string;
569
831
  }
570
- interface Attachment {
571
- fileName?: string;
572
- downloadUrl?: string;
832
+ interface SoftBounce {
833
+ /** Reason the email soft bounced. */
834
+ reason?: string;
573
835
  }
574
- interface Integer {
575
- /** min value: -2147483648, max value: 2147483647 */
576
- value?: number;
836
+ interface HardBounce {
837
+ /** Reason the email hard bounced. */
838
+ reason?: string;
577
839
  }
578
- interface Decimal {
840
+ interface Scheduled {
579
841
  /**
580
- * when converted from Double, has a limitation of max 16 digits (including fractional part)
581
- * highest possible value for precise representation is 9999999999999998 (9999999999999999 is represented as 10000000000000000)
582
- * @format DECIMAL_VALUE
842
+ * ID of the campaign that was scheduled.
843
+ * @format GUID
583
844
  */
584
- value?: string;
845
+ campaignId?: string;
846
+ /** The timestamp campaign is scheduled for. */
847
+ sendAt?: Date | null;
848
+ /** Shows if this is a rescheduling of previously scheduled campaign. */
849
+ rescheduled?: boolean;
850
+ }
851
+ interface SendTestRequest {
852
+ /**
853
+ * Campaign ID.
854
+ * @format GUID
855
+ */
856
+ campaignId: string;
857
+ /**
858
+ * Email subject.
859
+ * @maxLength 1000
860
+ */
861
+ emailSubject?: string | null;
862
+ /**
863
+ * Recipient email address.
864
+ * @format EMAIL
865
+ */
866
+ toEmailAddress: string;
585
867
  }
586
868
  interface SendTestResponse {
587
869
  }
@@ -726,19 +1008,6 @@ interface GetComposerResponse {
726
1008
  */
727
1009
  emailPreheader?: string | null;
728
1010
  }
729
- interface Composer {
730
- /**
731
- * Internal data structure for editor/viewer to render the campaign.
732
- * @maxLength 10000000
733
- */
734
- composerDataJson?: string;
735
- /** Default values of existing placeholders. */
736
- defaultValues?: DefaultValues;
737
- }
738
- interface DefaultValues {
739
- /** @maxSize 500 */
740
- map?: Record<string, string>;
741
- }
742
1011
  interface UpdateComposerRequest {
743
1012
  /**
744
1013
  * Campaign ID.
@@ -998,6 +1267,46 @@ declare enum WebhookIdentityType {
998
1267
  }
999
1268
  /** @enumType */
1000
1269
  type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
1270
+ interface GetPlaceholderKeysRequest {
1271
+ /**
1272
+ * Campaign ID.
1273
+ * @format GUID
1274
+ */
1275
+ campaignId?: string;
1276
+ }
1277
+ interface GetPlaceholderKeysResponse {
1278
+ /** Keys of placeholders used in the campaign. */
1279
+ placeholderKeys?: string[];
1280
+ }
1281
+ interface GetDefaultComponentsRequest {
1282
+ }
1283
+ interface GetDefaultComponentsResponse {
1284
+ footer?: Record<string, any> | null;
1285
+ logo?: Record<string, any> | null;
1286
+ follow?: Record<string, any> | null;
1287
+ }
1288
+ interface ValidateLinkRequest {
1289
+ /**
1290
+ * URL to validate.
1291
+ * @minLength 1
1292
+ */
1293
+ url: string;
1294
+ }
1295
+ interface ValidateLinkResponse {
1296
+ /** Whether the link is valid. */
1297
+ valid?: boolean;
1298
+ }
1299
+ interface ValidateHtmlLinksRequest {
1300
+ /**
1301
+ * HTML string with links.
1302
+ * @maxLength 1000000
1303
+ */
1304
+ html: string;
1305
+ }
1306
+ interface ValidateHtmlLinksResponse {
1307
+ /** Non-valid links. */
1308
+ blacklistedLinks?: string[];
1309
+ }
1001
1310
  interface EstimateFilterSizeRequest {
1002
1311
  /** Contacts filter expression. */
1003
1312
  filter?: Record<string, any> | null;
@@ -1143,120 +1452,11 @@ interface SubscribeFromLandingPageResponse {
1143
1452
  /** @format GUID */
1144
1453
  contactId?: string;
1145
1454
  }
1146
- interface ListStatisticsRequest {
1147
- /**
1148
- * IDs of the campaigns to retrieve (max 100 campaigns).
1149
- * @format GUID
1150
- * @minSize 1
1151
- * @maxSize 100
1152
- */
1153
- campaignIds: string[];
1154
- }
1155
- interface ListStatisticsResponse {
1156
- /** List of statistics. */
1157
- statistics?: CampaignStatisticsContainer[];
1158
- }
1159
- interface CampaignStatisticsContainer {
1160
- /**
1161
- * Campaign ID.
1162
- * @format GUID
1163
- */
1164
- campaignId?: string;
1165
- /** Landing page statistics. */
1166
- landingPage?: LandingPageStatistics;
1167
- /** Email campaign statistics. */
1168
- email?: DistributionStatistics;
1169
- }
1170
- interface ListRecipientsRequest {
1171
- /**
1172
- * Campaign ID.
1173
- * @format GUID
1174
- */
1175
- campaignId: string;
1176
- /** Email activity to filter. */
1177
- activity: RecipientsActivityEnumWithLiterals;
1178
- /** Pagination options. */
1179
- paging?: CursorPaging;
1180
- }
1181
- declare enum RecipientsActivityEnum {
1182
- UNKNOWN = "UNKNOWN",
1183
- DELIVERED = "DELIVERED",
1184
- OPENED = "OPENED",
1185
- CLICKED = "CLICKED",
1186
- BOUNCED = "BOUNCED",
1187
- NOT_SENT = "NOT_SENT",
1188
- SENT = "SENT",
1189
- NOT_OPENED = "NOT_OPENED"
1190
- }
1191
- /** @enumType */
1192
- type RecipientsActivityEnumWithLiterals = RecipientsActivityEnum | 'UNKNOWN' | 'DELIVERED' | 'OPENED' | 'CLICKED' | 'BOUNCED' | 'NOT_SENT' | 'SENT' | 'NOT_OPENED';
1193
- interface CursorPaging {
1194
- /**
1195
- * Number of items to load.
1196
- * @max 1000
1197
- */
1198
- limit?: number | null;
1199
- /**
1200
- * Pointer to the next or previous page in the list of results.
1201
- *
1202
- * You can get the relevant cursor token
1203
- * from the `pagingMetadata` object in the previous call's response.
1204
- * Not relevant for the first request.
1205
- * @maxLength 1000
1206
- */
1207
- cursor?: string | null;
1208
- }
1209
- interface ListRecipientsResponse {
1210
- /** List of recipients. */
1211
- recipients?: CampaignRecipientDetails[];
1212
- /** Details on the paged set of returned results. */
1213
- pagingMetadata?: PagingMetadataV2;
1214
- }
1215
- interface CampaignRecipientDetails {
1216
- /**
1217
- * Contact ID.
1218
- * @format GUID
1219
- */
1220
- contactId?: string;
1221
- /** Date and time of the last activity. */
1222
- lastActivityDate?: Date | null;
1223
- /**
1224
- * Primary email address of the contact.
1225
- * @format EMAIL
1226
- */
1227
- emailAddress?: string;
1228
- /**
1229
- * Full name of the contact (optional).
1230
- * @maxLength 100
1231
- */
1232
- fullName?: string | null;
1233
- /** Is this contact currently deleted from the site or not. */
1234
- contactDeleted?: boolean;
1235
- }
1236
- interface PagingMetadataV2 {
1237
- /** Number of items returned in the response. */
1238
- count?: number | null;
1239
- /** Offset that was requested. */
1240
- offset?: number | null;
1241
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
1242
- total?: number | null;
1243
- /** Flag that indicates the server failed to calculate the `total` field. */
1244
- tooManyToCount?: boolean | null;
1245
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
1246
- cursors?: Cursors;
1247
- }
1248
- interface Cursors {
1249
- /**
1250
- * Cursor string pointing to the next page in the list of results.
1251
- * @maxLength 16000
1252
- */
1253
- next?: string | null;
1254
- /**
1255
- * Cursor pointing to the previous page in the list of results.
1256
- * @maxLength 16000
1257
- */
1258
- prev?: string | null;
1259
- }
1455
+ type PublishCampaignApplicationErrors = {
1456
+ code?: 'ALREADY_SENT';
1457
+ description?: string;
1458
+ data?: Record<string, any>;
1459
+ };
1260
1460
  interface BaseEventMetadata {
1261
1461
  /**
1262
1462
  * App instance ID.
@@ -1305,37 +1505,261 @@ interface CampaignDistributedEnvelope {
1305
1505
  data: Distributed;
1306
1506
  metadata: EventMetadata;
1307
1507
  }
1508
+ /**
1509
+ * Triggered when a campaign is successfully distributed to all recipients.
1510
+ * @permissionScope Manage Stores
1511
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1512
+ * @permissionScope Access Verticals by Automations
1513
+ * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1514
+ * @permissionScope Set Up Automations
1515
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1516
+ * @permissionScope Read Email Marketing
1517
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1518
+ * @permissionScope Manage Email Marketing
1519
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1520
+ * @permissionId Shoutout.Read
1521
+ * @webhook
1522
+ * @eventType wix.email_marketing.v1.campaign_campaign_distributed_event
1523
+ * @serviceIdentifier wix.emailmarketing.api.v1.CampaignService
1524
+ * @slug campaign_distributed_event
1525
+ */
1526
+ declare function onCampaignDistributedEvent(handler: (event: CampaignDistributedEnvelope) => void | Promise<void>): void;
1308
1527
  interface CampaignPausedEnvelope {
1309
1528
  data: Paused;
1310
1529
  metadata: EventMetadata;
1311
1530
  }
1531
+ /**
1532
+ * Triggered when a scheduled campaign is paused.
1533
+ * @permissionScope Manage Stores
1534
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1535
+ * @permissionScope Access Verticals by Automations
1536
+ * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1537
+ * @permissionScope Set Up Automations
1538
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1539
+ * @permissionScope Read Email Marketing
1540
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1541
+ * @permissionScope Manage Email Marketing
1542
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1543
+ * @permissionId Shoutout.Read
1544
+ * @webhook
1545
+ * @eventType wix.email_marketing.v1.campaign_campaign_paused_event
1546
+ * @serviceIdentifier wix.emailmarketing.api.v1.CampaignService
1547
+ * @slug campaign_paused_event
1548
+ */
1549
+ declare function onCampaignPausedEvent(handler: (event: CampaignPausedEnvelope) => void | Promise<void>): void;
1312
1550
  interface CampaignPublishedEnvelope {
1313
1551
  data: Published;
1314
1552
  metadata: EventMetadata;
1315
1553
  }
1554
+ /**
1555
+ * Triggered when a draft campaign is published.
1556
+ * @permissionScope Manage Stores
1557
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1558
+ * @permissionScope Access Verticals by Automations
1559
+ * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1560
+ * @permissionScope Set Up Automations
1561
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1562
+ * @permissionScope Read Email Marketing
1563
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1564
+ * @permissionScope Manage Email Marketing
1565
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1566
+ * @permissionId Shoutout.Read
1567
+ * @webhook
1568
+ * @eventType wix.email_marketing.v1.campaign_campaign_published_event
1569
+ * @serviceIdentifier wix.emailmarketing.api.v1.CampaignService
1570
+ * @slug campaign_published_event
1571
+ */
1572
+ declare function onCampaignPublishedEvent(handler: (event: CampaignPublishedEnvelope) => void | Promise<void>): void;
1316
1573
  interface CampaignRejectedEnvelope {
1317
1574
  data: Rejected;
1318
1575
  metadata: EventMetadata;
1319
1576
  }
1577
+ /**
1578
+ * Triggered when a campaign is identified as abusive and rejected without sending emails to recipients.
1579
+ * @permissionScope Manage Stores
1580
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1581
+ * @permissionScope Access Verticals by Automations
1582
+ * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1583
+ * @permissionScope Set Up Automations
1584
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1585
+ * @permissionScope Read Email Marketing
1586
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1587
+ * @permissionScope Manage Email Marketing
1588
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1589
+ * @permissionId Shoutout.Read
1590
+ * @webhook
1591
+ * @eventType wix.email_marketing.v1.campaign_campaign_rejected_event
1592
+ * @serviceIdentifier wix.emailmarketing.api.v1.CampaignService
1593
+ * @slug campaign_rejected_event
1594
+ */
1595
+ declare function onCampaignRejectedEvent(handler: (event: CampaignRejectedEnvelope) => void | Promise<void>): void;
1320
1596
  interface CampaignScheduledEnvelope {
1321
1597
  data: Scheduled;
1322
1598
  metadata: EventMetadata;
1323
1599
  }
1600
+ /**
1601
+ * Triggered when a campaign is scheduled to be sent out at the specific time.
1602
+ * @permissionScope Manage Stores
1603
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1604
+ * @permissionScope Access Verticals by Automations
1605
+ * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1606
+ * @permissionScope Set Up Automations
1607
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1608
+ * @permissionScope Read Email Marketing
1609
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1610
+ * @permissionScope Manage Email Marketing
1611
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1612
+ * @permissionId Shoutout.Read
1613
+ * @webhook
1614
+ * @eventType wix.email_marketing.v1.campaign_campaign_scheduled_event
1615
+ * @serviceIdentifier wix.emailmarketing.api.v1.CampaignService
1616
+ * @slug campaign_scheduled_event
1617
+ */
1618
+ declare function onCampaignScheduledEvent(handler: (event: CampaignScheduledEnvelope) => void | Promise<void>): void;
1324
1619
  interface CampaignTerminatedEnvelope {
1325
1620
  data: Terminated;
1326
1621
  metadata: EventMetadata;
1327
1622
  }
1623
+ /**
1624
+ * Triggered when the mailing list isn't clean and campaign was terminated.
1625
+ * @permissionScope Manage Stores
1626
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1627
+ * @permissionScope Access Verticals by Automations
1628
+ * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1629
+ * @permissionScope Set Up Automations
1630
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1631
+ * @permissionScope Read Email Marketing
1632
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1633
+ * @permissionScope Manage Email Marketing
1634
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1635
+ * @permissionId Shoutout.Read
1636
+ * @webhook
1637
+ * @eventType wix.email_marketing.v1.campaign_campaign_terminated_event
1638
+ * @serviceIdentifier wix.emailmarketing.api.v1.CampaignService
1639
+ * @slug campaign_terminated_event
1640
+ */
1641
+ declare function onCampaignTerminatedEvent(handler: (event: CampaignTerminatedEnvelope) => void | Promise<void>): void;
1328
1642
  interface CampaignCreatedEnvelope {
1329
1643
  entity: Campaign;
1330
1644
  metadata: EventMetadata;
1331
1645
  }
1646
+ /**
1647
+ * Triggered when a campaign is created.
1648
+ * @permissionScope Manage Stores
1649
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1650
+ * @permissionScope Access Verticals by Automations
1651
+ * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1652
+ * @permissionScope Set Up Automations
1653
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1654
+ * @permissionScope Read Email Marketing
1655
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1656
+ * @permissionScope Manage Email Marketing
1657
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1658
+ * @permissionId Shoutout.Read
1659
+ * @webhook
1660
+ * @eventType wix.email_marketing.v1.campaign_created
1661
+ * @serviceIdentifier wix.emailmarketing.api.v1.CampaignService
1662
+ * @slug created
1663
+ */
1664
+ declare function onCampaignCreated(handler: (event: CampaignCreatedEnvelope) => void | Promise<void>): void;
1332
1665
  interface CampaignDeletedEnvelope {
1333
1666
  metadata: EventMetadata;
1334
1667
  }
1668
+ /**
1669
+ * Triggered when a campaign is deleted.
1670
+ * @permissionScope Manage Stores
1671
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1672
+ * @permissionScope Access Verticals by Automations
1673
+ * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1674
+ * @permissionScope Set Up Automations
1675
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1676
+ * @permissionScope Read Email Marketing
1677
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1678
+ * @permissionScope Manage Email Marketing
1679
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1680
+ * @permissionId Shoutout.Read
1681
+ * @webhook
1682
+ * @eventType wix.email_marketing.v1.campaign_deleted
1683
+ * @serviceIdentifier wix.emailmarketing.api.v1.CampaignService
1684
+ * @slug deleted
1685
+ */
1686
+ declare function onCampaignDeleted(handler: (event: CampaignDeletedEnvelope) => void | Promise<void>): void;
1335
1687
  interface CampaignEmailActivityUpdatedEnvelope {
1336
1688
  data: EmailActivityUpdated;
1337
1689
  metadata: EventMetadata;
1338
1690
  }
1691
+ /**
1692
+ * Triggered when an email campaign has a new recipient activity.
1693
+ * @permissionScope Manage Stores
1694
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1695
+ * @permissionScope Access Verticals by Automations
1696
+ * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1697
+ * @permissionScope Set Up Automations
1698
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1699
+ * @permissionScope Read Email Marketing
1700
+ * @permissionScopeId SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING
1701
+ * @permissionScope Manage Email Marketing
1702
+ * @permissionScopeId SCOPE.DC-PROMOTE.EMAIL-MARKETING
1703
+ * @permissionId Shoutout.Read
1704
+ * @webhook
1705
+ * @eventType wix.email_marketing.v1.campaign_email_activity_updated
1706
+ * @serviceIdentifier wix.emailmarketing.api.v1.CampaignService
1707
+ * @slug email_activity_updated
1708
+ */
1709
+ declare function onCampaignEmailActivityUpdated(handler: (event: CampaignEmailActivityUpdatedEnvelope) => void | Promise<void>): void;
1710
+ type CampaignNonNullablePaths = `campaignId` | `editorType` | `status` | `visibilityStatus` | `distributionStatus` | `publishingData.landingPageUrl` | `publishingData.statistics.landingPage.opened` | `publishingData.statistics.landingPage.clicked` | `publishingData.statistics.emailCampaign.delivered` | `publishingData.statistics.emailCampaign.opened` | `publishingData.statistics.emailCampaign.clicked` | `publishingData.statistics.emailCampaign.bounced` | `publishingData.statistics.emailCampaign.complained` | `publishingData.statistics.emailCampaign.notSent` | `publishingData.statistics.total.mailsSent` | `publishingData.statistics.total.opened` | `publishingData.statistics.total.clicked` | `emailSubject`;
1711
+ /**
1712
+ * Retrieves a list of statistics for up to 100 selected campaigns.
1713
+ *
1714
+ * For each campaign, you receive the total activity count for the campaign's landing page and email. For example, the total
1715
+ * amount of times the landing page was opened, or the total amount of email recipients that clicked a link in an email.
1716
+ *
1717
+ * Call List Campaigns to retrieve additional information for a site's campaigns.
1718
+ * Call List Recipients to retrieve a list of recipients and their activities related to a selected campaign.
1719
+ * @param campaignIds - IDs of the campaigns to retrieve (max 100 campaigns).
1720
+ * @public
1721
+ * @requiredField campaignIds
1722
+ * @permissionId Shoutout.Read
1723
+ * @applicableIdentity APP
1724
+ * @fqn wix.emailmarketing.api.v1.CampaignStatisticsService.ListStatistics
1725
+ */
1726
+ declare function listStatistics(campaignIds: string[]): Promise<NonNullablePaths<ListStatisticsResponse, `statistics` | `statistics.${number}.campaignId` | `statistics.${number}.landingPage.opened` | `statistics.${number}.landingPage.clicked` | `statistics.${number}.email.delivered` | `statistics.${number}.email.opened` | `statistics.${number}.email.clicked` | `statistics.${number}.email.bounced` | `statistics.${number}.email.complained` | `statistics.${number}.email.notSent`>>;
1727
+ /**
1728
+ * Retrieves a list of recipients for a selected campaign based on a specific recipient activity.
1729
+ *
1730
+ * Pages are returned with a maximum of 1,000 recipients per page and defaults to 40 recipients per page.
1731
+ *
1732
+ * Call List Statistics to retrieve a list of activity for selected campaigns.
1733
+ * Call List Campaigns to retrieve additional information for your campaigns.
1734
+ *
1735
+ * If no `activity` is included, this method returns an error.
1736
+ * @param campaignId - Campaign ID.
1737
+ * @param activity - Email activity to filter.
1738
+ * @public
1739
+ * @requiredField activity
1740
+ * @requiredField campaignId
1741
+ * @param options - Options to use when getting the list of recipients.
1742
+ * @permissionId Shoutout.Read
1743
+ * @applicableIdentity APP
1744
+ * @fqn wix.emailmarketing.api.v1.CampaignStatisticsService.ListRecipients
1745
+ */
1746
+ declare function listRecipients(campaignId: string, activity: RecipientsActivityEnumWithLiterals, options?: ListRecipientsOptions): Promise<NonNullablePaths<ListRecipientsResponse, `recipients` | `recipients.${number}.contactId` | `recipients.${number}.emailAddress` | `recipients.${number}.contactDeleted`>>;
1747
+ interface ListRecipientsOptions {
1748
+ /** Pagination options. */
1749
+ paging?: CursorPaging;
1750
+ }
1751
+ /**
1752
+ * Retrieves information about an email campaign.
1753
+ * @param campaignId - Campaign ID.
1754
+ * @public
1755
+ * @requiredField campaignId
1756
+ * @param options - Options to use when getting a campaign.
1757
+ * @permissionId Shoutout.Manage
1758
+ * @applicableIdentity APP
1759
+ * @returns Campaign information.
1760
+ * @fqn wix.emailmarketing.api.v1.CampaignService.Get
1761
+ */
1762
+ declare function getCampaign(campaignId: string, options?: GetCampaignOptions): Promise<NonNullablePaths<Campaign, CampaignNonNullablePaths>>;
1339
1763
  interface GetCampaignOptions {
1340
1764
  /**
1341
1765
  * Whether a returned campaign should include `publishingData.statistics`.
@@ -1344,6 +1768,19 @@ interface GetCampaignOptions {
1344
1768
  */
1345
1769
  optionIncludeStatistics?: boolean;
1346
1770
  }
1771
+ /**
1772
+ * Retrieves a list of email campaigns.
1773
+ *
1774
+ * Default sorts by `dateUpdated` in `DESC` order.
1775
+ * @public
1776
+ * @param options - Options to use when getting the list of campaigns.
1777
+ * @permissionId Shoutout.Read
1778
+ * @applicableIdentity APP
1779
+ * @fqn wix.emailmarketing.api.v1.CampaignService.List
1780
+ */
1781
+ declare function listCampaigns(options?: ListCampaignsOptions): Promise<NonNullablePaths<ListCampaignsResponse, {
1782
+ [P in CampaignNonNullablePaths]: `campaigns.${number}.${P}`;
1783
+ }[CampaignNonNullablePaths]>>;
1347
1784
  interface ListCampaignsOptions {
1348
1785
  /** Paging parameters. */
1349
1786
  paging?: Paging;
@@ -1358,10 +1795,39 @@ interface ListCampaignsOptions {
1358
1795
  /** Visibility status. */
1359
1796
  visibilityStatuses?: CampaignVisibilityStatusEnumWithLiterals[];
1360
1797
  }
1798
+ /**
1799
+ * Publishes and sends a specified campaign.
1800
+ *
1801
+ * If the `email_distribution_options` object isn't passed in the request, the campaign is only published as a landing page.
1802
+ * @param campaignId - Campaign ID
1803
+ * @public
1804
+ * @requiredField campaignId
1805
+ * @param options - Options to use when publishing a campaign.
1806
+ * @permissionId Shoutout.Manage
1807
+ * @applicableIdentity APP
1808
+ * @fqn wix.emailmarketing.api.v1.CampaignService.Publish
1809
+ */
1810
+ declare function publishCampaign(campaignId: string, options?: PublishCampaignOptions): Promise<NonNullablePaths<PublishCampaignResponse, `publishingData.landingPageUrl` | `publishingData.statistics.landingPage.opened` | `publishingData.statistics.landingPage.clicked` | `publishingData.statistics.emailCampaign.delivered` | `publishingData.statistics.emailCampaign.opened` | `publishingData.statistics.emailCampaign.clicked` | `publishingData.statistics.emailCampaign.bounced` | `publishingData.statistics.emailCampaign.complained` | `publishingData.statistics.emailCampaign.notSent` | `publishingData.statistics.total.mailsSent` | `publishingData.statistics.total.opened` | `publishingData.statistics.total.clicked`> & {
1811
+ __applicationErrorsType?: PublishCampaignApplicationErrors;
1812
+ }>;
1361
1813
  interface PublishCampaignOptions {
1362
1814
  /** Email distribution options. Pass this object in the request if you need to distribute your marketing campaign with emails. */
1363
1815
  emailDistributionOptions?: EmailDistributionOptions;
1364
1816
  }
1817
+ /**
1818
+ * Sends a test email. Call this method to preview your email campaign.
1819
+ *
1820
+ * We strongly recommend calling this method only a few times in a row, as there is a rate limit to prevent abuse of the Send Test method.
1821
+ * @param campaignId - Campaign ID.
1822
+ * @public
1823
+ * @requiredField campaignId
1824
+ * @requiredField options.toEmailAddress
1825
+ * @param options - Options for sending a test email.
1826
+ * @permissionId Shoutout.Manage
1827
+ * @applicableIdentity APP
1828
+ * @fqn wix.emailmarketing.api.v1.CampaignService.SendTest
1829
+ */
1830
+ declare function sendTest(campaignId: string, options?: NonNullablePaths<SendTestOptions, `toEmailAddress`>): Promise<void>;
1365
1831
  interface SendTestOptions {
1366
1832
  /**
1367
1833
  * Email subject.
@@ -1374,9 +1840,91 @@ interface SendTestOptions {
1374
1840
  */
1375
1841
  toEmailAddress: string;
1376
1842
  }
1377
- interface ListRecipientsOptions {
1378
- /** Pagination options. */
1379
- paging?: CursorPaging;
1380
- }
1843
+ /**
1844
+ * Pauses a scheduled campaign.
1845
+ * @param campaignId - Campaign ID.
1846
+ * @public
1847
+ * @requiredField campaignId
1848
+ * @permissionId Shoutout.Manage
1849
+ * @applicableIdentity APP
1850
+ * @fqn wix.emailmarketing.api.v1.CampaignService.PauseScheduling
1851
+ */
1852
+ declare function pauseScheduling(campaignId: string): Promise<void>;
1853
+ /**
1854
+ * Changes the sending time for an already scheduled campaign.
1855
+ * @param campaignId - ID of the campaign to reschedule.
1856
+ * @param sendAt - New time for sending out the campaign.
1857
+ * @public
1858
+ * @requiredField campaignId
1859
+ * @requiredField sendAt
1860
+ * @permissionId Shoutout.Manage
1861
+ * @applicableIdentity APP
1862
+ * @fqn wix.emailmarketing.api.v1.CampaignService.Reschedule
1863
+ */
1864
+ declare function reschedule(campaignId: string, sendAt: Date): Promise<void>;
1865
+ /**
1866
+ * Permanently deletes a campaign.
1867
+ * @param campaignId - Campaign ID.
1868
+ * @public
1869
+ * @requiredField campaignId
1870
+ * @permissionId Shoutout.Manage
1871
+ * @applicableIdentity APP
1872
+ * @fqn wix.emailmarketing.api.v1.CampaignService._delete
1873
+ */
1874
+ declare function deleteCampaign(campaignId: string): Promise<void>;
1875
+ /**
1876
+ * Creates a copy of an existing campaign.
1877
+ * @param campaignId - ID of the message to be duplicated.
1878
+ * @public
1879
+ * @requiredField campaignId
1880
+ * @permissionId Shoutout.Manage
1881
+ * @applicableIdentity APP
1882
+ * @fqn wix.emailmarketing.api.v1.CampaignService.Reuse
1883
+ */
1884
+ declare function reuseCampaign(campaignId: string): Promise<NonNullablePaths<ReuseCampaignResponse, {
1885
+ [P in CampaignNonNullablePaths]: `campaign.${P}`;
1886
+ }[CampaignNonNullablePaths]>>;
1887
+ /**
1888
+ * 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.
1889
+ * @param campaignId - Campaign ID.
1890
+ * @public
1891
+ * @requiredField campaignId
1892
+ * @permissionId Shoutout.Manage
1893
+ * @applicableIdentity APP
1894
+ * @fqn wix.emailmarketing.api.v1.CampaignService.GetAudience
1895
+ */
1896
+ declare function getAudience(campaignId: string): Promise<NonNullablePaths<GetAudienceResponse, `audience.contactIds` | `audience.labelIds` | `audience.segmentIds` | `audience.activeContactsOnly`>>;
1897
+ /**
1898
+ * Checks if the sender's email address will be used as the "from" address or will it be replaced and to what exactly.
1899
+ * @param emailAddress - Email address to verify.
1900
+ * @public
1901
+ * @requiredField emailAddress
1902
+ * @permissionId Shoutout.Manage
1903
+ * @applicableIdentity APP
1904
+ * @fqn wix.emailmarketing.api.v1.CampaignService.IdentifySenderAddress
1905
+ */
1906
+ declare function identifySenderAddress(emailAddress: string): Promise<NonNullablePaths<IdentifySenderAddressResponse, `senderAddress`>>;
1907
+ /**
1908
+ * Validates any provided link. Call this method when you want to check whether the link complies with the abuse rules and can be used in a campaign.
1909
+ *
1910
+ * If you provide a link as a placeholder, it's returned in a response as valid.
1911
+ * @param url - URL to validate.
1912
+ * @public
1913
+ * @requiredField url
1914
+ * @permissionId Shoutout.Manage
1915
+ * @applicableIdentity APP
1916
+ * @fqn wix.emailmarketing.api.v1.CampaignValidationService.ValidateLink
1917
+ */
1918
+ declare function validateLink(url: string): Promise<NonNullablePaths<ValidateLinkResponse, `valid`>>;
1919
+ /**
1920
+ * Validates links that are inside the provided HTML. This method automatically takes out links from the HTML block and validates them. Call this method when you want to check whether the link complies with the abuse rules and can be used in a campaign.
1921
+ * @param html - HTML string with links.
1922
+ * @public
1923
+ * @requiredField html
1924
+ * @permissionId Shoutout.Manage
1925
+ * @applicableIdentity APP
1926
+ * @fqn wix.emailmarketing.api.v1.CampaignValidationService.ValidateHtmlLinks
1927
+ */
1928
+ declare function validateHtmlLinks(html: string): Promise<NonNullablePaths<ValidateHtmlLinksResponse, `blacklistedLinks`>>;
1381
1929
 
1382
- export { type Rejected as $, ActivityType as A, type RejectionData as B, type Campaign as C, type DistributionStatistics as D, Enum as E, type GetCampaignRequest as F, type GetCampaignOptions as G, type GetCampaignResponse as H, type IdentifySenderAddressResponse as I, type ListCampaignsRequest as J, type Paging as K, type ListCampaignsOptions as L, type CountCampaignsRequest as M, type CountCampaignsResponse as N, type CreateFromTemplateRequest as O, type PublishCampaignOptions as P, type CreateFromTemplateResponse as Q, type ReuseCampaignResponse as R, type SendTestOptions as S, type TotalStatistics as T, type CreateUserTemplateRequest as U, type CreateUserTemplateResponse as V, WebhookIdentityType as W, type CreateFromUserTemplateRequest as X, type CreateFromUserTemplateResponse as Y, type PublishCampaignRequest as Z, type EmailDistributionOptions as _, type ListCampaignsResponse as a, type MessageEnvelope as a$, type Published as a0, type Terminated as a1, type Distributed as a2, type EmailActivityUpdated as a3, type EmailActivityUpdatedEventTypeOneOf as a4, type Click as a5, type Open as a6, type SoftBounce as a7, type HardBounce as a8, type Scheduled as a9, type UpdateTitleResponse as aA, type DeleteCampaignRequest as aB, type DeleteCampaignResponse as aC, type ReuseCampaignRequest as aD, type PreviewCampaignRequest as aE, type PreviewCampaignResponse as aF, type GetComposerRequest as aG, type GetComposerResponse as aH, type Composer as aI, type DefaultValues as aJ, type UpdateComposerRequest as aK, type CampaignEditorType as aL, type UpdateComposerResponse as aM, type CreateCampaignRequest as aN, type CreateCampaignResponse as aO, type ResendToNonOpenersRequest as aP, type ResendToNonOpenersResponse as aQ, type GetAudienceRequest as aR, type CampaignAudience as aS, type IdentifySenderAddressRequest as aT, type DomainEvent as aU, type DomainEventBodyOneOf as aV, type EntityCreatedEvent as aW, type RestoreInfo as aX, type EntityUpdatedEvent as aY, type EntityDeletedEvent as aZ, type ActionEvent as a_, type SendTestRequest as aa, type PlaceholderContent as ab, type PlaceholderContentValueOneOf as ac, type PlainText as ad, type Html as ae, type Money as af, type DateTime as ag, type Map as ah, type _Array as ai, type PlaceholderContentEnum as aj, type Attachment as ak, type Integer as al, type Decimal as am, type SendTestResponse as an, type PauseSchedulingRequest as ao, type PauseSchedulingResponse as ap, type Paused as aq, type RescheduleRequest as ar, type RescheduleResponse as as, type ArchiveCampaignRequest as at, type ArchiveCampaignResponse as au, type Archived as av, type UnarchiveCampaignRequest as aw, type UnarchiveCampaignResponse as ax, type Unarchived as ay, type UpdateTitleRequest as az, type PublishCampaignResponse as b, type IdentificationData as b0, type IdentificationDataIdOneOf as b1, type EstimateFilterSizeRequest as b2, type EstimateFilterSizeResponse as b3, type EstimateAudienceSizeRequest as b4, type EstimateAudienceSizeResponse as b5, type ReconcileContactRequest as b6, type ReconcileContactResponse as b7, type Contact as b8, type SearchContactsRequest as b9, type SearchContactsResponse as ba, type GetLabelsRequest as bb, type GetLabelsResponse as bc, type Label as bd, type SubscribeFromLandingPageRequest as be, type SubscribeFromLandingPageResponse as bf, type ListStatisticsRequest as bg, type CampaignStatisticsContainer as bh, type ListRecipientsRequest as bi, type CursorPaging as bj, type CampaignRecipientDetails as bk, type PagingMetadataV2 as bl, type Cursors as bm, type BaseEventMetadata as bn, type EventMetadata as bo, type GetAudienceResponse as c, type ListStatisticsResponse as d, type RecipientsActivityEnumWithLiterals as e, type ListRecipientsOptions as f, type ListRecipientsResponse as g, type CampaignDistributedEnvelope as h, type CampaignPausedEnvelope as i, type CampaignPublishedEnvelope as j, type CampaignRejectedEnvelope as k, type CampaignScheduledEnvelope as l, type CampaignTerminatedEnvelope as m, type CampaignCreatedEnvelope as n, type CampaignDeletedEnvelope as o, type CampaignEmailActivityUpdatedEnvelope as p, CampaignEditorTypeEnum as q, CampaignStatusEnum as r, CampaignVisibilityStatusEnum as s, RejectionReasonEnum as t, CampaignSendingStateEnum as u, CampaignTypeEnum as v, RecipientsActivityEnum as w, type PublishingData as x, type CampaignStatistics as y, type LandingPageStatistics as z };
1930
+ export { type ActionEvent, ActivityType, type ActivityTypeWithLiterals, type ArchiveCampaignRequest, type ArchiveCampaignResponse, type Archived, type Attachment, type AutomationTranslatorContent, type BaseEventMetadata, type Campaign, type CampaignAudience, type CampaignCreatedEnvelope, type CampaignDeletedEnvelope, type CampaignDistributedEnvelope, type CampaignEditorType, CampaignEditorTypeEnum, type CampaignEditorTypeEnumWithLiterals, type CampaignEmailActivityUpdatedEnvelope, type CampaignPausedEnvelope, type CampaignPublishedEnvelope, type CampaignRecipientDetails, type CampaignRejectedEnvelope, type CampaignScheduledEnvelope, CampaignSendingStateEnum, type CampaignSendingStateEnumWithLiterals, type CampaignStatistics, type CampaignStatisticsContainer, CampaignStatusEnum, type CampaignStatusEnumWithLiterals, type CampaignTerminatedEnvelope, CampaignTypeEnum, type CampaignTypeEnumWithLiterals, CampaignVisibilityStatusEnum, type CampaignVisibilityStatusEnumWithLiterals, type Click, type Composer, type Contact, type CountCampaignsRequest, type CountCampaignsResponse, type CreateCampaignRequest, type CreateCampaignResponse, type CreateFromTemplateRequest, type CreateFromTemplateResponse, type CreateFromUserTemplateRequest, type CreateFromUserTemplateResponse, type CreateUserTemplateRequest, type CreateUserTemplateResponse, type CursorPaging, type Cursors, type DateTime, type Decimal, type DefaultValues, type DeleteCampaignRequest, type DeleteCampaignResponse, type Distributed, type DistributionStatistics, type DomainEvent, type DomainEventBodyOneOf, type EmailActivityUpdated, type EmailActivityUpdatedEventTypeOneOf, type EmailDistributionOptions, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, Enum, type EnumWithLiterals, type EstimateAudienceSizeRequest, type EstimateAudienceSizeResponse, type EstimateFilterSizeRequest, type EstimateFilterSizeResponse, type EventMetadata, type GetAudienceRequest, type GetAudienceResponse, type GetAutomationTranslatorContentRequest, type GetAutomationTranslatorContentResponse, type GetCampaignMappingRequest, type GetCampaignMappingResponse, type GetCampaignOptions, type GetCampaignRequest, type GetCampaignResponse, type GetComposerRequest, type GetComposerResponse, type GetDefaultComponentsRequest, type GetDefaultComponentsResponse, type GetLabelsRequest, type GetLabelsResponse, type GetPlaceholderKeysRequest, type GetPlaceholderKeysResponse, type GetUsedPlaceholderKeysRequest, type GetUsedPlaceholderKeysResponse, type HardBounce, type Html, type IdentificationData, type IdentificationDataIdOneOf, type IdentifySenderAddressRequest, type IdentifySenderAddressResponse, type Integer, type Label, type LandingPageStatistics, type ListCampaignsOptions, type ListCampaignsRequest, type ListCampaignsResponse, type ListRecipientsOptions, type ListRecipientsRequest, type ListRecipientsResponse, type ListStatisticsRequest, type ListStatisticsResponse, type LookupCampaignMappingRequest, type LookupCampaignMappingResponse, type Map, type MessageEnvelope, type Money, type Open, type Paging, type PagingMetadataV2, type PauseSchedulingRequest, type PauseSchedulingResponse, type Paused, type PlaceholderContent, type PlaceholderContentEnum, type PlaceholderContentValueOneOf, type PlainText, type PreviewCampaignRequest, type PreviewCampaignResponse, type PublishCampaignApplicationErrors, type PublishCampaignOptions, type PublishCampaignRequest, type PublishCampaignResponse, type Published, type PublishingData, RecipientsActivityEnum, type RecipientsActivityEnumWithLiterals, type ReconcileContactRequest, type ReconcileContactResponse, type Rejected, type RejectionData, RejectionReasonEnum, type RejectionReasonEnumWithLiterals, type RescheduleRequest, type RescheduleResponse, type ResendToNonOpenersRequest, type ResendToNonOpenersResponse, type RestoreInfo, type ReuseCampaignRequest, type ReuseCampaignResponse, type Scheduled, type SearchContactsRequest, type SearchContactsResponse, type SendTestBulkRequest, type SendTestBulkResponse, type SendTestOptions, type SendTestRequest, type SendTestResponse, type SoftBounce, type SubscribeFromLandingPageRequest, type SubscribeFromLandingPageResponse, type Terminated, type TotalStatistics, type UnarchiveCampaignRequest, type UnarchiveCampaignResponse, type Unarchived, type UpdateComposerRequest, type UpdateComposerResponse, type UpdateTitleRequest, type UpdateTitleResponse, type UpsertAutomationTranslatorContentRequest, type UpsertAutomationTranslatorContentResponse, type UpsertTranslationRequest, type UpsertTranslationResponse, type ValidateHtmlLinksRequest, type ValidateHtmlLinksResponse, type ValidateLinkRequest, type ValidateLinkResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type _Array, deleteCampaign, getAudience, getCampaign, identifySenderAddress, listCampaigns, listRecipients, listStatistics, onCampaignCreated, onCampaignDeleted, onCampaignDistributedEvent, onCampaignEmailActivityUpdated, onCampaignPausedEvent, onCampaignPublishedEvent, onCampaignRejectedEvent, onCampaignScheduledEvent, onCampaignTerminatedEvent, pauseScheduling, publishCampaign, reschedule, reuseCampaign, sendTest, validateHtmlLinks, validateLink };