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/esm/api.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.16.
|
|
6
|
+
* API Version: 2.16.1
|
|
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
|
|
@@ -25146,6 +25146,83 @@ export const ReachCampaignsApiAxiosParamCreator = function (configuration) {
|
|
|
25146
25146
|
options: localVarRequestOptions,
|
|
25147
25147
|
};
|
|
25148
25148
|
}),
|
|
25149
|
+
/**
|
|
25150
|
+
* 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.
|
|
25151
|
+
* @summary Send campaign
|
|
25152
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25153
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
25154
|
+
* @param {*} [options] Override http request option.
|
|
25155
|
+
* @throws {RequiredError}
|
|
25156
|
+
*/
|
|
25157
|
+
sendCampaignV1: (profileUuid_1, campaignUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, campaignUuid_1, ...args_1], void 0, function* (profileUuid, campaignUuid, options = {}) {
|
|
25158
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
25159
|
+
assertParamExists('sendCampaignV1', 'profileUuid', profileUuid);
|
|
25160
|
+
// verify required parameter 'campaignUuid' is not null or undefined
|
|
25161
|
+
assertParamExists('sendCampaignV1', 'campaignUuid', campaignUuid);
|
|
25162
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid}/send`
|
|
25163
|
+
.replace(`{${"profileUuid"}}`, encodePathParam('profileUuid', profileUuid))
|
|
25164
|
+
.replace(`{${"campaignUuid"}}`, encodePathParam('campaignUuid', campaignUuid));
|
|
25165
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
25166
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
25167
|
+
let baseOptions;
|
|
25168
|
+
if (configuration) {
|
|
25169
|
+
baseOptions = configuration.baseOptions;
|
|
25170
|
+
}
|
|
25171
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
25172
|
+
const localVarHeaderParameter = {};
|
|
25173
|
+
const localVarQueryParameter = {};
|
|
25174
|
+
// authentication apiToken required
|
|
25175
|
+
// http bearer authentication required
|
|
25176
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
25177
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
25178
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
25179
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
25180
|
+
return {
|
|
25181
|
+
url: toPathString(localVarUrlObj),
|
|
25182
|
+
options: localVarRequestOptions,
|
|
25183
|
+
};
|
|
25184
|
+
}),
|
|
25185
|
+
/**
|
|
25186
|
+
* 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.
|
|
25187
|
+
* @summary Update campaign
|
|
25188
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25189
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
25190
|
+
* @param {ReachV1CampaignsUpdateRequest} reachV1CampaignsUpdateRequest
|
|
25191
|
+
* @param {*} [options] Override http request option.
|
|
25192
|
+
* @throws {RequiredError}
|
|
25193
|
+
*/
|
|
25194
|
+
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 = {}) {
|
|
25195
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
25196
|
+
assertParamExists('updateCampaignV1', 'profileUuid', profileUuid);
|
|
25197
|
+
// verify required parameter 'campaignUuid' is not null or undefined
|
|
25198
|
+
assertParamExists('updateCampaignV1', 'campaignUuid', campaignUuid);
|
|
25199
|
+
// verify required parameter 'reachV1CampaignsUpdateRequest' is not null or undefined
|
|
25200
|
+
assertParamExists('updateCampaignV1', 'reachV1CampaignsUpdateRequest', reachV1CampaignsUpdateRequest);
|
|
25201
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid}`
|
|
25202
|
+
.replace(`{${"profileUuid"}}`, encodePathParam('profileUuid', profileUuid))
|
|
25203
|
+
.replace(`{${"campaignUuid"}}`, encodePathParam('campaignUuid', campaignUuid));
|
|
25204
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
25205
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
25206
|
+
let baseOptions;
|
|
25207
|
+
if (configuration) {
|
|
25208
|
+
baseOptions = configuration.baseOptions;
|
|
25209
|
+
}
|
|
25210
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
25211
|
+
const localVarHeaderParameter = {};
|
|
25212
|
+
const localVarQueryParameter = {};
|
|
25213
|
+
// authentication apiToken required
|
|
25214
|
+
// http bearer authentication required
|
|
25215
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
25216
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
25217
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
25218
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
25219
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
25220
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1CampaignsUpdateRequest, localVarRequestOptions, configuration);
|
|
25221
|
+
return {
|
|
25222
|
+
url: toPathString(localVarUrlObj),
|
|
25223
|
+
options: localVarRequestOptions,
|
|
25224
|
+
};
|
|
25225
|
+
}),
|
|
25149
25226
|
};
|
|
25150
25227
|
};
|
|
25151
25228
|
/**
|
|
@@ -25223,6 +25300,39 @@ export const ReachCampaignsApiFp = function (configuration) {
|
|
|
25223
25300
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
25224
25301
|
});
|
|
25225
25302
|
},
|
|
25303
|
+
/**
|
|
25304
|
+
* 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.
|
|
25305
|
+
* @summary Send campaign
|
|
25306
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25307
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
25308
|
+
* @param {*} [options] Override http request option.
|
|
25309
|
+
* @throws {RequiredError}
|
|
25310
|
+
*/
|
|
25311
|
+
sendCampaignV1(profileUuid, campaignUuid, options) {
|
|
25312
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25313
|
+
var _a, _b;
|
|
25314
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.sendCampaignV1(profileUuid, campaignUuid, options);
|
|
25315
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachCampaignsApi.sendCampaignV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
25316
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
25317
|
+
});
|
|
25318
|
+
},
|
|
25319
|
+
/**
|
|
25320
|
+
* 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.
|
|
25321
|
+
* @summary Update campaign
|
|
25322
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25323
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
25324
|
+
* @param {ReachV1CampaignsUpdateRequest} reachV1CampaignsUpdateRequest
|
|
25325
|
+
* @param {*} [options] Override http request option.
|
|
25326
|
+
* @throws {RequiredError}
|
|
25327
|
+
*/
|
|
25328
|
+
updateCampaignV1(profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options) {
|
|
25329
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25330
|
+
var _a, _b;
|
|
25331
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateCampaignV1(profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options);
|
|
25332
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachCampaignsApi.updateCampaignV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
25333
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
25334
|
+
});
|
|
25335
|
+
},
|
|
25226
25336
|
};
|
|
25227
25337
|
};
|
|
25228
25338
|
/**
|
|
@@ -25280,6 +25390,29 @@ export const ReachCampaignsApiFactory = function (configuration, basePath, axios
|
|
|
25280
25390
|
listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options) {
|
|
25281
25391
|
return localVarFp.listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options).then((request) => request(axios, basePath));
|
|
25282
25392
|
},
|
|
25393
|
+
/**
|
|
25394
|
+
* 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.
|
|
25395
|
+
* @summary Send campaign
|
|
25396
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25397
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
25398
|
+
* @param {*} [options] Override http request option.
|
|
25399
|
+
* @throws {RequiredError}
|
|
25400
|
+
*/
|
|
25401
|
+
sendCampaignV1(profileUuid, campaignUuid, options) {
|
|
25402
|
+
return localVarFp.sendCampaignV1(profileUuid, campaignUuid, options).then((request) => request(axios, basePath));
|
|
25403
|
+
},
|
|
25404
|
+
/**
|
|
25405
|
+
* 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.
|
|
25406
|
+
* @summary Update campaign
|
|
25407
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25408
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
25409
|
+
* @param {ReachV1CampaignsUpdateRequest} reachV1CampaignsUpdateRequest
|
|
25410
|
+
* @param {*} [options] Override http request option.
|
|
25411
|
+
* @throws {RequiredError}
|
|
25412
|
+
*/
|
|
25413
|
+
updateCampaignV1(profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options) {
|
|
25414
|
+
return localVarFp.updateCampaignV1(profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options).then((request) => request(axios, basePath));
|
|
25415
|
+
},
|
|
25283
25416
|
};
|
|
25284
25417
|
};
|
|
25285
25418
|
/**
|
|
@@ -25341,6 +25474,31 @@ export class ReachCampaignsApi extends BaseAPI {
|
|
|
25341
25474
|
listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options) {
|
|
25342
25475
|
return ReachCampaignsApiFp(this.configuration).listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options).then((request) => request(this.axios, this.basePath));
|
|
25343
25476
|
}
|
|
25477
|
+
/**
|
|
25478
|
+
* 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.
|
|
25479
|
+
* @summary Send campaign
|
|
25480
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25481
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
25482
|
+
* @param {*} [options] Override http request option.
|
|
25483
|
+
* @throws {RequiredError}
|
|
25484
|
+
* @memberof ReachCampaignsApi
|
|
25485
|
+
*/
|
|
25486
|
+
sendCampaignV1(profileUuid, campaignUuid, options) {
|
|
25487
|
+
return ReachCampaignsApiFp(this.configuration).sendCampaignV1(profileUuid, campaignUuid, options).then((request) => request(this.axios, this.basePath));
|
|
25488
|
+
}
|
|
25489
|
+
/**
|
|
25490
|
+
* 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.
|
|
25491
|
+
* @summary Update campaign
|
|
25492
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25493
|
+
* @param {string} campaignUuid Campaign uuid parameter
|
|
25494
|
+
* @param {ReachV1CampaignsUpdateRequest} reachV1CampaignsUpdateRequest
|
|
25495
|
+
* @param {*} [options] Override http request option.
|
|
25496
|
+
* @throws {RequiredError}
|
|
25497
|
+
* @memberof ReachCampaignsApi
|
|
25498
|
+
*/
|
|
25499
|
+
updateCampaignV1(profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options) {
|
|
25500
|
+
return ReachCampaignsApiFp(this.configuration).updateCampaignV1(profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
25501
|
+
}
|
|
25344
25502
|
}
|
|
25345
25503
|
/**
|
|
25346
25504
|
* @export
|
package/dist/esm/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/esm/base.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.16.
|
|
6
|
+
* API Version: 2.16.1
|
|
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: 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/esm/common.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.16.
|
|
6
|
+
* API Version: 2.16.1
|
|
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: 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
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.16.
|
|
6
|
+
* API Version: 2.16.1
|
|
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/2.16.
|
|
16
|
+
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) });
|
|
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: 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/esm/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.16.
|
|
6
|
+
* API Version: 2.16.1
|
|
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: 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/index.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
|
|
@@ -8,6 +8,8 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
8
8
|
|[**getCampaignDetailsV1**](#getcampaigndetailsv1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid} | Get campaign details|
|
|
9
9
|
|[**getCampaignPerformanceV1**](#getcampaignperformancev1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid}/statistics | Get campaign performance|
|
|
10
10
|
|[**listCampaignsV1**](#listcampaignsv1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns | List campaigns|
|
|
11
|
+
|[**sendCampaignV1**](#sendcampaignv1) | **POST** /api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid}/send | Send campaign|
|
|
12
|
+
|[**updateCampaignV1**](#updatecampaignv1) | **PATCH** /api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid} | Update campaign|
|
|
11
13
|
|
|
12
14
|
# **createADraftCampaignV1**
|
|
13
15
|
> ReachV1CampaignsCreatedCampaignResource createADraftCampaignV1(reachV1CampaignsStoreRequest)
|
|
@@ -247,3 +249,120 @@ const { status, data } = await apiInstance.listCampaignsV1(
|
|
|
247
249
|
|
|
248
250
|
[[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)
|
|
249
251
|
|
|
252
|
+
# **sendCampaignV1**
|
|
253
|
+
> CommonSuccessEmptyResource sendCampaignV1()
|
|
254
|
+
|
|
255
|
+
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.
|
|
256
|
+
|
|
257
|
+
### Example
|
|
258
|
+
|
|
259
|
+
```typescript
|
|
260
|
+
import {
|
|
261
|
+
ReachCampaignsApi,
|
|
262
|
+
Configuration
|
|
263
|
+
} from '@hostinger/sdk';
|
|
264
|
+
|
|
265
|
+
const configuration = new Configuration();
|
|
266
|
+
const apiInstance = new ReachCampaignsApi(configuration);
|
|
267
|
+
|
|
268
|
+
let profileUuid: string; //Profile uuid parameter (default to undefined)
|
|
269
|
+
let campaignUuid: string; //Campaign uuid parameter (default to undefined)
|
|
270
|
+
|
|
271
|
+
const { status, data } = await apiInstance.sendCampaignV1(
|
|
272
|
+
profileUuid,
|
|
273
|
+
campaignUuid
|
|
274
|
+
);
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Parameters
|
|
278
|
+
|
|
279
|
+
|Name | Type | Description | Notes|
|
|
280
|
+
|------------- | ------------- | ------------- | -------------|
|
|
281
|
+
| **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
|
|
282
|
+
| **campaignUuid** | [**string**] | Campaign uuid parameter | defaults to undefined|
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
### Return type
|
|
286
|
+
|
|
287
|
+
**CommonSuccessEmptyResource**
|
|
288
|
+
|
|
289
|
+
### Authorization
|
|
290
|
+
|
|
291
|
+
[apiToken](../README.md#apiToken)
|
|
292
|
+
|
|
293
|
+
### HTTP request headers
|
|
294
|
+
|
|
295
|
+
- **Content-Type**: Not defined
|
|
296
|
+
- **Accept**: application/json
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
### HTTP response details
|
|
300
|
+
| Status code | Description | Response headers |
|
|
301
|
+
|-------------|-------------|------------------|
|
|
302
|
+
|**200** | Success empty response | - |
|
|
303
|
+
|**401** | Unauthenticated response | - |
|
|
304
|
+
|**500** | Error response | - |
|
|
305
|
+
|
|
306
|
+
[[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)
|
|
307
|
+
|
|
308
|
+
# **updateCampaignV1**
|
|
309
|
+
> ReachV1CampaignsCreatedCampaignResource updateCampaignV1(reachV1CampaignsUpdateRequest)
|
|
310
|
+
|
|
311
|
+
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.
|
|
312
|
+
|
|
313
|
+
### Example
|
|
314
|
+
|
|
315
|
+
```typescript
|
|
316
|
+
import {
|
|
317
|
+
ReachCampaignsApi,
|
|
318
|
+
Configuration,
|
|
319
|
+
ReachV1CampaignsUpdateRequest
|
|
320
|
+
} from '@hostinger/sdk';
|
|
321
|
+
|
|
322
|
+
const configuration = new Configuration();
|
|
323
|
+
const apiInstance = new ReachCampaignsApi(configuration);
|
|
324
|
+
|
|
325
|
+
let profileUuid: string; //Profile uuid parameter (default to undefined)
|
|
326
|
+
let campaignUuid: string; //Campaign uuid parameter (default to undefined)
|
|
327
|
+
let reachV1CampaignsUpdateRequest: ReachV1CampaignsUpdateRequest; //
|
|
328
|
+
|
|
329
|
+
const { status, data } = await apiInstance.updateCampaignV1(
|
|
330
|
+
profileUuid,
|
|
331
|
+
campaignUuid,
|
|
332
|
+
reachV1CampaignsUpdateRequest
|
|
333
|
+
);
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### Parameters
|
|
337
|
+
|
|
338
|
+
|Name | Type | Description | Notes|
|
|
339
|
+
|------------- | ------------- | ------------- | -------------|
|
|
340
|
+
| **reachV1CampaignsUpdateRequest** | **ReachV1CampaignsUpdateRequest**| | |
|
|
341
|
+
| **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
|
|
342
|
+
| **campaignUuid** | [**string**] | Campaign uuid parameter | defaults to undefined|
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
### Return type
|
|
346
|
+
|
|
347
|
+
**ReachV1CampaignsCreatedCampaignResource**
|
|
348
|
+
|
|
349
|
+
### Authorization
|
|
350
|
+
|
|
351
|
+
[apiToken](../README.md#apiToken)
|
|
352
|
+
|
|
353
|
+
### HTTP request headers
|
|
354
|
+
|
|
355
|
+
- **Content-Type**: application/json
|
|
356
|
+
- **Accept**: application/json
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
### HTTP response details
|
|
360
|
+
| Status code | Description | Response headers |
|
|
361
|
+
|-------------|-------------|------------------|
|
|
362
|
+
|**200** | Success response | - |
|
|
363
|
+
|**422** | Validation error response | - |
|
|
364
|
+
|**401** | Unauthenticated response | - |
|
|
365
|
+
|**500** | Error response | - |
|
|
366
|
+
|
|
367
|
+
[[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)
|
|
368
|
+
|
|
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
|
|
|
12
12
|
**sender_name** | **string** | | [optional] [default to undefined]
|
|
13
13
|
**sender_email** | **string** | | [optional] [default to undefined]
|
|
14
14
|
**template_uuid** | **string** | | [optional] [default to undefined]
|
|
15
|
-
**status** | **string** | Always `draft` for a campaign that was just created. | [optional] [default to undefined]
|
|
15
|
+
**status** | **string** | Always `draft` for a campaign that was just created; the current status after an update. | [optional] [default to undefined]
|
|
16
16
|
**type** | **string** | | [optional] [default to undefined]
|
|
17
17
|
**is_all_contacts** | **boolean** | Whether the campaign targets every contact instead of selected segments. | [optional] [default to undefined]
|
|
18
18
|
**metadata** | **{ [key: string]: string; }** | The stored extra fields, including the ones Reach sets itself. | [optional] [default to undefined]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# ReachV1CampaignsUpdateRequest
|
|
2
|
+
|
|
3
|
+
Update a campaign. Send at least one field; fields left out keep their current value.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**title** | **string** | Name the campaign is listed under. Not shown to the recipients. | [optional] [default to undefined]
|
|
10
|
+
**subject** | **string** | Subject line of the email. | [optional] [default to undefined]
|
|
11
|
+
**sender_name** | **string** | From name shown to the recipients. | [optional] [default to undefined]
|
|
12
|
+
**sender_email** | **string** | From address of the campaign. Its domain has to be verified on the profile before the campaign can be sent. | [optional] [default to undefined]
|
|
13
|
+
**template_uuid** | **string** | Template to send, as returned by the template endpoints. | [optional] [default to undefined]
|
|
14
|
+
**all_contacts** | **boolean** | `true` targets every contact of the profile, `false` targets only `segment_uuids`. Required when `segment_uuids` or `excluded_segment_uuids` is sent. | [optional] [default to undefined]
|
|
15
|
+
**segment_uuids** | **Array<string>** | Segments to target. Replaces the segments currently targeted. | [optional] [default to undefined]
|
|
16
|
+
**excluded_segment_uuids** | **Array<string>** | Segments to leave out. Only allowed together with `all_contacts: true`. | [optional] [default to undefined]
|
|
17
|
+
**metadata** | [**ReachV1CampaignsStoreRequestMetadata**](ReachV1CampaignsStoreRequestMetadata.md) | | [optional] [default to undefined]
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { ReachV1CampaignsUpdateRequest } from '@hostinger/sdk';
|
|
23
|
+
|
|
24
|
+
const instance: ReachV1CampaignsUpdateRequest = {
|
|
25
|
+
title,
|
|
26
|
+
subject,
|
|
27
|
+
sender_name,
|
|
28
|
+
sender_email,
|
|
29
|
+
template_uuid,
|
|
30
|
+
all_contacts,
|
|
31
|
+
segment_uuids,
|
|
32
|
+
excluded_segment_uuids,
|
|
33
|
+
metadata,
|
|
34
|
+
};
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.16.
|
|
6
|
+
* API Version: 2.16.1
|
|
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
|