hostinger-api-sdk 0.0.2 → 0.0.3
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/README.md +2 -2
- package/api.ts +382 -12
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +245 -13
- package/dist/api.js +256 -4
- 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 +245 -13
- package/dist/esm/api.js +254 -2
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/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.16
|
|
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',
|
|
@@ -1014,6 +1038,43 @@ exports.DNSSnapshotApi = DNSSnapshotApi;
|
|
|
1014
1038
|
*/
|
|
1015
1039
|
const DNSZoneApiAxiosParamCreator = function (configuration) {
|
|
1016
1040
|
return {
|
|
1041
|
+
/**
|
|
1042
|
+
* This endpoint deletes selected DNS records for the selected domain.
|
|
1043
|
+
* @summary Delete zone records
|
|
1044
|
+
* @param {string} domain Domain name
|
|
1045
|
+
* @param {DNSV1ZoneDestroyRequest} dNSV1ZoneDestroyRequest
|
|
1046
|
+
* @param {*} [options] Override http request option.
|
|
1047
|
+
* @throws {RequiredError}
|
|
1048
|
+
*/
|
|
1049
|
+
deleteZoneRecordsV1: (domain_1, dNSV1ZoneDestroyRequest_1, ...args_1) => __awaiter(this, [domain_1, dNSV1ZoneDestroyRequest_1, ...args_1], void 0, function* (domain, dNSV1ZoneDestroyRequest, options = {}) {
|
|
1050
|
+
// verify required parameter 'domain' is not null or undefined
|
|
1051
|
+
(0, common_1.assertParamExists)('deleteZoneRecordsV1', 'domain', domain);
|
|
1052
|
+
// verify required parameter 'dNSV1ZoneDestroyRequest' is not null or undefined
|
|
1053
|
+
(0, common_1.assertParamExists)('deleteZoneRecordsV1', 'dNSV1ZoneDestroyRequest', dNSV1ZoneDestroyRequest);
|
|
1054
|
+
const localVarPath = `/api/dns/v1/zones/{domain}`
|
|
1055
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
1056
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1057
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1058
|
+
let baseOptions;
|
|
1059
|
+
if (configuration) {
|
|
1060
|
+
baseOptions = configuration.baseOptions;
|
|
1061
|
+
}
|
|
1062
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
1063
|
+
const localVarHeaderParameter = {};
|
|
1064
|
+
const localVarQueryParameter = {};
|
|
1065
|
+
// authentication apiToken required
|
|
1066
|
+
// http bearer authentication required
|
|
1067
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1068
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1069
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1070
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1071
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1072
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dNSV1ZoneDestroyRequest, localVarRequestOptions, configuration);
|
|
1073
|
+
return {
|
|
1074
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1075
|
+
options: localVarRequestOptions,
|
|
1076
|
+
};
|
|
1077
|
+
}),
|
|
1017
1078
|
/**
|
|
1018
1079
|
* This endpoint retrieves DNS zone records for a specific domain.
|
|
1019
1080
|
* @summary Get records
|
|
@@ -1083,6 +1144,80 @@ const DNSZoneApiAxiosParamCreator = function (configuration) {
|
|
|
1083
1144
|
options: localVarRequestOptions,
|
|
1084
1145
|
};
|
|
1085
1146
|
}),
|
|
1147
|
+
/**
|
|
1148
|
+
* 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.
|
|
1149
|
+
* @summary Update zone records
|
|
1150
|
+
* @param {string} domain Domain name
|
|
1151
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
1152
|
+
* @param {*} [options] Override http request option.
|
|
1153
|
+
* @throws {RequiredError}
|
|
1154
|
+
*/
|
|
1155
|
+
updateZoneRecordsV1: (domain_1, dNSV1ZoneUpdateRequest_1, ...args_1) => __awaiter(this, [domain_1, dNSV1ZoneUpdateRequest_1, ...args_1], void 0, function* (domain, dNSV1ZoneUpdateRequest, options = {}) {
|
|
1156
|
+
// verify required parameter 'domain' is not null or undefined
|
|
1157
|
+
(0, common_1.assertParamExists)('updateZoneRecordsV1', 'domain', domain);
|
|
1158
|
+
// verify required parameter 'dNSV1ZoneUpdateRequest' is not null or undefined
|
|
1159
|
+
(0, common_1.assertParamExists)('updateZoneRecordsV1', 'dNSV1ZoneUpdateRequest', dNSV1ZoneUpdateRequest);
|
|
1160
|
+
const localVarPath = `/api/dns/v1/zones/{domain}`
|
|
1161
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
1162
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1163
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1164
|
+
let baseOptions;
|
|
1165
|
+
if (configuration) {
|
|
1166
|
+
baseOptions = configuration.baseOptions;
|
|
1167
|
+
}
|
|
1168
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
1169
|
+
const localVarHeaderParameter = {};
|
|
1170
|
+
const localVarQueryParameter = {};
|
|
1171
|
+
// authentication apiToken required
|
|
1172
|
+
// http bearer authentication required
|
|
1173
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1174
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1175
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1176
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1177
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1178
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dNSV1ZoneUpdateRequest, localVarRequestOptions, configuration);
|
|
1179
|
+
return {
|
|
1180
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1181
|
+
options: localVarRequestOptions,
|
|
1182
|
+
};
|
|
1183
|
+
}),
|
|
1184
|
+
/**
|
|
1185
|
+
* 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.
|
|
1186
|
+
* @summary Validate zone records
|
|
1187
|
+
* @param {string} domain Domain name
|
|
1188
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
1189
|
+
* @param {*} [options] Override http request option.
|
|
1190
|
+
* @throws {RequiredError}
|
|
1191
|
+
*/
|
|
1192
|
+
validateZoneRecordsV1: (domain_1, dNSV1ZoneUpdateRequest_1, ...args_1) => __awaiter(this, [domain_1, dNSV1ZoneUpdateRequest_1, ...args_1], void 0, function* (domain, dNSV1ZoneUpdateRequest, options = {}) {
|
|
1193
|
+
// verify required parameter 'domain' is not null or undefined
|
|
1194
|
+
(0, common_1.assertParamExists)('validateZoneRecordsV1', 'domain', domain);
|
|
1195
|
+
// verify required parameter 'dNSV1ZoneUpdateRequest' is not null or undefined
|
|
1196
|
+
(0, common_1.assertParamExists)('validateZoneRecordsV1', 'dNSV1ZoneUpdateRequest', dNSV1ZoneUpdateRequest);
|
|
1197
|
+
const localVarPath = `/api/dns/v1/zones/{domain}/validate`
|
|
1198
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
1199
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1200
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1201
|
+
let baseOptions;
|
|
1202
|
+
if (configuration) {
|
|
1203
|
+
baseOptions = configuration.baseOptions;
|
|
1204
|
+
}
|
|
1205
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1206
|
+
const localVarHeaderParameter = {};
|
|
1207
|
+
const localVarQueryParameter = {};
|
|
1208
|
+
// authentication apiToken required
|
|
1209
|
+
// http bearer authentication required
|
|
1210
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1211
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1212
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1213
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1214
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1215
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dNSV1ZoneUpdateRequest, localVarRequestOptions, configuration);
|
|
1216
|
+
return {
|
|
1217
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1218
|
+
options: localVarRequestOptions,
|
|
1219
|
+
};
|
|
1220
|
+
}),
|
|
1086
1221
|
};
|
|
1087
1222
|
};
|
|
1088
1223
|
exports.DNSZoneApiAxiosParamCreator = DNSZoneApiAxiosParamCreator;
|
|
@@ -1093,6 +1228,22 @@ exports.DNSZoneApiAxiosParamCreator = DNSZoneApiAxiosParamCreator;
|
|
|
1093
1228
|
const DNSZoneApiFp = function (configuration) {
|
|
1094
1229
|
const localVarAxiosParamCreator = (0, exports.DNSZoneApiAxiosParamCreator)(configuration);
|
|
1095
1230
|
return {
|
|
1231
|
+
/**
|
|
1232
|
+
* This endpoint deletes selected DNS records for the selected domain.
|
|
1233
|
+
* @summary Delete zone records
|
|
1234
|
+
* @param {string} domain Domain name
|
|
1235
|
+
* @param {DNSV1ZoneDestroyRequest} dNSV1ZoneDestroyRequest
|
|
1236
|
+
* @param {*} [options] Override http request option.
|
|
1237
|
+
* @throws {RequiredError}
|
|
1238
|
+
*/
|
|
1239
|
+
deleteZoneRecordsV1(domain, dNSV1ZoneDestroyRequest, options) {
|
|
1240
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1241
|
+
var _a, _b;
|
|
1242
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteZoneRecordsV1(domain, dNSV1ZoneDestroyRequest, options);
|
|
1243
|
+
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;
|
|
1244
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1245
|
+
});
|
|
1246
|
+
},
|
|
1096
1247
|
/**
|
|
1097
1248
|
* This endpoint retrieves DNS zone records for a specific domain.
|
|
1098
1249
|
* @summary Get records
|
|
@@ -1124,6 +1275,38 @@ const DNSZoneApiFp = function (configuration) {
|
|
|
1124
1275
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1125
1276
|
});
|
|
1126
1277
|
},
|
|
1278
|
+
/**
|
|
1279
|
+
* 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.
|
|
1280
|
+
* @summary Update zone records
|
|
1281
|
+
* @param {string} domain Domain name
|
|
1282
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
1283
|
+
* @param {*} [options] Override http request option.
|
|
1284
|
+
* @throws {RequiredError}
|
|
1285
|
+
*/
|
|
1286
|
+
updateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options) {
|
|
1287
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1288
|
+
var _a, _b;
|
|
1289
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options);
|
|
1290
|
+
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;
|
|
1291
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1292
|
+
});
|
|
1293
|
+
},
|
|
1294
|
+
/**
|
|
1295
|
+
* 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.
|
|
1296
|
+
* @summary Validate zone records
|
|
1297
|
+
* @param {string} domain Domain name
|
|
1298
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
1299
|
+
* @param {*} [options] Override http request option.
|
|
1300
|
+
* @throws {RequiredError}
|
|
1301
|
+
*/
|
|
1302
|
+
validateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options) {
|
|
1303
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1304
|
+
var _a, _b;
|
|
1305
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.validateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options);
|
|
1306
|
+
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;
|
|
1307
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1308
|
+
});
|
|
1309
|
+
},
|
|
1127
1310
|
};
|
|
1128
1311
|
};
|
|
1129
1312
|
exports.DNSZoneApiFp = DNSZoneApiFp;
|
|
@@ -1134,6 +1317,17 @@ exports.DNSZoneApiFp = DNSZoneApiFp;
|
|
|
1134
1317
|
const DNSZoneApiFactory = function (configuration, basePath, axios) {
|
|
1135
1318
|
const localVarFp = (0, exports.DNSZoneApiFp)(configuration);
|
|
1136
1319
|
return {
|
|
1320
|
+
/**
|
|
1321
|
+
* This endpoint deletes selected DNS records for the selected domain.
|
|
1322
|
+
* @summary Delete zone records
|
|
1323
|
+
* @param {string} domain Domain name
|
|
1324
|
+
* @param {DNSV1ZoneDestroyRequest} dNSV1ZoneDestroyRequest
|
|
1325
|
+
* @param {*} [options] Override http request option.
|
|
1326
|
+
* @throws {RequiredError}
|
|
1327
|
+
*/
|
|
1328
|
+
deleteZoneRecordsV1(domain, dNSV1ZoneDestroyRequest, options) {
|
|
1329
|
+
return localVarFp.deleteZoneRecordsV1(domain, dNSV1ZoneDestroyRequest, options).then((request) => request(axios, basePath));
|
|
1330
|
+
},
|
|
1137
1331
|
/**
|
|
1138
1332
|
* This endpoint retrieves DNS zone records for a specific domain.
|
|
1139
1333
|
* @summary Get records
|
|
@@ -1155,6 +1349,28 @@ const DNSZoneApiFactory = function (configuration, basePath, axios) {
|
|
|
1155
1349
|
resetZoneRecordsV1(domain, dNSV1ZoneResetRequest, options) {
|
|
1156
1350
|
return localVarFp.resetZoneRecordsV1(domain, dNSV1ZoneResetRequest, options).then((request) => request(axios, basePath));
|
|
1157
1351
|
},
|
|
1352
|
+
/**
|
|
1353
|
+
* 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.
|
|
1354
|
+
* @summary Update zone records
|
|
1355
|
+
* @param {string} domain Domain name
|
|
1356
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
1357
|
+
* @param {*} [options] Override http request option.
|
|
1358
|
+
* @throws {RequiredError}
|
|
1359
|
+
*/
|
|
1360
|
+
updateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options) {
|
|
1361
|
+
return localVarFp.updateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options).then((request) => request(axios, basePath));
|
|
1362
|
+
},
|
|
1363
|
+
/**
|
|
1364
|
+
* 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.
|
|
1365
|
+
* @summary Validate zone records
|
|
1366
|
+
* @param {string} domain Domain name
|
|
1367
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
1368
|
+
* @param {*} [options] Override http request option.
|
|
1369
|
+
* @throws {RequiredError}
|
|
1370
|
+
*/
|
|
1371
|
+
validateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options) {
|
|
1372
|
+
return localVarFp.validateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options).then((request) => request(axios, basePath));
|
|
1373
|
+
},
|
|
1158
1374
|
};
|
|
1159
1375
|
};
|
|
1160
1376
|
exports.DNSZoneApiFactory = DNSZoneApiFactory;
|
|
@@ -1165,6 +1381,18 @@ exports.DNSZoneApiFactory = DNSZoneApiFactory;
|
|
|
1165
1381
|
* @extends {BaseAPI}
|
|
1166
1382
|
*/
|
|
1167
1383
|
class DNSZoneApi extends base_1.BaseAPI {
|
|
1384
|
+
/**
|
|
1385
|
+
* This endpoint deletes selected DNS records for the selected domain.
|
|
1386
|
+
* @summary Delete zone records
|
|
1387
|
+
* @param {string} domain Domain name
|
|
1388
|
+
* @param {DNSV1ZoneDestroyRequest} dNSV1ZoneDestroyRequest
|
|
1389
|
+
* @param {*} [options] Override http request option.
|
|
1390
|
+
* @throws {RequiredError}
|
|
1391
|
+
* @memberof DNSZoneApi
|
|
1392
|
+
*/
|
|
1393
|
+
deleteZoneRecordsV1(domain, dNSV1ZoneDestroyRequest, options) {
|
|
1394
|
+
return (0, exports.DNSZoneApiFp)(this.configuration).deleteZoneRecordsV1(domain, dNSV1ZoneDestroyRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1395
|
+
}
|
|
1168
1396
|
/**
|
|
1169
1397
|
* This endpoint retrieves DNS zone records for a specific domain.
|
|
1170
1398
|
* @summary Get records
|
|
@@ -1188,6 +1416,30 @@ class DNSZoneApi extends base_1.BaseAPI {
|
|
|
1188
1416
|
resetZoneRecordsV1(domain, dNSV1ZoneResetRequest, options) {
|
|
1189
1417
|
return (0, exports.DNSZoneApiFp)(this.configuration).resetZoneRecordsV1(domain, dNSV1ZoneResetRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1190
1418
|
}
|
|
1419
|
+
/**
|
|
1420
|
+
* 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.
|
|
1421
|
+
* @summary Update zone records
|
|
1422
|
+
* @param {string} domain Domain name
|
|
1423
|
+
* @param {DNSV1ZoneUpdateRequest} dNSV1ZoneUpdateRequest
|
|
1424
|
+
* @param {*} [options] Override http request option.
|
|
1425
|
+
* @throws {RequiredError}
|
|
1426
|
+
* @memberof DNSZoneApi
|
|
1427
|
+
*/
|
|
1428
|
+
updateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options) {
|
|
1429
|
+
return (0, exports.DNSZoneApiFp)(this.configuration).updateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1430
|
+
}
|
|
1431
|
+
/**
|
|
1432
|
+
* 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.
|
|
1433
|
+
* @summary Validate 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
|
+
validateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options) {
|
|
1441
|
+
return (0, exports.DNSZoneApiFp)(this.configuration).validateZoneRecordsV1(domain, dNSV1ZoneUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1442
|
+
}
|
|
1191
1443
|
}
|
|
1192
1444
|
exports.DNSZoneApi = DNSZoneApi;
|
|
1193
1445
|
/**
|
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.16
|
|
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.16
|
|
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.16
|
|
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.16
|
|
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.16
|
|
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.16
|
|
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.3" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
20
20
|
this.formDataCtor = param.formDataCtor;
|
|
21
21
|
}
|
|
22
22
|
/**
|