@hostinger/sdk 1.46.3 → 1.47.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 +483 -59
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +341 -59
- package/dist/api.js +281 -12
- 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 +341 -59
- package/dist/esm/api.js +267 -2
- 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/AgencyHostingV1SetupsCreateSetupRequest.md +0 -4
- package/docs/ReachCampaignsApi.md +59 -0
- package/docs/ReachTemplatesApi.md +120 -0
- package/docs/ReachV1CampaignsCreatedCampaignResource.md +43 -0
- package/docs/ReachV1CampaignsStoreRequest.md +31 -0
- package/docs/ReachV1CampaignsStoreRequestMetadata.md +23 -0
- package/docs/ReachV1TemplatesStoreRequest.md +23 -0
- package/docs/ReachV1TemplatesTemplateResource.md +26 -0
- package/index.ts +1 -1
- package/package.json +1 -1
- package/docs/AgencyHostingV1SetupsCreateSetupRequestClone.md +0 -21
- package/docs/AgencyHostingV1SetupsCreateSetupRequestDeriveDomain.md +0 -21
- package/docs/AgencyHostingV1SetupsCreateSetupRequestDeriveDomainFromVhost.md +0 -22
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.47.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
|
|
@@ -33,7 +33,6 @@ export const AgencyHostingV1PhpOptionResourceTypeEnum = {
|
|
|
33
33
|
List: 'list'
|
|
34
34
|
};
|
|
35
35
|
export const AgencyHostingV1SetupsCreateSetupRequestTypeEnum = {
|
|
36
|
-
Horizons: 'horizons',
|
|
37
36
|
NodeStatic: 'node-static'
|
|
38
37
|
};
|
|
39
38
|
export const AgencyHostingV1SetupsWebsiteSetupStatusResourceStatusEnum = {
|
|
@@ -572,6 +571,18 @@ export const ReachV1CampaignsCampaignResourceTypeEnum = {
|
|
|
572
571
|
Automation: 'automation',
|
|
573
572
|
DoubleOptIn: 'double_opt_in'
|
|
574
573
|
};
|
|
574
|
+
export const ReachV1CampaignsCreatedCampaignResourceStatusEnum = {
|
|
575
|
+
Draft: 'draft',
|
|
576
|
+
Scheduled: 'scheduled',
|
|
577
|
+
Sending: 'sending',
|
|
578
|
+
Publish: 'publish',
|
|
579
|
+
Failed: 'failed'
|
|
580
|
+
};
|
|
581
|
+
export const ReachV1CampaignsCreatedCampaignResourceTypeEnum = {
|
|
582
|
+
Campaign: 'campaign',
|
|
583
|
+
Automation: 'automation',
|
|
584
|
+
DoubleOptIn: 'double_opt_in'
|
|
585
|
+
};
|
|
575
586
|
export const ReachV1ContactsContactDetailsResourceSubscriptionStatusEnum = {
|
|
576
587
|
Subscribed: 'subscribed',
|
|
577
588
|
Unsubscribed: 'unsubscribed',
|
|
@@ -19812,6 +19823,43 @@ export const ListAutomationsV1SortDirectionEnum = {
|
|
|
19812
19823
|
*/
|
|
19813
19824
|
export const ReachCampaignsApiAxiosParamCreator = function (configuration) {
|
|
19814
19825
|
return {
|
|
19826
|
+
/**
|
|
19827
|
+
* Create a campaign in a profile. The campaign is created as a draft, so nothing is sent and no contact is touched. It has no audience yet either - targeting and scheduling are not part of this request, the draft is finished and sent from the Reach interface.
|
|
19828
|
+
* @summary Create a draft campaign
|
|
19829
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
19830
|
+
* @param {ReachV1CampaignsStoreRequest} reachV1CampaignsStoreRequest
|
|
19831
|
+
* @param {*} [options] Override http request option.
|
|
19832
|
+
* @throws {RequiredError}
|
|
19833
|
+
*/
|
|
19834
|
+
createADraftCampaignV1: (profileUuid_1, reachV1CampaignsStoreRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, reachV1CampaignsStoreRequest_1, ...args_1], void 0, function* (profileUuid, reachV1CampaignsStoreRequest, options = {}) {
|
|
19835
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
19836
|
+
assertParamExists('createADraftCampaignV1', 'profileUuid', profileUuid);
|
|
19837
|
+
// verify required parameter 'reachV1CampaignsStoreRequest' is not null or undefined
|
|
19838
|
+
assertParamExists('createADraftCampaignV1', 'reachV1CampaignsStoreRequest', reachV1CampaignsStoreRequest);
|
|
19839
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/campaigns`
|
|
19840
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
|
|
19841
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
19842
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
19843
|
+
let baseOptions;
|
|
19844
|
+
if (configuration) {
|
|
19845
|
+
baseOptions = configuration.baseOptions;
|
|
19846
|
+
}
|
|
19847
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
19848
|
+
const localVarHeaderParameter = {};
|
|
19849
|
+
const localVarQueryParameter = {};
|
|
19850
|
+
// authentication apiToken required
|
|
19851
|
+
// http bearer authentication required
|
|
19852
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
19853
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
19854
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
19855
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
19856
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
19857
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1CampaignsStoreRequest, localVarRequestOptions, configuration);
|
|
19858
|
+
return {
|
|
19859
|
+
url: toPathString(localVarUrlObj),
|
|
19860
|
+
options: localVarRequestOptions,
|
|
19861
|
+
};
|
|
19862
|
+
}),
|
|
19815
19863
|
/**
|
|
19816
19864
|
* 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.
|
|
19817
19865
|
* @summary Get campaign details
|
|
@@ -19945,6 +19993,22 @@ export const ReachCampaignsApiAxiosParamCreator = function (configuration) {
|
|
|
19945
19993
|
export const ReachCampaignsApiFp = function (configuration) {
|
|
19946
19994
|
const localVarAxiosParamCreator = ReachCampaignsApiAxiosParamCreator(configuration);
|
|
19947
19995
|
return {
|
|
19996
|
+
/**
|
|
19997
|
+
* Create a campaign in a profile. The campaign is created as a draft, so nothing is sent and no contact is touched. It has no audience yet either - targeting and scheduling are not part of this request, the draft is finished and sent from the Reach interface.
|
|
19998
|
+
* @summary Create a draft campaign
|
|
19999
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
20000
|
+
* @param {ReachV1CampaignsStoreRequest} reachV1CampaignsStoreRequest
|
|
20001
|
+
* @param {*} [options] Override http request option.
|
|
20002
|
+
* @throws {RequiredError}
|
|
20003
|
+
*/
|
|
20004
|
+
createADraftCampaignV1(profileUuid, reachV1CampaignsStoreRequest, options) {
|
|
20005
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20006
|
+
var _a, _b;
|
|
20007
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createADraftCampaignV1(profileUuid, reachV1CampaignsStoreRequest, options);
|
|
20008
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachCampaignsApi.createADraftCampaignV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
20009
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
20010
|
+
});
|
|
20011
|
+
},
|
|
19948
20012
|
/**
|
|
19949
20013
|
* 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.
|
|
19950
20014
|
* @summary Get campaign details
|
|
@@ -20006,6 +20070,17 @@ export const ReachCampaignsApiFp = function (configuration) {
|
|
|
20006
20070
|
export const ReachCampaignsApiFactory = function (configuration, basePath, axios) {
|
|
20007
20071
|
const localVarFp = ReachCampaignsApiFp(configuration);
|
|
20008
20072
|
return {
|
|
20073
|
+
/**
|
|
20074
|
+
* Create a campaign in a profile. The campaign is created as a draft, so nothing is sent and no contact is touched. It has no audience yet either - targeting and scheduling are not part of this request, the draft is finished and sent from the Reach interface.
|
|
20075
|
+
* @summary Create a draft campaign
|
|
20076
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
20077
|
+
* @param {ReachV1CampaignsStoreRequest} reachV1CampaignsStoreRequest
|
|
20078
|
+
* @param {*} [options] Override http request option.
|
|
20079
|
+
* @throws {RequiredError}
|
|
20080
|
+
*/
|
|
20081
|
+
createADraftCampaignV1(profileUuid, reachV1CampaignsStoreRequest, options) {
|
|
20082
|
+
return localVarFp.createADraftCampaignV1(profileUuid, reachV1CampaignsStoreRequest, options).then((request) => request(axios, basePath));
|
|
20083
|
+
},
|
|
20009
20084
|
/**
|
|
20010
20085
|
* 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.
|
|
20011
20086
|
* @summary Get campaign details
|
|
@@ -20052,6 +20127,18 @@ export const ReachCampaignsApiFactory = function (configuration, basePath, axios
|
|
|
20052
20127
|
* @extends {BaseAPI}
|
|
20053
20128
|
*/
|
|
20054
20129
|
export class ReachCampaignsApi extends BaseAPI {
|
|
20130
|
+
/**
|
|
20131
|
+
* Create a campaign in a profile. The campaign is created as a draft, so nothing is sent and no contact is touched. It has no audience yet either - targeting and scheduling are not part of this request, the draft is finished and sent from the Reach interface.
|
|
20132
|
+
* @summary Create a draft campaign
|
|
20133
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
20134
|
+
* @param {ReachV1CampaignsStoreRequest} reachV1CampaignsStoreRequest
|
|
20135
|
+
* @param {*} [options] Override http request option.
|
|
20136
|
+
* @throws {RequiredError}
|
|
20137
|
+
* @memberof ReachCampaignsApi
|
|
20138
|
+
*/
|
|
20139
|
+
createADraftCampaignV1(profileUuid, reachV1CampaignsStoreRequest, options) {
|
|
20140
|
+
return ReachCampaignsApiFp(this.configuration).createADraftCampaignV1(profileUuid, reachV1CampaignsStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
20141
|
+
}
|
|
20055
20142
|
/**
|
|
20056
20143
|
* 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.
|
|
20057
20144
|
* @summary Get campaign details
|
|
@@ -23632,6 +23719,184 @@ export class ReachTagsApi extends BaseAPI {
|
|
|
23632
23719
|
return ReachTagsApiFp(this.configuration).renameATagV1(profileUuid, tagUuid, reachV1ContactsTagsUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
23633
23720
|
}
|
|
23634
23721
|
}
|
|
23722
|
+
/**
|
|
23723
|
+
* ReachTemplatesApi - axios parameter creator
|
|
23724
|
+
* @export
|
|
23725
|
+
*/
|
|
23726
|
+
export const ReachTemplatesApiAxiosParamCreator = function (configuration) {
|
|
23727
|
+
return {
|
|
23728
|
+
/**
|
|
23729
|
+
* Create an email template in a profile. The template holds the HTML body a campaign reuses, so it can be created before any campaign exists. Only the template metadata comes back - keep the returned `uuid` to reference it as the `template_uuid` of a campaign.
|
|
23730
|
+
* @summary Create an email template
|
|
23731
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
23732
|
+
* @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
|
|
23733
|
+
* @param {*} [options] Override http request option.
|
|
23734
|
+
* @throws {RequiredError}
|
|
23735
|
+
*/
|
|
23736
|
+
createAnEmailTemplateV1: (profileUuid_1, reachV1TemplatesStoreRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, reachV1TemplatesStoreRequest_1, ...args_1], void 0, function* (profileUuid, reachV1TemplatesStoreRequest, options = {}) {
|
|
23737
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
23738
|
+
assertParamExists('createAnEmailTemplateV1', 'profileUuid', profileUuid);
|
|
23739
|
+
// verify required parameter 'reachV1TemplatesStoreRequest' is not null or undefined
|
|
23740
|
+
assertParamExists('createAnEmailTemplateV1', 'reachV1TemplatesStoreRequest', reachV1TemplatesStoreRequest);
|
|
23741
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/templates`
|
|
23742
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
|
|
23743
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
23744
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
23745
|
+
let baseOptions;
|
|
23746
|
+
if (configuration) {
|
|
23747
|
+
baseOptions = configuration.baseOptions;
|
|
23748
|
+
}
|
|
23749
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
23750
|
+
const localVarHeaderParameter = {};
|
|
23751
|
+
const localVarQueryParameter = {};
|
|
23752
|
+
// authentication apiToken required
|
|
23753
|
+
// http bearer authentication required
|
|
23754
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
23755
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
23756
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
23757
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
23758
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
23759
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1TemplatesStoreRequest, localVarRequestOptions, configuration);
|
|
23760
|
+
return {
|
|
23761
|
+
url: toPathString(localVarUrlObj),
|
|
23762
|
+
options: localVarRequestOptions,
|
|
23763
|
+
};
|
|
23764
|
+
}),
|
|
23765
|
+
/**
|
|
23766
|
+
* Get a list of the email templates in a profile, most recently updated first. Templates are the reusable email bodies a campaign is built from. The list is not paginated and only the metadata is returned - the template content itself is not exposed. Use the `uuid` of a template as the `template_uuid` when creating a campaign.
|
|
23767
|
+
* @summary List email templates
|
|
23768
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
23769
|
+
* @param {*} [options] Override http request option.
|
|
23770
|
+
* @throws {RequiredError}
|
|
23771
|
+
*/
|
|
23772
|
+
listEmailTemplatesV1: (profileUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, ...args_1], void 0, function* (profileUuid, options = {}) {
|
|
23773
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
23774
|
+
assertParamExists('listEmailTemplatesV1', 'profileUuid', profileUuid);
|
|
23775
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/templates`
|
|
23776
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
|
|
23777
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
23778
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
23779
|
+
let baseOptions;
|
|
23780
|
+
if (configuration) {
|
|
23781
|
+
baseOptions = configuration.baseOptions;
|
|
23782
|
+
}
|
|
23783
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
23784
|
+
const localVarHeaderParameter = {};
|
|
23785
|
+
const localVarQueryParameter = {};
|
|
23786
|
+
// authentication apiToken required
|
|
23787
|
+
// http bearer authentication required
|
|
23788
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
23789
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
23790
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
23791
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
23792
|
+
return {
|
|
23793
|
+
url: toPathString(localVarUrlObj),
|
|
23794
|
+
options: localVarRequestOptions,
|
|
23795
|
+
};
|
|
23796
|
+
}),
|
|
23797
|
+
};
|
|
23798
|
+
};
|
|
23799
|
+
/**
|
|
23800
|
+
* ReachTemplatesApi - functional programming interface
|
|
23801
|
+
* @export
|
|
23802
|
+
*/
|
|
23803
|
+
export const ReachTemplatesApiFp = function (configuration) {
|
|
23804
|
+
const localVarAxiosParamCreator = ReachTemplatesApiAxiosParamCreator(configuration);
|
|
23805
|
+
return {
|
|
23806
|
+
/**
|
|
23807
|
+
* Create an email template in a profile. The template holds the HTML body a campaign reuses, so it can be created before any campaign exists. Only the template metadata comes back - keep the returned `uuid` to reference it as the `template_uuid` of a campaign.
|
|
23808
|
+
* @summary Create an email template
|
|
23809
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
23810
|
+
* @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
|
|
23811
|
+
* @param {*} [options] Override http request option.
|
|
23812
|
+
* @throws {RequiredError}
|
|
23813
|
+
*/
|
|
23814
|
+
createAnEmailTemplateV1(profileUuid, reachV1TemplatesStoreRequest, options) {
|
|
23815
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23816
|
+
var _a, _b;
|
|
23817
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createAnEmailTemplateV1(profileUuid, reachV1TemplatesStoreRequest, options);
|
|
23818
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachTemplatesApi.createAnEmailTemplateV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
23819
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
23820
|
+
});
|
|
23821
|
+
},
|
|
23822
|
+
/**
|
|
23823
|
+
* Get a list of the email templates in a profile, most recently updated first. Templates are the reusable email bodies a campaign is built from. The list is not paginated and only the metadata is returned - the template content itself is not exposed. Use the `uuid` of a template as the `template_uuid` when creating a campaign.
|
|
23824
|
+
* @summary List email templates
|
|
23825
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
23826
|
+
* @param {*} [options] Override http request option.
|
|
23827
|
+
* @throws {RequiredError}
|
|
23828
|
+
*/
|
|
23829
|
+
listEmailTemplatesV1(profileUuid, options) {
|
|
23830
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23831
|
+
var _a, _b;
|
|
23832
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listEmailTemplatesV1(profileUuid, options);
|
|
23833
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachTemplatesApi.listEmailTemplatesV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
23834
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
23835
|
+
});
|
|
23836
|
+
},
|
|
23837
|
+
};
|
|
23838
|
+
};
|
|
23839
|
+
/**
|
|
23840
|
+
* ReachTemplatesApi - factory interface
|
|
23841
|
+
* @export
|
|
23842
|
+
*/
|
|
23843
|
+
export const ReachTemplatesApiFactory = function (configuration, basePath, axios) {
|
|
23844
|
+
const localVarFp = ReachTemplatesApiFp(configuration);
|
|
23845
|
+
return {
|
|
23846
|
+
/**
|
|
23847
|
+
* Create an email template in a profile. The template holds the HTML body a campaign reuses, so it can be created before any campaign exists. Only the template metadata comes back - keep the returned `uuid` to reference it as the `template_uuid` of a campaign.
|
|
23848
|
+
* @summary Create an email template
|
|
23849
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
23850
|
+
* @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
|
|
23851
|
+
* @param {*} [options] Override http request option.
|
|
23852
|
+
* @throws {RequiredError}
|
|
23853
|
+
*/
|
|
23854
|
+
createAnEmailTemplateV1(profileUuid, reachV1TemplatesStoreRequest, options) {
|
|
23855
|
+
return localVarFp.createAnEmailTemplateV1(profileUuid, reachV1TemplatesStoreRequest, options).then((request) => request(axios, basePath));
|
|
23856
|
+
},
|
|
23857
|
+
/**
|
|
23858
|
+
* Get a list of the email templates in a profile, most recently updated first. Templates are the reusable email bodies a campaign is built from. The list is not paginated and only the metadata is returned - the template content itself is not exposed. Use the `uuid` of a template as the `template_uuid` when creating a campaign.
|
|
23859
|
+
* @summary List email templates
|
|
23860
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
23861
|
+
* @param {*} [options] Override http request option.
|
|
23862
|
+
* @throws {RequiredError}
|
|
23863
|
+
*/
|
|
23864
|
+
listEmailTemplatesV1(profileUuid, options) {
|
|
23865
|
+
return localVarFp.listEmailTemplatesV1(profileUuid, options).then((request) => request(axios, basePath));
|
|
23866
|
+
},
|
|
23867
|
+
};
|
|
23868
|
+
};
|
|
23869
|
+
/**
|
|
23870
|
+
* ReachTemplatesApi - object-oriented interface
|
|
23871
|
+
* @export
|
|
23872
|
+
* @class ReachTemplatesApi
|
|
23873
|
+
* @extends {BaseAPI}
|
|
23874
|
+
*/
|
|
23875
|
+
export class ReachTemplatesApi extends BaseAPI {
|
|
23876
|
+
/**
|
|
23877
|
+
* Create an email template in a profile. The template holds the HTML body a campaign reuses, so it can be created before any campaign exists. Only the template metadata comes back - keep the returned `uuid` to reference it as the `template_uuid` of a campaign.
|
|
23878
|
+
* @summary Create an email template
|
|
23879
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
23880
|
+
* @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
|
|
23881
|
+
* @param {*} [options] Override http request option.
|
|
23882
|
+
* @throws {RequiredError}
|
|
23883
|
+
* @memberof ReachTemplatesApi
|
|
23884
|
+
*/
|
|
23885
|
+
createAnEmailTemplateV1(profileUuid, reachV1TemplatesStoreRequest, options) {
|
|
23886
|
+
return ReachTemplatesApiFp(this.configuration).createAnEmailTemplateV1(profileUuid, reachV1TemplatesStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
23887
|
+
}
|
|
23888
|
+
/**
|
|
23889
|
+
* Get a list of the email templates in a profile, most recently updated first. Templates are the reusable email bodies a campaign is built from. The list is not paginated and only the metadata is returned - the template content itself is not exposed. Use the `uuid` of a template as the `template_uuid` when creating a campaign.
|
|
23890
|
+
* @summary List email templates
|
|
23891
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
23892
|
+
* @param {*} [options] Override http request option.
|
|
23893
|
+
* @throws {RequiredError}
|
|
23894
|
+
* @memberof ReachTemplatesApi
|
|
23895
|
+
*/
|
|
23896
|
+
listEmailTemplatesV1(profileUuid, options) {
|
|
23897
|
+
return ReachTemplatesApiFp(this.configuration).listEmailTemplatesV1(profileUuid, options).then((request) => request(this.axios, this.basePath));
|
|
23898
|
+
}
|
|
23899
|
+
}
|
|
23635
23900
|
/**
|
|
23636
23901
|
* VPSActionsApi - axios parameter creator
|
|
23637
23902
|
* @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.47.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.47.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.47.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.47.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.47.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.47.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.47.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.47.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.47.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.47.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.47.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
|
|
@@ -12,8 +12,6 @@ Name | Type | Description | Notes
|
|
|
12
12
|
**domain** | **string** | Primary domain to attach to the website. Omit or set to null to get a free auto-generated *.hostingersite.com subdomain instead. | [optional] [default to undefined]
|
|
13
13
|
**type** | **string** | Website type | [optional] [default to undefined]
|
|
14
14
|
**wordpress** | [**AgencyHostingV1SetupsCreateSetupRequestWordpress**](AgencyHostingV1SetupsCreateSetupRequestWordpress.md) | | [optional] [default to undefined]
|
|
15
|
-
**clone** | [**AgencyHostingV1SetupsCreateSetupRequestClone**](AgencyHostingV1SetupsCreateSetupRequestClone.md) | | [optional] [default to undefined]
|
|
16
|
-
**derive_domain** | [**AgencyHostingV1SetupsCreateSetupRequestDeriveDomain**](AgencyHostingV1SetupsCreateSetupRequestDeriveDomain.md) | | [optional] [default to undefined]
|
|
17
15
|
|
|
18
16
|
## Example
|
|
19
17
|
|
|
@@ -27,8 +25,6 @@ const instance: AgencyHostingV1SetupsCreateSetupRequest = {
|
|
|
27
25
|
domain,
|
|
28
26
|
type,
|
|
29
27
|
wordpress,
|
|
30
|
-
clone,
|
|
31
|
-
derive_domain,
|
|
32
28
|
};
|
|
33
29
|
```
|
|
34
30
|
|
|
@@ -4,10 +4,69 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
4
4
|
|
|
5
5
|
|Method | HTTP request | Description|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
|[**createADraftCampaignV1**](#createadraftcampaignv1) | **POST** /api/reach/v1/profiles/{profileUuid}/campaigns | Create a draft campaign|
|
|
7
8
|
|[**getCampaignDetailsV1**](#getcampaigndetailsv1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid} | Get campaign details|
|
|
8
9
|
|[**getCampaignPerformanceV1**](#getcampaignperformancev1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid}/statistics | Get campaign performance|
|
|
9
10
|
|[**listCampaignsV1**](#listcampaignsv1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns | List campaigns|
|
|
10
11
|
|
|
12
|
+
# **createADraftCampaignV1**
|
|
13
|
+
> ReachV1CampaignsCreatedCampaignResource createADraftCampaignV1(reachV1CampaignsStoreRequest)
|
|
14
|
+
|
|
15
|
+
Create a campaign in a profile. The campaign is created as a draft, so nothing is sent and no contact is touched. It has no audience yet either - targeting and scheduling are not part of this request, the draft is finished and sent from the Reach interface.
|
|
16
|
+
|
|
17
|
+
### Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import {
|
|
21
|
+
ReachCampaignsApi,
|
|
22
|
+
Configuration,
|
|
23
|
+
ReachV1CampaignsStoreRequest
|
|
24
|
+
} from '@hostinger/sdk';
|
|
25
|
+
|
|
26
|
+
const configuration = new Configuration();
|
|
27
|
+
const apiInstance = new ReachCampaignsApi(configuration);
|
|
28
|
+
|
|
29
|
+
let profileUuid: string; //Profile uuid parameter (default to undefined)
|
|
30
|
+
let reachV1CampaignsStoreRequest: ReachV1CampaignsStoreRequest; //
|
|
31
|
+
|
|
32
|
+
const { status, data } = await apiInstance.createADraftCampaignV1(
|
|
33
|
+
profileUuid,
|
|
34
|
+
reachV1CampaignsStoreRequest
|
|
35
|
+
);
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Parameters
|
|
39
|
+
|
|
40
|
+
|Name | Type | Description | Notes|
|
|
41
|
+
|------------- | ------------- | ------------- | -------------|
|
|
42
|
+
| **reachV1CampaignsStoreRequest** | **ReachV1CampaignsStoreRequest**| | |
|
|
43
|
+
| **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
### Return type
|
|
47
|
+
|
|
48
|
+
**ReachV1CampaignsCreatedCampaignResource**
|
|
49
|
+
|
|
50
|
+
### Authorization
|
|
51
|
+
|
|
52
|
+
[apiToken](../README.md#apiToken)
|
|
53
|
+
|
|
54
|
+
### HTTP request headers
|
|
55
|
+
|
|
56
|
+
- **Content-Type**: application/json
|
|
57
|
+
- **Accept**: application/json
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
### HTTP response details
|
|
61
|
+
| Status code | Description | Response headers |
|
|
62
|
+
|-------------|-------------|------------------|
|
|
63
|
+
|**200** | Success response | - |
|
|
64
|
+
|**422** | Validation error response | - |
|
|
65
|
+
|**401** | Unauthenticated response | - |
|
|
66
|
+
|**500** | Error response | - |
|
|
67
|
+
|
|
68
|
+
[[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)
|
|
69
|
+
|
|
11
70
|
# **getCampaignDetailsV1**
|
|
12
71
|
> ReachV1CampaignsCampaignDetailsResource getCampaignDetailsV1()
|
|
13
72
|
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# ReachTemplatesApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://developers.hostinger.com*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**createAnEmailTemplateV1**](#createanemailtemplatev1) | **POST** /api/reach/v1/profiles/{profileUuid}/templates | Create an email template|
|
|
8
|
+
|[**listEmailTemplatesV1**](#listemailtemplatesv1) | **GET** /api/reach/v1/profiles/{profileUuid}/templates | List email templates|
|
|
9
|
+
|
|
10
|
+
# **createAnEmailTemplateV1**
|
|
11
|
+
> ReachV1TemplatesTemplateResource createAnEmailTemplateV1(reachV1TemplatesStoreRequest)
|
|
12
|
+
|
|
13
|
+
Create an email template in a profile. The template holds the HTML body a campaign reuses, so it can be created before any campaign exists. Only the template metadata comes back - keep the returned `uuid` to reference it as the `template_uuid` of a campaign.
|
|
14
|
+
|
|
15
|
+
### Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import {
|
|
19
|
+
ReachTemplatesApi,
|
|
20
|
+
Configuration,
|
|
21
|
+
ReachV1TemplatesStoreRequest
|
|
22
|
+
} from '@hostinger/sdk';
|
|
23
|
+
|
|
24
|
+
const configuration = new Configuration();
|
|
25
|
+
const apiInstance = new ReachTemplatesApi(configuration);
|
|
26
|
+
|
|
27
|
+
let profileUuid: string; //Profile uuid parameter (default to undefined)
|
|
28
|
+
let reachV1TemplatesStoreRequest: ReachV1TemplatesStoreRequest; //
|
|
29
|
+
|
|
30
|
+
const { status, data } = await apiInstance.createAnEmailTemplateV1(
|
|
31
|
+
profileUuid,
|
|
32
|
+
reachV1TemplatesStoreRequest
|
|
33
|
+
);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Parameters
|
|
37
|
+
|
|
38
|
+
|Name | Type | Description | Notes|
|
|
39
|
+
|------------- | ------------- | ------------- | -------------|
|
|
40
|
+
| **reachV1TemplatesStoreRequest** | **ReachV1TemplatesStoreRequest**| | |
|
|
41
|
+
| **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Return type
|
|
45
|
+
|
|
46
|
+
**ReachV1TemplatesTemplateResource**
|
|
47
|
+
|
|
48
|
+
### Authorization
|
|
49
|
+
|
|
50
|
+
[apiToken](../README.md#apiToken)
|
|
51
|
+
|
|
52
|
+
### HTTP request headers
|
|
53
|
+
|
|
54
|
+
- **Content-Type**: application/json
|
|
55
|
+
- **Accept**: application/json
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### HTTP response details
|
|
59
|
+
| Status code | Description | Response headers |
|
|
60
|
+
|-------------|-------------|------------------|
|
|
61
|
+
|**200** | Success response | - |
|
|
62
|
+
|**422** | Validation error response | - |
|
|
63
|
+
|**401** | Unauthenticated response | - |
|
|
64
|
+
|**500** | Error response | - |
|
|
65
|
+
|
|
66
|
+
[[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)
|
|
67
|
+
|
|
68
|
+
# **listEmailTemplatesV1**
|
|
69
|
+
> Array<ReachV1TemplatesTemplateResource> listEmailTemplatesV1()
|
|
70
|
+
|
|
71
|
+
Get a list of the email templates in a profile, most recently updated first. Templates are the reusable email bodies a campaign is built from. The list is not paginated and only the metadata is returned - the template content itself is not exposed. Use the `uuid` of a template as the `template_uuid` when creating a campaign.
|
|
72
|
+
|
|
73
|
+
### Example
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
import {
|
|
77
|
+
ReachTemplatesApi,
|
|
78
|
+
Configuration
|
|
79
|
+
} from '@hostinger/sdk';
|
|
80
|
+
|
|
81
|
+
const configuration = new Configuration();
|
|
82
|
+
const apiInstance = new ReachTemplatesApi(configuration);
|
|
83
|
+
|
|
84
|
+
let profileUuid: string; //Profile uuid parameter (default to undefined)
|
|
85
|
+
|
|
86
|
+
const { status, data } = await apiInstance.listEmailTemplatesV1(
|
|
87
|
+
profileUuid
|
|
88
|
+
);
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Parameters
|
|
92
|
+
|
|
93
|
+
|Name | Type | Description | Notes|
|
|
94
|
+
|------------- | ------------- | ------------- | -------------|
|
|
95
|
+
| **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Return type
|
|
99
|
+
|
|
100
|
+
**Array<ReachV1TemplatesTemplateResource>**
|
|
101
|
+
|
|
102
|
+
### Authorization
|
|
103
|
+
|
|
104
|
+
[apiToken](../README.md#apiToken)
|
|
105
|
+
|
|
106
|
+
### HTTP request headers
|
|
107
|
+
|
|
108
|
+
- **Content-Type**: Not defined
|
|
109
|
+
- **Accept**: application/json
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
### HTTP response details
|
|
113
|
+
| Status code | Description | Response headers |
|
|
114
|
+
|-------------|-------------|------------------|
|
|
115
|
+
|**200** | Success response | - |
|
|
116
|
+
|**401** | Unauthenticated response | - |
|
|
117
|
+
|**500** | Error response | - |
|
|
118
|
+
|
|
119
|
+
[[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)
|
|
120
|
+
|