hostinger-api-sdk 2.6.3 → 2.7.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.
@@ -0,0 +1,219 @@
1
+ # GPUCatalogApi
2
+
3
+ All URIs are relative to *https://developers.hostinger.com*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**getPoolGroupsV1**](#getpoolgroupsv1) | **GET** /api/gpu/v1/pools/groups | Get pool groups|
8
+ |[**getPoolInstanceTypesV1**](#getpoolinstancetypesv1) | **GET** /api/gpu/v1/pools/{poolId}/instances | Get pool instance types|
9
+ |[**getPoolListV1**](#getpoollistv1) | **GET** /api/gpu/v1/pools | Get pool list|
10
+ |[**getPoolOSTemplatesV1**](#getpoolostemplatesv1) | **GET** /api/gpu/v1/pools/{poolId}/instances/{poolInstanceId}/os-templates | Get pool OS templates|
11
+
12
+ # **getPoolGroupsV1**
13
+ > Array<GPUV1PoolPoolGroupResource> getPoolGroupsV1()
14
+
15
+ Retrieve GPU pool groups, ordered by name. Each group bundles the pools of one GPU model and lists its currently available pools, whether any of them is available and the lowest hourly price among its instance types. The price is returned even when the group is out of stock. Use this endpoint to show which GPU models can be ordered and from what price.
16
+
17
+ ### Example
18
+
19
+ ```typescript
20
+ import {
21
+ GPUCatalogApi,
22
+ Configuration
23
+ } from '@hostinger/sdk';
24
+
25
+ const configuration = new Configuration();
26
+ const apiInstance = new GPUCatalogApi(configuration);
27
+
28
+ let currency: 'USD' | 'ARS' | 'AMD' | 'AUD' | 'AZN' | 'BDT' | 'BRL' | 'BTC' | 'BYN' | 'CAD' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CZK' | 'DKK' | 'EGP' | 'EUR' | 'GBP' | 'GEL' | 'HKD' | 'HRK' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'JPY' | 'KGS' | 'KRW' | 'KZT' | 'MAD' | 'MXN' | 'MYR' | 'NGN' | 'NOK' | 'NZD' | 'PEN' | 'PHP' | 'PKR' | 'PLN' | 'SEK' | 'SGD' | 'THB' | 'TJS' | 'TRY' | 'TWD' | 'UAH' | 'VND' | 'ZAR'; //Currency of the returned prices, `USD` by default (optional) (default to undefined)
29
+
30
+ const { status, data } = await apiInstance.getPoolGroupsV1(
31
+ currency
32
+ );
33
+ ```
34
+
35
+ ### Parameters
36
+
37
+ |Name | Type | Description | Notes|
38
+ |------------- | ------------- | ------------- | -------------|
39
+ | **currency** | [**&#39;USD&#39; | &#39;ARS&#39; | &#39;AMD&#39; | &#39;AUD&#39; | &#39;AZN&#39; | &#39;BDT&#39; | &#39;BRL&#39; | &#39;BTC&#39; | &#39;BYN&#39; | &#39;CAD&#39; | &#39;CHF&#39; | &#39;CLP&#39; | &#39;CNY&#39; | &#39;COP&#39; | &#39;CZK&#39; | &#39;DKK&#39; | &#39;EGP&#39; | &#39;EUR&#39; | &#39;GBP&#39; | &#39;GEL&#39; | &#39;HKD&#39; | &#39;HRK&#39; | &#39;HUF&#39; | &#39;IDR&#39; | &#39;ILS&#39; | &#39;INR&#39; | &#39;JPY&#39; | &#39;KGS&#39; | &#39;KRW&#39; | &#39;KZT&#39; | &#39;MAD&#39; | &#39;MXN&#39; | &#39;MYR&#39; | &#39;NGN&#39; | &#39;NOK&#39; | &#39;NZD&#39; | &#39;PEN&#39; | &#39;PHP&#39; | &#39;PKR&#39; | &#39;PLN&#39; | &#39;SEK&#39; | &#39;SGD&#39; | &#39;THB&#39; | &#39;TJS&#39; | &#39;TRY&#39; | &#39;TWD&#39; | &#39;UAH&#39; | &#39;VND&#39; | &#39;ZAR&#39;**]**Array<&#39;USD&#39; &#124; &#39;ARS&#39; &#124; &#39;AMD&#39; &#124; &#39;AUD&#39; &#124; &#39;AZN&#39; &#124; &#39;BDT&#39; &#124; &#39;BRL&#39; &#124; &#39;BTC&#39; &#124; &#39;BYN&#39; &#124; &#39;CAD&#39; &#124; &#39;CHF&#39; &#124; &#39;CLP&#39; &#124; &#39;CNY&#39; &#124; &#39;COP&#39; &#124; &#39;CZK&#39; &#124; &#39;DKK&#39; &#124; &#39;EGP&#39; &#124; &#39;EUR&#39; &#124; &#39;GBP&#39; &#124; &#39;GEL&#39; &#124; &#39;HKD&#39; &#124; &#39;HRK&#39; &#124; &#39;HUF&#39; &#124; &#39;IDR&#39; &#124; &#39;ILS&#39; &#124; &#39;INR&#39; &#124; &#39;JPY&#39; &#124; &#39;KGS&#39; &#124; &#39;KRW&#39; &#124; &#39;KZT&#39; &#124; &#39;MAD&#39; &#124; &#39;MXN&#39; &#124; &#39;MYR&#39; &#124; &#39;NGN&#39; &#124; &#39;NOK&#39; &#124; &#39;NZD&#39; &#124; &#39;PEN&#39; &#124; &#39;PHP&#39; &#124; &#39;PKR&#39; &#124; &#39;PLN&#39; &#124; &#39;SEK&#39; &#124; &#39;SGD&#39; &#124; &#39;THB&#39; &#124; &#39;TJS&#39; &#124; &#39;TRY&#39; &#124; &#39;TWD&#39; &#124; &#39;UAH&#39; &#124; &#39;VND&#39; &#124; &#39;ZAR&#39;>** | Currency of the returned prices, &#x60;USD&#x60; by default | (optional) defaults to undefined|
40
+
41
+
42
+ ### Return type
43
+
44
+ **Array<GPUV1PoolPoolGroupResource>**
45
+
46
+ ### Authorization
47
+
48
+ [apiToken](../README.md#apiToken)
49
+
50
+ ### HTTP request headers
51
+
52
+ - **Content-Type**: Not defined
53
+ - **Accept**: application/json
54
+
55
+
56
+ ### HTTP response details
57
+ | Status code | Description | Response headers |
58
+ |-------------|-------------|------------------|
59
+ |**200** | Success 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
+ # **getPoolInstanceTypesV1**
66
+ > Array<GPUV1PoolPoolInstanceResource> getPoolInstanceTypesV1()
67
+
68
+ Retrieve the instance types offered by a specified GPU pool, ordered by CPU core count. Each instance type describes its CPU, memory and storage, and its hourly price. Only instance types that can currently be ordered are returned. Use this endpoint to choose the `pool_instance_id` for a new GPU instance.
69
+
70
+ ### Example
71
+
72
+ ```typescript
73
+ import {
74
+ GPUCatalogApi,
75
+ Configuration
76
+ } from '@hostinger/sdk';
77
+
78
+ const configuration = new Configuration();
79
+ const apiInstance = new GPUCatalogApi(configuration);
80
+
81
+ let poolId: number; //GPU pool ID (default to undefined)
82
+
83
+ const { status, data } = await apiInstance.getPoolInstanceTypesV1(
84
+ poolId
85
+ );
86
+ ```
87
+
88
+ ### Parameters
89
+
90
+ |Name | Type | Description | Notes|
91
+ |------------- | ------------- | ------------- | -------------|
92
+ | **poolId** | [**number**] | GPU pool ID | defaults to undefined|
93
+
94
+
95
+ ### Return type
96
+
97
+ **Array<GPUV1PoolPoolInstanceResource>**
98
+
99
+ ### Authorization
100
+
101
+ [apiToken](../README.md#apiToken)
102
+
103
+ ### HTTP request headers
104
+
105
+ - **Content-Type**: Not defined
106
+ - **Accept**: application/json
107
+
108
+
109
+ ### HTTP response details
110
+ | Status code | Description | Response headers |
111
+ |-------------|-------------|------------------|
112
+ |**200** | Success response | - |
113
+ |**401** | Unauthenticated response | - |
114
+ |**500** | Error response | - |
115
+
116
+ [[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)
117
+
118
+ # **getPoolListV1**
119
+ > Array<GPUV1PoolPoolResource> getPoolListV1()
120
+
121
+ Retrieve all available GPU pools, ordered by name. A pool serves GPU accelerators of one model from a single region. Use this endpoint to choose a pool before listing its instance types.
122
+
123
+ ### Example
124
+
125
+ ```typescript
126
+ import {
127
+ GPUCatalogApi,
128
+ Configuration
129
+ } from '@hostinger/sdk';
130
+
131
+ const configuration = new Configuration();
132
+ const apiInstance = new GPUCatalogApi(configuration);
133
+
134
+ const { status, data } = await apiInstance.getPoolListV1();
135
+ ```
136
+
137
+ ### Parameters
138
+ This endpoint does not have any parameters.
139
+
140
+
141
+ ### Return type
142
+
143
+ **Array<GPUV1PoolPoolResource>**
144
+
145
+ ### Authorization
146
+
147
+ [apiToken](../README.md#apiToken)
148
+
149
+ ### HTTP request headers
150
+
151
+ - **Content-Type**: Not defined
152
+ - **Accept**: application/json
153
+
154
+
155
+ ### HTTP response details
156
+ | Status code | Description | Response headers |
157
+ |-------------|-------------|------------------|
158
+ |**200** | Success response | - |
159
+ |**401** | Unauthenticated response | - |
160
+ |**500** | Error response | - |
161
+
162
+ [[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)
163
+
164
+ # **getPoolOSTemplatesV1**
165
+ > Array<GPUV1OsTemplateOsTemplateResource> getPoolOSTemplatesV1()
166
+
167
+ Retrieve the OS templates that can be installed on a specified GPU pool instance type. Use this endpoint to choose the `os_template_id` for a new GPU instance.
168
+
169
+ ### Example
170
+
171
+ ```typescript
172
+ import {
173
+ GPUCatalogApi,
174
+ Configuration
175
+ } from '@hostinger/sdk';
176
+
177
+ const configuration = new Configuration();
178
+ const apiInstance = new GPUCatalogApi(configuration);
179
+
180
+ let poolId: number; //GPU pool ID (default to undefined)
181
+ let poolInstanceId: number; //GPU pool instance type ID (default to undefined)
182
+
183
+ const { status, data } = await apiInstance.getPoolOSTemplatesV1(
184
+ poolId,
185
+ poolInstanceId
186
+ );
187
+ ```
188
+
189
+ ### Parameters
190
+
191
+ |Name | Type | Description | Notes|
192
+ |------------- | ------------- | ------------- | -------------|
193
+ | **poolId** | [**number**] | GPU pool ID | defaults to undefined|
194
+ | **poolInstanceId** | [**number**] | GPU pool instance type ID | defaults to undefined|
195
+
196
+
197
+ ### Return type
198
+
199
+ **Array<GPUV1OsTemplateOsTemplateResource>**
200
+
201
+ ### Authorization
202
+
203
+ [apiToken](../README.md#apiToken)
204
+
205
+ ### HTTP request headers
206
+
207
+ - **Content-Type**: Not defined
208
+ - **Accept**: application/json
209
+
210
+
211
+ ### HTTP response details
212
+ | Status code | Description | Response headers |
213
+ |-------------|-------------|------------------|
214
+ |**200** | Success response | - |
215
+ |**401** | Unauthenticated response | - |
216
+ |**500** | Error response | - |
217
+
218
+ [[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)
219
+
@@ -0,0 +1,30 @@
1
+ # GPUV1OsTemplateOsTemplateResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **number** | OS template ID | [optional] [default to undefined]
9
+ **name** | **string** | | [optional] [default to undefined]
10
+ **kb_url** | **string** | Knowledge base article about the template | [optional] [default to undefined]
11
+ **image** | **string** | Icon image ID | [optional] [default to undefined]
12
+ **dark_image_id** | **string** | Dark theme icon image ID | [optional] [default to undefined]
13
+ **light_image_id** | **string** | Light theme icon image ID | [optional] [default to undefined]
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import { GPUV1OsTemplateOsTemplateResource } from '@hostinger/sdk';
19
+
20
+ const instance: GPUV1OsTemplateOsTemplateResource = {
21
+ id,
22
+ name,
23
+ kb_url,
24
+ image,
25
+ dark_image_id,
26
+ light_image_id,
27
+ };
28
+ ```
29
+
30
+ [[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,30 @@
1
+ # GPUV1PoolPoolGroupResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **number** | GPU pool group ID | [optional] [default to undefined]
9
+ **name** | **string** | | [optional] [default to undefined]
10
+ **vram** | **number** | Total VRAM in bytes | [optional] [default to undefined]
11
+ **is_available** | **boolean** | Whether the group has any available pools | [optional] [default to undefined]
12
+ **min_price_per_hour** | **number** | Lowest hourly price of the group instance types, in the requested currency | [optional] [default to undefined]
13
+ **pools** | [**Array&lt;GPUV1PoolPoolResource&gt;**](GPUV1PoolPoolResource.md) | Array of [&#x60;GPU.V1.Pool.PoolResource&#x60;](#model/gpuv1poolpoolresource) | [optional] [default to undefined]
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import { GPUV1PoolPoolGroupResource } from '@hostinger/sdk';
19
+
20
+ const instance: GPUV1PoolPoolGroupResource = {
21
+ id,
22
+ name,
23
+ vram,
24
+ is_available,
25
+ min_price_per_hour,
26
+ pools,
27
+ };
28
+ ```
29
+
30
+ [[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,32 @@
1
+ # GPUV1PoolPoolInstanceResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **number** | GPU pool instance type ID | [optional] [default to undefined]
9
+ **name** | **string** | | [optional] [default to undefined]
10
+ **description** | **string** | | [optional] [default to undefined]
11
+ **cpu_cores** | **number** | Number of CPU cores | [optional] [default to undefined]
12
+ **ram** | **number** | Total RAM in bytes | [optional] [default to undefined]
13
+ **storage** | **number** | Total storage in bytes | [optional] [default to undefined]
14
+ **price_per_hour** | **number** | Hourly price in cents (USD) | [optional] [default to undefined]
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import { GPUV1PoolPoolInstanceResource } from '@hostinger/sdk';
20
+
21
+ const instance: GPUV1PoolPoolInstanceResource = {
22
+ id,
23
+ name,
24
+ description,
25
+ cpu_cores,
26
+ ram,
27
+ storage,
28
+ price_per_hour,
29
+ };
30
+ ```
31
+
32
+ [[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,30 @@
1
+ # GPUV1PoolPoolResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **number** | GPU pool ID | [optional] [default to undefined]
9
+ **name** | **string** | | [optional] [default to undefined]
10
+ **gpus** | **number** | Number of GPUs | [optional] [default to undefined]
11
+ **vram** | **number** | Total VRAM in bytes | [optional] [default to undefined]
12
+ **is_available** | **boolean** | Whether the pool has available instances for booking | [optional] [default to undefined]
13
+ **region** | [**GPUV1RegionRegionResource**](GPUV1RegionRegionResource.md) | | [optional] [default to undefined]
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import { GPUV1PoolPoolResource } from '@hostinger/sdk';
19
+
20
+ const instance: GPUV1PoolPoolResource = {
21
+ id,
22
+ name,
23
+ gpus,
24
+ vram,
25
+ is_available,
26
+ region,
27
+ };
28
+ ```
29
+
30
+ [[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,26 @@
1
+ # GPUV1RegionRegionResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **number** | Region ID | [optional] [default to undefined]
9
+ **name** | **string** | Region name | [optional] [default to undefined]
10
+ **city** | **string** | | [optional] [default to undefined]
11
+ **country** | **string** | ISO 3166-1 alpha-2 country code | [optional] [default to undefined]
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import { GPUV1RegionRegionResource } from '@hostinger/sdk';
17
+
18
+ const instance: GPUV1RegionRegionResource = {
19
+ id,
20
+ name,
21
+ city,
22
+ country,
23
+ };
24
+ ```
25
+
26
+ [[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: 2.6.2
6
+ * API Version: 2.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hostinger-api-sdk",
3
- "version": "2.6.3",
3
+ "version": "2.7.0",
4
4
  "description": "Hostinger API TypeScript SDK",
5
5
  "author": "Hostinger",
6
6
  "repository": {