@hostinger/sdk 1.53.2 → 1.54.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/README.md CHANGED
@@ -1,9 +1,9 @@
1
- ## @hostinger/sdk@1.53.2
1
+ ## @hostinger/sdk@1.54.1
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.53.2 --save
8
+ npm install @hostinger/sdk@1.54.1 --save
9
9
  ```
package/api.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.53.1
6
+ * API Version: 1.54.1
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
@@ -6971,6 +7007,75 @@ export interface HostingV1DatabasesRemoteConnectionsRemoteConnectionResource {
6971
7007
  */
6972
7008
  'ip': string;
6973
7009
  }
7010
+ /**
7011
+ *
7012
+ * @export
7013
+ * @interface HostingV1DatabasesSetupDatabaseRequest
7014
+ */
7015
+ export interface HostingV1DatabasesSetupDatabaseRequest {
7016
+ /**
7017
+ * Optional database name. Generated when omitted. Letters, digits and underscores; must not start with an underscore. Up to 14 characters without the account username prefix (`u123456789_`), which is added automatically when missing. With the prefix the full name is 12 to 25 characters.
7018
+ * @type {string}
7019
+ * @memberof HostingV1DatabasesSetupDatabaseRequest
7020
+ */
7021
+ 'name': string;
7022
+ /**
7023
+ * Optional database user. Generated when omitted. Letters, digits and underscores; must not start with an underscore. Up to 14 characters without the account username prefix (`u123456789_`), which is added automatically when missing. With the prefix the full user is 12 to 25 characters.
7024
+ * @type {string}
7025
+ * @memberof HostingV1DatabasesSetupDatabaseRequest
7026
+ */
7027
+ 'user': string;
7028
+ }
7029
+ /**
7030
+ *
7031
+ * @export
7032
+ * @interface HostingV1DatabasesWebsiteDatabaseConnectionResource
7033
+ */
7034
+ export interface HostingV1DatabasesWebsiteDatabaseConnectionResource {
7035
+ /**
7036
+ * Database name, as written into DB_NAME
7037
+ * @type {string}
7038
+ * @memberof HostingV1DatabasesWebsiteDatabaseConnectionResource
7039
+ */
7040
+ 'name': string;
7041
+ /**
7042
+ * Database user, as written into DB_USER
7043
+ * @type {string}
7044
+ * @memberof HostingV1DatabasesWebsiteDatabaseConnectionResource
7045
+ */
7046
+ 'user': string;
7047
+ /**
7048
+ * MySQL host as written into DB_HOST. The application connects over the loopback.
7049
+ * @type {string}
7050
+ * @memberof HostingV1DatabasesWebsiteDatabaseConnectionResource
7051
+ */
7052
+ 'host': string;
7053
+ /**
7054
+ * MySQL port as written into DB_PORT
7055
+ * @type {number}
7056
+ * @memberof HostingV1DatabasesWebsiteDatabaseConnectionResource
7057
+ */
7058
+ 'port': number;
7059
+ }
7060
+ /**
7061
+ *
7062
+ * @export
7063
+ * @interface HostingV1DatabasesWebsiteDatabaseResource
7064
+ */
7065
+ export interface HostingV1DatabasesWebsiteDatabaseResource {
7066
+ /**
7067
+ *
7068
+ * @type {HostingV1DatabasesWebsiteDatabaseConnectionResource}
7069
+ * @memberof HostingV1DatabasesWebsiteDatabaseResource
7070
+ */
7071
+ 'database': HostingV1DatabasesWebsiteDatabaseConnectionResource;
7072
+ /**
7073
+ * Names of the environment variables written for this database. Values are never returned.
7074
+ * @type {Array<string>}
7075
+ * @memberof HostingV1DatabasesWebsiteDatabaseResource
7076
+ */
7077
+ 'env_var_keys': Array<string>;
7078
+ }
6974
7079
  /**
6975
7080
  *
6976
7081
  * @export
@@ -19387,6 +19492,361 @@ export class AgencyHostingPHPApi extends BaseAPI {
19387
19492
 
19388
19493
 
19389
19494
 
19495
+ /**
19496
+ * AgencyHostingSSLApi - axios parameter creator
19497
+ * @export
19498
+ */
19499
+ export const AgencyHostingSSLApiAxiosParamCreator = function (configuration?: Configuration) {
19500
+ return {
19501
+ /**
19502
+ * 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.
19503
+ * @summary Get website SSL status
19504
+ * @param {string} websiteUid Agency Plan website UID
19505
+ * @param {string} domain Domain name
19506
+ * @param {*} [options] Override http request option.
19507
+ * @throws {RequiredError}
19508
+ */
19509
+ getWebsiteSSLStatusV1: async (websiteUid: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
19510
+ // verify required parameter 'websiteUid' is not null or undefined
19511
+ assertParamExists('getWebsiteSSLStatusV1', 'websiteUid', websiteUid)
19512
+ // verify required parameter 'domain' is not null or undefined
19513
+ assertParamExists('getWebsiteSSLStatusV1', 'domain', domain)
19514
+ const localVarPath = `/api/agency-hosting/v1/websites/{website_uid}/domains/{domain}/ssl/status`
19515
+ .replace(`{${"website_uid"}}`, encodeURIComponent(String(websiteUid)))
19516
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
19517
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
19518
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
19519
+ let baseOptions;
19520
+ if (configuration) {
19521
+ baseOptions = configuration.baseOptions;
19522
+ }
19523
+
19524
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
19525
+ const localVarHeaderParameter = {} as any;
19526
+ const localVarQueryParameter = {} as any;
19527
+
19528
+ // authentication apiToken required
19529
+ // http bearer authentication required
19530
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
19531
+
19532
+
19533
+
19534
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
19535
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
19536
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
19537
+
19538
+ return {
19539
+ url: toPathString(localVarUrlObj),
19540
+ options: localVarRequestOptions,
19541
+ };
19542
+ },
19543
+ /**
19544
+ * 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.
19545
+ * @summary Install website SSL
19546
+ * @param {string} websiteUid Agency Plan website UID
19547
+ * @param {string} domain Domain name
19548
+ * @param {*} [options] Override http request option.
19549
+ * @throws {RequiredError}
19550
+ */
19551
+ installWebsiteSSLV1: async (websiteUid: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
19552
+ // verify required parameter 'websiteUid' is not null or undefined
19553
+ assertParamExists('installWebsiteSSLV1', 'websiteUid', websiteUid)
19554
+ // verify required parameter 'domain' is not null or undefined
19555
+ assertParamExists('installWebsiteSSLV1', 'domain', domain)
19556
+ const localVarPath = `/api/agency-hosting/v1/websites/{website_uid}/domains/{domain}/ssl/setup`
19557
+ .replace(`{${"website_uid"}}`, encodeURIComponent(String(websiteUid)))
19558
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
19559
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
19560
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
19561
+ let baseOptions;
19562
+ if (configuration) {
19563
+ baseOptions = configuration.baseOptions;
19564
+ }
19565
+
19566
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
19567
+ const localVarHeaderParameter = {} as any;
19568
+ const localVarQueryParameter = {} as any;
19569
+
19570
+ // authentication apiToken required
19571
+ // http bearer authentication required
19572
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
19573
+
19574
+
19575
+
19576
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
19577
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
19578
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
19579
+
19580
+ return {
19581
+ url: toPathString(localVarUrlObj),
19582
+ options: localVarRequestOptions,
19583
+ };
19584
+ },
19585
+ /**
19586
+ * 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.
19587
+ * @summary Reinstall website SSL
19588
+ * @param {string} websiteUid Agency Plan website UID
19589
+ * @param {string} domain Domain name
19590
+ * @param {*} [options] Override http request option.
19591
+ * @throws {RequiredError}
19592
+ */
19593
+ reinstallWebsiteSSLV1: async (websiteUid: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
19594
+ // verify required parameter 'websiteUid' is not null or undefined
19595
+ assertParamExists('reinstallWebsiteSSLV1', 'websiteUid', websiteUid)
19596
+ // verify required parameter 'domain' is not null or undefined
19597
+ assertParamExists('reinstallWebsiteSSLV1', 'domain', domain)
19598
+ const localVarPath = `/api/agency-hosting/v1/websites/{website_uid}/domains/{domain}/ssl/reinstall`
19599
+ .replace(`{${"website_uid"}}`, encodeURIComponent(String(websiteUid)))
19600
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
19601
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
19602
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
19603
+ let baseOptions;
19604
+ if (configuration) {
19605
+ baseOptions = configuration.baseOptions;
19606
+ }
19607
+
19608
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
19609
+ const localVarHeaderParameter = {} as any;
19610
+ const localVarQueryParameter = {} as any;
19611
+
19612
+ // authentication apiToken required
19613
+ // http bearer authentication required
19614
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
19615
+
19616
+
19617
+
19618
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
19619
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
19620
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
19621
+
19622
+ return {
19623
+ url: toPathString(localVarUrlObj),
19624
+ options: localVarRequestOptions,
19625
+ };
19626
+ },
19627
+ /**
19628
+ * 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.
19629
+ * @summary Uninstall website SSL
19630
+ * @param {string} websiteUid Agency Plan website UID
19631
+ * @param {string} domain Domain name
19632
+ * @param {*} [options] Override http request option.
19633
+ * @throws {RequiredError}
19634
+ */
19635
+ uninstallWebsiteSSLV1: async (websiteUid: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
19636
+ // verify required parameter 'websiteUid' is not null or undefined
19637
+ assertParamExists('uninstallWebsiteSSLV1', 'websiteUid', websiteUid)
19638
+ // verify required parameter 'domain' is not null or undefined
19639
+ assertParamExists('uninstallWebsiteSSLV1', 'domain', domain)
19640
+ const localVarPath = `/api/agency-hosting/v1/websites/{website_uid}/domains/{domain}/ssl`
19641
+ .replace(`{${"website_uid"}}`, encodeURIComponent(String(websiteUid)))
19642
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
19643
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
19644
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
19645
+ let baseOptions;
19646
+ if (configuration) {
19647
+ baseOptions = configuration.baseOptions;
19648
+ }
19649
+
19650
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
19651
+ const localVarHeaderParameter = {} as any;
19652
+ const localVarQueryParameter = {} as any;
19653
+
19654
+ // authentication apiToken required
19655
+ // http bearer authentication required
19656
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
19657
+
19658
+
19659
+
19660
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
19661
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
19662
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
19663
+
19664
+ return {
19665
+ url: toPathString(localVarUrlObj),
19666
+ options: localVarRequestOptions,
19667
+ };
19668
+ },
19669
+ }
19670
+ };
19671
+
19672
+ /**
19673
+ * AgencyHostingSSLApi - functional programming interface
19674
+ * @export
19675
+ */
19676
+ export const AgencyHostingSSLApiFp = function(configuration?: Configuration) {
19677
+ const localVarAxiosParamCreator = AgencyHostingSSLApiAxiosParamCreator(configuration)
19678
+ return {
19679
+ /**
19680
+ * 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.
19681
+ * @summary Get website SSL status
19682
+ * @param {string} websiteUid Agency Plan website UID
19683
+ * @param {string} domain Domain name
19684
+ * @param {*} [options] Override http request option.
19685
+ * @throws {RequiredError}
19686
+ */
19687
+ async getWebsiteSSLStatusV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgencyHostingV1SslSslStatusResource>> {
19688
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getWebsiteSSLStatusV1(websiteUid, domain, options);
19689
+ const localVarOperationServerBasePath = operationServerMap['AgencyHostingSSLApi.getWebsiteSSLStatusV1']?.[0]?.url;
19690
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
19691
+ },
19692
+ /**
19693
+ * 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.
19694
+ * @summary Install website SSL
19695
+ * @param {string} websiteUid Agency Plan website UID
19696
+ * @param {string} domain Domain name
19697
+ * @param {*} [options] Override http request option.
19698
+ * @throws {RequiredError}
19699
+ */
19700
+ async installWebsiteSSLV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
19701
+ const localVarAxiosArgs = await localVarAxiosParamCreator.installWebsiteSSLV1(websiteUid, domain, options);
19702
+ const localVarOperationServerBasePath = operationServerMap['AgencyHostingSSLApi.installWebsiteSSLV1']?.[0]?.url;
19703
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
19704
+ },
19705
+ /**
19706
+ * 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.
19707
+ * @summary Reinstall 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
+ async reinstallWebsiteSSLV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
19714
+ const localVarAxiosArgs = await localVarAxiosParamCreator.reinstallWebsiteSSLV1(websiteUid, domain, options);
19715
+ const localVarOperationServerBasePath = operationServerMap['AgencyHostingSSLApi.reinstallWebsiteSSLV1']?.[0]?.url;
19716
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
19717
+ },
19718
+ /**
19719
+ * 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.
19720
+ * @summary Uninstall website SSL
19721
+ * @param {string} websiteUid Agency Plan website UID
19722
+ * @param {string} domain Domain name
19723
+ * @param {*} [options] Override http request option.
19724
+ * @throws {RequiredError}
19725
+ */
19726
+ async uninstallWebsiteSSLV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
19727
+ const localVarAxiosArgs = await localVarAxiosParamCreator.uninstallWebsiteSSLV1(websiteUid, domain, options);
19728
+ const localVarOperationServerBasePath = operationServerMap['AgencyHostingSSLApi.uninstallWebsiteSSLV1']?.[0]?.url;
19729
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
19730
+ },
19731
+ }
19732
+ };
19733
+
19734
+ /**
19735
+ * AgencyHostingSSLApi - factory interface
19736
+ * @export
19737
+ */
19738
+ export const AgencyHostingSSLApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
19739
+ const localVarFp = AgencyHostingSSLApiFp(configuration)
19740
+ return {
19741
+ /**
19742
+ * 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.
19743
+ * @summary Get website SSL status
19744
+ * @param {string} websiteUid Agency Plan website UID
19745
+ * @param {string} domain Domain name
19746
+ * @param {*} [options] Override http request option.
19747
+ * @throws {RequiredError}
19748
+ */
19749
+ getWebsiteSSLStatusV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<AgencyHostingV1SslSslStatusResource> {
19750
+ return localVarFp.getWebsiteSSLStatusV1(websiteUid, domain, options).then((request) => request(axios, basePath));
19751
+ },
19752
+ /**
19753
+ * 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.
19754
+ * @summary Install 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
+ */
19760
+ installWebsiteSSLV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
19761
+ return localVarFp.installWebsiteSSLV1(websiteUid, domain, options).then((request) => request(axios, basePath));
19762
+ },
19763
+ /**
19764
+ * 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.
19765
+ * @summary Reinstall website SSL
19766
+ * @param {string} websiteUid Agency Plan website UID
19767
+ * @param {string} domain Domain name
19768
+ * @param {*} [options] Override http request option.
19769
+ * @throws {RequiredError}
19770
+ */
19771
+ reinstallWebsiteSSLV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
19772
+ return localVarFp.reinstallWebsiteSSLV1(websiteUid, domain, options).then((request) => request(axios, basePath));
19773
+ },
19774
+ /**
19775
+ * 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.
19776
+ * @summary Uninstall website SSL
19777
+ * @param {string} websiteUid Agency Plan website UID
19778
+ * @param {string} domain Domain name
19779
+ * @param {*} [options] Override http request option.
19780
+ * @throws {RequiredError}
19781
+ */
19782
+ uninstallWebsiteSSLV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
19783
+ return localVarFp.uninstallWebsiteSSLV1(websiteUid, domain, options).then((request) => request(axios, basePath));
19784
+ },
19785
+ };
19786
+ };
19787
+
19788
+ /**
19789
+ * AgencyHostingSSLApi - object-oriented interface
19790
+ * @export
19791
+ * @class AgencyHostingSSLApi
19792
+ * @extends {BaseAPI}
19793
+ */
19794
+ export class AgencyHostingSSLApi extends BaseAPI {
19795
+ /**
19796
+ * 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.
19797
+ * @summary Get website SSL status
19798
+ * @param {string} websiteUid Agency Plan website UID
19799
+ * @param {string} domain Domain name
19800
+ * @param {*} [options] Override http request option.
19801
+ * @throws {RequiredError}
19802
+ * @memberof AgencyHostingSSLApi
19803
+ */
19804
+ public getWebsiteSSLStatusV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig) {
19805
+ return AgencyHostingSSLApiFp(this.configuration).getWebsiteSSLStatusV1(websiteUid, domain, options).then((request) => request(this.axios, this.basePath));
19806
+ }
19807
+
19808
+ /**
19809
+ * 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.
19810
+ * @summary Install website SSL
19811
+ * @param {string} websiteUid Agency Plan website UID
19812
+ * @param {string} domain Domain name
19813
+ * @param {*} [options] Override http request option.
19814
+ * @throws {RequiredError}
19815
+ * @memberof AgencyHostingSSLApi
19816
+ */
19817
+ public installWebsiteSSLV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig) {
19818
+ return AgencyHostingSSLApiFp(this.configuration).installWebsiteSSLV1(websiteUid, domain, options).then((request) => request(this.axios, this.basePath));
19819
+ }
19820
+
19821
+ /**
19822
+ * 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.
19823
+ * @summary Reinstall website SSL
19824
+ * @param {string} websiteUid Agency Plan website UID
19825
+ * @param {string} domain Domain name
19826
+ * @param {*} [options] Override http request option.
19827
+ * @throws {RequiredError}
19828
+ * @memberof AgencyHostingSSLApi
19829
+ */
19830
+ public reinstallWebsiteSSLV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig) {
19831
+ return AgencyHostingSSLApiFp(this.configuration).reinstallWebsiteSSLV1(websiteUid, domain, options).then((request) => request(this.axios, this.basePath));
19832
+ }
19833
+
19834
+ /**
19835
+ * 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.
19836
+ * @summary Uninstall website SSL
19837
+ * @param {string} websiteUid Agency Plan website UID
19838
+ * @param {string} domain Domain name
19839
+ * @param {*} [options] Override http request option.
19840
+ * @throws {RequiredError}
19841
+ * @memberof AgencyHostingSSLApi
19842
+ */
19843
+ public uninstallWebsiteSSLV1(websiteUid: string, domain: string, options?: RawAxiosRequestConfig) {
19844
+ return AgencyHostingSSLApiFp(this.configuration).uninstallWebsiteSSLV1(websiteUid, domain, options).then((request) => request(this.axios, this.basePath));
19845
+ }
19846
+ }
19847
+
19848
+
19849
+
19390
19850
  /**
19391
19851
  * AgencyHostingWebsiteSetupsApi - axios parameter creator
19392
19852
  * @export
@@ -29531,6 +29991,52 @@ export const HostingDatabasesApiAxiosParamCreator = function (configuration?: Co
29531
29991
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
29532
29992
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
29533
29993
 
29994
+ return {
29995
+ url: toPathString(localVarUrlObj),
29996
+ options: localVarRequestOptions,
29997
+ };
29998
+ },
29999
+ /**
30000
+ * Creates a new MySQL database for the website and writes its connection details into the website\'s environment variables, then restarts the application. The platform generates the password (and the database name and user, unless supplied). The password is never returned; the application reads it from the environment. Written variables: `DB_HOST`, `DB_PORT`, `DB_NAME`, `DB_USER`, `DB_PASSWORD` and `DATABASE_URL` (`mysql://user:password@host:port/name`, user and password percent-encoded). Existing variables are kept. If the website already has any variable with one of these names the call fails with 422 and nothing is created; the `Replace Node.js environment variables` endpoint removes them. After this call the variables are ordinary environment variables: the `Replace Node.js environment variables` endpoint changes or removes them like any other. A restart is enough for apps that read environment variables at process start, such as Express or NestJS. Frameworks that bake variables into the build output (Next.js, `NEXT_PUBLIC_*`) see the new values only after a fresh build (`Start Node.js build` endpoint). A password in the request is ignored; the platform always generates it. The optional `name` and `user` are identifiers, not secrets.
30001
+ * @summary Setup website database
30002
+ * @param {string} username
30003
+ * @param {string} domain Domain name
30004
+ * @param {HostingV1DatabasesSetupDatabaseRequest} [hostingV1DatabasesSetupDatabaseRequest]
30005
+ * @param {*} [options] Override http request option.
30006
+ * @throws {RequiredError}
30007
+ */
30008
+ setupWebsiteDatabaseV1: async (username: string, domain: string, hostingV1DatabasesSetupDatabaseRequest?: HostingV1DatabasesSetupDatabaseRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
30009
+ // verify required parameter 'username' is not null or undefined
30010
+ assertParamExists('setupWebsiteDatabaseV1', 'username', username)
30011
+ // verify required parameter 'domain' is not null or undefined
30012
+ assertParamExists('setupWebsiteDatabaseV1', 'domain', domain)
30013
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/databases/setup`
30014
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
30015
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
30016
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
30017
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
30018
+ let baseOptions;
30019
+ if (configuration) {
30020
+ baseOptions = configuration.baseOptions;
30021
+ }
30022
+
30023
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
30024
+ const localVarHeaderParameter = {} as any;
30025
+ const localVarQueryParameter = {} as any;
30026
+
30027
+ // authentication apiToken required
30028
+ // http bearer authentication required
30029
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
30030
+
30031
+
30032
+
30033
+ localVarHeaderParameter['Content-Type'] = 'application/json';
30034
+
30035
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
30036
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
30037
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
30038
+ localVarRequestOptions.data = serializeDataIfNeeded(hostingV1DatabasesSetupDatabaseRequest, localVarRequestOptions, configuration)
30039
+
29534
30040
  return {
29535
30041
  url: toPathString(localVarUrlObj),
29536
30042
  options: localVarRequestOptions,
@@ -29670,6 +30176,20 @@ export const HostingDatabasesApiFp = function(configuration?: Configuration) {
29670
30176
  const localVarOperationServerBasePath = operationServerMap['HostingDatabasesApi.repairDatabaseV1']?.[0]?.url;
29671
30177
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
29672
30178
  },
30179
+ /**
30180
+ * Creates a new MySQL database for the website and writes its connection details into the website\'s environment variables, then restarts the application. The platform generates the password (and the database name and user, unless supplied). The password is never returned; the application reads it from the environment. Written variables: `DB_HOST`, `DB_PORT`, `DB_NAME`, `DB_USER`, `DB_PASSWORD` and `DATABASE_URL` (`mysql://user:password@host:port/name`, user and password percent-encoded). Existing variables are kept. If the website already has any variable with one of these names the call fails with 422 and nothing is created; the `Replace Node.js environment variables` endpoint removes them. After this call the variables are ordinary environment variables: the `Replace Node.js environment variables` endpoint changes or removes them like any other. A restart is enough for apps that read environment variables at process start, such as Express or NestJS. Frameworks that bake variables into the build output (Next.js, `NEXT_PUBLIC_*`) see the new values only after a fresh build (`Start Node.js build` endpoint). A password in the request is ignored; the platform always generates it. The optional `name` and `user` are identifiers, not secrets.
30181
+ * @summary Setup website database
30182
+ * @param {string} username
30183
+ * @param {string} domain Domain name
30184
+ * @param {HostingV1DatabasesSetupDatabaseRequest} [hostingV1DatabasesSetupDatabaseRequest]
30185
+ * @param {*} [options] Override http request option.
30186
+ * @throws {RequiredError}
30187
+ */
30188
+ async setupWebsiteDatabaseV1(username: string, domain: string, hostingV1DatabasesSetupDatabaseRequest?: HostingV1DatabasesSetupDatabaseRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1DatabasesWebsiteDatabaseResource>> {
30189
+ const localVarAxiosArgs = await localVarAxiosParamCreator.setupWebsiteDatabaseV1(username, domain, hostingV1DatabasesSetupDatabaseRequest, options);
30190
+ const localVarOperationServerBasePath = operationServerMap['HostingDatabasesApi.setupWebsiteDatabaseV1']?.[0]?.url;
30191
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
30192
+ },
29673
30193
  }
29674
30194
  };
29675
30195
 
@@ -29786,6 +30306,18 @@ export const HostingDatabasesApiFactory = function (configuration?: Configuratio
29786
30306
  repairDatabaseV1(username: string, name: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
29787
30307
  return localVarFp.repairDatabaseV1(username, name, options).then((request) => request(axios, basePath));
29788
30308
  },
30309
+ /**
30310
+ * Creates a new MySQL database for the website and writes its connection details into the website\'s environment variables, then restarts the application. The platform generates the password (and the database name and user, unless supplied). The password is never returned; the application reads it from the environment. Written variables: `DB_HOST`, `DB_PORT`, `DB_NAME`, `DB_USER`, `DB_PASSWORD` and `DATABASE_URL` (`mysql://user:password@host:port/name`, user and password percent-encoded). Existing variables are kept. If the website already has any variable with one of these names the call fails with 422 and nothing is created; the `Replace Node.js environment variables` endpoint removes them. After this call the variables are ordinary environment variables: the `Replace Node.js environment variables` endpoint changes or removes them like any other. A restart is enough for apps that read environment variables at process start, such as Express or NestJS. Frameworks that bake variables into the build output (Next.js, `NEXT_PUBLIC_*`) see the new values only after a fresh build (`Start Node.js build` endpoint). A password in the request is ignored; the platform always generates it. The optional `name` and `user` are identifiers, not secrets.
30311
+ * @summary Setup website database
30312
+ * @param {string} username
30313
+ * @param {string} domain Domain name
30314
+ * @param {HostingV1DatabasesSetupDatabaseRequest} [hostingV1DatabasesSetupDatabaseRequest]
30315
+ * @param {*} [options] Override http request option.
30316
+ * @throws {RequiredError}
30317
+ */
30318
+ setupWebsiteDatabaseV1(username: string, domain: string, hostingV1DatabasesSetupDatabaseRequest?: HostingV1DatabasesSetupDatabaseRequest, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1DatabasesWebsiteDatabaseResource> {
30319
+ return localVarFp.setupWebsiteDatabaseV1(username, domain, hostingV1DatabasesSetupDatabaseRequest, options).then((request) => request(axios, basePath));
30320
+ },
29789
30321
  };
29790
30322
  };
29791
30323
 
@@ -29919,6 +30451,20 @@ export class HostingDatabasesApi extends BaseAPI {
29919
30451
  public repairDatabaseV1(username: string, name: string, options?: RawAxiosRequestConfig) {
29920
30452
  return HostingDatabasesApiFp(this.configuration).repairDatabaseV1(username, name, options).then((request) => request(this.axios, this.basePath));
29921
30453
  }
30454
+
30455
+ /**
30456
+ * Creates a new MySQL database for the website and writes its connection details into the website\'s environment variables, then restarts the application. The platform generates the password (and the database name and user, unless supplied). The password is never returned; the application reads it from the environment. Written variables: `DB_HOST`, `DB_PORT`, `DB_NAME`, `DB_USER`, `DB_PASSWORD` and `DATABASE_URL` (`mysql://user:password@host:port/name`, user and password percent-encoded). Existing variables are kept. If the website already has any variable with one of these names the call fails with 422 and nothing is created; the `Replace Node.js environment variables` endpoint removes them. After this call the variables are ordinary environment variables: the `Replace Node.js environment variables` endpoint changes or removes them like any other. A restart is enough for apps that read environment variables at process start, such as Express or NestJS. Frameworks that bake variables into the build output (Next.js, `NEXT_PUBLIC_*`) see the new values only after a fresh build (`Start Node.js build` endpoint). A password in the request is ignored; the platform always generates it. The optional `name` and `user` are identifiers, not secrets.
30457
+ * @summary Setup website database
30458
+ * @param {string} username
30459
+ * @param {string} domain Domain name
30460
+ * @param {HostingV1DatabasesSetupDatabaseRequest} [hostingV1DatabasesSetupDatabaseRequest]
30461
+ * @param {*} [options] Override http request option.
30462
+ * @throws {RequiredError}
30463
+ * @memberof HostingDatabasesApi
30464
+ */
30465
+ public setupWebsiteDatabaseV1(username: string, domain: string, hostingV1DatabasesSetupDatabaseRequest?: HostingV1DatabasesSetupDatabaseRequest, options?: RawAxiosRequestConfig) {
30466
+ return HostingDatabasesApiFp(this.configuration).setupWebsiteDatabaseV1(username, domain, hostingV1DatabasesSetupDatabaseRequest, options).then((request) => request(this.axios, this.basePath));
30467
+ }
29922
30468
  }
29923
30469
 
29924
30470
 
package/base.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.53.1
6
+ * API Version: 1.54.1
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.53.1
6
+ * API Version: 1.54.1
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