@wix/auto_sdk_email-marketing_campaigns 1.0.79 → 1.0.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +35 -35
- package/build/cjs/index.js +170 -170
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +534 -534
- package/build/cjs/index.typings.js +154 -154
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +479 -479
- package/build/cjs/meta.js +134 -134
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +35 -35
- package/build/es/index.mjs +170 -170
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +534 -534
- package/build/es/index.typings.mjs +154 -154
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +479 -479
- package/build/es/meta.mjs +134 -134
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +35 -35
- package/build/internal/cjs/index.js +170 -170
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +534 -534
- package/build/internal/cjs/index.typings.js +154 -154
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +479 -479
- package/build/internal/cjs/meta.js +134 -134
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +35 -35
- package/build/internal/es/index.mjs +170 -170
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +534 -534
- package/build/internal/es/index.typings.mjs +154 -154
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +479 -479
- package/build/internal/es/meta.mjs +134 -134
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,7 +1,38 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { GetCampaignOptions, Campaign, ListCampaignsOptions, ListCampaignsResponse, PublishCampaignOptions, PublishCampaignResponse, PublishCampaignApplicationErrors, SendTestOptions, ReuseCampaignResponse, GetAudienceResponse, IdentifySenderAddressResponse, ValidateLinkResponse, ValidateHtmlLinksResponse,
|
|
3
|
-
export { AccountInfo, 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.js';
|
|
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.js';
|
|
3
|
+
export { AccountInfo, AccountInfoMetadata, 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.js';
|
|
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
|
+
}
|
|
5
36
|
declare function getCampaign$1(httpClient: HttpClient): GetCampaignSignature;
|
|
6
37
|
interface GetCampaignSignature {
|
|
7
38
|
/**
|
|
@@ -113,37 +144,6 @@ interface ValidateHtmlLinksSignature {
|
|
|
113
144
|
*/
|
|
114
145
|
(html: string): Promise<NonNullablePaths<ValidateHtmlLinksResponse, `blacklistedLinks`, 2>>;
|
|
115
146
|
}
|
|
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,6 +154,8 @@ 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>;
|
|
157
159
|
declare const getCampaign: MaybeContext<BuildRESTFunction<typeof getCampaign$1> & typeof getCampaign$1>;
|
|
158
160
|
declare const listCampaigns: MaybeContext<BuildRESTFunction<typeof listCampaigns$1> & typeof listCampaigns$1>;
|
|
159
161
|
declare const publishCampaign: MaybeContext<BuildRESTFunction<typeof publishCampaign$1> & typeof publishCampaign$1>;
|
|
@@ -166,8 +168,6 @@ declare const getAudience: MaybeContext<BuildRESTFunction<typeof getAudience$1>
|
|
|
166
168
|
declare const identifySenderAddress: MaybeContext<BuildRESTFunction<typeof identifySenderAddress$1> & typeof identifySenderAddress$1>;
|
|
167
169
|
declare const validateLink: MaybeContext<BuildRESTFunction<typeof validateLink$1> & typeof validateLink$1>;
|
|
168
170
|
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
|
*/
|
package/build/cjs/index.js
CHANGED
|
@@ -72,7 +72,44 @@ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
|
72
72
|
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
73
73
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
74
74
|
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
75
|
-
function
|
|
75
|
+
function resolveWixEmailmarketingApiV1CampaignValidationServiceUrl(opts) {
|
|
76
|
+
const domainToMappings = {
|
|
77
|
+
"www.wixapis.com": [
|
|
78
|
+
{
|
|
79
|
+
srcPath: "/email-marketing/v1/campaign-validation",
|
|
80
|
+
destPath: "/v1/campaign-validation"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"manage._base_domain_": [
|
|
84
|
+
{
|
|
85
|
+
srcPath: "/_api/shoutout/v1/campaign-validation",
|
|
86
|
+
destPath: "/v1/campaign-validation"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"*.dev.wix-code.com": [
|
|
90
|
+
{
|
|
91
|
+
srcPath: "/email-marketing/v1/campaign-validation/validate-html-links",
|
|
92
|
+
destPath: "/v1/campaign-validation/validate-html-links"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
srcPath: "/email-marketing/v1/campaign-validation/validate-link",
|
|
96
|
+
destPath: "/v1/campaign-validation/validate-link"
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
_: [
|
|
100
|
+
{
|
|
101
|
+
srcPath: "/email-marketing/v1/campaign-validation/validate-html-links",
|
|
102
|
+
destPath: "/v1/campaign-validation/validate-html-links"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
srcPath: "/email-marketing/v1/campaign-validation/validate-link",
|
|
106
|
+
destPath: "/v1/campaign-validation/validate-link"
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
};
|
|
110
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
111
|
+
}
|
|
112
|
+
function resolveWixEmailmarketingApiV1CampaignServiceUrl(opts) {
|
|
76
113
|
const domainToMappings = {
|
|
77
114
|
"manage._base_domain_": [
|
|
78
115
|
{
|
|
@@ -165,44 +202,7 @@ function resolveWixEmailmarketingApiV1CampaignStatisticsServiceUrl(opts) {
|
|
|
165
202
|
};
|
|
166
203
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
167
204
|
}
|
|
168
|
-
function
|
|
169
|
-
const domainToMappings = {
|
|
170
|
-
"www.wixapis.com": [
|
|
171
|
-
{
|
|
172
|
-
srcPath: "/email-marketing/v1/campaign-validation",
|
|
173
|
-
destPath: "/v1/campaign-validation"
|
|
174
|
-
}
|
|
175
|
-
],
|
|
176
|
-
"manage._base_domain_": [
|
|
177
|
-
{
|
|
178
|
-
srcPath: "/_api/shoutout/v1/campaign-validation",
|
|
179
|
-
destPath: "/v1/campaign-validation"
|
|
180
|
-
}
|
|
181
|
-
],
|
|
182
|
-
"*.dev.wix-code.com": [
|
|
183
|
-
{
|
|
184
|
-
srcPath: "/email-marketing/v1/campaign-validation/validate-html-links",
|
|
185
|
-
destPath: "/v1/campaign-validation/validate-html-links"
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
srcPath: "/email-marketing/v1/campaign-validation/validate-link",
|
|
189
|
-
destPath: "/v1/campaign-validation/validate-link"
|
|
190
|
-
}
|
|
191
|
-
],
|
|
192
|
-
_: [
|
|
193
|
-
{
|
|
194
|
-
srcPath: "/email-marketing/v1/campaign-validation/validate-html-links",
|
|
195
|
-
destPath: "/v1/campaign-validation/validate-html-links"
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
srcPath: "/email-marketing/v1/campaign-validation/validate-link",
|
|
199
|
-
destPath: "/v1/campaign-validation/validate-link"
|
|
200
|
-
}
|
|
201
|
-
]
|
|
202
|
-
};
|
|
203
|
-
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
204
|
-
}
|
|
205
|
-
function resolveWixEmailmarketingApiV1CampaignServiceUrl(opts) {
|
|
205
|
+
function resolveWixEmailmarketingApiV1CampaignStatisticsServiceUrl(opts) {
|
|
206
206
|
const domainToMappings = {
|
|
207
207
|
"manage._base_domain_": [
|
|
208
208
|
{
|
|
@@ -296,6 +296,54 @@ function resolveWixEmailmarketingApiV1CampaignServiceUrl(opts) {
|
|
|
296
296
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
297
297
|
}
|
|
298
298
|
var PACKAGE_NAME = "@wix/auto_sdk_email-marketing_campaigns";
|
|
299
|
+
function listStatistics(payload) {
|
|
300
|
+
function __listStatistics({ host }) {
|
|
301
|
+
const metadata = {
|
|
302
|
+
entityFqdn: "wix.email_marketing.v1.campaign",
|
|
303
|
+
method: "GET",
|
|
304
|
+
methodFqn: "wix.emailmarketing.api.v1.CampaignStatisticsService.ListStatistics",
|
|
305
|
+
packageName: PACKAGE_NAME,
|
|
306
|
+
migrationOptions: {
|
|
307
|
+
optInTransformResponse: true
|
|
308
|
+
},
|
|
309
|
+
url: resolveWixEmailmarketingApiV1CampaignStatisticsServiceUrl({
|
|
310
|
+
protoPath: "/v1/campaigns/statistics",
|
|
311
|
+
data: payload,
|
|
312
|
+
host
|
|
313
|
+
}),
|
|
314
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
315
|
+
};
|
|
316
|
+
return metadata;
|
|
317
|
+
}
|
|
318
|
+
return __listStatistics;
|
|
319
|
+
}
|
|
320
|
+
function listRecipients(payload) {
|
|
321
|
+
function __listRecipients({ host }) {
|
|
322
|
+
const metadata = {
|
|
323
|
+
entityFqdn: "wix.email_marketing.v1.campaign",
|
|
324
|
+
method: "GET",
|
|
325
|
+
methodFqn: "wix.emailmarketing.api.v1.CampaignStatisticsService.ListRecipients",
|
|
326
|
+
packageName: PACKAGE_NAME,
|
|
327
|
+
migrationOptions: {
|
|
328
|
+
optInTransformResponse: true
|
|
329
|
+
},
|
|
330
|
+
url: resolveWixEmailmarketingApiV1CampaignStatisticsServiceUrl({
|
|
331
|
+
protoPath: "/v1/campaigns/{campaignId}/statistics/recipients",
|
|
332
|
+
data: payload,
|
|
333
|
+
host
|
|
334
|
+
}),
|
|
335
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
336
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
337
|
+
{
|
|
338
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
339
|
+
paths: [{ path: "recipients.lastActivityDate" }]
|
|
340
|
+
}
|
|
341
|
+
])
|
|
342
|
+
};
|
|
343
|
+
return metadata;
|
|
344
|
+
}
|
|
345
|
+
return __listRecipients;
|
|
346
|
+
}
|
|
299
347
|
function get(payload) {
|
|
300
348
|
function __get({ host }) {
|
|
301
349
|
const metadata = {
|
|
@@ -611,54 +659,6 @@ function validateHtmlLinks(payload) {
|
|
|
611
659
|
}
|
|
612
660
|
return __validateHtmlLinks;
|
|
613
661
|
}
|
|
614
|
-
function listStatistics(payload) {
|
|
615
|
-
function __listStatistics({ host }) {
|
|
616
|
-
const metadata = {
|
|
617
|
-
entityFqdn: "wix.email_marketing.v1.campaign",
|
|
618
|
-
method: "GET",
|
|
619
|
-
methodFqn: "wix.emailmarketing.api.v1.CampaignStatisticsService.ListStatistics",
|
|
620
|
-
packageName: PACKAGE_NAME,
|
|
621
|
-
migrationOptions: {
|
|
622
|
-
optInTransformResponse: true
|
|
623
|
-
},
|
|
624
|
-
url: resolveWixEmailmarketingApiV1CampaignStatisticsServiceUrl({
|
|
625
|
-
protoPath: "/v1/campaigns/statistics",
|
|
626
|
-
data: payload,
|
|
627
|
-
host
|
|
628
|
-
}),
|
|
629
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
630
|
-
};
|
|
631
|
-
return metadata;
|
|
632
|
-
}
|
|
633
|
-
return __listStatistics;
|
|
634
|
-
}
|
|
635
|
-
function listRecipients(payload) {
|
|
636
|
-
function __listRecipients({ host }) {
|
|
637
|
-
const metadata = {
|
|
638
|
-
entityFqdn: "wix.email_marketing.v1.campaign",
|
|
639
|
-
method: "GET",
|
|
640
|
-
methodFqn: "wix.emailmarketing.api.v1.CampaignStatisticsService.ListRecipients",
|
|
641
|
-
packageName: PACKAGE_NAME,
|
|
642
|
-
migrationOptions: {
|
|
643
|
-
optInTransformResponse: true
|
|
644
|
-
},
|
|
645
|
-
url: resolveWixEmailmarketingApiV1CampaignStatisticsServiceUrl({
|
|
646
|
-
protoPath: "/v1/campaigns/{campaignId}/statistics/recipients",
|
|
647
|
-
data: payload,
|
|
648
|
-
host
|
|
649
|
-
}),
|
|
650
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
651
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
652
|
-
{
|
|
653
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
654
|
-
paths: [{ path: "recipients.lastActivityDate" }]
|
|
655
|
-
}
|
|
656
|
-
])
|
|
657
|
-
};
|
|
658
|
-
return metadata;
|
|
659
|
-
}
|
|
660
|
-
return __listRecipients;
|
|
661
|
-
}
|
|
662
662
|
|
|
663
663
|
// src/email-marketing-v1-campaign-campaigns.universal.ts
|
|
664
664
|
var CampaignEditorTypeEnum = /* @__PURE__ */ ((CampaignEditorTypeEnum2) => {
|
|
@@ -734,6 +734,17 @@ var CampaignTypeEnum = /* @__PURE__ */ ((CampaignTypeEnum2) => {
|
|
|
734
734
|
CampaignTypeEnum2["TRIGGERED"] = "TRIGGERED";
|
|
735
735
|
return CampaignTypeEnum2;
|
|
736
736
|
})(CampaignTypeEnum || {});
|
|
737
|
+
var RecipientsActivityEnum = /* @__PURE__ */ ((RecipientsActivityEnum2) => {
|
|
738
|
+
RecipientsActivityEnum2["UNKNOWN"] = "UNKNOWN";
|
|
739
|
+
RecipientsActivityEnum2["DELIVERED"] = "DELIVERED";
|
|
740
|
+
RecipientsActivityEnum2["OPENED"] = "OPENED";
|
|
741
|
+
RecipientsActivityEnum2["CLICKED"] = "CLICKED";
|
|
742
|
+
RecipientsActivityEnum2["BOUNCED"] = "BOUNCED";
|
|
743
|
+
RecipientsActivityEnum2["NOT_SENT"] = "NOT_SENT";
|
|
744
|
+
RecipientsActivityEnum2["SENT"] = "SENT";
|
|
745
|
+
RecipientsActivityEnum2["NOT_OPENED"] = "NOT_OPENED";
|
|
746
|
+
return RecipientsActivityEnum2;
|
|
747
|
+
})(RecipientsActivityEnum || {});
|
|
737
748
|
var ActivityType = /* @__PURE__ */ ((ActivityType2) => {
|
|
738
749
|
ActivityType2["DELIVERY"] = "DELIVERY";
|
|
739
750
|
ActivityType2["CLICK"] = "CLICK";
|
|
@@ -750,17 +761,62 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
750
761
|
WebhookIdentityType2["APP"] = "APP";
|
|
751
762
|
return WebhookIdentityType2;
|
|
752
763
|
})(WebhookIdentityType || {});
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
+
async function listStatistics2(campaignIds) {
|
|
765
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
766
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
767
|
+
campaignIds
|
|
768
|
+
});
|
|
769
|
+
const reqOpts = listStatistics(payload);
|
|
770
|
+
sideEffects?.onSiteCall?.();
|
|
771
|
+
try {
|
|
772
|
+
const result = await httpClient.request(reqOpts);
|
|
773
|
+
sideEffects?.onSuccess?.(result);
|
|
774
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
775
|
+
} catch (err) {
|
|
776
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
777
|
+
err,
|
|
778
|
+
{
|
|
779
|
+
spreadPathsToArguments: {},
|
|
780
|
+
explicitPathsToArguments: { campaignIds: "$[0]" },
|
|
781
|
+
singleArgumentUnchanged: false
|
|
782
|
+
},
|
|
783
|
+
["campaignIds"]
|
|
784
|
+
);
|
|
785
|
+
sideEffects?.onError?.(err);
|
|
786
|
+
throw transformedError;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
async function listRecipients2(campaignId, activity, options) {
|
|
790
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
791
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
792
|
+
campaignId,
|
|
793
|
+
activity,
|
|
794
|
+
paging: options?.paging
|
|
795
|
+
});
|
|
796
|
+
const reqOpts = listRecipients(payload);
|
|
797
|
+
sideEffects?.onSiteCall?.();
|
|
798
|
+
try {
|
|
799
|
+
const result = await httpClient.request(reqOpts);
|
|
800
|
+
sideEffects?.onSuccess?.(result);
|
|
801
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
802
|
+
} catch (err) {
|
|
803
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
804
|
+
err,
|
|
805
|
+
{
|
|
806
|
+
spreadPathsToArguments: {},
|
|
807
|
+
explicitPathsToArguments: {
|
|
808
|
+
campaignId: "$[0]",
|
|
809
|
+
activity: "$[1]",
|
|
810
|
+
paging: "$[2].paging"
|
|
811
|
+
},
|
|
812
|
+
singleArgumentUnchanged: false
|
|
813
|
+
},
|
|
814
|
+
["campaignId", "activity", "options"]
|
|
815
|
+
);
|
|
816
|
+
sideEffects?.onError?.(err);
|
|
817
|
+
throw transformedError;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
764
820
|
async function getCampaign(campaignId, options) {
|
|
765
821
|
const { httpClient, sideEffects } = arguments[2];
|
|
766
822
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1076,64 +1132,24 @@ async function validateHtmlLinks2(html) {
|
|
|
1076
1132
|
throw transformedError;
|
|
1077
1133
|
}
|
|
1078
1134
|
}
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
const result = await httpClient.request(reqOpts);
|
|
1088
|
-
sideEffects?.onSuccess?.(result);
|
|
1089
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1090
|
-
} catch (err) {
|
|
1091
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
1092
|
-
err,
|
|
1093
|
-
{
|
|
1094
|
-
spreadPathsToArguments: {},
|
|
1095
|
-
explicitPathsToArguments: { campaignIds: "$[0]" },
|
|
1096
|
-
singleArgumentUnchanged: false
|
|
1097
|
-
},
|
|
1098
|
-
["campaignIds"]
|
|
1099
|
-
);
|
|
1100
|
-
sideEffects?.onError?.(err);
|
|
1101
|
-
throw transformedError;
|
|
1102
|
-
}
|
|
1135
|
+
|
|
1136
|
+
// src/email-marketing-v1-campaign-campaigns.public.ts
|
|
1137
|
+
function listStatistics3(httpClient) {
|
|
1138
|
+
return (campaignIds) => listStatistics2(
|
|
1139
|
+
campaignIds,
|
|
1140
|
+
// @ts-ignore
|
|
1141
|
+
{ httpClient }
|
|
1142
|
+
);
|
|
1103
1143
|
}
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1144
|
+
function listRecipients3(httpClient) {
|
|
1145
|
+
return (campaignId, activity, options) => listRecipients2(
|
|
1107
1146
|
campaignId,
|
|
1108
1147
|
activity,
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
try {
|
|
1114
|
-
const result = await httpClient.request(reqOpts);
|
|
1115
|
-
sideEffects?.onSuccess?.(result);
|
|
1116
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1117
|
-
} catch (err) {
|
|
1118
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
1119
|
-
err,
|
|
1120
|
-
{
|
|
1121
|
-
spreadPathsToArguments: {},
|
|
1122
|
-
explicitPathsToArguments: {
|
|
1123
|
-
campaignId: "$[0]",
|
|
1124
|
-
activity: "$[1]",
|
|
1125
|
-
paging: "$[2].paging"
|
|
1126
|
-
},
|
|
1127
|
-
singleArgumentUnchanged: false
|
|
1128
|
-
},
|
|
1129
|
-
["campaignId", "activity", "options"]
|
|
1130
|
-
);
|
|
1131
|
-
sideEffects?.onError?.(err);
|
|
1132
|
-
throw transformedError;
|
|
1133
|
-
}
|
|
1148
|
+
options,
|
|
1149
|
+
// @ts-ignore
|
|
1150
|
+
{ httpClient }
|
|
1151
|
+
);
|
|
1134
1152
|
}
|
|
1135
|
-
|
|
1136
|
-
// src/email-marketing-v1-campaign-campaigns.public.ts
|
|
1137
1153
|
function getCampaign2(httpClient) {
|
|
1138
1154
|
return (campaignId, options) => getCampaign(
|
|
1139
1155
|
campaignId,
|
|
@@ -1222,22 +1238,6 @@ function validateHtmlLinks3(httpClient) {
|
|
|
1222
1238
|
{ httpClient }
|
|
1223
1239
|
);
|
|
1224
1240
|
}
|
|
1225
|
-
function listStatistics3(httpClient) {
|
|
1226
|
-
return (campaignIds) => listStatistics2(
|
|
1227
|
-
campaignIds,
|
|
1228
|
-
// @ts-ignore
|
|
1229
|
-
{ httpClient }
|
|
1230
|
-
);
|
|
1231
|
-
}
|
|
1232
|
-
function listRecipients3(httpClient) {
|
|
1233
|
-
return (campaignId, activity, options) => listRecipients2(
|
|
1234
|
-
campaignId,
|
|
1235
|
-
activity,
|
|
1236
|
-
options,
|
|
1237
|
-
// @ts-ignore
|
|
1238
|
-
{ httpClient }
|
|
1239
|
-
);
|
|
1240
|
-
}
|
|
1241
1241
|
var onCampaignDistributedEvent = (0, import_sdk_types.EventDefinition)(
|
|
1242
1242
|
"wix.email_marketing.v1.campaign_campaign_distributed_event",
|
|
1243
1243
|
true,
|
|
@@ -1362,6 +1362,8 @@ var onCampaignEmailActivityUpdated = (0, import_sdk_types.EventDefinition)(
|
|
|
1362
1362
|
// src/email-marketing-v1-campaign-campaigns.context.ts
|
|
1363
1363
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
1364
1364
|
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
1365
|
+
var listStatistics4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listStatistics3);
|
|
1366
|
+
var listRecipients4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listRecipients3);
|
|
1365
1367
|
var getCampaign3 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getCampaign2);
|
|
1366
1368
|
var listCampaigns3 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listCampaigns2);
|
|
1367
1369
|
var publishCampaign3 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(publishCampaign2);
|
|
@@ -1374,8 +1376,6 @@ var getAudience4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(ge
|
|
|
1374
1376
|
var identifySenderAddress4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(identifySenderAddress3);
|
|
1375
1377
|
var validateLink4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(validateLink3);
|
|
1376
1378
|
var validateHtmlLinks4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(validateHtmlLinks3);
|
|
1377
|
-
var listStatistics4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listStatistics3);
|
|
1378
|
-
var listRecipients4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listRecipients3);
|
|
1379
1379
|
var onCampaignDistributedEvent2 = (0, import_event_definition_modules.createEventModule)(
|
|
1380
1380
|
onCampaignDistributedEvent
|
|
1381
1381
|
);
|