@wix/auto_sdk_email-marketing_campaigns 1.0.73 → 1.0.75
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 +554 -536
- package/build/cjs/index.typings.js +154 -154
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +486 -486
- 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 +554 -536
- package/build/es/index.typings.mjs +154 -154
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +486 -486
- 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 +554 -536
- 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 +486 -486
- 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 +554 -536
- 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 +486 -486
- 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,38 +1,7 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
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.js';
|
|
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';
|
|
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
|
*/
|
package/build/cjs/index.js
CHANGED
|
@@ -72,44 +72,7 @@ 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
|
|
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) {
|
|
75
|
+
function resolveWixEmailmarketingApiV1CampaignStatisticsServiceUrl(opts) {
|
|
113
76
|
const domainToMappings = {
|
|
114
77
|
"manage._base_domain_": [
|
|
115
78
|
{
|
|
@@ -202,7 +165,44 @@ function resolveWixEmailmarketingApiV1CampaignServiceUrl(opts) {
|
|
|
202
165
|
};
|
|
203
166
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
204
167
|
}
|
|
205
|
-
function
|
|
168
|
+
function resolveWixEmailmarketingApiV1CampaignValidationServiceUrl(opts) {
|
|
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) {
|
|
206
206
|
const domainToMappings = {
|
|
207
207
|
"manage._base_domain_": [
|
|
208
208
|
{
|
|
@@ -296,54 +296,6 @@ function resolveWixEmailmarketingApiV1CampaignStatisticsServiceUrl(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
|
-
}
|
|
347
299
|
function get(payload) {
|
|
348
300
|
function __get({ host }) {
|
|
349
301
|
const metadata = {
|
|
@@ -659,6 +611,54 @@ function validateHtmlLinks(payload) {
|
|
|
659
611
|
}
|
|
660
612
|
return __validateHtmlLinks;
|
|
661
613
|
}
|
|
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,17 +734,6 @@ 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 || {});
|
|
748
737
|
var ActivityType = /* @__PURE__ */ ((ActivityType2) => {
|
|
749
738
|
ActivityType2["DELIVERY"] = "DELIVERY";
|
|
750
739
|
ActivityType2["CLICK"] = "CLICK";
|
|
@@ -761,62 +750,17 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
761
750
|
WebhookIdentityType2["APP"] = "APP";
|
|
762
751
|
return WebhookIdentityType2;
|
|
763
752
|
})(WebhookIdentityType || {});
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
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
|
-
}
|
|
753
|
+
var RecipientsActivityEnum = /* @__PURE__ */ ((RecipientsActivityEnum2) => {
|
|
754
|
+
RecipientsActivityEnum2["UNKNOWN"] = "UNKNOWN";
|
|
755
|
+
RecipientsActivityEnum2["DELIVERED"] = "DELIVERED";
|
|
756
|
+
RecipientsActivityEnum2["OPENED"] = "OPENED";
|
|
757
|
+
RecipientsActivityEnum2["CLICKED"] = "CLICKED";
|
|
758
|
+
RecipientsActivityEnum2["BOUNCED"] = "BOUNCED";
|
|
759
|
+
RecipientsActivityEnum2["NOT_SENT"] = "NOT_SENT";
|
|
760
|
+
RecipientsActivityEnum2["SENT"] = "SENT";
|
|
761
|
+
RecipientsActivityEnum2["NOT_OPENED"] = "NOT_OPENED";
|
|
762
|
+
return RecipientsActivityEnum2;
|
|
763
|
+
})(RecipientsActivityEnum || {});
|
|
820
764
|
async function getCampaign(campaignId, options) {
|
|
821
765
|
const { httpClient, sideEffects } = arguments[2];
|
|
822
766
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1132,24 +1076,64 @@ async function validateHtmlLinks2(html) {
|
|
|
1132
1076
|
throw transformedError;
|
|
1133
1077
|
}
|
|
1134
1078
|
}
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1079
|
+
async function listStatistics2(campaignIds) {
|
|
1080
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1081
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1082
|
+
campaignIds
|
|
1083
|
+
});
|
|
1084
|
+
const reqOpts = listStatistics(payload);
|
|
1085
|
+
sideEffects?.onSiteCall?.();
|
|
1086
|
+
try {
|
|
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
|
+
}
|
|
1143
1103
|
}
|
|
1144
|
-
function
|
|
1145
|
-
|
|
1104
|
+
async function listRecipients2(campaignId, activity, options) {
|
|
1105
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
1106
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1146
1107
|
campaignId,
|
|
1147
1108
|
activity,
|
|
1148
|
-
options
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
);
|
|
1109
|
+
paging: options?.paging
|
|
1110
|
+
});
|
|
1111
|
+
const reqOpts = listRecipients(payload);
|
|
1112
|
+
sideEffects?.onSiteCall?.();
|
|
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
|
+
}
|
|
1152
1134
|
}
|
|
1135
|
+
|
|
1136
|
+
// src/email-marketing-v1-campaign-campaigns.public.ts
|
|
1153
1137
|
function getCampaign2(httpClient) {
|
|
1154
1138
|
return (campaignId, options) => getCampaign(
|
|
1155
1139
|
campaignId,
|
|
@@ -1238,6 +1222,22 @@ function validateHtmlLinks3(httpClient) {
|
|
|
1238
1222
|
{ httpClient }
|
|
1239
1223
|
);
|
|
1240
1224
|
}
|
|
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,8 +1362,6 @@ 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);
|
|
1367
1365
|
var getCampaign3 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getCampaign2);
|
|
1368
1366
|
var listCampaigns3 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listCampaigns2);
|
|
1369
1367
|
var publishCampaign3 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(publishCampaign2);
|
|
@@ -1376,6 +1374,8 @@ var getAudience4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(ge
|
|
|
1376
1374
|
var identifySenderAddress4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(identifySenderAddress3);
|
|
1377
1375
|
var validateLink4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(validateLink3);
|
|
1378
1376
|
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
|
);
|