Skip to content

Commit fa4079a

Browse files
chore: sdk update
1 parent b82388c commit fa4079a

10 files changed

Lines changed: 548 additions & 9 deletions

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
## @hostinger/sdk@1.52.0
1+
## @hostinger/sdk@1.52.1
22

33
For more information, please visit [https://developers.hostinger.com](https://developers.hostinger.com).
44

55
### Usage
66

77
```
8-
npm install @hostinger/sdk@1.52.0 --save
8+
npm install @hostinger/sdk@1.52.1 --save
99
```

api.ts

Lines changed: 349 additions & 1 deletion
Large diffs are not rendered by default.

base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Hostinger API
55
*
6-
* API Version: 1.52.0
6+
* API Version: 1.52.1
77
*
88
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Hostinger API
55
*
6-
* API Version: 1.52.0
6+
* API Version: 1.52.1
77
*
88
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

configuration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Hostinger API
55
*
6-
* API Version: 1.52.0
6+
* API Version: 1.52.1
77
*
88
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
* 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 {
4848
this.baseOptions = {
4949
...param.baseOptions,
5050
headers: {
51-
'User-Agent': "hostinger-typescript-sdk/1.52.0",
51+
'User-Agent': "hostinger-typescript-sdk/1.52.1",
5252
...param.baseOptions?.headers,
5353
},
5454
};

docs/HostingGitApi.md

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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** | [**&#39;github&#39; | &#39;gitlab&#39; | &#39;bitbucket&#39;**]**Array<&#39;github&#39; &#124; &#39;gitlab&#39; &#124; &#39;bitbucket&#39;>** | Filter by Git provider | (optional) defaults to undefined|
95+
| **status** | [**&#39;pending&#39; | &#39;active&#39; | &#39;suspended&#39;**]**Array<&#39;pending&#39; &#124; &#39;active&#39; &#124; &#39;suspended&#39;>** | 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+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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)

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Hostinger API
55
*
6-
* API Version: 1.52.0
6+
* API Version: 1.52.1
77
*
88
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hostinger/sdk",
3-
"version": "1.52.0",
3+
"version": "1.52.1",
44
"description": "Hostinger API TypeScript SDK",
55
"author": "Hostinger",
66
"repository": {

0 commit comments

Comments
 (0)