@hostinger/sdk 1.58.3 → 1.59.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 +200 -12
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +142 -9
- package/dist/api.js +119 -23
- 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 +142 -9
- package/dist/esm/api.js +108 -12
- 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/HostingV1OnboardingsOnboardingResource.md +2 -0
- package/docs/HostingV1OnboardingsStartOnboardingRequest.md +25 -0
- package/docs/HostingV1OnboardingsStartOnboardingRequestWordpress.md +25 -0
- package/docs/HostingV1OnboardingsStartOnboardingRequestWordpressAdmin.md +25 -0
- package/docs/HostingWebsitesApi.md +68 -1
- 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.59.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.59.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.59.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
|
|
@@ -8894,6 +8894,12 @@ export interface HostingV1OnboardingsOnboardingResource {
|
|
|
8894
8894
|
* @memberof HostingV1OnboardingsOnboardingResource
|
|
8895
8895
|
*/
|
|
8896
8896
|
'username': string;
|
|
8897
|
+
/**
|
|
8898
|
+
* Website type requested for the setup: `wordpress`, `headless_wordpress`, `headless_ecommerce` or `headless_pocketbase`. `null` for an empty website. Setups started outside this API may report other legacy types.
|
|
8899
|
+
* @type {string}
|
|
8900
|
+
* @memberof HostingV1OnboardingsOnboardingResource
|
|
8901
|
+
*/
|
|
8902
|
+
'type': string | null;
|
|
8897
8903
|
/**
|
|
8898
8904
|
* `running` while the website is still being set up, `completed` once the setup has finished, `failed` when it stopped before finishing or has not reported progress for over an hour.
|
|
8899
8905
|
* @type {string}
|
|
@@ -8922,6 +8928,91 @@ export const HostingV1OnboardingsOnboardingResourceStatusEnum = {
|
|
|
8922
8928
|
|
|
8923
8929
|
export type HostingV1OnboardingsOnboardingResourceStatusEnum = typeof HostingV1OnboardingsOnboardingResourceStatusEnum[keyof typeof HostingV1OnboardingsOnboardingResourceStatusEnum];
|
|
8924
8930
|
|
|
8931
|
+
/**
|
|
8932
|
+
* Website type, domain and WordPress settings for a new website setup
|
|
8933
|
+
* @export
|
|
8934
|
+
* @interface HostingV1OnboardingsStartOnboardingRequest
|
|
8935
|
+
*/
|
|
8936
|
+
export interface HostingV1OnboardingsStartOnboardingRequest {
|
|
8937
|
+
/**
|
|
8938
|
+
* Website type. Omit or `null` for an empty website. `wordpress` installs WordPress in the website root and requires `wordpress`. The headless types (`headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory with generated credentials.
|
|
8939
|
+
* @type {string}
|
|
8940
|
+
* @memberof HostingV1OnboardingsStartOnboardingRequest
|
|
8941
|
+
*/
|
|
8942
|
+
'type': HostingV1OnboardingsStartOnboardingRequestTypeEnum | null;
|
|
8943
|
+
/**
|
|
8944
|
+
* Customer-owned domain. Cannot start with \"www.\". Omit or `null` to set the website up on a generated temporary free subdomain.
|
|
8945
|
+
* @type {string}
|
|
8946
|
+
* @memberof HostingV1OnboardingsStartOnboardingRequest
|
|
8947
|
+
*/
|
|
8948
|
+
'domain': string | null;
|
|
8949
|
+
/**
|
|
8950
|
+
*
|
|
8951
|
+
* @type {HostingV1OnboardingsStartOnboardingRequestWordpress}
|
|
8952
|
+
* @memberof HostingV1OnboardingsStartOnboardingRequest
|
|
8953
|
+
*/
|
|
8954
|
+
'wordpress': HostingV1OnboardingsStartOnboardingRequestWordpress | null;
|
|
8955
|
+
}
|
|
8956
|
+
|
|
8957
|
+
export const HostingV1OnboardingsStartOnboardingRequestTypeEnum = {
|
|
8958
|
+
Wordpress: 'wordpress',
|
|
8959
|
+
HeadlessWordpress: 'headless_wordpress',
|
|
8960
|
+
HeadlessEcommerce: 'headless_ecommerce',
|
|
8961
|
+
HeadlessPocketbase: 'headless_pocketbase'
|
|
8962
|
+
} as const;
|
|
8963
|
+
|
|
8964
|
+
export type HostingV1OnboardingsStartOnboardingRequestTypeEnum = typeof HostingV1OnboardingsStartOnboardingRequestTypeEnum[keyof typeof HostingV1OnboardingsStartOnboardingRequestTypeEnum];
|
|
8965
|
+
|
|
8966
|
+
/**
|
|
8967
|
+
* WordPress install settings. Required when `type` is `wordpress`, not allowed otherwise. The site title is the domain.
|
|
8968
|
+
* @export
|
|
8969
|
+
* @interface HostingV1OnboardingsStartOnboardingRequestWordpress
|
|
8970
|
+
*/
|
|
8971
|
+
export interface HostingV1OnboardingsStartOnboardingRequestWordpress {
|
|
8972
|
+
/**
|
|
8973
|
+
* WordPress locale, for example `en_US` or `lt_LT`. Defaults to `en_US` when omitted.
|
|
8974
|
+
* @type {string}
|
|
8975
|
+
* @memberof HostingV1OnboardingsStartOnboardingRequestWordpress
|
|
8976
|
+
*/
|
|
8977
|
+
'language': string | null;
|
|
8978
|
+
/**
|
|
8979
|
+
* When `true`, installs the Hostinger AI theme (`hostinger-ai-theme`). Defaults to `false` when omitted.
|
|
8980
|
+
* @type {boolean}
|
|
8981
|
+
* @memberof HostingV1OnboardingsStartOnboardingRequestWordpress
|
|
8982
|
+
*/
|
|
8983
|
+
'is_ai_builder': boolean | null;
|
|
8984
|
+
/**
|
|
8985
|
+
*
|
|
8986
|
+
* @type {HostingV1OnboardingsStartOnboardingRequestWordpressAdmin}
|
|
8987
|
+
* @memberof HostingV1OnboardingsStartOnboardingRequestWordpress
|
|
8988
|
+
*/
|
|
8989
|
+
'admin': HostingV1OnboardingsStartOnboardingRequestWordpressAdmin;
|
|
8990
|
+
}
|
|
8991
|
+
/**
|
|
8992
|
+
* WordPress administrator account
|
|
8993
|
+
* @export
|
|
8994
|
+
* @interface HostingV1OnboardingsStartOnboardingRequestWordpressAdmin
|
|
8995
|
+
*/
|
|
8996
|
+
export interface HostingV1OnboardingsStartOnboardingRequestWordpressAdmin {
|
|
8997
|
+
/**
|
|
8998
|
+
* WordPress admin username (letters, numbers, and underscore)
|
|
8999
|
+
* @type {string}
|
|
9000
|
+
* @memberof HostingV1OnboardingsStartOnboardingRequestWordpressAdmin
|
|
9001
|
+
*/
|
|
9002
|
+
'user': string;
|
|
9003
|
+
/**
|
|
9004
|
+
* WordPress admin password (8-50 characters, mixed case, a digit, and not compromised)
|
|
9005
|
+
* @type {string}
|
|
9006
|
+
* @memberof HostingV1OnboardingsStartOnboardingRequestWordpressAdmin
|
|
9007
|
+
*/
|
|
9008
|
+
'password': string;
|
|
9009
|
+
/**
|
|
9010
|
+
* WordPress admin email address
|
|
9011
|
+
* @type {string}
|
|
9012
|
+
* @memberof HostingV1OnboardingsStartOnboardingRequestWordpressAdmin
|
|
9013
|
+
*/
|
|
9014
|
+
'email': string;
|
|
9015
|
+
}
|
|
8925
9016
|
/**
|
|
8926
9017
|
*
|
|
8927
9018
|
* @export
|
|
@@ -35585,13 +35676,15 @@ export const HostingWebsitesApiAxiosParamCreator = function (configuration?: Con
|
|
|
35585
35676
|
};
|
|
35586
35677
|
},
|
|
35587
35678
|
/**
|
|
35588
|
-
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Meant for polling right after creating a website: the website shows up in the websites list before its server-side setup has finished, and while the setup is `running` endpoints that operate on that website may respond with `404` or `409`. Poll this endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. `failed` means the setup stopped before finishing or has not reported progress for over an hour. Setups older than 24 hours are not listed.
|
|
35679
|
+
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Narrow the list with the `order_id`, `subscription_id` or `domain` filters. Meant for polling right after creating a website or starting a website setup: the website shows up in the websites list before its server-side setup has finished, and while the setup is `running` endpoints that operate on that website may respond with `404` or `409`. Poll this endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. `failed` means the setup stopped before finishing or has not reported progress for over an hour. Setups older than 24 hours are not listed. `type` is the website type the setup was started with (`wordpress`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`), or `null` for an empty website.
|
|
35589
35680
|
* @summary List website setups
|
|
35681
|
+
* @param {number | null} [orderId] Order ID
|
|
35682
|
+
* @param {string | null} [subscriptionId] Filter by hosting order subscription ID
|
|
35590
35683
|
* @param {string | null} [domain] Filter by domain name (exact match)
|
|
35591
35684
|
* @param {*} [options] Override http request option.
|
|
35592
35685
|
* @throws {RequiredError}
|
|
35593
35686
|
*/
|
|
35594
|
-
listWebsiteSetupsV1: async (domain?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
35687
|
+
listWebsiteSetupsV1: async (orderId?: number | null, subscriptionId?: string | null, domain?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
35595
35688
|
const localVarPath = `/api/hosting/v1/onboardings`;
|
|
35596
35689
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
35597
35690
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -35608,6 +35701,14 @@ export const HostingWebsitesApiAxiosParamCreator = function (configuration?: Con
|
|
|
35608
35701
|
// http bearer authentication required
|
|
35609
35702
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
35610
35703
|
|
|
35704
|
+
if (orderId !== undefined) {
|
|
35705
|
+
localVarQueryParameter['order_id'] = orderId;
|
|
35706
|
+
}
|
|
35707
|
+
|
|
35708
|
+
if (subscriptionId !== undefined) {
|
|
35709
|
+
localVarQueryParameter['subscription_id'] = subscriptionId;
|
|
35710
|
+
}
|
|
35711
|
+
|
|
35611
35712
|
if (domain !== undefined) {
|
|
35612
35713
|
localVarQueryParameter['domain'] = domain;
|
|
35613
35714
|
}
|
|
@@ -35687,6 +35788,50 @@ export const HostingWebsitesApiAxiosParamCreator = function (configuration?: Con
|
|
|
35687
35788
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
35688
35789
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
35689
35790
|
|
|
35791
|
+
return {
|
|
35792
|
+
url: toPathString(localVarUrlObj),
|
|
35793
|
+
options: localVarRequestOptions,
|
|
35794
|
+
};
|
|
35795
|
+
},
|
|
35796
|
+
/**
|
|
35797
|
+
* Starts a website setup on a Web or Cloud hosting order and returns the created setup right away; the website itself is provisioned asynchronously. Poll the list website setups endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. Omit `type` for an empty website. `type: wordpress` installs WordPress in the website root with the admin user, email and password from `wordpress`, the domain as the site title, and `en_US` when `wordpress.language` is omitted. The headless types (`headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory of the website root with generated credentials. Omit `domain` to set the website up on a generated temporary free subdomain. The order must already have a hosting account: to create the first website on a new hosting plan use the create website endpoint, which takes the `datacenter_code`. Returns 404 when the order does not exist or is not accessible to the authenticated client, and 409 with a `Retry-After` header while a setup for the same domain is still running.
|
|
35798
|
+
* @summary Start website setup
|
|
35799
|
+
* @param {number} orderId Hosting order ID. List orders to find available IDs.
|
|
35800
|
+
* @param {HostingV1OnboardingsStartOnboardingRequest} hostingV1OnboardingsStartOnboardingRequest
|
|
35801
|
+
* @param {*} [options] Override http request option.
|
|
35802
|
+
* @throws {RequiredError}
|
|
35803
|
+
*/
|
|
35804
|
+
startWebsiteSetupV1: async (orderId: number, hostingV1OnboardingsStartOnboardingRequest: HostingV1OnboardingsStartOnboardingRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
35805
|
+
// verify required parameter 'orderId' is not null or undefined
|
|
35806
|
+
assertParamExists('startWebsiteSetupV1', 'orderId', orderId)
|
|
35807
|
+
// verify required parameter 'hostingV1OnboardingsStartOnboardingRequest' is not null or undefined
|
|
35808
|
+
assertParamExists('startWebsiteSetupV1', 'hostingV1OnboardingsStartOnboardingRequest', hostingV1OnboardingsStartOnboardingRequest)
|
|
35809
|
+
const localVarPath = `/api/hosting/v1/orders/{order_id}/onboardings`
|
|
35810
|
+
.replace(`{${"order_id"}}`, encodeURIComponent(String(orderId)));
|
|
35811
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
35812
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
35813
|
+
let baseOptions;
|
|
35814
|
+
if (configuration) {
|
|
35815
|
+
baseOptions = configuration.baseOptions;
|
|
35816
|
+
}
|
|
35817
|
+
|
|
35818
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
35819
|
+
const localVarHeaderParameter = {} as any;
|
|
35820
|
+
const localVarQueryParameter = {} as any;
|
|
35821
|
+
|
|
35822
|
+
// authentication apiToken required
|
|
35823
|
+
// http bearer authentication required
|
|
35824
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
35825
|
+
|
|
35826
|
+
|
|
35827
|
+
|
|
35828
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
35829
|
+
|
|
35830
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
35831
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
35832
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
35833
|
+
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1OnboardingsStartOnboardingRequest, localVarRequestOptions, configuration)
|
|
35834
|
+
|
|
35690
35835
|
return {
|
|
35691
35836
|
url: toPathString(localVarUrlObj),
|
|
35692
35837
|
options: localVarRequestOptions,
|
|
@@ -35741,14 +35886,16 @@ export const HostingWebsitesApiFp = function(configuration?: Configuration) {
|
|
|
35741
35886
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
35742
35887
|
},
|
|
35743
35888
|
/**
|
|
35744
|
-
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Meant for polling right after creating a website: the website shows up in the websites list before its server-side setup has finished, and while the setup is `running` endpoints that operate on that website may respond with `404` or `409`. Poll this endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. `failed` means the setup stopped before finishing or has not reported progress for over an hour. Setups older than 24 hours are not listed.
|
|
35889
|
+
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Narrow the list with the `order_id`, `subscription_id` or `domain` filters. Meant for polling right after creating a website or starting a website setup: the website shows up in the websites list before its server-side setup has finished, and while the setup is `running` endpoints that operate on that website may respond with `404` or `409`. Poll this endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. `failed` means the setup stopped before finishing or has not reported progress for over an hour. Setups older than 24 hours are not listed. `type` is the website type the setup was started with (`wordpress`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`), or `null` for an empty website.
|
|
35745
35890
|
* @summary List website setups
|
|
35891
|
+
* @param {number | null} [orderId] Order ID
|
|
35892
|
+
* @param {string | null} [subscriptionId] Filter by hosting order subscription ID
|
|
35746
35893
|
* @param {string | null} [domain] Filter by domain name (exact match)
|
|
35747
35894
|
* @param {*} [options] Override http request option.
|
|
35748
35895
|
* @throws {RequiredError}
|
|
35749
35896
|
*/
|
|
35750
|
-
async listWebsiteSetupsV1(domain?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<HostingV1OnboardingsOnboardingResource>>> {
|
|
35751
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listWebsiteSetupsV1(domain, options);
|
|
35897
|
+
async listWebsiteSetupsV1(orderId?: number | null, subscriptionId?: string | null, domain?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<HostingV1OnboardingsOnboardingResource>>> {
|
|
35898
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listWebsiteSetupsV1(orderId, subscriptionId, domain, options);
|
|
35752
35899
|
const localVarOperationServerBasePath = operationServerMap['HostingWebsitesApi.listWebsiteSetupsV1']?.[0]?.url;
|
|
35753
35900
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
35754
35901
|
},
|
|
@@ -35770,6 +35917,19 @@ export const HostingWebsitesApiFp = function(configuration?: Configuration) {
|
|
|
35770
35917
|
const localVarOperationServerBasePath = operationServerMap['HostingWebsitesApi.listWebsitesV1']?.[0]?.url;
|
|
35771
35918
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
35772
35919
|
},
|
|
35920
|
+
/**
|
|
35921
|
+
* Starts a website setup on a Web or Cloud hosting order and returns the created setup right away; the website itself is provisioned asynchronously. Poll the list website setups endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. Omit `type` for an empty website. `type: wordpress` installs WordPress in the website root with the admin user, email and password from `wordpress`, the domain as the site title, and `en_US` when `wordpress.language` is omitted. The headless types (`headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory of the website root with generated credentials. Omit `domain` to set the website up on a generated temporary free subdomain. The order must already have a hosting account: to create the first website on a new hosting plan use the create website endpoint, which takes the `datacenter_code`. Returns 404 when the order does not exist or is not accessible to the authenticated client, and 409 with a `Retry-After` header while a setup for the same domain is still running.
|
|
35922
|
+
* @summary Start website setup
|
|
35923
|
+
* @param {number} orderId Hosting order ID. List orders to find available IDs.
|
|
35924
|
+
* @param {HostingV1OnboardingsStartOnboardingRequest} hostingV1OnboardingsStartOnboardingRequest
|
|
35925
|
+
* @param {*} [options] Override http request option.
|
|
35926
|
+
* @throws {RequiredError}
|
|
35927
|
+
*/
|
|
35928
|
+
async startWebsiteSetupV1(orderId: number, hostingV1OnboardingsStartOnboardingRequest: HostingV1OnboardingsStartOnboardingRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1OnboardingsOnboardingResource>> {
|
|
35929
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.startWebsiteSetupV1(orderId, hostingV1OnboardingsStartOnboardingRequest, options);
|
|
35930
|
+
const localVarOperationServerBasePath = operationServerMap['HostingWebsitesApi.startWebsiteSetupV1']?.[0]?.url;
|
|
35931
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
35932
|
+
},
|
|
35773
35933
|
}
|
|
35774
35934
|
};
|
|
35775
35935
|
|
|
@@ -35813,14 +35973,16 @@ export const HostingWebsitesApiFactory = function (configuration?: Configuration
|
|
|
35813
35973
|
return localVarFp.deployStaticSiteArchiveV1(username, domain, hostingV1WebsitesDeployArchiveRequest, options).then((request) => request(axios, basePath));
|
|
35814
35974
|
},
|
|
35815
35975
|
/**
|
|
35816
|
-
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Meant for polling right after creating a website: the website shows up in the websites list before its server-side setup has finished, and while the setup is `running` endpoints that operate on that website may respond with `404` or `409`. Poll this endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. `failed` means the setup stopped before finishing or has not reported progress for over an hour. Setups older than 24 hours are not listed.
|
|
35976
|
+
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Narrow the list with the `order_id`, `subscription_id` or `domain` filters. Meant for polling right after creating a website or starting a website setup: the website shows up in the websites list before its server-side setup has finished, and while the setup is `running` endpoints that operate on that website may respond with `404` or `409`. Poll this endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. `failed` means the setup stopped before finishing or has not reported progress for over an hour. Setups older than 24 hours are not listed. `type` is the website type the setup was started with (`wordpress`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`), or `null` for an empty website.
|
|
35817
35977
|
* @summary List website setups
|
|
35978
|
+
* @param {number | null} [orderId] Order ID
|
|
35979
|
+
* @param {string | null} [subscriptionId] Filter by hosting order subscription ID
|
|
35818
35980
|
* @param {string | null} [domain] Filter by domain name (exact match)
|
|
35819
35981
|
* @param {*} [options] Override http request option.
|
|
35820
35982
|
* @throws {RequiredError}
|
|
35821
35983
|
*/
|
|
35822
|
-
listWebsiteSetupsV1(domain?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<Array<HostingV1OnboardingsOnboardingResource>> {
|
|
35823
|
-
return localVarFp.listWebsiteSetupsV1(domain, options).then((request) => request(axios, basePath));
|
|
35984
|
+
listWebsiteSetupsV1(orderId?: number | null, subscriptionId?: string | null, domain?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<Array<HostingV1OnboardingsOnboardingResource>> {
|
|
35985
|
+
return localVarFp.listWebsiteSetupsV1(orderId, subscriptionId, domain, options).then((request) => request(axios, basePath));
|
|
35824
35986
|
},
|
|
35825
35987
|
/**
|
|
35826
35988
|
* Retrieve a paginated list of websites (CloudLinux, Builder, and Horizons) accessible to the authenticated client. This endpoint returns websites from your hosting accounts as well as websites from other client hosting accounts that have shared access with you. Each website includes a `website_type` field describing the type of website detected on the underlying platform (`wordpress`, `builder`, `horizons`, `nodejs`, or `other`). Some fields, such as `vhost_type`, `username`, and `root_directory`, only apply to CloudLinux websites and are null for other platforms. Use `website_types` to list only websites of a given detected type, e.g. only WordPress websites (`website_types=wordpress`) or only Node.js websites (`website_types=nodejs`). Combine with the other available query parameters to filter by username, order ID, enabled status, or domain name for more targeted results. A website appears in this list before its server-side setup has finished, and `is_enabled` reflects suspension, not readiness. To know when a newly created website is ready for file, deploy or database operations, poll the list website setups endpoint instead.
|
|
@@ -35838,6 +36000,17 @@ export const HostingWebsitesApiFactory = function (configuration?: Configuration
|
|
|
35838
36000
|
listWebsitesV1(page?: number, perPage?: number, username?: string | null, orderId?: number | null, isEnabled?: boolean | null, domain?: string | null, websiteTypes?: Array<ListWebsitesV1WebsiteTypesEnum>, options?: RawAxiosRequestConfig): AxiosPromise<HostingListWebsitesV1200Response> {
|
|
35839
36001
|
return localVarFp.listWebsitesV1(page, perPage, username, orderId, isEnabled, domain, websiteTypes, options).then((request) => request(axios, basePath));
|
|
35840
36002
|
},
|
|
36003
|
+
/**
|
|
36004
|
+
* Starts a website setup on a Web or Cloud hosting order and returns the created setup right away; the website itself is provisioned asynchronously. Poll the list website setups endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. Omit `type` for an empty website. `type: wordpress` installs WordPress in the website root with the admin user, email and password from `wordpress`, the domain as the site title, and `en_US` when `wordpress.language` is omitted. The headless types (`headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory of the website root with generated credentials. Omit `domain` to set the website up on a generated temporary free subdomain. The order must already have a hosting account: to create the first website on a new hosting plan use the create website endpoint, which takes the `datacenter_code`. Returns 404 when the order does not exist or is not accessible to the authenticated client, and 409 with a `Retry-After` header while a setup for the same domain is still running.
|
|
36005
|
+
* @summary Start website setup
|
|
36006
|
+
* @param {number} orderId Hosting order ID. List orders to find available IDs.
|
|
36007
|
+
* @param {HostingV1OnboardingsStartOnboardingRequest} hostingV1OnboardingsStartOnboardingRequest
|
|
36008
|
+
* @param {*} [options] Override http request option.
|
|
36009
|
+
* @throws {RequiredError}
|
|
36010
|
+
*/
|
|
36011
|
+
startWebsiteSetupV1(orderId: number, hostingV1OnboardingsStartOnboardingRequest: HostingV1OnboardingsStartOnboardingRequest, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1OnboardingsOnboardingResource> {
|
|
36012
|
+
return localVarFp.startWebsiteSetupV1(orderId, hostingV1OnboardingsStartOnboardingRequest, options).then((request) => request(axios, basePath));
|
|
36013
|
+
},
|
|
35841
36014
|
};
|
|
35842
36015
|
};
|
|
35843
36016
|
|
|
@@ -35887,15 +36060,17 @@ export class HostingWebsitesApi extends BaseAPI {
|
|
|
35887
36060
|
}
|
|
35888
36061
|
|
|
35889
36062
|
/**
|
|
35890
|
-
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Meant for polling right after creating a website: the website shows up in the websites list before its server-side setup has finished, and while the setup is `running` endpoints that operate on that website may respond with `404` or `409`. Poll this endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. `failed` means the setup stopped before finishing or has not reported progress for over an hour. Setups older than 24 hours are not listed.
|
|
36063
|
+
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Narrow the list with the `order_id`, `subscription_id` or `domain` filters. Meant for polling right after creating a website or starting a website setup: the website shows up in the websites list before its server-side setup has finished, and while the setup is `running` endpoints that operate on that website may respond with `404` or `409`. Poll this endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. `failed` means the setup stopped before finishing or has not reported progress for over an hour. Setups older than 24 hours are not listed. `type` is the website type the setup was started with (`wordpress`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`), or `null` for an empty website.
|
|
35891
36064
|
* @summary List website setups
|
|
36065
|
+
* @param {number | null} [orderId] Order ID
|
|
36066
|
+
* @param {string | null} [subscriptionId] Filter by hosting order subscription ID
|
|
35892
36067
|
* @param {string | null} [domain] Filter by domain name (exact match)
|
|
35893
36068
|
* @param {*} [options] Override http request option.
|
|
35894
36069
|
* @throws {RequiredError}
|
|
35895
36070
|
* @memberof HostingWebsitesApi
|
|
35896
36071
|
*/
|
|
35897
|
-
public listWebsiteSetupsV1(domain?: string | null, options?: RawAxiosRequestConfig) {
|
|
35898
|
-
return HostingWebsitesApiFp(this.configuration).listWebsiteSetupsV1(domain, options).then((request) => request(this.axios, this.basePath));
|
|
36072
|
+
public listWebsiteSetupsV1(orderId?: number | null, subscriptionId?: string | null, domain?: string | null, options?: RawAxiosRequestConfig) {
|
|
36073
|
+
return HostingWebsitesApiFp(this.configuration).listWebsiteSetupsV1(orderId, subscriptionId, domain, options).then((request) => request(this.axios, this.basePath));
|
|
35899
36074
|
}
|
|
35900
36075
|
|
|
35901
36076
|
/**
|
|
@@ -35915,6 +36090,19 @@ export class HostingWebsitesApi extends BaseAPI {
|
|
|
35915
36090
|
public listWebsitesV1(page?: number, perPage?: number, username?: string | null, orderId?: number | null, isEnabled?: boolean | null, domain?: string | null, websiteTypes?: Array<ListWebsitesV1WebsiteTypesEnum>, options?: RawAxiosRequestConfig) {
|
|
35916
36091
|
return HostingWebsitesApiFp(this.configuration).listWebsitesV1(page, perPage, username, orderId, isEnabled, domain, websiteTypes, options).then((request) => request(this.axios, this.basePath));
|
|
35917
36092
|
}
|
|
36093
|
+
|
|
36094
|
+
/**
|
|
36095
|
+
* Starts a website setup on a Web or Cloud hosting order and returns the created setup right away; the website itself is provisioned asynchronously. Poll the list website setups endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. Omit `type` for an empty website. `type: wordpress` installs WordPress in the website root with the admin user, email and password from `wordpress`, the domain as the site title, and `en_US` when `wordpress.language` is omitted. The headless types (`headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory of the website root with generated credentials. Omit `domain` to set the website up on a generated temporary free subdomain. The order must already have a hosting account: to create the first website on a new hosting plan use the create website endpoint, which takes the `datacenter_code`. Returns 404 when the order does not exist or is not accessible to the authenticated client, and 409 with a `Retry-After` header while a setup for the same domain is still running.
|
|
36096
|
+
* @summary Start website setup
|
|
36097
|
+
* @param {number} orderId Hosting order ID. List orders to find available IDs.
|
|
36098
|
+
* @param {HostingV1OnboardingsStartOnboardingRequest} hostingV1OnboardingsStartOnboardingRequest
|
|
36099
|
+
* @param {*} [options] Override http request option.
|
|
36100
|
+
* @throws {RequiredError}
|
|
36101
|
+
* @memberof HostingWebsitesApi
|
|
36102
|
+
*/
|
|
36103
|
+
public startWebsiteSetupV1(orderId: number, hostingV1OnboardingsStartOnboardingRequest: HostingV1OnboardingsStartOnboardingRequest, options?: RawAxiosRequestConfig) {
|
|
36104
|
+
return HostingWebsitesApiFp(this.configuration).startWebsiteSetupV1(orderId, hostingV1OnboardingsStartOnboardingRequest, options).then((request) => request(this.axios, this.basePath));
|
|
36105
|
+
}
|
|
35918
36106
|
}
|
|
35919
36107
|
|
|
35920
36108
|
/**
|
package/base.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.59.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.59.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.59.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.59.0",
|
|
52
52
|
...param.baseOptions?.headers,
|
|
53
53
|
},
|
|
54
54
|
};
|