@wix/auto_sdk_email-marketing_campaigns 1.0.70 → 1.0.71

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 (37) hide show
  1. package/build/cjs/index.d.ts +34 -34
  2. package/build/cjs/index.js +170 -170
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +538 -538
  5. package/build/cjs/index.typings.js +154 -154
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +481 -481
  8. package/build/cjs/meta.js +134 -134
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +34 -34
  11. package/build/es/index.mjs +170 -170
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +538 -538
  14. package/build/es/index.typings.mjs +154 -154
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +481 -481
  17. package/build/es/meta.mjs +134 -134
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +34 -34
  20. package/build/internal/cjs/index.js +170 -170
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +538 -538
  23. package/build/internal/cjs/index.typings.js +154 -154
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +481 -481
  26. package/build/internal/cjs/meta.js +134 -134
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +34 -34
  29. package/build/internal/es/index.mjs +170 -170
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +538 -538
  32. package/build/internal/es/index.typings.mjs +154 -154
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +481 -481
  35. package/build/internal/es/meta.mjs +134 -134
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -1,38 +1,7 @@
1
1
  import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { ListStatisticsResponse, RecipientsActivityEnumWithLiterals, ListRecipientsOptions, ListRecipientsResponse, GetCampaignOptions, Campaign, ListCampaignsOptions, ListCampaignsResponse, PublishCampaignOptions, PublishCampaignResponse, PublishCampaignApplicationErrors, SendTestOptions, ReuseCampaignResponse, GetAudienceResponse, IdentifySenderAddressResponse, ValidateLinkResponse, ValidateHtmlLinksResponse, CampaignDistributedEnvelope, CampaignPausedEnvelope, CampaignPublishedEnvelope, CampaignRejectedEnvelope, CampaignScheduledEnvelope, CampaignTerminatedEnvelope, CampaignCreatedEnvelope, CampaignDeletedEnvelope, CampaignEmailActivityUpdatedEnvelope } from './index.typings.mjs';
2
+ import { GetCampaignOptions, Campaign, ListCampaignsOptions, ListCampaignsResponse, PublishCampaignOptions, PublishCampaignResponse, PublishCampaignApplicationErrors, SendTestOptions, ReuseCampaignResponse, GetAudienceResponse, IdentifySenderAddressResponse, ValidateLinkResponse, ValidateHtmlLinksResponse, ListStatisticsResponse, RecipientsActivityEnumWithLiterals, ListRecipientsOptions, ListRecipientsResponse, CampaignDistributedEnvelope, CampaignPausedEnvelope, CampaignPublishedEnvelope, CampaignRejectedEnvelope, CampaignScheduledEnvelope, CampaignTerminatedEnvelope, CampaignCreatedEnvelope, CampaignDeletedEnvelope, CampaignEmailActivityUpdatedEnvelope } from './index.typings.mjs';
3
3
  export { ActionEvent, ActivityType, ActivityTypeWithLiterals, ArchiveCampaignRequest, ArchiveCampaignResponse, Archived, Attachment, AutomationTranslatorContent, BaseEventMetadata, CampaignAudience, CampaignEditorType, CampaignEditorTypeEnum, CampaignEditorTypeEnumWithLiterals, CampaignRecipientDetails, CampaignSendingStateEnum, CampaignSendingStateEnumWithLiterals, CampaignStatistics, CampaignStatisticsContainer, CampaignStatusEnum, CampaignStatusEnumWithLiterals, CampaignTypeEnum, CampaignTypeEnumWithLiterals, CampaignVisibilityStatusEnum, CampaignVisibilityStatusEnumWithLiterals, Click, Composer, Contact, CountCampaignsRequest, CountCampaignsResponse, CreateCampaignRequest, CreateCampaignResponse, CreateFromTemplateRequest, CreateFromTemplateResponse, CreateFromUserTemplateRequest, CreateFromUserTemplateResponse, CreateUserTemplateRequest, CreateUserTemplateResponse, CursorPaging, Cursors, DateTime, Decimal, DefaultValues, DeleteCampaignRequest, DeleteCampaignResponse, Distributed, DistributionStatistics, DomainEvent, DomainEventBodyOneOf, EmailActivityUpdated, EmailActivityUpdatedEventTypeOneOf, EmailDistributionOptions, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, Enum, EnumWithLiterals, EstimateAudienceSizeRequest, EstimateAudienceSizeResponse, EstimateFilterSizeRequest, EstimateFilterSizeResponse, EventMetadata, GetAudienceRequest, GetAutomationTranslatorContentRequest, GetAutomationTranslatorContentResponse, GetCampaignMappingRequest, GetCampaignMappingResponse, GetCampaignRequest, GetCampaignResponse, GetComposerRequest, GetComposerResponse, GetDefaultComponentsRequest, GetDefaultComponentsResponse, GetLabelsRequest, GetLabelsResponse, GetPlaceholderKeysRequest, GetPlaceholderKeysResponse, GetUsedPlaceholderKeysRequest, GetUsedPlaceholderKeysResponse, HardBounce, Html, IdentificationData, IdentificationDataIdOneOf, IdentifySenderAddressRequest, Integer, Label, LandingPageStatistics, ListCampaignsRequest, ListRecipientsRequest, ListStatisticsRequest, LookupCampaignMappingRequest, LookupCampaignMappingResponse, Map, MessageEnvelope, Money, Open, Paging, PagingMetadataV2, PauseSchedulingRequest, PauseSchedulingResponse, Paused, PlaceholderContent, PlaceholderContentEnum, PlaceholderContentValueOneOf, PlainText, PreviewCampaignRequest, PreviewCampaignResponse, PublishCampaignRequest, Published, PublishingData, RecipientsActivityEnum, ReconcileContactRequest, ReconcileContactResponse, Rejected, RejectionData, RejectionReasonEnum, RejectionReasonEnumWithLiterals, RescheduleRequest, RescheduleResponse, ResendToNonOpenersRequest, ResendToNonOpenersResponse, RestoreInfo, ReuseCampaignRequest, Scheduled, SearchContactsRequest, SearchContactsResponse, SendTestBulkRequest, SendTestBulkResponse, SendTestRequest, SendTestResponse, SoftBounce, SubscribeFromLandingPageRequest, SubscribeFromLandingPageResponse, Terminated, TotalStatistics, UnarchiveCampaignRequest, UnarchiveCampaignResponse, Unarchived, UpdateComposerRequest, UpdateComposerResponse, UpdateTitleRequest, UpdateTitleResponse, UpsertAutomationTranslatorContentRequest, UpsertAutomationTranslatorContentResponse, UpsertTranslationRequest, UpsertTranslationResponse, ValidateHtmlLinksRequest, ValidateLinkRequest, WebhookIdentityType, WebhookIdentityTypeWithLiterals, _Array } from './index.typings.mjs';
4
4
 
5
- declare function listStatistics$1(httpClient: HttpClient): ListStatisticsSignature;
6
- interface ListStatisticsSignature {
7
- /**
8
- * Retrieves a list of statistics for up to 100 selected campaigns.
9
- *
10
- * For each campaign, you receive the total activity count for the campaign's landing page and email. For example, the total
11
- * amount of times the landing page was opened, or the total amount of email recipients that clicked a link in an email.
12
- *
13
- * Call List Campaigns to retrieve additional information for a site's campaigns.
14
- * Call List Recipients to retrieve a list of recipients and their activities related to a selected campaign.
15
- * @param - IDs of the campaigns to retrieve (max 100 campaigns).
16
- */
17
- (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`, 5>>;
18
- }
19
- declare function listRecipients$1(httpClient: HttpClient): ListRecipientsSignature;
20
- interface ListRecipientsSignature {
21
- /**
22
- * Retrieves a list of recipients for a selected campaign based on a specific recipient activity.
23
- *
24
- * Pages are returned with a maximum of 1,000 recipients per page and defaults to 40 recipients per page.
25
- *
26
- * Call List Statistics to retrieve a list of activity for selected campaigns.
27
- * Call List Campaigns to retrieve additional information for your campaigns.
28
- *
29
- * If no `activity` is included, this method returns an error.
30
- * @param - Campaign ID.
31
- * @param - Email activity to filter.
32
- * @param - Options to use when getting the list of recipients.
33
- */
34
- (campaignId: string, activity: RecipientsActivityEnumWithLiterals, options?: ListRecipientsOptions): Promise<NonNullablePaths<ListRecipientsResponse, `recipients` | `recipients.${number}.contactId` | `recipients.${number}.emailAddress` | `recipients.${number}.contactDeleted`, 4>>;
35
- }
36
5
  declare function getCampaign$1(httpClient: HttpClient): GetCampaignSignature;
37
6
  interface GetCampaignSignature {
38
7
  /**
@@ -144,6 +113,37 @@ interface ValidateHtmlLinksSignature {
144
113
  */
145
114
  (html: string): Promise<NonNullablePaths<ValidateHtmlLinksResponse, `blacklistedLinks`, 2>>;
146
115
  }
116
+ declare function listStatistics$1(httpClient: HttpClient): ListStatisticsSignature;
117
+ interface ListStatisticsSignature {
118
+ /**
119
+ * Retrieves a list of statistics for up to 100 selected campaigns.
120
+ *
121
+ * For each campaign, you receive the total activity count for the campaign's landing page and email. For example, the total
122
+ * amount of times the landing page was opened, or the total amount of email recipients that clicked a link in an email.
123
+ *
124
+ * Call List Campaigns to retrieve additional information for a site's campaigns.
125
+ * Call List Recipients to retrieve a list of recipients and their activities related to a selected campaign.
126
+ * @param - IDs of the campaigns to retrieve (max 100 campaigns).
127
+ */
128
+ (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`, 5>>;
129
+ }
130
+ declare function listRecipients$1(httpClient: HttpClient): ListRecipientsSignature;
131
+ interface ListRecipientsSignature {
132
+ /**
133
+ * Retrieves a list of recipients for a selected campaign based on a specific recipient activity.
134
+ *
135
+ * Pages are returned with a maximum of 1,000 recipients per page and defaults to 40 recipients per page.
136
+ *
137
+ * Call List Statistics to retrieve a list of activity for selected campaigns.
138
+ * Call List Campaigns to retrieve additional information for your campaigns.
139
+ *
140
+ * If no `activity` is included, this method returns an error.
141
+ * @param - Campaign ID.
142
+ * @param - Email activity to filter.
143
+ * @param - Options to use when getting the list of recipients.
144
+ */
145
+ (campaignId: string, activity: RecipientsActivityEnumWithLiterals, options?: ListRecipientsOptions): Promise<NonNullablePaths<ListRecipientsResponse, `recipients` | `recipients.${number}.contactId` | `recipients.${number}.emailAddress` | `recipients.${number}.contactDeleted`, 4>>;
146
+ }
147
147
  declare const onCampaignDistributedEvent$1: EventDefinition<CampaignDistributedEnvelope, "wix.email_marketing.v1.campaign_campaign_distributed_event">;
148
148
  declare const onCampaignPausedEvent$1: EventDefinition<CampaignPausedEnvelope, "wix.email_marketing.v1.campaign_campaign_paused_event">;
149
149
  declare const onCampaignPublishedEvent$1: EventDefinition<CampaignPublishedEnvelope, "wix.email_marketing.v1.campaign_campaign_published_event">;
@@ -154,8 +154,6 @@ declare const onCampaignCreated$1: EventDefinition<CampaignCreatedEnvelope, "wix
154
154
  declare const onCampaignDeleted$1: EventDefinition<CampaignDeletedEnvelope, "wix.email_marketing.v1.campaign_deleted">;
155
155
  declare const onCampaignEmailActivityUpdated$1: EventDefinition<CampaignEmailActivityUpdatedEnvelope, "wix.email_marketing.v1.campaign_email_activity_updated">;
156
156
 
157
- declare const listStatistics: MaybeContext<BuildRESTFunction<typeof listStatistics$1> & typeof listStatistics$1>;
158
- declare const listRecipients: MaybeContext<BuildRESTFunction<typeof listRecipients$1> & typeof listRecipients$1>;
159
157
  declare const getCampaign: MaybeContext<BuildRESTFunction<typeof getCampaign$1> & typeof getCampaign$1>;
160
158
  declare const listCampaigns: MaybeContext<BuildRESTFunction<typeof listCampaigns$1> & typeof listCampaigns$1>;
161
159
  declare const publishCampaign: MaybeContext<BuildRESTFunction<typeof publishCampaign$1> & typeof publishCampaign$1>;
@@ -168,6 +166,8 @@ declare const getAudience: MaybeContext<BuildRESTFunction<typeof getAudience$1>
168
166
  declare const identifySenderAddress: MaybeContext<BuildRESTFunction<typeof identifySenderAddress$1> & typeof identifySenderAddress$1>;
169
167
  declare const validateLink: MaybeContext<BuildRESTFunction<typeof validateLink$1> & typeof validateLink$1>;
170
168
  declare const validateHtmlLinks: MaybeContext<BuildRESTFunction<typeof validateHtmlLinks$1> & typeof validateHtmlLinks$1>;
169
+ declare const listStatistics: MaybeContext<BuildRESTFunction<typeof listStatistics$1> & typeof listStatistics$1>;
170
+ declare const listRecipients: MaybeContext<BuildRESTFunction<typeof listRecipients$1> & typeof listRecipients$1>;
171
171
  /**
172
172
  * Triggered when a campaign is successfully distributed to all recipients.
173
173
  */
@@ -17,44 +17,7 @@ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transform
17
17
  import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
18
18
  import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
19
19
  import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
20
- function resolveWixEmailmarketingApiV1CampaignValidationServiceUrl(opts) {
21
- const domainToMappings = {
22
- "www.wixapis.com": [
23
- {
24
- srcPath: "/email-marketing/v1/campaign-validation",
25
- destPath: "/v1/campaign-validation"
26
- }
27
- ],
28
- "manage._base_domain_": [
29
- {
30
- srcPath: "/_api/shoutout/v1/campaign-validation",
31
- destPath: "/v1/campaign-validation"
32
- }
33
- ],
34
- "*.dev.wix-code.com": [
35
- {
36
- srcPath: "/email-marketing/v1/campaign-validation/validate-html-links",
37
- destPath: "/v1/campaign-validation/validate-html-links"
38
- },
39
- {
40
- srcPath: "/email-marketing/v1/campaign-validation/validate-link",
41
- destPath: "/v1/campaign-validation/validate-link"
42
- }
43
- ],
44
- _: [
45
- {
46
- srcPath: "/email-marketing/v1/campaign-validation/validate-html-links",
47
- destPath: "/v1/campaign-validation/validate-html-links"
48
- },
49
- {
50
- srcPath: "/email-marketing/v1/campaign-validation/validate-link",
51
- destPath: "/v1/campaign-validation/validate-link"
52
- }
53
- ]
54
- };
55
- return resolveUrl(Object.assign(opts, { domainToMappings }));
56
- }
57
- function resolveWixEmailmarketingApiV1CampaignServiceUrl(opts) {
20
+ function resolveWixEmailmarketingApiV1CampaignStatisticsServiceUrl(opts) {
58
21
  const domainToMappings = {
59
22
  "manage._base_domain_": [
60
23
  {
@@ -147,7 +110,44 @@ function resolveWixEmailmarketingApiV1CampaignServiceUrl(opts) {
147
110
  };
148
111
  return resolveUrl(Object.assign(opts, { domainToMappings }));
149
112
  }
150
- function resolveWixEmailmarketingApiV1CampaignStatisticsServiceUrl(opts) {
113
+ function resolveWixEmailmarketingApiV1CampaignValidationServiceUrl(opts) {
114
+ const domainToMappings = {
115
+ "www.wixapis.com": [
116
+ {
117
+ srcPath: "/email-marketing/v1/campaign-validation",
118
+ destPath: "/v1/campaign-validation"
119
+ }
120
+ ],
121
+ "manage._base_domain_": [
122
+ {
123
+ srcPath: "/_api/shoutout/v1/campaign-validation",
124
+ destPath: "/v1/campaign-validation"
125
+ }
126
+ ],
127
+ "*.dev.wix-code.com": [
128
+ {
129
+ srcPath: "/email-marketing/v1/campaign-validation/validate-html-links",
130
+ destPath: "/v1/campaign-validation/validate-html-links"
131
+ },
132
+ {
133
+ srcPath: "/email-marketing/v1/campaign-validation/validate-link",
134
+ destPath: "/v1/campaign-validation/validate-link"
135
+ }
136
+ ],
137
+ _: [
138
+ {
139
+ srcPath: "/email-marketing/v1/campaign-validation/validate-html-links",
140
+ destPath: "/v1/campaign-validation/validate-html-links"
141
+ },
142
+ {
143
+ srcPath: "/email-marketing/v1/campaign-validation/validate-link",
144
+ destPath: "/v1/campaign-validation/validate-link"
145
+ }
146
+ ]
147
+ };
148
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
149
+ }
150
+ function resolveWixEmailmarketingApiV1CampaignServiceUrl(opts) {
151
151
  const domainToMappings = {
152
152
  "manage._base_domain_": [
153
153
  {
@@ -241,54 +241,6 @@ function resolveWixEmailmarketingApiV1CampaignStatisticsServiceUrl(opts) {
241
241
  return resolveUrl(Object.assign(opts, { domainToMappings }));
242
242
  }
243
243
  var PACKAGE_NAME = "@wix/auto_sdk_email-marketing_campaigns";
244
- function listStatistics(payload) {
245
- function __listStatistics({ host }) {
246
- const metadata = {
247
- entityFqdn: "wix.email_marketing.v1.campaign",
248
- method: "GET",
249
- methodFqn: "wix.emailmarketing.api.v1.CampaignStatisticsService.ListStatistics",
250
- packageName: PACKAGE_NAME,
251
- migrationOptions: {
252
- optInTransformResponse: true
253
- },
254
- url: resolveWixEmailmarketingApiV1CampaignStatisticsServiceUrl({
255
- protoPath: "/v1/campaigns/statistics",
256
- data: payload,
257
- host
258
- }),
259
- params: toURLSearchParams(payload)
260
- };
261
- return metadata;
262
- }
263
- return __listStatistics;
264
- }
265
- function listRecipients(payload) {
266
- function __listRecipients({ host }) {
267
- const metadata = {
268
- entityFqdn: "wix.email_marketing.v1.campaign",
269
- method: "GET",
270
- methodFqn: "wix.emailmarketing.api.v1.CampaignStatisticsService.ListRecipients",
271
- packageName: PACKAGE_NAME,
272
- migrationOptions: {
273
- optInTransformResponse: true
274
- },
275
- url: resolveWixEmailmarketingApiV1CampaignStatisticsServiceUrl({
276
- protoPath: "/v1/campaigns/{campaignId}/statistics/recipients",
277
- data: payload,
278
- host
279
- }),
280
- params: toURLSearchParams(payload),
281
- transformResponse: (payload2) => transformPaths(payload2, [
282
- {
283
- transformFn: transformRESTTimestampToSDKTimestamp,
284
- paths: [{ path: "recipients.lastActivityDate" }]
285
- }
286
- ])
287
- };
288
- return metadata;
289
- }
290
- return __listRecipients;
291
- }
292
244
  function get(payload) {
293
245
  function __get({ host }) {
294
246
  const metadata = {
@@ -604,6 +556,54 @@ function validateHtmlLinks(payload) {
604
556
  }
605
557
  return __validateHtmlLinks;
606
558
  }
559
+ function listStatistics(payload) {
560
+ function __listStatistics({ host }) {
561
+ const metadata = {
562
+ entityFqdn: "wix.email_marketing.v1.campaign",
563
+ method: "GET",
564
+ methodFqn: "wix.emailmarketing.api.v1.CampaignStatisticsService.ListStatistics",
565
+ packageName: PACKAGE_NAME,
566
+ migrationOptions: {
567
+ optInTransformResponse: true
568
+ },
569
+ url: resolveWixEmailmarketingApiV1CampaignStatisticsServiceUrl({
570
+ protoPath: "/v1/campaigns/statistics",
571
+ data: payload,
572
+ host
573
+ }),
574
+ params: toURLSearchParams(payload)
575
+ };
576
+ return metadata;
577
+ }
578
+ return __listStatistics;
579
+ }
580
+ function listRecipients(payload) {
581
+ function __listRecipients({ host }) {
582
+ const metadata = {
583
+ entityFqdn: "wix.email_marketing.v1.campaign",
584
+ method: "GET",
585
+ methodFqn: "wix.emailmarketing.api.v1.CampaignStatisticsService.ListRecipients",
586
+ packageName: PACKAGE_NAME,
587
+ migrationOptions: {
588
+ optInTransformResponse: true
589
+ },
590
+ url: resolveWixEmailmarketingApiV1CampaignStatisticsServiceUrl({
591
+ protoPath: "/v1/campaigns/{campaignId}/statistics/recipients",
592
+ data: payload,
593
+ host
594
+ }),
595
+ params: toURLSearchParams(payload),
596
+ transformResponse: (payload2) => transformPaths(payload2, [
597
+ {
598
+ transformFn: transformRESTTimestampToSDKTimestamp,
599
+ paths: [{ path: "recipients.lastActivityDate" }]
600
+ }
601
+ ])
602
+ };
603
+ return metadata;
604
+ }
605
+ return __listRecipients;
606
+ }
607
607
 
608
608
  // src/email-marketing-v1-campaign-campaigns.universal.ts
609
609
  var CampaignEditorTypeEnum = /* @__PURE__ */ ((CampaignEditorTypeEnum2) => {
@@ -679,17 +679,6 @@ var CampaignTypeEnum = /* @__PURE__ */ ((CampaignTypeEnum2) => {
679
679
  CampaignTypeEnum2["TRIGGERED"] = "TRIGGERED";
680
680
  return CampaignTypeEnum2;
681
681
  })(CampaignTypeEnum || {});
682
- var RecipientsActivityEnum = /* @__PURE__ */ ((RecipientsActivityEnum2) => {
683
- RecipientsActivityEnum2["UNKNOWN"] = "UNKNOWN";
684
- RecipientsActivityEnum2["DELIVERED"] = "DELIVERED";
685
- RecipientsActivityEnum2["OPENED"] = "OPENED";
686
- RecipientsActivityEnum2["CLICKED"] = "CLICKED";
687
- RecipientsActivityEnum2["BOUNCED"] = "BOUNCED";
688
- RecipientsActivityEnum2["NOT_SENT"] = "NOT_SENT";
689
- RecipientsActivityEnum2["SENT"] = "SENT";
690
- RecipientsActivityEnum2["NOT_OPENED"] = "NOT_OPENED";
691
- return RecipientsActivityEnum2;
692
- })(RecipientsActivityEnum || {});
693
682
  var ActivityType = /* @__PURE__ */ ((ActivityType2) => {
694
683
  ActivityType2["DELIVERY"] = "DELIVERY";
695
684
  ActivityType2["CLICK"] = "CLICK";
@@ -706,62 +695,17 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
706
695
  WebhookIdentityType2["APP"] = "APP";
707
696
  return WebhookIdentityType2;
708
697
  })(WebhookIdentityType || {});
709
- async function listStatistics2(campaignIds) {
710
- const { httpClient, sideEffects } = arguments[1];
711
- const payload = renameKeysFromSDKRequestToRESTRequest({
712
- campaignIds
713
- });
714
- const reqOpts = listStatistics(payload);
715
- sideEffects?.onSiteCall?.();
716
- try {
717
- const result = await httpClient.request(reqOpts);
718
- sideEffects?.onSuccess?.(result);
719
- return renameKeysFromRESTResponseToSDKResponse(result.data);
720
- } catch (err) {
721
- const transformedError = sdkTransformError(
722
- err,
723
- {
724
- spreadPathsToArguments: {},
725
- explicitPathsToArguments: { campaignIds: "$[0]" },
726
- singleArgumentUnchanged: false
727
- },
728
- ["campaignIds"]
729
- );
730
- sideEffects?.onError?.(err);
731
- throw transformedError;
732
- }
733
- }
734
- async function listRecipients2(campaignId, activity, options) {
735
- const { httpClient, sideEffects } = arguments[3];
736
- const payload = renameKeysFromSDKRequestToRESTRequest({
737
- campaignId,
738
- activity,
739
- paging: options?.paging
740
- });
741
- const reqOpts = listRecipients(payload);
742
- sideEffects?.onSiteCall?.();
743
- try {
744
- const result = await httpClient.request(reqOpts);
745
- sideEffects?.onSuccess?.(result);
746
- return renameKeysFromRESTResponseToSDKResponse(result.data);
747
- } catch (err) {
748
- const transformedError = sdkTransformError(
749
- err,
750
- {
751
- spreadPathsToArguments: {},
752
- explicitPathsToArguments: {
753
- campaignId: "$[0]",
754
- activity: "$[1]",
755
- paging: "$[2].paging"
756
- },
757
- singleArgumentUnchanged: false
758
- },
759
- ["campaignId", "activity", "options"]
760
- );
761
- sideEffects?.onError?.(err);
762
- throw transformedError;
763
- }
764
- }
698
+ var RecipientsActivityEnum = /* @__PURE__ */ ((RecipientsActivityEnum2) => {
699
+ RecipientsActivityEnum2["UNKNOWN"] = "UNKNOWN";
700
+ RecipientsActivityEnum2["DELIVERED"] = "DELIVERED";
701
+ RecipientsActivityEnum2["OPENED"] = "OPENED";
702
+ RecipientsActivityEnum2["CLICKED"] = "CLICKED";
703
+ RecipientsActivityEnum2["BOUNCED"] = "BOUNCED";
704
+ RecipientsActivityEnum2["NOT_SENT"] = "NOT_SENT";
705
+ RecipientsActivityEnum2["SENT"] = "SENT";
706
+ RecipientsActivityEnum2["NOT_OPENED"] = "NOT_OPENED";
707
+ return RecipientsActivityEnum2;
708
+ })(RecipientsActivityEnum || {});
765
709
  async function getCampaign(campaignId, options) {
766
710
  const { httpClient, sideEffects } = arguments[2];
767
711
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -1077,24 +1021,64 @@ async function validateHtmlLinks2(html) {
1077
1021
  throw transformedError;
1078
1022
  }
1079
1023
  }
1080
-
1081
- // src/email-marketing-v1-campaign-campaigns.public.ts
1082
- function listStatistics3(httpClient) {
1083
- return (campaignIds) => listStatistics2(
1084
- campaignIds,
1085
- // @ts-ignore
1086
- { httpClient }
1087
- );
1024
+ async function listStatistics2(campaignIds) {
1025
+ const { httpClient, sideEffects } = arguments[1];
1026
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1027
+ campaignIds
1028
+ });
1029
+ const reqOpts = listStatistics(payload);
1030
+ sideEffects?.onSiteCall?.();
1031
+ try {
1032
+ const result = await httpClient.request(reqOpts);
1033
+ sideEffects?.onSuccess?.(result);
1034
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1035
+ } catch (err) {
1036
+ const transformedError = sdkTransformError(
1037
+ err,
1038
+ {
1039
+ spreadPathsToArguments: {},
1040
+ explicitPathsToArguments: { campaignIds: "$[0]" },
1041
+ singleArgumentUnchanged: false
1042
+ },
1043
+ ["campaignIds"]
1044
+ );
1045
+ sideEffects?.onError?.(err);
1046
+ throw transformedError;
1047
+ }
1088
1048
  }
1089
- function listRecipients3(httpClient) {
1090
- return (campaignId, activity, options) => listRecipients2(
1049
+ async function listRecipients2(campaignId, activity, options) {
1050
+ const { httpClient, sideEffects } = arguments[3];
1051
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1091
1052
  campaignId,
1092
1053
  activity,
1093
- options,
1094
- // @ts-ignore
1095
- { httpClient }
1096
- );
1054
+ paging: options?.paging
1055
+ });
1056
+ const reqOpts = listRecipients(payload);
1057
+ sideEffects?.onSiteCall?.();
1058
+ try {
1059
+ const result = await httpClient.request(reqOpts);
1060
+ sideEffects?.onSuccess?.(result);
1061
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1062
+ } catch (err) {
1063
+ const transformedError = sdkTransformError(
1064
+ err,
1065
+ {
1066
+ spreadPathsToArguments: {},
1067
+ explicitPathsToArguments: {
1068
+ campaignId: "$[0]",
1069
+ activity: "$[1]",
1070
+ paging: "$[2].paging"
1071
+ },
1072
+ singleArgumentUnchanged: false
1073
+ },
1074
+ ["campaignId", "activity", "options"]
1075
+ );
1076
+ sideEffects?.onError?.(err);
1077
+ throw transformedError;
1078
+ }
1097
1079
  }
1080
+
1081
+ // src/email-marketing-v1-campaign-campaigns.public.ts
1098
1082
  function getCampaign2(httpClient) {
1099
1083
  return (campaignId, options) => getCampaign(
1100
1084
  campaignId,
@@ -1183,6 +1167,22 @@ function validateHtmlLinks3(httpClient) {
1183
1167
  { httpClient }
1184
1168
  );
1185
1169
  }
1170
+ function listStatistics3(httpClient) {
1171
+ return (campaignIds) => listStatistics2(
1172
+ campaignIds,
1173
+ // @ts-ignore
1174
+ { httpClient }
1175
+ );
1176
+ }
1177
+ function listRecipients3(httpClient) {
1178
+ return (campaignId, activity, options) => listRecipients2(
1179
+ campaignId,
1180
+ activity,
1181
+ options,
1182
+ // @ts-ignore
1183
+ { httpClient }
1184
+ );
1185
+ }
1186
1186
  var onCampaignDistributedEvent = EventDefinition(
1187
1187
  "wix.email_marketing.v1.campaign_campaign_distributed_event",
1188
1188
  true,
@@ -1307,8 +1307,6 @@ var onCampaignEmailActivityUpdated = EventDefinition(
1307
1307
  // src/email-marketing-v1-campaign-campaigns.context.ts
1308
1308
  import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
1309
1309
  import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
1310
- var listStatistics4 = /* @__PURE__ */ createRESTModule(listStatistics3);
1311
- var listRecipients4 = /* @__PURE__ */ createRESTModule(listRecipients3);
1312
1310
  var getCampaign3 = /* @__PURE__ */ createRESTModule(getCampaign2);
1313
1311
  var listCampaigns3 = /* @__PURE__ */ createRESTModule(listCampaigns2);
1314
1312
  var publishCampaign3 = /* @__PURE__ */ createRESTModule(publishCampaign2);
@@ -1321,6 +1319,8 @@ var getAudience4 = /* @__PURE__ */ createRESTModule(getAudience3);
1321
1319
  var identifySenderAddress4 = /* @__PURE__ */ createRESTModule(identifySenderAddress3);
1322
1320
  var validateLink4 = /* @__PURE__ */ createRESTModule(validateLink3);
1323
1321
  var validateHtmlLinks4 = /* @__PURE__ */ createRESTModule(validateHtmlLinks3);
1322
+ var listStatistics4 = /* @__PURE__ */ createRESTModule(listStatistics3);
1323
+ var listRecipients4 = /* @__PURE__ */ createRESTModule(listRecipients3);
1324
1324
  var onCampaignDistributedEvent2 = createEventModule(
1325
1325
  onCampaignDistributedEvent
1326
1326
  );