@wix/auto_sdk_email-marketing_campaigns 1.0.26 → 1.0.27
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/{internal → cjs}/index.d.ts +64 -37
- package/build/{internal → cjs}/index.js +187 -68
- package/build/cjs/index.js.map +1 -0
- package/build/{email-marketing-v1-campaign-campaigns.universal-DhdBwhrW.d.mts → cjs/index.typings.d.ts} +801 -253
- package/build/cjs/index.typings.js +1048 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/{internal → cjs}/meta.d.ts +137 -112
- package/build/{meta.js → cjs/meta.js} +129 -36
- package/build/cjs/meta.js.map +1 -0
- package/build/{internal → es}/index.d.mts +64 -37
- package/build/{internal → es}/index.mjs +184 -67
- package/build/es/index.mjs.map +1 -0
- package/build/{email-marketing-v1-campaign-campaigns.universal-DhdBwhrW.d.ts → es/index.typings.d.mts} +801 -253
- package/build/es/index.typings.mjs +1001 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/{internal → es}/meta.d.mts +137 -112
- package/build/{internal → es}/meta.mjs +126 -35
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/{index.d.ts → internal/cjs/index.d.ts} +64 -37
- package/build/{index.js → internal/cjs/index.js} +187 -68
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/{email-marketing-v1-campaign-campaigns.universal-DhdBwhrW.d.ts → cjs/index.typings.d.ts} +801 -253
- package/build/internal/cjs/index.typings.js +1048 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/{meta.d.ts → internal/cjs/meta.d.ts} +137 -112
- package/build/internal/{meta.js → cjs/meta.js} +129 -36
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/{index.d.mts → internal/es/index.d.mts} +64 -37
- package/build/{index.mjs → internal/es/index.mjs} +184 -67
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/{email-marketing-v1-campaign-campaigns.universal-DhdBwhrW.d.mts → es/index.typings.d.mts} +801 -253
- package/build/internal/es/index.typings.mjs +1001 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/{meta.d.mts → internal/es/meta.d.mts} +137 -112
- package/build/{meta.mjs → internal/es/meta.mjs} +126 -35
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +11 -11
- package/build/index.js.map +0 -1
- package/build/index.mjs.map +0 -1
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs.map +0 -1
- package/build/internal/meta.js.map +0 -1
- package/build/internal/meta.mjs.map +0 -1
- package/build/meta.js.map +0 -1
- package/build/meta.mjs.map +0 -1
|
@@ -1,7 +1,39 @@
|
|
|
1
|
-
import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
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.js';
|
|
3
|
+
export { ActionEvent, ActivityType, ArchiveCampaignRequest, ArchiveCampaignResponse, Archived, Attachment, AutomationTranslatorContent, BaseEventMetadata, CampaignAudience, CampaignEditorType, CampaignEditorTypeEnum, CampaignRecipientDetails, CampaignSendingStateEnum, CampaignStatistics, CampaignStatisticsContainer, CampaignStatusEnum, CampaignTypeEnum, CampaignVisibilityStatusEnum, 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, 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, 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, _Array } from './index.typings.js';
|
|
4
4
|
|
|
5
|
+
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`;
|
|
6
|
+
declare function listStatistics$1(httpClient: HttpClient): ListStatisticsSignature;
|
|
7
|
+
interface ListStatisticsSignature {
|
|
8
|
+
/**
|
|
9
|
+
* Retrieves a list of statistics for up to 100 selected campaigns.
|
|
10
|
+
*
|
|
11
|
+
* For each campaign, you receive the total activity count for the campaign's landing page and email. For example, the total
|
|
12
|
+
* amount of times the landing page was opened, or the total amount of email recipients that clicked a link in an email.
|
|
13
|
+
*
|
|
14
|
+
* Call List Campaigns to retrieve additional information for a site's campaigns.
|
|
15
|
+
* Call List Recipients to retrieve a list of recipients and their activities related to a selected campaign.
|
|
16
|
+
* @param - IDs of the campaigns to retrieve (max 100 campaigns).
|
|
17
|
+
*/
|
|
18
|
+
(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`>>;
|
|
19
|
+
}
|
|
20
|
+
declare function listRecipients$1(httpClient: HttpClient): ListRecipientsSignature;
|
|
21
|
+
interface ListRecipientsSignature {
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves a list of recipients for a selected campaign based on a specific recipient activity.
|
|
24
|
+
*
|
|
25
|
+
* Pages are returned with a maximum of 1,000 recipients per page and defaults to 40 recipients per page.
|
|
26
|
+
*
|
|
27
|
+
* Call List Statistics to retrieve a list of activity for selected campaigns.
|
|
28
|
+
* Call List Campaigns to retrieve additional information for your campaigns.
|
|
29
|
+
*
|
|
30
|
+
* If no `activity` is included, this method returns an error.
|
|
31
|
+
* @param - Campaign ID.
|
|
32
|
+
* @param - Email activity to filter.
|
|
33
|
+
* @param - Options to use when getting the list of recipients.
|
|
34
|
+
*/
|
|
35
|
+
(campaignId: string, activity: RecipientsActivityEnumWithLiterals, options?: ListRecipientsOptions): Promise<NonNullablePaths<ListRecipientsResponse, `recipients` | `recipients.${number}.contactId` | `recipients.${number}.emailAddress` | `recipients.${number}.contactDeleted`>>;
|
|
36
|
+
}
|
|
5
37
|
declare function getCampaign$1(httpClient: HttpClient): GetCampaignSignature;
|
|
6
38
|
interface GetCampaignSignature {
|
|
7
39
|
/**
|
|
@@ -10,7 +42,7 @@ interface GetCampaignSignature {
|
|
|
10
42
|
* @param - Options to use when getting a campaign.
|
|
11
43
|
* @returns Campaign information.
|
|
12
44
|
*/
|
|
13
|
-
(campaignId: string, options?: GetCampaignOptions
|
|
45
|
+
(campaignId: string, options?: GetCampaignOptions): Promise<NonNullablePaths<Campaign, CampaignNonNullablePaths>>;
|
|
14
46
|
}
|
|
15
47
|
declare function listCampaigns$1(httpClient: HttpClient): ListCampaignsSignature;
|
|
16
48
|
interface ListCampaignsSignature {
|
|
@@ -20,7 +52,9 @@ interface ListCampaignsSignature {
|
|
|
20
52
|
* Default sorts by `dateUpdated` in `DESC` order.
|
|
21
53
|
* @param - Options to use when getting the list of campaigns.
|
|
22
54
|
*/
|
|
23
|
-
(options?: ListCampaignsOptions
|
|
55
|
+
(options?: ListCampaignsOptions): Promise<NonNullablePaths<ListCampaignsResponse, {
|
|
56
|
+
[P in CampaignNonNullablePaths]: `campaigns.${number}.${P}`;
|
|
57
|
+
}[CampaignNonNullablePaths]>>;
|
|
24
58
|
}
|
|
25
59
|
declare function publishCampaign$1(httpClient: HttpClient): PublishCampaignSignature;
|
|
26
60
|
interface PublishCampaignSignature {
|
|
@@ -31,7 +65,9 @@ interface PublishCampaignSignature {
|
|
|
31
65
|
* @param - Campaign ID
|
|
32
66
|
* @param - Options to use when publishing a campaign.
|
|
33
67
|
*/
|
|
34
|
-
(campaignId: string, options?: PublishCampaignOptions
|
|
68
|
+
(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`> & {
|
|
69
|
+
__applicationErrorsType?: PublishCampaignApplicationErrors;
|
|
70
|
+
}>;
|
|
35
71
|
}
|
|
36
72
|
declare function sendTest$1(httpClient: HttpClient): SendTestSignature;
|
|
37
73
|
interface SendTestSignature {
|
|
@@ -42,7 +78,7 @@ interface SendTestSignature {
|
|
|
42
78
|
* @param - Campaign ID.
|
|
43
79
|
* @param - Options for sending a test email.
|
|
44
80
|
*/
|
|
45
|
-
(campaignId: string, options?: SendTestOptions
|
|
81
|
+
(campaignId: string, options?: NonNullablePaths<SendTestOptions, `toEmailAddress`>): Promise<void>;
|
|
46
82
|
}
|
|
47
83
|
declare function pauseScheduling$1(httpClient: HttpClient): PauseSchedulingSignature;
|
|
48
84
|
interface PauseSchedulingSignature {
|
|
@@ -75,7 +111,9 @@ interface ReuseCampaignSignature {
|
|
|
75
111
|
* Creates a copy of an existing campaign.
|
|
76
112
|
* @param - ID of the message to be duplicated.
|
|
77
113
|
*/
|
|
78
|
-
(campaignId: string): Promise<ReuseCampaignResponse
|
|
114
|
+
(campaignId: string): Promise<NonNullablePaths<ReuseCampaignResponse, {
|
|
115
|
+
[P in CampaignNonNullablePaths]: `campaign.${P}`;
|
|
116
|
+
}[CampaignNonNullablePaths]>>;
|
|
79
117
|
}
|
|
80
118
|
declare function getAudience$1(httpClient: HttpClient): GetAudienceSignature;
|
|
81
119
|
interface GetAudienceSignature {
|
|
@@ -83,7 +121,7 @@ interface GetAudienceSignature {
|
|
|
83
121
|
* 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.
|
|
84
122
|
* @param - Campaign ID.
|
|
85
123
|
*/
|
|
86
|
-
(campaignId: string): Promise<GetAudienceResponse
|
|
124
|
+
(campaignId: string): Promise<NonNullablePaths<GetAudienceResponse, `audience.contactIds` | `audience.labelIds` | `audience.segmentIds` | `audience.activeContactsOnly`>>;
|
|
87
125
|
}
|
|
88
126
|
declare function identifySenderAddress$1(httpClient: HttpClient): IdentifySenderAddressSignature;
|
|
89
127
|
interface IdentifySenderAddressSignature {
|
|
@@ -91,38 +129,25 @@ interface IdentifySenderAddressSignature {
|
|
|
91
129
|
* Checks if the sender's email address will be used as the "from" address or will it be replaced and to what exactly.
|
|
92
130
|
* @param - Email address to verify.
|
|
93
131
|
*/
|
|
94
|
-
(emailAddress: string): Promise<IdentifySenderAddressResponse
|
|
132
|
+
(emailAddress: string): Promise<NonNullablePaths<IdentifySenderAddressResponse, `senderAddress`>>;
|
|
95
133
|
}
|
|
96
|
-
declare function
|
|
97
|
-
interface
|
|
134
|
+
declare function validateLink$1(httpClient: HttpClient): ValidateLinkSignature;
|
|
135
|
+
interface ValidateLinkSignature {
|
|
98
136
|
/**
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
* For each campaign, you receive the total activity count for the campaign's landing page and email. For example, the total
|
|
102
|
-
* amount of times the landing page was opened, or the total amount of email recipients that clicked a link in an email.
|
|
137
|
+
* 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.
|
|
103
138
|
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* @param - IDs of the campaigns to retrieve (max 100 campaigns).
|
|
139
|
+
* If you provide a link as a placeholder, it's returned in a response as valid.
|
|
140
|
+
* @param - URL to validate.
|
|
107
141
|
*/
|
|
108
|
-
(
|
|
142
|
+
(url: string): Promise<NonNullablePaths<ValidateLinkResponse, `valid`>>;
|
|
109
143
|
}
|
|
110
|
-
declare function
|
|
111
|
-
interface
|
|
144
|
+
declare function validateHtmlLinks$1(httpClient: HttpClient): ValidateHtmlLinksSignature;
|
|
145
|
+
interface ValidateHtmlLinksSignature {
|
|
112
146
|
/**
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
* Pages are returned with a maximum of 1,000 recipients per page and defaults to 40 recipients per page.
|
|
116
|
-
*
|
|
117
|
-
* Call List Statistics to retrieve a list of activity for selected campaigns.
|
|
118
|
-
* Call List Campaigns to retrieve additional information for your campaigns.
|
|
119
|
-
*
|
|
120
|
-
* If no `activity` is included, this method returns an error.
|
|
121
|
-
* @param - Campaign ID.
|
|
122
|
-
* @param - Email activity to filter.
|
|
123
|
-
* @param - Options to use when getting the list of recipients.
|
|
147
|
+
* 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.
|
|
148
|
+
* @param - HTML string with links.
|
|
124
149
|
*/
|
|
125
|
-
(
|
|
150
|
+
(html: string): Promise<NonNullablePaths<ValidateHtmlLinksResponse, `blacklistedLinks`>>;
|
|
126
151
|
}
|
|
127
152
|
declare const onCampaignDistributedEvent$1: EventDefinition<CampaignDistributedEnvelope, "wix.email_marketing.v1.campaign_campaign_distributed_event">;
|
|
128
153
|
declare const onCampaignPausedEvent$1: EventDefinition<CampaignPausedEnvelope, "wix.email_marketing.v1.campaign_campaign_paused_event">;
|
|
@@ -134,6 +159,8 @@ declare const onCampaignCreated$1: EventDefinition<CampaignCreatedEnvelope, "wix
|
|
|
134
159
|
declare const onCampaignDeleted$1: EventDefinition<CampaignDeletedEnvelope, "wix.email_marketing.v1.campaign_deleted">;
|
|
135
160
|
declare const onCampaignEmailActivityUpdated$1: EventDefinition<CampaignEmailActivityUpdatedEnvelope, "wix.email_marketing.v1.campaign_email_activity_updated">;
|
|
136
161
|
|
|
162
|
+
declare const listStatistics: MaybeContext<BuildRESTFunction<typeof listStatistics$1> & typeof listStatistics$1>;
|
|
163
|
+
declare const listRecipients: MaybeContext<BuildRESTFunction<typeof listRecipients$1> & typeof listRecipients$1>;
|
|
137
164
|
declare const getCampaign: MaybeContext<BuildRESTFunction<typeof getCampaign$1> & typeof getCampaign$1>;
|
|
138
165
|
declare const listCampaigns: MaybeContext<BuildRESTFunction<typeof listCampaigns$1> & typeof listCampaigns$1>;
|
|
139
166
|
declare const publishCampaign: MaybeContext<BuildRESTFunction<typeof publishCampaign$1> & typeof publishCampaign$1>;
|
|
@@ -144,8 +171,8 @@ declare const deleteCampaign: MaybeContext<BuildRESTFunction<typeof deleteCampai
|
|
|
144
171
|
declare const reuseCampaign: MaybeContext<BuildRESTFunction<typeof reuseCampaign$1> & typeof reuseCampaign$1>;
|
|
145
172
|
declare const getAudience: MaybeContext<BuildRESTFunction<typeof getAudience$1> & typeof getAudience$1>;
|
|
146
173
|
declare const identifySenderAddress: MaybeContext<BuildRESTFunction<typeof identifySenderAddress$1> & typeof identifySenderAddress$1>;
|
|
147
|
-
declare const
|
|
148
|
-
declare const
|
|
174
|
+
declare const validateLink: MaybeContext<BuildRESTFunction<typeof validateLink$1> & typeof validateLink$1>;
|
|
175
|
+
declare const validateHtmlLinks: MaybeContext<BuildRESTFunction<typeof validateHtmlLinks$1> & typeof validateHtmlLinks$1>;
|
|
149
176
|
/**
|
|
150
177
|
* Triggered when a campaign is successfully distributed to all recipients.
|
|
151
178
|
*/
|
|
@@ -183,4 +210,4 @@ declare const onCampaignDeleted: BuildEventDefinition<typeof onCampaignDeleted$1
|
|
|
183
210
|
*/
|
|
184
211
|
declare const onCampaignEmailActivityUpdated: BuildEventDefinition<typeof onCampaignEmailActivityUpdated$1>;
|
|
185
212
|
|
|
186
|
-
export { Campaign, CampaignCreatedEnvelope, CampaignDeletedEnvelope, CampaignDistributedEnvelope, CampaignEmailActivityUpdatedEnvelope, CampaignPausedEnvelope, CampaignPublishedEnvelope, CampaignRejectedEnvelope, CampaignScheduledEnvelope, CampaignTerminatedEnvelope, GetAudienceResponse, GetCampaignOptions, IdentifySenderAddressResponse, ListCampaignsOptions, ListCampaignsResponse, ListRecipientsOptions, ListRecipientsResponse, ListStatisticsResponse, PublishCampaignOptions, PublishCampaignResponse, ReuseCampaignResponse, SendTestOptions, deleteCampaign, getAudience, getCampaign, identifySenderAddress, listCampaigns, listRecipients, listStatistics, onCampaignCreated, onCampaignDeleted, onCampaignDistributedEvent, onCampaignEmailActivityUpdated, onCampaignPausedEvent, onCampaignPublishedEvent, onCampaignRejectedEvent, onCampaignScheduledEvent, onCampaignTerminatedEvent, pauseScheduling, publishCampaign, reschedule, reuseCampaign, sendTest };
|
|
213
|
+
export { Campaign, CampaignCreatedEnvelope, CampaignDeletedEnvelope, CampaignDistributedEnvelope, CampaignEmailActivityUpdatedEnvelope, CampaignPausedEnvelope, CampaignPublishedEnvelope, CampaignRejectedEnvelope, CampaignScheduledEnvelope, CampaignTerminatedEnvelope, GetAudienceResponse, GetCampaignOptions, IdentifySenderAddressResponse, ListCampaignsOptions, ListCampaignsResponse, ListRecipientsOptions, ListRecipientsResponse, ListStatisticsResponse, PublishCampaignOptions, PublishCampaignResponse, ReuseCampaignResponse, SendTestOptions, ValidateHtmlLinksResponse, ValidateLinkResponse, deleteCampaign, getAudience, getCampaign, identifySenderAddress, listCampaigns, listRecipients, listStatistics, onCampaignCreated, onCampaignDeleted, onCampaignDistributedEvent, onCampaignEmailActivityUpdated, onCampaignPausedEvent, onCampaignPublishedEvent, onCampaignRejectedEvent, onCampaignScheduledEvent, onCampaignTerminatedEvent, pauseScheduling, publishCampaign, reschedule, reuseCampaign, sendTest, validateHtmlLinks, validateLink };
|
|
@@ -50,7 +50,9 @@ __export(index_exports, {
|
|
|
50
50
|
publishCampaign: () => publishCampaign3,
|
|
51
51
|
reschedule: () => reschedule4,
|
|
52
52
|
reuseCampaign: () => reuseCampaign3,
|
|
53
|
-
sendTest: () => sendTest4
|
|
53
|
+
sendTest: () => sendTest4,
|
|
54
|
+
validateHtmlLinks: () => validateHtmlLinks4,
|
|
55
|
+
validateLink: () => validateLink4
|
|
54
56
|
});
|
|
55
57
|
module.exports = __toCommonJS(index_exports);
|
|
56
58
|
|
|
@@ -70,7 +72,24 @@ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
|
70
72
|
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
71
73
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
72
74
|
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
73
|
-
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
|
+
};
|
|
90
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
91
|
+
}
|
|
92
|
+
function resolveWixEmailmarketingApiV1CampaignServiceUrl(opts) {
|
|
74
93
|
const domainToMappings = {
|
|
75
94
|
"manage._base_domain_": [
|
|
76
95
|
{
|
|
@@ -145,7 +164,7 @@ function resolveWixEmailmarketingApiV1CampaignStatisticsServiceUrl(opts) {
|
|
|
145
164
|
};
|
|
146
165
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
147
166
|
}
|
|
148
|
-
function
|
|
167
|
+
function resolveWixEmailmarketingApiV1CampaignStatisticsServiceUrl(opts) {
|
|
149
168
|
const domainToMappings = {
|
|
150
169
|
"manage._base_domain_": [
|
|
151
170
|
{
|
|
@@ -221,6 +240,48 @@ function resolveWixEmailmarketingApiV1CampaignServiceUrl(opts) {
|
|
|
221
240
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
222
241
|
}
|
|
223
242
|
var PACKAGE_NAME = "@wix/auto_sdk_email-marketing_campaigns";
|
|
243
|
+
function listStatistics(payload) {
|
|
244
|
+
function __listStatistics({ host }) {
|
|
245
|
+
const metadata = {
|
|
246
|
+
entityFqdn: "wix.email_marketing.v1.campaign",
|
|
247
|
+
method: "GET",
|
|
248
|
+
methodFqn: "wix.emailmarketing.api.v1.CampaignStatisticsService.ListStatistics",
|
|
249
|
+
packageName: PACKAGE_NAME,
|
|
250
|
+
url: resolveWixEmailmarketingApiV1CampaignStatisticsServiceUrl({
|
|
251
|
+
protoPath: "/v1/campaigns/statistics",
|
|
252
|
+
data: payload,
|
|
253
|
+
host
|
|
254
|
+
}),
|
|
255
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
256
|
+
};
|
|
257
|
+
return metadata;
|
|
258
|
+
}
|
|
259
|
+
return __listStatistics;
|
|
260
|
+
}
|
|
261
|
+
function listRecipients(payload) {
|
|
262
|
+
function __listRecipients({ host }) {
|
|
263
|
+
const metadata = {
|
|
264
|
+
entityFqdn: "wix.email_marketing.v1.campaign",
|
|
265
|
+
method: "GET",
|
|
266
|
+
methodFqn: "wix.emailmarketing.api.v1.CampaignStatisticsService.ListRecipients",
|
|
267
|
+
packageName: PACKAGE_NAME,
|
|
268
|
+
url: resolveWixEmailmarketingApiV1CampaignStatisticsServiceUrl({
|
|
269
|
+
protoPath: "/v1/campaigns/{campaignId}/statistics/recipients",
|
|
270
|
+
data: payload,
|
|
271
|
+
host
|
|
272
|
+
}),
|
|
273
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
274
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
275
|
+
{
|
|
276
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
277
|
+
paths: [{ path: "recipients.lastActivityDate" }]
|
|
278
|
+
}
|
|
279
|
+
])
|
|
280
|
+
};
|
|
281
|
+
return metadata;
|
|
282
|
+
}
|
|
283
|
+
return __listRecipients;
|
|
284
|
+
}
|
|
224
285
|
function get(payload) {
|
|
225
286
|
function __get({ host }) {
|
|
226
287
|
const metadata = {
|
|
@@ -464,47 +525,41 @@ function identifySenderAddress(payload) {
|
|
|
464
525
|
}
|
|
465
526
|
return __identifySenderAddress;
|
|
466
527
|
}
|
|
467
|
-
function
|
|
468
|
-
function
|
|
528
|
+
function validateLink(payload) {
|
|
529
|
+
function __validateLink({ host }) {
|
|
469
530
|
const metadata = {
|
|
470
531
|
entityFqdn: "wix.email_marketing.v1.campaign",
|
|
471
|
-
method: "
|
|
472
|
-
methodFqn: "wix.emailmarketing.api.v1.
|
|
532
|
+
method: "POST",
|
|
533
|
+
methodFqn: "wix.emailmarketing.api.v1.CampaignValidationService.ValidateLink",
|
|
473
534
|
packageName: PACKAGE_NAME,
|
|
474
|
-
url:
|
|
475
|
-
protoPath: "/v1/
|
|
535
|
+
url: resolveWixEmailmarketingApiV1CampaignValidationServiceUrl({
|
|
536
|
+
protoPath: "/v1/campaign-validation/validate-link",
|
|
476
537
|
data: payload,
|
|
477
538
|
host
|
|
478
539
|
}),
|
|
479
|
-
|
|
540
|
+
data: payload
|
|
480
541
|
};
|
|
481
542
|
return metadata;
|
|
482
543
|
}
|
|
483
|
-
return
|
|
544
|
+
return __validateLink;
|
|
484
545
|
}
|
|
485
|
-
function
|
|
486
|
-
function
|
|
546
|
+
function validateHtmlLinks(payload) {
|
|
547
|
+
function __validateHtmlLinks({ host }) {
|
|
487
548
|
const metadata = {
|
|
488
549
|
entityFqdn: "wix.email_marketing.v1.campaign",
|
|
489
|
-
method: "
|
|
490
|
-
methodFqn: "wix.emailmarketing.api.v1.
|
|
550
|
+
method: "POST",
|
|
551
|
+
methodFqn: "wix.emailmarketing.api.v1.CampaignValidationService.ValidateHtmlLinks",
|
|
491
552
|
packageName: PACKAGE_NAME,
|
|
492
|
-
url:
|
|
493
|
-
protoPath: "/v1/
|
|
553
|
+
url: resolveWixEmailmarketingApiV1CampaignValidationServiceUrl({
|
|
554
|
+
protoPath: "/v1/campaign-validation/validate-html-links",
|
|
494
555
|
data: payload,
|
|
495
556
|
host
|
|
496
557
|
}),
|
|
497
|
-
|
|
498
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
499
|
-
{
|
|
500
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
501
|
-
paths: [{ path: "recipients.lastActivityDate" }]
|
|
502
|
-
}
|
|
503
|
-
])
|
|
558
|
+
data: payload
|
|
504
559
|
};
|
|
505
560
|
return metadata;
|
|
506
561
|
}
|
|
507
|
-
return
|
|
562
|
+
return __validateHtmlLinks;
|
|
508
563
|
}
|
|
509
564
|
|
|
510
565
|
// src/email-marketing-v1-campaign-campaigns.universal.ts
|
|
@@ -580,6 +635,17 @@ var CampaignTypeEnum = /* @__PURE__ */ ((CampaignTypeEnum2) => {
|
|
|
580
635
|
CampaignTypeEnum2["TRIGGERED"] = "TRIGGERED";
|
|
581
636
|
return CampaignTypeEnum2;
|
|
582
637
|
})(CampaignTypeEnum || {});
|
|
638
|
+
var RecipientsActivityEnum = /* @__PURE__ */ ((RecipientsActivityEnum2) => {
|
|
639
|
+
RecipientsActivityEnum2["UNKNOWN"] = "UNKNOWN";
|
|
640
|
+
RecipientsActivityEnum2["DELIVERED"] = "DELIVERED";
|
|
641
|
+
RecipientsActivityEnum2["OPENED"] = "OPENED";
|
|
642
|
+
RecipientsActivityEnum2["CLICKED"] = "CLICKED";
|
|
643
|
+
RecipientsActivityEnum2["BOUNCED"] = "BOUNCED";
|
|
644
|
+
RecipientsActivityEnum2["NOT_SENT"] = "NOT_SENT";
|
|
645
|
+
RecipientsActivityEnum2["SENT"] = "SENT";
|
|
646
|
+
RecipientsActivityEnum2["NOT_OPENED"] = "NOT_OPENED";
|
|
647
|
+
return RecipientsActivityEnum2;
|
|
648
|
+
})(RecipientsActivityEnum || {});
|
|
583
649
|
var ActivityType = /* @__PURE__ */ ((ActivityType2) => {
|
|
584
650
|
ActivityType2["DELIVERY"] = "DELIVERY";
|
|
585
651
|
ActivityType2["CLICK"] = "CLICK";
|
|
@@ -596,17 +662,62 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
596
662
|
WebhookIdentityType2["APP"] = "APP";
|
|
597
663
|
return WebhookIdentityType2;
|
|
598
664
|
})(WebhookIdentityType || {});
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
665
|
+
async function listStatistics2(campaignIds) {
|
|
666
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
667
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
668
|
+
campaignIds
|
|
669
|
+
});
|
|
670
|
+
const reqOpts = listStatistics(payload);
|
|
671
|
+
sideEffects?.onSiteCall?.();
|
|
672
|
+
try {
|
|
673
|
+
const result = await httpClient.request(reqOpts);
|
|
674
|
+
sideEffects?.onSuccess?.(result);
|
|
675
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
676
|
+
} catch (err) {
|
|
677
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
678
|
+
err,
|
|
679
|
+
{
|
|
680
|
+
spreadPathsToArguments: {},
|
|
681
|
+
explicitPathsToArguments: { campaignIds: "$[0]" },
|
|
682
|
+
singleArgumentUnchanged: false
|
|
683
|
+
},
|
|
684
|
+
["campaignIds"]
|
|
685
|
+
);
|
|
686
|
+
sideEffects?.onError?.(err);
|
|
687
|
+
throw transformedError;
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
async function listRecipients2(campaignId, activity, options) {
|
|
691
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
692
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
693
|
+
campaignId,
|
|
694
|
+
activity,
|
|
695
|
+
paging: options?.paging
|
|
696
|
+
});
|
|
697
|
+
const reqOpts = listRecipients(payload);
|
|
698
|
+
sideEffects?.onSiteCall?.();
|
|
699
|
+
try {
|
|
700
|
+
const result = await httpClient.request(reqOpts);
|
|
701
|
+
sideEffects?.onSuccess?.(result);
|
|
702
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
703
|
+
} catch (err) {
|
|
704
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
705
|
+
err,
|
|
706
|
+
{
|
|
707
|
+
spreadPathsToArguments: {},
|
|
708
|
+
explicitPathsToArguments: {
|
|
709
|
+
campaignId: "$[0]",
|
|
710
|
+
activity: "$[1]",
|
|
711
|
+
paging: "$[2].paging"
|
|
712
|
+
},
|
|
713
|
+
singleArgumentUnchanged: false
|
|
714
|
+
},
|
|
715
|
+
["campaignId", "activity", "options"]
|
|
716
|
+
);
|
|
717
|
+
sideEffects?.onError?.(err);
|
|
718
|
+
throw transformedError;
|
|
719
|
+
}
|
|
720
|
+
}
|
|
610
721
|
async function getCampaign(campaignId, options) {
|
|
611
722
|
const { httpClient, sideEffects } = arguments[2];
|
|
612
723
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -876,12 +987,10 @@ async function identifySenderAddress2(emailAddress) {
|
|
|
876
987
|
throw transformedError;
|
|
877
988
|
}
|
|
878
989
|
}
|
|
879
|
-
async function
|
|
990
|
+
async function validateLink2(url) {
|
|
880
991
|
const { httpClient, sideEffects } = arguments[1];
|
|
881
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
882
|
-
|
|
883
|
-
});
|
|
884
|
-
const reqOpts = listStatistics(payload);
|
|
992
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ url });
|
|
993
|
+
const reqOpts = validateLink(payload);
|
|
885
994
|
sideEffects?.onSiteCall?.();
|
|
886
995
|
try {
|
|
887
996
|
const result = await httpClient.request(reqOpts);
|
|
@@ -892,23 +1001,19 @@ async function listStatistics2(campaignIds) {
|
|
|
892
1001
|
err,
|
|
893
1002
|
{
|
|
894
1003
|
spreadPathsToArguments: {},
|
|
895
|
-
explicitPathsToArguments: {
|
|
1004
|
+
explicitPathsToArguments: { url: "$[0]" },
|
|
896
1005
|
singleArgumentUnchanged: false
|
|
897
1006
|
},
|
|
898
|
-
["
|
|
1007
|
+
["url"]
|
|
899
1008
|
);
|
|
900
1009
|
sideEffects?.onError?.(err);
|
|
901
1010
|
throw transformedError;
|
|
902
1011
|
}
|
|
903
1012
|
}
|
|
904
|
-
async function
|
|
905
|
-
const { httpClient, sideEffects } = arguments[
|
|
906
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
907
|
-
|
|
908
|
-
activity,
|
|
909
|
-
paging: options?.paging
|
|
910
|
-
});
|
|
911
|
-
const reqOpts = listRecipients(payload);
|
|
1013
|
+
async function validateHtmlLinks2(html) {
|
|
1014
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1015
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ html });
|
|
1016
|
+
const reqOpts = validateHtmlLinks(payload);
|
|
912
1017
|
sideEffects?.onSiteCall?.();
|
|
913
1018
|
try {
|
|
914
1019
|
const result = await httpClient.request(reqOpts);
|
|
@@ -919,14 +1024,10 @@ async function listRecipients2(campaignId, activity, options) {
|
|
|
919
1024
|
err,
|
|
920
1025
|
{
|
|
921
1026
|
spreadPathsToArguments: {},
|
|
922
|
-
explicitPathsToArguments: {
|
|
923
|
-
campaignId: "$[0]",
|
|
924
|
-
activity: "$[1]",
|
|
925
|
-
paging: "$[2].paging"
|
|
926
|
-
},
|
|
1027
|
+
explicitPathsToArguments: { html: "$[0]" },
|
|
927
1028
|
singleArgumentUnchanged: false
|
|
928
1029
|
},
|
|
929
|
-
["
|
|
1030
|
+
["html"]
|
|
930
1031
|
);
|
|
931
1032
|
sideEffects?.onError?.(err);
|
|
932
1033
|
throw transformedError;
|
|
@@ -934,6 +1035,22 @@ async function listRecipients2(campaignId, activity, options) {
|
|
|
934
1035
|
}
|
|
935
1036
|
|
|
936
1037
|
// src/email-marketing-v1-campaign-campaigns.public.ts
|
|
1038
|
+
function listStatistics3(httpClient) {
|
|
1039
|
+
return (campaignIds) => listStatistics2(
|
|
1040
|
+
campaignIds,
|
|
1041
|
+
// @ts-ignore
|
|
1042
|
+
{ httpClient }
|
|
1043
|
+
);
|
|
1044
|
+
}
|
|
1045
|
+
function listRecipients3(httpClient) {
|
|
1046
|
+
return (campaignId, activity, options) => listRecipients2(
|
|
1047
|
+
campaignId,
|
|
1048
|
+
activity,
|
|
1049
|
+
options,
|
|
1050
|
+
// @ts-ignore
|
|
1051
|
+
{ httpClient }
|
|
1052
|
+
);
|
|
1053
|
+
}
|
|
937
1054
|
function getCampaign2(httpClient) {
|
|
938
1055
|
return (campaignId, options) => getCampaign(
|
|
939
1056
|
campaignId,
|
|
@@ -1008,18 +1125,16 @@ function identifySenderAddress3(httpClient) {
|
|
|
1008
1125
|
{ httpClient }
|
|
1009
1126
|
);
|
|
1010
1127
|
}
|
|
1011
|
-
function
|
|
1012
|
-
return (
|
|
1013
|
-
|
|
1128
|
+
function validateLink3(httpClient) {
|
|
1129
|
+
return (url) => validateLink2(
|
|
1130
|
+
url,
|
|
1014
1131
|
// @ts-ignore
|
|
1015
1132
|
{ httpClient }
|
|
1016
1133
|
);
|
|
1017
1134
|
}
|
|
1018
|
-
function
|
|
1019
|
-
return (
|
|
1020
|
-
|
|
1021
|
-
activity,
|
|
1022
|
-
options,
|
|
1135
|
+
function validateHtmlLinks3(httpClient) {
|
|
1136
|
+
return (html) => validateHtmlLinks2(
|
|
1137
|
+
html,
|
|
1023
1138
|
// @ts-ignore
|
|
1024
1139
|
{ httpClient }
|
|
1025
1140
|
);
|
|
@@ -1148,6 +1263,8 @@ var onCampaignEmailActivityUpdated = (0, import_sdk_types.EventDefinition)(
|
|
|
1148
1263
|
// src/email-marketing-v1-campaign-campaigns.context.ts
|
|
1149
1264
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
1150
1265
|
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
1266
|
+
var listStatistics4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listStatistics3);
|
|
1267
|
+
var listRecipients4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listRecipients3);
|
|
1151
1268
|
var getCampaign3 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getCampaign2);
|
|
1152
1269
|
var listCampaigns3 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listCampaigns2);
|
|
1153
1270
|
var publishCampaign3 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(publishCampaign2);
|
|
@@ -1158,8 +1275,8 @@ var deleteCampaign3 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)
|
|
|
1158
1275
|
var reuseCampaign3 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(reuseCampaign2);
|
|
1159
1276
|
var getAudience4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAudience3);
|
|
1160
1277
|
var identifySenderAddress4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(identifySenderAddress3);
|
|
1161
|
-
var
|
|
1162
|
-
var
|
|
1278
|
+
var validateLink4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(validateLink3);
|
|
1279
|
+
var validateHtmlLinks4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(validateHtmlLinks3);
|
|
1163
1280
|
var onCampaignDistributedEvent2 = (0, import_event_definition_modules.createEventModule)(onCampaignDistributedEvent);
|
|
1164
1281
|
var onCampaignPausedEvent2 = (0, import_event_definition_modules.createEventModule)(onCampaignPausedEvent);
|
|
1165
1282
|
var onCampaignPublishedEvent2 = (0, import_event_definition_modules.createEventModule)(onCampaignPublishedEvent);
|
|
@@ -1201,6 +1318,8 @@ var onCampaignEmailActivityUpdated2 = (0, import_event_definition_modules.create
|
|
|
1201
1318
|
publishCampaign,
|
|
1202
1319
|
reschedule,
|
|
1203
1320
|
reuseCampaign,
|
|
1204
|
-
sendTest
|
|
1321
|
+
sendTest,
|
|
1322
|
+
validateHtmlLinks,
|
|
1323
|
+
validateLink
|
|
1205
1324
|
});
|
|
1206
1325
|
//# sourceMappingURL=index.js.map
|