hostinger-api-sdk 2.16.0 → 2.16.1
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 +230 -2
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +141 -2
- package/dist/api.js +159 -1
- 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 +141 -2
- package/dist/esm/api.js +159 -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 +119 -0
- package/docs/ReachV1CampaignsCreatedCampaignResource.md +1 -1
- package/docs/ReachV1CampaignsUpdateRequest.md +37 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/api.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 2.16.
|
|
7
|
+
* API Version: 2.16.1
|
|
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
|
|
@@ -25429,6 +25429,83 @@ const ReachCampaignsApiAxiosParamCreator = function (configuration) {
|
|
|
25429
25429
|
options: localVarRequestOptions,
|
|
25430
25430
|
};
|
|
25431
25431
|
}),
|
|
25432
|
+
/**
|
|
25433
|
+
* Send a campaign now to the audience stored on it. This is irreversible: once accepted, the emails go out and cannot be recalled. Confirm with the customer before calling. The campaign needs a subject, sender, template and audience first - set them with the update endpoint. Delivery is asynchronous, so success means accepted, not delivered: the campaign moves to `sending` and later to `publish`, or to `failed`. Read the campaign to follow it. The request is rejected when the campaign has no recipients, its sender domain is not verified or is blocked, the plan\'s sending limits would be exceeded, or the campaign is already being sent.
|
|
25434
|
+
* @summary Send campaign
|
|
25435
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25436
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
25437
|
+
* @param {*} [options] Override http request option.
|
|
25438
|
+
* @throws {RequiredError}
|
|
25439
|
+
*/
|
|
25440
|
+
sendCampaignV1: (profileUuid_1, campaignUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, campaignUuid_1, ...args_1], void 0, function* (profileUuid, campaignUuid, options = {}) {
|
|
25441
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
25442
|
+
(0, common_1.assertParamExists)('sendCampaignV1', 'profileUuid', profileUuid);
|
|
25443
|
+
// verify required parameter 'campaignUuid' is not null or undefined
|
|
25444
|
+
(0, common_1.assertParamExists)('sendCampaignV1', 'campaignUuid', campaignUuid);
|
|
25445
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid}/send`
|
|
25446
|
+
.replace(`{${"profileUuid"}}`, (0, common_1.encodePathParam)('profileUuid', profileUuid))
|
|
25447
|
+
.replace(`{${"campaignUuid"}}`, (0, common_1.encodePathParam)('campaignUuid', campaignUuid));
|
|
25448
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
25449
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
25450
|
+
let baseOptions;
|
|
25451
|
+
if (configuration) {
|
|
25452
|
+
baseOptions = configuration.baseOptions;
|
|
25453
|
+
}
|
|
25454
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
25455
|
+
const localVarHeaderParameter = {};
|
|
25456
|
+
const localVarQueryParameter = {};
|
|
25457
|
+
// authentication apiToken required
|
|
25458
|
+
// http bearer authentication required
|
|
25459
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
25460
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
25461
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
25462
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
25463
|
+
return {
|
|
25464
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
25465
|
+
options: localVarRequestOptions,
|
|
25466
|
+
};
|
|
25467
|
+
}),
|
|
25468
|
+
/**
|
|
25469
|
+
* Update a campaign\'s content, sender, template and audience. Only `draft`, `scheduled` and `failed` campaigns can be updated; a campaign that is sending or already sent is rejected. Updating a `failed` campaign moves it back to `draft`. Audience changes replace rather than merge: `all_contacts: true` targets every contact of the profile, while `segment_uuids` replaces the segments currently targeted. Leave both out to keep the audience as it is. This does not send the campaign - use the send endpoint for that.
|
|
25470
|
+
* @summary Update campaign
|
|
25471
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25472
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
25473
|
+
* @param {ReachV1CampaignsUpdateRequest} reachV1CampaignsUpdateRequest
|
|
25474
|
+
* @param {*} [options] Override http request option.
|
|
25475
|
+
* @throws {RequiredError}
|
|
25476
|
+
*/
|
|
25477
|
+
updateCampaignV1: (profileUuid_1, campaignUuid_1, reachV1CampaignsUpdateRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, campaignUuid_1, reachV1CampaignsUpdateRequest_1, ...args_1], void 0, function* (profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options = {}) {
|
|
25478
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
25479
|
+
(0, common_1.assertParamExists)('updateCampaignV1', 'profileUuid', profileUuid);
|
|
25480
|
+
// verify required parameter 'campaignUuid' is not null or undefined
|
|
25481
|
+
(0, common_1.assertParamExists)('updateCampaignV1', 'campaignUuid', campaignUuid);
|
|
25482
|
+
// verify required parameter 'reachV1CampaignsUpdateRequest' is not null or undefined
|
|
25483
|
+
(0, common_1.assertParamExists)('updateCampaignV1', 'reachV1CampaignsUpdateRequest', reachV1CampaignsUpdateRequest);
|
|
25484
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid}`
|
|
25485
|
+
.replace(`{${"profileUuid"}}`, (0, common_1.encodePathParam)('profileUuid', profileUuid))
|
|
25486
|
+
.replace(`{${"campaignUuid"}}`, (0, common_1.encodePathParam)('campaignUuid', campaignUuid));
|
|
25487
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
25488
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
25489
|
+
let baseOptions;
|
|
25490
|
+
if (configuration) {
|
|
25491
|
+
baseOptions = configuration.baseOptions;
|
|
25492
|
+
}
|
|
25493
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
25494
|
+
const localVarHeaderParameter = {};
|
|
25495
|
+
const localVarQueryParameter = {};
|
|
25496
|
+
// authentication apiToken required
|
|
25497
|
+
// http bearer authentication required
|
|
25498
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
25499
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
25500
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
25501
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
25502
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
25503
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(reachV1CampaignsUpdateRequest, localVarRequestOptions, configuration);
|
|
25504
|
+
return {
|
|
25505
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
25506
|
+
options: localVarRequestOptions,
|
|
25507
|
+
};
|
|
25508
|
+
}),
|
|
25432
25509
|
};
|
|
25433
25510
|
};
|
|
25434
25511
|
exports.ReachCampaignsApiAxiosParamCreator = ReachCampaignsApiAxiosParamCreator;
|
|
@@ -25507,6 +25584,39 @@ const ReachCampaignsApiFp = function (configuration) {
|
|
|
25507
25584
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
25508
25585
|
});
|
|
25509
25586
|
},
|
|
25587
|
+
/**
|
|
25588
|
+
* Send a campaign now to the audience stored on it. This is irreversible: once accepted, the emails go out and cannot be recalled. Confirm with the customer before calling. The campaign needs a subject, sender, template and audience first - set them with the update endpoint. Delivery is asynchronous, so success means accepted, not delivered: the campaign moves to `sending` and later to `publish`, or to `failed`. Read the campaign to follow it. The request is rejected when the campaign has no recipients, its sender domain is not verified or is blocked, the plan\'s sending limits would be exceeded, or the campaign is already being sent.
|
|
25589
|
+
* @summary Send campaign
|
|
25590
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25591
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
25592
|
+
* @param {*} [options] Override http request option.
|
|
25593
|
+
* @throws {RequiredError}
|
|
25594
|
+
*/
|
|
25595
|
+
sendCampaignV1(profileUuid, campaignUuid, options) {
|
|
25596
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25597
|
+
var _a, _b;
|
|
25598
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.sendCampaignV1(profileUuid, campaignUuid, options);
|
|
25599
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['ReachCampaignsApi.sendCampaignV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
25600
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
25601
|
+
});
|
|
25602
|
+
},
|
|
25603
|
+
/**
|
|
25604
|
+
* Update a campaign\'s content, sender, template and audience. Only `draft`, `scheduled` and `failed` campaigns can be updated; a campaign that is sending or already sent is rejected. Updating a `failed` campaign moves it back to `draft`. Audience changes replace rather than merge: `all_contacts: true` targets every contact of the profile, while `segment_uuids` replaces the segments currently targeted. Leave both out to keep the audience as it is. This does not send the campaign - use the send endpoint for that.
|
|
25605
|
+
* @summary Update campaign
|
|
25606
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25607
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
25608
|
+
* @param {ReachV1CampaignsUpdateRequest} reachV1CampaignsUpdateRequest
|
|
25609
|
+
* @param {*} [options] Override http request option.
|
|
25610
|
+
* @throws {RequiredError}
|
|
25611
|
+
*/
|
|
25612
|
+
updateCampaignV1(profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options) {
|
|
25613
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25614
|
+
var _a, _b;
|
|
25615
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateCampaignV1(profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options);
|
|
25616
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['ReachCampaignsApi.updateCampaignV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
25617
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
25618
|
+
});
|
|
25619
|
+
},
|
|
25510
25620
|
};
|
|
25511
25621
|
};
|
|
25512
25622
|
exports.ReachCampaignsApiFp = ReachCampaignsApiFp;
|
|
@@ -25565,6 +25675,29 @@ const ReachCampaignsApiFactory = function (configuration, basePath, axios) {
|
|
|
25565
25675
|
listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options) {
|
|
25566
25676
|
return localVarFp.listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options).then((request) => request(axios, basePath));
|
|
25567
25677
|
},
|
|
25678
|
+
/**
|
|
25679
|
+
* Send a campaign now to the audience stored on it. This is irreversible: once accepted, the emails go out and cannot be recalled. Confirm with the customer before calling. The campaign needs a subject, sender, template and audience first - set them with the update endpoint. Delivery is asynchronous, so success means accepted, not delivered: the campaign moves to `sending` and later to `publish`, or to `failed`. Read the campaign to follow it. The request is rejected when the campaign has no recipients, its sender domain is not verified or is blocked, the plan\'s sending limits would be exceeded, or the campaign is already being sent.
|
|
25680
|
+
* @summary Send campaign
|
|
25681
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25682
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
25683
|
+
* @param {*} [options] Override http request option.
|
|
25684
|
+
* @throws {RequiredError}
|
|
25685
|
+
*/
|
|
25686
|
+
sendCampaignV1(profileUuid, campaignUuid, options) {
|
|
25687
|
+
return localVarFp.sendCampaignV1(profileUuid, campaignUuid, options).then((request) => request(axios, basePath));
|
|
25688
|
+
},
|
|
25689
|
+
/**
|
|
25690
|
+
* Update a campaign\'s content, sender, template and audience. Only `draft`, `scheduled` and `failed` campaigns can be updated; a campaign that is sending or already sent is rejected. Updating a `failed` campaign moves it back to `draft`. Audience changes replace rather than merge: `all_contacts: true` targets every contact of the profile, while `segment_uuids` replaces the segments currently targeted. Leave both out to keep the audience as it is. This does not send the campaign - use the send endpoint for that.
|
|
25691
|
+
* @summary Update campaign
|
|
25692
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25693
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
25694
|
+
* @param {ReachV1CampaignsUpdateRequest} reachV1CampaignsUpdateRequest
|
|
25695
|
+
* @param {*} [options] Override http request option.
|
|
25696
|
+
* @throws {RequiredError}
|
|
25697
|
+
*/
|
|
25698
|
+
updateCampaignV1(profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options) {
|
|
25699
|
+
return localVarFp.updateCampaignV1(profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options).then((request) => request(axios, basePath));
|
|
25700
|
+
},
|
|
25568
25701
|
};
|
|
25569
25702
|
};
|
|
25570
25703
|
exports.ReachCampaignsApiFactory = ReachCampaignsApiFactory;
|
|
@@ -25627,6 +25760,31 @@ class ReachCampaignsApi extends base_1.BaseAPI {
|
|
|
25627
25760
|
listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options) {
|
|
25628
25761
|
return (0, exports.ReachCampaignsApiFp)(this.configuration).listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options).then((request) => request(this.axios, this.basePath));
|
|
25629
25762
|
}
|
|
25763
|
+
/**
|
|
25764
|
+
* Send a campaign now to the audience stored on it. This is irreversible: once accepted, the emails go out and cannot be recalled. Confirm with the customer before calling. The campaign needs a subject, sender, template and audience first - set them with the update endpoint. Delivery is asynchronous, so success means accepted, not delivered: the campaign moves to `sending` and later to `publish`, or to `failed`. Read the campaign to follow it. The request is rejected when the campaign has no recipients, its sender domain is not verified or is blocked, the plan\'s sending limits would be exceeded, or the campaign is already being sent.
|
|
25765
|
+
* @summary Send campaign
|
|
25766
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25767
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
25768
|
+
* @param {*} [options] Override http request option.
|
|
25769
|
+
* @throws {RequiredError}
|
|
25770
|
+
* @memberof ReachCampaignsApi
|
|
25771
|
+
*/
|
|
25772
|
+
sendCampaignV1(profileUuid, campaignUuid, options) {
|
|
25773
|
+
return (0, exports.ReachCampaignsApiFp)(this.configuration).sendCampaignV1(profileUuid, campaignUuid, options).then((request) => request(this.axios, this.basePath));
|
|
25774
|
+
}
|
|
25775
|
+
/**
|
|
25776
|
+
* Update a campaign\'s content, sender, template and audience. Only `draft`, `scheduled` and `failed` campaigns can be updated; a campaign that is sending or already sent is rejected. Updating a `failed` campaign moves it back to `draft`. Audience changes replace rather than merge: `all_contacts: true` targets every contact of the profile, while `segment_uuids` replaces the segments currently targeted. Leave both out to keep the audience as it is. This does not send the campaign - use the send endpoint for that.
|
|
25777
|
+
* @summary Update campaign
|
|
25778
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25779
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
25780
|
+
* @param {ReachV1CampaignsUpdateRequest} reachV1CampaignsUpdateRequest
|
|
25781
|
+
* @param {*} [options] Override http request option.
|
|
25782
|
+
* @throws {RequiredError}
|
|
25783
|
+
* @memberof ReachCampaignsApi
|
|
25784
|
+
*/
|
|
25785
|
+
updateCampaignV1(profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options) {
|
|
25786
|
+
return (0, exports.ReachCampaignsApiFp)(this.configuration).updateCampaignV1(profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
25787
|
+
}
|
|
25630
25788
|
}
|
|
25631
25789
|
exports.ReachCampaignsApi = ReachCampaignsApi;
|
|
25632
25790
|
/**
|
package/dist/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.16.
|
|
4
|
+
* API Version: 2.16.1
|
|
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/base.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 2.16.
|
|
7
|
+
* API Version: 2.16.1
|
|
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
|
package/dist/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.16.
|
|
4
|
+
* API Version: 2.16.1
|
|
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/common.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 2.16.
|
|
7
|
+
* API Version: 2.16.1
|
|
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
|
package/dist/configuration.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.16.
|
|
4
|
+
* API Version: 2.16.1
|
|
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/configuration.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 2.16.
|
|
7
|
+
* API Version: 2.16.1
|
|
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
|
|
@@ -16,7 +16,7 @@ class Configuration {
|
|
|
16
16
|
var _a;
|
|
17
17
|
this.accessToken = param.accessToken;
|
|
18
18
|
this.basePath = param.basePath;
|
|
19
|
-
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/2.16.
|
|
19
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/2.16.1" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
20
20
|
this.formDataCtor = param.formDataCtor;
|
|
21
21
|
}
|
|
22
22
|
/**
|
package/dist/esm/api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.16.
|
|
4
|
+
* API Version: 2.16.1
|
|
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
|
|
@@ -13819,7 +13819,7 @@ export interface ReachV1CampaignsCreatedCampaignResource {
|
|
|
13819
13819
|
*/
|
|
13820
13820
|
'template_uuid': string | null;
|
|
13821
13821
|
/**
|
|
13822
|
-
* Always `draft` for a campaign that was just created.
|
|
13822
|
+
* Always `draft` for a campaign that was just created; the current status after an update.
|
|
13823
13823
|
* @type {string}
|
|
13824
13824
|
* @memberof ReachV1CampaignsCreatedCampaignResource
|
|
13825
13825
|
*/
|
|
@@ -13933,6 +13933,67 @@ export interface ReachV1CampaignsStoreRequestMetadata {
|
|
|
13933
13933
|
*/
|
|
13934
13934
|
'source': string;
|
|
13935
13935
|
}
|
|
13936
|
+
/**
|
|
13937
|
+
* Update a campaign. Send at least one field; fields left out keep their current value.
|
|
13938
|
+
* @export
|
|
13939
|
+
* @interface ReachV1CampaignsUpdateRequest
|
|
13940
|
+
*/
|
|
13941
|
+
export interface ReachV1CampaignsUpdateRequest {
|
|
13942
|
+
/**
|
|
13943
|
+
* Name the campaign is listed under. Not shown to the recipients.
|
|
13944
|
+
* @type {string}
|
|
13945
|
+
* @memberof ReachV1CampaignsUpdateRequest
|
|
13946
|
+
*/
|
|
13947
|
+
'title': string;
|
|
13948
|
+
/**
|
|
13949
|
+
* Subject line of the email.
|
|
13950
|
+
* @type {string}
|
|
13951
|
+
* @memberof ReachV1CampaignsUpdateRequest
|
|
13952
|
+
*/
|
|
13953
|
+
'subject': string;
|
|
13954
|
+
/**
|
|
13955
|
+
* From name shown to the recipients.
|
|
13956
|
+
* @type {string}
|
|
13957
|
+
* @memberof ReachV1CampaignsUpdateRequest
|
|
13958
|
+
*/
|
|
13959
|
+
'sender_name': string;
|
|
13960
|
+
/**
|
|
13961
|
+
* From address of the campaign. Its domain has to be verified on the profile before the campaign can be sent.
|
|
13962
|
+
* @type {string}
|
|
13963
|
+
* @memberof ReachV1CampaignsUpdateRequest
|
|
13964
|
+
*/
|
|
13965
|
+
'sender_email': string;
|
|
13966
|
+
/**
|
|
13967
|
+
* Template to send, as returned by the template endpoints.
|
|
13968
|
+
* @type {string}
|
|
13969
|
+
* @memberof ReachV1CampaignsUpdateRequest
|
|
13970
|
+
*/
|
|
13971
|
+
'template_uuid': string;
|
|
13972
|
+
/**
|
|
13973
|
+
* `true` targets every contact of the profile, `false` targets only `segment_uuids`. Required when `segment_uuids` or `excluded_segment_uuids` is sent.
|
|
13974
|
+
* @type {boolean}
|
|
13975
|
+
* @memberof ReachV1CampaignsUpdateRequest
|
|
13976
|
+
*/
|
|
13977
|
+
'all_contacts': boolean;
|
|
13978
|
+
/**
|
|
13979
|
+
* Segments to target. Replaces the segments currently targeted.
|
|
13980
|
+
* @type {Array<string>}
|
|
13981
|
+
* @memberof ReachV1CampaignsUpdateRequest
|
|
13982
|
+
*/
|
|
13983
|
+
'segment_uuids': Array<string>;
|
|
13984
|
+
/**
|
|
13985
|
+
* Segments to leave out. Only allowed together with `all_contacts: true`.
|
|
13986
|
+
* @type {Array<string>}
|
|
13987
|
+
* @memberof ReachV1CampaignsUpdateRequest
|
|
13988
|
+
*/
|
|
13989
|
+
'excluded_segment_uuids': Array<string>;
|
|
13990
|
+
/**
|
|
13991
|
+
*
|
|
13992
|
+
* @type {ReachV1CampaignsStoreRequestMetadata}
|
|
13993
|
+
* @memberof ReachV1CampaignsUpdateRequest
|
|
13994
|
+
*/
|
|
13995
|
+
'metadata': ReachV1CampaignsStoreRequestMetadata | null;
|
|
13996
|
+
}
|
|
13936
13997
|
/**
|
|
13937
13998
|
* Create many contacts in one call
|
|
13938
13999
|
* @export
|
|
@@ -32130,6 +32191,25 @@ export declare const ReachCampaignsApiAxiosParamCreator: (configuration?: Config
|
|
|
32130
32191
|
* @throws {RequiredError}
|
|
32131
32192
|
*/
|
|
32132
32193
|
listCampaignsV1: (profileUuid: string, status?: ListCampaignsV1StatusEnum, type?: ListCampaignsV1TypeEnum, sortDirection?: ListCampaignsV1SortDirectionEnum, page?: number, perPage?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
32194
|
+
/**
|
|
32195
|
+
* Send a campaign now to the audience stored on it. This is irreversible: once accepted, the emails go out and cannot be recalled. Confirm with the customer before calling. The campaign needs a subject, sender, template and audience first - set them with the update endpoint. Delivery is asynchronous, so success means accepted, not delivered: the campaign moves to `sending` and later to `publish`, or to `failed`. Read the campaign to follow it. The request is rejected when the campaign has no recipients, its sender domain is not verified or is blocked, the plan\'s sending limits would be exceeded, or the campaign is already being sent.
|
|
32196
|
+
* @summary Send campaign
|
|
32197
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
32198
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
32199
|
+
* @param {*} [options] Override http request option.
|
|
32200
|
+
* @throws {RequiredError}
|
|
32201
|
+
*/
|
|
32202
|
+
sendCampaignV1: (profileUuid: string, campaignUuid: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
32203
|
+
/**
|
|
32204
|
+
* Update a campaign\'s content, sender, template and audience. Only `draft`, `scheduled` and `failed` campaigns can be updated; a campaign that is sending or already sent is rejected. Updating a `failed` campaign moves it back to `draft`. Audience changes replace rather than merge: `all_contacts: true` targets every contact of the profile, while `segment_uuids` replaces the segments currently targeted. Leave both out to keep the audience as it is. This does not send the campaign - use the send endpoint for that.
|
|
32205
|
+
* @summary Update campaign
|
|
32206
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
32207
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
32208
|
+
* @param {ReachV1CampaignsUpdateRequest} reachV1CampaignsUpdateRequest
|
|
32209
|
+
* @param {*} [options] Override http request option.
|
|
32210
|
+
* @throws {RequiredError}
|
|
32211
|
+
*/
|
|
32212
|
+
updateCampaignV1: (profileUuid: string, campaignUuid: string, reachV1CampaignsUpdateRequest: ReachV1CampaignsUpdateRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
32133
32213
|
};
|
|
32134
32214
|
/**
|
|
32135
32215
|
* ReachCampaignsApi - functional programming interface
|
|
@@ -32176,6 +32256,25 @@ export declare const ReachCampaignsApiFp: (configuration?: Configuration) => {
|
|
|
32176
32256
|
* @throws {RequiredError}
|
|
32177
32257
|
*/
|
|
32178
32258
|
listCampaignsV1(profileUuid: string, status?: ListCampaignsV1StatusEnum, type?: ListCampaignsV1TypeEnum, sortDirection?: ListCampaignsV1SortDirectionEnum, page?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachListCampaignsV1200Response>>;
|
|
32259
|
+
/**
|
|
32260
|
+
* Send a campaign now to the audience stored on it. This is irreversible: once accepted, the emails go out and cannot be recalled. Confirm with the customer before calling. The campaign needs a subject, sender, template and audience first - set them with the update endpoint. Delivery is asynchronous, so success means accepted, not delivered: the campaign moves to `sending` and later to `publish`, or to `failed`. Read the campaign to follow it. The request is rejected when the campaign has no recipients, its sender domain is not verified or is blocked, the plan\'s sending limits would be exceeded, or the campaign is already being sent.
|
|
32261
|
+
* @summary Send campaign
|
|
32262
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
32263
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
32264
|
+
* @param {*} [options] Override http request option.
|
|
32265
|
+
* @throws {RequiredError}
|
|
32266
|
+
*/
|
|
32267
|
+
sendCampaignV1(profileUuid: string, campaignUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>>;
|
|
32268
|
+
/**
|
|
32269
|
+
* Update a campaign\'s content, sender, template and audience. Only `draft`, `scheduled` and `failed` campaigns can be updated; a campaign that is sending or already sent is rejected. Updating a `failed` campaign moves it back to `draft`. Audience changes replace rather than merge: `all_contacts: true` targets every contact of the profile, while `segment_uuids` replaces the segments currently targeted. Leave both out to keep the audience as it is. This does not send the campaign - use the send endpoint for that.
|
|
32270
|
+
* @summary Update campaign
|
|
32271
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
32272
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
32273
|
+
* @param {ReachV1CampaignsUpdateRequest} reachV1CampaignsUpdateRequest
|
|
32274
|
+
* @param {*} [options] Override http request option.
|
|
32275
|
+
* @throws {RequiredError}
|
|
32276
|
+
*/
|
|
32277
|
+
updateCampaignV1(profileUuid: string, campaignUuid: string, reachV1CampaignsUpdateRequest: ReachV1CampaignsUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1CampaignsCreatedCampaignResource>>;
|
|
32179
32278
|
};
|
|
32180
32279
|
/**
|
|
32181
32280
|
* ReachCampaignsApi - factory interface
|
|
@@ -32222,6 +32321,25 @@ export declare const ReachCampaignsApiFactory: (configuration?: Configuration, b
|
|
|
32222
32321
|
* @throws {RequiredError}
|
|
32223
32322
|
*/
|
|
32224
32323
|
listCampaignsV1(profileUuid: string, status?: ListCampaignsV1StatusEnum, type?: ListCampaignsV1TypeEnum, sortDirection?: ListCampaignsV1SortDirectionEnum, page?: number, perPage?: number, options?: RawAxiosRequestConfig): AxiosPromise<ReachListCampaignsV1200Response>;
|
|
32324
|
+
/**
|
|
32325
|
+
* Send a campaign now to the audience stored on it. This is irreversible: once accepted, the emails go out and cannot be recalled. Confirm with the customer before calling. The campaign needs a subject, sender, template and audience first - set them with the update endpoint. Delivery is asynchronous, so success means accepted, not delivered: the campaign moves to `sending` and later to `publish`, or to `failed`. Read the campaign to follow it. The request is rejected when the campaign has no recipients, its sender domain is not verified or is blocked, the plan\'s sending limits would be exceeded, or the campaign is already being sent.
|
|
32326
|
+
* @summary Send campaign
|
|
32327
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
32328
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
32329
|
+
* @param {*} [options] Override http request option.
|
|
32330
|
+
* @throws {RequiredError}
|
|
32331
|
+
*/
|
|
32332
|
+
sendCampaignV1(profileUuid: string, campaignUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource>;
|
|
32333
|
+
/**
|
|
32334
|
+
* Update a campaign\'s content, sender, template and audience. Only `draft`, `scheduled` and `failed` campaigns can be updated; a campaign that is sending or already sent is rejected. Updating a `failed` campaign moves it back to `draft`. Audience changes replace rather than merge: `all_contacts: true` targets every contact of the profile, while `segment_uuids` replaces the segments currently targeted. Leave both out to keep the audience as it is. This does not send the campaign - use the send endpoint for that.
|
|
32335
|
+
* @summary Update campaign
|
|
32336
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
32337
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
32338
|
+
* @param {ReachV1CampaignsUpdateRequest} reachV1CampaignsUpdateRequest
|
|
32339
|
+
* @param {*} [options] Override http request option.
|
|
32340
|
+
* @throws {RequiredError}
|
|
32341
|
+
*/
|
|
32342
|
+
updateCampaignV1(profileUuid: string, campaignUuid: string, reachV1CampaignsUpdateRequest: ReachV1CampaignsUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1CampaignsCreatedCampaignResource>;
|
|
32225
32343
|
};
|
|
32226
32344
|
/**
|
|
32227
32345
|
* ReachCampaignsApi - object-oriented interface
|
|
@@ -32274,6 +32392,27 @@ export declare class ReachCampaignsApi extends BaseAPI {
|
|
|
32274
32392
|
* @memberof ReachCampaignsApi
|
|
32275
32393
|
*/
|
|
32276
32394
|
listCampaignsV1(profileUuid: string, status?: ListCampaignsV1StatusEnum, type?: ListCampaignsV1TypeEnum, sortDirection?: ListCampaignsV1SortDirectionEnum, page?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ReachListCampaignsV1200Response, any, {}, any>>;
|
|
32395
|
+
/**
|
|
32396
|
+
* Send a campaign now to the audience stored on it. This is irreversible: once accepted, the emails go out and cannot be recalled. Confirm with the customer before calling. The campaign needs a subject, sender, template and audience first - set them with the update endpoint. Delivery is asynchronous, so success means accepted, not delivered: the campaign moves to `sending` and later to `publish`, or to `failed`. Read the campaign to follow it. The request is rejected when the campaign has no recipients, its sender domain is not verified or is blocked, the plan\'s sending limits would be exceeded, or the campaign is already being sent.
|
|
32397
|
+
* @summary Send campaign
|
|
32398
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
32399
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
32400
|
+
* @param {*} [options] Override http request option.
|
|
32401
|
+
* @throws {RequiredError}
|
|
32402
|
+
* @memberof ReachCampaignsApi
|
|
32403
|
+
*/
|
|
32404
|
+
sendCampaignV1(profileUuid: string, campaignUuid: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CommonSuccessEmptyResource, any, {}, any>>;
|
|
32405
|
+
/**
|
|
32406
|
+
* Update a campaign\'s content, sender, template and audience. Only `draft`, `scheduled` and `failed` campaigns can be updated; a campaign that is sending or already sent is rejected. Updating a `failed` campaign moves it back to `draft`. Audience changes replace rather than merge: `all_contacts: true` targets every contact of the profile, while `segment_uuids` replaces the segments currently targeted. Leave both out to keep the audience as it is. This does not send the campaign - use the send endpoint for that.
|
|
32407
|
+
* @summary Update campaign
|
|
32408
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
32409
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
32410
|
+
* @param {ReachV1CampaignsUpdateRequest} reachV1CampaignsUpdateRequest
|
|
32411
|
+
* @param {*} [options] Override http request option.
|
|
32412
|
+
* @throws {RequiredError}
|
|
32413
|
+
* @memberof ReachCampaignsApi
|
|
32414
|
+
*/
|
|
32415
|
+
updateCampaignV1(profileUuid: string, campaignUuid: string, reachV1CampaignsUpdateRequest: ReachV1CampaignsUpdateRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ReachV1CampaignsCreatedCampaignResource, any, {}, any>>;
|
|
32277
32416
|
}
|
|
32278
32417
|
/**
|
|
32279
32418
|
* @export
|