@nexgencloud/hyperstack-sdk-typescript 1.52.0-alpha → 1.52.3-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
@@ -448,6 +448,93 @@ export interface AuthUserInfoResponseModel {
448
448
  */
449
449
  'user'?: AuthUserFields;
450
450
  }
451
+ /**
452
+ *
453
+ * @export
454
+ * @interface AutoTopup
455
+ */
456
+ export interface AutoTopup {
457
+ /**
458
+ *
459
+ * @type {number}
460
+ * @memberof AutoTopup
461
+ */
462
+ 'id'?: number;
463
+ /**
464
+ *
465
+ * @type {string}
466
+ * @memberof AutoTopup
467
+ */
468
+ 'status'?: string;
469
+ /**
470
+ *
471
+ * @type {number}
472
+ * @memberof AutoTopup
473
+ */
474
+ 'threshold_amount'?: number;
475
+ /**
476
+ *
477
+ * @type {number}
478
+ * @memberof AutoTopup
479
+ */
480
+ 'topup_amount'?: number;
481
+ /**
482
+ *
483
+ * @type {string}
484
+ * @memberof AutoTopup
485
+ */
486
+ 'updated_at'?: string;
487
+ }
488
+ /**
489
+ *
490
+ * @export
491
+ * @interface AutoTopupErrorResponse
492
+ */
493
+ export interface AutoTopupErrorResponse {
494
+ /**
495
+ *
496
+ * @type {string}
497
+ * @memberof AutoTopupErrorResponse
498
+ */
499
+ 'error_reason'?: string;
500
+ /**
501
+ *
502
+ * @type {string}
503
+ * @memberof AutoTopupErrorResponse
504
+ */
505
+ 'message'?: string;
506
+ /**
507
+ *
508
+ * @type {boolean}
509
+ * @memberof AutoTopupErrorResponse
510
+ */
511
+ 'status'?: boolean;
512
+ }
513
+ /**
514
+ *
515
+ * @export
516
+ * @interface AutoTopupStatusSchema
517
+ */
518
+ export interface AutoTopupStatusSchema {
519
+ /**
520
+ * Auto top-up status: active, disabled, pending_setup, cancelled, or null
521
+ * @type {string}
522
+ * @memberof AutoTopupStatusSchema
523
+ */
524
+ 'status'?: string;
525
+ /**
526
+ * Balance threshold that triggers auto top-up
527
+ * @type {number}
528
+ * @memberof AutoTopupStatusSchema
529
+ */
530
+ 'threshold_amount'?: number;
531
+ /**
532
+ * Amount to top up when threshold is reached
533
+ * @type {number}
534
+ * @memberof AutoTopupStatusSchema
535
+ */
536
+ 'topup_amount'?: number;
537
+ }
451
538
  /**
452
539
  *
453
540
  * @export
@@ -619,10 +706,10 @@ export interface BillingHistory {
619
706
  'attributes'?: Attributes;
620
707
  /**
621
708
  *
622
- * @type {object}
709
+ * @type {Metrics}
623
710
  * @memberof BillingHistory
624
711
  */
625
- 'metrics'?: object;
712
+ 'metrics'?: Metrics;
626
713
  }
627
714
  /**
628
715
  *
@@ -686,6 +773,37 @@ export interface BillingHistoryFineTuning {
686
773
  */
687
774
  'total_count'?: number;
688
775
  }
776
+ /**
777
+ *
778
+ * @export
779
+ * @interface BillingHistoryImageGenerationDetails
780
+ */
781
+ export interface BillingHistoryImageGenerationDetails {
782
+ /**
783
+ *
784
+ * @type {Array<BillingHistory>}
785
+ * @memberof BillingHistoryImageGenerationDetails
786
+ */
787
+ 'billing_history'?: Array<BillingHistory>;
788
+ /**
789
+ *
790
+ * @type {number}
791
+ * @memberof BillingHistoryImageGenerationDetails
792
+ */
793
+ 'org_id'?: number;
794
+ /**
795
+ *
796
+ * @type {Pagination}
797
+ * @memberof BillingHistoryImageGenerationDetails
798
+ */
799
+ 'pagination'?: Pagination;
800
+ /**
801
+ *
802
+ * @type {number}
803
+ * @memberof BillingHistoryImageGenerationDetails
804
+ */
805
+ 'total_count'?: number;
806
+ }
689
807
  /**
690
808
  *
691
809
  * @export
@@ -2152,6 +2270,50 @@ export interface ContractInstancesResponse {
2152
2270
  */
2153
2271
  'status'?: boolean;
2154
2272
  }
2273
+ /**
2274
+ *
2275
+ * @export
2276
+ * @interface CreateAutoTopupPayload
2277
+ */
2278
+ export interface CreateAutoTopupPayload {
2279
+ /**
2280
+ *
2281
+ * @type {number}
2282
+ * @memberof CreateAutoTopupPayload
2283
+ */
2284
+ 'threshold_amount': number;
2285
+ /**
2286
+ *
2287
+ * @type {number}
2288
+ * @memberof CreateAutoTopupPayload
2289
+ */
2290
+ 'topup_amount': number;
2291
+ }
2292
+ /**
2293
+ *
2294
+ * @export
2295
+ * @interface CreateAutoTopupResponse
2296
+ */
2297
+ export interface CreateAutoTopupResponse {
2298
+ /**
2299
+ *
2300
+ * @type {AutoTopup}
2301
+ * @memberof CreateAutoTopupResponse
2302
+ */
2303
+ 'auto_topup'?: AutoTopup;
2304
+ /**
2305
+ *
2306
+ * @type {string}
2307
+ * @memberof CreateAutoTopupResponse
2308
+ */
2309
+ 'message'?: string;
2310
+ /**
2311
+ *
2312
+ * @type {boolean}
2313
+ * @memberof CreateAutoTopupResponse
2314
+ */
2315
+ 'status'?: boolean;
2316
+ }
2155
2317
  /**
2156
2318
  *
2157
2319
  * @export
@@ -3191,6 +3353,31 @@ export interface DetachVolumesPayload {
3191
3353
  */
3192
3354
  'volume_ids'?: Array<number>;
3193
3355
  }
3356
+ /**
3357
+ *
3358
+ * @export
3359
+ * @interface DisableAutoTopupResponse
3360
+ */
3361
+ export interface DisableAutoTopupResponse {
3362
+ /**
3363
+ *
3364
+ * @type {AutoTopup}
3365
+ * @memberof DisableAutoTopupResponse
3366
+ */
3367
+ 'auto_topup'?: AutoTopup;
3368
+ /**
3369
+ *
3370
+ * @type {string}
3371
+ * @memberof DisableAutoTopupResponse
3372
+ */
3373
+ 'message'?: string;
3374
+ /**
3375
+ *
3376
+ * @type {boolean}
3377
+ * @memberof DisableAutoTopupResponse
3378
+ */
3379
+ 'status'?: boolean;
3380
+ }
3194
3381
  /**
3195
3382
  *
3196
3383
  * @export
@@ -4080,6 +4267,31 @@ export interface GetApiKeysResponseModel {
4080
4267
  */
4081
4268
  'status'?: boolean;
4082
4269
  }
4270
+ /**
4271
+ *
4272
+ * @export
4273
+ * @interface GetAutoTopupResponse
4274
+ */
4275
+ export interface GetAutoTopupResponse {
4276
+ /**
4277
+ *
4278
+ * @type {AutoTopup}
4279
+ * @memberof GetAutoTopupResponse
4280
+ */
4281
+ 'auto_topup'?: AutoTopup;
4282
+ /**
4283
+ *
4284
+ * @type {string}
4285
+ * @memberof GetAutoTopupResponse
4286
+ */
4287
+ 'message'?: string;
4288
+ /**
4289
+ *
4290
+ * @type {boolean}
4291
+ * @memberof GetAutoTopupResponse
4292
+ */
4293
+ 'status'?: boolean;
4294
+ }
4083
4295
  /**
4084
4296
  *
4085
4297
  * @export
@@ -4429,6 +4641,31 @@ export interface ImageFields {
4429
4641
  */
4430
4642
  'version'?: string;
4431
4643
  }
4644
+ /**
4645
+ *
4646
+ * @export
4647
+ * @interface ImageGenerationBillingHistoryDetailsResponseSchema
4648
+ */
4649
+ export interface ImageGenerationBillingHistoryDetailsResponseSchema {
4650
+ /**
4651
+ *
4652
+ * @type {BillingHistoryImageGenerationDetails}
4653
+ * @memberof ImageGenerationBillingHistoryDetailsResponseSchema
4654
+ */
4655
+ 'billing_history_image_generation_details'?: BillingHistoryImageGenerationDetails;
4656
+ /**
4657
+ *
4658
+ * @type {string}
4659
+ * @memberof ImageGenerationBillingHistoryDetailsResponseSchema
4660
+ */
4661
+ 'message'?: string;
4662
+ /**
4663
+ *
4664
+ * @type {boolean}
4665
+ * @memberof ImageGenerationBillingHistoryDetailsResponseSchema
4666
+ */
4667
+ 'status'?: boolean;
4668
+ }
4432
4669
  /**
4433
4670
  *
4434
4671
  * @export
@@ -5514,6 +5751,61 @@ export interface MetricItemFields {
5514
5751
  */
5515
5752
  'unit'?: string;
5516
5753
  }
5754
+ /**
5755
+ *
5756
+ * @export
5757
+ * @interface Metrics
5758
+ */
5759
+ export interface Metrics {
5760
+ /**
5761
+ *
5762
+ * @type {number}
5763
+ * @memberof Metrics
5764
+ */
5765
+ 'incurred_bill'?: number;
5766
+ /**
5767
+ *
5768
+ * @type {number}
5769
+ * @memberof Metrics
5770
+ */
5771
+ 'input_tokens'?: number;
5772
+ /**
5773
+ *
5774
+ * @type {number}
5775
+ * @memberof Metrics
5776
+ */
5777
+ 'input_tokens_incurred_bill'?: number;
5778
+ /**
5779
+ *
5780
+ * @type {number}
5781
+ * @memberof Metrics
5782
+ */
5783
+ 'input_tokens_non_discounted_bill'?: number;
5784
+ /**
5785
+ *
5786
+ * @type {number}
5787
+ * @memberof Metrics
5788
+ */
5789
+ 'non_discounted_bill'?: number;
5790
+ /**
5791
+ *
5792
+ * @type {number}
5793
+ * @memberof Metrics
5794
+ */
5795
+ 'output_tokens'?: number;
5796
+ /**
5797
+ *
5798
+ * @type {number}
5799
+ * @memberof Metrics
5800
+ */
5801
+ 'output_tokens_incurred_bill'?: number;
5802
+ /**
5803
+ *
5804
+ * @type {number}
5805
+ * @memberof Metrics
5806
+ */
5807
+ 'output_tokens_non_discounted_bill'?: number;
5808
+ }
5517
5809
  /**
5518
5810
  *
5519
5811
  * @export
@@ -6522,6 +6814,18 @@ export interface PaymentDetailsFields {
6522
6814
  * @memberof PaymentDetailsFields
6523
6815
  */
6524
6816
  'amount'?: number;
6817
+ /**
6818
+ *
6819
+ * @type {number}
6820
+ * @memberof PaymentDetailsFields
6821
+ */
6822
+ 'attempt_number'?: number;
6823
+ /**
6824
+ *
6825
+ * @type {number}
6826
+ * @memberof PaymentDetailsFields
6827
+ */
6828
+ 'auto_topup_id'?: number;
6525
6829
  /**
6526
6830
  *
6527
6831
  * @type {string}
@@ -6552,6 +6856,12 @@ export interface PaymentDetailsFields {
6552
6856
  * @memberof PaymentDetailsFields
6553
6857
  */
6554
6858
  'invoice'?: string;
6859
+ /**
6860
+ *
6861
+ * @type {number}
6862
+ * @memberof PaymentDetailsFields
6863
+ */
6864
+ 'max_attempts'?: number;
6555
6865
  /**
6556
6866
  *
6557
6867
  * @type {string}
@@ -6564,6 +6874,12 @@ export interface PaymentDetailsFields {
6564
6874
  * @memberof PaymentDetailsFields
6565
6875
  */
6566
6876
  'payment_id'?: string;
6877
+ /**
6878
+ *
6879
+ * @type {string}
6880
+ * @memberof PaymentDetailsFields
6881
+ */
6882
+ 'payment_type'?: string;
6567
6883
  /**
6568
6884
  *
6569
6885
  * @type {string}
@@ -6597,10 +6913,10 @@ export interface PaymentDetailsFields {
6597
6913
  export interface PaymentDetailsResponse {
6598
6914
  /**
6599
6915
  *
6600
- * @type {PaymentDetailsFields}
6916
+ * @type {Array<PaymentDetailsFields>}
6601
6917
  * @memberof PaymentDetailsResponse
6602
6918
  */
6603
- 'data'?: PaymentDetailsFields;
6919
+ 'data'?: Array<PaymentDetailsFields>;
6604
6920
  /**
6605
6921
  *
6606
6922
  * @type {string}
@@ -9241,50 +9557,94 @@ export interface URIs {
9241
9557
  /**
9242
9558
  *
9243
9559
  * @export
9244
- * @interface UpdateClusterNodeGroupPayload
9560
+ * @interface UpdateAutoTopupPayload
9245
9561
  */
9246
- export interface UpdateClusterNodeGroupPayload {
9247
- /**
9248
- * IDs of the firewalls to apply to all nodes in this node group
9249
- * @type {Array<number>}
9250
- * @memberof UpdateClusterNodeGroupPayload
9251
- */
9252
- 'firewall_ids'?: Array<number>;
9562
+ export interface UpdateAutoTopupPayload {
9253
9563
  /**
9254
9564
  *
9255
9565
  * @type {number}
9256
- * @memberof UpdateClusterNodeGroupPayload
9566
+ * @memberof UpdateAutoTopupPayload
9257
9567
  */
9258
- 'max_count'?: number;
9568
+ 'threshold_amount': number;
9259
9569
  /**
9260
9570
  *
9261
9571
  * @type {number}
9262
- * @memberof UpdateClusterNodeGroupPayload
9572
+ * @memberof UpdateAutoTopupPayload
9263
9573
  */
9264
- 'min_count'?: number;
9574
+ 'topup_amount': number;
9265
9575
  }
9266
9576
  /**
9267
9577
  *
9268
9578
  * @export
9269
- * @interface UpdateConsentRequest
9579
+ * @interface UpdateAutoTopupResponse
9270
9580
  */
9271
- export interface UpdateConsentRequest {
9581
+ export interface UpdateAutoTopupResponse {
9272
9582
  /**
9273
9583
  *
9274
- * @type {string}
9275
- * @memberof UpdateConsentRequest
9584
+ * @type {AutoTopup}
9585
+ * @memberof UpdateAutoTopupResponse
9276
9586
  */
9277
- 'action': UpdateConsentRequestActionEnum;
9587
+ 'auto_topup'?: AutoTopup;
9278
9588
  /**
9279
9589
  *
9280
9590
  * @type {string}
9281
- * @memberof UpdateConsentRequest
9591
+ * @memberof UpdateAutoTopupResponse
9282
9592
  */
9283
- 'consent_method'?: UpdateConsentRequestConsentMethodEnum;
9593
+ 'message'?: string;
9284
9594
  /**
9285
- * Version identifier. Defaults to the current version for the consent type
9286
- * @type {string}
9287
- * @memberof UpdateConsentRequest
9595
+ *
9596
+ * @type {boolean}
9597
+ * @memberof UpdateAutoTopupResponse
9598
+ */
9599
+ 'status'?: boolean;
9600
+ }
9601
+ /**
9602
+ *
9603
+ * @export
9604
+ * @interface UpdateClusterNodeGroupPayload
9605
+ */
9606
+ export interface UpdateClusterNodeGroupPayload {
9607
+ /**
9608
+ * IDs of the firewalls to apply to all nodes in this node group
9609
+ * @type {Array<number>}
9610
+ * @memberof UpdateClusterNodeGroupPayload
9611
+ */
9612
+ 'firewall_ids'?: Array<number>;
9613
+ /**
9614
+ *
9615
+ * @type {number}
9616
+ * @memberof UpdateClusterNodeGroupPayload
9617
+ */
9618
+ 'max_count'?: number;
9619
+ /**
9620
+ *
9621
+ * @type {number}
9622
+ * @memberof UpdateClusterNodeGroupPayload
9623
+ */
9624
+ 'min_count'?: number;
9625
+ }
9626
+ /**
9627
+ *
9628
+ * @export
9629
+ * @interface UpdateConsentRequest
9630
+ */
9631
+ export interface UpdateConsentRequest {
9632
+ /**
9633
+ *
9634
+ * @type {string}
9635
+ * @memberof UpdateConsentRequest
9636
+ */
9637
+ 'action': UpdateConsentRequestActionEnum;
9638
+ /**
9639
+ *
9640
+ * @type {string}
9641
+ * @memberof UpdateConsentRequest
9642
+ */
9643
+ 'consent_method'?: UpdateConsentRequestConsentMethodEnum;
9644
+ /**
9645
+ * Version identifier. Defaults to the current version for the consent type
9646
+ * @type {string}
9647
+ * @memberof UpdateConsentRequest
9288
9648
  */
9289
9649
  'consent_version'?: string;
9290
9650
  /**
@@ -11714,57 +12074,439 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath?
11714
12074
  */
11715
12075
  export class AuthApi extends BaseAPI {
11716
12076
  /**
11717
- * Change the organization associated with the current token. This is useful for users who have access to multiple organizations.
11718
- * @param {number} orgId
12077
+ * Change the organization associated with the current token. This is useful for users who have access to multiple organizations.
12078
+ * @param {number} orgId
12079
+ * @param {*} [options] Override http request option.
12080
+ * @throws {RequiredError}
12081
+ * @memberof AuthApi
12082
+ */
12083
+ public changeOrganizationForToken(orgId: number, options?: RawAxiosRequestConfig) {
12084
+ return AuthApiFp(this.configuration).changeOrganizationForToken(orgId, options).then((request) => request(this.axios, this.basePath));
12085
+ }
12086
+
12087
+ /**
12088
+ * Disable Multi-Factor Authentication (MFA) for the currently authenticated user. This endpoint is used to turn off MFA.
12089
+ * @param {*} [options] Override http request option.
12090
+ * @throws {RequiredError}
12091
+ * @memberof AuthApi
12092
+ */
12093
+ public disableMFA(options?: RawAxiosRequestConfig) {
12094
+ return AuthApiFp(this.configuration).disableMFA(options).then((request) => request(this.axios, this.basePath));
12095
+ }
12096
+
12097
+ /**
12098
+ * Retrieve the Multi-Factor Authentication (MFA) status for the currentlyauthenticated user. Includes whether MFA is enabled.
12099
+ * @summary Get MFA status for authenticated user
12100
+ * @param {*} [options] Override http request option.
12101
+ * @throws {RequiredError}
12102
+ * @memberof AuthApi
12103
+ */
12104
+ public getUserMFAStatus(options?: RawAxiosRequestConfig) {
12105
+ return AuthApiFp(this.configuration).getUserMFAStatus(options).then((request) => request(this.axios, this.basePath));
12106
+ }
12107
+
12108
+ /**
12109
+ * Retrieve the organizations associated with a user by their user ID. This endpoint is useful for understanding the user\'s organizational affiliations.
12110
+ * @summary Get User Organizations
12111
+ * @param {*} [options] Override http request option.
12112
+ * @throws {RequiredError}
12113
+ * @memberof AuthApi
12114
+ */
12115
+ public getUserOrganizations(options?: RawAxiosRequestConfig) {
12116
+ return AuthApiFp(this.configuration).getUserOrganizations(options).then((request) => request(this.axios, this.basePath));
12117
+ }
12118
+
12119
+ /**
12120
+ * Retrieves detailed information about the currently authenticated user. For additional information, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/auth-resources/auth).
12121
+ * @summary Retrieve Authenticated User Details
12122
+ * @param {*} [options] Override http request option.
12123
+ * @throws {RequiredError}
12124
+ * @memberof AuthApi
12125
+ */
12126
+ public retrieveAuthenticatedUserDetails(options?: RawAxiosRequestConfig) {
12127
+ return AuthApiFp(this.configuration).retrieveAuthenticatedUserDetails(options).then((request) => request(this.axios, this.basePath));
12128
+ }
12129
+ }
12130
+
12131
+
12132
+
12133
+ /**
12134
+ * AutoTopupApi - axios parameter creator
12135
+ * @export
12136
+ */
12137
+ export const AutoTopupApiAxiosParamCreator = function (configuration?: Configuration) {
12138
+ return {
12139
+ /**
12140
+ *
12141
+ * @summary Create an auto top up configuration and initiate Stripe setup
12142
+ * @param {CreateAutoTopupPayload} payload
12143
+ * @param {*} [options] Override http request option.
12144
+ * @throws {RequiredError}
12145
+ */
12146
+ createAutoTopUp: async (payload: CreateAutoTopupPayload, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
12147
+ // verify required parameter 'payload' is not null or undefined
12148
+ assertParamExists('createAutoTopUp', 'payload', payload)
12149
+ const localVarPath = `/billing/auto-topup`;
12150
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12151
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12152
+ let baseOptions;
12153
+ if (configuration) {
12154
+ baseOptions = configuration.baseOptions;
12155
+ }
12156
+
12157
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
12158
+ const localVarHeaderParameter = {} as any;
12159
+ const localVarQueryParameter = {} as any;
12160
+
12161
+ // authentication apiKey required
12162
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
12163
+
12164
+
12165
+
12166
+ localVarHeaderParameter['Content-Type'] = 'application/json';
12167
+
12168
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12169
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12170
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
12171
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration)
12172
+
12173
+ return {
12174
+ url: toPathString(localVarUrlObj),
12175
+ options: localVarRequestOptions,
12176
+ };
12177
+ },
12178
+ /**
12179
+ *
12180
+ * @summary Disable auto top up, preventing any future automatic charges
12181
+ * @param {*} [options] Override http request option.
12182
+ * @throws {RequiredError}
12183
+ */
12184
+ disableAutoTopUp: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
12185
+ const localVarPath = `/billing/auto-topup`;
12186
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12187
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12188
+ let baseOptions;
12189
+ if (configuration) {
12190
+ baseOptions = configuration.baseOptions;
12191
+ }
12192
+
12193
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
12194
+ const localVarHeaderParameter = {} as any;
12195
+ const localVarQueryParameter = {} as any;
12196
+
12197
+ // authentication apiKey required
12198
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
12199
+
12200
+
12201
+
12202
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12203
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12204
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
12205
+
12206
+ return {
12207
+ url: toPathString(localVarUrlObj),
12208
+ options: localVarRequestOptions,
12209
+ };
12210
+ },
12211
+ /**
12212
+ *
12213
+ * @summary Retrieve the current auto top up configuration and transaction history
12214
+ * @param {*} [options] Override http request option.
12215
+ * @throws {RequiredError}
12216
+ */
12217
+ getAutoTopUp: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
12218
+ const localVarPath = `/billing/auto-topup`;
12219
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12220
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12221
+ let baseOptions;
12222
+ if (configuration) {
12223
+ baseOptions = configuration.baseOptions;
12224
+ }
12225
+
12226
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
12227
+ const localVarHeaderParameter = {} as any;
12228
+ const localVarQueryParameter = {} as any;
12229
+
12230
+ // authentication apiKey required
12231
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
12232
+
12233
+
12234
+
12235
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12236
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12237
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
12238
+
12239
+ return {
12240
+ url: toPathString(localVarUrlObj),
12241
+ options: localVarRequestOptions,
12242
+ };
12243
+ },
12244
+ /**
12245
+ * Retrieves the current auto top-up configuration and status for your organization. Returns the status (active, disabled, pending_setup, or null if never configured), along with the threshold and top-up amounts. For additional information, [**click here**](None/docs/api-reference/billing-resources/).
12246
+ * @summary Get auto top-up status and configuration
12247
+ * @param {*} [options] Override http request option.
12248
+ * @throws {RequiredError}
12249
+ */
12250
+ getAutoTopUpStatus: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
12251
+ const localVarPath = `/billing/auto-topup/status`;
12252
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12253
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12254
+ let baseOptions;
12255
+ if (configuration) {
12256
+ baseOptions = configuration.baseOptions;
12257
+ }
12258
+
12259
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
12260
+ const localVarHeaderParameter = {} as any;
12261
+ const localVarQueryParameter = {} as any;
12262
+
12263
+ // authentication apiKey required
12264
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
12265
+
12266
+
12267
+
12268
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12269
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12270
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
12271
+
12272
+ return {
12273
+ url: toPathString(localVarUrlObj),
12274
+ options: localVarRequestOptions,
12275
+ };
12276
+ },
12277
+ /**
12278
+ *
12279
+ * @summary Update an existing active auto top up configuration
12280
+ * @param {UpdateAutoTopupPayload} payload
12281
+ * @param {*} [options] Override http request option.
12282
+ * @throws {RequiredError}
12283
+ */
12284
+ updateAutoTopUp: async (payload: UpdateAutoTopupPayload, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
12285
+ // verify required parameter 'payload' is not null or undefined
12286
+ assertParamExists('updateAutoTopUp', 'payload', payload)
12287
+ const localVarPath = `/billing/auto-topup`;
12288
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12289
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12290
+ let baseOptions;
12291
+ if (configuration) {
12292
+ baseOptions = configuration.baseOptions;
12293
+ }
12294
+
12295
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
12296
+ const localVarHeaderParameter = {} as any;
12297
+ const localVarQueryParameter = {} as any;
12298
+
12299
+ // authentication apiKey required
12300
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
12301
+
12302
+
12303
+
12304
+ localVarHeaderParameter['Content-Type'] = 'application/json';
12305
+
12306
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12307
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12308
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
12309
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration)
12310
+
12311
+ return {
12312
+ url: toPathString(localVarUrlObj),
12313
+ options: localVarRequestOptions,
12314
+ };
12315
+ },
12316
+ }
12317
+ };
12318
+
12319
+ /**
12320
+ * AutoTopupApi - functional programming interface
12321
+ * @export
12322
+ */
12323
+ export const AutoTopupApiFp = function(configuration?: Configuration) {
12324
+ const localVarAxiosParamCreator = AutoTopupApiAxiosParamCreator(configuration)
12325
+ return {
12326
+ /**
12327
+ *
12328
+ * @summary Create an auto top up configuration and initiate Stripe setup
12329
+ * @param {CreateAutoTopupPayload} payload
12330
+ * @param {*} [options] Override http request option.
12331
+ * @throws {RequiredError}
12332
+ */
12333
+ async createAutoTopUp(payload: CreateAutoTopupPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateAutoTopupResponse>> {
12334
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createAutoTopUp(payload, options);
12335
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
12336
+ const localVarOperationServerBasePath = operationServerMap['AutoTopupApi.createAutoTopUp']?.[localVarOperationServerIndex]?.url;
12337
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12338
+ },
12339
+ /**
12340
+ *
12341
+ * @summary Disable auto top up, preventing any future automatic charges
12342
+ * @param {*} [options] Override http request option.
12343
+ * @throws {RequiredError}
12344
+ */
12345
+ async disableAutoTopUp(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DisableAutoTopupResponse>> {
12346
+ const localVarAxiosArgs = await localVarAxiosParamCreator.disableAutoTopUp(options);
12347
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
12348
+ const localVarOperationServerBasePath = operationServerMap['AutoTopupApi.disableAutoTopUp']?.[localVarOperationServerIndex]?.url;
12349
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12350
+ },
12351
+ /**
12352
+ *
12353
+ * @summary Retrieve the current auto top up configuration and transaction history
12354
+ * @param {*} [options] Override http request option.
12355
+ * @throws {RequiredError}
12356
+ */
12357
+ async getAutoTopUp(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAutoTopupResponse>> {
12358
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAutoTopUp(options);
12359
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
12360
+ const localVarOperationServerBasePath = operationServerMap['AutoTopupApi.getAutoTopUp']?.[localVarOperationServerIndex]?.url;
12361
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12362
+ },
12363
+ /**
12364
+ * Retrieves the current auto top-up configuration and status for your organization. Returns the status (active, disabled, pending_setup, or null if never configured), along with the threshold and top-up amounts. For additional information, [**click here**](None/docs/api-reference/billing-resources/).
12365
+ * @summary Get auto top-up status and configuration
12366
+ * @param {*} [options] Override http request option.
12367
+ * @throws {RequiredError}
12368
+ */
12369
+ async getAutoTopUpStatus(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AutoTopupStatusSchema>> {
12370
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAutoTopUpStatus(options);
12371
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
12372
+ const localVarOperationServerBasePath = operationServerMap['AutoTopupApi.getAutoTopUpStatus']?.[localVarOperationServerIndex]?.url;
12373
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12374
+ },
12375
+ /**
12376
+ *
12377
+ * @summary Update an existing active auto top up configuration
12378
+ * @param {UpdateAutoTopupPayload} payload
12379
+ * @param {*} [options] Override http request option.
12380
+ * @throws {RequiredError}
12381
+ */
12382
+ async updateAutoTopUp(payload: UpdateAutoTopupPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateAutoTopupResponse>> {
12383
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateAutoTopUp(payload, options);
12384
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
12385
+ const localVarOperationServerBasePath = operationServerMap['AutoTopupApi.updateAutoTopUp']?.[localVarOperationServerIndex]?.url;
12386
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12387
+ },
12388
+ }
12389
+ };
12390
+
12391
+ /**
12392
+ * AutoTopupApi - factory interface
12393
+ * @export
12394
+ */
12395
+ export const AutoTopupApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
12396
+ const localVarFp = AutoTopupApiFp(configuration)
12397
+ return {
12398
+ /**
12399
+ *
12400
+ * @summary Create an auto top up configuration and initiate Stripe setup
12401
+ * @param {CreateAutoTopupPayload} payload
12402
+ * @param {*} [options] Override http request option.
12403
+ * @throws {RequiredError}
12404
+ */
12405
+ createAutoTopUp(payload: CreateAutoTopupPayload, options?: RawAxiosRequestConfig): AxiosPromise<CreateAutoTopupResponse> {
12406
+ return localVarFp.createAutoTopUp(payload, options).then((request) => request(axios, basePath));
12407
+ },
12408
+ /**
12409
+ *
12410
+ * @summary Disable auto top up, preventing any future automatic charges
12411
+ * @param {*} [options] Override http request option.
12412
+ * @throws {RequiredError}
12413
+ */
12414
+ disableAutoTopUp(options?: RawAxiosRequestConfig): AxiosPromise<DisableAutoTopupResponse> {
12415
+ return localVarFp.disableAutoTopUp(options).then((request) => request(axios, basePath));
12416
+ },
12417
+ /**
12418
+ *
12419
+ * @summary Retrieve the current auto top up configuration and transaction history
12420
+ * @param {*} [options] Override http request option.
12421
+ * @throws {RequiredError}
12422
+ */
12423
+ getAutoTopUp(options?: RawAxiosRequestConfig): AxiosPromise<GetAutoTopupResponse> {
12424
+ return localVarFp.getAutoTopUp(options).then((request) => request(axios, basePath));
12425
+ },
12426
+ /**
12427
+ * Retrieves the current auto top-up configuration and status for your organization. Returns the status (active, disabled, pending_setup, or null if never configured), along with the threshold and top-up amounts. For additional information, [**click here**](None/docs/api-reference/billing-resources/).
12428
+ * @summary Get auto top-up status and configuration
12429
+ * @param {*} [options] Override http request option.
12430
+ * @throws {RequiredError}
12431
+ */
12432
+ getAutoTopUpStatus(options?: RawAxiosRequestConfig): AxiosPromise<AutoTopupStatusSchema> {
12433
+ return localVarFp.getAutoTopUpStatus(options).then((request) => request(axios, basePath));
12434
+ },
12435
+ /**
12436
+ *
12437
+ * @summary Update an existing active auto top up configuration
12438
+ * @param {UpdateAutoTopupPayload} payload
12439
+ * @param {*} [options] Override http request option.
12440
+ * @throws {RequiredError}
12441
+ */
12442
+ updateAutoTopUp(payload: UpdateAutoTopupPayload, options?: RawAxiosRequestConfig): AxiosPromise<UpdateAutoTopupResponse> {
12443
+ return localVarFp.updateAutoTopUp(payload, options).then((request) => request(axios, basePath));
12444
+ },
12445
+ };
12446
+ };
12447
+
12448
+ /**
12449
+ * AutoTopupApi - object-oriented interface
12450
+ * @export
12451
+ * @class AutoTopupApi
12452
+ * @extends {BaseAPI}
12453
+ */
12454
+ export class AutoTopupApi extends BaseAPI {
12455
+ /**
12456
+ *
12457
+ * @summary Create an auto top up configuration and initiate Stripe setup
12458
+ * @param {CreateAutoTopupPayload} payload
11719
12459
  * @param {*} [options] Override http request option.
11720
12460
  * @throws {RequiredError}
11721
- * @memberof AuthApi
12461
+ * @memberof AutoTopupApi
11722
12462
  */
11723
- public changeOrganizationForToken(orgId: number, options?: RawAxiosRequestConfig) {
11724
- return AuthApiFp(this.configuration).changeOrganizationForToken(orgId, options).then((request) => request(this.axios, this.basePath));
12463
+ public createAutoTopUp(payload: CreateAutoTopupPayload, options?: RawAxiosRequestConfig) {
12464
+ return AutoTopupApiFp(this.configuration).createAutoTopUp(payload, options).then((request) => request(this.axios, this.basePath));
11725
12465
  }
11726
12466
 
11727
12467
  /**
11728
- * Disable Multi-Factor Authentication (MFA) for the currently authenticated user. This endpoint is used to turn off MFA.
12468
+ *
12469
+ * @summary Disable auto top up, preventing any future automatic charges
11729
12470
  * @param {*} [options] Override http request option.
11730
12471
  * @throws {RequiredError}
11731
- * @memberof AuthApi
12472
+ * @memberof AutoTopupApi
11732
12473
  */
11733
- public disableMFA(options?: RawAxiosRequestConfig) {
11734
- return AuthApiFp(this.configuration).disableMFA(options).then((request) => request(this.axios, this.basePath));
12474
+ public disableAutoTopUp(options?: RawAxiosRequestConfig) {
12475
+ return AutoTopupApiFp(this.configuration).disableAutoTopUp(options).then((request) => request(this.axios, this.basePath));
11735
12476
  }
11736
12477
 
11737
12478
  /**
11738
- * Retrieve the Multi-Factor Authentication (MFA) status for the currentlyauthenticated user. Includes whether MFA is enabled.
11739
- * @summary Get MFA status for authenticated user
12479
+ *
12480
+ * @summary Retrieve the current auto top up configuration and transaction history
11740
12481
  * @param {*} [options] Override http request option.
11741
12482
  * @throws {RequiredError}
11742
- * @memberof AuthApi
12483
+ * @memberof AutoTopupApi
11743
12484
  */
11744
- public getUserMFAStatus(options?: RawAxiosRequestConfig) {
11745
- return AuthApiFp(this.configuration).getUserMFAStatus(options).then((request) => request(this.axios, this.basePath));
12485
+ public getAutoTopUp(options?: RawAxiosRequestConfig) {
12486
+ return AutoTopupApiFp(this.configuration).getAutoTopUp(options).then((request) => request(this.axios, this.basePath));
11746
12487
  }
11747
12488
 
11748
12489
  /**
11749
- * Retrieve the organizations associated with a user by their user ID. This endpoint is useful for understanding the user\'s organizational affiliations.
11750
- * @summary Get User Organizations
12490
+ * Retrieves the current auto top-up configuration and status for your organization. Returns the status (active, disabled, pending_setup, or null if never configured), along with the threshold and top-up amounts. For additional information, [**click here**](None/docs/api-reference/billing-resources/).
12491
+ * @summary Get auto top-up status and configuration
11751
12492
  * @param {*} [options] Override http request option.
11752
12493
  * @throws {RequiredError}
11753
- * @memberof AuthApi
12494
+ * @memberof AutoTopupApi
11754
12495
  */
11755
- public getUserOrganizations(options?: RawAxiosRequestConfig) {
11756
- return AuthApiFp(this.configuration).getUserOrganizations(options).then((request) => request(this.axios, this.basePath));
12496
+ public getAutoTopUpStatus(options?: RawAxiosRequestConfig) {
12497
+ return AutoTopupApiFp(this.configuration).getAutoTopUpStatus(options).then((request) => request(this.axios, this.basePath));
11757
12498
  }
11758
12499
 
11759
12500
  /**
11760
- * Retrieves detailed information about the currently authenticated user. For additional information, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/auth-resources/auth).
11761
- * @summary Retrieve Authenticated User Details
12501
+ *
12502
+ * @summary Update an existing active auto top up configuration
12503
+ * @param {UpdateAutoTopupPayload} payload
11762
12504
  * @param {*} [options] Override http request option.
11763
12505
  * @throws {RequiredError}
11764
- * @memberof AuthApi
12506
+ * @memberof AutoTopupApi
11765
12507
  */
11766
- public retrieveAuthenticatedUserDetails(options?: RawAxiosRequestConfig) {
11767
- return AuthApiFp(this.configuration).retrieveAuthenticatedUserDetails(options).then((request) => request(this.axios, this.basePath));
12508
+ public updateAutoTopUp(payload: UpdateAutoTopupPayload, options?: RawAxiosRequestConfig) {
12509
+ return AutoTopupApiFp(this.configuration).updateAutoTopUp(payload, options).then((request) => request(this.axios, this.basePath));
11768
12510
  }
11769
12511
  }
11770
12512
 
@@ -12461,6 +13203,157 @@ export const BillingApiAxiosParamCreator = function (configuration?: Configurati
12461
13203
 
12462
13204
 
12463
13205
 
13206
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
13207
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
13208
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
13209
+
13210
+ return {
13211
+ url: toPathString(localVarUrlObj),
13212
+ options: localVarRequestOptions,
13213
+ };
13214
+ },
13215
+ /**
13216
+ * User will receive billing history of image_generation for the specified billing cycle.
13217
+ * @summary Retrieve Billing History of image generation for a specific Billing Cycle
13218
+ * @param {string} [startDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
13219
+ * @param {string} [endDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
13220
+ * @param {string} [search] Search by resource \&quot;Name\&quot; or \&quot;ID\&quot;
13221
+ * @param {number} [perPage] Number of items to return per page
13222
+ * @param {number} [page] Page number
13223
+ * @param {*} [options] Override http request option.
13224
+ * @throws {RequiredError}
13225
+ */
13226
+ getImageGenerationBillingHistory: async (startDate?: string, endDate?: string, search?: string, perPage?: number, page?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
13227
+ const localVarPath = `/billing/billing/history/image_generation`;
13228
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
13229
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
13230
+ let baseOptions;
13231
+ if (configuration) {
13232
+ baseOptions = configuration.baseOptions;
13233
+ }
13234
+
13235
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
13236
+ const localVarHeaderParameter = {} as any;
13237
+ const localVarQueryParameter = {} as any;
13238
+
13239
+ // authentication apiKey required
13240
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
13241
+
13242
+ if (startDate !== undefined) {
13243
+ localVarQueryParameter['start_date'] = startDate;
13244
+ }
13245
+
13246
+ if (endDate !== undefined) {
13247
+ localVarQueryParameter['end_date'] = endDate;
13248
+ }
13249
+
13250
+ if (search !== undefined) {
13251
+ localVarQueryParameter['search'] = search;
13252
+ }
13253
+
13254
+ if (perPage !== undefined) {
13255
+ localVarQueryParameter['per_page'] = perPage;
13256
+ }
13257
+
13258
+ if (page !== undefined) {
13259
+ localVarQueryParameter['page'] = page;
13260
+ }
13261
+
13262
+
13263
+
13264
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
13265
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
13266
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
13267
+
13268
+ return {
13269
+ url: toPathString(localVarUrlObj),
13270
+ options: localVarRequestOptions,
13271
+ };
13272
+ },
13273
+ /**
13274
+ * User will receive hourly cost datapoints for an image generation job for a specified billing cycle. This data will include \'incurred_bill\' graph datapoints. billing cycle
13275
+ * @summary Retrieve hourly cost datapoints of a Specific Image Generation for a specific
13276
+ * @param {number} resourceId
13277
+ * @param {string} [startDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
13278
+ * @param {string} [endDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
13279
+ * @param {*} [options] Override http request option.
13280
+ * @throws {RequiredError}
13281
+ */
13282
+ getImageGenerationBillingHistoryGraph: async (resourceId: number, startDate?: string, endDate?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
13283
+ // verify required parameter 'resourceId' is not null or undefined
13284
+ assertParamExists('getImageGenerationBillingHistoryGraph', 'resourceId', resourceId)
13285
+ const localVarPath = `/billing/billing/history/image_generation/{resource_id}/graph`
13286
+ .replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId)));
13287
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
13288
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
13289
+ let baseOptions;
13290
+ if (configuration) {
13291
+ baseOptions = configuration.baseOptions;
13292
+ }
13293
+
13294
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
13295
+ const localVarHeaderParameter = {} as any;
13296
+ const localVarQueryParameter = {} as any;
13297
+
13298
+ // authentication apiKey required
13299
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
13300
+
13301
+ if (startDate !== undefined) {
13302
+ localVarQueryParameter['start_date'] = startDate;
13303
+ }
13304
+
13305
+ if (endDate !== undefined) {
13306
+ localVarQueryParameter['end_date'] = endDate;
13307
+ }
13308
+
13309
+
13310
+
13311
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
13312
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
13313
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
13314
+
13315
+ return {
13316
+ url: toPathString(localVarUrlObj),
13317
+ options: localVarRequestOptions,
13318
+ };
13319
+ },
13320
+ /**
13321
+ * Retrieve billing history for a specific Image Generation resource. Includes: \'resource_name\', \'infrahub_id\', \'base_model\', \'base_model_display_name\', \'lora_adapter\', \'incurred_bill\', \'non_discounted_bill\', \'usage_time\', \'input_tokens\', \'output_tokens\', \'input_tokens_incurred_bill\', \'input_tokens_non_discounted_bill\', \'output_tokens_incurred_bill\', \'output_tokens_non_discounted_bill\'
13322
+ * @param {number} resourceId
13323
+ * @param {string} [startDate] YYYY-MM-DDTHH:MM:SS
13324
+ * @param {string} [endDate] YYYY-MM-DDTHH:MM:SS
13325
+ * @param {*} [options] Override http request option.
13326
+ * @throws {RequiredError}
13327
+ */
13328
+ getImageGenerationHistoryForResource: async (resourceId: number, startDate?: string, endDate?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
13329
+ // verify required parameter 'resourceId' is not null or undefined
13330
+ assertParamExists('getImageGenerationHistoryForResource', 'resourceId', resourceId)
13331
+ const localVarPath = `/billing/billing/history/image_generation/{resource_id}`
13332
+ .replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId)));
13333
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
13334
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
13335
+ let baseOptions;
13336
+ if (configuration) {
13337
+ baseOptions = configuration.baseOptions;
13338
+ }
13339
+
13340
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
13341
+ const localVarHeaderParameter = {} as any;
13342
+ const localVarQueryParameter = {} as any;
13343
+
13344
+ // authentication apiKey required
13345
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
13346
+
13347
+ if (startDate !== undefined) {
13348
+ localVarQueryParameter['start_date'] = startDate;
13349
+ }
13350
+
13351
+ if (endDate !== undefined) {
13352
+ localVarQueryParameter['end_date'] = endDate;
13353
+ }
13354
+
13355
+
13356
+
12464
13357
  setSearchParams(localVarUrlObj, localVarQueryParameter);
12465
13358
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12466
13359
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -13975,6 +14868,52 @@ export const BillingApiFp = function(configuration?: Configuration) {
13975
14868
  const localVarOperationServerBasePath = operationServerMap['BillingApi.getFineTuningBillingHistoryGraph']?.[localVarOperationServerIndex]?.url;
13976
14869
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
13977
14870
  },
14871
+ /**
14872
+ * User will receive billing history of image_generation for the specified billing cycle.
14873
+ * @summary Retrieve Billing History of image generation for a specific Billing Cycle
14874
+ * @param {string} [startDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
14875
+ * @param {string} [endDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
14876
+ * @param {string} [search] Search by resource \&quot;Name\&quot; or \&quot;ID\&quot;
14877
+ * @param {number} [perPage] Number of items to return per page
14878
+ * @param {number} [page] Page number
14879
+ * @param {*} [options] Override http request option.
14880
+ * @throws {RequiredError}
14881
+ */
14882
+ async getImageGenerationBillingHistory(startDate?: string, endDate?: string, search?: string, perPage?: number, page?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TokenBasedBillingHistoryResponse>> {
14883
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getImageGenerationBillingHistory(startDate, endDate, search, perPage, page, options);
14884
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
14885
+ const localVarOperationServerBasePath = operationServerMap['BillingApi.getImageGenerationBillingHistory']?.[localVarOperationServerIndex]?.url;
14886
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
14887
+ },
14888
+ /**
14889
+ * User will receive hourly cost datapoints for an image generation job for a specified billing cycle. This data will include \'incurred_bill\' graph datapoints. billing cycle
14890
+ * @summary Retrieve hourly cost datapoints of a Specific Image Generation for a specific
14891
+ * @param {number} resourceId
14892
+ * @param {string} [startDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
14893
+ * @param {string} [endDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
14894
+ * @param {*} [options] Override http request option.
14895
+ * @throws {RequiredError}
14896
+ */
14897
+ async getImageGenerationBillingHistoryGraph(resourceId: number, startDate?: string, endDate?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImageGenerationBillingHistoryDetailsResponseSchema>> {
14898
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getImageGenerationBillingHistoryGraph(resourceId, startDate, endDate, options);
14899
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
14900
+ const localVarOperationServerBasePath = operationServerMap['BillingApi.getImageGenerationBillingHistoryGraph']?.[localVarOperationServerIndex]?.url;
14901
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
14902
+ },
14903
+ /**
14904
+ * Retrieve billing history for a specific Image Generation resource. Includes: \'resource_name\', \'infrahub_id\', \'base_model\', \'base_model_display_name\', \'lora_adapter\', \'incurred_bill\', \'non_discounted_bill\', \'usage_time\', \'input_tokens\', \'output_tokens\', \'input_tokens_incurred_bill\', \'input_tokens_non_discounted_bill\', \'output_tokens_incurred_bill\', \'output_tokens_non_discounted_bill\'
14905
+ * @param {number} resourceId
14906
+ * @param {string} [startDate] YYYY-MM-DDTHH:MM:SS
14907
+ * @param {string} [endDate] YYYY-MM-DDTHH:MM:SS
14908
+ * @param {*} [options] Override http request option.
14909
+ * @throws {RequiredError}
14910
+ */
14911
+ async getImageGenerationHistoryForResource(resourceId: number, startDate?: string, endDate?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImageGenerationBillingHistoryDetailsResponseSchema>> {
14912
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getImageGenerationHistoryForResource(resourceId, startDate, endDate, options);
14913
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
14914
+ const localVarOperationServerBasePath = operationServerMap['BillingApi.getImageGenerationHistoryForResource']?.[localVarOperationServerIndex]?.url;
14915
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
14916
+ },
13978
14917
  /**
13979
14918
  * Retrieve the previous day\'s costs for instances, volumes, and clusters. Returns a breakdown of the costs and the total cost for the last day. For additional information on Retrieve Previous Day Usage Costs, [**click here**](None/docs/api-reference/billing-resources/last-day-usage/)
13980
14919
  * @summary GET: Last Day Cost
@@ -14520,6 +15459,43 @@ export const BillingApiFactory = function (configuration?: Configuration, basePa
14520
15459
  getFineTuningBillingHistoryGraph(resourceId: number, startDate?: string, endDate?: string, options?: RawAxiosRequestConfig): AxiosPromise<ResourceLevelVolumeGraphBillingDetailsResponseModel> {
14521
15460
  return localVarFp.getFineTuningBillingHistoryGraph(resourceId, startDate, endDate, options).then((request) => request(axios, basePath));
14522
15461
  },
15462
+ /**
15463
+ * User will receive billing history of image_generation for the specified billing cycle.
15464
+ * @summary Retrieve Billing History of image generation for a specific Billing Cycle
15465
+ * @param {string} [startDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
15466
+ * @param {string} [endDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
15467
+ * @param {string} [search] Search by resource \&quot;Name\&quot; or \&quot;ID\&quot;
15468
+ * @param {number} [perPage] Number of items to return per page
15469
+ * @param {number} [page] Page number
15470
+ * @param {*} [options] Override http request option.
15471
+ * @throws {RequiredError}
15472
+ */
15473
+ getImageGenerationBillingHistory(startDate?: string, endDate?: string, search?: string, perPage?: number, page?: number, options?: RawAxiosRequestConfig): AxiosPromise<TokenBasedBillingHistoryResponse> {
15474
+ return localVarFp.getImageGenerationBillingHistory(startDate, endDate, search, perPage, page, options).then((request) => request(axios, basePath));
15475
+ },
15476
+ /**
15477
+ * User will receive hourly cost datapoints for an image generation job for a specified billing cycle. This data will include \'incurred_bill\' graph datapoints. billing cycle
15478
+ * @summary Retrieve hourly cost datapoints of a Specific Image Generation for a specific
15479
+ * @param {number} resourceId
15480
+ * @param {string} [startDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
15481
+ * @param {string} [endDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
15482
+ * @param {*} [options] Override http request option.
15483
+ * @throws {RequiredError}
15484
+ */
15485
+ getImageGenerationBillingHistoryGraph(resourceId: number, startDate?: string, endDate?: string, options?: RawAxiosRequestConfig): AxiosPromise<ImageGenerationBillingHistoryDetailsResponseSchema> {
15486
+ return localVarFp.getImageGenerationBillingHistoryGraph(resourceId, startDate, endDate, options).then((request) => request(axios, basePath));
15487
+ },
15488
+ /**
15489
+ * Retrieve billing history for a specific Image Generation resource. Includes: \'resource_name\', \'infrahub_id\', \'base_model\', \'base_model_display_name\', \'lora_adapter\', \'incurred_bill\', \'non_discounted_bill\', \'usage_time\', \'input_tokens\', \'output_tokens\', \'input_tokens_incurred_bill\', \'input_tokens_non_discounted_bill\', \'output_tokens_incurred_bill\', \'output_tokens_non_discounted_bill\'
15490
+ * @param {number} resourceId
15491
+ * @param {string} [startDate] YYYY-MM-DDTHH:MM:SS
15492
+ * @param {string} [endDate] YYYY-MM-DDTHH:MM:SS
15493
+ * @param {*} [options] Override http request option.
15494
+ * @throws {RequiredError}
15495
+ */
15496
+ getImageGenerationHistoryForResource(resourceId: number, startDate?: string, endDate?: string, options?: RawAxiosRequestConfig): AxiosPromise<ImageGenerationBillingHistoryDetailsResponseSchema> {
15497
+ return localVarFp.getImageGenerationHistoryForResource(resourceId, startDate, endDate, options).then((request) => request(axios, basePath));
15498
+ },
14523
15499
  /**
14524
15500
  * Retrieve the previous day\'s costs for instances, volumes, and clusters. Returns a breakdown of the costs and the total cost for the last day. For additional information on Retrieve Previous Day Usage Costs, [**click here**](None/docs/api-reference/billing-resources/last-day-usage/)
14525
15501
  * @summary GET: Last Day Cost
@@ -14999,6 +15975,49 @@ export class BillingApi extends BaseAPI {
14999
15975
  return BillingApiFp(this.configuration).getFineTuningBillingHistoryGraph(resourceId, startDate, endDate, options).then((request) => request(this.axios, this.basePath));
15000
15976
  }
15001
15977
 
15978
+ /**
15979
+ * User will receive billing history of image_generation for the specified billing cycle.
15980
+ * @summary Retrieve Billing History of image generation for a specific Billing Cycle
15981
+ * @param {string} [startDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
15982
+ * @param {string} [endDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
15983
+ * @param {string} [search] Search by resource \&quot;Name\&quot; or \&quot;ID\&quot;
15984
+ * @param {number} [perPage] Number of items to return per page
15985
+ * @param {number} [page] Page number
15986
+ * @param {*} [options] Override http request option.
15987
+ * @throws {RequiredError}
15988
+ * @memberof BillingApi
15989
+ */
15990
+ public getImageGenerationBillingHistory(startDate?: string, endDate?: string, search?: string, perPage?: number, page?: number, options?: RawAxiosRequestConfig) {
15991
+ return BillingApiFp(this.configuration).getImageGenerationBillingHistory(startDate, endDate, search, perPage, page, options).then((request) => request(this.axios, this.basePath));
15992
+ }
15993
+
15994
+ /**
15995
+ * User will receive hourly cost datapoints for an image generation job for a specified billing cycle. This data will include \'incurred_bill\' graph datapoints. billing cycle
15996
+ * @summary Retrieve hourly cost datapoints of a Specific Image Generation for a specific
15997
+ * @param {number} resourceId
15998
+ * @param {string} [startDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
15999
+ * @param {string} [endDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
16000
+ * @param {*} [options] Override http request option.
16001
+ * @throws {RequiredError}
16002
+ * @memberof BillingApi
16003
+ */
16004
+ public getImageGenerationBillingHistoryGraph(resourceId: number, startDate?: string, endDate?: string, options?: RawAxiosRequestConfig) {
16005
+ return BillingApiFp(this.configuration).getImageGenerationBillingHistoryGraph(resourceId, startDate, endDate, options).then((request) => request(this.axios, this.basePath));
16006
+ }
16007
+
16008
+ /**
16009
+ * Retrieve billing history for a specific Image Generation resource. Includes: \'resource_name\', \'infrahub_id\', \'base_model\', \'base_model_display_name\', \'lora_adapter\', \'incurred_bill\', \'non_discounted_bill\', \'usage_time\', \'input_tokens\', \'output_tokens\', \'input_tokens_incurred_bill\', \'input_tokens_non_discounted_bill\', \'output_tokens_incurred_bill\', \'output_tokens_non_discounted_bill\'
16010
+ * @param {number} resourceId
16011
+ * @param {string} [startDate] YYYY-MM-DDTHH:MM:SS
16012
+ * @param {string} [endDate] YYYY-MM-DDTHH:MM:SS
16013
+ * @param {*} [options] Override http request option.
16014
+ * @throws {RequiredError}
16015
+ * @memberof BillingApi
16016
+ */
16017
+ public getImageGenerationHistoryForResource(resourceId: number, startDate?: string, endDate?: string, options?: RawAxiosRequestConfig) {
16018
+ return BillingApiFp(this.configuration).getImageGenerationHistoryForResource(resourceId, startDate, endDate, options).then((request) => request(this.axios, this.basePath));
16019
+ }
16020
+
15002
16021
  /**
15003
16022
  * Retrieve the previous day\'s costs for instances, volumes, and clusters. Returns a breakdown of the costs and the total cost for the last day. For additional information on Retrieve Previous Day Usage Costs, [**click here**](None/docs/api-reference/billing-resources/last-day-usage/)
15004
16023
  * @summary GET: Last Day Cost