hostinger-api-sdk 2.15.0 → 2.16.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.
- package/README.md +2 -2
- package/api.ts +380 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +234 -1
- package/dist/api.js +287 -14
- 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 +234 -1
- package/dist/esm/api.js +270 -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/GPUExposedServicesApi.md +177 -0
- package/docs/GPUV1ExposedServiceExposedServiceResource.md +32 -0
- package/docs/GPUV1ExposedServiceStoreRequest.md +26 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
## @hostinger/sdk@2.
|
|
1
|
+
## @hostinger/sdk@2.16.0
|
|
2
2
|
|
|
3
3
|
For more information, please visit [https://developers.hostinger.com](https://developers.hostinger.com).
|
|
4
4
|
|
|
5
5
|
### Usage
|
|
6
6
|
|
|
7
7
|
```
|
|
8
|
-
npm install @hostinger/sdk@2.
|
|
8
|
+
npm install @hostinger/sdk@2.16.0 --save
|
|
9
9
|
```
|
package/api.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.
|
|
6
|
+
* API Version: 2.16.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
|
|
@@ -7011,6 +7011,114 @@ export interface EcommerceV1VariantVariantResponseResource {
|
|
|
7011
7011
|
*/
|
|
7012
7012
|
'data': EcommerceV1VariantVariantResource;
|
|
7013
7013
|
}
|
|
7014
|
+
/**
|
|
7015
|
+
*
|
|
7016
|
+
* @export
|
|
7017
|
+
* @interface GPUV1ExposedServiceExposedServiceResource
|
|
7018
|
+
*/
|
|
7019
|
+
export interface GPUV1ExposedServiceExposedServiceResource {
|
|
7020
|
+
/**
|
|
7021
|
+
* Exposed service ID
|
|
7022
|
+
* @type {number}
|
|
7023
|
+
* @memberof GPUV1ExposedServiceExposedServiceResource
|
|
7024
|
+
*/
|
|
7025
|
+
'id': number;
|
|
7026
|
+
/**
|
|
7027
|
+
*
|
|
7028
|
+
* @type {string}
|
|
7029
|
+
* @memberof GPUV1ExposedServiceExposedServiceResource
|
|
7030
|
+
*/
|
|
7031
|
+
'name': string;
|
|
7032
|
+
/**
|
|
7033
|
+
* Public hostname or IP address of the service
|
|
7034
|
+
* @type {string}
|
|
7035
|
+
* @memberof GPUV1ExposedServiceExposedServiceResource
|
|
7036
|
+
*/
|
|
7037
|
+
'hostname': string;
|
|
7038
|
+
/**
|
|
7039
|
+
* Port the service listens on inside the instance
|
|
7040
|
+
* @type {number}
|
|
7041
|
+
* @memberof GPUV1ExposedServiceExposedServiceResource
|
|
7042
|
+
*/
|
|
7043
|
+
'internal_port': number;
|
|
7044
|
+
/**
|
|
7045
|
+
* Public port the service is reachable on
|
|
7046
|
+
* @type {number}
|
|
7047
|
+
* @memberof GPUV1ExposedServiceExposedServiceResource
|
|
7048
|
+
*/
|
|
7049
|
+
'external_port': number;
|
|
7050
|
+
/**
|
|
7051
|
+
*
|
|
7052
|
+
* @type {string}
|
|
7053
|
+
* @memberof GPUV1ExposedServiceExposedServiceResource
|
|
7054
|
+
*/
|
|
7055
|
+
'protocol': GPUV1ExposedServiceExposedServiceResourceProtocolEnum;
|
|
7056
|
+
/**
|
|
7057
|
+
*
|
|
7058
|
+
* @type {string}
|
|
7059
|
+
* @memberof GPUV1ExposedServiceExposedServiceResource
|
|
7060
|
+
*/
|
|
7061
|
+
'type': GPUV1ExposedServiceExposedServiceResourceTypeEnum;
|
|
7062
|
+
}
|
|
7063
|
+
|
|
7064
|
+
export const GPUV1ExposedServiceExposedServiceResourceProtocolEnum = {
|
|
7065
|
+
Tcp: 'tcp',
|
|
7066
|
+
Udp: 'udp'
|
|
7067
|
+
} as const;
|
|
7068
|
+
|
|
7069
|
+
export type GPUV1ExposedServiceExposedServiceResourceProtocolEnum = typeof GPUV1ExposedServiceExposedServiceResourceProtocolEnum[keyof typeof GPUV1ExposedServiceExposedServiceResourceProtocolEnum];
|
|
7070
|
+
export const GPUV1ExposedServiceExposedServiceResourceTypeEnum = {
|
|
7071
|
+
Http: 'http',
|
|
7072
|
+
Https: 'https'
|
|
7073
|
+
} as const;
|
|
7074
|
+
|
|
7075
|
+
export type GPUV1ExposedServiceExposedServiceResourceTypeEnum = typeof GPUV1ExposedServiceExposedServiceResourceTypeEnum[keyof typeof GPUV1ExposedServiceExposedServiceResourceTypeEnum];
|
|
7076
|
+
|
|
7077
|
+
/**
|
|
7078
|
+
*
|
|
7079
|
+
* @export
|
|
7080
|
+
* @interface GPUV1ExposedServiceStoreRequest
|
|
7081
|
+
*/
|
|
7082
|
+
export interface GPUV1ExposedServiceStoreRequest {
|
|
7083
|
+
/**
|
|
7084
|
+
* Service name, unique within the instance
|
|
7085
|
+
* @type {string}
|
|
7086
|
+
* @memberof GPUV1ExposedServiceStoreRequest
|
|
7087
|
+
*/
|
|
7088
|
+
'name': string;
|
|
7089
|
+
/**
|
|
7090
|
+
* Port the service listens on inside the instance, unique within the instance
|
|
7091
|
+
* @type {number}
|
|
7092
|
+
* @memberof GPUV1ExposedServiceStoreRequest
|
|
7093
|
+
*/
|
|
7094
|
+
'internal_port': number;
|
|
7095
|
+
/**
|
|
7096
|
+
*
|
|
7097
|
+
* @type {string}
|
|
7098
|
+
* @memberof GPUV1ExposedServiceStoreRequest
|
|
7099
|
+
*/
|
|
7100
|
+
'protocol': GPUV1ExposedServiceStoreRequestProtocolEnum;
|
|
7101
|
+
/**
|
|
7102
|
+
*
|
|
7103
|
+
* @type {string}
|
|
7104
|
+
* @memberof GPUV1ExposedServiceStoreRequest
|
|
7105
|
+
*/
|
|
7106
|
+
'type': GPUV1ExposedServiceStoreRequestTypeEnum;
|
|
7107
|
+
}
|
|
7108
|
+
|
|
7109
|
+
export const GPUV1ExposedServiceStoreRequestProtocolEnum = {
|
|
7110
|
+
Tcp: 'tcp',
|
|
7111
|
+
Udp: 'udp'
|
|
7112
|
+
} as const;
|
|
7113
|
+
|
|
7114
|
+
export type GPUV1ExposedServiceStoreRequestProtocolEnum = typeof GPUV1ExposedServiceStoreRequestProtocolEnum[keyof typeof GPUV1ExposedServiceStoreRequestProtocolEnum];
|
|
7115
|
+
export const GPUV1ExposedServiceStoreRequestTypeEnum = {
|
|
7116
|
+
Http: 'http',
|
|
7117
|
+
Https: 'https'
|
|
7118
|
+
} as const;
|
|
7119
|
+
|
|
7120
|
+
export type GPUV1ExposedServiceStoreRequestTypeEnum = typeof GPUV1ExposedServiceStoreRequestTypeEnum[keyof typeof GPUV1ExposedServiceStoreRequestTypeEnum];
|
|
7121
|
+
|
|
7014
7122
|
/**
|
|
7015
7123
|
*
|
|
7016
7124
|
* @export
|
|
@@ -32137,6 +32245,277 @@ export const GetPoolGroupsV1CurrencyEnum = {
|
|
|
32137
32245
|
export type GetPoolGroupsV1CurrencyEnum = typeof GetPoolGroupsV1CurrencyEnum[keyof typeof GetPoolGroupsV1CurrencyEnum];
|
|
32138
32246
|
|
|
32139
32247
|
|
|
32248
|
+
/**
|
|
32249
|
+
* GPUExposedServicesApi - axios parameter creator
|
|
32250
|
+
* @export
|
|
32251
|
+
*/
|
|
32252
|
+
export const GPUExposedServicesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
32253
|
+
return {
|
|
32254
|
+
/**
|
|
32255
|
+
* Expose a service running on a specified GPU instance to the internet. The service is exposed asynchronously: a successful request returns immediately, and the service appears in the exposed services list once it gets its public hostname and external port. Fails when the instance already has the maximum of 4 exposed services. Use this endpoint to make an application on your GPU instance publicly reachable.
|
|
32256
|
+
* @summary Create exposed service
|
|
32257
|
+
* @param {number} instanceId GPU instance ID
|
|
32258
|
+
* @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
|
|
32259
|
+
* @param {*} [options] Override http request option.
|
|
32260
|
+
* @throws {RequiredError}
|
|
32261
|
+
*/
|
|
32262
|
+
createExposedServiceV1: async (instanceId: number, gPUV1ExposedServiceStoreRequest: GPUV1ExposedServiceStoreRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
32263
|
+
// verify required parameter 'instanceId' is not null or undefined
|
|
32264
|
+
assertParamExists('createExposedServiceV1', 'instanceId', instanceId)
|
|
32265
|
+
// verify required parameter 'gPUV1ExposedServiceStoreRequest' is not null or undefined
|
|
32266
|
+
assertParamExists('createExposedServiceV1', 'gPUV1ExposedServiceStoreRequest', gPUV1ExposedServiceStoreRequest)
|
|
32267
|
+
const localVarPath = `/api/gpu/v1/instances/{instanceId}/exposed-services`
|
|
32268
|
+
.replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId));
|
|
32269
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
32270
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
32271
|
+
let baseOptions;
|
|
32272
|
+
if (configuration) {
|
|
32273
|
+
baseOptions = configuration.baseOptions;
|
|
32274
|
+
}
|
|
32275
|
+
|
|
32276
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
32277
|
+
const localVarHeaderParameter = {} as any;
|
|
32278
|
+
const localVarQueryParameter = {} as any;
|
|
32279
|
+
|
|
32280
|
+
// authentication apiToken required
|
|
32281
|
+
// http bearer authentication required
|
|
32282
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
32283
|
+
|
|
32284
|
+
|
|
32285
|
+
|
|
32286
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
32287
|
+
|
|
32288
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
32289
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
32290
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
32291
|
+
localVarRequestOptions.data = serializeDataIfNeeded(gPUV1ExposedServiceStoreRequest, localVarRequestOptions, configuration)
|
|
32292
|
+
|
|
32293
|
+
return {
|
|
32294
|
+
url: toPathString(localVarUrlObj),
|
|
32295
|
+
options: localVarRequestOptions,
|
|
32296
|
+
};
|
|
32297
|
+
},
|
|
32298
|
+
/**
|
|
32299
|
+
* Delete a specified exposed service of a GPU instance. The service is removed asynchronously: a successful request returns immediately and the service stops being reachable from the internet shortly after. Use this endpoint to close public access to a service on your GPU instance.
|
|
32300
|
+
* @summary Delete exposed service
|
|
32301
|
+
* @param {number} instanceId GPU instance ID
|
|
32302
|
+
* @param {number} exposedServiceId Exposed service ID
|
|
32303
|
+
* @param {*} [options] Override http request option.
|
|
32304
|
+
* @throws {RequiredError}
|
|
32305
|
+
*/
|
|
32306
|
+
deleteExposedServiceV1: async (instanceId: number, exposedServiceId: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
32307
|
+
// verify required parameter 'instanceId' is not null or undefined
|
|
32308
|
+
assertParamExists('deleteExposedServiceV1', 'instanceId', instanceId)
|
|
32309
|
+
// verify required parameter 'exposedServiceId' is not null or undefined
|
|
32310
|
+
assertParamExists('deleteExposedServiceV1', 'exposedServiceId', exposedServiceId)
|
|
32311
|
+
const localVarPath = `/api/gpu/v1/instances/{instanceId}/exposed-services/{exposedServiceId}`
|
|
32312
|
+
.replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId))
|
|
32313
|
+
.replace(`{${"exposedServiceId"}}`, encodePathParam('exposedServiceId', exposedServiceId));
|
|
32314
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
32315
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
32316
|
+
let baseOptions;
|
|
32317
|
+
if (configuration) {
|
|
32318
|
+
baseOptions = configuration.baseOptions;
|
|
32319
|
+
}
|
|
32320
|
+
|
|
32321
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
32322
|
+
const localVarHeaderParameter = {} as any;
|
|
32323
|
+
const localVarQueryParameter = {} as any;
|
|
32324
|
+
|
|
32325
|
+
// authentication apiToken required
|
|
32326
|
+
// http bearer authentication required
|
|
32327
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
32328
|
+
|
|
32329
|
+
|
|
32330
|
+
|
|
32331
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
32332
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
32333
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
32334
|
+
|
|
32335
|
+
return {
|
|
32336
|
+
url: toPathString(localVarUrlObj),
|
|
32337
|
+
options: localVarRequestOptions,
|
|
32338
|
+
};
|
|
32339
|
+
},
|
|
32340
|
+
/**
|
|
32341
|
+
* Retrieve the services exposed on a specified GPU instance. A newly created service is listed once it gets its public hostname and external port. Use this endpoint to find the public address of services running on your GPU instance.
|
|
32342
|
+
* @summary Get exposed services
|
|
32343
|
+
* @param {number} instanceId GPU instance ID
|
|
32344
|
+
* @param {*} [options] Override http request option.
|
|
32345
|
+
* @throws {RequiredError}
|
|
32346
|
+
*/
|
|
32347
|
+
getExposedServicesV1: async (instanceId: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
32348
|
+
// verify required parameter 'instanceId' is not null or undefined
|
|
32349
|
+
assertParamExists('getExposedServicesV1', 'instanceId', instanceId)
|
|
32350
|
+
const localVarPath = `/api/gpu/v1/instances/{instanceId}/exposed-services`
|
|
32351
|
+
.replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId));
|
|
32352
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
32353
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
32354
|
+
let baseOptions;
|
|
32355
|
+
if (configuration) {
|
|
32356
|
+
baseOptions = configuration.baseOptions;
|
|
32357
|
+
}
|
|
32358
|
+
|
|
32359
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
32360
|
+
const localVarHeaderParameter = {} as any;
|
|
32361
|
+
const localVarQueryParameter = {} as any;
|
|
32362
|
+
|
|
32363
|
+
// authentication apiToken required
|
|
32364
|
+
// http bearer authentication required
|
|
32365
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
32366
|
+
|
|
32367
|
+
|
|
32368
|
+
|
|
32369
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
32370
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
32371
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
32372
|
+
|
|
32373
|
+
return {
|
|
32374
|
+
url: toPathString(localVarUrlObj),
|
|
32375
|
+
options: localVarRequestOptions,
|
|
32376
|
+
};
|
|
32377
|
+
},
|
|
32378
|
+
}
|
|
32379
|
+
};
|
|
32380
|
+
|
|
32381
|
+
/**
|
|
32382
|
+
* GPUExposedServicesApi - functional programming interface
|
|
32383
|
+
* @export
|
|
32384
|
+
*/
|
|
32385
|
+
export const GPUExposedServicesApiFp = function(configuration?: Configuration) {
|
|
32386
|
+
const localVarAxiosParamCreator = GPUExposedServicesApiAxiosParamCreator(configuration)
|
|
32387
|
+
return {
|
|
32388
|
+
/**
|
|
32389
|
+
* Expose a service running on a specified GPU instance to the internet. The service is exposed asynchronously: a successful request returns immediately, and the service appears in the exposed services list once it gets its public hostname and external port. Fails when the instance already has the maximum of 4 exposed services. Use this endpoint to make an application on your GPU instance publicly reachable.
|
|
32390
|
+
* @summary Create exposed service
|
|
32391
|
+
* @param {number} instanceId GPU instance ID
|
|
32392
|
+
* @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
|
|
32393
|
+
* @param {*} [options] Override http request option.
|
|
32394
|
+
* @throws {RequiredError}
|
|
32395
|
+
*/
|
|
32396
|
+
async createExposedServiceV1(instanceId: number, gPUV1ExposedServiceStoreRequest: GPUV1ExposedServiceStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
32397
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createExposedServiceV1(instanceId, gPUV1ExposedServiceStoreRequest, options);
|
|
32398
|
+
const localVarOperationServerBasePath = operationServerMap['GPUExposedServicesApi.createExposedServiceV1']?.[0]?.url;
|
|
32399
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
32400
|
+
},
|
|
32401
|
+
/**
|
|
32402
|
+
* Delete a specified exposed service of a GPU instance. The service is removed asynchronously: a successful request returns immediately and the service stops being reachable from the internet shortly after. Use this endpoint to close public access to a service on your GPU instance.
|
|
32403
|
+
* @summary Delete exposed service
|
|
32404
|
+
* @param {number} instanceId GPU instance ID
|
|
32405
|
+
* @param {number} exposedServiceId Exposed service ID
|
|
32406
|
+
* @param {*} [options] Override http request option.
|
|
32407
|
+
* @throws {RequiredError}
|
|
32408
|
+
*/
|
|
32409
|
+
async deleteExposedServiceV1(instanceId: number, exposedServiceId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
32410
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteExposedServiceV1(instanceId, exposedServiceId, options);
|
|
32411
|
+
const localVarOperationServerBasePath = operationServerMap['GPUExposedServicesApi.deleteExposedServiceV1']?.[0]?.url;
|
|
32412
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
32413
|
+
},
|
|
32414
|
+
/**
|
|
32415
|
+
* Retrieve the services exposed on a specified GPU instance. A newly created service is listed once it gets its public hostname and external port. Use this endpoint to find the public address of services running on your GPU instance.
|
|
32416
|
+
* @summary Get exposed services
|
|
32417
|
+
* @param {number} instanceId GPU instance ID
|
|
32418
|
+
* @param {*} [options] Override http request option.
|
|
32419
|
+
* @throws {RequiredError}
|
|
32420
|
+
*/
|
|
32421
|
+
async getExposedServicesV1(instanceId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<GPUV1ExposedServiceExposedServiceResource>>> {
|
|
32422
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getExposedServicesV1(instanceId, options);
|
|
32423
|
+
const localVarOperationServerBasePath = operationServerMap['GPUExposedServicesApi.getExposedServicesV1']?.[0]?.url;
|
|
32424
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
32425
|
+
},
|
|
32426
|
+
}
|
|
32427
|
+
};
|
|
32428
|
+
|
|
32429
|
+
/**
|
|
32430
|
+
* GPUExposedServicesApi - factory interface
|
|
32431
|
+
* @export
|
|
32432
|
+
*/
|
|
32433
|
+
export const GPUExposedServicesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
32434
|
+
const localVarFp = GPUExposedServicesApiFp(configuration)
|
|
32435
|
+
return {
|
|
32436
|
+
/**
|
|
32437
|
+
* Expose a service running on a specified GPU instance to the internet. The service is exposed asynchronously: a successful request returns immediately, and the service appears in the exposed services list once it gets its public hostname and external port. Fails when the instance already has the maximum of 4 exposed services. Use this endpoint to make an application on your GPU instance publicly reachable.
|
|
32438
|
+
* @summary Create exposed service
|
|
32439
|
+
* @param {number} instanceId GPU instance ID
|
|
32440
|
+
* @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
|
|
32441
|
+
* @param {*} [options] Override http request option.
|
|
32442
|
+
* @throws {RequiredError}
|
|
32443
|
+
*/
|
|
32444
|
+
createExposedServiceV1(instanceId: number, gPUV1ExposedServiceStoreRequest: GPUV1ExposedServiceStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
32445
|
+
return localVarFp.createExposedServiceV1(instanceId, gPUV1ExposedServiceStoreRequest, options).then((request) => request(axios, basePath));
|
|
32446
|
+
},
|
|
32447
|
+
/**
|
|
32448
|
+
* Delete a specified exposed service of a GPU instance. The service is removed asynchronously: a successful request returns immediately and the service stops being reachable from the internet shortly after. Use this endpoint to close public access to a service on your GPU instance.
|
|
32449
|
+
* @summary Delete exposed service
|
|
32450
|
+
* @param {number} instanceId GPU instance ID
|
|
32451
|
+
* @param {number} exposedServiceId Exposed service ID
|
|
32452
|
+
* @param {*} [options] Override http request option.
|
|
32453
|
+
* @throws {RequiredError}
|
|
32454
|
+
*/
|
|
32455
|
+
deleteExposedServiceV1(instanceId: number, exposedServiceId: number, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
32456
|
+
return localVarFp.deleteExposedServiceV1(instanceId, exposedServiceId, options).then((request) => request(axios, basePath));
|
|
32457
|
+
},
|
|
32458
|
+
/**
|
|
32459
|
+
* Retrieve the services exposed on a specified GPU instance. A newly created service is listed once it gets its public hostname and external port. Use this endpoint to find the public address of services running on your GPU instance.
|
|
32460
|
+
* @summary Get exposed services
|
|
32461
|
+
* @param {number} instanceId GPU instance ID
|
|
32462
|
+
* @param {*} [options] Override http request option.
|
|
32463
|
+
* @throws {RequiredError}
|
|
32464
|
+
*/
|
|
32465
|
+
getExposedServicesV1(instanceId: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<GPUV1ExposedServiceExposedServiceResource>> {
|
|
32466
|
+
return localVarFp.getExposedServicesV1(instanceId, options).then((request) => request(axios, basePath));
|
|
32467
|
+
},
|
|
32468
|
+
};
|
|
32469
|
+
};
|
|
32470
|
+
|
|
32471
|
+
/**
|
|
32472
|
+
* GPUExposedServicesApi - object-oriented interface
|
|
32473
|
+
* @export
|
|
32474
|
+
* @class GPUExposedServicesApi
|
|
32475
|
+
* @extends {BaseAPI}
|
|
32476
|
+
*/
|
|
32477
|
+
export class GPUExposedServicesApi extends BaseAPI {
|
|
32478
|
+
/**
|
|
32479
|
+
* Expose a service running on a specified GPU instance to the internet. The service is exposed asynchronously: a successful request returns immediately, and the service appears in the exposed services list once it gets its public hostname and external port. Fails when the instance already has the maximum of 4 exposed services. Use this endpoint to make an application on your GPU instance publicly reachable.
|
|
32480
|
+
* @summary Create exposed service
|
|
32481
|
+
* @param {number} instanceId GPU instance ID
|
|
32482
|
+
* @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
|
|
32483
|
+
* @param {*} [options] Override http request option.
|
|
32484
|
+
* @throws {RequiredError}
|
|
32485
|
+
* @memberof GPUExposedServicesApi
|
|
32486
|
+
*/
|
|
32487
|
+
public createExposedServiceV1(instanceId: number, gPUV1ExposedServiceStoreRequest: GPUV1ExposedServiceStoreRequest, options?: RawAxiosRequestConfig) {
|
|
32488
|
+
return GPUExposedServicesApiFp(this.configuration).createExposedServiceV1(instanceId, gPUV1ExposedServiceStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
32489
|
+
}
|
|
32490
|
+
|
|
32491
|
+
/**
|
|
32492
|
+
* Delete a specified exposed service of a GPU instance. The service is removed asynchronously: a successful request returns immediately and the service stops being reachable from the internet shortly after. Use this endpoint to close public access to a service on your GPU instance.
|
|
32493
|
+
* @summary Delete exposed service
|
|
32494
|
+
* @param {number} instanceId GPU instance ID
|
|
32495
|
+
* @param {number} exposedServiceId Exposed service ID
|
|
32496
|
+
* @param {*} [options] Override http request option.
|
|
32497
|
+
* @throws {RequiredError}
|
|
32498
|
+
* @memberof GPUExposedServicesApi
|
|
32499
|
+
*/
|
|
32500
|
+
public deleteExposedServiceV1(instanceId: number, exposedServiceId: number, options?: RawAxiosRequestConfig) {
|
|
32501
|
+
return GPUExposedServicesApiFp(this.configuration).deleteExposedServiceV1(instanceId, exposedServiceId, options).then((request) => request(this.axios, this.basePath));
|
|
32502
|
+
}
|
|
32503
|
+
|
|
32504
|
+
/**
|
|
32505
|
+
* Retrieve the services exposed on a specified GPU instance. A newly created service is listed once it gets its public hostname and external port. Use this endpoint to find the public address of services running on your GPU instance.
|
|
32506
|
+
* @summary Get exposed services
|
|
32507
|
+
* @param {number} instanceId GPU instance ID
|
|
32508
|
+
* @param {*} [options] Override http request option.
|
|
32509
|
+
* @throws {RequiredError}
|
|
32510
|
+
* @memberof GPUExposedServicesApi
|
|
32511
|
+
*/
|
|
32512
|
+
public getExposedServicesV1(instanceId: number, options?: RawAxiosRequestConfig) {
|
|
32513
|
+
return GPUExposedServicesApiFp(this.configuration).getExposedServicesV1(instanceId, options).then((request) => request(this.axios, this.basePath));
|
|
32514
|
+
}
|
|
32515
|
+
}
|
|
32516
|
+
|
|
32517
|
+
|
|
32518
|
+
|
|
32140
32519
|
/**
|
|
32141
32520
|
* GPUInstancesApi - axios parameter creator
|
|
32142
32521
|
* @export
|
package/base.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.
|
|
6
|
+
* API Version: 2.16.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/common.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.
|
|
6
|
+
* API Version: 2.16.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/configuration.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.
|
|
6
|
+
* API Version: 2.16.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
|
|
@@ -48,7 +48,7 @@ export class Configuration {
|
|
|
48
48
|
this.baseOptions = {
|
|
49
49
|
...param.baseOptions,
|
|
50
50
|
headers: {
|
|
51
|
-
'User-Agent': "hostinger-typescript-sdk/2.
|
|
51
|
+
'User-Agent': "hostinger-typescript-sdk/2.16.0",
|
|
52
52
|
...param.baseOptions?.headers,
|
|
53
53
|
},
|
|
54
54
|
};
|