hostinger-api-sdk 0.0.2 → 0.0.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/.github/workflows/{publish-release.yaml → build-release.yaml} +24 -3
- package/CODEOWNERS +1 -0
- package/README.md +2 -2
- package/api.ts +395 -13
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +257 -13
- package/dist/api.js +269 -5
- 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 +257 -13
- package/dist/esm/api.js +267 -3
- 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/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.17
|
|
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 = exports.VPSFirewallApi = exports.VPSFirewallApiFactory = exports.VPSFirewallApiFp = exports.VPSFirewallApiAxiosParamCreator = exports.VPSDataCentersApi = exports.VPSDataCentersApiFactory = exports.VPSDataCentersApiFp = exports.VPSDataCentersApiAxiosParamCreator = exports.VPSBackupsApi = void 0;
|
|
22
|
+
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.DNSV1ZoneUpdateRequestZoneInnerTypeEnum = exports.DNSV1ZoneRecordResourceTypeEnum = exports.DNSV1ZoneDestroyRequestFiltersInnerTypeEnum = 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 = exports.VPSBackupsApiFactory = exports.VPSBackupsApiFp = void 0;
|
|
24
24
|
const axios_1 = require("axios");
|
|
25
25
|
// Some imports not used depending on template conditions
|
|
26
26
|
// @ts-ignore
|
|
@@ -60,7 +60,31 @@ exports.BillingV1SubscriptionSubscriptionResourceStatusEnum = {
|
|
|
60
60
|
InTrial: 'in_trial',
|
|
61
61
|
Future: 'future'
|
|
62
62
|
};
|
|
63
|
-
exports.
|
|
63
|
+
exports.DNSV1ZoneDestroyRequestFiltersInnerTypeEnum = {
|
|
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
|
+
};
|
|
75
|
+
exports.DNSV1ZoneRecordResourceTypeEnum = {
|
|
76
|
+
A: 'A',
|
|
77
|
+
Aaaa: 'AAAA',
|
|
78
|
+
Cname: 'CNAME',
|
|
79
|
+
Alias: 'ALIAS',
|
|
80
|
+
Mx: 'MX',
|
|
81
|
+
Txt: 'TXT',
|
|
82
|
+
Ns: 'NS',
|
|
83
|
+
Soa: 'SOA',
|
|
84
|
+
Srv: 'SRV',
|
|
85
|
+
Caa: 'CAA'
|
|
86
|
+
};
|
|
87
|
+
exports.DNSV1ZoneUpdateRequestZoneInnerTypeEnum = {
|
|
64
88
|
A: 'A',
|
|
65
89
|
Aaaa: 'AAAA',
|
|
66
90
|
Cname: 'CNAME',
|
|
@@ -128,9 +152,21 @@ exports.VPSV1FirewallRulesStoreRequestSourceEnum = {
|
|
|
128
152
|
};
|
|
129
153
|
exports.VPSV1VirtualMachineVirtualMachineResourceStateEnum = {
|
|
130
154
|
Running: 'running',
|
|
155
|
+
Starting: 'starting',
|
|
156
|
+
Stopping: 'stopping',
|
|
131
157
|
Stopped: 'stopped',
|
|
132
158
|
Creating: 'creating',
|
|
133
|
-
Initial: 'initial'
|
|
159
|
+
Initial: 'initial',
|
|
160
|
+
Error: 'error',
|
|
161
|
+
Suspending: 'suspending',
|
|
162
|
+
Unsuspending: 'unsuspending',
|
|
163
|
+
Suspended: 'suspended',
|
|
164
|
+
Destroying: 'destroying',
|
|
165
|
+
Destroyed: 'destroyed',
|
|
166
|
+
Recreating: 'recreating',
|
|
167
|
+
Restoring: 'restoring',
|
|
168
|
+
Recovery: 'recovery',
|
|
169
|
+
StoppingRecovery: 'stopping_recovery'
|
|
134
170
|
};
|
|
135
171
|
exports.VPSV1VirtualMachineVirtualMachineResourceActionsLockEnum = {
|
|
136
172
|
Unlocked: 'unlocked',
|
|
@@ -1014,6 +1050,43 @@ exports.DNSSnapshotApi = DNSSnapshotApi;
|
|
|
1014
1050
|
*/
|
|
1015
1051
|
const DNSZoneApiAxiosParamCreator = function (configuration) {
|
|
1016
1052
|
return {
|
|
1053
|
+
/**
|
|
1054
|
+
* This endpoint deletes selected DNS records for the selected domain.
|
|
1055
|
+
* @summary Delete zone records
|
|
1056
|
+
* @param {string} domain Domain name
|
|
1057
|
+
* @param {DNSV1ZoneDestroyRequest} dNSV1ZoneDestroyRequest
|
|
1058
|
+
* @param {*} [options] Override http request option.
|
|
1059
|
+
* @throws {RequiredError}
|
|
1060
|
+
*/
|
|
1061
|
+
deleteZoneRecordsV1: (domain_1, dNSV1ZoneDestroyRequest_1, ...args_1) => __awaiter(this, [domain_1, dNSV1ZoneDestroyRequest_1, ...args_1], void 0, function* (domain, dNSV1ZoneDestroyRequest, options = {}) {
|
|
1062
|
+
// verify required parameter 'domain' is not null or undefined
|
|
1063
|
+
(0, common_1.assertParamExists)('deleteZoneRecordsV1', 'domain', domain);
|
|
1064
|
+
// verify required parameter 'dNSV1ZoneDestroyRequest' is not null or undefined
|
|
1065
|
+
(0, common_1.assertParamExists)('deleteZoneRecordsV1', 'dNSV1ZoneDestroyRequest', dNSV1ZoneDestroyRequest);
|
|
1066
|
+
const localVarPath = `/api/dns/v1/zones/{domain}`
|
|
1067
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
1068
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1069
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1070
|
+
let baseOptions;
|
|
1071
|
+
if (configuration) {
|
|
1072
|
+
baseOptions = configuration.baseOptions;
|
|
1073
|
+
}
|
|
1074
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
1075
|
+
const localVarHeaderParameter = {};
|
|
1076
|
+
const localVarQueryParameter = {};
|
|
1077
|
+
// authentication apiToken required
|
|
1078
|
+
// http bearer authentication required
|
|
1079
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1080
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1081
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1082
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1083
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1084
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dNSV1ZoneDestroyRequest, localVarRequestOptions, configuration);
|
|
1085
|
+
return {
|
|
1086
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1087
|
+
options: localVarRequestOptions,
|
|
1088
|
+
};
|
|
1089
|
+
}),
|
|
1017
1090
|
/**
|
|
1018
1091
|
* This endpoint retrieves DNS zone records for a specific domain.
|
|
1019
1092
|
* @summary Get records
|
|
@@ -1083,6 +1156,80 @@ const DNSZoneApiAxiosParamCreator = function (configuration) {
|
|
|
1083
1156
|
options: localVarRequestOptions,
|
|
1084
1157
|
};
|
|
1085
1158
|
}),
|
|
1159
|
+
/**
|
|
1160
|
+
* This endpoint updates DNS records for the selected domain. This endpoint could also be used to delete single record when multiple records exist under same name. In that case use `overwrite` flag and provide records which should remain. All other records under same name will be deleted.
|
|
1161
|
+
* @summary Update zone records
|
|
1162
|
+
* @param {string} domain Domain name
|
|
1163
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
1164
|
+
* @param {*} [options] Override http request option.
|
|
1165
|
+
* @throws {RequiredError}
|
|
1166
|
+
*/
|
|
1167
|
+
updateZoneRecordsV1: (domain_1, dNSV1ZoneUpdateRequest_1, ...args_1) => __awaiter(this, [domain_1, dNSV1ZoneUpdateRequest_1, ...args_1], void 0, function* (domain, dNSV1ZoneUpdateRequest, options = {}) {
|
|
1168
|
+
// verify required parameter 'domain' is not null or undefined
|
|
1169
|
+
(0, common_1.assertParamExists)('updateZoneRecordsV1', 'domain', domain);
|
|
1170
|
+
// verify required parameter 'dNSV1ZoneUpdateRequest' is not null or undefined
|
|
1171
|
+
(0, common_1.assertParamExists)('updateZoneRecordsV1', 'dNSV1ZoneUpdateRequest', dNSV1ZoneUpdateRequest);
|
|
1172
|
+
const localVarPath = `/api/dns/v1/zones/{domain}`
|
|
1173
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
1174
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1175
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1176
|
+
let baseOptions;
|
|
1177
|
+
if (configuration) {
|
|
1178
|
+
baseOptions = configuration.baseOptions;
|
|
1179
|
+
}
|
|
1180
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
1181
|
+
const localVarHeaderParameter = {};
|
|
1182
|
+
const localVarQueryParameter = {};
|
|
1183
|
+
// authentication apiToken required
|
|
1184
|
+
// http bearer authentication required
|
|
1185
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1186
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1187
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1188
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1189
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1190
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dNSV1ZoneUpdateRequest, localVarRequestOptions, configuration);
|
|
1191
|
+
return {
|
|
1192
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1193
|
+
options: localVarRequestOptions,
|
|
1194
|
+
};
|
|
1195
|
+
}),
|
|
1196
|
+
/**
|
|
1197
|
+
* This endpoint used to validate DNS records prior update for the selected domain. If the validation is successful, the response will contain `200 Success` code. If there is validation error, the response will fail with `422 Validation error` code.
|
|
1198
|
+
* @summary Validate zone records
|
|
1199
|
+
* @param {string} domain Domain name
|
|
1200
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
1201
|
+
* @param {*} [options] Override http request option.
|
|
1202
|
+
* @throws {RequiredError}
|
|
1203
|
+
*/
|
|
1204
|
+
validateZoneRecordsV1: (domain_1, dNSV1ZoneUpdateRequest_1, ...args_1) => __awaiter(this, [domain_1, dNSV1ZoneUpdateRequest_1, ...args_1], void 0, function* (domain, dNSV1ZoneUpdateRequest, options = {}) {
|
|
1205
|
+
// verify required parameter 'domain' is not null or undefined
|
|
1206
|
+
(0, common_1.assertParamExists)('validateZoneRecordsV1', 'domain', domain);
|
|
1207
|
+
// verify required parameter 'dNSV1ZoneUpdateRequest' is not null or undefined
|
|
1208
|
+
(0, common_1.assertParamExists)('validateZoneRecordsV1', 'dNSV1ZoneUpdateRequest', dNSV1ZoneUpdateRequest);
|
|
1209
|
+
const localVarPath = `/api/dns/v1/zones/{domain}/validate`
|
|
1210
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
1211
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1212
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1213
|
+
let baseOptions;
|
|
1214
|
+
if (configuration) {
|
|
1215
|
+
baseOptions = configuration.baseOptions;
|
|
1216
|
+
}
|
|
1217
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1218
|
+
const localVarHeaderParameter = {};
|
|
1219
|
+
const localVarQueryParameter = {};
|
|
1220
|
+
// authentication apiToken required
|
|
1221
|
+
// http bearer authentication required
|
|
1222
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1223
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1224
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1225
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1226
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1227
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dNSV1ZoneUpdateRequest, localVarRequestOptions, configuration);
|
|
1228
|
+
return {
|
|
1229
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1230
|
+
options: localVarRequestOptions,
|
|
1231
|
+
};
|
|
1232
|
+
}),
|
|
1086
1233
|
};
|
|
1087
1234
|
};
|
|
1088
1235
|
exports.DNSZoneApiAxiosParamCreator = DNSZoneApiAxiosParamCreator;
|
|
@@ -1093,6 +1240,22 @@ exports.DNSZoneApiAxiosParamCreator = DNSZoneApiAxiosParamCreator;
|
|
|
1093
1240
|
const DNSZoneApiFp = function (configuration) {
|
|
1094
1241
|
const localVarAxiosParamCreator = (0, exports.DNSZoneApiAxiosParamCreator)(configuration);
|
|
1095
1242
|
return {
|
|
1243
|
+
/**
|
|
1244
|
+
* This endpoint deletes selected DNS records for the selected domain.
|
|
1245
|
+
* @summary Delete zone records
|
|
1246
|
+
* @param {string} domain Domain name
|
|
1247
|
+
* @param {DNSV1ZoneDestroyRequest} dNSV1ZoneDestroyRequest
|
|
1248
|
+
* @param {*} [options] Override http request option.
|
|
1249
|
+
* @throws {RequiredError}
|
|
1250
|
+
*/
|
|
1251
|
+
deleteZoneRecordsV1(domain, dNSV1ZoneDestroyRequest, options) {
|
|
1252
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1253
|
+
var _a, _b;
|
|
1254
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteZoneRecordsV1(domain, dNSV1ZoneDestroyRequest, options);
|
|
1255
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DNSZoneApi.deleteZoneRecordsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1256
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1257
|
+
});
|
|
1258
|
+
},
|
|
1096
1259
|
/**
|
|
1097
1260
|
* This endpoint retrieves DNS zone records for a specific domain.
|
|
1098
1261
|
* @summary Get records
|
|
@@ -1124,6 +1287,38 @@ const DNSZoneApiFp = function (configuration) {
|
|
|
1124
1287
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1125
1288
|
});
|
|
1126
1289
|
},
|
|
1290
|
+
/**
|
|
1291
|
+
* This endpoint updates DNS records for the selected domain. This endpoint could also be used to delete single record when multiple records exist under same name. In that case use `overwrite` flag and provide records which should remain. All other records under same name will be deleted.
|
|
1292
|
+
* @summary Update zone records
|
|
1293
|
+
* @param {string} domain Domain name
|
|
1294
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
1295
|
+
* @param {*} [options] Override http request option.
|
|
1296
|
+
* @throws {RequiredError}
|
|
1297
|
+
*/
|
|
1298
|
+
updateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options) {
|
|
1299
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1300
|
+
var _a, _b;
|
|
1301
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options);
|
|
1302
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DNSZoneApi.updateZoneRecordsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1303
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1304
|
+
});
|
|
1305
|
+
},
|
|
1306
|
+
/**
|
|
1307
|
+
* This endpoint used to validate DNS records prior update for the selected domain. If the validation is successful, the response will contain `200 Success` code. If there is validation error, the response will fail with `422 Validation error` code.
|
|
1308
|
+
* @summary Validate zone records
|
|
1309
|
+
* @param {string} domain Domain name
|
|
1310
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
1311
|
+
* @param {*} [options] Override http request option.
|
|
1312
|
+
* @throws {RequiredError}
|
|
1313
|
+
*/
|
|
1314
|
+
validateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options) {
|
|
1315
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1316
|
+
var _a, _b;
|
|
1317
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.validateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options);
|
|
1318
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DNSZoneApi.validateZoneRecordsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
1319
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1320
|
+
});
|
|
1321
|
+
},
|
|
1127
1322
|
};
|
|
1128
1323
|
};
|
|
1129
1324
|
exports.DNSZoneApiFp = DNSZoneApiFp;
|
|
@@ -1134,6 +1329,17 @@ exports.DNSZoneApiFp = DNSZoneApiFp;
|
|
|
1134
1329
|
const DNSZoneApiFactory = function (configuration, basePath, axios) {
|
|
1135
1330
|
const localVarFp = (0, exports.DNSZoneApiFp)(configuration);
|
|
1136
1331
|
return {
|
|
1332
|
+
/**
|
|
1333
|
+
* This endpoint deletes selected DNS records for the selected domain.
|
|
1334
|
+
* @summary Delete zone records
|
|
1335
|
+
* @param {string} domain Domain name
|
|
1336
|
+
* @param {DNSV1ZoneDestroyRequest} dNSV1ZoneDestroyRequest
|
|
1337
|
+
* @param {*} [options] Override http request option.
|
|
1338
|
+
* @throws {RequiredError}
|
|
1339
|
+
*/
|
|
1340
|
+
deleteZoneRecordsV1(domain, dNSV1ZoneDestroyRequest, options) {
|
|
1341
|
+
return localVarFp.deleteZoneRecordsV1(domain, dNSV1ZoneDestroyRequest, options).then((request) => request(axios, basePath));
|
|
1342
|
+
},
|
|
1137
1343
|
/**
|
|
1138
1344
|
* This endpoint retrieves DNS zone records for a specific domain.
|
|
1139
1345
|
* @summary Get records
|
|
@@ -1155,6 +1361,28 @@ const DNSZoneApiFactory = function (configuration, basePath, axios) {
|
|
|
1155
1361
|
resetZoneRecordsV1(domain, dNSV1ZoneResetRequest, options) {
|
|
1156
1362
|
return localVarFp.resetZoneRecordsV1(domain, dNSV1ZoneResetRequest, options).then((request) => request(axios, basePath));
|
|
1157
1363
|
},
|
|
1364
|
+
/**
|
|
1365
|
+
* This endpoint updates DNS records for the selected domain. This endpoint could also be used to delete single record when multiple records exist under same name. In that case use `overwrite` flag and provide records which should remain. All other records under same name will be deleted.
|
|
1366
|
+
* @summary Update zone records
|
|
1367
|
+
* @param {string} domain Domain name
|
|
1368
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
1369
|
+
* @param {*} [options] Override http request option.
|
|
1370
|
+
* @throws {RequiredError}
|
|
1371
|
+
*/
|
|
1372
|
+
updateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options) {
|
|
1373
|
+
return localVarFp.updateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options).then((request) => request(axios, basePath));
|
|
1374
|
+
},
|
|
1375
|
+
/**
|
|
1376
|
+
* This endpoint used to validate DNS records prior update for the selected domain. If the validation is successful, the response will contain `200 Success` code. If there is validation error, the response will fail with `422 Validation error` code.
|
|
1377
|
+
* @summary Validate zone records
|
|
1378
|
+
* @param {string} domain Domain name
|
|
1379
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
1380
|
+
* @param {*} [options] Override http request option.
|
|
1381
|
+
* @throws {RequiredError}
|
|
1382
|
+
*/
|
|
1383
|
+
validateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options) {
|
|
1384
|
+
return localVarFp.validateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options).then((request) => request(axios, basePath));
|
|
1385
|
+
},
|
|
1158
1386
|
};
|
|
1159
1387
|
};
|
|
1160
1388
|
exports.DNSZoneApiFactory = DNSZoneApiFactory;
|
|
@@ -1165,6 +1393,18 @@ exports.DNSZoneApiFactory = DNSZoneApiFactory;
|
|
|
1165
1393
|
* @extends {BaseAPI}
|
|
1166
1394
|
*/
|
|
1167
1395
|
class DNSZoneApi extends base_1.BaseAPI {
|
|
1396
|
+
/**
|
|
1397
|
+
* This endpoint deletes selected DNS records for the selected domain.
|
|
1398
|
+
* @summary Delete zone records
|
|
1399
|
+
* @param {string} domain Domain name
|
|
1400
|
+
* @param {DNSV1ZoneDestroyRequest} dNSV1ZoneDestroyRequest
|
|
1401
|
+
* @param {*} [options] Override http request option.
|
|
1402
|
+
* @throws {RequiredError}
|
|
1403
|
+
* @memberof DNSZoneApi
|
|
1404
|
+
*/
|
|
1405
|
+
deleteZoneRecordsV1(domain, dNSV1ZoneDestroyRequest, options) {
|
|
1406
|
+
return (0, exports.DNSZoneApiFp)(this.configuration).deleteZoneRecordsV1(domain, dNSV1ZoneDestroyRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1407
|
+
}
|
|
1168
1408
|
/**
|
|
1169
1409
|
* This endpoint retrieves DNS zone records for a specific domain.
|
|
1170
1410
|
* @summary Get records
|
|
@@ -1188,6 +1428,30 @@ class DNSZoneApi extends base_1.BaseAPI {
|
|
|
1188
1428
|
resetZoneRecordsV1(domain, dNSV1ZoneResetRequest, options) {
|
|
1189
1429
|
return (0, exports.DNSZoneApiFp)(this.configuration).resetZoneRecordsV1(domain, dNSV1ZoneResetRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1190
1430
|
}
|
|
1431
|
+
/**
|
|
1432
|
+
* This endpoint updates DNS records for the selected domain. This endpoint could also be used to delete single record when multiple records exist under same name. In that case use `overwrite` flag and provide records which should remain. All other records under same name will be deleted.
|
|
1433
|
+
* @summary Update zone records
|
|
1434
|
+
* @param {string} domain Domain name
|
|
1435
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
1436
|
+
* @param {*} [options] Override http request option.
|
|
1437
|
+
* @throws {RequiredError}
|
|
1438
|
+
* @memberof DNSZoneApi
|
|
1439
|
+
*/
|
|
1440
|
+
updateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options) {
|
|
1441
|
+
return (0, exports.DNSZoneApiFp)(this.configuration).updateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1442
|
+
}
|
|
1443
|
+
/**
|
|
1444
|
+
* This endpoint used to validate DNS records prior update for the selected domain. If the validation is successful, the response will contain `200 Success` code. If there is validation error, the response will fail with `422 Validation error` code.
|
|
1445
|
+
* @summary Validate zone records
|
|
1446
|
+
* @param {string} domain Domain name
|
|
1447
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
1448
|
+
* @param {*} [options] Override http request option.
|
|
1449
|
+
* @throws {RequiredError}
|
|
1450
|
+
* @memberof DNSZoneApi
|
|
1451
|
+
*/
|
|
1452
|
+
validateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options) {
|
|
1453
|
+
return (0, exports.DNSZoneApiFp)(this.configuration).validateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1454
|
+
}
|
|
1191
1455
|
}
|
|
1192
1456
|
exports.DNSZoneApi = DNSZoneApi;
|
|
1193
1457
|
/**
|
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.17
|
|
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.17
|
|
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.17
|
|
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.17
|
|
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.17
|
|
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.17
|
|
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.4" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
20
20
|
this.formDataCtor = param.formDataCtor;
|
|
21
21
|
}
|
|
22
22
|
/**
|