@hostinger/sdk 1.52.2 → 1.53.1

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/dist/esm/api.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.52.2
6
+ * API Version: 1.53.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -518,6 +518,21 @@ export const HostingV1NodeJsVulnerabilityResourceSeverityEnum = {
518
518
  Critical: 'critical',
519
519
  Unknown: 'unknown'
520
520
  };
521
+ export const HostingV1SslSslStatusResourceStatusEnum = {
522
+ NotInstalled: 'not_installed',
523
+ Installing: 'installing',
524
+ WaitingForRetry: 'waiting_for_retry',
525
+ Active: 'active',
526
+ Expired: 'expired',
527
+ Failed: 'failed'
528
+ };
529
+ export const HostingV1SslSslStatusResourceProviderEnum = {
530
+ Custom: 'custom',
531
+ Letsencrypt: 'letsencrypt',
532
+ Zerossl: 'zerossl',
533
+ Googlessl: 'googlessl',
534
+ Hssl: 'hssl'
535
+ };
521
536
  export const HostingV1WebsitesWebsiteResourceVhostTypeEnum = {
522
537
  Main: 'main',
523
538
  Addon: 'addon',
@@ -16981,6 +16996,348 @@ export class HostingRedirectsApi extends BaseAPI {
16981
16996
  return HostingRedirectsApiFp(this.configuration).listWebsiteRedirectsV1(username, domain, page, perPage, options).then((request) => request(this.axios, this.basePath));
16982
16997
  }
16983
16998
  }
16999
+ /**
17000
+ * HostingSSLApi - axios parameter creator
17001
+ * @export
17002
+ */
17003
+ export const HostingSSLApiAxiosParamCreator = function (configuration) {
17004
+ return {
17005
+ /**
17006
+ * Returns the SSL state of the website: the certificate `status` and `provider`, whether the certificate is a lifetime one managed by the platform, whether HTTP requests are redirected to HTTPS, when the certificate stops being valid and the last installation error. `installing` and `waiting_for_retry` mean an installation is in progress. `failed` means the last installation gave up, or the website was not updated for 60 minutes while `installing`; `last_error` holds the reason when it is a known message, otherwise it is null. `expired` means the assigned certificate\'s validity has ended. `not_installed` means no certificate is assigned. Free subdomains use a platform-managed certificate: with no installation recorded they report `active` with `provider` and `expires_at` null.
17007
+ * @summary Get SSL status
17008
+ * @param {string} username
17009
+ * @param {string} domain Domain name
17010
+ * @param {*} [options] Override http request option.
17011
+ * @throws {RequiredError}
17012
+ */
17013
+ getSSLStatusV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
17014
+ // verify required parameter 'username' is not null or undefined
17015
+ assertParamExists('getSSLStatusV1', 'username', username);
17016
+ // verify required parameter 'domain' is not null or undefined
17017
+ assertParamExists('getSSLStatusV1', 'domain', domain);
17018
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/ssl/status`
17019
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
17020
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
17021
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
17022
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
17023
+ let baseOptions;
17024
+ if (configuration) {
17025
+ baseOptions = configuration.baseOptions;
17026
+ }
17027
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
17028
+ const localVarHeaderParameter = {};
17029
+ const localVarQueryParameter = {};
17030
+ // authentication apiToken required
17031
+ // http bearer authentication required
17032
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
17033
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
17034
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
17035
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
17036
+ return {
17037
+ url: toPathString(localVarUrlObj),
17038
+ options: localVarRequestOptions,
17039
+ };
17040
+ }),
17041
+ /**
17042
+ * Requests a lifetime SSL certificate for the website. The installation runs in the background; `Get SSL status` reports `active` or `failed` when it ends. An `active` lifetime certificate does not block the request: a new installation is requested, which is how a certificate is reinstalled. Returns 422 for free subdomains (their certificate is managed by the platform), while an installation is `installing` or `waiting_for_retry`, when the website\'s certificate was revoked (it cannot be reissued), and when an uploaded custom certificate is installed; that one has to be uninstalled first.
17043
+ * @summary Install SSL
17044
+ * @param {string} username
17045
+ * @param {string} domain Domain name
17046
+ * @param {*} [options] Override http request option.
17047
+ * @throws {RequiredError}
17048
+ */
17049
+ installSSLV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
17050
+ // verify required parameter 'username' is not null or undefined
17051
+ assertParamExists('installSSLV1', 'username', username);
17052
+ // verify required parameter 'domain' is not null or undefined
17053
+ assertParamExists('installSSLV1', 'domain', domain);
17054
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/ssl/setup`
17055
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
17056
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
17057
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
17058
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
17059
+ let baseOptions;
17060
+ if (configuration) {
17061
+ baseOptions = configuration.baseOptions;
17062
+ }
17063
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
17064
+ const localVarHeaderParameter = {};
17065
+ const localVarQueryParameter = {};
17066
+ // authentication apiToken required
17067
+ // http bearer authentication required
17068
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
17069
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
17070
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
17071
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
17072
+ return {
17073
+ url: toPathString(localVarUrlObj),
17074
+ options: localVarRequestOptions,
17075
+ };
17076
+ }),
17077
+ /**
17078
+ * Turns the HTTP to HTTPS redirect of the website on or off, based on `is_enabled`. Does nothing when the redirect is already in the requested state. Turning it on requires an installed certificate (`status` `active` or `expired` on `Get SSL status`) and returns 422 when there is none; turning it off is always accepted.
17079
+ * @summary Toggle HTTPS redirect
17080
+ * @param {string} username
17081
+ * @param {string} domain Domain name
17082
+ * @param {HostingV1SslToggleHttpsRedirectRequest} hostingV1SslToggleHttpsRedirectRequest
17083
+ * @param {*} [options] Override http request option.
17084
+ * @throws {RequiredError}
17085
+ */
17086
+ toggleHTTPSRedirectV1: (username_1, domain_1, hostingV1SslToggleHttpsRedirectRequest_1, ...args_1) => __awaiter(this, [username_1, domain_1, hostingV1SslToggleHttpsRedirectRequest_1, ...args_1], void 0, function* (username, domain, hostingV1SslToggleHttpsRedirectRequest, options = {}) {
17087
+ // verify required parameter 'username' is not null or undefined
17088
+ assertParamExists('toggleHTTPSRedirectV1', 'username', username);
17089
+ // verify required parameter 'domain' is not null or undefined
17090
+ assertParamExists('toggleHTTPSRedirectV1', 'domain', domain);
17091
+ // verify required parameter 'hostingV1SslToggleHttpsRedirectRequest' is not null or undefined
17092
+ assertParamExists('toggleHTTPSRedirectV1', 'hostingV1SslToggleHttpsRedirectRequest', hostingV1SslToggleHttpsRedirectRequest);
17093
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/ssl/https-redirect/toggle`
17094
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
17095
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
17096
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
17097
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
17098
+ let baseOptions;
17099
+ if (configuration) {
17100
+ baseOptions = configuration.baseOptions;
17101
+ }
17102
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
17103
+ const localVarHeaderParameter = {};
17104
+ const localVarQueryParameter = {};
17105
+ // authentication apiToken required
17106
+ // http bearer authentication required
17107
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
17108
+ localVarHeaderParameter['Content-Type'] = 'application/json';
17109
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
17110
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
17111
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
17112
+ localVarRequestOptions.data = serializeDataIfNeeded(hostingV1SslToggleHttpsRedirectRequest, localVarRequestOptions, configuration);
17113
+ return {
17114
+ url: toPathString(localVarUrlObj),
17115
+ options: localVarRequestOptions,
17116
+ };
17117
+ }),
17118
+ /**
17119
+ * Removes the SSL certificate assigned to the website, turns the HTTPS redirect off and cancels a pending installation retry. The website serves plain HTTP until a new installation completes. `Get SSL status` reports `not_installed` as soon as the call returns; the call also succeeds when no certificate is assigned, so repeating it is safe. Returns 422 for free subdomains (their certificate is managed by the platform) and while an installation is `installing`.
17120
+ * @summary Uninstall SSL
17121
+ * @param {string} username
17122
+ * @param {string} domain Domain name
17123
+ * @param {*} [options] Override http request option.
17124
+ * @throws {RequiredError}
17125
+ */
17126
+ uninstallSSLV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
17127
+ // verify required parameter 'username' is not null or undefined
17128
+ assertParamExists('uninstallSSLV1', 'username', username);
17129
+ // verify required parameter 'domain' is not null or undefined
17130
+ assertParamExists('uninstallSSLV1', 'domain', domain);
17131
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/ssl`
17132
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
17133
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
17134
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
17135
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
17136
+ let baseOptions;
17137
+ if (configuration) {
17138
+ baseOptions = configuration.baseOptions;
17139
+ }
17140
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
17141
+ const localVarHeaderParameter = {};
17142
+ const localVarQueryParameter = {};
17143
+ // authentication apiToken required
17144
+ // http bearer authentication required
17145
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
17146
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
17147
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
17148
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
17149
+ return {
17150
+ url: toPathString(localVarUrlObj),
17151
+ options: localVarRequestOptions,
17152
+ };
17153
+ }),
17154
+ };
17155
+ };
17156
+ /**
17157
+ * HostingSSLApi - functional programming interface
17158
+ * @export
17159
+ */
17160
+ export const HostingSSLApiFp = function (configuration) {
17161
+ const localVarAxiosParamCreator = HostingSSLApiAxiosParamCreator(configuration);
17162
+ return {
17163
+ /**
17164
+ * Returns the SSL state of the website: the certificate `status` and `provider`, whether the certificate is a lifetime one managed by the platform, whether HTTP requests are redirected to HTTPS, when the certificate stops being valid and the last installation error. `installing` and `waiting_for_retry` mean an installation is in progress. `failed` means the last installation gave up, or the website was not updated for 60 minutes while `installing`; `last_error` holds the reason when it is a known message, otherwise it is null. `expired` means the assigned certificate\'s validity has ended. `not_installed` means no certificate is assigned. Free subdomains use a platform-managed certificate: with no installation recorded they report `active` with `provider` and `expires_at` null.
17165
+ * @summary Get SSL status
17166
+ * @param {string} username
17167
+ * @param {string} domain Domain name
17168
+ * @param {*} [options] Override http request option.
17169
+ * @throws {RequiredError}
17170
+ */
17171
+ getSSLStatusV1(username, domain, options) {
17172
+ return __awaiter(this, void 0, void 0, function* () {
17173
+ var _a, _b;
17174
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getSSLStatusV1(username, domain, options);
17175
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingSSLApi.getSSLStatusV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
17176
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17177
+ });
17178
+ },
17179
+ /**
17180
+ * Requests a lifetime SSL certificate for the website. The installation runs in the background; `Get SSL status` reports `active` or `failed` when it ends. An `active` lifetime certificate does not block the request: a new installation is requested, which is how a certificate is reinstalled. Returns 422 for free subdomains (their certificate is managed by the platform), while an installation is `installing` or `waiting_for_retry`, when the website\'s certificate was revoked (it cannot be reissued), and when an uploaded custom certificate is installed; that one has to be uninstalled first.
17181
+ * @summary Install SSL
17182
+ * @param {string} username
17183
+ * @param {string} domain Domain name
17184
+ * @param {*} [options] Override http request option.
17185
+ * @throws {RequiredError}
17186
+ */
17187
+ installSSLV1(username, domain, options) {
17188
+ return __awaiter(this, void 0, void 0, function* () {
17189
+ var _a, _b;
17190
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.installSSLV1(username, domain, options);
17191
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingSSLApi.installSSLV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
17192
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17193
+ });
17194
+ },
17195
+ /**
17196
+ * Turns the HTTP to HTTPS redirect of the website on or off, based on `is_enabled`. Does nothing when the redirect is already in the requested state. Turning it on requires an installed certificate (`status` `active` or `expired` on `Get SSL status`) and returns 422 when there is none; turning it off is always accepted.
17197
+ * @summary Toggle HTTPS redirect
17198
+ * @param {string} username
17199
+ * @param {string} domain Domain name
17200
+ * @param {HostingV1SslToggleHttpsRedirectRequest} hostingV1SslToggleHttpsRedirectRequest
17201
+ * @param {*} [options] Override http request option.
17202
+ * @throws {RequiredError}
17203
+ */
17204
+ toggleHTTPSRedirectV1(username, domain, hostingV1SslToggleHttpsRedirectRequest, options) {
17205
+ return __awaiter(this, void 0, void 0, function* () {
17206
+ var _a, _b;
17207
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.toggleHTTPSRedirectV1(username, domain, hostingV1SslToggleHttpsRedirectRequest, options);
17208
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingSSLApi.toggleHTTPSRedirectV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
17209
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17210
+ });
17211
+ },
17212
+ /**
17213
+ * Removes the SSL certificate assigned to the website, turns the HTTPS redirect off and cancels a pending installation retry. The website serves plain HTTP until a new installation completes. `Get SSL status` reports `not_installed` as soon as the call returns; the call also succeeds when no certificate is assigned, so repeating it is safe. Returns 422 for free subdomains (their certificate is managed by the platform) and while an installation is `installing`.
17214
+ * @summary Uninstall SSL
17215
+ * @param {string} username
17216
+ * @param {string} domain Domain name
17217
+ * @param {*} [options] Override http request option.
17218
+ * @throws {RequiredError}
17219
+ */
17220
+ uninstallSSLV1(username, domain, options) {
17221
+ return __awaiter(this, void 0, void 0, function* () {
17222
+ var _a, _b;
17223
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.uninstallSSLV1(username, domain, options);
17224
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingSSLApi.uninstallSSLV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
17225
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17226
+ });
17227
+ },
17228
+ };
17229
+ };
17230
+ /**
17231
+ * HostingSSLApi - factory interface
17232
+ * @export
17233
+ */
17234
+ export const HostingSSLApiFactory = function (configuration, basePath, axios) {
17235
+ const localVarFp = HostingSSLApiFp(configuration);
17236
+ return {
17237
+ /**
17238
+ * Returns the SSL state of the website: the certificate `status` and `provider`, whether the certificate is a lifetime one managed by the platform, whether HTTP requests are redirected to HTTPS, when the certificate stops being valid and the last installation error. `installing` and `waiting_for_retry` mean an installation is in progress. `failed` means the last installation gave up, or the website was not updated for 60 minutes while `installing`; `last_error` holds the reason when it is a known message, otherwise it is null. `expired` means the assigned certificate\'s validity has ended. `not_installed` means no certificate is assigned. Free subdomains use a platform-managed certificate: with no installation recorded they report `active` with `provider` and `expires_at` null.
17239
+ * @summary Get SSL status
17240
+ * @param {string} username
17241
+ * @param {string} domain Domain name
17242
+ * @param {*} [options] Override http request option.
17243
+ * @throws {RequiredError}
17244
+ */
17245
+ getSSLStatusV1(username, domain, options) {
17246
+ return localVarFp.getSSLStatusV1(username, domain, options).then((request) => request(axios, basePath));
17247
+ },
17248
+ /**
17249
+ * Requests a lifetime SSL certificate for the website. The installation runs in the background; `Get SSL status` reports `active` or `failed` when it ends. An `active` lifetime certificate does not block the request: a new installation is requested, which is how a certificate is reinstalled. Returns 422 for free subdomains (their certificate is managed by the platform), while an installation is `installing` or `waiting_for_retry`, when the website\'s certificate was revoked (it cannot be reissued), and when an uploaded custom certificate is installed; that one has to be uninstalled first.
17250
+ * @summary Install SSL
17251
+ * @param {string} username
17252
+ * @param {string} domain Domain name
17253
+ * @param {*} [options] Override http request option.
17254
+ * @throws {RequiredError}
17255
+ */
17256
+ installSSLV1(username, domain, options) {
17257
+ return localVarFp.installSSLV1(username, domain, options).then((request) => request(axios, basePath));
17258
+ },
17259
+ /**
17260
+ * Turns the HTTP to HTTPS redirect of the website on or off, based on `is_enabled`. Does nothing when the redirect is already in the requested state. Turning it on requires an installed certificate (`status` `active` or `expired` on `Get SSL status`) and returns 422 when there is none; turning it off is always accepted.
17261
+ * @summary Toggle HTTPS redirect
17262
+ * @param {string} username
17263
+ * @param {string} domain Domain name
17264
+ * @param {HostingV1SslToggleHttpsRedirectRequest} hostingV1SslToggleHttpsRedirectRequest
17265
+ * @param {*} [options] Override http request option.
17266
+ * @throws {RequiredError}
17267
+ */
17268
+ toggleHTTPSRedirectV1(username, domain, hostingV1SslToggleHttpsRedirectRequest, options) {
17269
+ return localVarFp.toggleHTTPSRedirectV1(username, domain, hostingV1SslToggleHttpsRedirectRequest, options).then((request) => request(axios, basePath));
17270
+ },
17271
+ /**
17272
+ * Removes the SSL certificate assigned to the website, turns the HTTPS redirect off and cancels a pending installation retry. The website serves plain HTTP until a new installation completes. `Get SSL status` reports `not_installed` as soon as the call returns; the call also succeeds when no certificate is assigned, so repeating it is safe. Returns 422 for free subdomains (their certificate is managed by the platform) and while an installation is `installing`.
17273
+ * @summary Uninstall SSL
17274
+ * @param {string} username
17275
+ * @param {string} domain Domain name
17276
+ * @param {*} [options] Override http request option.
17277
+ * @throws {RequiredError}
17278
+ */
17279
+ uninstallSSLV1(username, domain, options) {
17280
+ return localVarFp.uninstallSSLV1(username, domain, options).then((request) => request(axios, basePath));
17281
+ },
17282
+ };
17283
+ };
17284
+ /**
17285
+ * HostingSSLApi - object-oriented interface
17286
+ * @export
17287
+ * @class HostingSSLApi
17288
+ * @extends {BaseAPI}
17289
+ */
17290
+ export class HostingSSLApi extends BaseAPI {
17291
+ /**
17292
+ * Returns the SSL state of the website: the certificate `status` and `provider`, whether the certificate is a lifetime one managed by the platform, whether HTTP requests are redirected to HTTPS, when the certificate stops being valid and the last installation error. `installing` and `waiting_for_retry` mean an installation is in progress. `failed` means the last installation gave up, or the website was not updated for 60 minutes while `installing`; `last_error` holds the reason when it is a known message, otherwise it is null. `expired` means the assigned certificate\'s validity has ended. `not_installed` means no certificate is assigned. Free subdomains use a platform-managed certificate: with no installation recorded they report `active` with `provider` and `expires_at` null.
17293
+ * @summary Get SSL status
17294
+ * @param {string} username
17295
+ * @param {string} domain Domain name
17296
+ * @param {*} [options] Override http request option.
17297
+ * @throws {RequiredError}
17298
+ * @memberof HostingSSLApi
17299
+ */
17300
+ getSSLStatusV1(username, domain, options) {
17301
+ return HostingSSLApiFp(this.configuration).getSSLStatusV1(username, domain, options).then((request) => request(this.axios, this.basePath));
17302
+ }
17303
+ /**
17304
+ * Requests a lifetime SSL certificate for the website. The installation runs in the background; `Get SSL status` reports `active` or `failed` when it ends. An `active` lifetime certificate does not block the request: a new installation is requested, which is how a certificate is reinstalled. Returns 422 for free subdomains (their certificate is managed by the platform), while an installation is `installing` or `waiting_for_retry`, when the website\'s certificate was revoked (it cannot be reissued), and when an uploaded custom certificate is installed; that one has to be uninstalled first.
17305
+ * @summary Install SSL
17306
+ * @param {string} username
17307
+ * @param {string} domain Domain name
17308
+ * @param {*} [options] Override http request option.
17309
+ * @throws {RequiredError}
17310
+ * @memberof HostingSSLApi
17311
+ */
17312
+ installSSLV1(username, domain, options) {
17313
+ return HostingSSLApiFp(this.configuration).installSSLV1(username, domain, options).then((request) => request(this.axios, this.basePath));
17314
+ }
17315
+ /**
17316
+ * Turns the HTTP to HTTPS redirect of the website on or off, based on `is_enabled`. Does nothing when the redirect is already in the requested state. Turning it on requires an installed certificate (`status` `active` or `expired` on `Get SSL status`) and returns 422 when there is none; turning it off is always accepted.
17317
+ * @summary Toggle HTTPS redirect
17318
+ * @param {string} username
17319
+ * @param {string} domain Domain name
17320
+ * @param {HostingV1SslToggleHttpsRedirectRequest} hostingV1SslToggleHttpsRedirectRequest
17321
+ * @param {*} [options] Override http request option.
17322
+ * @throws {RequiredError}
17323
+ * @memberof HostingSSLApi
17324
+ */
17325
+ toggleHTTPSRedirectV1(username, domain, hostingV1SslToggleHttpsRedirectRequest, options) {
17326
+ return HostingSSLApiFp(this.configuration).toggleHTTPSRedirectV1(username, domain, hostingV1SslToggleHttpsRedirectRequest, options).then((request) => request(this.axios, this.basePath));
17327
+ }
17328
+ /**
17329
+ * Removes the SSL certificate assigned to the website, turns the HTTPS redirect off and cancels a pending installation retry. The website serves plain HTTP until a new installation completes. `Get SSL status` reports `not_installed` as soon as the call returns; the call also succeeds when no certificate is assigned, so repeating it is safe. Returns 422 for free subdomains (their certificate is managed by the platform) and while an installation is `installing`.
17330
+ * @summary Uninstall SSL
17331
+ * @param {string} username
17332
+ * @param {string} domain Domain name
17333
+ * @param {*} [options] Override http request option.
17334
+ * @throws {RequiredError}
17335
+ * @memberof HostingSSLApi
17336
+ */
17337
+ uninstallSSLV1(username, domain, options) {
17338
+ return HostingSSLApiFp(this.configuration).uninstallSSLV1(username, domain, options).then((request) => request(this.axios, this.basePath));
17339
+ }
17340
+ }
16984
17341
  /**
16985
17342
  * HostingWebsitesApi - axios parameter creator
16986
17343
  * @export
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.52.2
4
+ * API Version: 1.53.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/esm/base.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.52.2
6
+ * API Version: 1.53.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.52.2
4
+ * API Version: 1.53.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.52.2
6
+ * API Version: 1.53.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.52.2
4
+ * API Version: 1.53.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.52.2
6
+ * API Version: 1.53.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -13,7 +13,7 @@ export class Configuration {
13
13
  var _a;
14
14
  this.accessToken = param.accessToken;
15
15
  this.basePath = param.basePath;
16
- this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.52.2" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
16
+ this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.53.1" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
17
17
  this.formDataCtor = param.formDataCtor;
18
18
  }
19
19
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.52.2
4
+ * API Version: 1.53.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/esm/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.52.2
6
+ * API Version: 1.53.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.52.2
4
+ * API Version: 1.53.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 1.52.2
7
+ * API Version: 1.53.0
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