Skip to content

Commit d06e610

Browse files
chore: sdk update
1 parent 0b7f363 commit d06e610

1,216 files changed

Lines changed: 3359 additions & 1246 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,11 @@ Class | Method | HTTP request | Description
240240
*HostingFilesApi* | [**generate_upload_urlv1**](docs/HostingFilesApi.md#generate_upload_urlv1) | **POST** /api/hosting/v1/files/upload-urls | Generate upload URL
241241
*HostingFilesApi* | [**get_website_file_content_v1**](docs/HostingFilesApi.md#get_website_file_content_v1) | **GET** /api/hosting/v1/accounts/{username}/domains/{domain}/files/content | Get website file content
242242
*HostingFilesApi* | [**list_website_files_and_directories_v1**](docs/HostingFilesApi.md#list_website_files_and_directories_v1) | **GET** /api/hosting/v1/accounts/{username}/domains/{domain}/files | List website files and directories
243+
*HostingGitApi* | [**delete_git_auto_deployment_settings_v1**](docs/HostingGitApi.md#delete_git_auto_deployment_settings_v1) | **DELETE** /api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings | Delete Git auto-deployment settings
244+
*HostingGitApi* | [**get_git_auto_deployment_settings_v1**](docs/HostingGitApi.md#get_git_auto_deployment_settings_v1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings | Get Git auto-deployment settings
243245
*HostingGitApi* | [**list_git_installation_repositories_v1**](docs/HostingGitApi.md#list_git_installation_repositories_v1) | **GET** /api/hosting/v1/git/installations/{uuid}/repositories | List Git installation repositories
244246
*HostingGitApi* | [**list_git_installations_v1**](docs/HostingGitApi.md#list_git_installations_v1) | **GET** /api/hosting/v1/git/installations | List Git installations
247+
*HostingGitApi* | [**update_git_auto_deployment_settings_v1**](docs/HostingGitApi.md#update_git_auto_deployment_settings_v1) | **PUT** /api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings | Update Git auto-deployment settings
245248
*HostingNodeJSApi* | [**analyse_failed_node_js_build_v1**](docs/HostingNodeJSApi.md#analyse_failed_node_js_build_v1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}/analysis | Analyse failed Node.js build
246249
*HostingNodeJSApi* | [**clear_node_js_runtime_logs_v1**](docs/HostingNodeJSApi.md#clear_node_js_runtime_logs_v1) | **DELETE** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/runtime-logs | Clear Node.js runtime logs
247250
*HostingNodeJSApi* | [**get_node_js_build_details_v1**](docs/HostingNodeJSApi.md#get_node_js_build_details_v1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid} | Get Node.js build details
@@ -717,8 +720,12 @@ Class | Method | HTTP request | Description
717720
- [HostingV1FilesFilesResourceItemsInner](docs/HostingV1FilesFilesResourceItemsInner.md)
718721
- [HostingV1FilesGenerateUploadUrlRequest](docs/HostingV1FilesGenerateUploadUrlRequest.md)
719722
- [HostingV1FilesUploadUrlResource](docs/HostingV1FilesUploadUrlResource.md)
723+
- [HostingV1GitGitAutoDeploymentSettingsResource](docs/HostingV1GitGitAutoDeploymentSettingsResource.md)
724+
- [HostingV1GitGitCommitAuthorResource](docs/HostingV1GitGitCommitAuthorResource.md)
725+
- [HostingV1GitGitCommitResource](docs/HostingV1GitGitCommitResource.md)
720726
- [HostingV1GitGitInstallationResource](docs/HostingV1GitGitInstallationResource.md)
721727
- [HostingV1GitGitRepositoryResource](docs/HostingV1GitGitRepositoryResource.md)
728+
- [HostingV1GitUpdateGitAutoDeploymentSettingsRequest](docs/HostingV1GitUpdateGitAutoDeploymentSettingsRequest.md)
722729
- [HostingV1NodeJsBuildAnalysisResource](docs/HostingV1NodeJsBuildAnalysisResource.md)
723730
- [HostingV1NodeJsBuildLogsResource](docs/HostingV1NodeJsBuildLogsResource.md)
724731
- [HostingV1NodeJsBuildOptionsResource](docs/HostingV1NodeJsBuildOptionsResource.md)

‎docs/HostingGitApi.md‎

Lines changed: 250 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,164 @@ All URIs are relative to *https://developers.hostinger.com*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7+
[**delete_git_auto_deployment_settings_v1**](HostingGitApi.md#delete_git_auto_deployment_settings_v1) | **DELETE** /api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings | Delete Git auto-deployment settings
8+
[**get_git_auto_deployment_settings_v1**](HostingGitApi.md#get_git_auto_deployment_settings_v1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings | Get Git auto-deployment settings
79
[**list_git_installation_repositories_v1**](HostingGitApi.md#list_git_installation_repositories_v1) | **GET** /api/hosting/v1/git/installations/{uuid}/repositories | List Git installation repositories
810
[**list_git_installations_v1**](HostingGitApi.md#list_git_installations_v1) | **GET** /api/hosting/v1/git/installations | List Git installations
11+
[**update_git_auto_deployment_settings_v1**](HostingGitApi.md#update_git_auto_deployment_settings_v1) | **PUT** /api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings | Update Git auto-deployment settings
912

1013

14+
# **delete_git_auto_deployment_settings_v1**
15+
> CommonSuccessEmptyResource delete_git_auto_deployment_settings_v1(username, domain)
16+
17+
Delete Git auto-deployment settings
18+
19+
Removes the Git auto-deployment settings of the website. Files already deployed stay on the
20+
website; pushes stop deploying until settings are saved again. Succeeds also when nothing is
21+
configured.
22+
23+
### Example
24+
25+
* Bearer Authentication (apiToken):
26+
27+
```python
28+
import hostinger_api
29+
from hostinger_api.models.common_success_empty_resource import CommonSuccessEmptyResource
30+
from hostinger_api.rest import ApiException
31+
from pprint import pprint
32+
33+
34+
# Configure Bearer authorization: apiToken
35+
configuration = hostinger_api.Configuration(
36+
access_token = os.environ["BEARER_TOKEN"]
37+
)
38+
39+
# Enter a context with an instance of the API client
40+
with hostinger_api.ApiClient(configuration) as api_client:
41+
# Create an instance of the API class
42+
api_instance = hostinger_api.HostingGitApi(api_client)
43+
username = 'u123456789' # str |
44+
domain = 'mydomain.tld' # str | Domain name
45+
46+
try:
47+
# Delete Git auto-deployment settings
48+
api_response = api_instance.delete_git_auto_deployment_settings_v1(username, domain)
49+
print("The response of HostingGitApi->delete_git_auto_deployment_settings_v1:\n")
50+
pprint(api_response)
51+
except Exception as e:
52+
print("Exception when calling HostingGitApi->delete_git_auto_deployment_settings_v1: %s\n" % e)
53+
```
54+
55+
56+
57+
### Parameters
58+
59+
60+
Name | Type | Description | Notes
61+
------------- | ------------- | ------------- | -------------
62+
**username** | **str**| |
63+
**domain** | **str**| Domain name |
64+
65+
### Return type
66+
67+
[**CommonSuccessEmptyResource**](CommonSuccessEmptyResource.md)
68+
69+
### Authorization
70+
71+
[apiToken](../README.md#apiToken)
72+
73+
### HTTP request headers
74+
75+
- **Content-Type**: Not defined
76+
- **Accept**: application/json
77+
78+
### HTTP response details
79+
80+
| Status code | Description | Response headers |
81+
|-------------|-------------|------------------|
82+
**200** | Success empty response | - |
83+
**401** | Unauthenticated response | - |
84+
**500** | Error response | - |
85+
86+
[[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)
87+
88+
# **get_git_auto_deployment_settings_v1**
89+
> HostingV1GitGitAutoDeploymentSettingsResource get_git_auto_deployment_settings_v1(username, domain)
90+
91+
Get Git auto-deployment settings
92+
93+
Returns the Git auto-deployment settings of the website: which repository and branch deploy
94+
into which directory, and whether pushes trigger a deployment. `is_enabled` false keeps the
95+
repository link but ignores pushes.
96+
97+
When the website has no auto-deployment configured every field is null. Save settings with
98+
`Update Git auto-deployment settings`.
99+
100+
### Example
101+
102+
* Bearer Authentication (apiToken):
103+
104+
```python
105+
import hostinger_api
106+
from hostinger_api.models.hosting_v1_git_git_auto_deployment_settings_resource import HostingV1GitGitAutoDeploymentSettingsResource
107+
from hostinger_api.rest import ApiException
108+
from pprint import pprint
109+
110+
111+
# Configure Bearer authorization: apiToken
112+
configuration = hostinger_api.Configuration(
113+
access_token = os.environ["BEARER_TOKEN"]
114+
)
115+
116+
# Enter a context with an instance of the API client
117+
with hostinger_api.ApiClient(configuration) as api_client:
118+
# Create an instance of the API class
119+
api_instance = hostinger_api.HostingGitApi(api_client)
120+
username = 'u123456789' # str |
121+
domain = 'mydomain.tld' # str | Domain name
122+
123+
try:
124+
# Get Git auto-deployment settings
125+
api_response = api_instance.get_git_auto_deployment_settings_v1(username, domain)
126+
print("The response of HostingGitApi->get_git_auto_deployment_settings_v1:\n")
127+
pprint(api_response)
128+
except Exception as e:
129+
print("Exception when calling HostingGitApi->get_git_auto_deployment_settings_v1: %s\n" % e)
130+
```
131+
132+
133+
134+
### Parameters
135+
136+
137+
Name | Type | Description | Notes
138+
------------- | ------------- | ------------- | -------------
139+
**username** | **str**| |
140+
**domain** | **str**| Domain name |
141+
142+
### Return type
143+
144+
[**HostingV1GitGitAutoDeploymentSettingsResource**](HostingV1GitGitAutoDeploymentSettingsResource.md)
145+
146+
### Authorization
147+
148+
[apiToken](../README.md#apiToken)
149+
150+
### HTTP request headers
151+
152+
- **Content-Type**: Not defined
153+
- **Accept**: application/json
154+
155+
### HTTP response details
156+
157+
| Status code | Description | Response headers |
158+
|-------------|-------------|------------------|
159+
**200** | Success response | - |
160+
**401** | Unauthenticated response | - |
161+
**500** | Error response | - |
162+
163+
[[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)
164+
11165
# **list_git_installation_repositories_v1**
12166
> List[HostingV1GitGitRepositoryResource] list_git_installation_repositories_v1(uuid)
13167
@@ -19,9 +173,10 @@ is still queried and the call fails with whatever the provider answers. The list
19173
the first 500 repositories in the order the provider returns them; when the account has
20174
more, name the repository directly instead of searching this list.
21175

22-
`owner`, `name` and `default_branch` identify a repository and a branch to deploy. Returns
23-
404 when the installation does not belong to the customer. Limited to 10 calls per minute
24-
per API client (429 above that).
176+
`owner`, `name` and a branch (`default_branch` or another one) go into `source_options` of
177+
`Start Node.js build` or into `Update Git auto-deployment settings`. Returns 404 when the
178+
installation does not belong to the customer. Limited to 10 calls per minute per API client
179+
(429 above that).
25180

26181
### Example
27182

@@ -97,11 +252,13 @@ Lists the Git provider accounts the customer has connected. Only installations w
97252
`active` are returned unless the `status` filter says otherwise.
98253

99254
An empty list means the customer has no active installation. Check `status=suspended` and
100-
`status=pending` as well. If there is none at all, GitHub has to be connected once in hPanel
101-
(Websites, Manage, Advanced, Git, Connect GitHub; or Add Website, Node.js Web App, Import Git
102-
Repository, Continue with GitHub); this endpoint then lists the new installation.
255+
`status=pending` as well. If there is none at all, a Git provider (GitHub or GitLab) has to be
256+
connected once in hPanel (Websites, Manage, Advanced, Git; or Add Website, Node.js Web App,
257+
Import Git Repository); this endpoint then lists the new installation.
103258

104-
Use `uuid` as the path parameter of `List Git installation repositories`.
259+
Use `uuid` as the path parameter of `List Git installation repositories`, and as
260+
`installation_uuid` in `Start Node.js build` with `source_type` `git` and in
261+
`Update Git auto-deployment settings`.
105262

106263
### Example
107264

@@ -169,3 +326,89 @@ Name | Type | Description | Notes
169326

170327
[[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)
171328

329+
# **update_git_auto_deployment_settings_v1**
330+
> CommonSuccessEmptyResource update_git_auto_deployment_settings_v1(username, domain, hosting_v1_git_update_git_auto_deployment_settings_request)
331+
332+
Update Git auto-deployment settings
333+
334+
Creates or replaces the Git auto-deployment settings of the website: repository, branch, the
335+
directory under the document root to deploy into, and `is_enabled`. Send the full set;
336+
`is_enabled` defaults to true and `directory` to the document root. `installation_uuid` must
337+
be an installation from `List Git installations` that belongs to the same customer as the
338+
website.
339+
340+
For PHP and static websites, saving with `is_enabled` true deploys the branch right away and
341+
every later push to that branch deploys again. For Node.js and Website Builder websites saving
342+
does not clone anything. On a Node.js website start the first deploy with
343+
`Start Node.js build` using `source_type` `git`; pushes then trigger new builds with the build
344+
settings stored for the website.
345+
346+
### Example
347+
348+
* Bearer Authentication (apiToken):
349+
350+
```python
351+
import hostinger_api
352+
from hostinger_api.models.common_success_empty_resource import CommonSuccessEmptyResource
353+
from hostinger_api.models.hosting_v1_git_update_git_auto_deployment_settings_request import HostingV1GitUpdateGitAutoDeploymentSettingsRequest
354+
from hostinger_api.rest import ApiException
355+
from pprint import pprint
356+
357+
358+
# Configure Bearer authorization: apiToken
359+
configuration = hostinger_api.Configuration(
360+
access_token = os.environ["BEARER_TOKEN"]
361+
)
362+
363+
# Enter a context with an instance of the API client
364+
with hostinger_api.ApiClient(configuration) as api_client:
365+
# Create an instance of the API class
366+
api_instance = hostinger_api.HostingGitApi(api_client)
367+
username = 'u123456789' # str |
368+
domain = 'mydomain.tld' # str | Domain name
369+
hosting_v1_git_update_git_auto_deployment_settings_request = hostinger_api.HostingV1GitUpdateGitAutoDeploymentSettingsRequest() # HostingV1GitUpdateGitAutoDeploymentSettingsRequest |
370+
371+
try:
372+
# Update Git auto-deployment settings
373+
api_response = api_instance.update_git_auto_deployment_settings_v1(username, domain, hosting_v1_git_update_git_auto_deployment_settings_request)
374+
print("The response of HostingGitApi->update_git_auto_deployment_settings_v1:\n")
375+
pprint(api_response)
376+
except Exception as e:
377+
print("Exception when calling HostingGitApi->update_git_auto_deployment_settings_v1: %s\n" % e)
378+
```
379+
380+
381+
382+
### Parameters
383+
384+
385+
Name | Type | Description | Notes
386+
------------- | ------------- | ------------- | -------------
387+
**username** | **str**| |
388+
**domain** | **str**| Domain name |
389+
**hosting_v1_git_update_git_auto_deployment_settings_request** | [**HostingV1GitUpdateGitAutoDeploymentSettingsRequest**](HostingV1GitUpdateGitAutoDeploymentSettingsRequest.md)| |
390+
391+
### Return type
392+
393+
[**CommonSuccessEmptyResource**](CommonSuccessEmptyResource.md)
394+
395+
### Authorization
396+
397+
[apiToken](../README.md#apiToken)
398+
399+
### HTTP request headers
400+
401+
- **Content-Type**: application/json
402+
- **Accept**: application/json
403+
404+
### HTTP response details
405+
406+
| Status code | Description | Response headers |
407+
|-------------|-------------|------------------|
408+
**200** | Success empty response | - |
409+
**422** | Validation error response | - |
410+
**401** | Unauthenticated response | - |
411+
**500** | Error response | - |
412+
413+
[[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)
414+

‎docs/HostingNodeJSApi.md‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,13 +1107,17 @@ Start a Node.js build process using files already present on the website's file
11071107
WARNING: on success this overwrites the website's existing contents and cannot be
11081108
undone — verify this is intended before calling this endpoint.
11091109

1110-
The `source_type` must be `archive` and `source_options.archive_path` must point to an
1111-
existing archive file on the server (relative to the website document root).
1112-
Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first.
1113-
1114-
To auto-detect build settings from an archive before starting, first call the
1110+
With `source_type` `archive`, `source_options.archive_path` must point to an existing
1111+
archive file on the server (relative to the website document root). Use the
1112+
`Generate Upload URL` endpoint to obtain credentials and upload the archive first. To
1113+
auto-detect build settings from an archive before starting, first call the
11151114
`Get Node.js Build Settings from Archive` endpoint.
11161115

1116+
With `source_type` `git`, `source_options` carries `owner`, `repository`, `branch` and
1117+
`installation_uuid`. Take the installation from `List Git installations` and the owner and
1118+
repository from `List Git installation repositories`; the branch is cloned at its current
1119+
head. The installation must belong to the same customer as the website.
1120+
11171121
The returned build `uuid` can be used to poll progress and retrieve logs via
11181122
the `Get Node.js Build Logs` endpoint.
11191123

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# HostingV1GitGitAutoDeploymentSettingsResource
2+
3+
Every field is null when the website has no Git auto-deployment configured.
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**installation_uuid** | **str** | Git installation the repository is accessed through |
10+
**is_enabled** | **bool** | Whether pushes to the branch deploy automatically |
11+
**owner** | **str** | Repository owner login |
12+
**repository** | **str** | Repository name |
13+
**branch** | **str** | Branch that is deployed |
14+
**directory** | **str** | Subdirectory under the website document root the repository deploys into. Empty means the document root. |
15+
16+
## Example
17+
18+
```python
19+
from hostinger_api.models.hosting_v1_git_git_auto_deployment_settings_resource import HostingV1GitGitAutoDeploymentSettingsResource
20+
21+
# TODO update the JSON string below
22+
json = "{}"
23+
# create an instance of HostingV1GitGitAutoDeploymentSettingsResource from a JSON string
24+
hosting_v1_git_git_auto_deployment_settings_resource_instance = HostingV1GitGitAutoDeploymentSettingsResource.from_json(json)
25+
# print the JSON string representation of the object
26+
print(HostingV1GitGitAutoDeploymentSettingsResource.to_json())
27+
28+
# convert the object into a dict
29+
hosting_v1_git_git_auto_deployment_settings_resource_dict = hosting_v1_git_git_auto_deployment_settings_resource_instance.to_dict()
30+
# create an instance of HostingV1GitGitAutoDeploymentSettingsResource from a dict
31+
hosting_v1_git_git_auto_deployment_settings_resource_from_dict = HostingV1GitGitAutoDeploymentSettingsResource.from_dict(hosting_v1_git_git_auto_deployment_settings_resource_dict)
32+
```
33+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
34+
35+

0 commit comments

Comments
 (0)