hostinger-api-sdk 1.30.8 → 1.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +2 -2
  2. package/api.ts +2234 -982
  3. package/base.ts +1 -1
  4. package/common.ts +1 -1
  5. package/configuration.ts +2 -2
  6. package/dist/api.d.ts +977 -49
  7. package/dist/api.js +683 -9
  8. package/dist/base.d.ts +1 -1
  9. package/dist/base.js +1 -1
  10. package/dist/common.d.ts +1 -1
  11. package/dist/common.js +1 -1
  12. package/dist/configuration.d.ts +1 -1
  13. package/dist/configuration.js +2 -2
  14. package/dist/esm/api.d.ts +977 -49
  15. package/dist/esm/api.js +667 -1
  16. package/dist/esm/base.d.ts +1 -1
  17. package/dist/esm/base.js +1 -1
  18. package/dist/esm/common.d.ts +1 -1
  19. package/dist/esm/common.js +1 -1
  20. package/dist/esm/configuration.d.ts +1 -1
  21. package/dist/esm/configuration.js +2 -2
  22. package/dist/esm/index.d.ts +1 -1
  23. package/dist/esm/index.js +1 -1
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.js +1 -1
  26. package/docs/ReachAutomationsApi.md +187 -0
  27. package/docs/ReachCampaignsApi.md +190 -0
  28. package/docs/ReachListAutomationsV1200Response.md +22 -0
  29. package/docs/ReachListCampaignsV1200Response.md +22 -0
  30. package/docs/ReachV1AutomationsAutomationEventsResource.md +27 -0
  31. package/docs/ReachV1AutomationsAutomationResource.md +34 -0
  32. package/docs/ReachV1AutomationsStepsAutomationStepResource.md +30 -0
  33. package/docs/ReachV1CampaignsCampaignDeliveryResource.md +25 -0
  34. package/docs/ReachV1CampaignsCampaignDetailsResource.md +52 -0
  35. package/docs/ReachV1CampaignsCampaignResource.md +44 -0
  36. package/docs/ReachV1CampaignsCampaignStatisticsResource.md +49 -0
  37. package/docs/ReachV1CampaignsCampaignSummaryStatisticsResource.md +27 -0
  38. package/index.ts +1 -1
  39. package/package.json +1 -1
package/dist/esm/api.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.32.6
6
+ * API Version: 1.34.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -355,6 +355,65 @@ export const MailV1WebhooksWebhookSecretResourceStatusEnum = {
355
355
  Disabled: 'disabled',
356
356
  Paused: 'paused'
357
357
  };
358
+ export const ReachV1AutomationsAutomationResourceStatusEnum = {
359
+ Active: 'active',
360
+ Paused: 'paused',
361
+ Draft: 'draft'
362
+ };
363
+ export const ReachV1AutomationsAutomationResourceTypeEnum = {
364
+ Welcome: 'welcome',
365
+ WelcomeSeries: 'welcome_series',
366
+ PromotionalSeries: 'promotional_series',
367
+ TrustBuildingSeries: 'trust_building_series',
368
+ EcommerceAbandonedCart: 'ecommerce_abandoned_cart',
369
+ EcommerceRecommendAfterPurchase: 'ecommerce_recommend_after_purchase',
370
+ EcommercePostPurchase: 'ecommerce_post_purchase',
371
+ EcommerceDiscountAfterPurchase: 'ecommerce_discount_after_purchase',
372
+ ReEngagementNonOpeners: 're_engagement_non_openers',
373
+ ReEngagementNonClickers: 're_engagement_non_clickers',
374
+ FormSubmitted: 'form_submitted',
375
+ Custom: 'custom'
376
+ };
377
+ export const ReachV1AutomationsStepsAutomationStepResourceTypeEnum = {
378
+ Trigger: 'trigger',
379
+ Action: 'action',
380
+ Conditional: 'conditional'
381
+ };
382
+ export const ReachV1AutomationsStepsAutomationStepResourceValueEnum = {
383
+ NewContact: 'new_contact',
384
+ NewSegmentContact: 'new_segment_contact',
385
+ FormSubmitted: 'form_submitted',
386
+ Webhook: 'webhook',
387
+ SendWelcomeEmail: 'send_welcome_email',
388
+ SendEmail: 'send_email',
389
+ SendCampaign: 'send_campaign',
390
+ Decision: 'decision',
391
+ Delay: 'delay'
392
+ };
393
+ export const ReachV1CampaignsCampaignDetailsResourceStatusEnum = {
394
+ Draft: 'draft',
395
+ Scheduled: 'scheduled',
396
+ Sending: 'sending',
397
+ Publish: 'publish',
398
+ Failed: 'failed'
399
+ };
400
+ export const ReachV1CampaignsCampaignDetailsResourceTypeEnum = {
401
+ Campaign: 'campaign',
402
+ Automation: 'automation',
403
+ DoubleOptIn: 'double_opt_in'
404
+ };
405
+ export const ReachV1CampaignsCampaignResourceStatusEnum = {
406
+ Draft: 'draft',
407
+ Scheduled: 'scheduled',
408
+ Sending: 'sending',
409
+ Publish: 'publish',
410
+ Failed: 'failed'
411
+ };
412
+ export const ReachV1CampaignsCampaignResourceTypeEnum = {
413
+ Campaign: 'campaign',
414
+ Automation: 'automation',
415
+ DoubleOptIn: 'double_opt_in'
416
+ };
358
417
  export const ReachV1ContactsContactDetailsResourceSubscriptionStatusEnum = {
359
418
  Subscribed: 'subscribed',
360
419
  Unsubscribed: 'unsubscribed',
@@ -16100,6 +16159,613 @@ export const ListWebhooksV1StatusEnum = {
16100
16159
  Disabled: 'disabled',
16101
16160
  Paused: 'paused'
16102
16161
  };
16162
+ /**
16163
+ * ReachAutomationsApi - axios parameter creator
16164
+ * @export
16165
+ */
16166
+ export const ReachAutomationsApiAxiosParamCreator = function (configuration) {
16167
+ return {
16168
+ /**
16169
+ * Get a single automation with the counts of contacts that entered it, are moving through it, finished it or failed on the way. This describes the automation itself. To see the workflow it runs, use the steps endpoint.
16170
+ * @summary Get automation details
16171
+ * @param {string} profileUuid Profile uuid parameter
16172
+ * @param {string} automationUuid Automation uuid parameter
16173
+ * @param {*} [options] Override http request option.
16174
+ * @throws {RequiredError}
16175
+ */
16176
+ getAutomationDetailsV1: (profileUuid_1, automationUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, automationUuid_1, ...args_1], void 0, function* (profileUuid, automationUuid, options = {}) {
16177
+ // verify required parameter 'profileUuid' is not null or undefined
16178
+ assertParamExists('getAutomationDetailsV1', 'profileUuid', profileUuid);
16179
+ // verify required parameter 'automationUuid' is not null or undefined
16180
+ assertParamExists('getAutomationDetailsV1', 'automationUuid', automationUuid);
16181
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/automations/{automationUuid}`
16182
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
16183
+ .replace(`{${"automationUuid"}}`, encodeURIComponent(String(automationUuid)));
16184
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
16185
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
16186
+ let baseOptions;
16187
+ if (configuration) {
16188
+ baseOptions = configuration.baseOptions;
16189
+ }
16190
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
16191
+ const localVarHeaderParameter = {};
16192
+ const localVarQueryParameter = {};
16193
+ // authentication apiToken required
16194
+ // http bearer authentication required
16195
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
16196
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
16197
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
16198
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
16199
+ return {
16200
+ url: toPathString(localVarUrlObj),
16201
+ options: localVarRequestOptions,
16202
+ };
16203
+ }),
16204
+ /**
16205
+ * Get the workflow of an automation as a flat list of steps. The steps form a tree rather than a straight line: follow `parent_uuid` to reconstruct the branches, and use `step_order` to order the steps that share a parent. An automation with no steps yet returns an empty list.
16206
+ * @summary List automation steps
16207
+ * @param {string} profileUuid Profile uuid parameter
16208
+ * @param {string} automationUuid Automation uuid parameter
16209
+ * @param {*} [options] Override http request option.
16210
+ * @throws {RequiredError}
16211
+ */
16212
+ listAutomationStepsV1: (profileUuid_1, automationUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, automationUuid_1, ...args_1], void 0, function* (profileUuid, automationUuid, options = {}) {
16213
+ // verify required parameter 'profileUuid' is not null or undefined
16214
+ assertParamExists('listAutomationStepsV1', 'profileUuid', profileUuid);
16215
+ // verify required parameter 'automationUuid' is not null or undefined
16216
+ assertParamExists('listAutomationStepsV1', 'automationUuid', automationUuid);
16217
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/automations/{automationUuid}/steps`
16218
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
16219
+ .replace(`{${"automationUuid"}}`, encodeURIComponent(String(automationUuid)));
16220
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
16221
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
16222
+ let baseOptions;
16223
+ if (configuration) {
16224
+ baseOptions = configuration.baseOptions;
16225
+ }
16226
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
16227
+ const localVarHeaderParameter = {};
16228
+ const localVarQueryParameter = {};
16229
+ // authentication apiToken required
16230
+ // http bearer authentication required
16231
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
16232
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
16233
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
16234
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
16235
+ return {
16236
+ url: toPathString(localVarUrlObj),
16237
+ options: localVarRequestOptions,
16238
+ };
16239
+ }),
16240
+ /**
16241
+ * Get a paginated list of the automations in a profile. Every automation comes with the counts of contacts that entered it, are moving through it, finished it or failed on the way. Those counts describe the contact journey and are not email engagement metrics - for opens, clicks and unsubscribes use the campaign statistics endpoint instead.
16242
+ * @summary List automations
16243
+ * @param {string} profileUuid Profile uuid parameter
16244
+ * @param {ListAutomationsV1StatusEnum} [status] Filter automations by status. There is no `completed` status. An automation that has finished for every contact still reports `active`.
16245
+ * @param {ListAutomationsV1SortDirectionEnum} [sortDirection] Order automations by creation date. Newest first unless set to `asc`.
16246
+ * @param {number} [page] Page number
16247
+ * @param {number} [perPage] Number of items per page
16248
+ * @param {*} [options] Override http request option.
16249
+ * @throws {RequiredError}
16250
+ */
16251
+ listAutomationsV1: (profileUuid_1, status_1, sortDirection_1, page_1, perPage_1, ...args_1) => __awaiter(this, [profileUuid_1, status_1, sortDirection_1, page_1, perPage_1, ...args_1], void 0, function* (profileUuid, status, sortDirection, page, perPage, options = {}) {
16252
+ // verify required parameter 'profileUuid' is not null or undefined
16253
+ assertParamExists('listAutomationsV1', 'profileUuid', profileUuid);
16254
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/automations`
16255
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
16256
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
16257
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
16258
+ let baseOptions;
16259
+ if (configuration) {
16260
+ baseOptions = configuration.baseOptions;
16261
+ }
16262
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
16263
+ const localVarHeaderParameter = {};
16264
+ const localVarQueryParameter = {};
16265
+ // authentication apiToken required
16266
+ // http bearer authentication required
16267
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
16268
+ if (status !== undefined) {
16269
+ localVarQueryParameter['status'] = status;
16270
+ }
16271
+ if (sortDirection !== undefined) {
16272
+ localVarQueryParameter['sort_direction'] = sortDirection;
16273
+ }
16274
+ if (page !== undefined) {
16275
+ localVarQueryParameter['page'] = page;
16276
+ }
16277
+ if (perPage !== undefined) {
16278
+ localVarQueryParameter['per_page'] = perPage;
16279
+ }
16280
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
16281
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
16282
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
16283
+ return {
16284
+ url: toPathString(localVarUrlObj),
16285
+ options: localVarRequestOptions,
16286
+ };
16287
+ }),
16288
+ };
16289
+ };
16290
+ /**
16291
+ * ReachAutomationsApi - functional programming interface
16292
+ * @export
16293
+ */
16294
+ export const ReachAutomationsApiFp = function (configuration) {
16295
+ const localVarAxiosParamCreator = ReachAutomationsApiAxiosParamCreator(configuration);
16296
+ return {
16297
+ /**
16298
+ * Get a single automation with the counts of contacts that entered it, are moving through it, finished it or failed on the way. This describes the automation itself. To see the workflow it runs, use the steps endpoint.
16299
+ * @summary Get automation details
16300
+ * @param {string} profileUuid Profile uuid parameter
16301
+ * @param {string} automationUuid Automation uuid parameter
16302
+ * @param {*} [options] Override http request option.
16303
+ * @throws {RequiredError}
16304
+ */
16305
+ getAutomationDetailsV1(profileUuid, automationUuid, options) {
16306
+ return __awaiter(this, void 0, void 0, function* () {
16307
+ var _a, _b;
16308
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAutomationDetailsV1(profileUuid, automationUuid, options);
16309
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachAutomationsApi.getAutomationDetailsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
16310
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
16311
+ });
16312
+ },
16313
+ /**
16314
+ * Get the workflow of an automation as a flat list of steps. The steps form a tree rather than a straight line: follow `parent_uuid` to reconstruct the branches, and use `step_order` to order the steps that share a parent. An automation with no steps yet returns an empty list.
16315
+ * @summary List automation steps
16316
+ * @param {string} profileUuid Profile uuid parameter
16317
+ * @param {string} automationUuid Automation uuid parameter
16318
+ * @param {*} [options] Override http request option.
16319
+ * @throws {RequiredError}
16320
+ */
16321
+ listAutomationStepsV1(profileUuid, automationUuid, options) {
16322
+ return __awaiter(this, void 0, void 0, function* () {
16323
+ var _a, _b;
16324
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listAutomationStepsV1(profileUuid, automationUuid, options);
16325
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachAutomationsApi.listAutomationStepsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
16326
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
16327
+ });
16328
+ },
16329
+ /**
16330
+ * Get a paginated list of the automations in a profile. Every automation comes with the counts of contacts that entered it, are moving through it, finished it or failed on the way. Those counts describe the contact journey and are not email engagement metrics - for opens, clicks and unsubscribes use the campaign statistics endpoint instead.
16331
+ * @summary List automations
16332
+ * @param {string} profileUuid Profile uuid parameter
16333
+ * @param {ListAutomationsV1StatusEnum} [status] Filter automations by status. There is no `completed` status. An automation that has finished for every contact still reports `active`.
16334
+ * @param {ListAutomationsV1SortDirectionEnum} [sortDirection] Order automations by creation date. Newest first unless set to `asc`.
16335
+ * @param {number} [page] Page number
16336
+ * @param {number} [perPage] Number of items per page
16337
+ * @param {*} [options] Override http request option.
16338
+ * @throws {RequiredError}
16339
+ */
16340
+ listAutomationsV1(profileUuid, status, sortDirection, page, perPage, options) {
16341
+ return __awaiter(this, void 0, void 0, function* () {
16342
+ var _a, _b;
16343
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listAutomationsV1(profileUuid, status, sortDirection, page, perPage, options);
16344
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachAutomationsApi.listAutomationsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
16345
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
16346
+ });
16347
+ },
16348
+ };
16349
+ };
16350
+ /**
16351
+ * ReachAutomationsApi - factory interface
16352
+ * @export
16353
+ */
16354
+ export const ReachAutomationsApiFactory = function (configuration, basePath, axios) {
16355
+ const localVarFp = ReachAutomationsApiFp(configuration);
16356
+ return {
16357
+ /**
16358
+ * Get a single automation with the counts of contacts that entered it, are moving through it, finished it or failed on the way. This describes the automation itself. To see the workflow it runs, use the steps endpoint.
16359
+ * @summary Get automation details
16360
+ * @param {string} profileUuid Profile uuid parameter
16361
+ * @param {string} automationUuid Automation uuid parameter
16362
+ * @param {*} [options] Override http request option.
16363
+ * @throws {RequiredError}
16364
+ */
16365
+ getAutomationDetailsV1(profileUuid, automationUuid, options) {
16366
+ return localVarFp.getAutomationDetailsV1(profileUuid, automationUuid, options).then((request) => request(axios, basePath));
16367
+ },
16368
+ /**
16369
+ * Get the workflow of an automation as a flat list of steps. The steps form a tree rather than a straight line: follow `parent_uuid` to reconstruct the branches, and use `step_order` to order the steps that share a parent. An automation with no steps yet returns an empty list.
16370
+ * @summary List automation steps
16371
+ * @param {string} profileUuid Profile uuid parameter
16372
+ * @param {string} automationUuid Automation uuid parameter
16373
+ * @param {*} [options] Override http request option.
16374
+ * @throws {RequiredError}
16375
+ */
16376
+ listAutomationStepsV1(profileUuid, automationUuid, options) {
16377
+ return localVarFp.listAutomationStepsV1(profileUuid, automationUuid, options).then((request) => request(axios, basePath));
16378
+ },
16379
+ /**
16380
+ * Get a paginated list of the automations in a profile. Every automation comes with the counts of contacts that entered it, are moving through it, finished it or failed on the way. Those counts describe the contact journey and are not email engagement metrics - for opens, clicks and unsubscribes use the campaign statistics endpoint instead.
16381
+ * @summary List automations
16382
+ * @param {string} profileUuid Profile uuid parameter
16383
+ * @param {ListAutomationsV1StatusEnum} [status] Filter automations by status. There is no `completed` status. An automation that has finished for every contact still reports `active`.
16384
+ * @param {ListAutomationsV1SortDirectionEnum} [sortDirection] Order automations by creation date. Newest first unless set to `asc`.
16385
+ * @param {number} [page] Page number
16386
+ * @param {number} [perPage] Number of items per page
16387
+ * @param {*} [options] Override http request option.
16388
+ * @throws {RequiredError}
16389
+ */
16390
+ listAutomationsV1(profileUuid, status, sortDirection, page, perPage, options) {
16391
+ return localVarFp.listAutomationsV1(profileUuid, status, sortDirection, page, perPage, options).then((request) => request(axios, basePath));
16392
+ },
16393
+ };
16394
+ };
16395
+ /**
16396
+ * ReachAutomationsApi - object-oriented interface
16397
+ * @export
16398
+ * @class ReachAutomationsApi
16399
+ * @extends {BaseAPI}
16400
+ */
16401
+ export class ReachAutomationsApi extends BaseAPI {
16402
+ /**
16403
+ * Get a single automation with the counts of contacts that entered it, are moving through it, finished it or failed on the way. This describes the automation itself. To see the workflow it runs, use the steps endpoint.
16404
+ * @summary Get automation details
16405
+ * @param {string} profileUuid Profile uuid parameter
16406
+ * @param {string} automationUuid Automation uuid parameter
16407
+ * @param {*} [options] Override http request option.
16408
+ * @throws {RequiredError}
16409
+ * @memberof ReachAutomationsApi
16410
+ */
16411
+ getAutomationDetailsV1(profileUuid, automationUuid, options) {
16412
+ return ReachAutomationsApiFp(this.configuration).getAutomationDetailsV1(profileUuid, automationUuid, options).then((request) => request(this.axios, this.basePath));
16413
+ }
16414
+ /**
16415
+ * Get the workflow of an automation as a flat list of steps. The steps form a tree rather than a straight line: follow `parent_uuid` to reconstruct the branches, and use `step_order` to order the steps that share a parent. An automation with no steps yet returns an empty list.
16416
+ * @summary List automation steps
16417
+ * @param {string} profileUuid Profile uuid parameter
16418
+ * @param {string} automationUuid Automation uuid parameter
16419
+ * @param {*} [options] Override http request option.
16420
+ * @throws {RequiredError}
16421
+ * @memberof ReachAutomationsApi
16422
+ */
16423
+ listAutomationStepsV1(profileUuid, automationUuid, options) {
16424
+ return ReachAutomationsApiFp(this.configuration).listAutomationStepsV1(profileUuid, automationUuid, options).then((request) => request(this.axios, this.basePath));
16425
+ }
16426
+ /**
16427
+ * Get a paginated list of the automations in a profile. Every automation comes with the counts of contacts that entered it, are moving through it, finished it or failed on the way. Those counts describe the contact journey and are not email engagement metrics - for opens, clicks and unsubscribes use the campaign statistics endpoint instead.
16428
+ * @summary List automations
16429
+ * @param {string} profileUuid Profile uuid parameter
16430
+ * @param {ListAutomationsV1StatusEnum} [status] Filter automations by status. There is no `completed` status. An automation that has finished for every contact still reports `active`.
16431
+ * @param {ListAutomationsV1SortDirectionEnum} [sortDirection] Order automations by creation date. Newest first unless set to `asc`.
16432
+ * @param {number} [page] Page number
16433
+ * @param {number} [perPage] Number of items per page
16434
+ * @param {*} [options] Override http request option.
16435
+ * @throws {RequiredError}
16436
+ * @memberof ReachAutomationsApi
16437
+ */
16438
+ listAutomationsV1(profileUuid, status, sortDirection, page, perPage, options) {
16439
+ return ReachAutomationsApiFp(this.configuration).listAutomationsV1(profileUuid, status, sortDirection, page, perPage, options).then((request) => request(this.axios, this.basePath));
16440
+ }
16441
+ }
16442
+ /**
16443
+ * @export
16444
+ */
16445
+ export const ListAutomationsV1StatusEnum = {
16446
+ Active: 'active',
16447
+ Paused: 'paused',
16448
+ Draft: 'draft'
16449
+ };
16450
+ /**
16451
+ * @export
16452
+ */
16453
+ export const ListAutomationsV1SortDirectionEnum = {
16454
+ Asc: 'asc',
16455
+ Desc: 'desc'
16456
+ };
16457
+ /**
16458
+ * ReachCampaignsApi - axios parameter creator
16459
+ * @export
16460
+ */
16461
+ export const ReachCampaignsApiAxiosParamCreator = function (configuration) {
16462
+ return {
16463
+ /**
16464
+ * Get a single campaign with its sender, subject, template reference, targeting and delivery progress. This describes how the campaign was set up and how far it has got. For opens, clicks and unsubscribes use the campaign statistics endpoint.
16465
+ * @summary Get campaign details
16466
+ * @param {string} profileUuid Profile uuid parameter
16467
+ * @param {string} campaignUuid Campaign uuid parameter
16468
+ * @param {*} [options] Override http request option.
16469
+ * @throws {RequiredError}
16470
+ */
16471
+ getCampaignDetailsV1: (profileUuid_1, campaignUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, campaignUuid_1, ...args_1], void 0, function* (profileUuid, campaignUuid, options = {}) {
16472
+ // verify required parameter 'profileUuid' is not null or undefined
16473
+ assertParamExists('getCampaignDetailsV1', 'profileUuid', profileUuid);
16474
+ // verify required parameter 'campaignUuid' is not null or undefined
16475
+ assertParamExists('getCampaignDetailsV1', 'campaignUuid', campaignUuid);
16476
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid}`
16477
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
16478
+ .replace(`{${"campaignUuid"}}`, encodeURIComponent(String(campaignUuid)));
16479
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
16480
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
16481
+ let baseOptions;
16482
+ if (configuration) {
16483
+ baseOptions = configuration.baseOptions;
16484
+ }
16485
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
16486
+ const localVarHeaderParameter = {};
16487
+ const localVarQueryParameter = {};
16488
+ // authentication apiToken required
16489
+ // http bearer authentication required
16490
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
16491
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
16492
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
16493
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
16494
+ return {
16495
+ url: toPathString(localVarUrlObj),
16496
+ options: localVarRequestOptions,
16497
+ };
16498
+ }),
16499
+ /**
16500
+ * Get the performance of a campaign: delivery, opens, clicks and unsubscribes, with the matching rates. Every count is unique contacts rather than raw events, so a contact who opens the same email five times is counted once.
16501
+ * @summary Get campaign performance
16502
+ * @param {string} profileUuid Profile uuid parameter
16503
+ * @param {string} campaignUuid Campaign uuid parameter
16504
+ * @param {*} [options] Override http request option.
16505
+ * @throws {RequiredError}
16506
+ */
16507
+ getCampaignPerformanceV1: (profileUuid_1, campaignUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, campaignUuid_1, ...args_1], void 0, function* (profileUuid, campaignUuid, options = {}) {
16508
+ // verify required parameter 'profileUuid' is not null or undefined
16509
+ assertParamExists('getCampaignPerformanceV1', 'profileUuid', profileUuid);
16510
+ // verify required parameter 'campaignUuid' is not null or undefined
16511
+ assertParamExists('getCampaignPerformanceV1', 'campaignUuid', campaignUuid);
16512
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid}/statistics`
16513
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
16514
+ .replace(`{${"campaignUuid"}}`, encodeURIComponent(String(campaignUuid)));
16515
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
16516
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
16517
+ let baseOptions;
16518
+ if (configuration) {
16519
+ baseOptions = configuration.baseOptions;
16520
+ }
16521
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
16522
+ const localVarHeaderParameter = {};
16523
+ const localVarQueryParameter = {};
16524
+ // authentication apiToken required
16525
+ // http bearer authentication required
16526
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
16527
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
16528
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
16529
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
16530
+ return {
16531
+ url: toPathString(localVarUrlObj),
16532
+ options: localVarRequestOptions,
16533
+ };
16534
+ }),
16535
+ /**
16536
+ * Get a paginated list of the campaigns in a profile. Each campaign carries its headline engagement rates. Filter by status to find drafts, scheduled, sending or sent campaigns, keeping in mind that a fully sent campaign has the status `publish`. By default only regular campaigns are returned - pass `type` to get the emails sent by automations or the double opt-in confirmations instead.
16537
+ * @summary List campaigns
16538
+ * @param {string} profileUuid Profile uuid parameter
16539
+ * @param {ListCampaignsV1StatusEnum} [status] Filter campaigns by status. A fully sent campaign has the status `publish`. There is no `sent` status, and campaigns can be neither paused nor archived.
16540
+ * @param {ListCampaignsV1TypeEnum} [type] Filter campaigns by type. Defaults to `campaign`, which leaves out the emails sent by automations and the double opt-in confirmations.
16541
+ * @param {ListCampaignsV1SortDirectionEnum} [sortDirection] Order campaigns by creation date. Newest first unless set to `asc`.
16542
+ * @param {number} [page] Page number
16543
+ * @param {number} [perPage] Number of items per page
16544
+ * @param {*} [options] Override http request option.
16545
+ * @throws {RequiredError}
16546
+ */
16547
+ listCampaignsV1: (profileUuid_1, status_1, type_1, sortDirection_1, page_1, perPage_1, ...args_1) => __awaiter(this, [profileUuid_1, status_1, type_1, sortDirection_1, page_1, perPage_1, ...args_1], void 0, function* (profileUuid, status, type, sortDirection, page, perPage, options = {}) {
16548
+ // verify required parameter 'profileUuid' is not null or undefined
16549
+ assertParamExists('listCampaignsV1', 'profileUuid', profileUuid);
16550
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/campaigns`
16551
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
16552
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
16553
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
16554
+ let baseOptions;
16555
+ if (configuration) {
16556
+ baseOptions = configuration.baseOptions;
16557
+ }
16558
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
16559
+ const localVarHeaderParameter = {};
16560
+ const localVarQueryParameter = {};
16561
+ // authentication apiToken required
16562
+ // http bearer authentication required
16563
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
16564
+ if (status !== undefined) {
16565
+ localVarQueryParameter['status'] = status;
16566
+ }
16567
+ if (type !== undefined) {
16568
+ localVarQueryParameter['type'] = type;
16569
+ }
16570
+ if (sortDirection !== undefined) {
16571
+ localVarQueryParameter['sort_direction'] = sortDirection;
16572
+ }
16573
+ if (page !== undefined) {
16574
+ localVarQueryParameter['page'] = page;
16575
+ }
16576
+ if (perPage !== undefined) {
16577
+ localVarQueryParameter['per_page'] = perPage;
16578
+ }
16579
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
16580
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
16581
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
16582
+ return {
16583
+ url: toPathString(localVarUrlObj),
16584
+ options: localVarRequestOptions,
16585
+ };
16586
+ }),
16587
+ };
16588
+ };
16589
+ /**
16590
+ * ReachCampaignsApi - functional programming interface
16591
+ * @export
16592
+ */
16593
+ export const ReachCampaignsApiFp = function (configuration) {
16594
+ const localVarAxiosParamCreator = ReachCampaignsApiAxiosParamCreator(configuration);
16595
+ return {
16596
+ /**
16597
+ * Get a single campaign with its sender, subject, template reference, targeting and delivery progress. This describes how the campaign was set up and how far it has got. For opens, clicks and unsubscribes use the campaign statistics endpoint.
16598
+ * @summary Get campaign details
16599
+ * @param {string} profileUuid Profile uuid parameter
16600
+ * @param {string} campaignUuid Campaign uuid parameter
16601
+ * @param {*} [options] Override http request option.
16602
+ * @throws {RequiredError}
16603
+ */
16604
+ getCampaignDetailsV1(profileUuid, campaignUuid, options) {
16605
+ return __awaiter(this, void 0, void 0, function* () {
16606
+ var _a, _b;
16607
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCampaignDetailsV1(profileUuid, campaignUuid, options);
16608
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachCampaignsApi.getCampaignDetailsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
16609
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
16610
+ });
16611
+ },
16612
+ /**
16613
+ * Get the performance of a campaign: delivery, opens, clicks and unsubscribes, with the matching rates. Every count is unique contacts rather than raw events, so a contact who opens the same email five times is counted once.
16614
+ * @summary Get campaign performance
16615
+ * @param {string} profileUuid Profile uuid parameter
16616
+ * @param {string} campaignUuid Campaign uuid parameter
16617
+ * @param {*} [options] Override http request option.
16618
+ * @throws {RequiredError}
16619
+ */
16620
+ getCampaignPerformanceV1(profileUuid, campaignUuid, options) {
16621
+ return __awaiter(this, void 0, void 0, function* () {
16622
+ var _a, _b;
16623
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCampaignPerformanceV1(profileUuid, campaignUuid, options);
16624
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachCampaignsApi.getCampaignPerformanceV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
16625
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
16626
+ });
16627
+ },
16628
+ /**
16629
+ * Get a paginated list of the campaigns in a profile. Each campaign carries its headline engagement rates. Filter by status to find drafts, scheduled, sending or sent campaigns, keeping in mind that a fully sent campaign has the status `publish`. By default only regular campaigns are returned - pass `type` to get the emails sent by automations or the double opt-in confirmations instead.
16630
+ * @summary List campaigns
16631
+ * @param {string} profileUuid Profile uuid parameter
16632
+ * @param {ListCampaignsV1StatusEnum} [status] Filter campaigns by status. A fully sent campaign has the status `publish`. There is no `sent` status, and campaigns can be neither paused nor archived.
16633
+ * @param {ListCampaignsV1TypeEnum} [type] Filter campaigns by type. Defaults to `campaign`, which leaves out the emails sent by automations and the double opt-in confirmations.
16634
+ * @param {ListCampaignsV1SortDirectionEnum} [sortDirection] Order campaigns by creation date. Newest first unless set to `asc`.
16635
+ * @param {number} [page] Page number
16636
+ * @param {number} [perPage] Number of items per page
16637
+ * @param {*} [options] Override http request option.
16638
+ * @throws {RequiredError}
16639
+ */
16640
+ listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options) {
16641
+ return __awaiter(this, void 0, void 0, function* () {
16642
+ var _a, _b;
16643
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options);
16644
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachCampaignsApi.listCampaignsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
16645
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
16646
+ });
16647
+ },
16648
+ };
16649
+ };
16650
+ /**
16651
+ * ReachCampaignsApi - factory interface
16652
+ * @export
16653
+ */
16654
+ export const ReachCampaignsApiFactory = function (configuration, basePath, axios) {
16655
+ const localVarFp = ReachCampaignsApiFp(configuration);
16656
+ return {
16657
+ /**
16658
+ * Get a single campaign with its sender, subject, template reference, targeting and delivery progress. This describes how the campaign was set up and how far it has got. For opens, clicks and unsubscribes use the campaign statistics endpoint.
16659
+ * @summary Get campaign details
16660
+ * @param {string} profileUuid Profile uuid parameter
16661
+ * @param {string} campaignUuid Campaign uuid parameter
16662
+ * @param {*} [options] Override http request option.
16663
+ * @throws {RequiredError}
16664
+ */
16665
+ getCampaignDetailsV1(profileUuid, campaignUuid, options) {
16666
+ return localVarFp.getCampaignDetailsV1(profileUuid, campaignUuid, options).then((request) => request(axios, basePath));
16667
+ },
16668
+ /**
16669
+ * Get the performance of a campaign: delivery, opens, clicks and unsubscribes, with the matching rates. Every count is unique contacts rather than raw events, so a contact who opens the same email five times is counted once.
16670
+ * @summary Get campaign performance
16671
+ * @param {string} profileUuid Profile uuid parameter
16672
+ * @param {string} campaignUuid Campaign uuid parameter
16673
+ * @param {*} [options] Override http request option.
16674
+ * @throws {RequiredError}
16675
+ */
16676
+ getCampaignPerformanceV1(profileUuid, campaignUuid, options) {
16677
+ return localVarFp.getCampaignPerformanceV1(profileUuid, campaignUuid, options).then((request) => request(axios, basePath));
16678
+ },
16679
+ /**
16680
+ * Get a paginated list of the campaigns in a profile. Each campaign carries its headline engagement rates. Filter by status to find drafts, scheduled, sending or sent campaigns, keeping in mind that a fully sent campaign has the status `publish`. By default only regular campaigns are returned - pass `type` to get the emails sent by automations or the double opt-in confirmations instead.
16681
+ * @summary List campaigns
16682
+ * @param {string} profileUuid Profile uuid parameter
16683
+ * @param {ListCampaignsV1StatusEnum} [status] Filter campaigns by status. A fully sent campaign has the status `publish`. There is no `sent` status, and campaigns can be neither paused nor archived.
16684
+ * @param {ListCampaignsV1TypeEnum} [type] Filter campaigns by type. Defaults to `campaign`, which leaves out the emails sent by automations and the double opt-in confirmations.
16685
+ * @param {ListCampaignsV1SortDirectionEnum} [sortDirection] Order campaigns by creation date. Newest first unless set to `asc`.
16686
+ * @param {number} [page] Page number
16687
+ * @param {number} [perPage] Number of items per page
16688
+ * @param {*} [options] Override http request option.
16689
+ * @throws {RequiredError}
16690
+ */
16691
+ listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options) {
16692
+ return localVarFp.listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options).then((request) => request(axios, basePath));
16693
+ },
16694
+ };
16695
+ };
16696
+ /**
16697
+ * ReachCampaignsApi - object-oriented interface
16698
+ * @export
16699
+ * @class ReachCampaignsApi
16700
+ * @extends {BaseAPI}
16701
+ */
16702
+ export class ReachCampaignsApi extends BaseAPI {
16703
+ /**
16704
+ * Get a single campaign with its sender, subject, template reference, targeting and delivery progress. This describes how the campaign was set up and how far it has got. For opens, clicks and unsubscribes use the campaign statistics endpoint.
16705
+ * @summary Get campaign details
16706
+ * @param {string} profileUuid Profile uuid parameter
16707
+ * @param {string} campaignUuid Campaign uuid parameter
16708
+ * @param {*} [options] Override http request option.
16709
+ * @throws {RequiredError}
16710
+ * @memberof ReachCampaignsApi
16711
+ */
16712
+ getCampaignDetailsV1(profileUuid, campaignUuid, options) {
16713
+ return ReachCampaignsApiFp(this.configuration).getCampaignDetailsV1(profileUuid, campaignUuid, options).then((request) => request(this.axios, this.basePath));
16714
+ }
16715
+ /**
16716
+ * Get the performance of a campaign: delivery, opens, clicks and unsubscribes, with the matching rates. Every count is unique contacts rather than raw events, so a contact who opens the same email five times is counted once.
16717
+ * @summary Get campaign performance
16718
+ * @param {string} profileUuid Profile uuid parameter
16719
+ * @param {string} campaignUuid Campaign uuid parameter
16720
+ * @param {*} [options] Override http request option.
16721
+ * @throws {RequiredError}
16722
+ * @memberof ReachCampaignsApi
16723
+ */
16724
+ getCampaignPerformanceV1(profileUuid, campaignUuid, options) {
16725
+ return ReachCampaignsApiFp(this.configuration).getCampaignPerformanceV1(profileUuid, campaignUuid, options).then((request) => request(this.axios, this.basePath));
16726
+ }
16727
+ /**
16728
+ * Get a paginated list of the campaigns in a profile. Each campaign carries its headline engagement rates. Filter by status to find drafts, scheduled, sending or sent campaigns, keeping in mind that a fully sent campaign has the status `publish`. By default only regular campaigns are returned - pass `type` to get the emails sent by automations or the double opt-in confirmations instead.
16729
+ * @summary List campaigns
16730
+ * @param {string} profileUuid Profile uuid parameter
16731
+ * @param {ListCampaignsV1StatusEnum} [status] Filter campaigns by status. A fully sent campaign has the status `publish`. There is no `sent` status, and campaigns can be neither paused nor archived.
16732
+ * @param {ListCampaignsV1TypeEnum} [type] Filter campaigns by type. Defaults to `campaign`, which leaves out the emails sent by automations and the double opt-in confirmations.
16733
+ * @param {ListCampaignsV1SortDirectionEnum} [sortDirection] Order campaigns by creation date. Newest first unless set to `asc`.
16734
+ * @param {number} [page] Page number
16735
+ * @param {number} [perPage] Number of items per page
16736
+ * @param {*} [options] Override http request option.
16737
+ * @throws {RequiredError}
16738
+ * @memberof ReachCampaignsApi
16739
+ */
16740
+ listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options) {
16741
+ return ReachCampaignsApiFp(this.configuration).listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options).then((request) => request(this.axios, this.basePath));
16742
+ }
16743
+ }
16744
+ /**
16745
+ * @export
16746
+ */
16747
+ export const ListCampaignsV1StatusEnum = {
16748
+ Draft: 'draft',
16749
+ Scheduled: 'scheduled',
16750
+ Sending: 'sending',
16751
+ Publish: 'publish',
16752
+ Failed: 'failed'
16753
+ };
16754
+ /**
16755
+ * @export
16756
+ */
16757
+ export const ListCampaignsV1TypeEnum = {
16758
+ Campaign: 'campaign',
16759
+ Automation: 'automation',
16760
+ DoubleOptIn: 'double_opt_in'
16761
+ };
16762
+ /**
16763
+ * @export
16764
+ */
16765
+ export const ListCampaignsV1SortDirectionEnum = {
16766
+ Asc: 'asc',
16767
+ Desc: 'desc'
16768
+ };
16103
16769
  /**
16104
16770
  * ReachContactFieldsApi - axios parameter creator
16105
16771
  * @export