hostinger-api-sdk 1.31.0 → 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.
package/api.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.33.0
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
@@ -7790,6 +7790,25 @@ export interface ReachListAutomationsV1200Response {
7790
7790
  */
7791
7791
  'meta': CommonSchemaPaginationMetaSchema;
7792
7792
  }
7793
+ /**
7794
+ *
7795
+ * @export
7796
+ * @interface ReachListCampaignsV1200Response
7797
+ */
7798
+ export interface ReachListCampaignsV1200Response {
7799
+ /**
7800
+ * Array of [`Reach.V1.Campaigns.CampaignResource`](#model/reachv1campaignscampaignresource)
7801
+ * @type {Array<ReachV1CampaignsCampaignResource>}
7802
+ * @memberof ReachListCampaignsV1200Response
7803
+ */
7804
+ 'data': Array<ReachV1CampaignsCampaignResource>;
7805
+ /**
7806
+ *
7807
+ * @type {CommonSchemaPaginationMetaSchema}
7808
+ * @memberof ReachListCampaignsV1200Response
7809
+ */
7810
+ 'meta': CommonSchemaPaginationMetaSchema;
7811
+ }
7793
7812
  /**
7794
7813
  *
7795
7814
  * @export
@@ -8042,6 +8061,389 @@ export const ReachV1AutomationsStepsAutomationStepResourceValueEnum = {
8042
8061
 
8043
8062
  export type ReachV1AutomationsStepsAutomationStepResourceValueEnum = typeof ReachV1AutomationsStepsAutomationStepResourceValueEnum[keyof typeof ReachV1AutomationsStepsAutomationStepResourceValueEnum];
8044
8063
 
8064
+ /**
8065
+ * Delivery progress. While the campaign is `sending`, `total_sent` climbs towards the estimate.
8066
+ * @export
8067
+ * @interface ReachV1CampaignsCampaignDeliveryResource
8068
+ */
8069
+ export interface ReachV1CampaignsCampaignDeliveryResource {
8070
+ /**
8071
+ * Emails sent so far.
8072
+ * @type {number}
8073
+ * @memberof ReachV1CampaignsCampaignDeliveryResource
8074
+ */
8075
+ 'total_sent': number;
8076
+ /**
8077
+ * Recipients this campaign was estimated to reach when sending started. Null for campaigns that have not started sending.
8078
+ * @type {number}
8079
+ * @memberof ReachV1CampaignsCampaignDeliveryResource
8080
+ */
8081
+ 'estimated_total_recipients': number | null;
8082
+ /**
8083
+ * Contacts currently targeted by this campaign.
8084
+ * @type {number}
8085
+ * @memberof ReachV1CampaignsCampaignDeliveryResource
8086
+ */
8087
+ 'subscribers_count': number;
8088
+ }
8089
+ /**
8090
+ *
8091
+ * @export
8092
+ * @interface ReachV1CampaignsCampaignDetailsResource
8093
+ */
8094
+ export interface ReachV1CampaignsCampaignDetailsResource {
8095
+ /**
8096
+ *
8097
+ * @type {string}
8098
+ * @memberof ReachV1CampaignsCampaignDetailsResource
8099
+ */
8100
+ 'uuid': string;
8101
+ /**
8102
+ *
8103
+ * @type {string}
8104
+ * @memberof ReachV1CampaignsCampaignDetailsResource
8105
+ */
8106
+ 'title': string;
8107
+ /**
8108
+ *
8109
+ * @type {string}
8110
+ * @memberof ReachV1CampaignsCampaignDetailsResource
8111
+ */
8112
+ 'subject': string;
8113
+ /**
8114
+ *
8115
+ * @type {string}
8116
+ * @memberof ReachV1CampaignsCampaignDetailsResource
8117
+ */
8118
+ 'sender_name': string;
8119
+ /**
8120
+ *
8121
+ * @type {string}
8122
+ * @memberof ReachV1CampaignsCampaignDetailsResource
8123
+ */
8124
+ 'sender_email': string;
8125
+ /**
8126
+ * The email template this campaign uses. The template title is not exposed.
8127
+ * @type {string}
8128
+ * @memberof ReachV1CampaignsCampaignDetailsResource
8129
+ */
8130
+ 'template_uuid': string | null;
8131
+ /**
8132
+ * A fully sent campaign is `publish`. There is no `sent`, `paused` or `archived` status.
8133
+ * @type {string}
8134
+ * @memberof ReachV1CampaignsCampaignDetailsResource
8135
+ */
8136
+ 'status': ReachV1CampaignsCampaignDetailsResourceStatusEnum;
8137
+ /**
8138
+ *
8139
+ * @type {string}
8140
+ * @memberof ReachV1CampaignsCampaignDetailsResource
8141
+ */
8142
+ 'type': ReachV1CampaignsCampaignDetailsResourceTypeEnum;
8143
+ /**
8144
+ * Set only while the status is `failed`.
8145
+ * @type {string}
8146
+ * @memberof ReachV1CampaignsCampaignDetailsResource
8147
+ */
8148
+ 'failure_reason': string | null;
8149
+ /**
8150
+ * Whether delivery time is picked per contact rather than sent to everyone at once.
8151
+ * @type {boolean}
8152
+ * @memberof ReachV1CampaignsCampaignDetailsResource
8153
+ */
8154
+ 'is_smart_send': boolean;
8155
+ /**
8156
+ * Whether the campaign targets every contact instead of the listed segments.
8157
+ * @type {boolean}
8158
+ * @memberof ReachV1CampaignsCampaignDetailsResource
8159
+ */
8160
+ 'is_all_contacts': boolean;
8161
+ /**
8162
+ *
8163
+ * @type {ReachV1CampaignsCampaignDeliveryResource}
8164
+ * @memberof ReachV1CampaignsCampaignDetailsResource
8165
+ */
8166
+ 'delivery': ReachV1CampaignsCampaignDeliveryResource;
8167
+ /**
8168
+ * Segments this campaign targets. Empty when it targets all contacts.
8169
+ * @type {Array<string>}
8170
+ * @memberof ReachV1CampaignsCampaignDetailsResource
8171
+ */
8172
+ 'segment_uuids': Array<string>;
8173
+ /**
8174
+ *
8175
+ * @type {string}
8176
+ * @memberof ReachV1CampaignsCampaignDetailsResource
8177
+ */
8178
+ 'created_at': string;
8179
+ /**
8180
+ *
8181
+ * @type {string}
8182
+ * @memberof ReachV1CampaignsCampaignDetailsResource
8183
+ */
8184
+ 'updated_at': string | null;
8185
+ /**
8186
+ *
8187
+ * @type {string}
8188
+ * @memberof ReachV1CampaignsCampaignDetailsResource
8189
+ */
8190
+ 'sent_at': string | null;
8191
+ /**
8192
+ *
8193
+ * @type {string}
8194
+ * @memberof ReachV1CampaignsCampaignDetailsResource
8195
+ */
8196
+ 'scheduled_at': string | null;
8197
+ }
8198
+
8199
+ export const ReachV1CampaignsCampaignDetailsResourceStatusEnum = {
8200
+ Draft: 'draft',
8201
+ Scheduled: 'scheduled',
8202
+ Sending: 'sending',
8203
+ Publish: 'publish',
8204
+ Failed: 'failed'
8205
+ } as const;
8206
+
8207
+ export type ReachV1CampaignsCampaignDetailsResourceStatusEnum = typeof ReachV1CampaignsCampaignDetailsResourceStatusEnum[keyof typeof ReachV1CampaignsCampaignDetailsResourceStatusEnum];
8208
+ export const ReachV1CampaignsCampaignDetailsResourceTypeEnum = {
8209
+ Campaign: 'campaign',
8210
+ Automation: 'automation',
8211
+ DoubleOptIn: 'double_opt_in'
8212
+ } as const;
8213
+
8214
+ export type ReachV1CampaignsCampaignDetailsResourceTypeEnum = typeof ReachV1CampaignsCampaignDetailsResourceTypeEnum[keyof typeof ReachV1CampaignsCampaignDetailsResourceTypeEnum];
8215
+
8216
+ /**
8217
+ *
8218
+ * @export
8219
+ * @interface ReachV1CampaignsCampaignResource
8220
+ */
8221
+ export interface ReachV1CampaignsCampaignResource {
8222
+ /**
8223
+ *
8224
+ * @type {string}
8225
+ * @memberof ReachV1CampaignsCampaignResource
8226
+ */
8227
+ 'uuid': string;
8228
+ /**
8229
+ *
8230
+ * @type {string}
8231
+ * @memberof ReachV1CampaignsCampaignResource
8232
+ */
8233
+ 'title': string;
8234
+ /**
8235
+ *
8236
+ * @type {string}
8237
+ * @memberof ReachV1CampaignsCampaignResource
8238
+ */
8239
+ 'subject': string;
8240
+ /**
8241
+ *
8242
+ * @type {string}
8243
+ * @memberof ReachV1CampaignsCampaignResource
8244
+ */
8245
+ 'sender_name': string;
8246
+ /**
8247
+ *
8248
+ * @type {string}
8249
+ * @memberof ReachV1CampaignsCampaignResource
8250
+ */
8251
+ 'sender_email': string;
8252
+ /**
8253
+ * The email template this campaign uses. The template title is not exposed.
8254
+ * @type {string}
8255
+ * @memberof ReachV1CampaignsCampaignResource
8256
+ */
8257
+ 'template_uuid': string | null;
8258
+ /**
8259
+ * A fully sent campaign is `publish`. There is no `sent`, `paused` or `archived` status.
8260
+ * @type {string}
8261
+ * @memberof ReachV1CampaignsCampaignResource
8262
+ */
8263
+ 'status': ReachV1CampaignsCampaignResourceStatusEnum;
8264
+ /**
8265
+ *
8266
+ * @type {string}
8267
+ * @memberof ReachV1CampaignsCampaignResource
8268
+ */
8269
+ 'type': ReachV1CampaignsCampaignResourceTypeEnum;
8270
+ /**
8271
+ *
8272
+ * @type {string}
8273
+ * @memberof ReachV1CampaignsCampaignResource
8274
+ */
8275
+ 'created_at': string;
8276
+ /**
8277
+ *
8278
+ * @type {string}
8279
+ * @memberof ReachV1CampaignsCampaignResource
8280
+ */
8281
+ 'updated_at': string | null;
8282
+ /**
8283
+ *
8284
+ * @type {string}
8285
+ * @memberof ReachV1CampaignsCampaignResource
8286
+ */
8287
+ 'sent_at': string | null;
8288
+ /**
8289
+ *
8290
+ * @type {string}
8291
+ * @memberof ReachV1CampaignsCampaignResource
8292
+ */
8293
+ 'scheduled_at': string | null;
8294
+ /**
8295
+ *
8296
+ * @type {ReachV1CampaignsCampaignSummaryStatisticsResource}
8297
+ * @memberof ReachV1CampaignsCampaignResource
8298
+ */
8299
+ 'statistics': ReachV1CampaignsCampaignSummaryStatisticsResource;
8300
+ }
8301
+
8302
+ export const ReachV1CampaignsCampaignResourceStatusEnum = {
8303
+ Draft: 'draft',
8304
+ Scheduled: 'scheduled',
8305
+ Sending: 'sending',
8306
+ Publish: 'publish',
8307
+ Failed: 'failed'
8308
+ } as const;
8309
+
8310
+ export type ReachV1CampaignsCampaignResourceStatusEnum = typeof ReachV1CampaignsCampaignResourceStatusEnum[keyof typeof ReachV1CampaignsCampaignResourceStatusEnum];
8311
+ export const ReachV1CampaignsCampaignResourceTypeEnum = {
8312
+ Campaign: 'campaign',
8313
+ Automation: 'automation',
8314
+ DoubleOptIn: 'double_opt_in'
8315
+ } as const;
8316
+
8317
+ export type ReachV1CampaignsCampaignResourceTypeEnum = typeof ReachV1CampaignsCampaignResourceTypeEnum[keyof typeof ReachV1CampaignsCampaignResourceTypeEnum];
8318
+
8319
+ /**
8320
+ * Campaign performance. Every count is unique contacts rather than raw events, so a contact who opens the same email five times is counted once.
8321
+ * @export
8322
+ * @interface ReachV1CampaignsCampaignStatisticsResource
8323
+ */
8324
+ export interface ReachV1CampaignsCampaignStatisticsResource {
8325
+ /**
8326
+ * Emails sent for this campaign, and the denominator of every rate below.
8327
+ * @type {number}
8328
+ * @memberof ReachV1CampaignsCampaignStatisticsResource
8329
+ */
8330
+ 'total_sent': number;
8331
+ /**
8332
+ * Recipients this campaign was estimated to reach when sending started. Null for campaigns that have not started sending.
8333
+ * @type {number}
8334
+ * @memberof ReachV1CampaignsCampaignStatisticsResource
8335
+ */
8336
+ 'estimated_total_recipients': number | null;
8337
+ /**
8338
+ *
8339
+ * @type {number}
8340
+ * @memberof ReachV1CampaignsCampaignStatisticsResource
8341
+ */
8342
+ 'processed_count': number;
8343
+ /**
8344
+ *
8345
+ * @type {number}
8346
+ * @memberof ReachV1CampaignsCampaignStatisticsResource
8347
+ */
8348
+ 'delivered_count': number;
8349
+ /**
8350
+ *
8351
+ * @type {number}
8352
+ * @memberof ReachV1CampaignsCampaignStatisticsResource
8353
+ */
8354
+ 'dropped_count': number;
8355
+ /**
8356
+ *
8357
+ * @type {number}
8358
+ * @memberof ReachV1CampaignsCampaignStatisticsResource
8359
+ */
8360
+ 'bounced_count': number;
8361
+ /**
8362
+ *
8363
+ * @type {number}
8364
+ * @memberof ReachV1CampaignsCampaignStatisticsResource
8365
+ */
8366
+ 'soft_bounced_count': number;
8367
+ /**
8368
+ * Contacts who opened this campaign.
8369
+ * @type {number}
8370
+ * @memberof ReachV1CampaignsCampaignStatisticsResource
8371
+ */
8372
+ 'opened_count': number;
8373
+ /**
8374
+ * Contacts who clicked a link. Only clicks from contacts who also registered an open count.
8375
+ * @type {number}
8376
+ * @memberof ReachV1CampaignsCampaignStatisticsResource
8377
+ */
8378
+ 'clicked_count': number;
8379
+ /**
8380
+ * Contacts who unsubscribed through this campaign.
8381
+ * @type {number}
8382
+ * @memberof ReachV1CampaignsCampaignStatisticsResource
8383
+ */
8384
+ 'unsubscribed_count': number;
8385
+ /**
8386
+ * Percentage of sent emails that were opened.
8387
+ * @type {number}
8388
+ * @memberof ReachV1CampaignsCampaignStatisticsResource
8389
+ */
8390
+ 'open_rate': number;
8391
+ /**
8392
+ * Percentage of sent emails that got a click.
8393
+ * @type {number}
8394
+ * @memberof ReachV1CampaignsCampaignStatisticsResource
8395
+ */
8396
+ 'click_rate': number;
8397
+ /**
8398
+ * Percentage of the contacts who opened that went on to click.
8399
+ * @type {number}
8400
+ * @memberof ReachV1CampaignsCampaignStatisticsResource
8401
+ */
8402
+ 'click_to_open_rate': number;
8403
+ /**
8404
+ * Percentage of sent emails that led to an unsubscribe.
8405
+ * @type {number}
8406
+ * @memberof ReachV1CampaignsCampaignStatisticsResource
8407
+ */
8408
+ 'unsubscribe_rate': number;
8409
+ /**
8410
+ *
8411
+ * @type {boolean}
8412
+ * @memberof ReachV1CampaignsCampaignStatisticsResource
8413
+ */
8414
+ 'has_bounced_contacts': boolean;
8415
+ }
8416
+ /**
8417
+ * Headline engagement rates. The statistics endpoint carries the full breakdown.
8418
+ * @export
8419
+ * @interface ReachV1CampaignsCampaignSummaryStatisticsResource
8420
+ */
8421
+ export interface ReachV1CampaignsCampaignSummaryStatisticsResource {
8422
+ /**
8423
+ * Emails sent for this campaign, and the denominator of the rates below.
8424
+ * @type {number}
8425
+ * @memberof ReachV1CampaignsCampaignSummaryStatisticsResource
8426
+ */
8427
+ 'total_sent': number;
8428
+ /**
8429
+ * Percentage of sent emails that were opened.
8430
+ * @type {number}
8431
+ * @memberof ReachV1CampaignsCampaignSummaryStatisticsResource
8432
+ */
8433
+ 'open_rate': number;
8434
+ /**
8435
+ * Percentage of sent emails that got a click.
8436
+ * @type {number}
8437
+ * @memberof ReachV1CampaignsCampaignSummaryStatisticsResource
8438
+ */
8439
+ 'click_rate': number;
8440
+ /**
8441
+ * Percentage of the contacts who opened that went on to click.
8442
+ * @type {number}
8443
+ * @memberof ReachV1CampaignsCampaignSummaryStatisticsResource
8444
+ */
8445
+ 'click_to_open_rate': number;
8446
+ }
8045
8447
  /**
8046
8448
  * Create many contacts in one call
8047
8449
  * @export
@@ -29015,6 +29417,343 @@ export const ListAutomationsV1SortDirectionEnum = {
29015
29417
  export type ListAutomationsV1SortDirectionEnum = typeof ListAutomationsV1SortDirectionEnum[keyof typeof ListAutomationsV1SortDirectionEnum];
29016
29418
 
29017
29419
 
29420
+ /**
29421
+ * ReachCampaignsApi - axios parameter creator
29422
+ * @export
29423
+ */
29424
+ export const ReachCampaignsApiAxiosParamCreator = function (configuration?: Configuration) {
29425
+ return {
29426
+ /**
29427
+ * 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.
29428
+ * @summary Get campaign details
29429
+ * @param {string} profileUuid Profile uuid parameter
29430
+ * @param {string} campaignUuid Campaign uuid parameter
29431
+ * @param {*} [options] Override http request option.
29432
+ * @throws {RequiredError}
29433
+ */
29434
+ getCampaignDetailsV1: async (profileUuid: string, campaignUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29435
+ // verify required parameter 'profileUuid' is not null or undefined
29436
+ assertParamExists('getCampaignDetailsV1', 'profileUuid', profileUuid)
29437
+ // verify required parameter 'campaignUuid' is not null or undefined
29438
+ assertParamExists('getCampaignDetailsV1', 'campaignUuid', campaignUuid)
29439
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid}`
29440
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
29441
+ .replace(`{${"campaignUuid"}}`, encodeURIComponent(String(campaignUuid)));
29442
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
29443
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
29444
+ let baseOptions;
29445
+ if (configuration) {
29446
+ baseOptions = configuration.baseOptions;
29447
+ }
29448
+
29449
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
29450
+ const localVarHeaderParameter = {} as any;
29451
+ const localVarQueryParameter = {} as any;
29452
+
29453
+ // authentication apiToken required
29454
+ // http bearer authentication required
29455
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
29456
+
29457
+
29458
+
29459
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
29460
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
29461
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
29462
+
29463
+ return {
29464
+ url: toPathString(localVarUrlObj),
29465
+ options: localVarRequestOptions,
29466
+ };
29467
+ },
29468
+ /**
29469
+ * 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.
29470
+ * @summary Get campaign performance
29471
+ * @param {string} profileUuid Profile uuid parameter
29472
+ * @param {string} campaignUuid Campaign uuid parameter
29473
+ * @param {*} [options] Override http request option.
29474
+ * @throws {RequiredError}
29475
+ */
29476
+ getCampaignPerformanceV1: async (profileUuid: string, campaignUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29477
+ // verify required parameter 'profileUuid' is not null or undefined
29478
+ assertParamExists('getCampaignPerformanceV1', 'profileUuid', profileUuid)
29479
+ // verify required parameter 'campaignUuid' is not null or undefined
29480
+ assertParamExists('getCampaignPerformanceV1', 'campaignUuid', campaignUuid)
29481
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid}/statistics`
29482
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
29483
+ .replace(`{${"campaignUuid"}}`, encodeURIComponent(String(campaignUuid)));
29484
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
29485
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
29486
+ let baseOptions;
29487
+ if (configuration) {
29488
+ baseOptions = configuration.baseOptions;
29489
+ }
29490
+
29491
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
29492
+ const localVarHeaderParameter = {} as any;
29493
+ const localVarQueryParameter = {} as any;
29494
+
29495
+ // authentication apiToken required
29496
+ // http bearer authentication required
29497
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
29498
+
29499
+
29500
+
29501
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
29502
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
29503
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
29504
+
29505
+ return {
29506
+ url: toPathString(localVarUrlObj),
29507
+ options: localVarRequestOptions,
29508
+ };
29509
+ },
29510
+ /**
29511
+ * 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.
29512
+ * @summary List campaigns
29513
+ * @param {string} profileUuid Profile uuid parameter
29514
+ * @param {ListCampaignsV1StatusEnum} [status] Filter campaigns by status. A fully sent campaign has the status &#x60;publish&#x60;. There is no &#x60;sent&#x60; status, and campaigns can be neither paused nor archived.
29515
+ * @param {ListCampaignsV1TypeEnum} [type] Filter campaigns by type. Defaults to &#x60;campaign&#x60;, which leaves out the emails sent by automations and the double opt-in confirmations.
29516
+ * @param {ListCampaignsV1SortDirectionEnum} [sortDirection] Order campaigns by creation date. Newest first unless set to &#x60;asc&#x60;.
29517
+ * @param {number} [page] Page number
29518
+ * @param {number} [perPage] Number of items per page
29519
+ * @param {*} [options] Override http request option.
29520
+ * @throws {RequiredError}
29521
+ */
29522
+ listCampaignsV1: async (profileUuid: string, status?: ListCampaignsV1StatusEnum, type?: ListCampaignsV1TypeEnum, sortDirection?: ListCampaignsV1SortDirectionEnum, page?: number, perPage?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29523
+ // verify required parameter 'profileUuid' is not null or undefined
29524
+ assertParamExists('listCampaignsV1', 'profileUuid', profileUuid)
29525
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/campaigns`
29526
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
29527
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
29528
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
29529
+ let baseOptions;
29530
+ if (configuration) {
29531
+ baseOptions = configuration.baseOptions;
29532
+ }
29533
+
29534
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
29535
+ const localVarHeaderParameter = {} as any;
29536
+ const localVarQueryParameter = {} as any;
29537
+
29538
+ // authentication apiToken required
29539
+ // http bearer authentication required
29540
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
29541
+
29542
+ if (status !== undefined) {
29543
+ localVarQueryParameter['status'] = status;
29544
+ }
29545
+
29546
+ if (type !== undefined) {
29547
+ localVarQueryParameter['type'] = type;
29548
+ }
29549
+
29550
+ if (sortDirection !== undefined) {
29551
+ localVarQueryParameter['sort_direction'] = sortDirection;
29552
+ }
29553
+
29554
+ if (page !== undefined) {
29555
+ localVarQueryParameter['page'] = page;
29556
+ }
29557
+
29558
+ if (perPage !== undefined) {
29559
+ localVarQueryParameter['per_page'] = perPage;
29560
+ }
29561
+
29562
+
29563
+
29564
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
29565
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
29566
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
29567
+
29568
+ return {
29569
+ url: toPathString(localVarUrlObj),
29570
+ options: localVarRequestOptions,
29571
+ };
29572
+ },
29573
+ }
29574
+ };
29575
+
29576
+ /**
29577
+ * ReachCampaignsApi - functional programming interface
29578
+ * @export
29579
+ */
29580
+ export const ReachCampaignsApiFp = function(configuration?: Configuration) {
29581
+ const localVarAxiosParamCreator = ReachCampaignsApiAxiosParamCreator(configuration)
29582
+ return {
29583
+ /**
29584
+ * 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.
29585
+ * @summary Get campaign details
29586
+ * @param {string} profileUuid Profile uuid parameter
29587
+ * @param {string} campaignUuid Campaign uuid parameter
29588
+ * @param {*} [options] Override http request option.
29589
+ * @throws {RequiredError}
29590
+ */
29591
+ async getCampaignDetailsV1(profileUuid: string, campaignUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1CampaignsCampaignDetailsResource>> {
29592
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCampaignDetailsV1(profileUuid, campaignUuid, options);
29593
+ const localVarOperationServerBasePath = operationServerMap['ReachCampaignsApi.getCampaignDetailsV1']?.[0]?.url;
29594
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
29595
+ },
29596
+ /**
29597
+ * 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.
29598
+ * @summary Get campaign performance
29599
+ * @param {string} profileUuid Profile uuid parameter
29600
+ * @param {string} campaignUuid Campaign uuid parameter
29601
+ * @param {*} [options] Override http request option.
29602
+ * @throws {RequiredError}
29603
+ */
29604
+ async getCampaignPerformanceV1(profileUuid: string, campaignUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1CampaignsCampaignStatisticsResource>> {
29605
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCampaignPerformanceV1(profileUuid, campaignUuid, options);
29606
+ const localVarOperationServerBasePath = operationServerMap['ReachCampaignsApi.getCampaignPerformanceV1']?.[0]?.url;
29607
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
29608
+ },
29609
+ /**
29610
+ * 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.
29611
+ * @summary List campaigns
29612
+ * @param {string} profileUuid Profile uuid parameter
29613
+ * @param {ListCampaignsV1StatusEnum} [status] Filter campaigns by status. A fully sent campaign has the status &#x60;publish&#x60;. There is no &#x60;sent&#x60; status, and campaigns can be neither paused nor archived.
29614
+ * @param {ListCampaignsV1TypeEnum} [type] Filter campaigns by type. Defaults to &#x60;campaign&#x60;, which leaves out the emails sent by automations and the double opt-in confirmations.
29615
+ * @param {ListCampaignsV1SortDirectionEnum} [sortDirection] Order campaigns by creation date. Newest first unless set to &#x60;asc&#x60;.
29616
+ * @param {number} [page] Page number
29617
+ * @param {number} [perPage] Number of items per page
29618
+ * @param {*} [options] Override http request option.
29619
+ * @throws {RequiredError}
29620
+ */
29621
+ async listCampaignsV1(profileUuid: string, status?: ListCampaignsV1StatusEnum, type?: ListCampaignsV1TypeEnum, sortDirection?: ListCampaignsV1SortDirectionEnum, page?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachListCampaignsV1200Response>> {
29622
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options);
29623
+ const localVarOperationServerBasePath = operationServerMap['ReachCampaignsApi.listCampaignsV1']?.[0]?.url;
29624
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
29625
+ },
29626
+ }
29627
+ };
29628
+
29629
+ /**
29630
+ * ReachCampaignsApi - factory interface
29631
+ * @export
29632
+ */
29633
+ export const ReachCampaignsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
29634
+ const localVarFp = ReachCampaignsApiFp(configuration)
29635
+ return {
29636
+ /**
29637
+ * 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.
29638
+ * @summary Get campaign details
29639
+ * @param {string} profileUuid Profile uuid parameter
29640
+ * @param {string} campaignUuid Campaign uuid parameter
29641
+ * @param {*} [options] Override http request option.
29642
+ * @throws {RequiredError}
29643
+ */
29644
+ getCampaignDetailsV1(profileUuid: string, campaignUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1CampaignsCampaignDetailsResource> {
29645
+ return localVarFp.getCampaignDetailsV1(profileUuid, campaignUuid, options).then((request) => request(axios, basePath));
29646
+ },
29647
+ /**
29648
+ * 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.
29649
+ * @summary Get campaign performance
29650
+ * @param {string} profileUuid Profile uuid parameter
29651
+ * @param {string} campaignUuid Campaign uuid parameter
29652
+ * @param {*} [options] Override http request option.
29653
+ * @throws {RequiredError}
29654
+ */
29655
+ getCampaignPerformanceV1(profileUuid: string, campaignUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1CampaignsCampaignStatisticsResource> {
29656
+ return localVarFp.getCampaignPerformanceV1(profileUuid, campaignUuid, options).then((request) => request(axios, basePath));
29657
+ },
29658
+ /**
29659
+ * 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.
29660
+ * @summary List campaigns
29661
+ * @param {string} profileUuid Profile uuid parameter
29662
+ * @param {ListCampaignsV1StatusEnum} [status] Filter campaigns by status. A fully sent campaign has the status &#x60;publish&#x60;. There is no &#x60;sent&#x60; status, and campaigns can be neither paused nor archived.
29663
+ * @param {ListCampaignsV1TypeEnum} [type] Filter campaigns by type. Defaults to &#x60;campaign&#x60;, which leaves out the emails sent by automations and the double opt-in confirmations.
29664
+ * @param {ListCampaignsV1SortDirectionEnum} [sortDirection] Order campaigns by creation date. Newest first unless set to &#x60;asc&#x60;.
29665
+ * @param {number} [page] Page number
29666
+ * @param {number} [perPage] Number of items per page
29667
+ * @param {*} [options] Override http request option.
29668
+ * @throws {RequiredError}
29669
+ */
29670
+ listCampaignsV1(profileUuid: string, status?: ListCampaignsV1StatusEnum, type?: ListCampaignsV1TypeEnum, sortDirection?: ListCampaignsV1SortDirectionEnum, page?: number, perPage?: number, options?: RawAxiosRequestConfig): AxiosPromise<ReachListCampaignsV1200Response> {
29671
+ return localVarFp.listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options).then((request) => request(axios, basePath));
29672
+ },
29673
+ };
29674
+ };
29675
+
29676
+ /**
29677
+ * ReachCampaignsApi - object-oriented interface
29678
+ * @export
29679
+ * @class ReachCampaignsApi
29680
+ * @extends {BaseAPI}
29681
+ */
29682
+ export class ReachCampaignsApi extends BaseAPI {
29683
+ /**
29684
+ * 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.
29685
+ * @summary Get campaign details
29686
+ * @param {string} profileUuid Profile uuid parameter
29687
+ * @param {string} campaignUuid Campaign uuid parameter
29688
+ * @param {*} [options] Override http request option.
29689
+ * @throws {RequiredError}
29690
+ * @memberof ReachCampaignsApi
29691
+ */
29692
+ public getCampaignDetailsV1(profileUuid: string, campaignUuid: string, options?: RawAxiosRequestConfig) {
29693
+ return ReachCampaignsApiFp(this.configuration).getCampaignDetailsV1(profileUuid, campaignUuid, options).then((request) => request(this.axios, this.basePath));
29694
+ }
29695
+
29696
+ /**
29697
+ * 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.
29698
+ * @summary Get campaign performance
29699
+ * @param {string} profileUuid Profile uuid parameter
29700
+ * @param {string} campaignUuid Campaign uuid parameter
29701
+ * @param {*} [options] Override http request option.
29702
+ * @throws {RequiredError}
29703
+ * @memberof ReachCampaignsApi
29704
+ */
29705
+ public getCampaignPerformanceV1(profileUuid: string, campaignUuid: string, options?: RawAxiosRequestConfig) {
29706
+ return ReachCampaignsApiFp(this.configuration).getCampaignPerformanceV1(profileUuid, campaignUuid, options).then((request) => request(this.axios, this.basePath));
29707
+ }
29708
+
29709
+ /**
29710
+ * 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.
29711
+ * @summary List campaigns
29712
+ * @param {string} profileUuid Profile uuid parameter
29713
+ * @param {ListCampaignsV1StatusEnum} [status] Filter campaigns by status. A fully sent campaign has the status &#x60;publish&#x60;. There is no &#x60;sent&#x60; status, and campaigns can be neither paused nor archived.
29714
+ * @param {ListCampaignsV1TypeEnum} [type] Filter campaigns by type. Defaults to &#x60;campaign&#x60;, which leaves out the emails sent by automations and the double opt-in confirmations.
29715
+ * @param {ListCampaignsV1SortDirectionEnum} [sortDirection] Order campaigns by creation date. Newest first unless set to &#x60;asc&#x60;.
29716
+ * @param {number} [page] Page number
29717
+ * @param {number} [perPage] Number of items per page
29718
+ * @param {*} [options] Override http request option.
29719
+ * @throws {RequiredError}
29720
+ * @memberof ReachCampaignsApi
29721
+ */
29722
+ public listCampaignsV1(profileUuid: string, status?: ListCampaignsV1StatusEnum, type?: ListCampaignsV1TypeEnum, sortDirection?: ListCampaignsV1SortDirectionEnum, page?: number, perPage?: number, options?: RawAxiosRequestConfig) {
29723
+ return ReachCampaignsApiFp(this.configuration).listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options).then((request) => request(this.axios, this.basePath));
29724
+ }
29725
+ }
29726
+
29727
+ /**
29728
+ * @export
29729
+ */
29730
+ export const ListCampaignsV1StatusEnum = {
29731
+ Draft: 'draft',
29732
+ Scheduled: 'scheduled',
29733
+ Sending: 'sending',
29734
+ Publish: 'publish',
29735
+ Failed: 'failed'
29736
+ } as const;
29737
+ export type ListCampaignsV1StatusEnum = typeof ListCampaignsV1StatusEnum[keyof typeof ListCampaignsV1StatusEnum];
29738
+ /**
29739
+ * @export
29740
+ */
29741
+ export const ListCampaignsV1TypeEnum = {
29742
+ Campaign: 'campaign',
29743
+ Automation: 'automation',
29744
+ DoubleOptIn: 'double_opt_in'
29745
+ } as const;
29746
+ export type ListCampaignsV1TypeEnum = typeof ListCampaignsV1TypeEnum[keyof typeof ListCampaignsV1TypeEnum];
29747
+ /**
29748
+ * @export
29749
+ */
29750
+ export const ListCampaignsV1SortDirectionEnum = {
29751
+ Asc: 'asc',
29752
+ Desc: 'desc'
29753
+ } as const;
29754
+ export type ListCampaignsV1SortDirectionEnum = typeof ListCampaignsV1SortDirectionEnum[keyof typeof ListCampaignsV1SortDirectionEnum];
29755
+
29756
+
29018
29757
  /**
29019
29758
  * ReachContactFieldsApi - axios parameter creator
29020
29759
  * @export