hostinger-api-sdk 1.38.0 → 1.40.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 +1536 -32
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +1086 -30
- package/dist/api.js +902 -44
- 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 +1086 -30
- package/dist/esm/api.js +892 -34
- 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/AgencyHostingFilesApi.md +54 -0
- package/docs/AgencyHostingListAgencyPlanWebsitesV1200Response.md +22 -0
- package/docs/AgencyHostingV1WebsitesBuilderWebsiteDetailsResource.md +28 -0
- package/docs/AgencyHostingV1WebsitesH5gWebsiteDetailsResource.md +46 -0
- package/docs/AgencyHostingV1WebsitesPlanResource.md +25 -0
- package/docs/AgencyHostingV1WebsitesU4sWebsiteDetailsResource.md +36 -0
- package/docs/AgencyHostingV1WebsitesWebsiteListItemResource.md +37 -0
- package/docs/AgencyHostingV1WebsitesWebsiteListItemResourceDetails.md +59 -0
- package/docs/AgencyHostingWebsitesApi.md +69 -0
- package/docs/HostingDatabasesApi.md +2 -2
- package/docs/HostingFilesApi.md +56 -0
- package/docs/HostingNodeJSApi.md +124 -1
- package/docs/HostingV1FilesGenerateUploadUrlRequest.md +22 -0
- package/docs/HostingV1FilesUploadUrlResource.md +24 -0
- package/docs/HostingV1NodeJsBuildSettingsResource.md +34 -0
- package/docs/HostingV1NodeJsGetBuildSettingsRequest.md +20 -0
- package/docs/HostingV1NodeJsStartBuildRequest.md +36 -0
- package/docs/HostingV1NodeJsStartBuildRequestSourceOptions.md +21 -0
- package/docs/HostingV1WebsitesDeployArchiveRequest.md +20 -0
- package/docs/HostingWebsitesApi.md +69 -4
- package/docs/WordPressInstallationsApi.md +64 -2
- package/docs/WordPressPluginsApi.md +64 -2
- package/docs/WordPressThemesApi.md +62 -0
- package/docs/WordPressV1InstallationsImportWordPressRequest.md +22 -0
- package/docs/WordPressV1PluginsDeployPluginRequest.md +22 -0
- package/docs/WordPressV1ThemesDeployThemeRequest.md +24 -0
- 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: 1.
|
|
4
|
+
* API Version: 1.42.0
|
|
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: 1.
|
|
6
|
+
* API Version: 1.42.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/dist/esm/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.42.0
|
|
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/common.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.42.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
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.42.0
|
|
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: 1.
|
|
6
|
+
* API Version: 1.42.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
|
|
@@ -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/1.
|
|
16
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.40.0" }, (_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: 1.
|
|
4
|
+
* API Version: 1.42.0
|
|
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: 1.
|
|
6
|
+
* API Version: 1.42.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/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.42.0
|
|
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: 1.
|
|
7
|
+
* API Version: 1.42.0
|
|
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
|
|
@@ -4,8 +4,62 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
4
4
|
|
|
5
5
|
|Method | HTTP request | Description|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
|[**generateUploadURLV1**](#generateuploadurlv1) | **POST** /api/agency-hosting/v1/websites/{website_uid}/files/upload-urls | Generate upload URL|
|
|
7
8
|
|[**importWebsiteFromArchiveV1**](#importwebsitefromarchivev1) | **POST** /api/agency-hosting/v1/websites/{website_uid}/files/import-archive | Import website from archive|
|
|
8
9
|
|
|
10
|
+
# **generateUploadURLV1**
|
|
11
|
+
> AgencyHostingV1FilesUploadUrlResource generateUploadURLV1()
|
|
12
|
+
|
|
13
|
+
Generate a file browser upload URL with authentication credentials for uploading files to an Agency Plan website\'s file storage. Returns `url`, `auth_key` and `rest_auth_key`. Use these to upload a file to the website\'s file storage via the TUS resumable upload protocol (TUS 1.0.0). Send `X-Auth: {auth_key}` and `X-Auth-Rest: {rest_auth_key}` headers on every request below. 1. Create the upload: `POST` to `{url}/{relative_file_path}?override=true` with headers `upload-length: {file size in bytes}` and `upload-offset: 0`. Expect `201 Created`. 2. Upload the file: send the file bytes to the same location (any TUS 1.0.0 client, or `PATCH` requests with an `upload-offset` header tracking progress) until complete. `relative_file_path` is the destination path inside the website\'s file storage, e.g. `app.zip`. Instead of a TUS client, plain `curl` also works: ``` FILE=app.zip SIZE=$(stat -f%z \"$FILE\") # stat -c%s on Linux curl -i -X POST \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Upload-Length: ${SIZE}\" \\ -H \"Upload-Offset: 0\" # -> 201 Created curl -i -X PATCH \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Content-Type: application/offset+octet-stream\" \\ -H \"Upload-Offset: 0\" \\ --data-binary \"@${FILE}\" # -> 204 No Content, Upload-Offset response header equals SIZE when done ```
|
|
14
|
+
|
|
15
|
+
### Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import {
|
|
19
|
+
AgencyHostingFilesApi,
|
|
20
|
+
Configuration
|
|
21
|
+
} from 'hostinger-api-sdk';
|
|
22
|
+
|
|
23
|
+
const configuration = new Configuration();
|
|
24
|
+
const apiInstance = new AgencyHostingFilesApi(configuration);
|
|
25
|
+
|
|
26
|
+
let websiteUid: string; //Agency Plan website UID (default to undefined)
|
|
27
|
+
|
|
28
|
+
const { status, data } = await apiInstance.generateUploadURLV1(
|
|
29
|
+
websiteUid
|
|
30
|
+
);
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Parameters
|
|
34
|
+
|
|
35
|
+
|Name | Type | Description | Notes|
|
|
36
|
+
|------------- | ------------- | ------------- | -------------|
|
|
37
|
+
| **websiteUid** | [**string**] | Agency Plan website UID | defaults to undefined|
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Return type
|
|
41
|
+
|
|
42
|
+
**AgencyHostingV1FilesUploadUrlResource**
|
|
43
|
+
|
|
44
|
+
### Authorization
|
|
45
|
+
|
|
46
|
+
[apiToken](../README.md#apiToken)
|
|
47
|
+
|
|
48
|
+
### HTTP request headers
|
|
49
|
+
|
|
50
|
+
- **Content-Type**: Not defined
|
|
51
|
+
- **Accept**: application/json
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
### HTTP response details
|
|
55
|
+
| Status code | Description | Response headers |
|
|
56
|
+
|-------------|-------------|------------------|
|
|
57
|
+
|**200** | Success response | - |
|
|
58
|
+
|**401** | Unauthenticated response | - |
|
|
59
|
+
|**500** | Error response | - |
|
|
60
|
+
|
|
61
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
62
|
+
|
|
9
63
|
# **importWebsiteFromArchiveV1**
|
|
10
64
|
> CommonSuccessEmptyResource importWebsiteFromArchiveV1(agencyHostingV1FilesImportArchiveRequest)
|
|
11
65
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# AgencyHostingListAgencyPlanWebsitesV1200Response
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**data** | [**Array<AgencyHostingV1WebsitesWebsiteListItemResource>**](AgencyHostingV1WebsitesWebsiteListItemResource.md) | Array of [`AgencyHosting.V1.Websites.WebsiteListItemResource`](#model/agencyhostingv1websiteswebsitelistitemresource) | [optional] [default to undefined]
|
|
9
|
+
**meta** | [**CommonSchemaPaginationMetaSchema**](CommonSchemaPaginationMetaSchema.md) | | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { AgencyHostingListAgencyPlanWebsitesV1200Response } from 'hostinger-api-sdk';
|
|
15
|
+
|
|
16
|
+
const instance: AgencyHostingListAgencyPlanWebsitesV1200Response = {
|
|
17
|
+
data,
|
|
18
|
+
meta,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# AgencyHostingV1WebsitesBuilderWebsiteDetailsResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **string** | Builder ID | [optional] [default to undefined]
|
|
9
|
+
**vhost** | **string** | Domain name | [optional] [default to undefined]
|
|
10
|
+
**type** | **string** | Detected website type | [optional] [default to undefined]
|
|
11
|
+
**username** | **string** | Account username | [optional] [default to undefined]
|
|
12
|
+
**created_at** | **string** | | [optional] [default to undefined]
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { AgencyHostingV1WebsitesBuilderWebsiteDetailsResource } from 'hostinger-api-sdk';
|
|
18
|
+
|
|
19
|
+
const instance: AgencyHostingV1WebsitesBuilderWebsiteDetailsResource = {
|
|
20
|
+
id,
|
|
21
|
+
vhost,
|
|
22
|
+
type,
|
|
23
|
+
username,
|
|
24
|
+
created_at,
|
|
25
|
+
};
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# AgencyHostingV1WebsitesH5gWebsiteDetailsResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**uid** | **string** | Website UID | [optional] [default to undefined]
|
|
9
|
+
**ipv4** | **string** | IPv4 address | [optional] [default to undefined]
|
|
10
|
+
**flavor** | **string** | Setup flavor | [optional] [default to undefined]
|
|
11
|
+
**type** | **string** | Detected website type | [optional] [default to undefined]
|
|
12
|
+
**username** | **string** | Username for this order | [optional] [default to undefined]
|
|
13
|
+
**description** | **string** | Description | [optional] [default to undefined]
|
|
14
|
+
**state** | **string** | Website state | [optional] [default to undefined]
|
|
15
|
+
**created_at** | **string** | | [optional] [default to undefined]
|
|
16
|
+
**settings** | **object** | Website settings, e.g. PHP configuration | [optional] [default to undefined]
|
|
17
|
+
**wordpress** | **object** | WordPress installation details | [optional] [default to undefined]
|
|
18
|
+
**domains** | **Array<object>** | Website domains | [optional] [default to undefined]
|
|
19
|
+
**preview_domain** | **object** | Preview domain | [optional] [default to undefined]
|
|
20
|
+
**processes** | **Array<object>** | Ongoing website processes | [optional] [default to undefined]
|
|
21
|
+
**horizons_uuid** | **string** | Horizons UUID (only for horizons websites) | [optional] [default to undefined]
|
|
22
|
+
|
|
23
|
+
## Example
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { AgencyHostingV1WebsitesH5gWebsiteDetailsResource } from 'hostinger-api-sdk';
|
|
27
|
+
|
|
28
|
+
const instance: AgencyHostingV1WebsitesH5gWebsiteDetailsResource = {
|
|
29
|
+
uid,
|
|
30
|
+
ipv4,
|
|
31
|
+
flavor,
|
|
32
|
+
type,
|
|
33
|
+
username,
|
|
34
|
+
description,
|
|
35
|
+
state,
|
|
36
|
+
created_at,
|
|
37
|
+
settings,
|
|
38
|
+
wordpress,
|
|
39
|
+
domains,
|
|
40
|
+
preview_domain,
|
|
41
|
+
processes,
|
|
42
|
+
horizons_uuid,
|
|
43
|
+
};
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# AgencyHostingV1WebsitesPlanResource
|
|
2
|
+
|
|
3
|
+
Website plan details
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**name** | **string** | | [optional] [default to undefined]
|
|
10
|
+
**display_name** | **string** | | [optional] [default to undefined]
|
|
11
|
+
**has_cdn** | **boolean** | | [optional] [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { AgencyHostingV1WebsitesPlanResource } from 'hostinger-api-sdk';
|
|
17
|
+
|
|
18
|
+
const instance: AgencyHostingV1WebsitesPlanResource = {
|
|
19
|
+
name,
|
|
20
|
+
display_name,
|
|
21
|
+
has_cdn,
|
|
22
|
+
};
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# AgencyHostingV1WebsitesU4sWebsiteDetailsResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**uuid** | **string** | Application UUID | [optional] [default to undefined]
|
|
9
|
+
**title** | **string** | Application title | [optional] [default to undefined]
|
|
10
|
+
**port** | **number** | Application port | [optional] [default to undefined]
|
|
11
|
+
**type** | **string** | Detected website type | [optional] [default to undefined]
|
|
12
|
+
**runtime** | **string** | Application runtime | [optional] [default to undefined]
|
|
13
|
+
**state** | **string** | Application state | [optional] [default to undefined]
|
|
14
|
+
**domains** | **Array<object>** | Application domains | [optional] [default to undefined]
|
|
15
|
+
**horizons_uuid** | **string** | Horizons UUID | [optional] [default to undefined]
|
|
16
|
+
**preview_domain** | **object** | Preview domain | [optional] [default to undefined]
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { AgencyHostingV1WebsitesU4sWebsiteDetailsResource } from 'hostinger-api-sdk';
|
|
22
|
+
|
|
23
|
+
const instance: AgencyHostingV1WebsitesU4sWebsiteDetailsResource = {
|
|
24
|
+
uuid,
|
|
25
|
+
title,
|
|
26
|
+
port,
|
|
27
|
+
type,
|
|
28
|
+
runtime,
|
|
29
|
+
state,
|
|
30
|
+
domains,
|
|
31
|
+
horizons_uuid,
|
|
32
|
+
preview_domain,
|
|
33
|
+
};
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# AgencyHostingV1WebsitesWebsiteListItemResource
|
|
2
|
+
|
|
3
|
+
Website item. The `details` shape differs per platform — see the `platform` field.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**id** | **string** | | [default to undefined]
|
|
10
|
+
**client_id** | **number** | | [default to undefined]
|
|
11
|
+
**order_id** | **number** | | [default to undefined]
|
|
12
|
+
**platform** | **string** | Website platform | [default to undefined]
|
|
13
|
+
**state** | **string** | Website state | [default to undefined]
|
|
14
|
+
**created_at** | **string** | | [default to undefined]
|
|
15
|
+
**plan** | [**AgencyHostingV1WebsitesPlanResource**](AgencyHostingV1WebsitesPlanResource.md) | | [default to undefined]
|
|
16
|
+
**details** | [**AgencyHostingV1WebsitesWebsiteListItemResourceDetails**](AgencyHostingV1WebsitesWebsiteListItemResourceDetails.md) | | [default to undefined]
|
|
17
|
+
**suspension_reason** | **string** | Reason for suspension, only populated for payment related suspensions | [default to undefined]
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { AgencyHostingV1WebsitesWebsiteListItemResource } from 'hostinger-api-sdk';
|
|
23
|
+
|
|
24
|
+
const instance: AgencyHostingV1WebsitesWebsiteListItemResource = {
|
|
25
|
+
id,
|
|
26
|
+
client_id,
|
|
27
|
+
order_id,
|
|
28
|
+
platform,
|
|
29
|
+
state,
|
|
30
|
+
created_at,
|
|
31
|
+
plan,
|
|
32
|
+
details,
|
|
33
|
+
suspension_reason,
|
|
34
|
+
};
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# AgencyHostingV1WebsitesWebsiteListItemResourceDetails
|
|
2
|
+
|
|
3
|
+
Platform-specific website details. Shape depends on `platform`.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**uid** | **string** | Website UID | [optional] [default to undefined]
|
|
10
|
+
**ipv4** | **string** | IPv4 address | [optional] [default to undefined]
|
|
11
|
+
**flavor** | **string** | Setup flavor | [optional] [default to undefined]
|
|
12
|
+
**type** | **string** | Detected website type | [optional] [default to undefined]
|
|
13
|
+
**username** | **string** | Account username | [optional] [default to undefined]
|
|
14
|
+
**description** | **string** | Description | [optional] [default to undefined]
|
|
15
|
+
**state** | **string** | Application state | [optional] [default to undefined]
|
|
16
|
+
**created_at** | **string** | | [optional] [default to undefined]
|
|
17
|
+
**settings** | **object** | Website settings, e.g. PHP configuration | [optional] [default to undefined]
|
|
18
|
+
**wordpress** | **object** | WordPress installation details | [optional] [default to undefined]
|
|
19
|
+
**domains** | **Array<object>** | Application domains | [optional] [default to undefined]
|
|
20
|
+
**preview_domain** | **object** | Preview domain | [optional] [default to undefined]
|
|
21
|
+
**processes** | **Array<object>** | Ongoing website processes | [optional] [default to undefined]
|
|
22
|
+
**horizons_uuid** | **string** | Horizons UUID | [optional] [default to undefined]
|
|
23
|
+
**id** | **string** | Builder ID | [optional] [default to undefined]
|
|
24
|
+
**vhost** | **string** | Domain name | [optional] [default to undefined]
|
|
25
|
+
**uuid** | **string** | Application UUID | [optional] [default to undefined]
|
|
26
|
+
**title** | **string** | Application title | [optional] [default to undefined]
|
|
27
|
+
**port** | **number** | Application port | [optional] [default to undefined]
|
|
28
|
+
**runtime** | **string** | Application runtime | [optional] [default to undefined]
|
|
29
|
+
|
|
30
|
+
## Example
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
import { AgencyHostingV1WebsitesWebsiteListItemResourceDetails } from 'hostinger-api-sdk';
|
|
34
|
+
|
|
35
|
+
const instance: AgencyHostingV1WebsitesWebsiteListItemResourceDetails = {
|
|
36
|
+
uid,
|
|
37
|
+
ipv4,
|
|
38
|
+
flavor,
|
|
39
|
+
type,
|
|
40
|
+
username,
|
|
41
|
+
description,
|
|
42
|
+
state,
|
|
43
|
+
created_at,
|
|
44
|
+
settings,
|
|
45
|
+
wordpress,
|
|
46
|
+
domains,
|
|
47
|
+
preview_domain,
|
|
48
|
+
processes,
|
|
49
|
+
horizons_uuid,
|
|
50
|
+
id,
|
|
51
|
+
vhost,
|
|
52
|
+
uuid,
|
|
53
|
+
title,
|
|
54
|
+
port,
|
|
55
|
+
runtime,
|
|
56
|
+
};
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -7,6 +7,7 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
7
7
|
|[**buildWebsiteNodeJSAssetsV1**](#buildwebsitenodejsassetsv1) | **POST** /api/agency-hosting/v1/websites/{website_uid}/build-assets | Build website NodeJS assets|
|
|
8
8
|
|[**deleteWebsiteV1**](#deletewebsitev1) | **DELETE** /api/agency-hosting/v1/websites/{website_uid} | Delete website|
|
|
9
9
|
|[**getWebsiteDetailsV1**](#getwebsitedetailsv1) | **GET** /api/agency-hosting/v1/websites/{website_uid} | Get website details|
|
|
10
|
+
|[**listAgencyPlanWebsitesV1**](#listagencyplanwebsitesv1) | **GET** /api/agency-hosting/v1/websites | List Agency Plan websites|
|
|
10
11
|
|[**listWebsiteProcessesV1**](#listwebsiteprocessesv1) | **GET** /api/agency-hosting/v1/websites/{website_uid}/processes | List website processes|
|
|
11
12
|
|
|
12
13
|
# **buildWebsiteNodeJSAssetsV1**
|
|
@@ -164,6 +165,74 @@ const { status, data } = await apiInstance.getWebsiteDetailsV1(
|
|
|
164
165
|
- **Accept**: application/json
|
|
165
166
|
|
|
166
167
|
|
|
168
|
+
### HTTP response details
|
|
169
|
+
| Status code | Description | Response headers |
|
|
170
|
+
|-------------|-------------|------------------|
|
|
171
|
+
|**200** | Success response | - |
|
|
172
|
+
|**401** | Unauthenticated response | - |
|
|
173
|
+
|**500** | Error response | - |
|
|
174
|
+
|
|
175
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
176
|
+
|
|
177
|
+
# **listAgencyPlanWebsitesV1**
|
|
178
|
+
> AgencyHostingListAgencyPlanWebsitesV1200Response listAgencyPlanWebsitesV1()
|
|
179
|
+
|
|
180
|
+
Retrieve a paginated list of Agency Plan websites (H5G, 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. The response shape differs per platform — see the `platform` field on each item. 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 `order_ids`, `states`, or `domain` for more targeted results.
|
|
181
|
+
|
|
182
|
+
### Example
|
|
183
|
+
|
|
184
|
+
```typescript
|
|
185
|
+
import {
|
|
186
|
+
AgencyHostingWebsitesApi,
|
|
187
|
+
Configuration
|
|
188
|
+
} from 'hostinger-api-sdk';
|
|
189
|
+
|
|
190
|
+
const configuration = new Configuration();
|
|
191
|
+
const apiInstance = new AgencyHostingWebsitesApi(configuration);
|
|
192
|
+
|
|
193
|
+
let page: number; //Page number (optional) (default to undefined)
|
|
194
|
+
let perPage: number; //Number of items per page (optional) (default to 25)
|
|
195
|
+
let orderIds: Array<number>; //Filter by order IDs. Accepts a comma-separated list. (optional) (default to undefined)
|
|
196
|
+
let states: Array<'active' | 'locked' | 'suspended' | 'deleting' | 'deleted'>; //Filter by website state. Accepts a comma-separated list. (optional) (default to undefined)
|
|
197
|
+
let websiteTypes: Array<'wordpress' | 'builder' | 'horizons' | 'nodejs' | 'other'>; //Filter by detected website type, e.g. wordpress,nodejs. Accepts a comma-separated list. (optional) (default to undefined)
|
|
198
|
+
let domain: string; //Filter by domain name (case-insensitive substring match) (optional) (default to undefined)
|
|
199
|
+
|
|
200
|
+
const { status, data } = await apiInstance.listAgencyPlanWebsitesV1(
|
|
201
|
+
page,
|
|
202
|
+
perPage,
|
|
203
|
+
orderIds,
|
|
204
|
+
states,
|
|
205
|
+
websiteTypes,
|
|
206
|
+
domain
|
|
207
|
+
);
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Parameters
|
|
211
|
+
|
|
212
|
+
|Name | Type | Description | Notes|
|
|
213
|
+
|------------- | ------------- | ------------- | -------------|
|
|
214
|
+
| **page** | [**number**] | Page number | (optional) defaults to undefined|
|
|
215
|
+
| **perPage** | [**number**] | Number of items per page | (optional) defaults to 25|
|
|
216
|
+
| **orderIds** | **Array<number>** | Filter by order IDs. Accepts a comma-separated list. | (optional) defaults to undefined|
|
|
217
|
+
| **states** | **Array<'active' | 'locked' | 'suspended' | 'deleting' | 'deleted'>** | Filter by website state. Accepts a comma-separated list. | (optional) defaults to undefined|
|
|
218
|
+
| **websiteTypes** | **Array<'wordpress' | 'builder' | 'horizons' | 'nodejs' | 'other'>** | Filter by detected website type, e.g. wordpress,nodejs. Accepts a comma-separated list. | (optional) defaults to undefined|
|
|
219
|
+
| **domain** | [**string**] | Filter by domain name (case-insensitive substring match) | (optional) defaults to undefined|
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
### Return type
|
|
223
|
+
|
|
224
|
+
**AgencyHostingListAgencyPlanWebsitesV1200Response**
|
|
225
|
+
|
|
226
|
+
### Authorization
|
|
227
|
+
|
|
228
|
+
[apiToken](../README.md#apiToken)
|
|
229
|
+
|
|
230
|
+
### HTTP request headers
|
|
231
|
+
|
|
232
|
+
- **Content-Type**: Not defined
|
|
233
|
+
- **Accept**: application/json
|
|
234
|
+
|
|
235
|
+
|
|
167
236
|
### HTTP response details
|
|
168
237
|
| Status code | Description | Response headers |
|
|
169
238
|
|-------------|-------------|------------------|
|
|
@@ -384,7 +384,7 @@ const apiInstance = new HostingDatabasesApi(configuration);
|
|
|
384
384
|
let username: string; // (default to undefined)
|
|
385
385
|
let page: number; //Page number (optional) (default to undefined)
|
|
386
386
|
let perPage: number; //Number of items per page (optional) (default to 25)
|
|
387
|
-
let domain: string; //Filter by domain name (
|
|
387
|
+
let domain: string; //Filter by domain name (case-insensitive substring match) (optional) (default to undefined)
|
|
388
388
|
let isAssigned: boolean; //When used with domain, return only databases assigned to that domain. (optional) (default to undefined)
|
|
389
389
|
let search: string; //Search databases by name, user, or creation date. (optional) (default to undefined)
|
|
390
390
|
|
|
@@ -405,7 +405,7 @@ const { status, data } = await apiInstance.listAccountDatabasesV1(
|
|
|
405
405
|
| **username** | [**string**] | | defaults to undefined|
|
|
406
406
|
| **page** | [**number**] | Page number | (optional) defaults to undefined|
|
|
407
407
|
| **perPage** | [**number**] | Number of items per page | (optional) defaults to 25|
|
|
408
|
-
| **domain** | [**string**] | Filter by domain name (
|
|
408
|
+
| **domain** | [**string**] | Filter by domain name (case-insensitive substring match) | (optional) defaults to undefined|
|
|
409
409
|
| **isAssigned** | [**boolean**] | When used with domain, return only databases assigned to that domain. | (optional) defaults to undefined|
|
|
410
410
|
| **search** | [**string**] | Search databases by name, user, or creation date. | (optional) defaults to undefined|
|
|
411
411
|
|
package/docs/HostingFilesApi.md
CHANGED
|
@@ -4,9 +4,65 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
4
4
|
|
|
5
5
|
|Method | HTTP request | Description|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
|[**generateUploadURLV1**](#generateuploadurlv1) | **POST** /api/hosting/v1/files/upload-urls | Generate upload URL|
|
|
7
8
|
|[**getWebsiteFileContentV1**](#getwebsitefilecontentv1) | **GET** /api/hosting/v1/accounts/{username}/domains/{domain}/files/content | Get website file content|
|
|
8
9
|
|[**listWebsiteFilesAndDirectoriesV1**](#listwebsitefilesanddirectoriesv1) | **GET** /api/hosting/v1/accounts/{username}/domains/{domain}/files | List website files and directories|
|
|
9
10
|
|
|
11
|
+
# **generateUploadURLV1**
|
|
12
|
+
> HostingV1FilesUploadUrlResource generateUploadURLV1(hostingV1FilesGenerateUploadUrlRequest)
|
|
13
|
+
|
|
14
|
+
Generate a file browser upload URL with authentication credentials for uploading files directly to a website\'s file storage. Returns `url`, `auth_key` and `rest_auth_key`. Use these to upload a file to the website\'s `public_html` directory via the TUS resumable upload protocol (TUS 1.0.0). Send `X-Auth: {auth_key}` and `X-Auth-Rest: {rest_auth_key}` headers on every request below. 1. Create the upload: `POST` to `{url}/{relative_file_path}?override=true` with headers `upload-length: {file size in bytes}` and `upload-offset: 0`. Expect `201 Created`. 2. Upload the file: send the file bytes to the same location (any TUS 1.0.0 client, or `PATCH` requests with an `upload-offset` header tracking progress) until complete. `relative_file_path` is the destination path inside `public_html`, e.g. `app.zip`. Instead of a TUS client, plain `curl` also works: ``` FILE=app.zip SIZE=$(stat -f%z \"$FILE\") # stat -c%s on Linux curl -i -X POST \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Upload-Length: ${SIZE}\" \\ -H \"Upload-Offset: 0\" # -> 201 Created curl -i -X PATCH \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Content-Type: application/offset+octet-stream\" \\ -H \"Upload-Offset: 0\" \\ --data-binary \"@${FILE}\" # -> 204 No Content, Upload-Offset response header equals SIZE when done ```
|
|
15
|
+
|
|
16
|
+
### Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import {
|
|
20
|
+
HostingFilesApi,
|
|
21
|
+
Configuration,
|
|
22
|
+
HostingV1FilesGenerateUploadUrlRequest
|
|
23
|
+
} from 'hostinger-api-sdk';
|
|
24
|
+
|
|
25
|
+
const configuration = new Configuration();
|
|
26
|
+
const apiInstance = new HostingFilesApi(configuration);
|
|
27
|
+
|
|
28
|
+
let hostingV1FilesGenerateUploadUrlRequest: HostingV1FilesGenerateUploadUrlRequest; //
|
|
29
|
+
|
|
30
|
+
const { status, data } = await apiInstance.generateUploadURLV1(
|
|
31
|
+
hostingV1FilesGenerateUploadUrlRequest
|
|
32
|
+
);
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Parameters
|
|
36
|
+
|
|
37
|
+
|Name | Type | Description | Notes|
|
|
38
|
+
|------------- | ------------- | ------------- | -------------|
|
|
39
|
+
| **hostingV1FilesGenerateUploadUrlRequest** | **HostingV1FilesGenerateUploadUrlRequest**| | |
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Return type
|
|
43
|
+
|
|
44
|
+
**HostingV1FilesUploadUrlResource**
|
|
45
|
+
|
|
46
|
+
### Authorization
|
|
47
|
+
|
|
48
|
+
[apiToken](../README.md#apiToken)
|
|
49
|
+
|
|
50
|
+
### HTTP request headers
|
|
51
|
+
|
|
52
|
+
- **Content-Type**: application/json
|
|
53
|
+
- **Accept**: application/json
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### HTTP response details
|
|
57
|
+
| Status code | Description | Response headers |
|
|
58
|
+
|-------------|-------------|------------------|
|
|
59
|
+
|**200** | Success response | - |
|
|
60
|
+
|**422** | Validation error response | - |
|
|
61
|
+
|**401** | Unauthenticated response | - |
|
|
62
|
+
|**500** | Error response | - |
|
|
63
|
+
|
|
64
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
65
|
+
|
|
10
66
|
# **getWebsiteFileContentV1**
|
|
11
67
|
> HostingV1FilesFileContentResource getWebsiteFileContentV1()
|
|
12
68
|
|