hostinger-api-sdk 2.14.2 → 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/dist/esm/api.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.14.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
@@ -313,6 +313,52 @@ export const EcommerceV1StoreStoreCreationResourceSalesChannelTypeEnum = {
313
313
  export const EcommerceV1StoreStoreRequestSalesChannelTypeEnum = {
314
314
  Custom: 'custom'
315
315
  };
316
+ export const GPUV1ExposedServiceExposedServiceResourceProtocolEnum = {
317
+ Tcp: 'tcp',
318
+ Udp: 'udp'
319
+ };
320
+ export const GPUV1ExposedServiceExposedServiceResourceTypeEnum = {
321
+ Http: 'http',
322
+ Https: 'https'
323
+ };
324
+ export const GPUV1ExposedServiceStoreRequestProtocolEnum = {
325
+ Tcp: 'tcp',
326
+ Udp: 'udp'
327
+ };
328
+ export const GPUV1ExposedServiceStoreRequestTypeEnum = {
329
+ Http: 'http',
330
+ Https: 'https'
331
+ };
332
+ export const GPUV1InstanceInstanceListResourceStatusEnum = {
333
+ Created: 'created',
334
+ Creating: 'creating',
335
+ Running: 'running',
336
+ Stopped: 'stopped',
337
+ Destroying: 'destroying',
338
+ Destroyed: 'destroyed',
339
+ InsufficientFunds: 'insufficient_funds',
340
+ Error: 'error',
341
+ Abuse: 'abuse'
342
+ };
343
+ export const GPUV1InstanceInstanceListResourceActionLockEnum = {
344
+ Unlocked: 'unlocked',
345
+ Locked: 'locked'
346
+ };
347
+ export const GPUV1InstanceInstanceResourceStatusEnum = {
348
+ Created: 'created',
349
+ Creating: 'creating',
350
+ Running: 'running',
351
+ Stopped: 'stopped',
352
+ Destroying: 'destroying',
353
+ Destroyed: 'destroyed',
354
+ InsufficientFunds: 'insufficient_funds',
355
+ Error: 'error',
356
+ Abuse: 'abuse'
357
+ };
358
+ export const GPUV1InstanceInstanceResourceActionLockEnum = {
359
+ Unlocked: 'unlocked',
360
+ Locked: 'locked'
361
+ };
316
362
  export const HorizonsV1WebsitesCreateWebsiteRequestMessageInnerTypeEnum = {
317
363
  Text: 'text'
318
364
  };
@@ -12606,6 +12652,627 @@ export const GetPoolGroupsV1CurrencyEnum = {
12606
12652
  Vnd: 'VND',
12607
12653
  Zar: 'ZAR'
12608
12654
  };
12655
+ /**
12656
+ * GPUExposedServicesApi - axios parameter creator
12657
+ * @export
12658
+ */
12659
+ export const GPUExposedServicesApiAxiosParamCreator = function (configuration) {
12660
+ return {
12661
+ /**
12662
+ * 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.
12663
+ * @summary Create exposed service
12664
+ * @param {number} instanceId GPU instance ID
12665
+ * @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
12666
+ * @param {*} [options] Override http request option.
12667
+ * @throws {RequiredError}
12668
+ */
12669
+ createExposedServiceV1: (instanceId_1, gPUV1ExposedServiceStoreRequest_1, ...args_1) => __awaiter(this, [instanceId_1, gPUV1ExposedServiceStoreRequest_1, ...args_1], void 0, function* (instanceId, gPUV1ExposedServiceStoreRequest, options = {}) {
12670
+ // verify required parameter 'instanceId' is not null or undefined
12671
+ assertParamExists('createExposedServiceV1', 'instanceId', instanceId);
12672
+ // verify required parameter 'gPUV1ExposedServiceStoreRequest' is not null or undefined
12673
+ assertParamExists('createExposedServiceV1', 'gPUV1ExposedServiceStoreRequest', gPUV1ExposedServiceStoreRequest);
12674
+ const localVarPath = `/api/gpu/v1/instances/{instanceId}/exposed-services`
12675
+ .replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId));
12676
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12677
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12678
+ let baseOptions;
12679
+ if (configuration) {
12680
+ baseOptions = configuration.baseOptions;
12681
+ }
12682
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
12683
+ const localVarHeaderParameter = {};
12684
+ const localVarQueryParameter = {};
12685
+ // authentication apiToken required
12686
+ // http bearer authentication required
12687
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12688
+ localVarHeaderParameter['Content-Type'] = 'application/json';
12689
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12690
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12691
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12692
+ localVarRequestOptions.data = serializeDataIfNeeded(gPUV1ExposedServiceStoreRequest, localVarRequestOptions, configuration);
12693
+ return {
12694
+ url: toPathString(localVarUrlObj),
12695
+ options: localVarRequestOptions,
12696
+ };
12697
+ }),
12698
+ /**
12699
+ * 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.
12700
+ * @summary Delete exposed service
12701
+ * @param {number} instanceId GPU instance ID
12702
+ * @param {number} exposedServiceId Exposed service ID
12703
+ * @param {*} [options] Override http request option.
12704
+ * @throws {RequiredError}
12705
+ */
12706
+ deleteExposedServiceV1: (instanceId_1, exposedServiceId_1, ...args_1) => __awaiter(this, [instanceId_1, exposedServiceId_1, ...args_1], void 0, function* (instanceId, exposedServiceId, options = {}) {
12707
+ // verify required parameter 'instanceId' is not null or undefined
12708
+ assertParamExists('deleteExposedServiceV1', 'instanceId', instanceId);
12709
+ // verify required parameter 'exposedServiceId' is not null or undefined
12710
+ assertParamExists('deleteExposedServiceV1', 'exposedServiceId', exposedServiceId);
12711
+ const localVarPath = `/api/gpu/v1/instances/{instanceId}/exposed-services/{exposedServiceId}`
12712
+ .replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId))
12713
+ .replace(`{${"exposedServiceId"}}`, encodePathParam('exposedServiceId', exposedServiceId));
12714
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12715
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12716
+ let baseOptions;
12717
+ if (configuration) {
12718
+ baseOptions = configuration.baseOptions;
12719
+ }
12720
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
12721
+ const localVarHeaderParameter = {};
12722
+ const localVarQueryParameter = {};
12723
+ // authentication apiToken required
12724
+ // http bearer authentication required
12725
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12726
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12727
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12728
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12729
+ return {
12730
+ url: toPathString(localVarUrlObj),
12731
+ options: localVarRequestOptions,
12732
+ };
12733
+ }),
12734
+ /**
12735
+ * 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.
12736
+ * @summary Get exposed services
12737
+ * @param {number} instanceId GPU instance ID
12738
+ * @param {*} [options] Override http request option.
12739
+ * @throws {RequiredError}
12740
+ */
12741
+ getExposedServicesV1: (instanceId_1, ...args_1) => __awaiter(this, [instanceId_1, ...args_1], void 0, function* (instanceId, options = {}) {
12742
+ // verify required parameter 'instanceId' is not null or undefined
12743
+ assertParamExists('getExposedServicesV1', 'instanceId', instanceId);
12744
+ const localVarPath = `/api/gpu/v1/instances/{instanceId}/exposed-services`
12745
+ .replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId));
12746
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12747
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12748
+ let baseOptions;
12749
+ if (configuration) {
12750
+ baseOptions = configuration.baseOptions;
12751
+ }
12752
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
12753
+ const localVarHeaderParameter = {};
12754
+ const localVarQueryParameter = {};
12755
+ // authentication apiToken required
12756
+ // http bearer authentication required
12757
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12758
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12759
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12760
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12761
+ return {
12762
+ url: toPathString(localVarUrlObj),
12763
+ options: localVarRequestOptions,
12764
+ };
12765
+ }),
12766
+ };
12767
+ };
12768
+ /**
12769
+ * GPUExposedServicesApi - functional programming interface
12770
+ * @export
12771
+ */
12772
+ export const GPUExposedServicesApiFp = function (configuration) {
12773
+ const localVarAxiosParamCreator = GPUExposedServicesApiAxiosParamCreator(configuration);
12774
+ return {
12775
+ /**
12776
+ * 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.
12777
+ * @summary Create exposed service
12778
+ * @param {number} instanceId GPU instance ID
12779
+ * @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
12780
+ * @param {*} [options] Override http request option.
12781
+ * @throws {RequiredError}
12782
+ */
12783
+ createExposedServiceV1(instanceId, gPUV1ExposedServiceStoreRequest, options) {
12784
+ return __awaiter(this, void 0, void 0, function* () {
12785
+ var _a, _b;
12786
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createExposedServiceV1(instanceId, gPUV1ExposedServiceStoreRequest, options);
12787
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['GPUExposedServicesApi.createExposedServiceV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
12788
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12789
+ });
12790
+ },
12791
+ /**
12792
+ * 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.
12793
+ * @summary Delete exposed service
12794
+ * @param {number} instanceId GPU instance ID
12795
+ * @param {number} exposedServiceId Exposed service ID
12796
+ * @param {*} [options] Override http request option.
12797
+ * @throws {RequiredError}
12798
+ */
12799
+ deleteExposedServiceV1(instanceId, exposedServiceId, options) {
12800
+ return __awaiter(this, void 0, void 0, function* () {
12801
+ var _a, _b;
12802
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteExposedServiceV1(instanceId, exposedServiceId, options);
12803
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['GPUExposedServicesApi.deleteExposedServiceV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
12804
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12805
+ });
12806
+ },
12807
+ /**
12808
+ * 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.
12809
+ * @summary Get exposed services
12810
+ * @param {number} instanceId GPU instance ID
12811
+ * @param {*} [options] Override http request option.
12812
+ * @throws {RequiredError}
12813
+ */
12814
+ getExposedServicesV1(instanceId, options) {
12815
+ return __awaiter(this, void 0, void 0, function* () {
12816
+ var _a, _b;
12817
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getExposedServicesV1(instanceId, options);
12818
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['GPUExposedServicesApi.getExposedServicesV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
12819
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12820
+ });
12821
+ },
12822
+ };
12823
+ };
12824
+ /**
12825
+ * GPUExposedServicesApi - factory interface
12826
+ * @export
12827
+ */
12828
+ export const GPUExposedServicesApiFactory = function (configuration, basePath, axios) {
12829
+ const localVarFp = GPUExposedServicesApiFp(configuration);
12830
+ return {
12831
+ /**
12832
+ * 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.
12833
+ * @summary Create exposed service
12834
+ * @param {number} instanceId GPU instance ID
12835
+ * @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
12836
+ * @param {*} [options] Override http request option.
12837
+ * @throws {RequiredError}
12838
+ */
12839
+ createExposedServiceV1(instanceId, gPUV1ExposedServiceStoreRequest, options) {
12840
+ return localVarFp.createExposedServiceV1(instanceId, gPUV1ExposedServiceStoreRequest, options).then((request) => request(axios, basePath));
12841
+ },
12842
+ /**
12843
+ * 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.
12844
+ * @summary Delete exposed service
12845
+ * @param {number} instanceId GPU instance ID
12846
+ * @param {number} exposedServiceId Exposed service ID
12847
+ * @param {*} [options] Override http request option.
12848
+ * @throws {RequiredError}
12849
+ */
12850
+ deleteExposedServiceV1(instanceId, exposedServiceId, options) {
12851
+ return localVarFp.deleteExposedServiceV1(instanceId, exposedServiceId, options).then((request) => request(axios, basePath));
12852
+ },
12853
+ /**
12854
+ * 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.
12855
+ * @summary Get exposed services
12856
+ * @param {number} instanceId GPU instance ID
12857
+ * @param {*} [options] Override http request option.
12858
+ * @throws {RequiredError}
12859
+ */
12860
+ getExposedServicesV1(instanceId, options) {
12861
+ return localVarFp.getExposedServicesV1(instanceId, options).then((request) => request(axios, basePath));
12862
+ },
12863
+ };
12864
+ };
12865
+ /**
12866
+ * GPUExposedServicesApi - object-oriented interface
12867
+ * @export
12868
+ * @class GPUExposedServicesApi
12869
+ * @extends {BaseAPI}
12870
+ */
12871
+ export class GPUExposedServicesApi extends BaseAPI {
12872
+ /**
12873
+ * 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.
12874
+ * @summary Create exposed service
12875
+ * @param {number} instanceId GPU instance ID
12876
+ * @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
12877
+ * @param {*} [options] Override http request option.
12878
+ * @throws {RequiredError}
12879
+ * @memberof GPUExposedServicesApi
12880
+ */
12881
+ createExposedServiceV1(instanceId, gPUV1ExposedServiceStoreRequest, options) {
12882
+ return GPUExposedServicesApiFp(this.configuration).createExposedServiceV1(instanceId, gPUV1ExposedServiceStoreRequest, options).then((request) => request(this.axios, this.basePath));
12883
+ }
12884
+ /**
12885
+ * 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.
12886
+ * @summary Delete exposed service
12887
+ * @param {number} instanceId GPU instance ID
12888
+ * @param {number} exposedServiceId Exposed service ID
12889
+ * @param {*} [options] Override http request option.
12890
+ * @throws {RequiredError}
12891
+ * @memberof GPUExposedServicesApi
12892
+ */
12893
+ deleteExposedServiceV1(instanceId, exposedServiceId, options) {
12894
+ return GPUExposedServicesApiFp(this.configuration).deleteExposedServiceV1(instanceId, exposedServiceId, options).then((request) => request(this.axios, this.basePath));
12895
+ }
12896
+ /**
12897
+ * 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.
12898
+ * @summary Get exposed services
12899
+ * @param {number} instanceId GPU instance ID
12900
+ * @param {*} [options] Override http request option.
12901
+ * @throws {RequiredError}
12902
+ * @memberof GPUExposedServicesApi
12903
+ */
12904
+ getExposedServicesV1(instanceId, options) {
12905
+ return GPUExposedServicesApiFp(this.configuration).getExposedServicesV1(instanceId, options).then((request) => request(this.axios, this.basePath));
12906
+ }
12907
+ }
12908
+ /**
12909
+ * GPUInstancesApi - axios parameter creator
12910
+ * @export
12911
+ */
12912
+ export const GPUInstancesApiAxiosParamCreator = function (configuration) {
12913
+ return {
12914
+ /**
12915
+ * Create a new GPU instance. Pick `pool_instance_id` from the pool instance types list and `os_template_id` from the OS templates available for that instance type. Your account must have enough credits to run the instance for its first hour. The instance is created asynchronously: a successful request returns immediately, and the instance appears in the instance list while its `status` moves from `created` through `creating` to `running`. Use this endpoint to provision GPU compute.
12916
+ * @summary Create instance
12917
+ * @param {GPUV1InstanceStoreRequest} gPUV1InstanceStoreRequest
12918
+ * @param {*} [options] Override http request option.
12919
+ * @throws {RequiredError}
12920
+ */
12921
+ createInstanceV1: (gPUV1InstanceStoreRequest_1, ...args_1) => __awaiter(this, [gPUV1InstanceStoreRequest_1, ...args_1], void 0, function* (gPUV1InstanceStoreRequest, options = {}) {
12922
+ // verify required parameter 'gPUV1InstanceStoreRequest' is not null or undefined
12923
+ assertParamExists('createInstanceV1', 'gPUV1InstanceStoreRequest', gPUV1InstanceStoreRequest);
12924
+ const localVarPath = `/api/gpu/v1/instances`;
12925
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12926
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12927
+ let baseOptions;
12928
+ if (configuration) {
12929
+ baseOptions = configuration.baseOptions;
12930
+ }
12931
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
12932
+ const localVarHeaderParameter = {};
12933
+ const localVarQueryParameter = {};
12934
+ // authentication apiToken required
12935
+ // http bearer authentication required
12936
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12937
+ localVarHeaderParameter['Content-Type'] = 'application/json';
12938
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12939
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12940
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12941
+ localVarRequestOptions.data = serializeDataIfNeeded(gPUV1InstanceStoreRequest, localVarRequestOptions, configuration);
12942
+ return {
12943
+ url: toPathString(localVarUrlObj),
12944
+ options: localVarRequestOptions,
12945
+ };
12946
+ }),
12947
+ /**
12948
+ * Delete a specified GPU instance. The instance is destroyed asynchronously: a successful request returns immediately and the instance `status` moves to `destroying`. Deleting fails while the instance is in `created`, `destroying`, `destroyed` or `abuse` status, or while another action is in progress on it. Use this endpoint to stop billing for a GPU instance you no longer need.
12949
+ * @summary Delete instance
12950
+ * @param {number} instanceId GPU instance ID
12951
+ * @param {*} [options] Override http request option.
12952
+ * @throws {RequiredError}
12953
+ */
12954
+ deleteInstanceV1: (instanceId_1, ...args_1) => __awaiter(this, [instanceId_1, ...args_1], void 0, function* (instanceId, options = {}) {
12955
+ // verify required parameter 'instanceId' is not null or undefined
12956
+ assertParamExists('deleteInstanceV1', 'instanceId', instanceId);
12957
+ const localVarPath = `/api/gpu/v1/instances/{instanceId}`
12958
+ .replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId));
12959
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12960
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12961
+ let baseOptions;
12962
+ if (configuration) {
12963
+ baseOptions = configuration.baseOptions;
12964
+ }
12965
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
12966
+ const localVarHeaderParameter = {};
12967
+ const localVarQueryParameter = {};
12968
+ // authentication apiToken required
12969
+ // http bearer authentication required
12970
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12971
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12972
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12973
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12974
+ return {
12975
+ url: toPathString(localVarUrlObj),
12976
+ options: localVarRequestOptions,
12977
+ };
12978
+ }),
12979
+ /**
12980
+ * 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.
12981
+ * @summary Get instance details
12982
+ * @param {number} instanceId GPU instance ID
12983
+ * @param {*} [options] Override http request option.
12984
+ * @throws {RequiredError}
12985
+ */
12986
+ getInstanceDetailsV1: (instanceId_1, ...args_1) => __awaiter(this, [instanceId_1, ...args_1], void 0, function* (instanceId, options = {}) {
12987
+ // verify required parameter 'instanceId' is not null or undefined
12988
+ assertParamExists('getInstanceDetailsV1', 'instanceId', instanceId);
12989
+ const localVarPath = `/api/gpu/v1/instances/{instanceId}`
12990
+ .replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId));
12991
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12992
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12993
+ let baseOptions;
12994
+ if (configuration) {
12995
+ baseOptions = configuration.baseOptions;
12996
+ }
12997
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
12998
+ const localVarHeaderParameter = {};
12999
+ const localVarQueryParameter = {};
13000
+ // authentication apiToken required
13001
+ // http bearer authentication required
13002
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
13003
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
13004
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
13005
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
13006
+ return {
13007
+ url: toPathString(localVarUrlObj),
13008
+ options: localVarRequestOptions,
13009
+ };
13010
+ }),
13011
+ /**
13012
+ * Retrieve utilisation metrics of a specified GPU instance for the last hour. Each data point contains CPU, memory and GPU utilisation, used GPU memory and GPU throughput. The list is empty until the instance is provisioned. Use this endpoint to monitor GPU instance load.
13013
+ * @summary Get instance metrics
13014
+ * @param {number} instanceId GPU instance ID
13015
+ * @param {*} [options] Override http request option.
13016
+ * @throws {RequiredError}
13017
+ */
13018
+ getInstanceMetricsV1: (instanceId_1, ...args_1) => __awaiter(this, [instanceId_1, ...args_1], void 0, function* (instanceId, options = {}) {
13019
+ // verify required parameter 'instanceId' is not null or undefined
13020
+ assertParamExists('getInstanceMetricsV1', 'instanceId', instanceId);
13021
+ const localVarPath = `/api/gpu/v1/instances/{instanceId}/metrics`
13022
+ .replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId));
13023
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
13024
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
13025
+ let baseOptions;
13026
+ if (configuration) {
13027
+ baseOptions = configuration.baseOptions;
13028
+ }
13029
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
13030
+ const localVarHeaderParameter = {};
13031
+ const localVarQueryParameter = {};
13032
+ // authentication apiToken required
13033
+ // http bearer authentication required
13034
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
13035
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
13036
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
13037
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
13038
+ return {
13039
+ url: toPathString(localVarUrlObj),
13040
+ options: localVarRequestOptions,
13041
+ };
13042
+ }),
13043
+ /**
13044
+ * Retrieve all GPU instances of your account. Use this endpoint to view your GPU instances with their status, pool, instance type and OS template.
13045
+ * @summary Get instances
13046
+ * @param {*} [options] Override http request option.
13047
+ * @throws {RequiredError}
13048
+ */
13049
+ getInstancesV1: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
13050
+ const localVarPath = `/api/gpu/v1/instances`;
13051
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
13052
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
13053
+ let baseOptions;
13054
+ if (configuration) {
13055
+ baseOptions = configuration.baseOptions;
13056
+ }
13057
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
13058
+ const localVarHeaderParameter = {};
13059
+ const localVarQueryParameter = {};
13060
+ // authentication apiToken required
13061
+ // http bearer authentication required
13062
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
13063
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
13064
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
13065
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
13066
+ return {
13067
+ url: toPathString(localVarUrlObj),
13068
+ options: localVarRequestOptions,
13069
+ };
13070
+ }),
13071
+ };
13072
+ };
13073
+ /**
13074
+ * GPUInstancesApi - functional programming interface
13075
+ * @export
13076
+ */
13077
+ export const GPUInstancesApiFp = function (configuration) {
13078
+ const localVarAxiosParamCreator = GPUInstancesApiAxiosParamCreator(configuration);
13079
+ return {
13080
+ /**
13081
+ * Create a new GPU instance. Pick `pool_instance_id` from the pool instance types list and `os_template_id` from the OS templates available for that instance type. Your account must have enough credits to run the instance for its first hour. The instance is created asynchronously: a successful request returns immediately, and the instance appears in the instance list while its `status` moves from `created` through `creating` to `running`. Use this endpoint to provision GPU compute.
13082
+ * @summary Create instance
13083
+ * @param {GPUV1InstanceStoreRequest} gPUV1InstanceStoreRequest
13084
+ * @param {*} [options] Override http request option.
13085
+ * @throws {RequiredError}
13086
+ */
13087
+ createInstanceV1(gPUV1InstanceStoreRequest, options) {
13088
+ return __awaiter(this, void 0, void 0, function* () {
13089
+ var _a, _b;
13090
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createInstanceV1(gPUV1InstanceStoreRequest, options);
13091
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['GPUInstancesApi.createInstanceV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
13092
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
13093
+ });
13094
+ },
13095
+ /**
13096
+ * Delete a specified GPU instance. The instance is destroyed asynchronously: a successful request returns immediately and the instance `status` moves to `destroying`. Deleting fails while the instance is in `created`, `destroying`, `destroyed` or `abuse` status, or while another action is in progress on it. Use this endpoint to stop billing for a GPU instance you no longer need.
13097
+ * @summary Delete instance
13098
+ * @param {number} instanceId GPU instance ID
13099
+ * @param {*} [options] Override http request option.
13100
+ * @throws {RequiredError}
13101
+ */
13102
+ deleteInstanceV1(instanceId, options) {
13103
+ return __awaiter(this, void 0, void 0, function* () {
13104
+ var _a, _b;
13105
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteInstanceV1(instanceId, options);
13106
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['GPUInstancesApi.deleteInstanceV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
13107
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
13108
+ });
13109
+ },
13110
+ /**
13111
+ * 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.
13112
+ * @summary Get instance details
13113
+ * @param {number} instanceId GPU instance ID
13114
+ * @param {*} [options] Override http request option.
13115
+ * @throws {RequiredError}
13116
+ */
13117
+ getInstanceDetailsV1(instanceId, options) {
13118
+ return __awaiter(this, void 0, void 0, function* () {
13119
+ var _a, _b;
13120
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getInstanceDetailsV1(instanceId, options);
13121
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['GPUInstancesApi.getInstanceDetailsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
13122
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
13123
+ });
13124
+ },
13125
+ /**
13126
+ * Retrieve utilisation metrics of a specified GPU instance for the last hour. Each data point contains CPU, memory and GPU utilisation, used GPU memory and GPU throughput. The list is empty until the instance is provisioned. Use this endpoint to monitor GPU instance load.
13127
+ * @summary Get instance metrics
13128
+ * @param {number} instanceId GPU instance ID
13129
+ * @param {*} [options] Override http request option.
13130
+ * @throws {RequiredError}
13131
+ */
13132
+ getInstanceMetricsV1(instanceId, options) {
13133
+ return __awaiter(this, void 0, void 0, function* () {
13134
+ var _a, _b;
13135
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getInstanceMetricsV1(instanceId, options);
13136
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['GPUInstancesApi.getInstanceMetricsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
13137
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
13138
+ });
13139
+ },
13140
+ /**
13141
+ * Retrieve all GPU instances of your account. Use this endpoint to view your GPU instances with their status, pool, instance type and OS template.
13142
+ * @summary Get instances
13143
+ * @param {*} [options] Override http request option.
13144
+ * @throws {RequiredError}
13145
+ */
13146
+ getInstancesV1(options) {
13147
+ return __awaiter(this, void 0, void 0, function* () {
13148
+ var _a, _b;
13149
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getInstancesV1(options);
13150
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['GPUInstancesApi.getInstancesV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
13151
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
13152
+ });
13153
+ },
13154
+ };
13155
+ };
13156
+ /**
13157
+ * GPUInstancesApi - factory interface
13158
+ * @export
13159
+ */
13160
+ export const GPUInstancesApiFactory = function (configuration, basePath, axios) {
13161
+ const localVarFp = GPUInstancesApiFp(configuration);
13162
+ return {
13163
+ /**
13164
+ * Create a new GPU instance. Pick `pool_instance_id` from the pool instance types list and `os_template_id` from the OS templates available for that instance type. Your account must have enough credits to run the instance for its first hour. The instance is created asynchronously: a successful request returns immediately, and the instance appears in the instance list while its `status` moves from `created` through `creating` to `running`. Use this endpoint to provision GPU compute.
13165
+ * @summary Create instance
13166
+ * @param {GPUV1InstanceStoreRequest} gPUV1InstanceStoreRequest
13167
+ * @param {*} [options] Override http request option.
13168
+ * @throws {RequiredError}
13169
+ */
13170
+ createInstanceV1(gPUV1InstanceStoreRequest, options) {
13171
+ return localVarFp.createInstanceV1(gPUV1InstanceStoreRequest, options).then((request) => request(axios, basePath));
13172
+ },
13173
+ /**
13174
+ * Delete a specified GPU instance. The instance is destroyed asynchronously: a successful request returns immediately and the instance `status` moves to `destroying`. Deleting fails while the instance is in `created`, `destroying`, `destroyed` or `abuse` status, or while another action is in progress on it. Use this endpoint to stop billing for a GPU instance you no longer need.
13175
+ * @summary Delete instance
13176
+ * @param {number} instanceId GPU instance ID
13177
+ * @param {*} [options] Override http request option.
13178
+ * @throws {RequiredError}
13179
+ */
13180
+ deleteInstanceV1(instanceId, options) {
13181
+ return localVarFp.deleteInstanceV1(instanceId, options).then((request) => request(axios, basePath));
13182
+ },
13183
+ /**
13184
+ * 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.
13185
+ * @summary Get instance details
13186
+ * @param {number} instanceId GPU instance ID
13187
+ * @param {*} [options] Override http request option.
13188
+ * @throws {RequiredError}
13189
+ */
13190
+ getInstanceDetailsV1(instanceId, options) {
13191
+ return localVarFp.getInstanceDetailsV1(instanceId, options).then((request) => request(axios, basePath));
13192
+ },
13193
+ /**
13194
+ * Retrieve utilisation metrics of a specified GPU instance for the last hour. Each data point contains CPU, memory and GPU utilisation, used GPU memory and GPU throughput. The list is empty until the instance is provisioned. Use this endpoint to monitor GPU instance load.
13195
+ * @summary Get instance metrics
13196
+ * @param {number} instanceId GPU instance ID
13197
+ * @param {*} [options] Override http request option.
13198
+ * @throws {RequiredError}
13199
+ */
13200
+ getInstanceMetricsV1(instanceId, options) {
13201
+ return localVarFp.getInstanceMetricsV1(instanceId, options).then((request) => request(axios, basePath));
13202
+ },
13203
+ /**
13204
+ * Retrieve all GPU instances of your account. Use this endpoint to view your GPU instances with their status, pool, instance type and OS template.
13205
+ * @summary Get instances
13206
+ * @param {*} [options] Override http request option.
13207
+ * @throws {RequiredError}
13208
+ */
13209
+ getInstancesV1(options) {
13210
+ return localVarFp.getInstancesV1(options).then((request) => request(axios, basePath));
13211
+ },
13212
+ };
13213
+ };
13214
+ /**
13215
+ * GPUInstancesApi - object-oriented interface
13216
+ * @export
13217
+ * @class GPUInstancesApi
13218
+ * @extends {BaseAPI}
13219
+ */
13220
+ export class GPUInstancesApi extends BaseAPI {
13221
+ /**
13222
+ * Create a new GPU instance. Pick `pool_instance_id` from the pool instance types list and `os_template_id` from the OS templates available for that instance type. Your account must have enough credits to run the instance for its first hour. The instance is created asynchronously: a successful request returns immediately, and the instance appears in the instance list while its `status` moves from `created` through `creating` to `running`. Use this endpoint to provision GPU compute.
13223
+ * @summary Create instance
13224
+ * @param {GPUV1InstanceStoreRequest} gPUV1InstanceStoreRequest
13225
+ * @param {*} [options] Override http request option.
13226
+ * @throws {RequiredError}
13227
+ * @memberof GPUInstancesApi
13228
+ */
13229
+ createInstanceV1(gPUV1InstanceStoreRequest, options) {
13230
+ return GPUInstancesApiFp(this.configuration).createInstanceV1(gPUV1InstanceStoreRequest, options).then((request) => request(this.axios, this.basePath));
13231
+ }
13232
+ /**
13233
+ * Delete a specified GPU instance. The instance is destroyed asynchronously: a successful request returns immediately and the instance `status` moves to `destroying`. Deleting fails while the instance is in `created`, `destroying`, `destroyed` or `abuse` status, or while another action is in progress on it. Use this endpoint to stop billing for a GPU instance you no longer need.
13234
+ * @summary Delete instance
13235
+ * @param {number} instanceId GPU instance ID
13236
+ * @param {*} [options] Override http request option.
13237
+ * @throws {RequiredError}
13238
+ * @memberof GPUInstancesApi
13239
+ */
13240
+ deleteInstanceV1(instanceId, options) {
13241
+ return GPUInstancesApiFp(this.configuration).deleteInstanceV1(instanceId, options).then((request) => request(this.axios, this.basePath));
13242
+ }
13243
+ /**
13244
+ * 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.
13245
+ * @summary Get instance details
13246
+ * @param {number} instanceId GPU instance ID
13247
+ * @param {*} [options] Override http request option.
13248
+ * @throws {RequiredError}
13249
+ * @memberof GPUInstancesApi
13250
+ */
13251
+ getInstanceDetailsV1(instanceId, options) {
13252
+ return GPUInstancesApiFp(this.configuration).getInstanceDetailsV1(instanceId, options).then((request) => request(this.axios, this.basePath));
13253
+ }
13254
+ /**
13255
+ * Retrieve utilisation metrics of a specified GPU instance for the last hour. Each data point contains CPU, memory and GPU utilisation, used GPU memory and GPU throughput. The list is empty until the instance is provisioned. Use this endpoint to monitor GPU instance load.
13256
+ * @summary Get instance metrics
13257
+ * @param {number} instanceId GPU instance ID
13258
+ * @param {*} [options] Override http request option.
13259
+ * @throws {RequiredError}
13260
+ * @memberof GPUInstancesApi
13261
+ */
13262
+ getInstanceMetricsV1(instanceId, options) {
13263
+ return GPUInstancesApiFp(this.configuration).getInstanceMetricsV1(instanceId, options).then((request) => request(this.axios, this.basePath));
13264
+ }
13265
+ /**
13266
+ * Retrieve all GPU instances of your account. Use this endpoint to view your GPU instances with their status, pool, instance type and OS template.
13267
+ * @summary Get instances
13268
+ * @param {*} [options] Override http request option.
13269
+ * @throws {RequiredError}
13270
+ * @memberof GPUInstancesApi
13271
+ */
13272
+ getInstancesV1(options) {
13273
+ return GPUInstancesApiFp(this.configuration).getInstancesV1(options).then((request) => request(this.axios, this.basePath));
13274
+ }
13275
+ }
12609
13276
  /**
12610
13277
  * HorizonsWebsitesApi - axios parameter creator
12611
13278
  * @export