@hostinger/sdk 1.53.2 → 1.54.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 +2 -2
- package/api.ts +392 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +208 -1
- package/dist/api.js +358 -12
- 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 +208 -1
- package/dist/esm/api.js +342 -1
- 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/docs/AgencyHostingSSLApi.md +238 -0
- package/docs/AgencyHostingV1SslSslStatusResource.md +24 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
## @hostinger/sdk@1.
|
|
1
|
+
## @hostinger/sdk@1.54.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.
|
|
8
|
+
npm install @hostinger/sdk@1.54.0 --save
|
|
9
9
|
```
|
package/api.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.54.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
|
|
@@ -832,6 +832,42 @@ export const AgencyHostingV1SetupsWebsiteSetupStatusResourceStatusEnum = {
|
|
|
832
832
|
|
|
833
833
|
export type AgencyHostingV1SetupsWebsiteSetupStatusResourceStatusEnum = typeof AgencyHostingV1SetupsWebsiteSetupStatusResourceStatusEnum[keyof typeof AgencyHostingV1SetupsWebsiteSetupStatusResourceStatusEnum];
|
|
834
834
|
|
|
835
|
+
/**
|
|
836
|
+
*
|
|
837
|
+
* @export
|
|
838
|
+
* @interface AgencyHostingV1SslSslStatusResource
|
|
839
|
+
*/
|
|
840
|
+
export interface AgencyHostingV1SslSslStatusResource {
|
|
841
|
+
/**
|
|
842
|
+
* `installing` while a certificate setup is running or retrying, `active` when a valid certificate is in place (uploaded, platform-issued, or a lifetime certificate bought for the domain), `failed` when the last setup gave up and no valid certificate is in place, `expired` when the certificate has run out, `not_installed` when the domain has no certificate and no setup process.
|
|
843
|
+
* @type {string}
|
|
844
|
+
* @memberof AgencyHostingV1SslSslStatusResource
|
|
845
|
+
*/
|
|
846
|
+
'status': AgencyHostingV1SslSslStatusResourceStatusEnum;
|
|
847
|
+
/**
|
|
848
|
+
* Whether the certificate was uploaded by the customer instead of issued or sold by the platform.
|
|
849
|
+
* @type {boolean}
|
|
850
|
+
* @memberof AgencyHostingV1SslSslStatusResource
|
|
851
|
+
*/
|
|
852
|
+
'is_custom': boolean;
|
|
853
|
+
/**
|
|
854
|
+
* End of the validity period of the certificate in place; null when there is none or the uploaded certificate carries no expiry.
|
|
855
|
+
* @type {string}
|
|
856
|
+
* @memberof AgencyHostingV1SslSslStatusResource
|
|
857
|
+
*/
|
|
858
|
+
'expires_at': string | null;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
export const AgencyHostingV1SslSslStatusResourceStatusEnum = {
|
|
862
|
+
NotInstalled: 'not_installed',
|
|
863
|
+
Installing: 'installing',
|
|
864
|
+
Failed: 'failed',
|
|
865
|
+
Active: 'active',
|
|
866
|
+
Expired: 'expired'
|
|
867
|
+
} as const;
|
|
868
|
+
|
|
869
|
+
export type AgencyHostingV1SslSslStatusResourceStatusEnum = typeof AgencyHostingV1SslSslStatusResourceStatusEnum[keyof typeof AgencyHostingV1SslSslStatusResourceStatusEnum];
|
|
870
|
+
|
|
835
871
|
/**
|
|
836
872
|
* Build Node.js assets from an already-uploaded archive
|
|
837
873
|
* @export
|
|
@@ -19387,6 +19423,361 @@ export class AgencyHostingPHPApi extends BaseAPI {
|
|
|
19387
19423
|
|
|
19388
19424
|
|
|
19389
19425
|
|
|
19426
|
+
/**
|
|
19427
|
+
* AgencyHostingSSLApi - axios parameter creator
|
|
19428
|
+
* @export
|
|
19429
|
+
*/
|
|
19430
|
+
export const AgencyHostingSSLApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
19431
|
+
return {
|
|
19432
|
+
/**
|
|
19433
|
+
* Returns the SSL state of one domain of an Agency Plan website: the certificate `status`, whether the certificate was uploaded by the customer, and when it stops being valid. `installing` means a certificate setup is running or retrying; the `ssl_setup` entry of `List website processes` shows the same progress. `active` means a valid certificate is in place: uploaded by the customer, issued by the platform, or a lifetime certificate bought for the domain. `failed` means the last setup gave up and no valid certificate is in place. `expired` means the certificate has run out. `not_installed` means the domain has no certificate and no setup process. Returns 404 when the website or the domain does not exist.
|
|
19434
|
+
* @summary Get website SSL status
|
|
19435
|
+
* @param {string} websiteUid Agency Plan website UID
|
|
19436
|
+
* @param {string} domain Domain name
|
|
19437
|
+
* @param {*} [options] Override http request option.
|
|
19438
|
+
* @throws {RequiredError}
|
|
19439
|
+
*/
|
|
19440
|
+
getWebsiteSSLStatusV1: async (websiteUid: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
19441
|
+
// verify required parameter 'websiteUid' is not null or undefined
|
|
19442
|
+
assertParamExists('getWebsiteSSLStatusV1', 'websiteUid', websiteUid)
|
|
19443
|
+
// verify required parameter 'domain' is not null or undefined
|
|
19444
|
+
assertParamExists('getWebsiteSSLStatusV1', 'domain', domain)
|
|
19445
|
+
const localVarPath = `/api/agency-hosting/v1/websites/{website_uid}/domains/{domain}/ssl/status`
|
|
19446
|
+
.replace(`{${"website_uid"}}`, encodeURIComponent(String(websiteUid)))
|
|
19447
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
19448
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
19449
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
19450
|
+
let baseOptions;
|
|
19451
|
+
if (configuration) {
|
|
19452
|
+
baseOptions = configuration.baseOptions;
|
|
19453
|
+
}
|
|
19454
|
+
|
|
19455
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
19456
|
+
const localVarHeaderParameter = {} as any;
|
|
19457
|
+
const localVarQueryParameter = {} as any;
|
|
19458
|
+
|
|
19459
|
+
// authentication apiToken required
|
|
19460
|
+
// http bearer authentication required
|
|
19461
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
19462
|
+
|
|
19463
|
+
|
|
19464
|
+
|
|
19465
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
19466
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
19467
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
19468
|
+
|
|
19469
|
+
return {
|
|
19470
|
+
url: toPathString(localVarUrlObj),
|
|
19471
|
+
options: localVarRequestOptions,
|
|
19472
|
+
};
|
|
19473
|
+
},
|
|
19474
|
+
/**
|
|
19475
|
+
* Starts a Let\'s Encrypt certificate setup for the domain and returns at once; the setup runs in the background. `Get website SSL status` reports `installing` while it runs, then `active` or `failed`; the `ssl_setup` entry of `List website processes` shows the same progress. Returns 422 when the domain already has a platform certificate that is not expired, when a certificate process is recorded for the domain (a failed setup counts until it is cleaned up), or when the domain hit its limit of three setups per seven days. Returns 429 when the same domain was requested less than a minute ago, 403 when the website is suspended or locked, and 404 when the website or the domain does not exist.
|
|
19476
|
+
* @summary Install website SSL
|
|
19477
|
+
* @param {string} websiteUid Agency Plan website UID
|
|
19478
|
+
* @param {string} domain Domain name
|
|
19479
|
+
* @param {*} [options] Override http request option.
|
|
19480
|
+
* @throws {RequiredError}
|
|
19481
|
+
*/
|
|
19482
|
+
installWebsiteSSLV1: async (websiteUid: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
19483
|
+
// verify required parameter 'websiteUid' is not null or undefined
|
|
19484
|
+
assertParamExists('installWebsiteSSLV1', 'websiteUid', websiteUid)
|
|
19485
|
+
// verify required parameter 'domain' is not null or undefined
|
|
19486
|
+
assertParamExists('installWebsiteSSLV1', 'domain', domain)
|
|
19487
|
+
const localVarPath = `/api/agency-hosting/v1/websites/{website_uid}/domains/{domain}/ssl/setup`
|
|
19488
|
+
.replace(`{${"website_uid"}}`, encodeURIComponent(String(websiteUid)))
|
|
19489
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
19490
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
19491
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
19492
|
+
let baseOptions;
|
|
19493
|
+
if (configuration) {
|
|
19494
|
+
baseOptions = configuration.baseOptions;
|
|
19495
|
+
}
|
|
19496
|
+
|
|
19497
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
19498
|
+
const localVarHeaderParameter = {} as any;
|
|
19499
|
+
const localVarQueryParameter = {} as any;
|
|
19500
|
+
|
|
19501
|
+
// authentication apiToken required
|
|
19502
|
+
// http bearer authentication required
|
|
19503
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
19504
|
+
|
|
19505
|
+
|
|
19506
|
+
|
|
19507
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
19508
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
19509
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
19510
|
+
|
|
19511
|
+
return {
|
|
19512
|
+
url: toPathString(localVarUrlObj),
|
|
19513
|
+
options: localVarRequestOptions,
|
|
19514
|
+
};
|
|
19515
|
+
},
|
|
19516
|
+
/**
|
|
19517
|
+
* Replaces the Let\'s Encrypt certificate of the domain: the current platform certificate, when one is recorded, is revoked and removed, then a new setup starts in the background. Returns at once; `Get website SSL status` reports `installing` while it runs, then `active` or `failed`. Returns 422 for free subdomains, when a certificate process is recorded for the domain (a failed setup counts until it is cleaned up), or when the domain hit its limit of three setups per seven days. Returns 429 when the same domain was requested less than a minute ago, and 403 when the website is suspended or locked, and 404 when the website or the domain does not exist.
|
|
19518
|
+
* @summary Reinstall website SSL
|
|
19519
|
+
* @param {string} websiteUid Agency Plan website UID
|
|
19520
|
+
* @param {string} domain Domain name
|
|
19521
|
+
* @param {*} [options] Override http request option.
|
|
19522
|
+
* @throws {RequiredError}
|
|
19523
|
+
*/
|
|
19524
|
+
reinstallWebsiteSSLV1: async (websiteUid: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
19525
|
+
// verify required parameter 'websiteUid' is not null or undefined
|
|
19526
|
+
assertParamExists('reinstallWebsiteSSLV1', 'websiteUid', websiteUid)
|
|
19527
|
+
// verify required parameter 'domain' is not null or undefined
|
|
19528
|
+
assertParamExists('reinstallWebsiteSSLV1', 'domain', domain)
|
|
19529
|
+
const localVarPath = `/api/agency-hosting/v1/websites/{website_uid}/domains/{domain}/ssl/reinstall`
|
|
19530
|
+
.replace(`{${"website_uid"}}`, encodeURIComponent(String(websiteUid)))
|
|
19531
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
19532
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
19533
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
19534
|
+
let baseOptions;
|
|
19535
|
+
if (configuration) {
|
|
19536
|
+
baseOptions = configuration.baseOptions;
|
|
19537
|
+
}
|
|
19538
|
+
|
|
19539
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
19540
|
+
const localVarHeaderParameter = {} as any;
|
|
19541
|
+
const localVarQueryParameter = {} as any;
|
|
19542
|
+
|
|
19543
|
+
// authentication apiToken required
|
|
19544
|
+
// http bearer authentication required
|
|
19545
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
19546
|
+
|
|
19547
|
+
|
|
19548
|
+
|
|
19549
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
19550
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
19551
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
19552
|
+
|
|
19553
|
+
return {
|
|
19554
|
+
url: toPathString(localVarUrlObj),
|
|
19555
|
+
options: localVarRequestOptions,
|
|
19556
|
+
};
|
|
19557
|
+
},
|
|
19558
|
+
/**
|
|
19559
|
+
* Removes the platform-issued Let\'s Encrypt certificate of the domain: the certificate is revoked and deleted before the response, so the domain is no longer served with a platform certificate until a new setup completes. Also succeeds when the domain has no platform certificate to remove. Uploaded (custom) certificates are not affected. Returns 422 when a certificate process is recorded for the domain (a failed setup counts until it is cleaned up), 429 when the same domain was requested less than a minute ago, and 403 when the website is suspended or locked, and 404 when the website or the domain does not exist.
|
|
19560
|
+
* @summary Uninstall website SSL
|
|
19561
|
+
* @param {string} websiteUid Agency Plan website UID
|
|
19562
|
+
* @param {string} domain Domain name
|
|
19563
|
+
* @param {*} [options] Override http request option.
|
|
19564
|
+
* @throws {RequiredError}
|
|
19565
|
+
*/
|
|
19566
|
+
uninstallWebsiteSSLV1: async (websiteUid: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
19567
|
+
// verify required parameter 'websiteUid' is not null or undefined
|
|
19568
|
+
assertParamExists('uninstallWebsiteSSLV1', 'websiteUid', websiteUid)
|
|
19569
|
+
// verify required parameter 'domain' is not null or undefined
|
|
19570
|
+
assertParamExists('uninstallWebsiteSSLV1', 'domain', domain)
|
|
19571
|
+
const localVarPath = `/api/agency-hosting/v1/websites/{website_uid}/domains/{domain}/ssl`
|
|
19572
|
+
.replace(`{${"website_uid"}}`, encodeURIComponent(String(websiteUid)))
|
|
19573
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
19574
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
19575
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
19576
|
+
let baseOptions;
|
|
19577
|
+
if (configuration) {
|
|
19578
|
+
baseOptions = configuration.baseOptions;
|
|
19579
|
+
}
|
|
19580
|
+
|
|
19581
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
19582
|
+
const localVarHeaderParameter = {} as any;
|
|
19583
|
+
const localVarQueryParameter = {} as any;
|
|
19584
|
+
|
|
19585
|
+
// authentication apiToken required
|
|
19586
|
+
// http bearer authentication required
|
|
19587
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
19588
|
+
|
|
19589
|
+
|
|
19590
|
+
|
|
19591
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
19592
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
19593
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
19594
|
+
|
|
19595
|
+
return {
|
|
19596
|
+
url: toPathString(localVarUrlObj),
|
|
19597
|
+
options: localVarRequestOptions,
|
|
19598
|
+
};
|
|
19599
|
+
},
|
|
19600
|
+
}
|
|
19601
|
+
};
|
|
19602
|
+
|
|
19603
|
+
/**
|
|
19604
|
+
* AgencyHostingSSLApi - functional programming interface
|
|
19605
|
+
* @export
|
|
19606
|
+
*/
|
|
19607
|
+
export const AgencyHostingSSLApiFp = function(configuration?: Configuration) {
|
|
19608
|
+
const localVarAxiosParamCreator = AgencyHostingSSLApiAxiosParamCreator(configuration)
|
|
19609
|
+
return {
|
|
19610
|
+
/**
|
|
19611
|
+
* Returns the SSL state of one domain of an Agency Plan website: the certificate `status`, whether the certificate was uploaded by the customer, and when it stops being valid. `installing` means a certificate setup is running or retrying; the `ssl_setup` entry of `List website processes` shows the same progress. `active` means a valid certificate is in place: uploaded by the customer, issued by the platform, or a lifetime certificate bought for the domain. `failed` means the last setup gave up and no valid certificate is in place. `expired` means the certificate has run out. `not_installed` means the domain has no certificate and no setup process. Returns 404 when the website or the domain does not exist.
|
|
19612
|
+
* @summary Get website SSL status
|
|
19613
|
+
* @param {string} websiteUid Agency Plan website UID
|
|
19614
|
+
* @param {string} domain Domain name
|
|
19615
|
+
* @param {*} [options] Override http request option.
|
|
19616
|
+
* @throws {RequiredError}
|
|
19617
|
+
*/
|
|
19618
|
+
async getWebsiteSSLStatusV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgencyHostingV1SslSslStatusResource>> {
|
|
19619
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getWebsiteSSLStatusV1(websiteUid, domain, options);
|
|
19620
|
+
const localVarOperationServerBasePath = operationServerMap['AgencyHostingSSLApi.getWebsiteSSLStatusV1']?.[0]?.url;
|
|
19621
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
19622
|
+
},
|
|
19623
|
+
/**
|
|
19624
|
+
* Starts a Let\'s Encrypt certificate setup for the domain and returns at once; the setup runs in the background. `Get website SSL status` reports `installing` while it runs, then `active` or `failed`; the `ssl_setup` entry of `List website processes` shows the same progress. Returns 422 when the domain already has a platform certificate that is not expired, when a certificate process is recorded for the domain (a failed setup counts until it is cleaned up), or when the domain hit its limit of three setups per seven days. Returns 429 when the same domain was requested less than a minute ago, 403 when the website is suspended or locked, and 404 when the website or the domain does not exist.
|
|
19625
|
+
* @summary Install website SSL
|
|
19626
|
+
* @param {string} websiteUid Agency Plan website UID
|
|
19627
|
+
* @param {string} domain Domain name
|
|
19628
|
+
* @param {*} [options] Override http request option.
|
|
19629
|
+
* @throws {RequiredError}
|
|
19630
|
+
*/
|
|
19631
|
+
async installWebsiteSSLV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
19632
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.installWebsiteSSLV1(websiteUid, domain, options);
|
|
19633
|
+
const localVarOperationServerBasePath = operationServerMap['AgencyHostingSSLApi.installWebsiteSSLV1']?.[0]?.url;
|
|
19634
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
19635
|
+
},
|
|
19636
|
+
/**
|
|
19637
|
+
* Replaces the Let\'s Encrypt certificate of the domain: the current platform certificate, when one is recorded, is revoked and removed, then a new setup starts in the background. Returns at once; `Get website SSL status` reports `installing` while it runs, then `active` or `failed`. Returns 422 for free subdomains, when a certificate process is recorded for the domain (a failed setup counts until it is cleaned up), or when the domain hit its limit of three setups per seven days. Returns 429 when the same domain was requested less than a minute ago, and 403 when the website is suspended or locked, and 404 when the website or the domain does not exist.
|
|
19638
|
+
* @summary Reinstall website SSL
|
|
19639
|
+
* @param {string} websiteUid Agency Plan website UID
|
|
19640
|
+
* @param {string} domain Domain name
|
|
19641
|
+
* @param {*} [options] Override http request option.
|
|
19642
|
+
* @throws {RequiredError}
|
|
19643
|
+
*/
|
|
19644
|
+
async reinstallWebsiteSSLV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
19645
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.reinstallWebsiteSSLV1(websiteUid, domain, options);
|
|
19646
|
+
const localVarOperationServerBasePath = operationServerMap['AgencyHostingSSLApi.reinstallWebsiteSSLV1']?.[0]?.url;
|
|
19647
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
19648
|
+
},
|
|
19649
|
+
/**
|
|
19650
|
+
* Removes the platform-issued Let\'s Encrypt certificate of the domain: the certificate is revoked and deleted before the response, so the domain is no longer served with a platform certificate until a new setup completes. Also succeeds when the domain has no platform certificate to remove. Uploaded (custom) certificates are not affected. Returns 422 when a certificate process is recorded for the domain (a failed setup counts until it is cleaned up), 429 when the same domain was requested less than a minute ago, and 403 when the website is suspended or locked, and 404 when the website or the domain does not exist.
|
|
19651
|
+
* @summary Uninstall website SSL
|
|
19652
|
+
* @param {string} websiteUid Agency Plan website UID
|
|
19653
|
+
* @param {string} domain Domain name
|
|
19654
|
+
* @param {*} [options] Override http request option.
|
|
19655
|
+
* @throws {RequiredError}
|
|
19656
|
+
*/
|
|
19657
|
+
async uninstallWebsiteSSLV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
19658
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.uninstallWebsiteSSLV1(websiteUid, domain, options);
|
|
19659
|
+
const localVarOperationServerBasePath = operationServerMap['AgencyHostingSSLApi.uninstallWebsiteSSLV1']?.[0]?.url;
|
|
19660
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
19661
|
+
},
|
|
19662
|
+
}
|
|
19663
|
+
};
|
|
19664
|
+
|
|
19665
|
+
/**
|
|
19666
|
+
* AgencyHostingSSLApi - factory interface
|
|
19667
|
+
* @export
|
|
19668
|
+
*/
|
|
19669
|
+
export const AgencyHostingSSLApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
19670
|
+
const localVarFp = AgencyHostingSSLApiFp(configuration)
|
|
19671
|
+
return {
|
|
19672
|
+
/**
|
|
19673
|
+
* Returns the SSL state of one domain of an Agency Plan website: the certificate `status`, whether the certificate was uploaded by the customer, and when it stops being valid. `installing` means a certificate setup is running or retrying; the `ssl_setup` entry of `List website processes` shows the same progress. `active` means a valid certificate is in place: uploaded by the customer, issued by the platform, or a lifetime certificate bought for the domain. `failed` means the last setup gave up and no valid certificate is in place. `expired` means the certificate has run out. `not_installed` means the domain has no certificate and no setup process. Returns 404 when the website or the domain does not exist.
|
|
19674
|
+
* @summary Get website SSL status
|
|
19675
|
+
* @param {string} websiteUid Agency Plan website UID
|
|
19676
|
+
* @param {string} domain Domain name
|
|
19677
|
+
* @param {*} [options] Override http request option.
|
|
19678
|
+
* @throws {RequiredError}
|
|
19679
|
+
*/
|
|
19680
|
+
getWebsiteSSLStatusV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<AgencyHostingV1SslSslStatusResource> {
|
|
19681
|
+
return localVarFp.getWebsiteSSLStatusV1(websiteUid, domain, options).then((request) => request(axios, basePath));
|
|
19682
|
+
},
|
|
19683
|
+
/**
|
|
19684
|
+
* Starts a Let\'s Encrypt certificate setup for the domain and returns at once; the setup runs in the background. `Get website SSL status` reports `installing` while it runs, then `active` or `failed`; the `ssl_setup` entry of `List website processes` shows the same progress. Returns 422 when the domain already has a platform certificate that is not expired, when a certificate process is recorded for the domain (a failed setup counts until it is cleaned up), or when the domain hit its limit of three setups per seven days. Returns 429 when the same domain was requested less than a minute ago, 403 when the website is suspended or locked, and 404 when the website or the domain does not exist.
|
|
19685
|
+
* @summary Install website SSL
|
|
19686
|
+
* @param {string} websiteUid Agency Plan website UID
|
|
19687
|
+
* @param {string} domain Domain name
|
|
19688
|
+
* @param {*} [options] Override http request option.
|
|
19689
|
+
* @throws {RequiredError}
|
|
19690
|
+
*/
|
|
19691
|
+
installWebsiteSSLV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
19692
|
+
return localVarFp.installWebsiteSSLV1(websiteUid, domain, options).then((request) => request(axios, basePath));
|
|
19693
|
+
},
|
|
19694
|
+
/**
|
|
19695
|
+
* Replaces the Let\'s Encrypt certificate of the domain: the current platform certificate, when one is recorded, is revoked and removed, then a new setup starts in the background. Returns at once; `Get website SSL status` reports `installing` while it runs, then `active` or `failed`. Returns 422 for free subdomains, when a certificate process is recorded for the domain (a failed setup counts until it is cleaned up), or when the domain hit its limit of three setups per seven days. Returns 429 when the same domain was requested less than a minute ago, and 403 when the website is suspended or locked, and 404 when the website or the domain does not exist.
|
|
19696
|
+
* @summary Reinstall website SSL
|
|
19697
|
+
* @param {string} websiteUid Agency Plan website UID
|
|
19698
|
+
* @param {string} domain Domain name
|
|
19699
|
+
* @param {*} [options] Override http request option.
|
|
19700
|
+
* @throws {RequiredError}
|
|
19701
|
+
*/
|
|
19702
|
+
reinstallWebsiteSSLV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
19703
|
+
return localVarFp.reinstallWebsiteSSLV1(websiteUid, domain, options).then((request) => request(axios, basePath));
|
|
19704
|
+
},
|
|
19705
|
+
/**
|
|
19706
|
+
* Removes the platform-issued Let\'s Encrypt certificate of the domain: the certificate is revoked and deleted before the response, so the domain is no longer served with a platform certificate until a new setup completes. Also succeeds when the domain has no platform certificate to remove. Uploaded (custom) certificates are not affected. Returns 422 when a certificate process is recorded for the domain (a failed setup counts until it is cleaned up), 429 when the same domain was requested less than a minute ago, and 403 when the website is suspended or locked, and 404 when the website or the domain does not exist.
|
|
19707
|
+
* @summary Uninstall website SSL
|
|
19708
|
+
* @param {string} websiteUid Agency Plan website UID
|
|
19709
|
+
* @param {string} domain Domain name
|
|
19710
|
+
* @param {*} [options] Override http request option.
|
|
19711
|
+
* @throws {RequiredError}
|
|
19712
|
+
*/
|
|
19713
|
+
uninstallWebsiteSSLV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
19714
|
+
return localVarFp.uninstallWebsiteSSLV1(websiteUid, domain, options).then((request) => request(axios, basePath));
|
|
19715
|
+
},
|
|
19716
|
+
};
|
|
19717
|
+
};
|
|
19718
|
+
|
|
19719
|
+
/**
|
|
19720
|
+
* AgencyHostingSSLApi - object-oriented interface
|
|
19721
|
+
* @export
|
|
19722
|
+
* @class AgencyHostingSSLApi
|
|
19723
|
+
* @extends {BaseAPI}
|
|
19724
|
+
*/
|
|
19725
|
+
export class AgencyHostingSSLApi extends BaseAPI {
|
|
19726
|
+
/**
|
|
19727
|
+
* Returns the SSL state of one domain of an Agency Plan website: the certificate `status`, whether the certificate was uploaded by the customer, and when it stops being valid. `installing` means a certificate setup is running or retrying; the `ssl_setup` entry of `List website processes` shows the same progress. `active` means a valid certificate is in place: uploaded by the customer, issued by the platform, or a lifetime certificate bought for the domain. `failed` means the last setup gave up and no valid certificate is in place. `expired` means the certificate has run out. `not_installed` means the domain has no certificate and no setup process. Returns 404 when the website or the domain does not exist.
|
|
19728
|
+
* @summary Get website SSL status
|
|
19729
|
+
* @param {string} websiteUid Agency Plan website UID
|
|
19730
|
+
* @param {string} domain Domain name
|
|
19731
|
+
* @param {*} [options] Override http request option.
|
|
19732
|
+
* @throws {RequiredError}
|
|
19733
|
+
* @memberof AgencyHostingSSLApi
|
|
19734
|
+
*/
|
|
19735
|
+
public getWebsiteSSLStatusV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
19736
|
+
return AgencyHostingSSLApiFp(this.configuration).getWebsiteSSLStatusV1(websiteUid, domain, options).then((request) => request(this.axios, this.basePath));
|
|
19737
|
+
}
|
|
19738
|
+
|
|
19739
|
+
/**
|
|
19740
|
+
* Starts a Let\'s Encrypt certificate setup for the domain and returns at once; the setup runs in the background. `Get website SSL status` reports `installing` while it runs, then `active` or `failed`; the `ssl_setup` entry of `List website processes` shows the same progress. Returns 422 when the domain already has a platform certificate that is not expired, when a certificate process is recorded for the domain (a failed setup counts until it is cleaned up), or when the domain hit its limit of three setups per seven days. Returns 429 when the same domain was requested less than a minute ago, 403 when the website is suspended or locked, and 404 when the website or the domain does not exist.
|
|
19741
|
+
* @summary Install website SSL
|
|
19742
|
+
* @param {string} websiteUid Agency Plan website UID
|
|
19743
|
+
* @param {string} domain Domain name
|
|
19744
|
+
* @param {*} [options] Override http request option.
|
|
19745
|
+
* @throws {RequiredError}
|
|
19746
|
+
* @memberof AgencyHostingSSLApi
|
|
19747
|
+
*/
|
|
19748
|
+
public installWebsiteSSLV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
19749
|
+
return AgencyHostingSSLApiFp(this.configuration).installWebsiteSSLV1(websiteUid, domain, options).then((request) => request(this.axios, this.basePath));
|
|
19750
|
+
}
|
|
19751
|
+
|
|
19752
|
+
/**
|
|
19753
|
+
* Replaces the Let\'s Encrypt certificate of the domain: the current platform certificate, when one is recorded, is revoked and removed, then a new setup starts in the background. Returns at once; `Get website SSL status` reports `installing` while it runs, then `active` or `failed`. Returns 422 for free subdomains, when a certificate process is recorded for the domain (a failed setup counts until it is cleaned up), or when the domain hit its limit of three setups per seven days. Returns 429 when the same domain was requested less than a minute ago, and 403 when the website is suspended or locked, and 404 when the website or the domain does not exist.
|
|
19754
|
+
* @summary Reinstall website SSL
|
|
19755
|
+
* @param {string} websiteUid Agency Plan website UID
|
|
19756
|
+
* @param {string} domain Domain name
|
|
19757
|
+
* @param {*} [options] Override http request option.
|
|
19758
|
+
* @throws {RequiredError}
|
|
19759
|
+
* @memberof AgencyHostingSSLApi
|
|
19760
|
+
*/
|
|
19761
|
+
public reinstallWebsiteSSLV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
19762
|
+
return AgencyHostingSSLApiFp(this.configuration).reinstallWebsiteSSLV1(websiteUid, domain, options).then((request) => request(this.axios, this.basePath));
|
|
19763
|
+
}
|
|
19764
|
+
|
|
19765
|
+
/**
|
|
19766
|
+
* Removes the platform-issued Let\'s Encrypt certificate of the domain: the certificate is revoked and deleted before the response, so the domain is no longer served with a platform certificate until a new setup completes. Also succeeds when the domain has no platform certificate to remove. Uploaded (custom) certificates are not affected. Returns 422 when a certificate process is recorded for the domain (a failed setup counts until it is cleaned up), 429 when the same domain was requested less than a minute ago, and 403 when the website is suspended or locked, and 404 when the website or the domain does not exist.
|
|
19767
|
+
* @summary Uninstall website SSL
|
|
19768
|
+
* @param {string} websiteUid Agency Plan website UID
|
|
19769
|
+
* @param {string} domain Domain name
|
|
19770
|
+
* @param {*} [options] Override http request option.
|
|
19771
|
+
* @throws {RequiredError}
|
|
19772
|
+
* @memberof AgencyHostingSSLApi
|
|
19773
|
+
*/
|
|
19774
|
+
public uninstallWebsiteSSLV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
19775
|
+
return AgencyHostingSSLApiFp(this.configuration).uninstallWebsiteSSLV1(websiteUid, domain, options).then((request) => request(this.axios, this.basePath));
|
|
19776
|
+
}
|
|
19777
|
+
}
|
|
19778
|
+
|
|
19779
|
+
|
|
19780
|
+
|
|
19390
19781
|
/**
|
|
19391
19782
|
* AgencyHostingWebsiteSetupsApi - axios parameter creator
|
|
19392
19783
|
* @export
|
package/base.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.54.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.
|
|
6
|
+
* API Version: 1.54.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.
|
|
6
|
+
* API Version: 1.54.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.
|
|
51
|
+
'User-Agent': "hostinger-typescript-sdk/1.54.0",
|
|
52
52
|
...param.baseOptions?.headers,
|
|
53
53
|
},
|
|
54
54
|
};
|