hostinger-api-sdk 2.6.1 → 2.6.3
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 +556 -556
- package/base.ts +1 -1
- package/common.ts +14 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +11 -11
- package/dist/api.js +553 -553
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +7 -1
- package/dist/common.js +15 -2
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +11 -11
- package/dist/esm/api.js +554 -554
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +7 -1
- package/dist/esm/common.js +13 -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/HostingV1OnboardingsStartOnboardingRequest.md +1 -1
- package/docs/HostingWebsitesApi.md +1 -1
- package/docs/WordPressInstallationsApi.md +1 -1
- package/docs/WordPressV1InstallationsInstallWordPressRequest.md +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/esm/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.6.
|
|
4
|
+
* API Version: 2.6.2
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/base.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.6.
|
|
6
|
+
* API Version: 2.6.2
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.6.
|
|
4
|
+
* API Version: 2.6.2
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -20,6 +20,12 @@ export declare const DUMMY_BASE_URL = "https://example.com";
|
|
|
20
20
|
* @export
|
|
21
21
|
*/
|
|
22
22
|
export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Empty values and dot segments survive encoding and collapse or resolve away, which would change the endpoint.
|
|
25
|
+
* @throws {RequiredError}
|
|
26
|
+
* @export
|
|
27
|
+
*/
|
|
28
|
+
export declare const encodePathParam: (paramName: string, paramValue: unknown) => string;
|
|
23
29
|
/**
|
|
24
30
|
*
|
|
25
31
|
* @export
|
package/dist/esm/common.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.6.
|
|
6
|
+
* API Version: 2.6.2
|
|
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
|
|
@@ -33,6 +33,18 @@ export const assertParamExists = function (functionName, paramName, paramValue)
|
|
|
33
33
|
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* Empty values and dot segments survive encoding and collapse or resolve away, which would change the endpoint.
|
|
38
|
+
* @throws {RequiredError}
|
|
39
|
+
* @export
|
|
40
|
+
*/
|
|
41
|
+
export const encodePathParam = function (paramName, paramValue) {
|
|
42
|
+
const value = String(paramValue);
|
|
43
|
+
if (value === '' || value === '.' || value === '..') {
|
|
44
|
+
throw new RequiredError(paramName, `Invalid value for path parameter ${paramName}.`);
|
|
45
|
+
}
|
|
46
|
+
return encodeURIComponent(value);
|
|
47
|
+
};
|
|
36
48
|
/**
|
|
37
49
|
*
|
|
38
50
|
* @export
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.6.
|
|
4
|
+
* API Version: 2.6.2
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.6.
|
|
6
|
+
* API Version: 2.6.2
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -13,7 +13,7 @@ export class Configuration {
|
|
|
13
13
|
var _a;
|
|
14
14
|
this.accessToken = param.accessToken;
|
|
15
15
|
this.basePath = param.basePath;
|
|
16
|
-
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/2.6.
|
|
16
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/2.6.3" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
17
17
|
this.formDataCtor = param.formDataCtor;
|
|
18
18
|
}
|
|
19
19
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.6.
|
|
4
|
+
* API Version: 2.6.2
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.6.
|
|
6
|
+
* API Version: 2.6.2
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.6.
|
|
4
|
+
* API Version: 2.6.2
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 2.6.
|
|
7
|
+
* API Version: 2.6.2
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -7,7 +7,7 @@ Website type, domain and WordPress settings for a new website setup
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
9
|
**type** | **string** | Website type. Omit or `null` for an empty website. `wordpress` installs WordPress in the website root and requires `wordpress`. The headless types (`headless_empty`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory with generated credentials. `headless_empty` installs nothing, so WordPress can be added later through `POST /api/hosting/v1/accounts/{username}/wordpress/installations` (`wordpress_installations_install`) with `type: headless`. | [optional] [default to undefined]
|
|
10
|
-
**domain** | **string** | Customer-owned domain
|
|
10
|
+
**domain** | **string** | Customer-owned domain. Omit or `null` to set the website up on a generated temporary free subdomain. Cannot start with \"www.\" and can have at most one subdomain level, e.g. `blog.example.com`. A free subdomain generated through `POST /api/hosting/v1/domains/free-subdomains` in the last 24 hours is also accepted. | [optional] [default to undefined]
|
|
11
11
|
**datacenter_code** | **string** | Datacenter for the hosting account when the order does not have one yet. Omit to use the order\'s default datacenter. Ignored when the order already has a hosting account. List available datacenters to find valid codes. | [optional] [default to undefined]
|
|
12
12
|
**wordpress** | [**HostingV1OnboardingsStartOnboardingRequestWordpress**](HostingV1OnboardingsStartOnboardingRequestWordpress.md) | | [optional] [default to undefined]
|
|
13
13
|
|
|
@@ -316,7 +316,7 @@ const { status, data } = await apiInstance.listWebsitesV1(
|
|
|
316
316
|
# **startWebsiteSetupV1**
|
|
317
317
|
> HostingV1OnboardingsOnboardingResource startWebsiteSetupV1(hostingV1OnboardingsStartOnboardingRequest)
|
|
318
318
|
|
|
319
|
-
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 (`hosting_websites_list-setups`) 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_empty`, `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. `headless_empty` installs nothing: WordPress can be added later through `POST /api/hosting/v1/accounts/{username}/wordpress/installations` (`wordpress_installations_install`) with `type: headless`. Omit `domain` to set the website up on a generated temporary free subdomain
|
|
319
|
+
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 (`hosting_websites_list-setups`) 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_empty`, `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. `headless_empty` installs nothing: WordPress can be added later through `POST /api/hosting/v1/accounts/{username}/wordpress/installations` (`wordpress_installations_install`) with `type: headless`. Omit `domain` to set the website up on a generated temporary free subdomain; the created setup returns it as `domain`. REST clients that need to know the free subdomain before the call, so a timed-out call can be looked up and retried on the same domain, can generate one through `POST /api/hosting/v1/domains/free-subdomains` and send it as `domain`. It is accepted for 24 hours, only from the client that generated it. When the order has no hosting account yet, the setup creates one first, in the datacenter given by `datacenter_code` or the order\'s default datacenter when it is omitted. 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.
|
|
320
320
|
|
|
321
321
|
### Example
|
|
322
322
|
|
|
@@ -307,7 +307,7 @@ const { status, data } = await apiInstance.importWordPressWebsiteV1(
|
|
|
307
307
|
# **installWordPressV1**
|
|
308
308
|
> CommonSuccessEmptyResource installWordPressV1(wordPressV1InstallationsInstallWordPressRequest)
|
|
309
309
|
|
|
310
|
-
Install WordPress on an existing website. The website must already exist before calling this endpoint. To create a new website first, use POST /api/hosting/v1/orders/{order_id}/onboardings (`
|
|
310
|
+
Install WordPress on an existing website. The website must already exist before calling this endpoint. To create a new website first, use POST /api/hosting/v1/orders/{order_id}/onboardings (`hosting_websites_create`) and poll GET /api/hosting/v1/onboardings (`hosting_websites_list-setups`) with the `domain` filter until its `status` is `completed`. Send `type: headless` to turn a headless website (for example one created by `hosting_websites_create` with `type: headless_empty`) into a headless WordPress website: WordPress is installed into the `cms` directory with the Hostinger headless MU plugin and the website is marked as a headless WordPress website. `directory` is not allowed with it. The target website must already be headless: the headless install rewrites the root `.htaccess`, so on any other website the request is rejected with 422. Call GET /api/hosting/v1/wordpress/installations (`wordpress_installations_list`) filtered by username and domain before proceeding to check whether WordPress is already installed on the target domain/path. If WordPress already exists and `overwrite` is false (the default), the async job will fail. This operation is asynchronous: a successful response only means the install job has been queued, not that WordPress is ready. Installation typically takes 1-2 minutes. Poll GET /api/hosting/v1/wordpress/installations (`wordpress_installations_list`) filtered by username and domain to track progress. When the installation appears in that list, WordPress is ready. Returns 422 when the account already uses all the databases its plan allows, unless `database.name` is an existing database on the account.
|
|
311
311
|
|
|
312
312
|
### Example
|
|
313
313
|
|
|
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
|
|
|
8
8
|
**domain** | **string** | Domain of the existing website where WordPress will be installed | [default to undefined]
|
|
9
9
|
**site_title** | **string** | Title of the WordPress site | [default to undefined]
|
|
10
10
|
**language** | **string** | WordPress locale. Defaults to en_US when omitted. | [optional] [default to undefined]
|
|
11
|
-
**type** | **string** | Installation kind; `default` when omitted. `headless` installs WordPress into the `cms` directory with the Hostinger headless MU plugin and marks the website as a headless WordPress website. Accepted only for a website that is already headless, e.g. one created by `POST /api/hosting/v1/orders/{order_id}/onboardings` (`
|
|
11
|
+
**type** | **string** | Installation kind; `default` when omitted. `headless` installs WordPress into the `cms` directory with the Hostinger headless MU plugin and marks the website as a headless WordPress website. Accepted only for a website that is already headless, e.g. one created by `POST /api/hosting/v1/orders/{order_id}/onboardings` (`hosting_websites_create`) with `type: headless_empty`; any other website is rejected with 422. | [optional] [default to undefined]
|
|
12
12
|
**directory** | **string** | Installation subdirectory relative to the document root; omit for the root. Not allowed with `type: headless`, which always installs into `cms`. | [optional] [default to undefined]
|
|
13
13
|
**overwrite** | **boolean** | When false (default), does not replace an existing installation. If WordPress is already installed on the domain/path, the async install job fails unless true. | [optional] [default to undefined]
|
|
14
14
|
**auto_updates** | **string** | WordPress core auto-update policy | [optional] [default to undefined]
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.6.
|
|
6
|
+
* API Version: 2.6.2
|
|
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
|