hostinger-api-sdk 0.0.10 → 0.0.12
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 +386 -148
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +319 -143
- package/dist/api.js +139 -41
- 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 +319 -143
- package/dist/esm/api.js +136 -38
- 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/docs/BillingCatalogApi.md +0 -54
- package/docs/BillingOrdersApi.md +0 -63
- package/docs/BillingPaymentMethodsApi.md +0 -162
- package/docs/BillingSubscriptionsApi.md +0 -113
- package/docs/BillingV1CatalogCatalogItemPriceResource.md +0 -32
- package/docs/BillingV1CatalogCatalogItemResource.md +0 -26
- package/docs/BillingV1OrderOrderBillingAddressResource.md +0 -40
- package/docs/BillingV1OrderOrderResource.md +0 -36
- package/docs/BillingV1OrderStoreRequest.md +0 -24
- package/docs/BillingV1OrderStoreRequestItemsInner.md +0 -22
- package/docs/BillingV1PaymentMethodPaymentMethodResource.md +0 -36
- package/docs/BillingV1SubscriptionCancelRequest.md +0 -22
- package/docs/BillingV1SubscriptionSubscriptionResource.md +0 -42
- package/docs/CommonSchemaErrorResponseSchema.md +0 -22
- package/docs/CommonSchemaPaginationMetaSchema.md +0 -24
- package/docs/CommonSchemaUnauthorizedResponseSchema.md +0 -22
- package/docs/CommonSchemaUnprocessableContentResponseSchema.md +0 -24
- package/docs/CommonSchemaUnprocessableContentResponseSchemaErrors.md +0 -22
- package/docs/CommonSuccessEmptyResource.md +0 -20
- package/docs/DNSSnapshotApi.md +0 -175
- package/docs/DNSV1SnapshotSnapshotResource.md +0 -24
- package/docs/DNSV1SnapshotSnapshotWithContentResource.md +0 -26
- package/docs/DNSV1ZoneDestroyRequest.md +0 -20
- package/docs/DNSV1ZoneDestroyRequestFiltersInner.md +0 -22
- package/docs/DNSV1ZoneNameRecordResource.md +0 -22
- package/docs/DNSV1ZoneRecordResource.md +0 -26
- package/docs/DNSV1ZoneResetRequest.md +0 -24
- package/docs/DNSV1ZoneUpdateRequest.md +0 -22
- package/docs/DNSV1ZoneUpdateRequestZoneInner.md +0 -26
- package/docs/DNSV1ZoneUpdateRequestZoneInnerRecordsInner.md +0 -20
- package/docs/DNSZoneApi.md +0 -297
- package/docs/DomainsAvailabilityApi.md +0 -63
- package/docs/DomainsForwardingApi.md +0 -171
- package/docs/DomainsPortfolioApi.md +0 -439
- package/docs/DomainsV1AvailabilityAvailabilityRequest.md +0 -24
- package/docs/DomainsV1AvailabilityAvailabilityResource.md +0 -26
- package/docs/DomainsV1DomainDomainExtendedResource.md +0 -48
- package/docs/DomainsV1DomainDomainExtendedResourceDomainContacts.md +0 -27
- package/docs/DomainsV1DomainDomainExtendedResourceNameServers.md +0 -23
- package/docs/DomainsV1DomainDomainResource.md +0 -30
- package/docs/DomainsV1ForwardingForwardingResource.md +0 -28
- package/docs/DomainsV1ForwardingStoreRequest.md +0 -24
- package/docs/DomainsV1PortfolioPurchaseRequest.md +0 -30
- package/docs/DomainsV1PortfolioPurchaseRequestDomainContacts.md +0 -27
- package/docs/DomainsV1PortfolioUpdateNameserversRequest.md +0 -26
- package/docs/DomainsV1WHOISProfileResource.md +0 -34
- package/docs/DomainsV1WHOISStoreRequest.md +0 -28
- package/docs/DomainsWHOISApi.md +0 -279
- package/docs/VPSActionsApi.md +0 -121
- package/docs/VPSBackupsApi.md +0 -178
- package/docs/VPSDataCentersApi.md +0 -54
- package/docs/VPSFirewallApi.md +0 -577
- package/docs/VPSGetActionListV1200Response.md +0 -22
- package/docs/VPSGetBackupListV1200Response.md +0 -22
- package/docs/VPSGetFirewallListV1200Response.md +0 -22
- package/docs/VPSGetPostInstallScriptListV1200Response.md +0 -22
- package/docs/VPSGetPublicKeyListV1200Response.md +0 -22
- package/docs/VPSMalwareScannerApi.md +0 -172
- package/docs/VPSOSTemplatesApi.md +0 -108
- package/docs/VPSPTRRecordsApi.md +0 -115
- package/docs/VPSPostInstallScriptsApi.md +0 -284
- package/docs/VPSPublicKeysApi.md +0 -230
- package/docs/VPSRecoveryApi.md +0 -120
- package/docs/VPSSnapshotsApi.md +0 -223
- package/docs/VPSV1ActionActionResource.md +0 -28
- package/docs/VPSV1BackupBackupResource.md +0 -24
- package/docs/VPSV1DataCenterDataCenterResource.md +0 -28
- package/docs/VPSV1FirewallFirewallResource.md +0 -30
- package/docs/VPSV1FirewallFirewallRuleResource.md +0 -30
- package/docs/VPSV1FirewallRulesStoreRequest.md +0 -26
- package/docs/VPSV1FirewallStoreRequest.md +0 -20
- package/docs/VPSV1IPAddressIPAddressResource.md +0 -24
- package/docs/VPSV1MalwareMetricsResource.md +0 -30
- package/docs/VPSV1MetricsMetricsCollection.md +0 -30
- package/docs/VPSV1MetricsMetricsResource.md +0 -22
- package/docs/VPSV1PostInstallScriptPostInstallScriptResource.md +0 -28
- package/docs/VPSV1PostInstallScriptStoreRequest.md +0 -22
- package/docs/VPSV1PublicKeyAttachRequest.md +0 -20
- package/docs/VPSV1PublicKeyPublicKeyResource.md +0 -24
- package/docs/VPSV1PublicKeyStoreRequest.md +0 -22
- package/docs/VPSV1SnapshotSnapshotResource.md +0 -24
- package/docs/VPSV1TemplateTemplateResource.md +0 -26
- package/docs/VPSV1VirtualMachineHostnameUpdateRequest.md +0 -20
- package/docs/VPSV1VirtualMachineNameserversUpdateRequest.md +0 -22
- package/docs/VPSV1VirtualMachinePanelPasswordUpdateRequest.md +0 -20
- package/docs/VPSV1VirtualMachineRecoveryStartRequest.md +0 -20
- package/docs/VPSV1VirtualMachineRecreateRequest.md +0 -24
- package/docs/VPSV1VirtualMachineRootPasswordUpdateRequest.md +0 -20
- package/docs/VPSV1VirtualMachineSetupRequest.md +0 -38
- package/docs/VPSV1VirtualMachineSetupRequestPublicKey.md +0 -22
- package/docs/VPSV1VirtualMachineVirtualMachineResource.md +0 -52
- package/docs/VPSVirtualMachineApi.md +0 -796
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.73
|
|
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,9 +19,9 @@ 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.
|
|
24
|
-
exports.VPSVirtualMachineApi = exports.VPSVirtualMachineApiFactory = exports.VPSVirtualMachineApiFp = exports.VPSVirtualMachineApiAxiosParamCreator = exports.VPSSnapshotsApi = exports.VPSSnapshotsApiFactory = exports.VPSSnapshotsApiFp = exports.VPSSnapshotsApiAxiosParamCreator = exports.VPSRecoveryApi = exports.VPSRecoveryApiFactory = void 0;
|
|
22
|
+
exports.DomainsAvailabilityApiFactory = exports.DomainsAvailabilityApiFp = exports.DomainsAvailabilityApiAxiosParamCreator = 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.GetCatalogItemListV1CategoryEnum = exports.BillingCatalogApi = exports.BillingCatalogApiFactory = exports.BillingCatalogApiFp = exports.BillingCatalogApiAxiosParamCreator = exports.VPSV1VirtualMachineVirtualMachineResourceActionsLockEnum = exports.VPSV1VirtualMachineVirtualMachineResourceStateEnum = exports.VPSV1FirewallRulesStoreRequestSourceEnum = exports.VPSV1FirewallRulesStoreRequestProtocolEnum = exports.VPSV1FirewallFirewallRuleResourceProtocolEnum = exports.VPSV1FirewallFirewallRuleResourceActionEnum = exports.VPSV1ActionActionResourceStateEnum = exports.DomainsV1WHOISStoreRequestEntityTypeEnum = exports.DomainsV1WHOISProfileResourceEntityTypeEnum = exports.DomainsV1ForwardingStoreRequestRedirectTypeEnum = exports.DomainsV1ForwardingForwardingResourceRedirectTypeEnum = exports.DomainsV1DomainDomainResourceStatusEnum = exports.DomainsV1DomainDomainResourceTypeEnum = exports.DomainsV1DomainDomainExtendedResourceStatusEnum = exports.DNSV1ZoneUpdateRequestZoneInnerTypeEnum = exports.DNSV1ZoneRecordResourceTypeEnum = exports.DNSV1ZoneDestroyRequestFiltersInnerTypeEnum = exports.BillingV1SubscriptionSubscriptionResourceStatusEnum = exports.BillingV1SubscriptionCancelRequestCancelOptionEnum = exports.BillingV1SubscriptionCancelRequestReasonCodeEnum = exports.BillingV1OrderOrderResourceStatusEnum = exports.BillingV1CatalogCatalogItemPriceResourcePeriodUnitEnum = void 0;
|
|
23
|
+
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 = exports.VPSBackupsApiAxiosParamCreator = exports.VPSActionsApi = exports.VPSActionsApiFactory = exports.VPSActionsApiFp = exports.VPSActionsApiAxiosParamCreator = exports.DomainsWHOISApi = exports.DomainsWHOISApiFactory = exports.DomainsWHOISApiFp = exports.DomainsWHOISApiAxiosParamCreator = exports.DomainsPortfolioApi = exports.DomainsPortfolioApiFactory = exports.DomainsPortfolioApiFp = exports.DomainsPortfolioApiAxiosParamCreator = exports.DomainsForwardingApi = exports.DomainsForwardingApiFactory = exports.DomainsForwardingApiFp = exports.DomainsForwardingApiAxiosParamCreator = exports.DomainsAvailabilityApi = void 0;
|
|
24
|
+
exports.VPSVirtualMachineApi = exports.VPSVirtualMachineApiFactory = exports.VPSVirtualMachineApiFp = exports.VPSVirtualMachineApiAxiosParamCreator = exports.VPSSnapshotsApi = exports.VPSSnapshotsApiFactory = exports.VPSSnapshotsApiFp = exports.VPSSnapshotsApiAxiosParamCreator = exports.VPSRecoveryApi = exports.VPSRecoveryApiFactory = exports.VPSRecoveryApiFp = void 0;
|
|
25
25
|
const axios_1 = require("axios");
|
|
26
26
|
// Some imports not used depending on template conditions
|
|
27
27
|
// @ts-ignore
|
|
@@ -207,10 +207,12 @@ const BillingCatalogApiAxiosParamCreator = function (configuration) {
|
|
|
207
207
|
/**
|
|
208
208
|
* This endpoint retrieves a list of catalog items available for order. Prices in catalog items is displayed as cents (without floating point), e.g: float `17.99` is displayed as integer `1799`.
|
|
209
209
|
* @summary Get catalog item list
|
|
210
|
+
* @param {GetCatalogItemListV1CategoryEnum} [category] Filter catalog items by category
|
|
211
|
+
* @param {string} [name] Filter catalog items by name. Use `*` for wildcard search, e.g. `.COM*` to find .com domain
|
|
210
212
|
* @param {*} [options] Override http request option.
|
|
211
213
|
* @throws {RequiredError}
|
|
212
214
|
*/
|
|
213
|
-
getCatalogItemListV1: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
215
|
+
getCatalogItemListV1: (category_1, name_1, ...args_1) => __awaiter(this, [category_1, name_1, ...args_1], void 0, function* (category, name, options = {}) {
|
|
214
216
|
const localVarPath = `/api/billing/v1/catalog`;
|
|
215
217
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
216
218
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -224,6 +226,12 @@ const BillingCatalogApiAxiosParamCreator = function (configuration) {
|
|
|
224
226
|
// authentication apiToken required
|
|
225
227
|
// http bearer authentication required
|
|
226
228
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
229
|
+
if (category !== undefined) {
|
|
230
|
+
localVarQueryParameter['category'] = category;
|
|
231
|
+
}
|
|
232
|
+
if (name !== undefined) {
|
|
233
|
+
localVarQueryParameter['name'] = name;
|
|
234
|
+
}
|
|
227
235
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
228
236
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
229
237
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -245,13 +253,15 @@ const BillingCatalogApiFp = function (configuration) {
|
|
|
245
253
|
/**
|
|
246
254
|
* This endpoint retrieves a list of catalog items available for order. Prices in catalog items is displayed as cents (without floating point), e.g: float `17.99` is displayed as integer `1799`.
|
|
247
255
|
* @summary Get catalog item list
|
|
256
|
+
* @param {GetCatalogItemListV1CategoryEnum} [category] Filter catalog items by category
|
|
257
|
+
* @param {string} [name] Filter catalog items by name. Use `*` for wildcard search, e.g. `.COM*` to find .com domain
|
|
248
258
|
* @param {*} [options] Override http request option.
|
|
249
259
|
* @throws {RequiredError}
|
|
250
260
|
*/
|
|
251
|
-
getCatalogItemListV1(options) {
|
|
261
|
+
getCatalogItemListV1(category, name, options) {
|
|
252
262
|
return __awaiter(this, void 0, void 0, function* () {
|
|
253
263
|
var _a, _b;
|
|
254
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCatalogItemListV1(options);
|
|
264
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCatalogItemListV1(category, name, options);
|
|
255
265
|
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['BillingCatalogApi.getCatalogItemListV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
256
266
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
257
267
|
});
|
|
@@ -269,11 +279,13 @@ const BillingCatalogApiFactory = function (configuration, basePath, axios) {
|
|
|
269
279
|
/**
|
|
270
280
|
* This endpoint retrieves a list of catalog items available for order. Prices in catalog items is displayed as cents (without floating point), e.g: float `17.99` is displayed as integer `1799`.
|
|
271
281
|
* @summary Get catalog item list
|
|
282
|
+
* @param {GetCatalogItemListV1CategoryEnum} [category] Filter catalog items by category
|
|
283
|
+
* @param {string} [name] Filter catalog items by name. Use `*` for wildcard search, e.g. `.COM*` to find .com domain
|
|
272
284
|
* @param {*} [options] Override http request option.
|
|
273
285
|
* @throws {RequiredError}
|
|
274
286
|
*/
|
|
275
|
-
getCatalogItemListV1(options) {
|
|
276
|
-
return localVarFp.getCatalogItemListV1(options).then((request) => request(axios, basePath));
|
|
287
|
+
getCatalogItemListV1(category, name, options) {
|
|
288
|
+
return localVarFp.getCatalogItemListV1(category, name, options).then((request) => request(axios, basePath));
|
|
277
289
|
},
|
|
278
290
|
};
|
|
279
291
|
};
|
|
@@ -288,15 +300,24 @@ class BillingCatalogApi extends base_1.BaseAPI {
|
|
|
288
300
|
/**
|
|
289
301
|
* This endpoint retrieves a list of catalog items available for order. Prices in catalog items is displayed as cents (without floating point), e.g: float `17.99` is displayed as integer `1799`.
|
|
290
302
|
* @summary Get catalog item list
|
|
303
|
+
* @param {GetCatalogItemListV1CategoryEnum} [category] Filter catalog items by category
|
|
304
|
+
* @param {string} [name] Filter catalog items by name. Use `*` for wildcard search, e.g. `.COM*` to find .com domain
|
|
291
305
|
* @param {*} [options] Override http request option.
|
|
292
306
|
* @throws {RequiredError}
|
|
293
307
|
* @memberof BillingCatalogApi
|
|
294
308
|
*/
|
|
295
|
-
getCatalogItemListV1(options) {
|
|
296
|
-
return (0, exports.BillingCatalogApiFp)(this.configuration).getCatalogItemListV1(options).then((request) => request(this.axios, this.basePath));
|
|
309
|
+
getCatalogItemListV1(category, name, options) {
|
|
310
|
+
return (0, exports.BillingCatalogApiFp)(this.configuration).getCatalogItemListV1(category, name, options).then((request) => request(this.axios, this.basePath));
|
|
297
311
|
}
|
|
298
312
|
}
|
|
299
313
|
exports.BillingCatalogApi = BillingCatalogApi;
|
|
314
|
+
/**
|
|
315
|
+
* @export
|
|
316
|
+
*/
|
|
317
|
+
exports.GetCatalogItemListV1CategoryEnum = {
|
|
318
|
+
Domain: 'DOMAIN',
|
|
319
|
+
Vps: 'VPS'
|
|
320
|
+
};
|
|
300
321
|
/**
|
|
301
322
|
* BillingOrdersApi - axios parameter creator
|
|
302
323
|
* @export
|
|
@@ -304,10 +325,11 @@ exports.BillingCatalogApi = BillingCatalogApi;
|
|
|
304
325
|
const BillingOrdersApiAxiosParamCreator = function (configuration) {
|
|
305
326
|
return {
|
|
306
327
|
/**
|
|
307
|
-
* This endpoint creates a new service order. To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity. Coupons also can be provided during order creation. Orders created using this endpoint will be set for automatic renewal. Some `credit_card` payments might need additional verification, rendering purchase unprocessed. We recommend use other payment methods than `credit_card` if you encounter this issue.
|
|
328
|
+
* This endpoint creates a new service order. **DEPRECATED** To purchase a domain, use [`POST /api/domains/v1/portfolio`](/#tag/domains-portfolio/POST/api/domains/v1/portfolio) instead. To purchase a VPS, use [`POST /api/vps/v1/virtual-machines`](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines) instead. To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity. Coupons also can be provided during order creation. Orders created using this endpoint will be set for automatic renewal. Some `credit_card` payments might need additional verification, rendering purchase unprocessed. We recommend use other payment methods than `credit_card` if you encounter this issue.
|
|
308
329
|
* @summary Create new service order
|
|
309
330
|
* @param {BillingV1OrderStoreRequest} billingV1OrderStoreRequest
|
|
310
331
|
* @param {*} [options] Override http request option.
|
|
332
|
+
* @deprecated
|
|
311
333
|
* @throws {RequiredError}
|
|
312
334
|
*/
|
|
313
335
|
createNewServiceOrderV1: (billingV1OrderStoreRequest_1, ...args_1) => __awaiter(this, [billingV1OrderStoreRequest_1, ...args_1], void 0, function* (billingV1OrderStoreRequest, options = {}) {
|
|
@@ -347,10 +369,11 @@ const BillingOrdersApiFp = function (configuration) {
|
|
|
347
369
|
const localVarAxiosParamCreator = (0, exports.BillingOrdersApiAxiosParamCreator)(configuration);
|
|
348
370
|
return {
|
|
349
371
|
/**
|
|
350
|
-
* This endpoint creates a new service order. To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity. Coupons also can be provided during order creation. Orders created using this endpoint will be set for automatic renewal. Some `credit_card` payments might need additional verification, rendering purchase unprocessed. We recommend use other payment methods than `credit_card` if you encounter this issue.
|
|
372
|
+
* This endpoint creates a new service order. **DEPRECATED** To purchase a domain, use [`POST /api/domains/v1/portfolio`](/#tag/domains-portfolio/POST/api/domains/v1/portfolio) instead. To purchase a VPS, use [`POST /api/vps/v1/virtual-machines`](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines) instead. To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity. Coupons also can be provided during order creation. Orders created using this endpoint will be set for automatic renewal. Some `credit_card` payments might need additional verification, rendering purchase unprocessed. We recommend use other payment methods than `credit_card` if you encounter this issue.
|
|
351
373
|
* @summary Create new service order
|
|
352
374
|
* @param {BillingV1OrderStoreRequest} billingV1OrderStoreRequest
|
|
353
375
|
* @param {*} [options] Override http request option.
|
|
376
|
+
* @deprecated
|
|
354
377
|
* @throws {RequiredError}
|
|
355
378
|
*/
|
|
356
379
|
createNewServiceOrderV1(billingV1OrderStoreRequest, options) {
|
|
@@ -372,10 +395,11 @@ const BillingOrdersApiFactory = function (configuration, basePath, axios) {
|
|
|
372
395
|
const localVarFp = (0, exports.BillingOrdersApiFp)(configuration);
|
|
373
396
|
return {
|
|
374
397
|
/**
|
|
375
|
-
* This endpoint creates a new service order. To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity. Coupons also can be provided during order creation. Orders created using this endpoint will be set for automatic renewal. Some `credit_card` payments might need additional verification, rendering purchase unprocessed. We recommend use other payment methods than `credit_card` if you encounter this issue.
|
|
398
|
+
* This endpoint creates a new service order. **DEPRECATED** To purchase a domain, use [`POST /api/domains/v1/portfolio`](/#tag/domains-portfolio/POST/api/domains/v1/portfolio) instead. To purchase a VPS, use [`POST /api/vps/v1/virtual-machines`](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines) instead. To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity. Coupons also can be provided during order creation. Orders created using this endpoint will be set for automatic renewal. Some `credit_card` payments might need additional verification, rendering purchase unprocessed. We recommend use other payment methods than `credit_card` if you encounter this issue.
|
|
376
399
|
* @summary Create new service order
|
|
377
400
|
* @param {BillingV1OrderStoreRequest} billingV1OrderStoreRequest
|
|
378
401
|
* @param {*} [options] Override http request option.
|
|
402
|
+
* @deprecated
|
|
379
403
|
* @throws {RequiredError}
|
|
380
404
|
*/
|
|
381
405
|
createNewServiceOrderV1(billingV1OrderStoreRequest, options) {
|
|
@@ -392,10 +416,11 @@ exports.BillingOrdersApiFactory = BillingOrdersApiFactory;
|
|
|
392
416
|
*/
|
|
393
417
|
class BillingOrdersApi extends base_1.BaseAPI {
|
|
394
418
|
/**
|
|
395
|
-
* This endpoint creates a new service order. To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity. Coupons also can be provided during order creation. Orders created using this endpoint will be set for automatic renewal. Some `credit_card` payments might need additional verification, rendering purchase unprocessed. We recommend use other payment methods than `credit_card` if you encounter this issue.
|
|
419
|
+
* This endpoint creates a new service order. **DEPRECATED** To purchase a domain, use [`POST /api/domains/v1/portfolio`](/#tag/domains-portfolio/POST/api/domains/v1/portfolio) instead. To purchase a VPS, use [`POST /api/vps/v1/virtual-machines`](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines) instead. To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity. Coupons also can be provided during order creation. Orders created using this endpoint will be set for automatic renewal. Some `credit_card` payments might need additional verification, rendering purchase unprocessed. We recommend use other payment methods than `credit_card` if you encounter this issue.
|
|
396
420
|
* @summary Create new service order
|
|
397
421
|
* @param {BillingV1OrderStoreRequest} billingV1OrderStoreRequest
|
|
398
422
|
* @param {*} [options] Override http request option.
|
|
423
|
+
* @deprecated
|
|
399
424
|
* @throws {RequiredError}
|
|
400
425
|
* @memberof BillingOrdersApi
|
|
401
426
|
*/
|
|
@@ -1487,7 +1512,7 @@ exports.DNSZoneApi = DNSZoneApi;
|
|
|
1487
1512
|
const DomainsAvailabilityApiAxiosParamCreator = function (configuration) {
|
|
1488
1513
|
return {
|
|
1489
1514
|
/**
|
|
1490
|
-
* This endpoint checks the availability of a domain name. Multiple TLDs can be checked at once. Endpoint has rate limit of 10 requests per minute.
|
|
1515
|
+
* This endpoint checks the availability of a domain name. Multiple TLDs can be checked at once. If you want to get alternative domains with response, provide only one TLD in the request and set `with_alternatives` to `true`. TLDs should be provided without the leading dot (e.g. `com`, `net`, `org`). Endpoint has rate limit of 10 requests per minute.
|
|
1491
1516
|
* @summary Check domain availability
|
|
1492
1517
|
* @param {DomainsV1AvailabilityAvailabilityRequest} domainsV1AvailabilityAvailabilityRequest
|
|
1493
1518
|
* @param {*} [options] Override http request option.
|
|
@@ -1530,7 +1555,7 @@ const DomainsAvailabilityApiFp = function (configuration) {
|
|
|
1530
1555
|
const localVarAxiosParamCreator = (0, exports.DomainsAvailabilityApiAxiosParamCreator)(configuration);
|
|
1531
1556
|
return {
|
|
1532
1557
|
/**
|
|
1533
|
-
* This endpoint checks the availability of a domain name. Multiple TLDs can be checked at once. Endpoint has rate limit of 10 requests per minute.
|
|
1558
|
+
* This endpoint checks the availability of a domain name. Multiple TLDs can be checked at once. If you want to get alternative domains with response, provide only one TLD in the request and set `with_alternatives` to `true`. TLDs should be provided without the leading dot (e.g. `com`, `net`, `org`). Endpoint has rate limit of 10 requests per minute.
|
|
1534
1559
|
* @summary Check domain availability
|
|
1535
1560
|
* @param {DomainsV1AvailabilityAvailabilityRequest} domainsV1AvailabilityAvailabilityRequest
|
|
1536
1561
|
* @param {*} [options] Override http request option.
|
|
@@ -1555,7 +1580,7 @@ const DomainsAvailabilityApiFactory = function (configuration, basePath, axios)
|
|
|
1555
1580
|
const localVarFp = (0, exports.DomainsAvailabilityApiFp)(configuration);
|
|
1556
1581
|
return {
|
|
1557
1582
|
/**
|
|
1558
|
-
* This endpoint checks the availability of a domain name. Multiple TLDs can be checked at once. Endpoint has rate limit of 10 requests per minute.
|
|
1583
|
+
* This endpoint checks the availability of a domain name. Multiple TLDs can be checked at once. If you want to get alternative domains with response, provide only one TLD in the request and set `with_alternatives` to `true`. TLDs should be provided without the leading dot (e.g. `com`, `net`, `org`). Endpoint has rate limit of 10 requests per minute.
|
|
1559
1584
|
* @summary Check domain availability
|
|
1560
1585
|
* @param {DomainsV1AvailabilityAvailabilityRequest} domainsV1AvailabilityAvailabilityRequest
|
|
1561
1586
|
* @param {*} [options] Override http request option.
|
|
@@ -1575,7 +1600,7 @@ exports.DomainsAvailabilityApiFactory = DomainsAvailabilityApiFactory;
|
|
|
1575
1600
|
*/
|
|
1576
1601
|
class DomainsAvailabilityApi extends base_1.BaseAPI {
|
|
1577
1602
|
/**
|
|
1578
|
-
* This endpoint checks the availability of a domain name. Multiple TLDs can be checked at once. Endpoint has rate limit of 10 requests per minute.
|
|
1603
|
+
* This endpoint checks the availability of a domain name. Multiple TLDs can be checked at once. If you want to get alternative domains with response, provide only one TLD in the request and set `with_alternatives` to `true`. TLDs should be provided without the leading dot (e.g. `com`, `net`, `org`). Endpoint has rate limit of 10 requests per minute.
|
|
1579
1604
|
* @summary Check domain availability
|
|
1580
1605
|
* @param {DomainsV1AvailabilityAvailabilityRequest} domainsV1AvailabilityAvailabilityRequest
|
|
1581
1606
|
* @param {*} [options] Override http request option.
|
|
@@ -2025,7 +2050,7 @@ const DomainsPortfolioApiAxiosParamCreator = function (configuration) {
|
|
|
2025
2050
|
};
|
|
2026
2051
|
}),
|
|
2027
2052
|
/**
|
|
2028
|
-
* This endpoint
|
|
2053
|
+
* This endpoint allows you to buy (purchase) and register a new domain name. If registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check the domain registration status. If no payment method is provided, your default payment method will be used automatically. If no WHOIS information is provided, the default contact information for that TLD (Top-Level Domain) will be used. Before making a request, ensure that WHOIS information for the desired TLD exists in your account. Some TLDs require `additional_details` to be provided and these will be validated before completing the purchase. The required additional details vary by TLD.
|
|
2029
2054
|
* @summary Purchase new domain
|
|
2030
2055
|
* @param {DomainsV1PortfolioPurchaseRequest} domainsV1PortfolioPurchaseRequest
|
|
2031
2056
|
* @param {*} [options] Override http request option.
|
|
@@ -2194,7 +2219,7 @@ const DomainsPortfolioApiFp = function (configuration) {
|
|
|
2194
2219
|
});
|
|
2195
2220
|
},
|
|
2196
2221
|
/**
|
|
2197
|
-
* This endpoint
|
|
2222
|
+
* This endpoint allows you to buy (purchase) and register a new domain name. If registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check the domain registration status. If no payment method is provided, your default payment method will be used automatically. If no WHOIS information is provided, the default contact information for that TLD (Top-Level Domain) will be used. Before making a request, ensure that WHOIS information for the desired TLD exists in your account. Some TLDs require `additional_details` to be provided and these will be validated before completing the purchase. The required additional details vary by TLD.
|
|
2198
2223
|
* @summary Purchase new domain
|
|
2199
2224
|
* @param {DomainsV1PortfolioPurchaseRequest} domainsV1PortfolioPurchaseRequest
|
|
2200
2225
|
* @param {*} [options] Override http request option.
|
|
@@ -2294,7 +2319,7 @@ const DomainsPortfolioApiFactory = function (configuration, basePath, axios) {
|
|
|
2294
2319
|
return localVarFp.getDomainV1(domain, options).then((request) => request(axios, basePath));
|
|
2295
2320
|
},
|
|
2296
2321
|
/**
|
|
2297
|
-
* This endpoint
|
|
2322
|
+
* This endpoint allows you to buy (purchase) and register a new domain name. If registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check the domain registration status. If no payment method is provided, your default payment method will be used automatically. If no WHOIS information is provided, the default contact information for that TLD (Top-Level Domain) will be used. Before making a request, ensure that WHOIS information for the desired TLD exists in your account. Some TLDs require `additional_details` to be provided and these will be validated before completing the purchase. The required additional details vary by TLD.
|
|
2298
2323
|
* @summary Purchase new domain
|
|
2299
2324
|
* @param {DomainsV1PortfolioPurchaseRequest} domainsV1PortfolioPurchaseRequest
|
|
2300
2325
|
* @param {*} [options] Override http request option.
|
|
@@ -2390,7 +2415,7 @@ class DomainsPortfolioApi extends base_1.BaseAPI {
|
|
|
2390
2415
|
return (0, exports.DomainsPortfolioApiFp)(this.configuration).getDomainV1(domain, options).then((request) => request(this.axios, this.basePath));
|
|
2391
2416
|
}
|
|
2392
2417
|
/**
|
|
2393
|
-
* This endpoint
|
|
2418
|
+
* This endpoint allows you to buy (purchase) and register a new domain name. If registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check the domain registration status. If no payment method is provided, your default payment method will be used automatically. If no WHOIS information is provided, the default contact information for that TLD (Top-Level Domain) will be used. Before making a request, ensure that WHOIS information for the desired TLD exists in your account. Some TLDs require `additional_details` to be provided and these will be validated before completing the purchase. The required additional details vary by TLD.
|
|
2394
2419
|
* @summary Purchase new domain
|
|
2395
2420
|
* @param {DomainsV1PortfolioPurchaseRequest} domainsV1PortfolioPurchaseRequest
|
|
2396
2421
|
* @param {*} [options] Override http request option.
|
|
@@ -2488,7 +2513,7 @@ const DomainsWHOISApiAxiosParamCreator = function (configuration) {
|
|
|
2488
2513
|
/**
|
|
2489
2514
|
* This endpoint retrieves a list of WHOIS contact profiles.
|
|
2490
2515
|
* @summary Get WHOIS profile list
|
|
2491
|
-
* @param {string} [tld] Filter by TLD (without
|
|
2516
|
+
* @param {string} [tld] Filter by TLD (without leading dot)
|
|
2492
2517
|
* @param {*} [options] Override http request option.
|
|
2493
2518
|
* @throws {RequiredError}
|
|
2494
2519
|
*/
|
|
@@ -2624,7 +2649,7 @@ const DomainsWHOISApiFp = function (configuration) {
|
|
|
2624
2649
|
/**
|
|
2625
2650
|
* This endpoint retrieves a list of WHOIS contact profiles.
|
|
2626
2651
|
* @summary Get WHOIS profile list
|
|
2627
|
-
* @param {string} [tld] Filter by TLD (without
|
|
2652
|
+
* @param {string} [tld] Filter by TLD (without leading dot)
|
|
2628
2653
|
* @param {*} [options] Override http request option.
|
|
2629
2654
|
* @throws {RequiredError}
|
|
2630
2655
|
*/
|
|
@@ -2699,7 +2724,7 @@ const DomainsWHOISApiFactory = function (configuration, basePath, axios) {
|
|
|
2699
2724
|
/**
|
|
2700
2725
|
* This endpoint retrieves a list of WHOIS contact profiles.
|
|
2701
2726
|
* @summary Get WHOIS profile list
|
|
2702
|
-
* @param {string} [tld] Filter by TLD (without
|
|
2727
|
+
* @param {string} [tld] Filter by TLD (without leading dot)
|
|
2703
2728
|
* @param {*} [options] Override http request option.
|
|
2704
2729
|
* @throws {RequiredError}
|
|
2705
2730
|
*/
|
|
@@ -2761,7 +2786,7 @@ class DomainsWHOISApi extends base_1.BaseAPI {
|
|
|
2761
2786
|
/**
|
|
2762
2787
|
* This endpoint retrieves a list of WHOIS contact profiles.
|
|
2763
2788
|
* @summary Get WHOIS profile list
|
|
2764
|
-
* @param {string} [tld] Filter by TLD (without
|
|
2789
|
+
* @param {string} [tld] Filter by TLD (without leading dot)
|
|
2765
2790
|
* @param {*} [options] Override http request option.
|
|
2766
2791
|
* @throws {RequiredError}
|
|
2767
2792
|
* @memberof DomainsWHOISApi
|
|
@@ -5940,8 +5965,8 @@ const VPSVirtualMachineApiAxiosParamCreator = function (configuration) {
|
|
|
5940
5965
|
* This endpoint retrieves the historical metrics for a specified virtual machine. It includes the following metrics: - CPU usage - Memory usage - Disk usage - Network usage - Uptime
|
|
5941
5966
|
* @summary Get metrics
|
|
5942
5967
|
* @param {number} virtualMachineId Virtual Machine ID
|
|
5943
|
-
* @param {string} dateFrom
|
|
5944
|
-
* @param {string} dateTo
|
|
5968
|
+
* @param {string} dateFrom
|
|
5969
|
+
* @param {string} dateTo
|
|
5945
5970
|
* @param {*} [options] Override http request option.
|
|
5946
5971
|
* @throws {RequiredError}
|
|
5947
5972
|
*/
|
|
@@ -5967,10 +5992,14 @@ const VPSVirtualMachineApiAxiosParamCreator = function (configuration) {
|
|
|
5967
5992
|
// http bearer authentication required
|
|
5968
5993
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
5969
5994
|
if (dateFrom !== undefined) {
|
|
5970
|
-
localVarQueryParameter['date_from'] = dateFrom
|
|
5995
|
+
localVarQueryParameter['date_from'] = (dateFrom instanceof Date) ?
|
|
5996
|
+
dateFrom.toISOString() :
|
|
5997
|
+
dateFrom;
|
|
5971
5998
|
}
|
|
5972
5999
|
if (dateTo !== undefined) {
|
|
5973
|
-
localVarQueryParameter['date_to'] = dateTo
|
|
6000
|
+
localVarQueryParameter['date_to'] = (dateTo instanceof Date) ?
|
|
6001
|
+
dateTo.toISOString() :
|
|
6002
|
+
dateTo;
|
|
5974
6003
|
}
|
|
5975
6004
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
5976
6005
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -6040,6 +6069,39 @@ const VPSVirtualMachineApiAxiosParamCreator = function (configuration) {
|
|
|
6040
6069
|
options: localVarRequestOptions,
|
|
6041
6070
|
};
|
|
6042
6071
|
}),
|
|
6072
|
+
/**
|
|
6073
|
+
* This endpoint allows you to buy (purchase) and setup a new virtual machine. If virtual machine setup fails for any reason, login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually. If no payment method is provided, your default payment method will be used automatically.
|
|
6074
|
+
* @summary Purchase new virtual machine
|
|
6075
|
+
* @param {VPSV1VirtualMachinePurchaseRequest} vPSV1VirtualMachinePurchaseRequest
|
|
6076
|
+
* @param {*} [options] Override http request option.
|
|
6077
|
+
* @throws {RequiredError}
|
|
6078
|
+
*/
|
|
6079
|
+
purchaseNewVirtualMachineV1: (vPSV1VirtualMachinePurchaseRequest_1, ...args_1) => __awaiter(this, [vPSV1VirtualMachinePurchaseRequest_1, ...args_1], void 0, function* (vPSV1VirtualMachinePurchaseRequest, options = {}) {
|
|
6080
|
+
// verify required parameter 'vPSV1VirtualMachinePurchaseRequest' is not null or undefined
|
|
6081
|
+
(0, common_1.assertParamExists)('purchaseNewVirtualMachineV1', 'vPSV1VirtualMachinePurchaseRequest', vPSV1VirtualMachinePurchaseRequest);
|
|
6082
|
+
const localVarPath = `/api/vps/v1/virtual-machines`;
|
|
6083
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6084
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
6085
|
+
let baseOptions;
|
|
6086
|
+
if (configuration) {
|
|
6087
|
+
baseOptions = configuration.baseOptions;
|
|
6088
|
+
}
|
|
6089
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
6090
|
+
const localVarHeaderParameter = {};
|
|
6091
|
+
const localVarQueryParameter = {};
|
|
6092
|
+
// authentication apiToken required
|
|
6093
|
+
// http bearer authentication required
|
|
6094
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
6095
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
6096
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
6097
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
6098
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
6099
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(vPSV1VirtualMachinePurchaseRequest, localVarRequestOptions, configuration);
|
|
6100
|
+
return {
|
|
6101
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
6102
|
+
options: localVarRequestOptions,
|
|
6103
|
+
};
|
|
6104
|
+
}),
|
|
6043
6105
|
/**
|
|
6044
6106
|
* This endpoint will recreate a virtual machine from scratch. The recreation process involves reinstalling the operating system and resetting the virtual machine to its initial state. Snapshots, if there are any, will be deleted. ## Password Requirements Password will be checked against leaked password databases. Requirements for the password are: - At least 8 characters long - At least one uppercase letter - At least one lowercase letter - At least one number - Is not leaked publicly **This operation is irreversible and will result in the loss of all data stored on the virtual machine!**
|
|
6045
6107
|
* @summary Recreate virtual machine
|
|
@@ -6290,7 +6352,7 @@ const VPSVirtualMachineApiAxiosParamCreator = function (configuration) {
|
|
|
6290
6352
|
};
|
|
6291
6353
|
}),
|
|
6292
6354
|
/**
|
|
6293
|
-
* This endpoint will setup newly purchased virtual machine
|
|
6355
|
+
* This endpoint will setup newly purchased virtual machine with `initial` state.
|
|
6294
6356
|
* @summary Setup new virtual machine
|
|
6295
6357
|
* @param {number} virtualMachineId Virtual Machine ID
|
|
6296
6358
|
* @param {VPSV1VirtualMachineSetupRequest} vPSV1VirtualMachineSetupRequest
|
|
@@ -6420,8 +6482,8 @@ const VPSVirtualMachineApiFp = function (configuration) {
|
|
|
6420
6482
|
* This endpoint retrieves the historical metrics for a specified virtual machine. It includes the following metrics: - CPU usage - Memory usage - Disk usage - Network usage - Uptime
|
|
6421
6483
|
* @summary Get metrics
|
|
6422
6484
|
* @param {number} virtualMachineId Virtual Machine ID
|
|
6423
|
-
* @param {string} dateFrom
|
|
6424
|
-
* @param {string} dateTo
|
|
6485
|
+
* @param {string} dateFrom
|
|
6486
|
+
* @param {string} dateTo
|
|
6425
6487
|
* @param {*} [options] Override http request option.
|
|
6426
6488
|
* @throws {RequiredError}
|
|
6427
6489
|
*/
|
|
@@ -6462,6 +6524,21 @@ const VPSVirtualMachineApiFp = function (configuration) {
|
|
|
6462
6524
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
6463
6525
|
});
|
|
6464
6526
|
},
|
|
6527
|
+
/**
|
|
6528
|
+
* This endpoint allows you to buy (purchase) and setup a new virtual machine. If virtual machine setup fails for any reason, login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually. If no payment method is provided, your default payment method will be used automatically.
|
|
6529
|
+
* @summary Purchase new virtual machine
|
|
6530
|
+
* @param {VPSV1VirtualMachinePurchaseRequest} vPSV1VirtualMachinePurchaseRequest
|
|
6531
|
+
* @param {*} [options] Override http request option.
|
|
6532
|
+
* @throws {RequiredError}
|
|
6533
|
+
*/
|
|
6534
|
+
purchaseNewVirtualMachineV1(vPSV1VirtualMachinePurchaseRequest, options) {
|
|
6535
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6536
|
+
var _a, _b;
|
|
6537
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.purchaseNewVirtualMachineV1(vPSV1VirtualMachinePurchaseRequest, options);
|
|
6538
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['VPSVirtualMachineApi.purchaseNewVirtualMachineV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
6539
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
6540
|
+
});
|
|
6541
|
+
},
|
|
6465
6542
|
/**
|
|
6466
6543
|
* This endpoint will recreate a virtual machine from scratch. The recreation process involves reinstalling the operating system and resetting the virtual machine to its initial state. Snapshots, if there are any, will be deleted. ## Password Requirements Password will be checked against leaked password databases. Requirements for the password are: - At least 8 characters long - At least one uppercase letter - At least one lowercase letter - At least one number - Is not leaked publicly **This operation is irreversible and will result in the loss of all data stored on the virtual machine!**
|
|
6467
6544
|
* @summary Recreate virtual machine
|
|
@@ -6573,7 +6650,7 @@ const VPSVirtualMachineApiFp = function (configuration) {
|
|
|
6573
6650
|
});
|
|
6574
6651
|
},
|
|
6575
6652
|
/**
|
|
6576
|
-
* This endpoint will setup newly purchased virtual machine
|
|
6653
|
+
* This endpoint will setup newly purchased virtual machine with `initial` state.
|
|
6577
6654
|
* @summary Setup new virtual machine
|
|
6578
6655
|
* @param {number} virtualMachineId Virtual Machine ID
|
|
6579
6656
|
* @param {VPSV1VirtualMachineSetupRequest} vPSV1VirtualMachineSetupRequest
|
|
@@ -6643,8 +6720,8 @@ const VPSVirtualMachineApiFactory = function (configuration, basePath, axios) {
|
|
|
6643
6720
|
* This endpoint retrieves the historical metrics for a specified virtual machine. It includes the following metrics: - CPU usage - Memory usage - Disk usage - Network usage - Uptime
|
|
6644
6721
|
* @summary Get metrics
|
|
6645
6722
|
* @param {number} virtualMachineId Virtual Machine ID
|
|
6646
|
-
* @param {string} dateFrom
|
|
6647
|
-
* @param {string} dateTo
|
|
6723
|
+
* @param {string} dateFrom
|
|
6724
|
+
* @param {string} dateTo
|
|
6648
6725
|
* @param {*} [options] Override http request option.
|
|
6649
6726
|
* @throws {RequiredError}
|
|
6650
6727
|
*/
|
|
@@ -6670,6 +6747,16 @@ const VPSVirtualMachineApiFactory = function (configuration, basePath, axios) {
|
|
|
6670
6747
|
getVirtualMachineV1(virtualMachineId, options) {
|
|
6671
6748
|
return localVarFp.getVirtualMachineV1(virtualMachineId, options).then((request) => request(axios, basePath));
|
|
6672
6749
|
},
|
|
6750
|
+
/**
|
|
6751
|
+
* This endpoint allows you to buy (purchase) and setup a new virtual machine. If virtual machine setup fails for any reason, login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually. If no payment method is provided, your default payment method will be used automatically.
|
|
6752
|
+
* @summary Purchase new virtual machine
|
|
6753
|
+
* @param {VPSV1VirtualMachinePurchaseRequest} vPSV1VirtualMachinePurchaseRequest
|
|
6754
|
+
* @param {*} [options] Override http request option.
|
|
6755
|
+
* @throws {RequiredError}
|
|
6756
|
+
*/
|
|
6757
|
+
purchaseNewVirtualMachineV1(vPSV1VirtualMachinePurchaseRequest, options) {
|
|
6758
|
+
return localVarFp.purchaseNewVirtualMachineV1(vPSV1VirtualMachinePurchaseRequest, options).then((request) => request(axios, basePath));
|
|
6759
|
+
},
|
|
6673
6760
|
/**
|
|
6674
6761
|
* This endpoint will recreate a virtual machine from scratch. The recreation process involves reinstalling the operating system and resetting the virtual machine to its initial state. Snapshots, if there are any, will be deleted. ## Password Requirements Password will be checked against leaked password databases. Requirements for the password are: - At least 8 characters long - At least one uppercase letter - At least one lowercase letter - At least one number - Is not leaked publicly **This operation is irreversible and will result in the loss of all data stored on the virtual machine!**
|
|
6675
6762
|
* @summary Recreate virtual machine
|
|
@@ -6746,7 +6833,7 @@ const VPSVirtualMachineApiFactory = function (configuration, basePath, axios) {
|
|
|
6746
6833
|
return localVarFp.setRootPasswordV1(virtualMachineId, vPSV1VirtualMachineRootPasswordUpdateRequest, options).then((request) => request(axios, basePath));
|
|
6747
6834
|
},
|
|
6748
6835
|
/**
|
|
6749
|
-
* This endpoint will setup newly purchased virtual machine
|
|
6836
|
+
* This endpoint will setup newly purchased virtual machine with `initial` state.
|
|
6750
6837
|
* @summary Setup new virtual machine
|
|
6751
6838
|
* @param {number} virtualMachineId Virtual Machine ID
|
|
6752
6839
|
* @param {VPSV1VirtualMachineSetupRequest} vPSV1VirtualMachineSetupRequest
|
|
@@ -6802,8 +6889,8 @@ class VPSVirtualMachineApi extends base_1.BaseAPI {
|
|
|
6802
6889
|
* This endpoint retrieves the historical metrics for a specified virtual machine. It includes the following metrics: - CPU usage - Memory usage - Disk usage - Network usage - Uptime
|
|
6803
6890
|
* @summary Get metrics
|
|
6804
6891
|
* @param {number} virtualMachineId Virtual Machine ID
|
|
6805
|
-
* @param {string} dateFrom
|
|
6806
|
-
* @param {string} dateTo
|
|
6892
|
+
* @param {string} dateFrom
|
|
6893
|
+
* @param {string} dateTo
|
|
6807
6894
|
* @param {*} [options] Override http request option.
|
|
6808
6895
|
* @throws {RequiredError}
|
|
6809
6896
|
* @memberof VPSVirtualMachineApi
|
|
@@ -6832,6 +6919,17 @@ class VPSVirtualMachineApi extends base_1.BaseAPI {
|
|
|
6832
6919
|
getVirtualMachineV1(virtualMachineId, options) {
|
|
6833
6920
|
return (0, exports.VPSVirtualMachineApiFp)(this.configuration).getVirtualMachineV1(virtualMachineId, options).then((request) => request(this.axios, this.basePath));
|
|
6834
6921
|
}
|
|
6922
|
+
/**
|
|
6923
|
+
* This endpoint allows you to buy (purchase) and setup a new virtual machine. If virtual machine setup fails for any reason, login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually. If no payment method is provided, your default payment method will be used automatically.
|
|
6924
|
+
* @summary Purchase new virtual machine
|
|
6925
|
+
* @param {VPSV1VirtualMachinePurchaseRequest} vPSV1VirtualMachinePurchaseRequest
|
|
6926
|
+
* @param {*} [options] Override http request option.
|
|
6927
|
+
* @throws {RequiredError}
|
|
6928
|
+
* @memberof VPSVirtualMachineApi
|
|
6929
|
+
*/
|
|
6930
|
+
purchaseNewVirtualMachineV1(vPSV1VirtualMachinePurchaseRequest, options) {
|
|
6931
|
+
return (0, exports.VPSVirtualMachineApiFp)(this.configuration).purchaseNewVirtualMachineV1(vPSV1VirtualMachinePurchaseRequest, options).then((request) => request(this.axios, this.basePath));
|
|
6932
|
+
}
|
|
6835
6933
|
/**
|
|
6836
6934
|
* This endpoint will recreate a virtual machine from scratch. The recreation process involves reinstalling the operating system and resetting the virtual machine to its initial state. Snapshots, if there are any, will be deleted. ## Password Requirements Password will be checked against leaked password databases. Requirements for the password are: - At least 8 characters long - At least one uppercase letter - At least one lowercase letter - At least one number - Is not leaked publicly **This operation is irreversible and will result in the loss of all data stored on the virtual machine!**
|
|
6837
6935
|
* @summary Recreate virtual machine
|
|
@@ -6915,7 +7013,7 @@ class VPSVirtualMachineApi extends base_1.BaseAPI {
|
|
|
6915
7013
|
return (0, exports.VPSVirtualMachineApiFp)(this.configuration).setRootPasswordV1(virtualMachineId, vPSV1VirtualMachineRootPasswordUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
6916
7014
|
}
|
|
6917
7015
|
/**
|
|
6918
|
-
* This endpoint will setup newly purchased virtual machine
|
|
7016
|
+
* This endpoint will setup newly purchased virtual machine with `initial` state.
|
|
6919
7017
|
* @summary Setup new virtual machine
|
|
6920
7018
|
* @param {number} virtualMachineId Virtual Machine ID
|
|
6921
7019
|
* @param {VPSV1VirtualMachineSetupRequest} vPSV1VirtualMachineSetupRequest
|
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.73
|
|
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.73
|
|
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.73
|
|
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.73
|
|
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.73
|
|
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.73
|
|
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-typescript-sdk/0.0.
|
|
19
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/0.0.12" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
20
20
|
this.formDataCtor = param.formDataCtor;
|
|
21
21
|
}
|
|
22
22
|
/**
|