Skip to content

Commit 7115a09

Browse files
chore: sdk update
1 parent 69a424e commit 7115a09

9 files changed

Lines changed: 194 additions & 9 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
## @hostinger/sdk@3.7.0
1+
## @hostinger/sdk@3.8.0
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@3.7.0 --save
8+
npm install @hostinger/sdk@3.8.0 --save
99
```

‎api.ts‎

Lines changed: 104 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Hostinger API
55
*
6-
* API Version: 3.7.0
6+
* API Version: 3.8.0
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
@@ -7503,6 +7503,37 @@ export const GPUV1ExposedServiceStoreRequestTypeEnum = {
75037503

75047504
export type GPUV1ExposedServiceStoreRequestTypeEnum = typeof GPUV1ExposedServiceStoreRequestTypeEnum[keyof typeof GPUV1ExposedServiceStoreRequestTypeEnum];
75057505

7506+
/**
7507+
*
7508+
* @export
7509+
* @interface GPUV1InstanceCredentialsResource
7510+
*/
7511+
export interface GPUV1InstanceCredentialsResource {
7512+
/**
7513+
* SSH host
7514+
* @type {string}
7515+
* @memberof GPUV1InstanceCredentialsResource
7516+
*/
7517+
'hostname': string;
7518+
/**
7519+
* SSH port
7520+
* @type {number}
7521+
* @memberof GPUV1InstanceCredentialsResource
7522+
*/
7523+
'port': number;
7524+
/**
7525+
* SSH username
7526+
* @type {string}
7527+
* @memberof GPUV1InstanceCredentialsResource
7528+
*/
7529+
'username': string;
7530+
/**
7531+
* SSH password
7532+
* @type {string}
7533+
* @memberof GPUV1InstanceCredentialsResource
7534+
*/
7535+
'password': string;
7536+
}
75067537
/**
75077538
*
75087539
* @export
@@ -33546,6 +33577,44 @@ export const GPUInstancesApiAxiosParamCreator = function (configuration?: Config
3354633577

3354733578

3354833579

33580+
setSearchParams(localVarUrlObj, localVarQueryParameter);
33581+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
33582+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
33583+
33584+
return {
33585+
url: toPathString(localVarUrlObj),
33586+
options: localVarRequestOptions,
33587+
};
33588+
},
33589+
/**
33590+
* Retrieve SSH connection credentials (hostname, port, username and password) of a specified GPU instance. Credentials become available once the instance is provisioned; until then the endpoint responds with `409 Conflict`, so retry later. Use this endpoint to connect to a GPU instance over SSH.
33591+
* @summary Get instance credentials
33592+
* @param {number} instanceId GPU instance ID
33593+
* @param {*} [options] Override http request option.
33594+
* @throws {RequiredError}
33595+
*/
33596+
getInstanceCredentialsV1: async (instanceId: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
33597+
// verify required parameter 'instanceId' is not null or undefined
33598+
assertParamExists('getInstanceCredentialsV1', 'instanceId', instanceId)
33599+
const localVarPath = `/api/gpu/v1/instances/{instanceId}/credentials`
33600+
.replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId));
33601+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
33602+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
33603+
let baseOptions;
33604+
if (configuration) {
33605+
baseOptions = configuration.baseOptions;
33606+
}
33607+
33608+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
33609+
const localVarHeaderParameter = {} as any;
33610+
const localVarQueryParameter = {} as any;
33611+
33612+
// authentication apiToken required
33613+
// http bearer authentication required
33614+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
33615+
33616+
33617+
3354933618
setSearchParams(localVarUrlObj, localVarQueryParameter);
3355033619
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3355133620
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -33699,6 +33768,18 @@ export const GPUInstancesApiFp = function(configuration?: Configuration) {
3369933768
const localVarOperationServerBasePath = operationServerMap['GPUInstancesApi.deleteInstanceV1']?.[0]?.url;
3370033769
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3370133770
},
33771+
/**
33772+
* Retrieve SSH connection credentials (hostname, port, username and password) of a specified GPU instance. Credentials become available once the instance is provisioned; until then the endpoint responds with `409 Conflict`, so retry later. Use this endpoint to connect to a GPU instance over SSH.
33773+
* @summary Get instance credentials
33774+
* @param {number} instanceId GPU instance ID
33775+
* @param {*} [options] Override http request option.
33776+
* @throws {RequiredError}
33777+
*/
33778+
async getInstanceCredentialsV1(instanceId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GPUV1InstanceCredentialsResource>> {
33779+
const localVarAxiosArgs = await localVarAxiosParamCreator.getInstanceCredentialsV1(instanceId, options);
33780+
const localVarOperationServerBasePath = operationServerMap['GPUInstancesApi.getInstanceCredentialsV1']?.[0]?.url;
33781+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
33782+
},
3370233783
/**
3370333784
* Retrieve detailed information about a specified GPU instance, including its SSH keys. Use this endpoint to follow the instance `status` after creating or deleting it.
3370433785
* @summary Get instance details
@@ -33764,6 +33845,16 @@ export const GPUInstancesApiFactory = function (configuration?: Configuration, b
3376433845
deleteInstanceV1(instanceId: number, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
3376533846
return localVarFp.deleteInstanceV1(instanceId, options).then((request) => request(axios, basePath));
3376633847
},
33848+
/**
33849+
* Retrieve SSH connection credentials (hostname, port, username and password) of a specified GPU instance. Credentials become available once the instance is provisioned; until then the endpoint responds with `409 Conflict`, so retry later. Use this endpoint to connect to a GPU instance over SSH.
33850+
* @summary Get instance credentials
33851+
* @param {number} instanceId GPU instance ID
33852+
* @param {*} [options] Override http request option.
33853+
* @throws {RequiredError}
33854+
*/
33855+
getInstanceCredentialsV1(instanceId: number, options?: RawAxiosRequestConfig): AxiosPromise<GPUV1InstanceCredentialsResource> {
33856+
return localVarFp.getInstanceCredentialsV1(instanceId, options).then((request) => request(axios, basePath));
33857+
},
3376733858
/**
3376833859
* Retrieve detailed information about a specified GPU instance, including its SSH keys. Use this endpoint to follow the instance `status` after creating or deleting it.
3376933860
* @summary Get instance details
@@ -33827,6 +33918,18 @@ export class GPUInstancesApi extends BaseAPI {
3382733918
return GPUInstancesApiFp(this.configuration).deleteInstanceV1(instanceId, options).then((request) => request(this.axios, this.basePath));
3382833919
}
3382933920

33921+
/**
33922+
* Retrieve SSH connection credentials (hostname, port, username and password) of a specified GPU instance. Credentials become available once the instance is provisioned; until then the endpoint responds with `409 Conflict`, so retry later. Use this endpoint to connect to a GPU instance over SSH.
33923+
* @summary Get instance credentials
33924+
* @param {number} instanceId GPU instance ID
33925+
* @param {*} [options] Override http request option.
33926+
* @throws {RequiredError}
33927+
* @memberof GPUInstancesApi
33928+
*/
33929+
public getInstanceCredentialsV1(instanceId: number, options?: RawAxiosRequestConfig) {
33930+
return GPUInstancesApiFp(this.configuration).getInstanceCredentialsV1(instanceId, options).then((request) => request(this.axios, this.basePath));
33931+
}
33932+
3383033933
/**
3383133934
* Retrieve detailed information about a specified GPU instance, including its SSH keys. Use this endpoint to follow the instance `status` after creating or deleting it.
3383233935
* @summary Get instance details

‎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: 3.7.0
6+
* API Version: 3.8.0
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: 3.7.0
6+
* API Version: 3.8.0
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: 3.7.0
6+
* API Version: 3.8.0
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/3.7.0",
51+
'User-Agent': "hostinger-typescript-sdk/3.8.0",
5252
...param.baseOptions?.headers,
5353
},
5454
};

‎docs/GPUInstancesApi.md‎

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ All URIs are relative to *https://developers.hostinger.com*
66
|------------- | ------------- | -------------|
77
|[**createInstanceV1**](#createinstancev1) | **POST** /api/gpu/v1/instances | Create instance|
88
|[**deleteInstanceV1**](#deleteinstancev1) | **DELETE** /api/gpu/v1/instances/{instanceId} | Delete instance|
9+
|[**getInstanceCredentialsV1**](#getinstancecredentialsv1) | **GET** /api/gpu/v1/instances/{instanceId}/credentials | Get instance credentials|
910
|[**getInstanceDetailsV1**](#getinstancedetailsv1) | **GET** /api/gpu/v1/instances/{instanceId} | Get instance details|
1011
|[**getInstanceMetricsV1**](#getinstancemetricsv1) | **GET** /api/gpu/v1/instances/{instanceId}/metrics | Get instance metrics|
1112
|[**getInstancesV1**](#getinstancesv1) | **GET** /api/gpu/v1/instances | Get instances|
@@ -119,6 +120,61 @@ const { status, data } = await apiInstance.deleteInstanceV1(
119120

120121
[[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)
121122

123+
# **getInstanceCredentialsV1**
124+
> GPUV1InstanceCredentialsResource getInstanceCredentialsV1()
125+
126+
Retrieve SSH connection credentials (hostname, port, username and password) of a specified GPU instance. Credentials become available once the instance is provisioned; until then the endpoint responds with `409 Conflict`, so retry later. Use this endpoint to connect to a GPU instance over SSH.
127+
128+
### Example
129+
130+
```typescript
131+
import {
132+
GPUInstancesApi,
133+
Configuration
134+
} from '@hostinger/sdk';
135+
136+
const configuration = new Configuration();
137+
const apiInstance = new GPUInstancesApi(configuration);
138+
139+
let instanceId: number; //GPU instance ID (default to undefined)
140+
141+
const { status, data } = await apiInstance.getInstanceCredentialsV1(
142+
instanceId
143+
);
144+
```
145+
146+
### Parameters
147+
148+
|Name | Type | Description | Notes|
149+
|------------- | ------------- | ------------- | -------------|
150+
| **instanceId** | [**number**] | GPU instance ID | defaults to undefined|
151+
152+
153+
### Return type
154+
155+
**GPUV1InstanceCredentialsResource**
156+
157+
### Authorization
158+
159+
[apiToken](../README.md#apiToken)
160+
161+
### HTTP request headers
162+
163+
- **Content-Type**: Not defined
164+
- **Accept**: application/json
165+
166+
167+
### HTTP response details
168+
| Status code | Description | Response headers |
169+
|-------------|-------------|------------------|
170+
|**200** | Success response | - |
171+
|**401** | Unauthenticated response | - |
172+
|**404** | Error response | - |
173+
|**409** | Conflict response. &#x60;Retry-After&#x60;, when present, is the number of seconds to wait before retrying. | * Retry-After - Seconds to wait before retrying the request <br> |
174+
|**500** | Error response | - |
175+
176+
[[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)
177+
122178
# **getInstanceDetailsV1**
123179
> GPUV1InstanceInstanceResource getInstanceDetailsV1()
124180
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# GPUV1InstanceCredentialsResource
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**hostname** | **string** | SSH host | [optional] [default to undefined]
9+
**port** | **number** | SSH port | [optional] [default to undefined]
10+
**username** | **string** | SSH username | [optional] [default to undefined]
11+
**password** | **string** | SSH password | [optional] [default to undefined]
12+
13+
## Example
14+
15+
```typescript
16+
import { GPUV1InstanceCredentialsResource } from '@hostinger/sdk';
17+
18+
const instance: GPUV1InstanceCredentialsResource = {
19+
hostname,
20+
port,
21+
username,
22+
password,
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)

‎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: 3.7.0
6+
* API Version: 3.8.0
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": "3.7.0",
3+
"version": "3.8.0",
44
"description": "Hostinger API TypeScript SDK",
55
"author": "Hostinger",
66
"repository": {

0 commit comments

Comments
 (0)