@nexgencloud/hyperstack-sdk-typescript 1.52.3-alpha → 1.55.1-alpha

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/api.ts CHANGED
@@ -80,6 +80,25 @@ export interface AllocatedGPUCountGraph {
80
80
  */
81
81
  'value'?: number;
82
82
  }
83
+ /**
84
+ *
85
+ * @export
86
+ * @interface AllowedCountriesResponse
87
+ */
88
+ export interface AllowedCountriesResponse {
89
+ /**
90
+ *
91
+ * @type {Array<string>}
92
+ * @memberof AllowedCountriesResponse
93
+ */
94
+ 'countries'?: Array<string>;
95
+ /**
96
+ *
97
+ * @type {boolean}
98
+ * @memberof AllowedCountriesResponse
99
+ */
100
+ 'status'?: boolean;
101
+ }
83
102
  /**
84
103
  *
85
104
  * @export
@@ -2677,6 +2696,12 @@ export interface CreateInstancesPayload {
2677
2696
  * @memberof CreateInstancesPayload
2678
2697
  */
2679
2698
  'enable_port_randomization'?: boolean;
2699
+ /**
2700
+ * When true, the Hyperstack VM Agent is opted in for this VM and metrics ingestion is allowed by the prom-gateway. The agent must still be installed on the VM (typically via user_data cloud-init).
2701
+ * @type {boolean}
2702
+ * @memberof CreateInstancesPayload
2703
+ */
2704
+ 'enhanced_monitoring_enabled'?: boolean;
2680
2705
  /**
2681
2706
  * The name of the [environment](https://docs.hyperstack.cloud/docs/api-reference/core-resources/environments/) in which the virtual machine is to be created.
2682
2707
  * @type {string}
@@ -3391,6 +3416,129 @@ export interface EditLabelOfAnExistingVMPayload {
3391
3416
  */
3392
3417
  'labels'?: Array<string>;
3393
3418
  }
3419
+ /**
3420
+ *
3421
+ * @export
3422
+ * @interface EmailCategory
3423
+ */
3424
+ export interface EmailCategory {
3425
+ /**
3426
+ *
3427
+ * @type {Array<EmailCategoryChild>}
3428
+ * @memberof EmailCategory
3429
+ */
3430
+ 'childs'?: Array<EmailCategoryChild>;
3431
+ /**
3432
+ *
3433
+ * @type {string}
3434
+ * @memberof EmailCategory
3435
+ */
3436
+ 'description'?: string;
3437
+ /**
3438
+ *
3439
+ * @type {string}
3440
+ * @memberof EmailCategory
3441
+ */
3442
+ 'display_name'?: string;
3443
+ /**
3444
+ *
3445
+ * @type {string}
3446
+ * @memberof EmailCategory
3447
+ */
3448
+ 'icon'?: string;
3449
+ /**
3450
+ *
3451
+ * @type {boolean}
3452
+ * @memberof EmailCategory
3453
+ */
3454
+ 'opted_in'?: boolean;
3455
+ /**
3456
+ *
3457
+ * @type {number}
3458
+ * @memberof EmailCategory
3459
+ */
3460
+ 'position'?: number;
3461
+ /**
3462
+ *
3463
+ * @type {boolean}
3464
+ * @memberof EmailCategory
3465
+ */
3466
+ 'required'?: boolean;
3467
+ /**
3468
+ *
3469
+ * @type {string}
3470
+ * @memberof EmailCategory
3471
+ */
3472
+ 'slug'?: string;
3473
+ }
3474
+ /**
3475
+ *
3476
+ * @export
3477
+ * @interface EmailCategoryChild
3478
+ */
3479
+ export interface EmailCategoryChild {
3480
+ /**
3481
+ *
3482
+ * @type {string}
3483
+ * @memberof EmailCategoryChild
3484
+ */
3485
+ 'description'?: string;
3486
+ /**
3487
+ *
3488
+ * @type {string}
3489
+ * @memberof EmailCategoryChild
3490
+ */
3491
+ 'display_name'?: string;
3492
+ /**
3493
+ *
3494
+ * @type {number}
3495
+ * @memberof EmailCategoryChild
3496
+ */
3497
+ 'email_category_id'?: number;
3498
+ /**
3499
+ *
3500
+ * @type {string}
3501
+ * @memberof EmailCategoryChild
3502
+ */
3503
+ 'icon'?: string;
3504
+ /**
3505
+ *
3506
+ * @type {boolean}
3507
+ * @memberof EmailCategoryChild
3508
+ */
3509
+ 'opted_in'?: boolean;
3510
+ /**
3511
+ *
3512
+ * @type {number}
3513
+ * @memberof EmailCategoryChild
3514
+ */
3515
+ 'position'?: number;
3516
+ /**
3517
+ *
3518
+ * @type {boolean}
3519
+ * @memberof EmailCategoryChild
3520
+ */
3521
+ 'required'?: boolean;
3522
+ /**
3523
+ *
3524
+ * @type {string}
3525
+ * @memberof EmailCategoryChild
3526
+ */
3527
+ 'slug'?: string;
3528
+ }
3529
+ /**
3530
+ *
3531
+ * @export
3532
+ * @interface EmailPreferencesResponse
3533
+ */
3534
+ export interface EmailPreferencesResponse {
3535
+ /**
3536
+ *
3537
+ * @type {Array<EmailCategory>}
3538
+ * @memberof EmailPreferencesResponse
3539
+ */
3540
+ 'email_categories'?: Array<EmailCategory>;
3541
+ }
3394
3542
  /**
3395
3543
  *
3396
3544
  * @export
@@ -4852,6 +5000,19 @@ export interface Instance {
4852
5000
  */
4853
5001
  'status'?: boolean;
4854
5002
  }
5003
+ /**
5004
+ *
5005
+ * @export
5006
+ * @interface InstanceEnhancedMetricsFields
5007
+ */
5008
+ export interface InstanceEnhancedMetricsFields {
5009
+ /**
5010
+ *
5011
+ * @type {boolean}
5012
+ * @memberof InstanceEnhancedMetricsFields
5013
+ */
5014
+ 'enabled'?: boolean;
5015
+ }
4855
5016
  /**
4856
5017
  *
4857
5018
  * @export
@@ -4993,6 +5154,12 @@ export interface InstanceFields {
4993
5154
  * @memberof InstanceFields
4994
5155
  */
4995
5156
  'created_at'?: string;
5157
+ /**
5158
+ *
5159
+ * @type {InstanceEnhancedMetricsFields}
5160
+ * @memberof InstanceFields
5161
+ */
5162
+ 'enhanced_metrics'?: InstanceEnhancedMetricsFields;
4996
5163
  /**
4997
5164
  *
4998
5165
  * @type {InstanceEnvironmentFields}
@@ -9387,6 +9554,31 @@ export interface SubscribeOrUnsubscribeUpdatePayload {
9387
9554
  */
9388
9555
  'subscribe': boolean;
9389
9556
  }
9557
+ /**
9558
+ *
9559
+ * @export
9560
+ * @interface SupportedKeypairPublicKeyTypesResponse
9561
+ */
9562
+ export interface SupportedKeypairPublicKeyTypesResponse {
9563
+ /**
9564
+ *
9565
+ * @type {string}
9566
+ * @memberof SupportedKeypairPublicKeyTypesResponse
9567
+ */
9568
+ 'message'?: string;
9569
+ /**
9570
+ *
9571
+ * @type {boolean}
9572
+ * @memberof SupportedKeypairPublicKeyTypesResponse
9573
+ */
9574
+ 'status'?: boolean;
9575
+ /**
9576
+ *
9577
+ * @type {Array<string>}
9578
+ * @memberof SupportedKeypairPublicKeyTypesResponse
9579
+ */
9580
+ 'supported_key_types'?: Array<string>;
9581
+ }
9390
9582
  /**
9391
9583
  *
9392
9584
  * @export
@@ -9669,6 +9861,32 @@ export const UpdateConsentRequestConsentMethodEnum = {
9669
9861
 
9670
9862
  export type UpdateConsentRequestConsentMethodEnum = typeof UpdateConsentRequestConsentMethodEnum[keyof typeof UpdateConsentRequestConsentMethodEnum];
9671
9863
 
9864
+ /**
9865
+ *
9866
+ * @export
9867
+ * @interface UpdateEmailPreferenceInput
9868
+ */
9869
+ export interface UpdateEmailPreferenceInput {
9870
+ /**
9871
+ * Set opted_in status
9872
+ * @type {boolean}
9873
+ * @memberof UpdateEmailPreferenceInput
9874
+ */
9875
+ 'opted_in': boolean;
9876
+ }
9877
+ /**
9878
+ *
9879
+ * @export
9880
+ * @interface UpdateEmailPreferenceResponse
9881
+ */
9882
+ export interface UpdateEmailPreferenceResponse {
9883
+ /**
9884
+ *
9885
+ * @type {string}
9886
+ * @memberof UpdateEmailPreferenceResponse
9887
+ */
9888
+ 'message'?: string;
9889
+ }
9672
9890
  /**
9673
9891
  *
9674
9892
  * @export
@@ -10007,6 +10225,63 @@ export interface UserDefaultChoicesForUserResponse {
10007
10225
  */
10008
10226
  'user_default_choices'?: Array<UserDefaultChoiceForUserFields>;
10009
10227
  }
10228
+ /**
10229
+ *
10230
+ * @export
10231
+ * @interface UserEnhancedMetricsPayload
10232
+ */
10233
+ export interface UserEnhancedMetricsPayload {
10234
+ /**
10235
+ * Set to true to opt this VM into Enhanced Metrics, false to opt out.
10236
+ * @type {boolean}
10237
+ * @memberof UserEnhancedMetricsPayload
10238
+ */
10239
+ 'enabled': boolean;
10240
+ }
10241
+ /**
10242
+ *
10243
+ * @export
10244
+ * @interface UserEnhancedMetricsResponse
10245
+ */
10246
+ export interface UserEnhancedMetricsResponse {
10247
+ /**
10248
+ * One-liner the user can run inside the VM to install the agent when enabling. Omitted when disabling.
10249
+ * @type {string}
10250
+ * @memberof UserEnhancedMetricsResponse
10251
+ */
10252
+ 'install_command'?: string;
10253
+ /**
10254
+ *
10255
+ * @type {string}
10256
+ * @memberof UserEnhancedMetricsResponse
10257
+ */
10258
+ 'message'?: string;
10259
+ /**
10260
+ *
10261
+ * @type {UserEnhancedMetricsResponseFields}
10262
+ * @memberof UserEnhancedMetricsResponse
10263
+ */
10264
+ 'metrics'?: UserEnhancedMetricsResponseFields;
10265
+ /**
10266
+ *
10267
+ * @type {boolean}
10268
+ * @memberof UserEnhancedMetricsResponse
10269
+ */
10270
+ 'status'?: boolean;
10271
+ }
10272
+ /**
10273
+ *
10274
+ * @export
10275
+ * @interface UserEnhancedMetricsResponseFields
10276
+ */
10277
+ export interface UserEnhancedMetricsResponseFields {
10278
+ /**
10279
+ *
10280
+ * @type {boolean}
10281
+ * @memberof UserEnhancedMetricsResponseFields
10282
+ */
10283
+ 'enabled'?: boolean;
10284
+ }
10010
10285
  /**
10011
10286
  *
10012
10287
  * @export
@@ -19920,22 +20195,19 @@ export class DeploymentApi extends BaseAPI {
19920
20195
 
19921
20196
 
19922
20197
  /**
19923
- * EnvironmentApi - axios parameter creator
20198
+ * EmailOptInOutApi - axios parameter creator
19924
20199
  * @export
19925
20200
  */
19926
- export const EnvironmentApiAxiosParamCreator = function (configuration?: Configuration) {
20201
+ export const EmailOptInOutApiAxiosParamCreator = function (configuration?: Configuration) {
19927
20202
  return {
19928
20203
  /**
19929
- * Creates an environment—a container to organize your resources, including SSH key pairs, virtual machines, and volumes. To create your environment, provide your desired environment name, and [**region**](https://docs.hyperstack.cloud/docs/resource-management/regions/) in the request body.
19930
- * @summary Create environment
19931
- * @param {CreateEnvironment} payload
20204
+ * Returns all email categories with the user\'s opt-in status. Categories without an explicit preference default to opted_in=true.
20205
+ * @summary Get all email preferences for the authenticated user
19932
20206
  * @param {*} [options] Override http request option.
19933
20207
  * @throws {RequiredError}
19934
20208
  */
19935
- createEnvironment: async (payload: CreateEnvironment, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
19936
- // verify required parameter 'payload' is not null or undefined
19937
- assertParamExists('createEnvironment', 'payload', payload)
19938
- const localVarPath = `/core/environments`;
20209
+ getEmailPreferencesForAUser: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
20210
+ const localVarPath = `/auth/email/opt-out`;
19939
20211
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
19940
20212
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
19941
20213
  let baseOptions;
@@ -19943,7 +20215,7 @@ export const EnvironmentApiAxiosParamCreator = function (configuration?: Configu
19943
20215
  baseOptions = configuration.baseOptions;
19944
20216
  }
19945
20217
 
19946
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
20218
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
19947
20219
  const localVarHeaderParameter = {} as any;
19948
20220
  const localVarQueryParameter = {} as any;
19949
20221
 
@@ -19952,12 +20224,9 @@ export const EnvironmentApiAxiosParamCreator = function (configuration?: Configu
19952
20224
 
19953
20225
 
19954
20226
 
19955
- localVarHeaderParameter['Content-Type'] = 'application/json';
19956
-
19957
20227
  setSearchParams(localVarUrlObj, localVarQueryParameter);
19958
20228
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
19959
20229
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
19960
- localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration)
19961
20230
 
19962
20231
  return {
19963
20232
  url: toPathString(localVarUrlObj),
@@ -19965,17 +20234,16 @@ export const EnvironmentApiAxiosParamCreator = function (configuration?: Configu
19965
20234
  };
19966
20235
  },
19967
20236
  /**
19968
- * Deletes an environment permanently. Provide the environment ID in the path to remove the specified environment.
19969
- * @summary Delete environment
19970
- * @param {number} id
20237
+ * Sets opted_in to the given value for every non-required, non-deleted email category. Required categories are not affected.
20238
+ * @summary Toggle all optional email preferences for the authenticated user
20239
+ * @param {UpdateEmailPreferenceInput} payload
19971
20240
  * @param {*} [options] Override http request option.
19972
20241
  * @throws {RequiredError}
19973
20242
  */
19974
- deleteEnvironment: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
19975
- // verify required parameter 'id' is not null or undefined
19976
- assertParamExists('deleteEnvironment', 'id', id)
19977
- const localVarPath = `/core/environments/{id}`
19978
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
20243
+ toggleAllOptionalEmailPreferencesForTheUser: async (payload: UpdateEmailPreferenceInput, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
20244
+ // verify required parameter 'payload' is not null or undefined
20245
+ assertParamExists('toggleAllOptionalEmailPreferencesForTheUser', 'payload', payload)
20246
+ const localVarPath = `/auth/email/opt-out`;
19979
20247
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
19980
20248
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
19981
20249
  let baseOptions;
@@ -19983,7 +20251,7 @@ export const EnvironmentApiAxiosParamCreator = function (configuration?: Configu
19983
20251
  baseOptions = configuration.baseOptions;
19984
20252
  }
19985
20253
 
19986
- const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
20254
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
19987
20255
  const localVarHeaderParameter = {} as any;
19988
20256
  const localVarQueryParameter = {} as any;
19989
20257
 
@@ -19992,9 +20260,12 @@ export const EnvironmentApiAxiosParamCreator = function (configuration?: Configu
19992
20260
 
19993
20261
 
19994
20262
 
20263
+ localVarHeaderParameter['Content-Type'] = 'application/json';
20264
+
19995
20265
  setSearchParams(localVarUrlObj, localVarQueryParameter);
19996
20266
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
19997
20267
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
20268
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration)
19998
20269
 
19999
20270
  return {
20000
20271
  url: toPathString(localVarUrlObj),
@@ -20002,17 +20273,20 @@ export const EnvironmentApiAxiosParamCreator = function (configuration?: Configu
20002
20273
  };
20003
20274
  },
20004
20275
  /**
20005
- * Check if a Environment name is available
20006
- * @summary Fetch environment name availability
20007
- * @param {string} name
20276
+ * Updates the opted_in status for the given email category slug. If the slug belongs to a parent category (email_category_id is null), all non-deleted child categories are updated. If the slug belongs to a child category, only that category is updated.
20277
+ * @summary Update email preference opted_in status for a category slug
20278
+ * @param {string} slug
20279
+ * @param {UpdateEmailPreferenceInput} payload
20008
20280
  * @param {*} [options] Override http request option.
20009
20281
  * @throws {RequiredError}
20010
20282
  */
20011
- fetchEnvironmentNameAvailability: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
20012
- // verify required parameter 'name' is not null or undefined
20013
- assertParamExists('fetchEnvironmentNameAvailability', 'name', name)
20014
- const localVarPath = `/core/environments/name-availability/{name}`
20015
- .replace(`{${"name"}}`, encodeURIComponent(String(name)));
20283
+ updateEmailPreferenceForACategoryBySlug: async (slug: string, payload: UpdateEmailPreferenceInput, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
20284
+ // verify required parameter 'slug' is not null or undefined
20285
+ assertParamExists('updateEmailPreferenceForACategoryBySlug', 'slug', slug)
20286
+ // verify required parameter 'payload' is not null or undefined
20287
+ assertParamExists('updateEmailPreferenceForACategoryBySlug', 'payload', payload)
20288
+ const localVarPath = `/auth/email/opt-out/{slug}`
20289
+ .replace(`{${"slug"}}`, encodeURIComponent(String(slug)));
20016
20290
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
20017
20291
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
20018
20292
  let baseOptions;
@@ -20020,7 +20294,7 @@ export const EnvironmentApiAxiosParamCreator = function (configuration?: Configu
20020
20294
  baseOptions = configuration.baseOptions;
20021
20295
  }
20022
20296
 
20023
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
20297
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
20024
20298
  const localVarHeaderParameter = {} as any;
20025
20299
  const localVarQueryParameter = {} as any;
20026
20300
 
@@ -20029,35 +20303,295 @@ export const EnvironmentApiAxiosParamCreator = function (configuration?: Configu
20029
20303
 
20030
20304
 
20031
20305
 
20306
+ localVarHeaderParameter['Content-Type'] = 'application/json';
20307
+
20032
20308
  setSearchParams(localVarUrlObj, localVarQueryParameter);
20033
20309
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
20034
20310
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
20311
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration)
20035
20312
 
20036
20313
  return {
20037
20314
  url: toPathString(localVarUrlObj),
20038
20315
  options: localVarRequestOptions,
20039
20316
  };
20040
20317
  },
20318
+ }
20319
+ };
20320
+
20321
+ /**
20322
+ * EmailOptInOutApi - functional programming interface
20323
+ * @export
20324
+ */
20325
+ export const EmailOptInOutApiFp = function(configuration?: Configuration) {
20326
+ const localVarAxiosParamCreator = EmailOptInOutApiAxiosParamCreator(configuration)
20327
+ return {
20041
20328
  /**
20042
- * Retrieves details about a specific environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment.
20043
- * @summary Retrieve environment
20044
- * @param {number} id
20329
+ * Returns all email categories with the user\'s opt-in status. Categories without an explicit preference default to opted_in=true.
20330
+ * @summary Get all email preferences for the authenticated user
20045
20331
  * @param {*} [options] Override http request option.
20046
20332
  * @throws {RequiredError}
20047
20333
  */
20048
- getEnvironment: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
20049
- // verify required parameter 'id' is not null or undefined
20050
- assertParamExists('getEnvironment', 'id', id)
20051
- const localVarPath = `/core/environments/{id}`
20052
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
20053
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
20054
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
20055
- let baseOptions;
20056
- if (configuration) {
20057
- baseOptions = configuration.baseOptions;
20058
- }
20059
-
20060
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
20334
+ async getEmailPreferencesForAUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EmailPreferencesResponse>> {
20335
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getEmailPreferencesForAUser(options);
20336
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
20337
+ const localVarOperationServerBasePath = operationServerMap['EmailOptInOutApi.getEmailPreferencesForAUser']?.[localVarOperationServerIndex]?.url;
20338
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
20339
+ },
20340
+ /**
20341
+ * Sets opted_in to the given value for every non-required, non-deleted email category. Required categories are not affected.
20342
+ * @summary Toggle all optional email preferences for the authenticated user
20343
+ * @param {UpdateEmailPreferenceInput} payload
20344
+ * @param {*} [options] Override http request option.
20345
+ * @throws {RequiredError}
20346
+ */
20347
+ async toggleAllOptionalEmailPreferencesForTheUser(payload: UpdateEmailPreferenceInput, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateEmailPreferenceResponse>> {
20348
+ const localVarAxiosArgs = await localVarAxiosParamCreator.toggleAllOptionalEmailPreferencesForTheUser(payload, options);
20349
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
20350
+ const localVarOperationServerBasePath = operationServerMap['EmailOptInOutApi.toggleAllOptionalEmailPreferencesForTheUser']?.[localVarOperationServerIndex]?.url;
20351
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
20352
+ },
20353
+ /**
20354
+ * Updates the opted_in status for the given email category slug. If the slug belongs to a parent category (email_category_id is null), all non-deleted child categories are updated. If the slug belongs to a child category, only that category is updated.
20355
+ * @summary Update email preference opted_in status for a category slug
20356
+ * @param {string} slug
20357
+ * @param {UpdateEmailPreferenceInput} payload
20358
+ * @param {*} [options] Override http request option.
20359
+ * @throws {RequiredError}
20360
+ */
20361
+ async updateEmailPreferenceForACategoryBySlug(slug: string, payload: UpdateEmailPreferenceInput, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateEmailPreferenceResponse>> {
20362
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateEmailPreferenceForACategoryBySlug(slug, payload, options);
20363
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
20364
+ const localVarOperationServerBasePath = operationServerMap['EmailOptInOutApi.updateEmailPreferenceForACategoryBySlug']?.[localVarOperationServerIndex]?.url;
20365
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
20366
+ },
20367
+ }
20368
+ };
20369
+
20370
+ /**
20371
+ * EmailOptInOutApi - factory interface
20372
+ * @export
20373
+ */
20374
+ export const EmailOptInOutApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
20375
+ const localVarFp = EmailOptInOutApiFp(configuration)
20376
+ return {
20377
+ /**
20378
+ * Returns all email categories with the user\'s opt-in status. Categories without an explicit preference default to opted_in=true.
20379
+ * @summary Get all email preferences for the authenticated user
20380
+ * @param {*} [options] Override http request option.
20381
+ * @throws {RequiredError}
20382
+ */
20383
+ getEmailPreferencesForAUser(options?: RawAxiosRequestConfig): AxiosPromise<EmailPreferencesResponse> {
20384
+ return localVarFp.getEmailPreferencesForAUser(options).then((request) => request(axios, basePath));
20385
+ },
20386
+ /**
20387
+ * Sets opted_in to the given value for every non-required, non-deleted email category. Required categories are not affected.
20388
+ * @summary Toggle all optional email preferences for the authenticated user
20389
+ * @param {UpdateEmailPreferenceInput} payload
20390
+ * @param {*} [options] Override http request option.
20391
+ * @throws {RequiredError}
20392
+ */
20393
+ toggleAllOptionalEmailPreferencesForTheUser(payload: UpdateEmailPreferenceInput, options?: RawAxiosRequestConfig): AxiosPromise<UpdateEmailPreferenceResponse> {
20394
+ return localVarFp.toggleAllOptionalEmailPreferencesForTheUser(payload, options).then((request) => request(axios, basePath));
20395
+ },
20396
+ /**
20397
+ * Updates the opted_in status for the given email category slug. If the slug belongs to a parent category (email_category_id is null), all non-deleted child categories are updated. If the slug belongs to a child category, only that category is updated.
20398
+ * @summary Update email preference opted_in status for a category slug
20399
+ * @param {string} slug
20400
+ * @param {UpdateEmailPreferenceInput} payload
20401
+ * @param {*} [options] Override http request option.
20402
+ * @throws {RequiredError}
20403
+ */
20404
+ updateEmailPreferenceForACategoryBySlug(slug: string, payload: UpdateEmailPreferenceInput, options?: RawAxiosRequestConfig): AxiosPromise<UpdateEmailPreferenceResponse> {
20405
+ return localVarFp.updateEmailPreferenceForACategoryBySlug(slug, payload, options).then((request) => request(axios, basePath));
20406
+ },
20407
+ };
20408
+ };
20409
+
20410
+ /**
20411
+ * EmailOptInOutApi - object-oriented interface
20412
+ * @export
20413
+ * @class EmailOptInOutApi
20414
+ * @extends {BaseAPI}
20415
+ */
20416
+ export class EmailOptInOutApi extends BaseAPI {
20417
+ /**
20418
+ * Returns all email categories with the user\'s opt-in status. Categories without an explicit preference default to opted_in=true.
20419
+ * @summary Get all email preferences for the authenticated user
20420
+ * @param {*} [options] Override http request option.
20421
+ * @throws {RequiredError}
20422
+ * @memberof EmailOptInOutApi
20423
+ */
20424
+ public getEmailPreferencesForAUser(options?: RawAxiosRequestConfig) {
20425
+ return EmailOptInOutApiFp(this.configuration).getEmailPreferencesForAUser(options).then((request) => request(this.axios, this.basePath));
20426
+ }
20427
+
20428
+ /**
20429
+ * Sets opted_in to the given value for every non-required, non-deleted email category. Required categories are not affected.
20430
+ * @summary Toggle all optional email preferences for the authenticated user
20431
+ * @param {UpdateEmailPreferenceInput} payload
20432
+ * @param {*} [options] Override http request option.
20433
+ * @throws {RequiredError}
20434
+ * @memberof EmailOptInOutApi
20435
+ */
20436
+ public toggleAllOptionalEmailPreferencesForTheUser(payload: UpdateEmailPreferenceInput, options?: RawAxiosRequestConfig) {
20437
+ return EmailOptInOutApiFp(this.configuration).toggleAllOptionalEmailPreferencesForTheUser(payload, options).then((request) => request(this.axios, this.basePath));
20438
+ }
20439
+
20440
+ /**
20441
+ * Updates the opted_in status for the given email category slug. If the slug belongs to a parent category (email_category_id is null), all non-deleted child categories are updated. If the slug belongs to a child category, only that category is updated.
20442
+ * @summary Update email preference opted_in status for a category slug
20443
+ * @param {string} slug
20444
+ * @param {UpdateEmailPreferenceInput} payload
20445
+ * @param {*} [options] Override http request option.
20446
+ * @throws {RequiredError}
20447
+ * @memberof EmailOptInOutApi
20448
+ */
20449
+ public updateEmailPreferenceForACategoryBySlug(slug: string, payload: UpdateEmailPreferenceInput, options?: RawAxiosRequestConfig) {
20450
+ return EmailOptInOutApiFp(this.configuration).updateEmailPreferenceForACategoryBySlug(slug, payload, options).then((request) => request(this.axios, this.basePath));
20451
+ }
20452
+ }
20453
+
20454
+
20455
+
20456
+ /**
20457
+ * EnvironmentApi - axios parameter creator
20458
+ * @export
20459
+ */
20460
+ export const EnvironmentApiAxiosParamCreator = function (configuration?: Configuration) {
20461
+ return {
20462
+ /**
20463
+ * Creates an environment—a container to organize your resources, including SSH key pairs, virtual machines, and volumes. To create your environment, provide your desired environment name, and [**region**](https://docs.hyperstack.cloud/docs/resource-management/regions/) in the request body.
20464
+ * @summary Create environment
20465
+ * @param {CreateEnvironment} payload
20466
+ * @param {*} [options] Override http request option.
20467
+ * @throws {RequiredError}
20468
+ */
20469
+ createEnvironment: async (payload: CreateEnvironment, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
20470
+ // verify required parameter 'payload' is not null or undefined
20471
+ assertParamExists('createEnvironment', 'payload', payload)
20472
+ const localVarPath = `/core/environments`;
20473
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
20474
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
20475
+ let baseOptions;
20476
+ if (configuration) {
20477
+ baseOptions = configuration.baseOptions;
20478
+ }
20479
+
20480
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
20481
+ const localVarHeaderParameter = {} as any;
20482
+ const localVarQueryParameter = {} as any;
20483
+
20484
+ // authentication apiKey required
20485
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
20486
+
20487
+
20488
+
20489
+ localVarHeaderParameter['Content-Type'] = 'application/json';
20490
+
20491
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
20492
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
20493
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
20494
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration)
20495
+
20496
+ return {
20497
+ url: toPathString(localVarUrlObj),
20498
+ options: localVarRequestOptions,
20499
+ };
20500
+ },
20501
+ /**
20502
+ * Deletes an environment permanently. Provide the environment ID in the path to remove the specified environment.
20503
+ * @summary Delete environment
20504
+ * @param {number} id
20505
+ * @param {*} [options] Override http request option.
20506
+ * @throws {RequiredError}
20507
+ */
20508
+ deleteEnvironment: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
20509
+ // verify required parameter 'id' is not null or undefined
20510
+ assertParamExists('deleteEnvironment', 'id', id)
20511
+ const localVarPath = `/core/environments/{id}`
20512
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
20513
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
20514
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
20515
+ let baseOptions;
20516
+ if (configuration) {
20517
+ baseOptions = configuration.baseOptions;
20518
+ }
20519
+
20520
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
20521
+ const localVarHeaderParameter = {} as any;
20522
+ const localVarQueryParameter = {} as any;
20523
+
20524
+ // authentication apiKey required
20525
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
20526
+
20527
+
20528
+
20529
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
20530
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
20531
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
20532
+
20533
+ return {
20534
+ url: toPathString(localVarUrlObj),
20535
+ options: localVarRequestOptions,
20536
+ };
20537
+ },
20538
+ /**
20539
+ * Check if a Environment name is available
20540
+ * @summary Fetch environment name availability
20541
+ * @param {string} name
20542
+ * @param {*} [options] Override http request option.
20543
+ * @throws {RequiredError}
20544
+ */
20545
+ fetchEnvironmentNameAvailability: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
20546
+ // verify required parameter 'name' is not null or undefined
20547
+ assertParamExists('fetchEnvironmentNameAvailability', 'name', name)
20548
+ const localVarPath = `/core/environments/name-availability/{name}`
20549
+ .replace(`{${"name"}}`, encodeURIComponent(String(name)));
20550
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
20551
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
20552
+ let baseOptions;
20553
+ if (configuration) {
20554
+ baseOptions = configuration.baseOptions;
20555
+ }
20556
+
20557
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
20558
+ const localVarHeaderParameter = {} as any;
20559
+ const localVarQueryParameter = {} as any;
20560
+
20561
+ // authentication apiKey required
20562
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
20563
+
20564
+
20565
+
20566
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
20567
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
20568
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
20569
+
20570
+ return {
20571
+ url: toPathString(localVarUrlObj),
20572
+ options: localVarRequestOptions,
20573
+ };
20574
+ },
20575
+ /**
20576
+ * Retrieves details about a specific environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment.
20577
+ * @summary Retrieve environment
20578
+ * @param {number} id
20579
+ * @param {*} [options] Override http request option.
20580
+ * @throws {RequiredError}
20581
+ */
20582
+ getEnvironment: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
20583
+ // verify required parameter 'id' is not null or undefined
20584
+ assertParamExists('getEnvironment', 'id', id)
20585
+ const localVarPath = `/core/environments/{id}`
20586
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
20587
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
20588
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
20589
+ let baseOptions;
20590
+ if (configuration) {
20591
+ baseOptions = configuration.baseOptions;
20592
+ }
20593
+
20594
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
20061
20595
  const localVarHeaderParameter = {} as any;
20062
20596
  const localVarQueryParameter = {} as any;
20063
20597
 
@@ -22545,6 +23079,39 @@ export const KeypairApiAxiosParamCreator = function (configuration?: Configurati
22545
23079
 
22546
23080
 
22547
23081
 
23082
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
23083
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
23084
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
23085
+
23086
+ return {
23087
+ url: toPathString(localVarUrlObj),
23088
+ options: localVarRequestOptions,
23089
+ };
23090
+ },
23091
+ /**
23092
+ * Retrieves the SSH public key types supported for import.
23093
+ * @summary List supported key pair types
23094
+ * @param {*} [options] Override http request option.
23095
+ * @throws {RequiredError}
23096
+ */
23097
+ listSupportedKeyPairTypes: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
23098
+ const localVarPath = `/core/supported-keypairs`;
23099
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
23100
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
23101
+ let baseOptions;
23102
+ if (configuration) {
23103
+ baseOptions = configuration.baseOptions;
23104
+ }
23105
+
23106
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
23107
+ const localVarHeaderParameter = {} as any;
23108
+ const localVarQueryParameter = {} as any;
23109
+
23110
+ // authentication apiKey required
23111
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
23112
+
23113
+
23114
+
22548
23115
  setSearchParams(localVarUrlObj, localVarQueryParameter);
22549
23116
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
22550
23117
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -22648,6 +23215,18 @@ export const KeypairApiFp = function(configuration?: Configuration) {
22648
23215
  const localVarOperationServerBasePath = operationServerMap['KeypairApi.listKeyPairs']?.[localVarOperationServerIndex]?.url;
22649
23216
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
22650
23217
  },
23218
+ /**
23219
+ * Retrieves the SSH public key types supported for import.
23220
+ * @summary List supported key pair types
23221
+ * @param {*} [options] Override http request option.
23222
+ * @throws {RequiredError}
23223
+ */
23224
+ async listSupportedKeyPairTypes(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SupportedKeypairPublicKeyTypesResponse>> {
23225
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listSupportedKeyPairTypes(options);
23226
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
23227
+ const localVarOperationServerBasePath = operationServerMap['KeypairApi.listSupportedKeyPairTypes']?.[localVarOperationServerIndex]?.url;
23228
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
23229
+ },
22651
23230
  /**
22652
23231
  * Updates the name of a specified key pair. Provide the key pair ID in the path, and include the new `name` in the request body.
22653
23232
  * @summary Update key pair name
@@ -22704,6 +23283,15 @@ export const KeypairApiFactory = function (configuration?: Configuration, basePa
22704
23283
  listKeyPairs(page?: string, pageSize?: string, search?: string, options?: RawAxiosRequestConfig): AxiosPromise<Keypairs> {
22705
23284
  return localVarFp.listKeyPairs(page, pageSize, search, options).then((request) => request(axios, basePath));
22706
23285
  },
23286
+ /**
23287
+ * Retrieves the SSH public key types supported for import.
23288
+ * @summary List supported key pair types
23289
+ * @param {*} [options] Override http request option.
23290
+ * @throws {RequiredError}
23291
+ */
23292
+ listSupportedKeyPairTypes(options?: RawAxiosRequestConfig): AxiosPromise<SupportedKeypairPublicKeyTypesResponse> {
23293
+ return localVarFp.listSupportedKeyPairTypes(options).then((request) => request(axios, basePath));
23294
+ },
22707
23295
  /**
22708
23296
  * Updates the name of a specified key pair. Provide the key pair ID in the path, and include the new `name` in the request body.
22709
23297
  * @summary Update key pair name
@@ -22763,6 +23351,17 @@ export class KeypairApi extends BaseAPI {
22763
23351
  return KeypairApiFp(this.configuration).listKeyPairs(page, pageSize, search, options).then((request) => request(this.axios, this.basePath));
22764
23352
  }
22765
23353
 
23354
+ /**
23355
+ * Retrieves the SSH public key types supported for import.
23356
+ * @summary List supported key pair types
23357
+ * @param {*} [options] Override http request option.
23358
+ * @throws {RequiredError}
23359
+ * @memberof KeypairApi
23360
+ */
23361
+ public listSupportedKeyPairTypes(options?: RawAxiosRequestConfig) {
23362
+ return KeypairApiFp(this.configuration).listSupportedKeyPairTypes(options).then((request) => request(this.axios, this.basePath));
23363
+ }
23364
+
22766
23365
  /**
22767
23366
  * Updates the name of a specified key pair. Provide the key pair ID in the path, and include the new `name` in the request body.
22768
23367
  * @summary Update key pair name
@@ -26011,6 +26610,39 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
26011
26610
  options: localVarRequestOptions,
26012
26611
  };
26013
26612
  },
26613
+ /**
26614
+ * Retrieve the list of allowed ISO 3166-1 alpha-2 country codes that can be used for billing information.
26615
+ * @summary GET: Retrieve allowed country codes
26616
+ * @param {*} [options] Override http request option.
26617
+ * @throws {RequiredError}
26618
+ */
26619
+ getAllowedCountryCodes: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
26620
+ const localVarPath = `/billing/user/countries`;
26621
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
26622
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
26623
+ let baseOptions;
26624
+ if (configuration) {
26625
+ baseOptions = configuration.baseOptions;
26626
+ }
26627
+
26628
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
26629
+ const localVarHeaderParameter = {} as any;
26630
+ const localVarQueryParameter = {} as any;
26631
+
26632
+ // authentication apiKey required
26633
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
26634
+
26635
+
26636
+
26637
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
26638
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
26639
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
26640
+
26641
+ return {
26642
+ url: toPathString(localVarUrlObj),
26643
+ options: localVarRequestOptions,
26644
+ };
26645
+ },
26014
26646
  /**
26015
26647
  * Retrieve the billing details associated with your user.
26016
26648
  * @summary GET: Retrieve billing info
@@ -26106,6 +26738,18 @@ export const UserApiFp = function(configuration?: Configuration) {
26106
26738
  const localVarOperationServerBasePath = operationServerMap['UserApi.addUserBillingInfo']?.[localVarOperationServerIndex]?.url;
26107
26739
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
26108
26740
  },
26741
+ /**
26742
+ * Retrieve the list of allowed ISO 3166-1 alpha-2 country codes that can be used for billing information.
26743
+ * @summary GET: Retrieve allowed country codes
26744
+ * @param {*} [options] Override http request option.
26745
+ * @throws {RequiredError}
26746
+ */
26747
+ async getAllowedCountryCodes(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AllowedCountriesResponse>> {
26748
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAllowedCountryCodes(options);
26749
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
26750
+ const localVarOperationServerBasePath = operationServerMap['UserApi.getAllowedCountryCodes']?.[localVarOperationServerIndex]?.url;
26751
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
26752
+ },
26109
26753
  /**
26110
26754
  * Retrieve the billing details associated with your user.
26111
26755
  * @summary GET: Retrieve billing info
@@ -26151,6 +26795,15 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
26151
26795
  addUserBillingInfo(payload: UserInfoPostPayload, options?: RawAxiosRequestConfig): AxiosPromise<AddUserInfoSuccessResponseModel> {
26152
26796
  return localVarFp.addUserBillingInfo(payload, options).then((request) => request(axios, basePath));
26153
26797
  },
26798
+ /**
26799
+ * Retrieve the list of allowed ISO 3166-1 alpha-2 country codes that can be used for billing information.
26800
+ * @summary GET: Retrieve allowed country codes
26801
+ * @param {*} [options] Override http request option.
26802
+ * @throws {RequiredError}
26803
+ */
26804
+ getAllowedCountryCodes(options?: RawAxiosRequestConfig): AxiosPromise<AllowedCountriesResponse> {
26805
+ return localVarFp.getAllowedCountryCodes(options).then((request) => request(axios, basePath));
26806
+ },
26154
26807
  /**
26155
26808
  * Retrieve the billing details associated with your user.
26156
26809
  * @summary GET: Retrieve billing info
@@ -26192,6 +26845,17 @@ export class UserApi extends BaseAPI {
26192
26845
  return UserApiFp(this.configuration).addUserBillingInfo(payload, options).then((request) => request(this.axios, this.basePath));
26193
26846
  }
26194
26847
 
26848
+ /**
26849
+ * Retrieve the list of allowed ISO 3166-1 alpha-2 country codes that can be used for billing information.
26850
+ * @summary GET: Retrieve allowed country codes
26851
+ * @param {*} [options] Override http request option.
26852
+ * @throws {RequiredError}
26853
+ * @memberof UserApi
26854
+ */
26855
+ public getAllowedCountryCodes(options?: RawAxiosRequestConfig) {
26856
+ return UserApiFp(this.configuration).getAllowedCountryCodes(options).then((request) => request(this.axios, this.basePath));
26857
+ }
26858
+
26195
26859
  /**
26196
26860
  * Retrieve the billing details associated with your user.
26197
26861
  * @summary GET: Retrieve billing info
@@ -27859,6 +28523,49 @@ export const VirtualMachineApiAxiosParamCreator = function (configuration?: Conf
27859
28523
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
27860
28524
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
27861
28525
 
28526
+ return {
28527
+ url: toPathString(localVarUrlObj),
28528
+ options: localVarRequestOptions,
28529
+ };
28530
+ },
28531
+ /**
28532
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
28533
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
28534
+ * @param {number} vmId
28535
+ * @param {UserEnhancedMetricsPayload} payload
28536
+ * @param {*} [options] Override http request option.
28537
+ * @throws {RequiredError}
28538
+ */
28539
+ toggleEnhancedMetricsForAVM: async (vmId: number, payload: UserEnhancedMetricsPayload, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
28540
+ // verify required parameter 'vmId' is not null or undefined
28541
+ assertParamExists('toggleEnhancedMetricsForAVM', 'vmId', vmId)
28542
+ // verify required parameter 'payload' is not null or undefined
28543
+ assertParamExists('toggleEnhancedMetricsForAVM', 'payload', payload)
28544
+ const localVarPath = `/core/virtual-machines/{vm_id}/enhanced-metrics`
28545
+ .replace(`{${"vm_id"}}`, encodeURIComponent(String(vmId)));
28546
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
28547
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
28548
+ let baseOptions;
28549
+ if (configuration) {
28550
+ baseOptions = configuration.baseOptions;
28551
+ }
28552
+
28553
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
28554
+ const localVarHeaderParameter = {} as any;
28555
+ const localVarQueryParameter = {} as any;
28556
+
28557
+ // authentication apiKey required
28558
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
28559
+
28560
+
28561
+
28562
+ localVarHeaderParameter['Content-Type'] = 'application/json';
28563
+
28564
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
28565
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
28566
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
28567
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration)
28568
+
27862
28569
  return {
27863
28570
  url: toPathString(localVarUrlObj),
27864
28571
  options: localVarRequestOptions,
@@ -28153,6 +28860,20 @@ export const VirtualMachineApiFp = function(configuration?: Configuration) {
28153
28860
  const localVarOperationServerBasePath = operationServerMap['VirtualMachineApi.stopVM']?.[localVarOperationServerIndex]?.url;
28154
28861
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
28155
28862
  },
28863
+ /**
28864
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
28865
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
28866
+ * @param {number} vmId
28867
+ * @param {UserEnhancedMetricsPayload} payload
28868
+ * @param {*} [options] Override http request option.
28869
+ * @throws {RequiredError}
28870
+ */
28871
+ async toggleEnhancedMetricsForAVM(vmId: number, payload: UserEnhancedMetricsPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserEnhancedMetricsResponse>> {
28872
+ const localVarAxiosArgs = await localVarAxiosParamCreator.toggleEnhancedMetricsForAVM(vmId, payload, options);
28873
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
28874
+ const localVarOperationServerBasePath = operationServerMap['VirtualMachineApi.toggleEnhancedMetricsForAVM']?.[localVarOperationServerIndex]?.url;
28875
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
28876
+ },
28156
28877
  }
28157
28878
  };
28158
28879
 
@@ -28382,6 +29103,17 @@ export const VirtualMachineApiFactory = function (configuration?: Configuration,
28382
29103
  stopVM(vmId: number, options?: RawAxiosRequestConfig): AxiosPromise<ResponseModel> {
28383
29104
  return localVarFp.stopVM(vmId, options).then((request) => request(axios, basePath));
28384
29105
  },
29106
+ /**
29107
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
29108
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
29109
+ * @param {number} vmId
29110
+ * @param {UserEnhancedMetricsPayload} payload
29111
+ * @param {*} [options] Override http request option.
29112
+ * @throws {RequiredError}
29113
+ */
29114
+ toggleEnhancedMetricsForAVM(vmId: number, payload: UserEnhancedMetricsPayload, options?: RawAxiosRequestConfig): AxiosPromise<UserEnhancedMetricsResponse> {
29115
+ return localVarFp.toggleEnhancedMetricsForAVM(vmId, payload, options).then((request) => request(axios, basePath));
29116
+ },
28385
29117
  };
28386
29118
  };
28387
29119
 
@@ -28650,6 +29382,19 @@ export class VirtualMachineApi extends BaseAPI {
28650
29382
  public stopVM(vmId: number, options?: RawAxiosRequestConfig) {
28651
29383
  return VirtualMachineApiFp(this.configuration).stopVM(vmId, options).then((request) => request(this.axios, this.basePath));
28652
29384
  }
29385
+
29386
+ /**
29387
+ * Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
29388
+ * @summary Enable or disable Enhanced Metrics for a virtual machine
29389
+ * @param {number} vmId
29390
+ * @param {UserEnhancedMetricsPayload} payload
29391
+ * @param {*} [options] Override http request option.
29392
+ * @throws {RequiredError}
29393
+ * @memberof VirtualMachineApi
29394
+ */
29395
+ public toggleEnhancedMetricsForAVM(vmId: number, payload: UserEnhancedMetricsPayload, options?: RawAxiosRequestConfig) {
29396
+ return VirtualMachineApiFp(this.configuration).toggleEnhancedMetricsForAVM(vmId, payload, options).then((request) => request(this.axios, this.basePath));
29397
+ }
28653
29398
  }
28654
29399
 
28655
29400
  /**