@hostinger/sdk 1.52.2 → 1.53.0

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 CHANGED
@@ -1,9 +1,9 @@
1
- ## @hostinger/sdk@1.52.2
1
+ ## @hostinger/sdk@1.53.0
2
2
 
3
3
  For more information, please visit [https://developers.hostinger.com](https://developers.hostinger.com).
4
4
 
5
5
  ### Usage
6
6
 
7
7
  ```
8
- npm install @hostinger/sdk@1.52.2 --save
8
+ npm install @hostinger/sdk@1.53.0 --save
9
9
  ```
package/api.ts 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
@@ -8897,6 +8897,83 @@ export interface HostingV1RedirectsRedirectResource {
8897
8897
  */
8898
8898
  'to': string;
8899
8899
  }
8900
+ /**
8901
+ *
8902
+ * @export
8903
+ * @interface HostingV1SslSslStatusResource
8904
+ */
8905
+ export interface HostingV1SslSslStatusResource {
8906
+ /**
8907
+ * Current certificate status
8908
+ * @type {string}
8909
+ * @memberof HostingV1SslSslStatusResource
8910
+ */
8911
+ 'status': HostingV1SslSslStatusResourceStatusEnum;
8912
+ /**
8913
+ * Provider of the assigned certificate, or of the last recorded installation when none is assigned. `custom` means an uploaded certificate. Null when no certificate is assigned and no installation is recorded, which is also the case for free subdomains on the platform-managed certificate.
8914
+ * @type {string}
8915
+ * @memberof HostingV1SslSslStatusResource
8916
+ */
8917
+ 'provider': HostingV1SslSslStatusResourceProviderEnum | null;
8918
+ /**
8919
+ * Whether the certificate comes from a lifetime provider managed by the platform, not an uploaded one. Follows `provider`: it reflects the last recorded installation when no certificate is assigned, and is false when `provider` is null.
8920
+ * @type {boolean}
8921
+ * @memberof HostingV1SslSslStatusResource
8922
+ */
8923
+ 'is_lifetime': boolean;
8924
+ /**
8925
+ * Whether HTTP requests to the website are redirected to HTTPS
8926
+ * @type {boolean}
8927
+ * @memberof HostingV1SslSslStatusResource
8928
+ */
8929
+ 'is_https_redirect_enabled': boolean;
8930
+ /**
8931
+ * End of the assigned certificate validity period; null when no certificate details are available.
8932
+ * @type {string}
8933
+ * @memberof HostingV1SslSslStatusResource
8934
+ */
8935
+ 'expires_at': string | null;
8936
+ /**
8937
+ * Last installation error, when it is one of the known displayable messages
8938
+ * @type {string}
8939
+ * @memberof HostingV1SslSslStatusResource
8940
+ */
8941
+ 'last_error': string | null;
8942
+ }
8943
+
8944
+ export const HostingV1SslSslStatusResourceStatusEnum = {
8945
+ NotInstalled: 'not_installed',
8946
+ Installing: 'installing',
8947
+ WaitingForRetry: 'waiting_for_retry',
8948
+ Active: 'active',
8949
+ Expired: 'expired',
8950
+ Failed: 'failed'
8951
+ } as const;
8952
+
8953
+ export type HostingV1SslSslStatusResourceStatusEnum = typeof HostingV1SslSslStatusResourceStatusEnum[keyof typeof HostingV1SslSslStatusResourceStatusEnum];
8954
+ export const HostingV1SslSslStatusResourceProviderEnum = {
8955
+ Custom: 'custom',
8956
+ Letsencrypt: 'letsencrypt',
8957
+ Zerossl: 'zerossl',
8958
+ Googlessl: 'googlessl',
8959
+ Hssl: 'hssl'
8960
+ } as const;
8961
+
8962
+ export type HostingV1SslSslStatusResourceProviderEnum = typeof HostingV1SslSslStatusResourceProviderEnum[keyof typeof HostingV1SslSslStatusResourceProviderEnum];
8963
+
8964
+ /**
8965
+ *
8966
+ * @export
8967
+ * @interface HostingV1SslToggleHttpsRedirectRequest
8968
+ */
8969
+ export interface HostingV1SslToggleHttpsRedirectRequest {
8970
+ /**
8971
+ * Turn the HTTP to HTTPS redirect on (true) or off (false) for the website.
8972
+ * @type {boolean}
8973
+ * @memberof HostingV1SslToggleHttpsRedirectRequest
8974
+ */
8975
+ 'is_enabled': boolean;
8976
+ }
8900
8977
  /**
8901
8978
  *
8902
8979
  * @export
@@ -33850,6 +33927,370 @@ export class HostingRedirectsApi extends BaseAPI {
33850
33927
 
33851
33928
 
33852
33929
 
33930
+ /**
33931
+ * HostingSSLApi - axios parameter creator
33932
+ * @export
33933
+ */
33934
+ export const HostingSSLApiAxiosParamCreator = function (configuration?: Configuration) {
33935
+ return {
33936
+ /**
33937
+ * 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.
33938
+ * @summary Get SSL status
33939
+ * @param {string} username
33940
+ * @param {string} domain Domain name
33941
+ * @param {*} [options] Override http request option.
33942
+ * @throws {RequiredError}
33943
+ */
33944
+ getSSLStatusV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
33945
+ // verify required parameter 'username' is not null or undefined
33946
+ assertParamExists('getSSLStatusV1', 'username', username)
33947
+ // verify required parameter 'domain' is not null or undefined
33948
+ assertParamExists('getSSLStatusV1', 'domain', domain)
33949
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/ssl/status`
33950
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
33951
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
33952
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
33953
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
33954
+ let baseOptions;
33955
+ if (configuration) {
33956
+ baseOptions = configuration.baseOptions;
33957
+ }
33958
+
33959
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
33960
+ const localVarHeaderParameter = {} as any;
33961
+ const localVarQueryParameter = {} as any;
33962
+
33963
+ // authentication apiToken required
33964
+ // http bearer authentication required
33965
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
33966
+
33967
+
33968
+
33969
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
33970
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
33971
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
33972
+
33973
+ return {
33974
+ url: toPathString(localVarUrlObj),
33975
+ options: localVarRequestOptions,
33976
+ };
33977
+ },
33978
+ /**
33979
+ * 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.
33980
+ * @summary Install SSL
33981
+ * @param {string} username
33982
+ * @param {string} domain Domain name
33983
+ * @param {*} [options] Override http request option.
33984
+ * @throws {RequiredError}
33985
+ */
33986
+ installSSLV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
33987
+ // verify required parameter 'username' is not null or undefined
33988
+ assertParamExists('installSSLV1', 'username', username)
33989
+ // verify required parameter 'domain' is not null or undefined
33990
+ assertParamExists('installSSLV1', 'domain', domain)
33991
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/ssl/setup`
33992
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
33993
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
33994
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
33995
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
33996
+ let baseOptions;
33997
+ if (configuration) {
33998
+ baseOptions = configuration.baseOptions;
33999
+ }
34000
+
34001
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
34002
+ const localVarHeaderParameter = {} as any;
34003
+ const localVarQueryParameter = {} as any;
34004
+
34005
+ // authentication apiToken required
34006
+ // http bearer authentication required
34007
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
34008
+
34009
+
34010
+
34011
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
34012
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
34013
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
34014
+
34015
+ return {
34016
+ url: toPathString(localVarUrlObj),
34017
+ options: localVarRequestOptions,
34018
+ };
34019
+ },
34020
+ /**
34021
+ * 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.
34022
+ * @summary Toggle HTTPS redirect
34023
+ * @param {string} username
34024
+ * @param {string} domain Domain name
34025
+ * @param {HostingV1SslToggleHttpsRedirectRequest} hostingV1SslToggleHttpsRedirectRequest
34026
+ * @param {*} [options] Override http request option.
34027
+ * @throws {RequiredError}
34028
+ */
34029
+ toggleHTTPSRedirectV1: async (username: string, domain: string, hostingV1SslToggleHttpsRedirectRequest: HostingV1SslToggleHttpsRedirectRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
34030
+ // verify required parameter 'username' is not null or undefined
34031
+ assertParamExists('toggleHTTPSRedirectV1', 'username', username)
34032
+ // verify required parameter 'domain' is not null or undefined
34033
+ assertParamExists('toggleHTTPSRedirectV1', 'domain', domain)
34034
+ // verify required parameter 'hostingV1SslToggleHttpsRedirectRequest' is not null or undefined
34035
+ assertParamExists('toggleHTTPSRedirectV1', 'hostingV1SslToggleHttpsRedirectRequest', hostingV1SslToggleHttpsRedirectRequest)
34036
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/ssl/https-redirect/toggle`
34037
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
34038
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
34039
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
34040
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
34041
+ let baseOptions;
34042
+ if (configuration) {
34043
+ baseOptions = configuration.baseOptions;
34044
+ }
34045
+
34046
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
34047
+ const localVarHeaderParameter = {} as any;
34048
+ const localVarQueryParameter = {} as any;
34049
+
34050
+ // authentication apiToken required
34051
+ // http bearer authentication required
34052
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
34053
+
34054
+
34055
+
34056
+ localVarHeaderParameter['Content-Type'] = 'application/json';
34057
+
34058
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
34059
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
34060
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
34061
+ localVarRequestOptions.data = serializeDataIfNeeded(hostingV1SslToggleHttpsRedirectRequest, localVarRequestOptions, configuration)
34062
+
34063
+ return {
34064
+ url: toPathString(localVarUrlObj),
34065
+ options: localVarRequestOptions,
34066
+ };
34067
+ },
34068
+ /**
34069
+ * 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`.
34070
+ * @summary Uninstall SSL
34071
+ * @param {string} username
34072
+ * @param {string} domain Domain name
34073
+ * @param {*} [options] Override http request option.
34074
+ * @throws {RequiredError}
34075
+ */
34076
+ uninstallSSLV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
34077
+ // verify required parameter 'username' is not null or undefined
34078
+ assertParamExists('uninstallSSLV1', 'username', username)
34079
+ // verify required parameter 'domain' is not null or undefined
34080
+ assertParamExists('uninstallSSLV1', 'domain', domain)
34081
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/ssl`
34082
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
34083
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
34084
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
34085
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
34086
+ let baseOptions;
34087
+ if (configuration) {
34088
+ baseOptions = configuration.baseOptions;
34089
+ }
34090
+
34091
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
34092
+ const localVarHeaderParameter = {} as any;
34093
+ const localVarQueryParameter = {} as any;
34094
+
34095
+ // authentication apiToken required
34096
+ // http bearer authentication required
34097
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
34098
+
34099
+
34100
+
34101
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
34102
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
34103
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
34104
+
34105
+ return {
34106
+ url: toPathString(localVarUrlObj),
34107
+ options: localVarRequestOptions,
34108
+ };
34109
+ },
34110
+ }
34111
+ };
34112
+
34113
+ /**
34114
+ * HostingSSLApi - functional programming interface
34115
+ * @export
34116
+ */
34117
+ export const HostingSSLApiFp = function(configuration?: Configuration) {
34118
+ const localVarAxiosParamCreator = HostingSSLApiAxiosParamCreator(configuration)
34119
+ return {
34120
+ /**
34121
+ * 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.
34122
+ * @summary Get SSL status
34123
+ * @param {string} username
34124
+ * @param {string} domain Domain name
34125
+ * @param {*} [options] Override http request option.
34126
+ * @throws {RequiredError}
34127
+ */
34128
+ async getSSLStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1SslSslStatusResource>> {
34129
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getSSLStatusV1(username, domain, options);
34130
+ const localVarOperationServerBasePath = operationServerMap['HostingSSLApi.getSSLStatusV1']?.[0]?.url;
34131
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
34132
+ },
34133
+ /**
34134
+ * 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.
34135
+ * @summary Install SSL
34136
+ * @param {string} username
34137
+ * @param {string} domain Domain name
34138
+ * @param {*} [options] Override http request option.
34139
+ * @throws {RequiredError}
34140
+ */
34141
+ async installSSLV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
34142
+ const localVarAxiosArgs = await localVarAxiosParamCreator.installSSLV1(username, domain, options);
34143
+ const localVarOperationServerBasePath = operationServerMap['HostingSSLApi.installSSLV1']?.[0]?.url;
34144
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
34145
+ },
34146
+ /**
34147
+ * 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.
34148
+ * @summary Toggle HTTPS redirect
34149
+ * @param {string} username
34150
+ * @param {string} domain Domain name
34151
+ * @param {HostingV1SslToggleHttpsRedirectRequest} hostingV1SslToggleHttpsRedirectRequest
34152
+ * @param {*} [options] Override http request option.
34153
+ * @throws {RequiredError}
34154
+ */
34155
+ async toggleHTTPSRedirectV1(username: string, domain: string, hostingV1SslToggleHttpsRedirectRequest: HostingV1SslToggleHttpsRedirectRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
34156
+ const localVarAxiosArgs = await localVarAxiosParamCreator.toggleHTTPSRedirectV1(username, domain, hostingV1SslToggleHttpsRedirectRequest, options);
34157
+ const localVarOperationServerBasePath = operationServerMap['HostingSSLApi.toggleHTTPSRedirectV1']?.[0]?.url;
34158
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
34159
+ },
34160
+ /**
34161
+ * 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`.
34162
+ * @summary Uninstall SSL
34163
+ * @param {string} username
34164
+ * @param {string} domain Domain name
34165
+ * @param {*} [options] Override http request option.
34166
+ * @throws {RequiredError}
34167
+ */
34168
+ async uninstallSSLV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
34169
+ const localVarAxiosArgs = await localVarAxiosParamCreator.uninstallSSLV1(username, domain, options);
34170
+ const localVarOperationServerBasePath = operationServerMap['HostingSSLApi.uninstallSSLV1']?.[0]?.url;
34171
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
34172
+ },
34173
+ }
34174
+ };
34175
+
34176
+ /**
34177
+ * HostingSSLApi - factory interface
34178
+ * @export
34179
+ */
34180
+ export const HostingSSLApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
34181
+ const localVarFp = HostingSSLApiFp(configuration)
34182
+ return {
34183
+ /**
34184
+ * 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.
34185
+ * @summary Get SSL status
34186
+ * @param {string} username
34187
+ * @param {string} domain Domain name
34188
+ * @param {*} [options] Override http request option.
34189
+ * @throws {RequiredError}
34190
+ */
34191
+ getSSLStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1SslSslStatusResource> {
34192
+ return localVarFp.getSSLStatusV1(username, domain, options).then((request) => request(axios, basePath));
34193
+ },
34194
+ /**
34195
+ * 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.
34196
+ * @summary Install SSL
34197
+ * @param {string} username
34198
+ * @param {string} domain Domain name
34199
+ * @param {*} [options] Override http request option.
34200
+ * @throws {RequiredError}
34201
+ */
34202
+ installSSLV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
34203
+ return localVarFp.installSSLV1(username, domain, options).then((request) => request(axios, basePath));
34204
+ },
34205
+ /**
34206
+ * 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.
34207
+ * @summary Toggle HTTPS redirect
34208
+ * @param {string} username
34209
+ * @param {string} domain Domain name
34210
+ * @param {HostingV1SslToggleHttpsRedirectRequest} hostingV1SslToggleHttpsRedirectRequest
34211
+ * @param {*} [options] Override http request option.
34212
+ * @throws {RequiredError}
34213
+ */
34214
+ toggleHTTPSRedirectV1(username: string, domain: string, hostingV1SslToggleHttpsRedirectRequest: HostingV1SslToggleHttpsRedirectRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
34215
+ return localVarFp.toggleHTTPSRedirectV1(username, domain, hostingV1SslToggleHttpsRedirectRequest, options).then((request) => request(axios, basePath));
34216
+ },
34217
+ /**
34218
+ * 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`.
34219
+ * @summary Uninstall SSL
34220
+ * @param {string} username
34221
+ * @param {string} domain Domain name
34222
+ * @param {*} [options] Override http request option.
34223
+ * @throws {RequiredError}
34224
+ */
34225
+ uninstallSSLV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
34226
+ return localVarFp.uninstallSSLV1(username, domain, options).then((request) => request(axios, basePath));
34227
+ },
34228
+ };
34229
+ };
34230
+
34231
+ /**
34232
+ * HostingSSLApi - object-oriented interface
34233
+ * @export
34234
+ * @class HostingSSLApi
34235
+ * @extends {BaseAPI}
34236
+ */
34237
+ export class HostingSSLApi extends BaseAPI {
34238
+ /**
34239
+ * 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.
34240
+ * @summary Get SSL status
34241
+ * @param {string} username
34242
+ * @param {string} domain Domain name
34243
+ * @param {*} [options] Override http request option.
34244
+ * @throws {RequiredError}
34245
+ * @memberof HostingSSLApi
34246
+ */
34247
+ public getSSLStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
34248
+ return HostingSSLApiFp(this.configuration).getSSLStatusV1(username, domain, options).then((request) => request(this.axios, this.basePath));
34249
+ }
34250
+
34251
+ /**
34252
+ * 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.
34253
+ * @summary Install SSL
34254
+ * @param {string} username
34255
+ * @param {string} domain Domain name
34256
+ * @param {*} [options] Override http request option.
34257
+ * @throws {RequiredError}
34258
+ * @memberof HostingSSLApi
34259
+ */
34260
+ public installSSLV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
34261
+ return HostingSSLApiFp(this.configuration).installSSLV1(username, domain, options).then((request) => request(this.axios, this.basePath));
34262
+ }
34263
+
34264
+ /**
34265
+ * 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.
34266
+ * @summary Toggle HTTPS redirect
34267
+ * @param {string} username
34268
+ * @param {string} domain Domain name
34269
+ * @param {HostingV1SslToggleHttpsRedirectRequest} hostingV1SslToggleHttpsRedirectRequest
34270
+ * @param {*} [options] Override http request option.
34271
+ * @throws {RequiredError}
34272
+ * @memberof HostingSSLApi
34273
+ */
34274
+ public toggleHTTPSRedirectV1(username: string, domain: string, hostingV1SslToggleHttpsRedirectRequest: HostingV1SslToggleHttpsRedirectRequest, options?: RawAxiosRequestConfig) {
34275
+ return HostingSSLApiFp(this.configuration).toggleHTTPSRedirectV1(username, domain, hostingV1SslToggleHttpsRedirectRequest, options).then((request) => request(this.axios, this.basePath));
34276
+ }
34277
+
34278
+ /**
34279
+ * 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`.
34280
+ * @summary Uninstall SSL
34281
+ * @param {string} username
34282
+ * @param {string} domain Domain name
34283
+ * @param {*} [options] Override http request option.
34284
+ * @throws {RequiredError}
34285
+ * @memberof HostingSSLApi
34286
+ */
34287
+ public uninstallSSLV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
34288
+ return HostingSSLApiFp(this.configuration).uninstallSSLV1(username, domain, options).then((request) => request(this.axios, this.basePath));
34289
+ }
34290
+ }
34291
+
34292
+
34293
+
33853
34294
  /**
33854
34295
  * HostingWebsitesApi - axios parameter creator
33855
34296
  * @export
package/base.ts 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/common.ts 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/configuration.ts 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
@@ -48,7 +48,7 @@ export class Configuration {
48
48
  this.baseOptions = {
49
49
  ...param.baseOptions,
50
50
  headers: {
51
- 'User-Agent': "hostinger-typescript-sdk/1.52.2",
51
+ 'User-Agent': "hostinger-typescript-sdk/1.53.0",
52
52
  ...param.baseOptions?.headers,
53
53
  },
54
54
  };