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/dist/esm/api.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 2.15.0
4
+ * API Version: 2.16.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -6867,6 +6867,106 @@ export interface EcommerceV1VariantVariantResponseResource {
6867
6867
  */
6868
6868
  'data': EcommerceV1VariantVariantResource;
6869
6869
  }
6870
+ /**
6871
+ *
6872
+ * @export
6873
+ * @interface GPUV1ExposedServiceExposedServiceResource
6874
+ */
6875
+ export interface GPUV1ExposedServiceExposedServiceResource {
6876
+ /**
6877
+ * Exposed service ID
6878
+ * @type {number}
6879
+ * @memberof GPUV1ExposedServiceExposedServiceResource
6880
+ */
6881
+ 'id': number;
6882
+ /**
6883
+ *
6884
+ * @type {string}
6885
+ * @memberof GPUV1ExposedServiceExposedServiceResource
6886
+ */
6887
+ 'name': string;
6888
+ /**
6889
+ * Public hostname or IP address of the service
6890
+ * @type {string}
6891
+ * @memberof GPUV1ExposedServiceExposedServiceResource
6892
+ */
6893
+ 'hostname': string;
6894
+ /**
6895
+ * Port the service listens on inside the instance
6896
+ * @type {number}
6897
+ * @memberof GPUV1ExposedServiceExposedServiceResource
6898
+ */
6899
+ 'internal_port': number;
6900
+ /**
6901
+ * Public port the service is reachable on
6902
+ * @type {number}
6903
+ * @memberof GPUV1ExposedServiceExposedServiceResource
6904
+ */
6905
+ 'external_port': number;
6906
+ /**
6907
+ *
6908
+ * @type {string}
6909
+ * @memberof GPUV1ExposedServiceExposedServiceResource
6910
+ */
6911
+ 'protocol': GPUV1ExposedServiceExposedServiceResourceProtocolEnum;
6912
+ /**
6913
+ *
6914
+ * @type {string}
6915
+ * @memberof GPUV1ExposedServiceExposedServiceResource
6916
+ */
6917
+ 'type': GPUV1ExposedServiceExposedServiceResourceTypeEnum;
6918
+ }
6919
+ export declare const GPUV1ExposedServiceExposedServiceResourceProtocolEnum: {
6920
+ readonly Tcp: "tcp";
6921
+ readonly Udp: "udp";
6922
+ };
6923
+ export type GPUV1ExposedServiceExposedServiceResourceProtocolEnum = typeof GPUV1ExposedServiceExposedServiceResourceProtocolEnum[keyof typeof GPUV1ExposedServiceExposedServiceResourceProtocolEnum];
6924
+ export declare const GPUV1ExposedServiceExposedServiceResourceTypeEnum: {
6925
+ readonly Http: "http";
6926
+ readonly Https: "https";
6927
+ };
6928
+ export type GPUV1ExposedServiceExposedServiceResourceTypeEnum = typeof GPUV1ExposedServiceExposedServiceResourceTypeEnum[keyof typeof GPUV1ExposedServiceExposedServiceResourceTypeEnum];
6929
+ /**
6930
+ *
6931
+ * @export
6932
+ * @interface GPUV1ExposedServiceStoreRequest
6933
+ */
6934
+ export interface GPUV1ExposedServiceStoreRequest {
6935
+ /**
6936
+ * Service name, unique within the instance
6937
+ * @type {string}
6938
+ * @memberof GPUV1ExposedServiceStoreRequest
6939
+ */
6940
+ 'name': string;
6941
+ /**
6942
+ * Port the service listens on inside the instance, unique within the instance
6943
+ * @type {number}
6944
+ * @memberof GPUV1ExposedServiceStoreRequest
6945
+ */
6946
+ 'internal_port': number;
6947
+ /**
6948
+ *
6949
+ * @type {string}
6950
+ * @memberof GPUV1ExposedServiceStoreRequest
6951
+ */
6952
+ 'protocol': GPUV1ExposedServiceStoreRequestProtocolEnum;
6953
+ /**
6954
+ *
6955
+ * @type {string}
6956
+ * @memberof GPUV1ExposedServiceStoreRequest
6957
+ */
6958
+ 'type': GPUV1ExposedServiceStoreRequestTypeEnum;
6959
+ }
6960
+ export declare const GPUV1ExposedServiceStoreRequestProtocolEnum: {
6961
+ readonly Tcp: "tcp";
6962
+ readonly Udp: "udp";
6963
+ };
6964
+ export type GPUV1ExposedServiceStoreRequestProtocolEnum = typeof GPUV1ExposedServiceStoreRequestProtocolEnum[keyof typeof GPUV1ExposedServiceStoreRequestProtocolEnum];
6965
+ export declare const GPUV1ExposedServiceStoreRequestTypeEnum: {
6966
+ readonly Http: "http";
6967
+ readonly Https: "https";
6968
+ };
6969
+ export type GPUV1ExposedServiceStoreRequestTypeEnum = typeof GPUV1ExposedServiceStoreRequestTypeEnum[keyof typeof GPUV1ExposedServiceStoreRequestTypeEnum];
6870
6970
  /**
6871
6971
  *
6872
6972
  * @export
@@ -25520,6 +25620,139 @@ export declare const GetPoolGroupsV1CurrencyEnum: {
25520
25620
  readonly Zar: "ZAR";
25521
25621
  };
25522
25622
  export type GetPoolGroupsV1CurrencyEnum = typeof GetPoolGroupsV1CurrencyEnum[keyof typeof GetPoolGroupsV1CurrencyEnum];
25623
+ /**
25624
+ * GPUExposedServicesApi - axios parameter creator
25625
+ * @export
25626
+ */
25627
+ export declare const GPUExposedServicesApiAxiosParamCreator: (configuration?: Configuration) => {
25628
+ /**
25629
+ * 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.
25630
+ * @summary Create exposed service
25631
+ * @param {number} instanceId GPU instance ID
25632
+ * @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
25633
+ * @param {*} [options] Override http request option.
25634
+ * @throws {RequiredError}
25635
+ */
25636
+ createExposedServiceV1: (instanceId: number, gPUV1ExposedServiceStoreRequest: GPUV1ExposedServiceStoreRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
25637
+ /**
25638
+ * 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.
25639
+ * @summary Delete exposed service
25640
+ * @param {number} instanceId GPU instance ID
25641
+ * @param {number} exposedServiceId Exposed service ID
25642
+ * @param {*} [options] Override http request option.
25643
+ * @throws {RequiredError}
25644
+ */
25645
+ deleteExposedServiceV1: (instanceId: number, exposedServiceId: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
25646
+ /**
25647
+ * 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.
25648
+ * @summary Get exposed services
25649
+ * @param {number} instanceId GPU instance ID
25650
+ * @param {*} [options] Override http request option.
25651
+ * @throws {RequiredError}
25652
+ */
25653
+ getExposedServicesV1: (instanceId: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
25654
+ };
25655
+ /**
25656
+ * GPUExposedServicesApi - functional programming interface
25657
+ * @export
25658
+ */
25659
+ export declare const GPUExposedServicesApiFp: (configuration?: Configuration) => {
25660
+ /**
25661
+ * 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.
25662
+ * @summary Create exposed service
25663
+ * @param {number} instanceId GPU instance ID
25664
+ * @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
25665
+ * @param {*} [options] Override http request option.
25666
+ * @throws {RequiredError}
25667
+ */
25668
+ createExposedServiceV1(instanceId: number, gPUV1ExposedServiceStoreRequest: GPUV1ExposedServiceStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>>;
25669
+ /**
25670
+ * 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.
25671
+ * @summary Delete exposed service
25672
+ * @param {number} instanceId GPU instance ID
25673
+ * @param {number} exposedServiceId Exposed service ID
25674
+ * @param {*} [options] Override http request option.
25675
+ * @throws {RequiredError}
25676
+ */
25677
+ deleteExposedServiceV1(instanceId: number, exposedServiceId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>>;
25678
+ /**
25679
+ * 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.
25680
+ * @summary Get exposed services
25681
+ * @param {number} instanceId GPU instance ID
25682
+ * @param {*} [options] Override http request option.
25683
+ * @throws {RequiredError}
25684
+ */
25685
+ getExposedServicesV1(instanceId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<GPUV1ExposedServiceExposedServiceResource>>>;
25686
+ };
25687
+ /**
25688
+ * GPUExposedServicesApi - factory interface
25689
+ * @export
25690
+ */
25691
+ export declare const GPUExposedServicesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
25692
+ /**
25693
+ * 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.
25694
+ * @summary Create exposed service
25695
+ * @param {number} instanceId GPU instance ID
25696
+ * @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
25697
+ * @param {*} [options] Override http request option.
25698
+ * @throws {RequiredError}
25699
+ */
25700
+ createExposedServiceV1(instanceId: number, gPUV1ExposedServiceStoreRequest: GPUV1ExposedServiceStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource>;
25701
+ /**
25702
+ * 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.
25703
+ * @summary Delete exposed service
25704
+ * @param {number} instanceId GPU instance ID
25705
+ * @param {number} exposedServiceId Exposed service ID
25706
+ * @param {*} [options] Override http request option.
25707
+ * @throws {RequiredError}
25708
+ */
25709
+ deleteExposedServiceV1(instanceId: number, exposedServiceId: number, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource>;
25710
+ /**
25711
+ * 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.
25712
+ * @summary Get exposed services
25713
+ * @param {number} instanceId GPU instance ID
25714
+ * @param {*} [options] Override http request option.
25715
+ * @throws {RequiredError}
25716
+ */
25717
+ getExposedServicesV1(instanceId: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<GPUV1ExposedServiceExposedServiceResource>>;
25718
+ };
25719
+ /**
25720
+ * GPUExposedServicesApi - object-oriented interface
25721
+ * @export
25722
+ * @class GPUExposedServicesApi
25723
+ * @extends {BaseAPI}
25724
+ */
25725
+ export declare class GPUExposedServicesApi extends BaseAPI {
25726
+ /**
25727
+ * 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.
25728
+ * @summary Create exposed service
25729
+ * @param {number} instanceId GPU instance ID
25730
+ * @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
25731
+ * @param {*} [options] Override http request option.
25732
+ * @throws {RequiredError}
25733
+ * @memberof GPUExposedServicesApi
25734
+ */
25735
+ createExposedServiceV1(instanceId: number, gPUV1ExposedServiceStoreRequest: GPUV1ExposedServiceStoreRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CommonSuccessEmptyResource, any, {}, any>>;
25736
+ /**
25737
+ * 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.
25738
+ * @summary Delete exposed service
25739
+ * @param {number} instanceId GPU instance ID
25740
+ * @param {number} exposedServiceId Exposed service ID
25741
+ * @param {*} [options] Override http request option.
25742
+ * @throws {RequiredError}
25743
+ * @memberof GPUExposedServicesApi
25744
+ */
25745
+ deleteExposedServiceV1(instanceId: number, exposedServiceId: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CommonSuccessEmptyResource, any, {}, any>>;
25746
+ /**
25747
+ * 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.
25748
+ * @summary Get exposed services
25749
+ * @param {number} instanceId GPU instance ID
25750
+ * @param {*} [options] Override http request option.
25751
+ * @throws {RequiredError}
25752
+ * @memberof GPUExposedServicesApi
25753
+ */
25754
+ getExposedServicesV1(instanceId: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GPUV1ExposedServiceExposedServiceResource[], any, {}, any>>;
25755
+ }
25523
25756
  /**
25524
25757
  * GPUInstancesApi - axios parameter creator
25525
25758
  * @export
package/dist/esm/api.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.15.0
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,22 @@ 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
+ };
316
332
  export const GPUV1InstanceInstanceListResourceStatusEnum = {
317
333
  Created: 'created',
318
334
  Creating: 'creating',
@@ -12636,6 +12652,259 @@ export const GetPoolGroupsV1CurrencyEnum = {
12636
12652
  Vnd: 'VND',
12637
12653
  Zar: 'ZAR'
12638
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
+ }
12639
12908
  /**
12640
12909
  * GPUInstancesApi - axios parameter creator
12641
12910
  * @export
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 2.15.0
4
+ * API Version: 2.16.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/esm/base.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.15.0
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
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 2.15.0
4
+ * API Version: 2.16.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.15.0
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
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 2.15.0
4
+ * API Version: 2.16.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.15.0
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
@@ -13,7 +13,7 @@ export class Configuration {
13
13
  var _a;
14
14
  this.accessToken = param.accessToken;
15
15
  this.basePath = param.basePath;
16
- this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/2.15.0" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
16
+ this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/2.16.0" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
17
17
  this.formDataCtor = param.formDataCtor;
18
18
  }
19
19
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 2.15.0
4
+ * API Version: 2.16.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/esm/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.15.0
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/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 2.15.0
4
+ * API Version: 2.16.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 2.15.0
7
+ * API Version: 2.16.0
8
8
  *
9
9
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
10
10
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api