@hostinger/sdk 1.52.0 → 1.52.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/api.ts +349 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +248 -1
- package/dist/api.js +222 -11
- 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 +248 -1
- package/dist/esm/api.js +208 -1
- 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/HostingGitApi.md +121 -0
- package/docs/HostingV1GitGitInstallationResource.md +36 -0
- package/docs/HostingV1GitGitRepositoryResource.md +34 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.52.
|
|
4
|
+
* API Version: 1.52.1
|
|
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.52.
|
|
7
|
+
* API Version: 1.52.1
|
|
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
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# HostingGitApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://developers.hostinger.com*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**listGitInstallationRepositoriesV1**](#listgitinstallationrepositoriesv1) | **GET** /api/hosting/v1/git/installations/{uuid}/repositories | List Git installation repositories|
|
|
8
|
+
|[**listGitInstallationsV1**](#listgitinstallationsv1) | **GET** /api/hosting/v1/git/installations | List Git installations|
|
|
9
|
+
|
|
10
|
+
# **listGitInstallationRepositoriesV1**
|
|
11
|
+
> Array<HostingV1GitGitRepositoryResource> listGitInstallationRepositoriesV1()
|
|
12
|
+
|
|
13
|
+
Lists the repositories the Git installation can access, read live from the provider. Works for github and gitlab installations. Use an active installation: a suspended or pending one is still queried and the call fails with whatever the provider answers. The list is cut at the first 500 repositories in the order the provider returns them; when the account has more, name the repository directly instead of searching this list. `owner`, `name` and `default_branch` identify a repository and a branch to deploy. Returns 404 when the installation does not belong to the customer. Limited to 10 calls per minute per API client (429 above that).
|
|
14
|
+
|
|
15
|
+
### Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import {
|
|
19
|
+
HostingGitApi,
|
|
20
|
+
Configuration
|
|
21
|
+
} from '@hostinger/sdk';
|
|
22
|
+
|
|
23
|
+
const configuration = new Configuration();
|
|
24
|
+
const apiInstance = new HostingGitApi(configuration);
|
|
25
|
+
|
|
26
|
+
let uuid: string; //Git installation UUID from the List Git installations endpoint (default to undefined)
|
|
27
|
+
|
|
28
|
+
const { status, data } = await apiInstance.listGitInstallationRepositoriesV1(
|
|
29
|
+
uuid
|
|
30
|
+
);
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Parameters
|
|
34
|
+
|
|
35
|
+
|Name | Type | Description | Notes|
|
|
36
|
+
|------------- | ------------- | ------------- | -------------|
|
|
37
|
+
| **uuid** | [**string**] | Git installation UUID from the List Git installations endpoint | defaults to undefined|
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Return type
|
|
41
|
+
|
|
42
|
+
**Array<HostingV1GitGitRepositoryResource>**
|
|
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
|
+
|**404** | Error response | - |
|
|
59
|
+
|**429** | Error response | - |
|
|
60
|
+
|**401** | Unauthenticated response | - |
|
|
61
|
+
|**500** | Error response | - |
|
|
62
|
+
|
|
63
|
+
[[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)
|
|
64
|
+
|
|
65
|
+
# **listGitInstallationsV1**
|
|
66
|
+
> Array<HostingV1GitGitInstallationResource> listGitInstallationsV1()
|
|
67
|
+
|
|
68
|
+
Lists the Git provider accounts the customer has connected. Only installations with status `active` are returned unless the `status` filter says otherwise. An empty list means the customer has no active installation. Check `status=suspended` and `status=pending` as well. If there is none at all, GitHub has to be connected once in hPanel (Websites, Manage, Advanced, Git, Connect GitHub; or Add Website, Node.js Web App, Import Git Repository, Continue with GitHub); this endpoint then lists the new installation. Use `uuid` as the path parameter of `List Git installation repositories`.
|
|
69
|
+
|
|
70
|
+
### Example
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
import {
|
|
74
|
+
HostingGitApi,
|
|
75
|
+
Configuration
|
|
76
|
+
} from '@hostinger/sdk';
|
|
77
|
+
|
|
78
|
+
const configuration = new Configuration();
|
|
79
|
+
const apiInstance = new HostingGitApi(configuration);
|
|
80
|
+
|
|
81
|
+
let provider: 'github' | 'gitlab' | 'bitbucket'; //Filter by Git provider (optional) (default to undefined)
|
|
82
|
+
let status: 'pending' | 'active' | 'suspended'; //Filter by installation status (optional) (default to 'active')
|
|
83
|
+
|
|
84
|
+
const { status, data } = await apiInstance.listGitInstallationsV1(
|
|
85
|
+
provider,
|
|
86
|
+
status
|
|
87
|
+
);
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Parameters
|
|
91
|
+
|
|
92
|
+
|Name | Type | Description | Notes|
|
|
93
|
+
|------------- | ------------- | ------------- | -------------|
|
|
94
|
+
| **provider** | [**'github' | 'gitlab' | 'bitbucket'**]**Array<'github' | 'gitlab' | 'bitbucket'>** | Filter by Git provider | (optional) defaults to undefined|
|
|
95
|
+
| **status** | [**'pending' | 'active' | 'suspended'**]**Array<'pending' | 'active' | 'suspended'>** | Filter by installation status | (optional) defaults to 'active'|
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Return type
|
|
99
|
+
|
|
100
|
+
**Array<HostingV1GitGitInstallationResource>**
|
|
101
|
+
|
|
102
|
+
### Authorization
|
|
103
|
+
|
|
104
|
+
[apiToken](../README.md#apiToken)
|
|
105
|
+
|
|
106
|
+
### HTTP request headers
|
|
107
|
+
|
|
108
|
+
- **Content-Type**: Not defined
|
|
109
|
+
- **Accept**: application/json
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
### HTTP response details
|
|
113
|
+
| Status code | Description | Response headers |
|
|
114
|
+
|-------------|-------------|------------------|
|
|
115
|
+
|**200** | Success response | - |
|
|
116
|
+
|**422** | Validation error response | - |
|
|
117
|
+
|**401** | Unauthenticated response | - |
|
|
118
|
+
|**500** | Error response | - |
|
|
119
|
+
|
|
120
|
+
[[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)
|
|
121
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# HostingV1GitGitInstallationResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**uuid** | **string** | Installation identifier. Use it as the path parameter of List Git installation repositories. | [default to undefined]
|
|
9
|
+
**provider** | **string** | Git provider the account belongs to | [default to undefined]
|
|
10
|
+
**account_login** | **string** | Login of the connected provider account (user or organization) | [default to undefined]
|
|
11
|
+
**account_type** | **string** | Whether the connected account is a user or an organization | [default to undefined]
|
|
12
|
+
**account_avatar_url** | **string** | Avatar URL of the connected provider account | [default to undefined]
|
|
13
|
+
**status** | **string** | Installation status. Only active installations are listed unless the status filter says otherwise. | [default to undefined]
|
|
14
|
+
**installed_at** | **string** | When the provider app was installed on the account | [default to undefined]
|
|
15
|
+
**created_at** | **string** | When the installation record was created | [default to undefined]
|
|
16
|
+
**has_oauth** | **boolean** | True when the GitHub user account has a stored OAuth token whose refresh token is still valid, false when the token is missing or its refresh token expired. Null for organization accounts and for providers other than GitHub. | [default to undefined]
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { HostingV1GitGitInstallationResource } from '@hostinger/sdk';
|
|
22
|
+
|
|
23
|
+
const instance: HostingV1GitGitInstallationResource = {
|
|
24
|
+
uuid,
|
|
25
|
+
provider,
|
|
26
|
+
account_login,
|
|
27
|
+
account_type,
|
|
28
|
+
account_avatar_url,
|
|
29
|
+
status,
|
|
30
|
+
installed_at,
|
|
31
|
+
created_at,
|
|
32
|
+
has_oauth,
|
|
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,34 @@
|
|
|
1
|
+
# HostingV1GitGitRepositoryResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **number** | Repository identifier assigned by the Git provider | [default to undefined]
|
|
9
|
+
**name** | **string** | Repository name without the .git suffix | [default to undefined]
|
|
10
|
+
**full_name** | **string** | Owner and repository name joined with a slash | [default to undefined]
|
|
11
|
+
**owner** | **string** | Repository owner login | [default to undefined]
|
|
12
|
+
**is_private** | **boolean** | Whether the repository is private | [default to undefined]
|
|
13
|
+
**html_url** | **string** | Repository page URL | [default to undefined]
|
|
14
|
+
**clone_url** | **string** | HTTPS clone URL | [default to undefined]
|
|
15
|
+
**default_branch** | **string** | Default branch of the repository | [default to undefined]
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { HostingV1GitGitRepositoryResource } from '@hostinger/sdk';
|
|
21
|
+
|
|
22
|
+
const instance: HostingV1GitGitRepositoryResource = {
|
|
23
|
+
id,
|
|
24
|
+
name,
|
|
25
|
+
full_name,
|
|
26
|
+
owner,
|
|
27
|
+
is_private,
|
|
28
|
+
html_url,
|
|
29
|
+
clone_url,
|
|
30
|
+
default_branch,
|
|
31
|
+
};
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.52.
|
|
6
|
+
* API Version: 1.52.1
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|