hostinger-api-sdk 0.0.1 → 0.0.2
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 +609 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +374 -1
- package/dist/api.js +453 -3
- 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 +374 -1
- package/dist/esm/api.js +443 -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/index.ts +1 -1
- package/package.json +1 -1
- package/.idea/api-typescript-sdk.iml +0 -8
- package/.idea/modules.xml +0 -8
- package/.idea/php.xml +0 -19
- package/.idea/vcs.xml +0 -6
package/dist/api.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 0.0.
|
|
7
|
+
* API Version: 0.0.14
|
|
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
|
|
@@ -19,8 +19,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
23
|
-
exports.VPSVirtualMachineApi = exports.VPSVirtualMachineApiFactory = exports.VPSVirtualMachineApiFp = exports.VPSVirtualMachineApiAxiosParamCreator = exports.VPSSnapshotsApi = exports.VPSSnapshotsApiFactory = exports.VPSSnapshotsApiFp = exports.VPSSnapshotsApiAxiosParamCreator = exports.VPSRecoveryApi = exports.VPSRecoveryApiFactory = exports.VPSRecoveryApiFp = exports.VPSRecoveryApiAxiosParamCreator = exports.VPSPublicKeysApi = exports.VPSPublicKeysApiFactory = exports.VPSPublicKeysApiFp = exports.VPSPublicKeysApiAxiosParamCreator = exports.VPSPostInstallScriptsApi = exports.VPSPostInstallScriptsApiFactory = exports.VPSPostInstallScriptsApiFp = exports.VPSPostInstallScriptsApiAxiosParamCreator = exports.VPSPTRRecordsApi = exports.VPSPTRRecordsApiFactory = exports.VPSPTRRecordsApiFp = exports.VPSPTRRecordsApiAxiosParamCreator = exports.VPSOSTemplatesApi = exports.VPSOSTemplatesApiFactory = exports.VPSOSTemplatesApiFp = exports.VPSOSTemplatesApiAxiosParamCreator = exports.VPSMalwareScannerApi = exports.VPSMalwareScannerApiFactory = exports.VPSMalwareScannerApiFp = exports.VPSMalwareScannerApiAxiosParamCreator = void 0;
|
|
22
|
+
exports.VPSBackupsApiFactory = exports.VPSBackupsApiFp = exports.VPSBackupsApiAxiosParamCreator = exports.VPSActionsApi = exports.VPSActionsApiFactory = exports.VPSActionsApiFp = exports.VPSActionsApiAxiosParamCreator = exports.DomainsPortfolioApi = exports.DomainsPortfolioApiFactory = exports.DomainsPortfolioApiFp = exports.DomainsPortfolioApiAxiosParamCreator = exports.DNSZoneApi = exports.DNSZoneApiFactory = exports.DNSZoneApiFp = exports.DNSZoneApiAxiosParamCreator = exports.DNSSnapshotApi = exports.DNSSnapshotApiFactory = exports.DNSSnapshotApiFp = exports.DNSSnapshotApiAxiosParamCreator = exports.BillingSubscriptionsApi = exports.BillingSubscriptionsApiFactory = exports.BillingSubscriptionsApiFp = exports.BillingSubscriptionsApiAxiosParamCreator = exports.BillingPaymentMethodsApi = exports.BillingPaymentMethodsApiFactory = exports.BillingPaymentMethodsApiFp = exports.BillingPaymentMethodsApiAxiosParamCreator = exports.BillingOrdersApi = exports.BillingOrdersApiFactory = exports.BillingOrdersApiFp = exports.BillingOrdersApiAxiosParamCreator = exports.BillingCatalogApi = exports.BillingCatalogApiFactory = exports.BillingCatalogApiFp = exports.BillingCatalogApiAxiosParamCreator = exports.VPSV1VirtualMachineVirtualMachineResourceActionsLockEnum = exports.VPSV1VirtualMachineVirtualMachineResourceStateEnum = exports.VPSV1FirewallRulesStoreRequestSourceEnum = exports.VPSV1FirewallRulesStoreRequestProtocolEnum = exports.VPSV1FirewallFirewallRuleResourceProtocolEnum = exports.VPSV1FirewallFirewallRuleResourceActionEnum = exports.VPSV1ActionActionResourceStateEnum = exports.DomainsV1DomainDomainResourceStatusEnum = exports.DomainsV1DomainDomainResourceTypeEnum = exports.DNSV1ZoneNameResourceTypeEnum = exports.BillingV1SubscriptionSubscriptionResourceStatusEnum = exports.BillingV1SubscriptionCancelRequestCancelOptionEnum = exports.BillingV1SubscriptionCancelRequestReasonCodeEnum = exports.BillingV1OrderOrderResourceStatusEnum = exports.BillingV1CatalogCatalogItemPriceResourcePeriodUnitEnum = void 0;
|
|
23
|
+
exports.VPSVirtualMachineApi = exports.VPSVirtualMachineApiFactory = exports.VPSVirtualMachineApiFp = exports.VPSVirtualMachineApiAxiosParamCreator = exports.VPSSnapshotsApi = exports.VPSSnapshotsApiFactory = exports.VPSSnapshotsApiFp = exports.VPSSnapshotsApiAxiosParamCreator = exports.VPSRecoveryApi = exports.VPSRecoveryApiFactory = exports.VPSRecoveryApiFp = exports.VPSRecoveryApiAxiosParamCreator = exports.VPSPublicKeysApi = exports.VPSPublicKeysApiFactory = exports.VPSPublicKeysApiFp = exports.VPSPublicKeysApiAxiosParamCreator = exports.VPSPostInstallScriptsApi = exports.VPSPostInstallScriptsApiFactory = exports.VPSPostInstallScriptsApiFp = exports.VPSPostInstallScriptsApiAxiosParamCreator = exports.VPSPTRRecordsApi = exports.VPSPTRRecordsApiFactory = exports.VPSPTRRecordsApiFp = exports.VPSPTRRecordsApiAxiosParamCreator = exports.VPSOSTemplatesApi = exports.VPSOSTemplatesApiFactory = exports.VPSOSTemplatesApiFp = exports.VPSOSTemplatesApiAxiosParamCreator = exports.VPSMalwareScannerApi = exports.VPSMalwareScannerApiFactory = exports.VPSMalwareScannerApiFp = exports.VPSMalwareScannerApiAxiosParamCreator = exports.VPSFirewallApi = exports.VPSFirewallApiFactory = exports.VPSFirewallApiFp = exports.VPSFirewallApiAxiosParamCreator = exports.VPSDataCentersApi = exports.VPSDataCentersApiFactory = exports.VPSDataCentersApiFp = exports.VPSDataCentersApiAxiosParamCreator = exports.VPSBackupsApi = void 0;
|
|
24
24
|
const axios_1 = require("axios");
|
|
25
25
|
// Some imports not used depending on template conditions
|
|
26
26
|
// @ts-ignore
|
|
@@ -60,6 +60,18 @@ exports.BillingV1SubscriptionSubscriptionResourceStatusEnum = {
|
|
|
60
60
|
InTrial: 'in_trial',
|
|
61
61
|
Future: 'future'
|
|
62
62
|
};
|
|
63
|
+
exports.DNSV1ZoneNameResourceTypeEnum = {
|
|
64
|
+
A: 'A',
|
|
65
|
+
Aaaa: 'AAAA',
|
|
66
|
+
Cname: 'CNAME',
|
|
67
|
+
Alias: 'ALIAS',
|
|
68
|
+
Mx: 'MX',
|
|
69
|
+
Txt: 'TXT',
|
|
70
|
+
Ns: 'NS',
|
|
71
|
+
Soa: 'SOA',
|
|
72
|
+
Srv: 'SRV',
|
|
73
|
+
Caa: 'CAA'
|
|
74
|
+
};
|
|
63
75
|
exports.DomainsV1DomainDomainResourceTypeEnum = {
|
|
64
76
|
Domain: 'domain',
|
|
65
77
|
FreeDomain: 'free_domain'
|
|
@@ -740,6 +752,444 @@ class BillingSubscriptionsApi extends base_1.BaseAPI {
|
|
|
740
752
|
}
|
|
741
753
|
}
|
|
742
754
|
exports.BillingSubscriptionsApi = BillingSubscriptionsApi;
|
|
755
|
+
/**
|
|
756
|
+
* DNSSnapshotApi - axios parameter creator
|
|
757
|
+
* @export
|
|
758
|
+
*/
|
|
759
|
+
const DNSSnapshotApiAxiosParamCreator = function (configuration) {
|
|
760
|
+
return {
|
|
761
|
+
/**
|
|
762
|
+
* This endpoint retrieves list of DNS snapshots.
|
|
763
|
+
* @summary Get snapshot list
|
|
764
|
+
* @param {string} domain Domain name
|
|
765
|
+
* @param {*} [options] Override http request option.
|
|
766
|
+
* @throws {RequiredError}
|
|
767
|
+
*/
|
|
768
|
+
getSnapshotListV1: (domain_1, ...args_1) => __awaiter(this, [domain_1, ...args_1], void 0, function* (domain, options = {}) {
|
|
769
|
+
// verify required parameter 'domain' is not null or undefined
|
|
770
|
+
(0, common_1.assertParamExists)('getSnapshotListV1', 'domain', domain);
|
|
771
|
+
const localVarPath = `/api/dns/v1/snapshots/{domain}`
|
|
772
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
773
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
774
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
775
|
+
let baseOptions;
|
|
776
|
+
if (configuration) {
|
|
777
|
+
baseOptions = configuration.baseOptions;
|
|
778
|
+
}
|
|
779
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
780
|
+
const localVarHeaderParameter = {};
|
|
781
|
+
const localVarQueryParameter = {};
|
|
782
|
+
// authentication apiToken required
|
|
783
|
+
// http bearer authentication required
|
|
784
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
785
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
786
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
787
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
788
|
+
return {
|
|
789
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
790
|
+
options: localVarRequestOptions,
|
|
791
|
+
};
|
|
792
|
+
}),
|
|
793
|
+
/**
|
|
794
|
+
* This endpoint retrieves particular DNS snapshot with the contents of DNS zone records.
|
|
795
|
+
* @summary Get snapshot
|
|
796
|
+
* @param {string} domain Domain name
|
|
797
|
+
* @param {number} snapshotId Snapshot ID
|
|
798
|
+
* @param {*} [options] Override http request option.
|
|
799
|
+
* @throws {RequiredError}
|
|
800
|
+
*/
|
|
801
|
+
getSnapshotV1: (domain_1, snapshotId_1, ...args_1) => __awaiter(this, [domain_1, snapshotId_1, ...args_1], void 0, function* (domain, snapshotId, options = {}) {
|
|
802
|
+
// verify required parameter 'domain' is not null or undefined
|
|
803
|
+
(0, common_1.assertParamExists)('getSnapshotV1', 'domain', domain);
|
|
804
|
+
// verify required parameter 'snapshotId' is not null or undefined
|
|
805
|
+
(0, common_1.assertParamExists)('getSnapshotV1', 'snapshotId', snapshotId);
|
|
806
|
+
const localVarPath = `/api/dns/v1/snapshots/{domain}/{snapshotId}`
|
|
807
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)))
|
|
808
|
+
.replace(`{${"snapshotId"}}`, encodeURIComponent(String(snapshotId)));
|
|
809
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
810
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
811
|
+
let baseOptions;
|
|
812
|
+
if (configuration) {
|
|
813
|
+
baseOptions = configuration.baseOptions;
|
|
814
|
+
}
|
|
815
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
816
|
+
const localVarHeaderParameter = {};
|
|
817
|
+
const localVarQueryParameter = {};
|
|
818
|
+
// authentication apiToken required
|
|
819
|
+
// http bearer authentication required
|
|
820
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
821
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
822
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
823
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
824
|
+
return {
|
|
825
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
826
|
+
options: localVarRequestOptions,
|
|
827
|
+
};
|
|
828
|
+
}),
|
|
829
|
+
/**
|
|
830
|
+
* This endpoint restores DNS zone to the selected snapshot.
|
|
831
|
+
* @summary Restore snapshot
|
|
832
|
+
* @param {string} domain Domain name
|
|
833
|
+
* @param {number} snapshotId Snapshot ID
|
|
834
|
+
* @param {*} [options] Override http request option.
|
|
835
|
+
* @throws {RequiredError}
|
|
836
|
+
*/
|
|
837
|
+
restoreSnapshotV1: (domain_1, snapshotId_1, ...args_1) => __awaiter(this, [domain_1, snapshotId_1, ...args_1], void 0, function* (domain, snapshotId, options = {}) {
|
|
838
|
+
// verify required parameter 'domain' is not null or undefined
|
|
839
|
+
(0, common_1.assertParamExists)('restoreSnapshotV1', 'domain', domain);
|
|
840
|
+
// verify required parameter 'snapshotId' is not null or undefined
|
|
841
|
+
(0, common_1.assertParamExists)('restoreSnapshotV1', 'snapshotId', snapshotId);
|
|
842
|
+
const localVarPath = `/api/dns/v1/snapshots/{domain}/{snapshotId}`
|
|
843
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)))
|
|
844
|
+
.replace(`{${"snapshotId"}}`, encodeURIComponent(String(snapshotId)));
|
|
845
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
846
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
847
|
+
let baseOptions;
|
|
848
|
+
if (configuration) {
|
|
849
|
+
baseOptions = configuration.baseOptions;
|
|
850
|
+
}
|
|
851
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
852
|
+
const localVarHeaderParameter = {};
|
|
853
|
+
const localVarQueryParameter = {};
|
|
854
|
+
// authentication apiToken required
|
|
855
|
+
// http bearer authentication required
|
|
856
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
857
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
858
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
859
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
860
|
+
return {
|
|
861
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
862
|
+
options: localVarRequestOptions,
|
|
863
|
+
};
|
|
864
|
+
}),
|
|
865
|
+
};
|
|
866
|
+
};
|
|
867
|
+
exports.DNSSnapshotApiAxiosParamCreator = DNSSnapshotApiAxiosParamCreator;
|
|
868
|
+
/**
|
|
869
|
+
* DNSSnapshotApi - functional programming interface
|
|
870
|
+
* @export
|
|
871
|
+
*/
|
|
872
|
+
const DNSSnapshotApiFp = function (configuration) {
|
|
873
|
+
const localVarAxiosParamCreator = (0, exports.DNSSnapshotApiAxiosParamCreator)(configuration);
|
|
874
|
+
return {
|
|
875
|
+
/**
|
|
876
|
+
* This endpoint retrieves list of DNS snapshots.
|
|
877
|
+
* @summary Get snapshot list
|
|
878
|
+
* @param {string} domain Domain name
|
|
879
|
+
* @param {*} [options] Override http request option.
|
|
880
|
+
* @throws {RequiredError}
|
|
881
|
+
*/
|
|
882
|
+
getSnapshotListV1(domain, options) {
|
|
883
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
884
|
+
var _a, _b;
|
|
885
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getSnapshotListV1(domain, options);
|
|
886
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DNSSnapshotApi.getSnapshotListV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
887
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
888
|
+
});
|
|
889
|
+
},
|
|
890
|
+
/**
|
|
891
|
+
* This endpoint retrieves particular DNS snapshot with the contents of DNS zone records.
|
|
892
|
+
* @summary Get snapshot
|
|
893
|
+
* @param {string} domain Domain name
|
|
894
|
+
* @param {number} snapshotId Snapshot ID
|
|
895
|
+
* @param {*} [options] Override http request option.
|
|
896
|
+
* @throws {RequiredError}
|
|
897
|
+
*/
|
|
898
|
+
getSnapshotV1(domain, snapshotId, options) {
|
|
899
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
900
|
+
var _a, _b;
|
|
901
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getSnapshotV1(domain, snapshotId, options);
|
|
902
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DNSSnapshotApi.getSnapshotV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
903
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
904
|
+
});
|
|
905
|
+
},
|
|
906
|
+
/**
|
|
907
|
+
* This endpoint restores DNS zone to the selected snapshot.
|
|
908
|
+
* @summary Restore snapshot
|
|
909
|
+
* @param {string} domain Domain name
|
|
910
|
+
* @param {number} snapshotId Snapshot ID
|
|
911
|
+
* @param {*} [options] Override http request option.
|
|
912
|
+
* @throws {RequiredError}
|
|
913
|
+
*/
|
|
914
|
+
restoreSnapshotV1(domain, snapshotId, options) {
|
|
915
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
916
|
+
var _a, _b;
|
|
917
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.restoreSnapshotV1(domain, snapshotId, options);
|
|
918
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DNSSnapshotApi.restoreSnapshotV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
919
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
920
|
+
});
|
|
921
|
+
},
|
|
922
|
+
};
|
|
923
|
+
};
|
|
924
|
+
exports.DNSSnapshotApiFp = DNSSnapshotApiFp;
|
|
925
|
+
/**
|
|
926
|
+
* DNSSnapshotApi - factory interface
|
|
927
|
+
* @export
|
|
928
|
+
*/
|
|
929
|
+
const DNSSnapshotApiFactory = function (configuration, basePath, axios) {
|
|
930
|
+
const localVarFp = (0, exports.DNSSnapshotApiFp)(configuration);
|
|
931
|
+
return {
|
|
932
|
+
/**
|
|
933
|
+
* This endpoint retrieves list of DNS snapshots.
|
|
934
|
+
* @summary Get snapshot list
|
|
935
|
+
* @param {string} domain Domain name
|
|
936
|
+
* @param {*} [options] Override http request option.
|
|
937
|
+
* @throws {RequiredError}
|
|
938
|
+
*/
|
|
939
|
+
getSnapshotListV1(domain, options) {
|
|
940
|
+
return localVarFp.getSnapshotListV1(domain, options).then((request) => request(axios, basePath));
|
|
941
|
+
},
|
|
942
|
+
/**
|
|
943
|
+
* This endpoint retrieves particular DNS snapshot with the contents of DNS zone records.
|
|
944
|
+
* @summary Get snapshot
|
|
945
|
+
* @param {string} domain Domain name
|
|
946
|
+
* @param {number} snapshotId Snapshot ID
|
|
947
|
+
* @param {*} [options] Override http request option.
|
|
948
|
+
* @throws {RequiredError}
|
|
949
|
+
*/
|
|
950
|
+
getSnapshotV1(domain, snapshotId, options) {
|
|
951
|
+
return localVarFp.getSnapshotV1(domain, snapshotId, options).then((request) => request(axios, basePath));
|
|
952
|
+
},
|
|
953
|
+
/**
|
|
954
|
+
* This endpoint restores DNS zone to the selected snapshot.
|
|
955
|
+
* @summary Restore snapshot
|
|
956
|
+
* @param {string} domain Domain name
|
|
957
|
+
* @param {number} snapshotId Snapshot ID
|
|
958
|
+
* @param {*} [options] Override http request option.
|
|
959
|
+
* @throws {RequiredError}
|
|
960
|
+
*/
|
|
961
|
+
restoreSnapshotV1(domain, snapshotId, options) {
|
|
962
|
+
return localVarFp.restoreSnapshotV1(domain, snapshotId, options).then((request) => request(axios, basePath));
|
|
963
|
+
},
|
|
964
|
+
};
|
|
965
|
+
};
|
|
966
|
+
exports.DNSSnapshotApiFactory = DNSSnapshotApiFactory;
|
|
967
|
+
/**
|
|
968
|
+
* DNSSnapshotApi - object-oriented interface
|
|
969
|
+
* @export
|
|
970
|
+
* @class DNSSnapshotApi
|
|
971
|
+
* @extends {BaseAPI}
|
|
972
|
+
*/
|
|
973
|
+
class DNSSnapshotApi extends base_1.BaseAPI {
|
|
974
|
+
/**
|
|
975
|
+
* This endpoint retrieves list of DNS snapshots.
|
|
976
|
+
* @summary Get snapshot list
|
|
977
|
+
* @param {string} domain Domain name
|
|
978
|
+
* @param {*} [options] Override http request option.
|
|
979
|
+
* @throws {RequiredError}
|
|
980
|
+
* @memberof DNSSnapshotApi
|
|
981
|
+
*/
|
|
982
|
+
getSnapshotListV1(domain, options) {
|
|
983
|
+
return (0, exports.DNSSnapshotApiFp)(this.configuration).getSnapshotListV1(domain, options).then((request) => request(this.axios, this.basePath));
|
|
984
|
+
}
|
|
985
|
+
/**
|
|
986
|
+
* This endpoint retrieves particular DNS snapshot with the contents of DNS zone records.
|
|
987
|
+
* @summary Get snapshot
|
|
988
|
+
* @param {string} domain Domain name
|
|
989
|
+
* @param {number} snapshotId Snapshot ID
|
|
990
|
+
* @param {*} [options] Override http request option.
|
|
991
|
+
* @throws {RequiredError}
|
|
992
|
+
* @memberof DNSSnapshotApi
|
|
993
|
+
*/
|
|
994
|
+
getSnapshotV1(domain, snapshotId, options) {
|
|
995
|
+
return (0, exports.DNSSnapshotApiFp)(this.configuration).getSnapshotV1(domain, snapshotId, options).then((request) => request(this.axios, this.basePath));
|
|
996
|
+
}
|
|
997
|
+
/**
|
|
998
|
+
* This endpoint restores DNS zone to the selected snapshot.
|
|
999
|
+
* @summary Restore snapshot
|
|
1000
|
+
* @param {string} domain Domain name
|
|
1001
|
+
* @param {number} snapshotId Snapshot ID
|
|
1002
|
+
* @param {*} [options] Override http request option.
|
|
1003
|
+
* @throws {RequiredError}
|
|
1004
|
+
* @memberof DNSSnapshotApi
|
|
1005
|
+
*/
|
|
1006
|
+
restoreSnapshotV1(domain, snapshotId, options) {
|
|
1007
|
+
return (0, exports.DNSSnapshotApiFp)(this.configuration).restoreSnapshotV1(domain, snapshotId, options).then((request) => request(this.axios, this.basePath));
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
exports.DNSSnapshotApi = DNSSnapshotApi;
|
|
1011
|
+
/**
|
|
1012
|
+
* DNSZoneApi - axios parameter creator
|
|
1013
|
+
* @export
|
|
1014
|
+
*/
|
|
1015
|
+
const DNSZoneApiAxiosParamCreator = function (configuration) {
|
|
1016
|
+
return {
|
|
1017
|
+
/**
|
|
1018
|
+
* This endpoint retrieves DNS zone records for a specific domain.
|
|
1019
|
+
* @summary Get records
|
|
1020
|
+
* @param {string} domain Domain name
|
|
1021
|
+
* @param {*} [options] Override http request option.
|
|
1022
|
+
* @throws {RequiredError}
|
|
1023
|
+
*/
|
|
1024
|
+
getRecordsV1: (domain_1, ...args_1) => __awaiter(this, [domain_1, ...args_1], void 0, function* (domain, options = {}) {
|
|
1025
|
+
// verify required parameter 'domain' is not null or undefined
|
|
1026
|
+
(0, common_1.assertParamExists)('getRecordsV1', 'domain', domain);
|
|
1027
|
+
const localVarPath = `/api/dns/v1/zones/{domain}`
|
|
1028
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
1029
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1030
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1031
|
+
let baseOptions;
|
|
1032
|
+
if (configuration) {
|
|
1033
|
+
baseOptions = configuration.baseOptions;
|
|
1034
|
+
}
|
|
1035
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1036
|
+
const localVarHeaderParameter = {};
|
|
1037
|
+
const localVarQueryParameter = {};
|
|
1038
|
+
// authentication apiToken required
|
|
1039
|
+
// http bearer authentication required
|
|
1040
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1041
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1042
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1043
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1044
|
+
return {
|
|
1045
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1046
|
+
options: localVarRequestOptions,
|
|
1047
|
+
};
|
|
1048
|
+
}),
|
|
1049
|
+
/**
|
|
1050
|
+
* This endpoint resets DNS zone to the default records.
|
|
1051
|
+
* @summary Reset zone records
|
|
1052
|
+
* @param {string} domain Domain name
|
|
1053
|
+
* @param {DNSV1ZoneResetRequest} dNSV1ZoneResetRequest
|
|
1054
|
+
* @param {*} [options] Override http request option.
|
|
1055
|
+
* @throws {RequiredError}
|
|
1056
|
+
*/
|
|
1057
|
+
resetZoneRecordsV1: (domain_1, dNSV1ZoneResetRequest_1, ...args_1) => __awaiter(this, [domain_1, dNSV1ZoneResetRequest_1, ...args_1], void 0, function* (domain, dNSV1ZoneResetRequest, options = {}) {
|
|
1058
|
+
// verify required parameter 'domain' is not null or undefined
|
|
1059
|
+
(0, common_1.assertParamExists)('resetZoneRecordsV1', 'domain', domain);
|
|
1060
|
+
// verify required parameter 'dNSV1ZoneResetRequest' is not null or undefined
|
|
1061
|
+
(0, common_1.assertParamExists)('resetZoneRecordsV1', 'dNSV1ZoneResetRequest', dNSV1ZoneResetRequest);
|
|
1062
|
+
const localVarPath = `/api/dns/v1/zones/{domain}/reset`
|
|
1063
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
1064
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1065
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1066
|
+
let baseOptions;
|
|
1067
|
+
if (configuration) {
|
|
1068
|
+
baseOptions = configuration.baseOptions;
|
|
1069
|
+
}
|
|
1070
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1071
|
+
const localVarHeaderParameter = {};
|
|
1072
|
+
const localVarQueryParameter = {};
|
|
1073
|
+
// authentication apiToken required
|
|
1074
|
+
// http bearer authentication required
|
|
1075
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1076
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1077
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1078
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1079
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1080
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dNSV1ZoneResetRequest, localVarRequestOptions, configuration);
|
|
1081
|
+
return {
|
|
1082
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1083
|
+
options: localVarRequestOptions,
|
|
1084
|
+
};
|
|
1085
|
+
}),
|
|
1086
|
+
};
|
|
1087
|
+
};
|
|
1088
|
+
exports.DNSZoneApiAxiosParamCreator = DNSZoneApiAxiosParamCreator;
|
|
1089
|
+
/**
|
|
1090
|
+
* DNSZoneApi - functional programming interface
|
|
1091
|
+
* @export
|
|
1092
|
+
*/
|
|
1093
|
+
const DNSZoneApiFp = function (configuration) {
|
|
1094
|
+
const localVarAxiosParamCreator = (0, exports.DNSZoneApiAxiosParamCreator)(configuration);
|
|
1095
|
+
return {
|
|
1096
|
+
/**
|
|
1097
|
+
* This endpoint retrieves DNS zone records for a specific domain.
|
|
1098
|
+
* @summary Get records
|
|
1099
|
+
* @param {string} domain Domain name
|
|
1100
|
+
* @param {*} [options] Override http request option.
|
|
1101
|
+
* @throws {RequiredError}
|
|
1102
|
+
*/
|
|
1103
|
+
getRecordsV1(domain, options) {
|
|
1104
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1105
|
+
var _a, _b;
|
|
1106
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getRecordsV1(domain, options);
|
|
1107
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DNSZoneApi.getRecordsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1108
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1109
|
+
});
|
|
1110
|
+
},
|
|
1111
|
+
/**
|
|
1112
|
+
* This endpoint resets DNS zone to the default records.
|
|
1113
|
+
* @summary Reset zone records
|
|
1114
|
+
* @param {string} domain Domain name
|
|
1115
|
+
* @param {DNSV1ZoneResetRequest} dNSV1ZoneResetRequest
|
|
1116
|
+
* @param {*} [options] Override http request option.
|
|
1117
|
+
* @throws {RequiredError}
|
|
1118
|
+
*/
|
|
1119
|
+
resetZoneRecordsV1(domain, dNSV1ZoneResetRequest, options) {
|
|
1120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1121
|
+
var _a, _b;
|
|
1122
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.resetZoneRecordsV1(domain, dNSV1ZoneResetRequest, options);
|
|
1123
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DNSZoneApi.resetZoneRecordsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1124
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1125
|
+
});
|
|
1126
|
+
},
|
|
1127
|
+
};
|
|
1128
|
+
};
|
|
1129
|
+
exports.DNSZoneApiFp = DNSZoneApiFp;
|
|
1130
|
+
/**
|
|
1131
|
+
* DNSZoneApi - factory interface
|
|
1132
|
+
* @export
|
|
1133
|
+
*/
|
|
1134
|
+
const DNSZoneApiFactory = function (configuration, basePath, axios) {
|
|
1135
|
+
const localVarFp = (0, exports.DNSZoneApiFp)(configuration);
|
|
1136
|
+
return {
|
|
1137
|
+
/**
|
|
1138
|
+
* This endpoint retrieves DNS zone records for a specific domain.
|
|
1139
|
+
* @summary Get records
|
|
1140
|
+
* @param {string} domain Domain name
|
|
1141
|
+
* @param {*} [options] Override http request option.
|
|
1142
|
+
* @throws {RequiredError}
|
|
1143
|
+
*/
|
|
1144
|
+
getRecordsV1(domain, options) {
|
|
1145
|
+
return localVarFp.getRecordsV1(domain, options).then((request) => request(axios, basePath));
|
|
1146
|
+
},
|
|
1147
|
+
/**
|
|
1148
|
+
* This endpoint resets DNS zone to the default records.
|
|
1149
|
+
* @summary Reset zone records
|
|
1150
|
+
* @param {string} domain Domain name
|
|
1151
|
+
* @param {DNSV1ZoneResetRequest} dNSV1ZoneResetRequest
|
|
1152
|
+
* @param {*} [options] Override http request option.
|
|
1153
|
+
* @throws {RequiredError}
|
|
1154
|
+
*/
|
|
1155
|
+
resetZoneRecordsV1(domain, dNSV1ZoneResetRequest, options) {
|
|
1156
|
+
return localVarFp.resetZoneRecordsV1(domain, dNSV1ZoneResetRequest, options).then((request) => request(axios, basePath));
|
|
1157
|
+
},
|
|
1158
|
+
};
|
|
1159
|
+
};
|
|
1160
|
+
exports.DNSZoneApiFactory = DNSZoneApiFactory;
|
|
1161
|
+
/**
|
|
1162
|
+
* DNSZoneApi - object-oriented interface
|
|
1163
|
+
* @export
|
|
1164
|
+
* @class DNSZoneApi
|
|
1165
|
+
* @extends {BaseAPI}
|
|
1166
|
+
*/
|
|
1167
|
+
class DNSZoneApi extends base_1.BaseAPI {
|
|
1168
|
+
/**
|
|
1169
|
+
* This endpoint retrieves DNS zone records for a specific domain.
|
|
1170
|
+
* @summary Get records
|
|
1171
|
+
* @param {string} domain Domain name
|
|
1172
|
+
* @param {*} [options] Override http request option.
|
|
1173
|
+
* @throws {RequiredError}
|
|
1174
|
+
* @memberof DNSZoneApi
|
|
1175
|
+
*/
|
|
1176
|
+
getRecordsV1(domain, options) {
|
|
1177
|
+
return (0, exports.DNSZoneApiFp)(this.configuration).getRecordsV1(domain, options).then((request) => request(this.axios, this.basePath));
|
|
1178
|
+
}
|
|
1179
|
+
/**
|
|
1180
|
+
* This endpoint resets DNS zone to the default records.
|
|
1181
|
+
* @summary Reset zone records
|
|
1182
|
+
* @param {string} domain Domain name
|
|
1183
|
+
* @param {DNSV1ZoneResetRequest} dNSV1ZoneResetRequest
|
|
1184
|
+
* @param {*} [options] Override http request option.
|
|
1185
|
+
* @throws {RequiredError}
|
|
1186
|
+
* @memberof DNSZoneApi
|
|
1187
|
+
*/
|
|
1188
|
+
resetZoneRecordsV1(domain, dNSV1ZoneResetRequest, options) {
|
|
1189
|
+
return (0, exports.DNSZoneApiFp)(this.configuration).resetZoneRecordsV1(domain, dNSV1ZoneResetRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
exports.DNSZoneApi = DNSZoneApi;
|
|
743
1193
|
/**
|
|
744
1194
|
* DomainsPortfolioApi - axios parameter creator
|
|
745
1195
|
* @export
|
package/dist/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 0.0.
|
|
4
|
+
* API Version: 0.0.14
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/base.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 0.0.
|
|
7
|
+
* API Version: 0.0.14
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 0.0.
|
|
4
|
+
* API Version: 0.0.14
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/common.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 0.0.
|
|
7
|
+
* API Version: 0.0.14
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/configuration.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 0.0.
|
|
4
|
+
* API Version: 0.0.14
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/configuration.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 0.0.
|
|
7
|
+
* API Version: 0.0.14
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -16,7 +16,7 @@ class Configuration {
|
|
|
16
16
|
var _a;
|
|
17
17
|
this.accessToken = param.accessToken;
|
|
18
18
|
this.basePath = param.basePath;
|
|
19
|
-
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-api-sdk-typescript/0.0.
|
|
19
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-api-sdk-typescript/0.0.2" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
20
20
|
this.formDataCtor = param.formDataCtor;
|
|
21
21
|
}
|
|
22
22
|
/**
|