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/README.md +2 -2
- package/api.ts +740 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +576 -1
- package/dist/api.js +349 -9
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +576 -1
- package/dist/esm/api.js +337 -1
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/ReachCampaignsApi.md +190 -0
- package/docs/ReachListCampaignsV1200Response.md +22 -0
- package/docs/ReachV1CampaignsCampaignDeliveryResource.md +25 -0
- package/docs/ReachV1CampaignsCampaignDetailsResource.md +52 -0
- package/docs/ReachV1CampaignsCampaignResource.md +44 -0
- package/docs/ReachV1CampaignsCampaignStatisticsResource.md +49 -0
- package/docs/ReachV1CampaignsCampaignSummaryStatisticsResource.md +27 -0
- package/index.ts +1 -1
- 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.
|
|
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
|
|
@@ -390,6 +390,30 @@ export const ReachV1AutomationsStepsAutomationStepResourceValueEnum = {
|
|
|
390
390
|
Decision: 'decision',
|
|
391
391
|
Delay: 'delay'
|
|
392
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
|
+
};
|
|
393
417
|
export const ReachV1ContactsContactDetailsResourceSubscriptionStatusEnum = {
|
|
394
418
|
Subscribed: 'subscribed',
|
|
395
419
|
Unsubscribed: 'unsubscribed',
|
|
@@ -16430,6 +16454,318 @@ export const ListAutomationsV1SortDirectionEnum = {
|
|
|
16430
16454
|
Asc: 'asc',
|
|
16431
16455
|
Desc: 'desc'
|
|
16432
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
|
+
};
|
|
16433
16769
|
/**
|
|
16434
16770
|
* ReachContactFieldsApi - axios parameter creator
|
|
16435
16771
|
* @export
|
package/dist/esm/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.34.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/base.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
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
|
package/dist/esm/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.34.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/common.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
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
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.34.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
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
|
|
@@ -13,7 +13,7 @@ export class Configuration {
|
|
|
13
13
|
var _a;
|
|
14
14
|
this.accessToken = param.accessToken;
|
|
15
15
|
this.basePath = param.basePath;
|
|
16
|
-
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.
|
|
16
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.32.0" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
17
17
|
this.formDataCtor = param.formDataCtor;
|
|
18
18
|
}
|
|
19
19
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.34.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
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
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.34.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 1.
|
|
7
|
+
* API Version: 1.34.0
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# ReachCampaignsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://developers.hostinger.com*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**getCampaignDetailsV1**](#getcampaigndetailsv1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid} | Get campaign details|
|
|
8
|
+
|[**getCampaignPerformanceV1**](#getcampaignperformancev1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid}/statistics | Get campaign performance|
|
|
9
|
+
|[**listCampaignsV1**](#listcampaignsv1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns | List campaigns|
|
|
10
|
+
|
|
11
|
+
# **getCampaignDetailsV1**
|
|
12
|
+
> ReachV1CampaignsCampaignDetailsResource getCampaignDetailsV1()
|
|
13
|
+
|
|
14
|
+
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.
|
|
15
|
+
|
|
16
|
+
### Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import {
|
|
20
|
+
ReachCampaignsApi,
|
|
21
|
+
Configuration
|
|
22
|
+
} from 'hostinger-api-sdk';
|
|
23
|
+
|
|
24
|
+
const configuration = new Configuration();
|
|
25
|
+
const apiInstance = new ReachCampaignsApi(configuration);
|
|
26
|
+
|
|
27
|
+
let profileUuid: string; //Profile uuid parameter (default to undefined)
|
|
28
|
+
let campaignUuid: string; //Campaign uuid parameter (default to undefined)
|
|
29
|
+
|
|
30
|
+
const { status, data } = await apiInstance.getCampaignDetailsV1(
|
|
31
|
+
profileUuid,
|
|
32
|
+
campaignUuid
|
|
33
|
+
);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Parameters
|
|
37
|
+
|
|
38
|
+
|Name | Type | Description | Notes|
|
|
39
|
+
|------------- | ------------- | ------------- | -------------|
|
|
40
|
+
| **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
|
|
41
|
+
| **campaignUuid** | [**string**] | Campaign uuid parameter | defaults to undefined|
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Return type
|
|
45
|
+
|
|
46
|
+
**ReachV1CampaignsCampaignDetailsResource**
|
|
47
|
+
|
|
48
|
+
### Authorization
|
|
49
|
+
|
|
50
|
+
[apiToken](../README.md#apiToken)
|
|
51
|
+
|
|
52
|
+
### HTTP request headers
|
|
53
|
+
|
|
54
|
+
- **Content-Type**: Not defined
|
|
55
|
+
- **Accept**: application/json
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### HTTP response details
|
|
59
|
+
| Status code | Description | Response headers |
|
|
60
|
+
|-------------|-------------|------------------|
|
|
61
|
+
|**200** | Success response | - |
|
|
62
|
+
|**401** | Unauthenticated response | - |
|
|
63
|
+
|**500** | Error response | - |
|
|
64
|
+
|
|
65
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
66
|
+
|
|
67
|
+
# **getCampaignPerformanceV1**
|
|
68
|
+
> ReachV1CampaignsCampaignStatisticsResource getCampaignPerformanceV1()
|
|
69
|
+
|
|
70
|
+
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.
|
|
71
|
+
|
|
72
|
+
### Example
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import {
|
|
76
|
+
ReachCampaignsApi,
|
|
77
|
+
Configuration
|
|
78
|
+
} from 'hostinger-api-sdk';
|
|
79
|
+
|
|
80
|
+
const configuration = new Configuration();
|
|
81
|
+
const apiInstance = new ReachCampaignsApi(configuration);
|
|
82
|
+
|
|
83
|
+
let profileUuid: string; //Profile uuid parameter (default to undefined)
|
|
84
|
+
let campaignUuid: string; //Campaign uuid parameter (default to undefined)
|
|
85
|
+
|
|
86
|
+
const { status, data } = await apiInstance.getCampaignPerformanceV1(
|
|
87
|
+
profileUuid,
|
|
88
|
+
campaignUuid
|
|
89
|
+
);
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Parameters
|
|
93
|
+
|
|
94
|
+
|Name | Type | Description | Notes|
|
|
95
|
+
|------------- | ------------- | ------------- | -------------|
|
|
96
|
+
| **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
|
|
97
|
+
| **campaignUuid** | [**string**] | Campaign uuid parameter | defaults to undefined|
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### Return type
|
|
101
|
+
|
|
102
|
+
**ReachV1CampaignsCampaignStatisticsResource**
|
|
103
|
+
|
|
104
|
+
### Authorization
|
|
105
|
+
|
|
106
|
+
[apiToken](../README.md#apiToken)
|
|
107
|
+
|
|
108
|
+
### HTTP request headers
|
|
109
|
+
|
|
110
|
+
- **Content-Type**: Not defined
|
|
111
|
+
- **Accept**: application/json
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
### HTTP response details
|
|
115
|
+
| Status code | Description | Response headers |
|
|
116
|
+
|-------------|-------------|------------------|
|
|
117
|
+
|**200** | Success response | - |
|
|
118
|
+
|**401** | Unauthenticated response | - |
|
|
119
|
+
|**500** | Error response | - |
|
|
120
|
+
|
|
121
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
122
|
+
|
|
123
|
+
# **listCampaignsV1**
|
|
124
|
+
> ReachListCampaignsV1200Response listCampaignsV1()
|
|
125
|
+
|
|
126
|
+
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.
|
|
127
|
+
|
|
128
|
+
### Example
|
|
129
|
+
|
|
130
|
+
```typescript
|
|
131
|
+
import {
|
|
132
|
+
ReachCampaignsApi,
|
|
133
|
+
Configuration
|
|
134
|
+
} from 'hostinger-api-sdk';
|
|
135
|
+
|
|
136
|
+
const configuration = new Configuration();
|
|
137
|
+
const apiInstance = new ReachCampaignsApi(configuration);
|
|
138
|
+
|
|
139
|
+
let profileUuid: string; //Profile uuid parameter (default to undefined)
|
|
140
|
+
let status: 'draft' | 'scheduled' | 'sending' | 'publish' | 'failed'; //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. (optional) (default to undefined)
|
|
141
|
+
let type: 'campaign' | 'automation' | 'double_opt_in'; //Filter campaigns by type. Defaults to `campaign`, which leaves out the emails sent by automations and the double opt-in confirmations. (optional) (default to 'campaign')
|
|
142
|
+
let sortDirection: 'asc' | 'desc'; //Order campaigns by creation date. Newest first unless set to `asc`. (optional) (default to undefined)
|
|
143
|
+
let page: number; //Page number (optional) (default to undefined)
|
|
144
|
+
let perPage: number; //Number of items per page (optional) (default to 25)
|
|
145
|
+
|
|
146
|
+
const { status, data } = await apiInstance.listCampaignsV1(
|
|
147
|
+
profileUuid,
|
|
148
|
+
status,
|
|
149
|
+
type,
|
|
150
|
+
sortDirection,
|
|
151
|
+
page,
|
|
152
|
+
perPage
|
|
153
|
+
);
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Parameters
|
|
157
|
+
|
|
158
|
+
|Name | Type | Description | Notes|
|
|
159
|
+
|------------- | ------------- | ------------- | -------------|
|
|
160
|
+
| **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
|
|
161
|
+
| **status** | [**'draft' | 'scheduled' | 'sending' | 'publish' | 'failed'**]**Array<'draft' | 'scheduled' | 'sending' | 'publish' | 'failed'>** | 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. | (optional) defaults to undefined|
|
|
162
|
+
| **type** | [**'campaign' | 'automation' | 'double_opt_in'**]**Array<'campaign' | 'automation' | 'double_opt_in'>** | Filter campaigns by type. Defaults to `campaign`, which leaves out the emails sent by automations and the double opt-in confirmations. | (optional) defaults to 'campaign'|
|
|
163
|
+
| **sortDirection** | [**'asc' | 'desc'**]**Array<'asc' | 'desc'>** | Order campaigns by creation date. Newest first unless set to `asc`. | (optional) defaults to undefined|
|
|
164
|
+
| **page** | [**number**] | Page number | (optional) defaults to undefined|
|
|
165
|
+
| **perPage** | [**number**] | Number of items per page | (optional) defaults to 25|
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
### Return type
|
|
169
|
+
|
|
170
|
+
**ReachListCampaignsV1200Response**
|
|
171
|
+
|
|
172
|
+
### Authorization
|
|
173
|
+
|
|
174
|
+
[apiToken](../README.md#apiToken)
|
|
175
|
+
|
|
176
|
+
### HTTP request headers
|
|
177
|
+
|
|
178
|
+
- **Content-Type**: Not defined
|
|
179
|
+
- **Accept**: application/json
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
### HTTP response details
|
|
183
|
+
| Status code | Description | Response headers |
|
|
184
|
+
|-------------|-------------|------------------|
|
|
185
|
+
|**200** | Success response | - |
|
|
186
|
+
|**401** | Unauthenticated response | - |
|
|
187
|
+
|**500** | Error response | - |
|
|
188
|
+
|
|
189
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
190
|
+
|