@hostinger/sdk 1.46.2 → 1.46.4
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 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +341 -1
- package/dist/api.js +281 -11
- 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 -1
- package/dist/esm/api.js +267 -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 +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 +2 -2
package/dist/esm/api.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.46.
|
|
6
|
+
* API Version: 1.46.3
|
|
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
|
|
@@ -572,6 +572,18 @@ export const ReachV1CampaignsCampaignResourceTypeEnum = {
|
|
|
572
572
|
Automation: 'automation',
|
|
573
573
|
DoubleOptIn: 'double_opt_in'
|
|
574
574
|
};
|
|
575
|
+
export const ReachV1CampaignsCreatedCampaignResourceStatusEnum = {
|
|
576
|
+
Draft: 'draft',
|
|
577
|
+
Scheduled: 'scheduled',
|
|
578
|
+
Sending: 'sending',
|
|
579
|
+
Publish: 'publish',
|
|
580
|
+
Failed: 'failed'
|
|
581
|
+
};
|
|
582
|
+
export const ReachV1CampaignsCreatedCampaignResourceTypeEnum = {
|
|
583
|
+
Campaign: 'campaign',
|
|
584
|
+
Automation: 'automation',
|
|
585
|
+
DoubleOptIn: 'double_opt_in'
|
|
586
|
+
};
|
|
575
587
|
export const ReachV1ContactsContactDetailsResourceSubscriptionStatusEnum = {
|
|
576
588
|
Subscribed: 'subscribed',
|
|
577
589
|
Unsubscribed: 'unsubscribed',
|
|
@@ -19812,6 +19824,43 @@ export const ListAutomationsV1SortDirectionEnum = {
|
|
|
19812
19824
|
*/
|
|
19813
19825
|
export const ReachCampaignsApiAxiosParamCreator = function (configuration) {
|
|
19814
19826
|
return {
|
|
19827
|
+
/**
|
|
19828
|
+
* 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.
|
|
19829
|
+
* @summary Create a draft campaign
|
|
19830
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
19831
|
+
* @param {ReachV1CampaignsStoreRequest} reachV1CampaignsStoreRequest
|
|
19832
|
+
* @param {*} [options] Override http request option.
|
|
19833
|
+
* @throws {RequiredError}
|
|
19834
|
+
*/
|
|
19835
|
+
createADraftCampaignV1: (profileUuid_1, reachV1CampaignsStoreRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, reachV1CampaignsStoreRequest_1, ...args_1], void 0, function* (profileUuid, reachV1CampaignsStoreRequest, options = {}) {
|
|
19836
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
19837
|
+
assertParamExists('createADraftCampaignV1', 'profileUuid', profileUuid);
|
|
19838
|
+
// verify required parameter 'reachV1CampaignsStoreRequest' is not null or undefined
|
|
19839
|
+
assertParamExists('createADraftCampaignV1', 'reachV1CampaignsStoreRequest', reachV1CampaignsStoreRequest);
|
|
19840
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/campaigns`
|
|
19841
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
|
|
19842
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
19843
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
19844
|
+
let baseOptions;
|
|
19845
|
+
if (configuration) {
|
|
19846
|
+
baseOptions = configuration.baseOptions;
|
|
19847
|
+
}
|
|
19848
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
19849
|
+
const localVarHeaderParameter = {};
|
|
19850
|
+
const localVarQueryParameter = {};
|
|
19851
|
+
// authentication apiToken required
|
|
19852
|
+
// http bearer authentication required
|
|
19853
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
19854
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
19855
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
19856
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
19857
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
19858
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1CampaignsStoreRequest, localVarRequestOptions, configuration);
|
|
19859
|
+
return {
|
|
19860
|
+
url: toPathString(localVarUrlObj),
|
|
19861
|
+
options: localVarRequestOptions,
|
|
19862
|
+
};
|
|
19863
|
+
}),
|
|
19815
19864
|
/**
|
|
19816
19865
|
* 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
19866
|
* @summary Get campaign details
|
|
@@ -19945,6 +19994,22 @@ export const ReachCampaignsApiAxiosParamCreator = function (configuration) {
|
|
|
19945
19994
|
export const ReachCampaignsApiFp = function (configuration) {
|
|
19946
19995
|
const localVarAxiosParamCreator = ReachCampaignsApiAxiosParamCreator(configuration);
|
|
19947
19996
|
return {
|
|
19997
|
+
/**
|
|
19998
|
+
* 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.
|
|
19999
|
+
* @summary Create a draft campaign
|
|
20000
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
20001
|
+
* @param {ReachV1CampaignsStoreRequest} reachV1CampaignsStoreRequest
|
|
20002
|
+
* @param {*} [options] Override http request option.
|
|
20003
|
+
* @throws {RequiredError}
|
|
20004
|
+
*/
|
|
20005
|
+
createADraftCampaignV1(profileUuid, reachV1CampaignsStoreRequest, options) {
|
|
20006
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20007
|
+
var _a, _b;
|
|
20008
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createADraftCampaignV1(profileUuid, reachV1CampaignsStoreRequest, options);
|
|
20009
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachCampaignsApi.createADraftCampaignV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
20010
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
20011
|
+
});
|
|
20012
|
+
},
|
|
19948
20013
|
/**
|
|
19949
20014
|
* 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
20015
|
* @summary Get campaign details
|
|
@@ -20006,6 +20071,17 @@ export const ReachCampaignsApiFp = function (configuration) {
|
|
|
20006
20071
|
export const ReachCampaignsApiFactory = function (configuration, basePath, axios) {
|
|
20007
20072
|
const localVarFp = ReachCampaignsApiFp(configuration);
|
|
20008
20073
|
return {
|
|
20074
|
+
/**
|
|
20075
|
+
* 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.
|
|
20076
|
+
* @summary Create a draft campaign
|
|
20077
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
20078
|
+
* @param {ReachV1CampaignsStoreRequest} reachV1CampaignsStoreRequest
|
|
20079
|
+
* @param {*} [options] Override http request option.
|
|
20080
|
+
* @throws {RequiredError}
|
|
20081
|
+
*/
|
|
20082
|
+
createADraftCampaignV1(profileUuid, reachV1CampaignsStoreRequest, options) {
|
|
20083
|
+
return localVarFp.createADraftCampaignV1(profileUuid, reachV1CampaignsStoreRequest, options).then((request) => request(axios, basePath));
|
|
20084
|
+
},
|
|
20009
20085
|
/**
|
|
20010
20086
|
* 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
20087
|
* @summary Get campaign details
|
|
@@ -20052,6 +20128,18 @@ export const ReachCampaignsApiFactory = function (configuration, basePath, axios
|
|
|
20052
20128
|
* @extends {BaseAPI}
|
|
20053
20129
|
*/
|
|
20054
20130
|
export class ReachCampaignsApi extends BaseAPI {
|
|
20131
|
+
/**
|
|
20132
|
+
* 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.
|
|
20133
|
+
* @summary Create a draft campaign
|
|
20134
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
20135
|
+
* @param {ReachV1CampaignsStoreRequest} reachV1CampaignsStoreRequest
|
|
20136
|
+
* @param {*} [options] Override http request option.
|
|
20137
|
+
* @throws {RequiredError}
|
|
20138
|
+
* @memberof ReachCampaignsApi
|
|
20139
|
+
*/
|
|
20140
|
+
createADraftCampaignV1(profileUuid, reachV1CampaignsStoreRequest, options) {
|
|
20141
|
+
return ReachCampaignsApiFp(this.configuration).createADraftCampaignV1(profileUuid, reachV1CampaignsStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
20142
|
+
}
|
|
20055
20143
|
/**
|
|
20056
20144
|
* 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
20145
|
* @summary Get campaign details
|
|
@@ -23632,6 +23720,184 @@ export class ReachTagsApi extends BaseAPI {
|
|
|
23632
23720
|
return ReachTagsApiFp(this.configuration).renameATagV1(profileUuid, tagUuid, reachV1ContactsTagsUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
23633
23721
|
}
|
|
23634
23722
|
}
|
|
23723
|
+
/**
|
|
23724
|
+
* ReachTemplatesApi - axios parameter creator
|
|
23725
|
+
* @export
|
|
23726
|
+
*/
|
|
23727
|
+
export const ReachTemplatesApiAxiosParamCreator = function (configuration) {
|
|
23728
|
+
return {
|
|
23729
|
+
/**
|
|
23730
|
+
* 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.
|
|
23731
|
+
* @summary Create an email template
|
|
23732
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
23733
|
+
* @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
|
|
23734
|
+
* @param {*} [options] Override http request option.
|
|
23735
|
+
* @throws {RequiredError}
|
|
23736
|
+
*/
|
|
23737
|
+
createAnEmailTemplateV1: (profileUuid_1, reachV1TemplatesStoreRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, reachV1TemplatesStoreRequest_1, ...args_1], void 0, function* (profileUuid, reachV1TemplatesStoreRequest, options = {}) {
|
|
23738
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
23739
|
+
assertParamExists('createAnEmailTemplateV1', 'profileUuid', profileUuid);
|
|
23740
|
+
// verify required parameter 'reachV1TemplatesStoreRequest' is not null or undefined
|
|
23741
|
+
assertParamExists('createAnEmailTemplateV1', 'reachV1TemplatesStoreRequest', reachV1TemplatesStoreRequest);
|
|
23742
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/templates`
|
|
23743
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
|
|
23744
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
23745
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
23746
|
+
let baseOptions;
|
|
23747
|
+
if (configuration) {
|
|
23748
|
+
baseOptions = configuration.baseOptions;
|
|
23749
|
+
}
|
|
23750
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
23751
|
+
const localVarHeaderParameter = {};
|
|
23752
|
+
const localVarQueryParameter = {};
|
|
23753
|
+
// authentication apiToken required
|
|
23754
|
+
// http bearer authentication required
|
|
23755
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
23756
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
23757
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
23758
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
23759
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
23760
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1TemplatesStoreRequest, localVarRequestOptions, configuration);
|
|
23761
|
+
return {
|
|
23762
|
+
url: toPathString(localVarUrlObj),
|
|
23763
|
+
options: localVarRequestOptions,
|
|
23764
|
+
};
|
|
23765
|
+
}),
|
|
23766
|
+
/**
|
|
23767
|
+
* 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.
|
|
23768
|
+
* @summary List email templates
|
|
23769
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
23770
|
+
* @param {*} [options] Override http request option.
|
|
23771
|
+
* @throws {RequiredError}
|
|
23772
|
+
*/
|
|
23773
|
+
listEmailTemplatesV1: (profileUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, ...args_1], void 0, function* (profileUuid, options = {}) {
|
|
23774
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
23775
|
+
assertParamExists('listEmailTemplatesV1', 'profileUuid', profileUuid);
|
|
23776
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/templates`
|
|
23777
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
|
|
23778
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
23779
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
23780
|
+
let baseOptions;
|
|
23781
|
+
if (configuration) {
|
|
23782
|
+
baseOptions = configuration.baseOptions;
|
|
23783
|
+
}
|
|
23784
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
23785
|
+
const localVarHeaderParameter = {};
|
|
23786
|
+
const localVarQueryParameter = {};
|
|
23787
|
+
// authentication apiToken required
|
|
23788
|
+
// http bearer authentication required
|
|
23789
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
23790
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
23791
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
23792
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
23793
|
+
return {
|
|
23794
|
+
url: toPathString(localVarUrlObj),
|
|
23795
|
+
options: localVarRequestOptions,
|
|
23796
|
+
};
|
|
23797
|
+
}),
|
|
23798
|
+
};
|
|
23799
|
+
};
|
|
23800
|
+
/**
|
|
23801
|
+
* ReachTemplatesApi - functional programming interface
|
|
23802
|
+
* @export
|
|
23803
|
+
*/
|
|
23804
|
+
export const ReachTemplatesApiFp = function (configuration) {
|
|
23805
|
+
const localVarAxiosParamCreator = ReachTemplatesApiAxiosParamCreator(configuration);
|
|
23806
|
+
return {
|
|
23807
|
+
/**
|
|
23808
|
+
* 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.
|
|
23809
|
+
* @summary Create an email template
|
|
23810
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
23811
|
+
* @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
|
|
23812
|
+
* @param {*} [options] Override http request option.
|
|
23813
|
+
* @throws {RequiredError}
|
|
23814
|
+
*/
|
|
23815
|
+
createAnEmailTemplateV1(profileUuid, reachV1TemplatesStoreRequest, options) {
|
|
23816
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23817
|
+
var _a, _b;
|
|
23818
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createAnEmailTemplateV1(profileUuid, reachV1TemplatesStoreRequest, options);
|
|
23819
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachTemplatesApi.createAnEmailTemplateV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
23820
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
23821
|
+
});
|
|
23822
|
+
},
|
|
23823
|
+
/**
|
|
23824
|
+
* 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.
|
|
23825
|
+
* @summary List email templates
|
|
23826
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
23827
|
+
* @param {*} [options] Override http request option.
|
|
23828
|
+
* @throws {RequiredError}
|
|
23829
|
+
*/
|
|
23830
|
+
listEmailTemplatesV1(profileUuid, options) {
|
|
23831
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23832
|
+
var _a, _b;
|
|
23833
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listEmailTemplatesV1(profileUuid, options);
|
|
23834
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachTemplatesApi.listEmailTemplatesV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
23835
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
23836
|
+
});
|
|
23837
|
+
},
|
|
23838
|
+
};
|
|
23839
|
+
};
|
|
23840
|
+
/**
|
|
23841
|
+
* ReachTemplatesApi - factory interface
|
|
23842
|
+
* @export
|
|
23843
|
+
*/
|
|
23844
|
+
export const ReachTemplatesApiFactory = function (configuration, basePath, axios) {
|
|
23845
|
+
const localVarFp = ReachTemplatesApiFp(configuration);
|
|
23846
|
+
return {
|
|
23847
|
+
/**
|
|
23848
|
+
* 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.
|
|
23849
|
+
* @summary Create an email template
|
|
23850
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
23851
|
+
* @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
|
|
23852
|
+
* @param {*} [options] Override http request option.
|
|
23853
|
+
* @throws {RequiredError}
|
|
23854
|
+
*/
|
|
23855
|
+
createAnEmailTemplateV1(profileUuid, reachV1TemplatesStoreRequest, options) {
|
|
23856
|
+
return localVarFp.createAnEmailTemplateV1(profileUuid, reachV1TemplatesStoreRequest, options).then((request) => request(axios, basePath));
|
|
23857
|
+
},
|
|
23858
|
+
/**
|
|
23859
|
+
* 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.
|
|
23860
|
+
* @summary List email templates
|
|
23861
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
23862
|
+
* @param {*} [options] Override http request option.
|
|
23863
|
+
* @throws {RequiredError}
|
|
23864
|
+
*/
|
|
23865
|
+
listEmailTemplatesV1(profileUuid, options) {
|
|
23866
|
+
return localVarFp.listEmailTemplatesV1(profileUuid, options).then((request) => request(axios, basePath));
|
|
23867
|
+
},
|
|
23868
|
+
};
|
|
23869
|
+
};
|
|
23870
|
+
/**
|
|
23871
|
+
* ReachTemplatesApi - object-oriented interface
|
|
23872
|
+
* @export
|
|
23873
|
+
* @class ReachTemplatesApi
|
|
23874
|
+
* @extends {BaseAPI}
|
|
23875
|
+
*/
|
|
23876
|
+
export class ReachTemplatesApi extends BaseAPI {
|
|
23877
|
+
/**
|
|
23878
|
+
* 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.
|
|
23879
|
+
* @summary Create an email template
|
|
23880
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
23881
|
+
* @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
|
|
23882
|
+
* @param {*} [options] Override http request option.
|
|
23883
|
+
* @throws {RequiredError}
|
|
23884
|
+
* @memberof ReachTemplatesApi
|
|
23885
|
+
*/
|
|
23886
|
+
createAnEmailTemplateV1(profileUuid, reachV1TemplatesStoreRequest, options) {
|
|
23887
|
+
return ReachTemplatesApiFp(this.configuration).createAnEmailTemplateV1(profileUuid, reachV1TemplatesStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
23888
|
+
}
|
|
23889
|
+
/**
|
|
23890
|
+
* 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.
|
|
23891
|
+
* @summary List email templates
|
|
23892
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
23893
|
+
* @param {*} [options] Override http request option.
|
|
23894
|
+
* @throws {RequiredError}
|
|
23895
|
+
* @memberof ReachTemplatesApi
|
|
23896
|
+
*/
|
|
23897
|
+
listEmailTemplatesV1(profileUuid, options) {
|
|
23898
|
+
return ReachTemplatesApiFp(this.configuration).listEmailTemplatesV1(profileUuid, options).then((request) => request(this.axios, this.basePath));
|
|
23899
|
+
}
|
|
23900
|
+
}
|
|
23635
23901
|
/**
|
|
23636
23902
|
* VPSActionsApi - axios parameter creator
|
|
23637
23903
|
* @export
|
package/dist/esm/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.46.
|
|
4
|
+
* API Version: 1.46.3
|
|
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.46.
|
|
6
|
+
* API Version: 1.46.3
|
|
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.46.
|
|
4
|
+
* API Version: 1.46.3
|
|
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.46.
|
|
6
|
+
* API Version: 1.46.3
|
|
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.46.
|
|
4
|
+
* API Version: 1.46.3
|
|
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.46.
|
|
6
|
+
* API Version: 1.46.3
|
|
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.46.
|
|
16
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.46.4" }, (_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.46.
|
|
4
|
+
* API Version: 1.46.3
|
|
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.46.
|
|
6
|
+
* API Version: 1.46.3
|
|
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.46.
|
|
4
|
+
* API Version: 1.46.3
|
|
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.46.
|
|
7
|
+
* API Version: 1.46.3
|
|
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
|
|
@@ -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
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# ReachV1CampaignsCreatedCampaignResource
|
|
2
|
+
|
|
3
|
+
The campaign as it was stored, without targeting or delivery progress
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**uuid** | **string** | | [optional] [default to undefined]
|
|
10
|
+
**title** | **string** | | [optional] [default to undefined]
|
|
11
|
+
**subject** | **string** | | [optional] [default to undefined]
|
|
12
|
+
**sender_name** | **string** | | [optional] [default to undefined]
|
|
13
|
+
**sender_email** | **string** | | [optional] [default to undefined]
|
|
14
|
+
**template_uuid** | **string** | | [optional] [default to undefined]
|
|
15
|
+
**status** | **string** | Always `draft` for a campaign that was just created. | [optional] [default to undefined]
|
|
16
|
+
**type** | **string** | | [optional] [default to undefined]
|
|
17
|
+
**is_all_contacts** | **boolean** | Whether the campaign targets every contact instead of selected segments. | [optional] [default to undefined]
|
|
18
|
+
**metadata** | **{ [key: string]: string; }** | The stored extra fields, including the ones Reach sets itself. | [optional] [default to undefined]
|
|
19
|
+
**created_at** | **string** | | [optional] [default to undefined]
|
|
20
|
+
**updated_at** | **string** | | [optional] [default to undefined]
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import { ReachV1CampaignsCreatedCampaignResource } from '@hostinger/sdk';
|
|
26
|
+
|
|
27
|
+
const instance: ReachV1CampaignsCreatedCampaignResource = {
|
|
28
|
+
uuid,
|
|
29
|
+
title,
|
|
30
|
+
subject,
|
|
31
|
+
sender_name,
|
|
32
|
+
sender_email,
|
|
33
|
+
template_uuid,
|
|
34
|
+
status,
|
|
35
|
+
type,
|
|
36
|
+
is_all_contacts,
|
|
37
|
+
metadata,
|
|
38
|
+
created_at,
|
|
39
|
+
updated_at,
|
|
40
|
+
};
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|