@seekora-ai/admin-api 1.0.23 → 1.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/api.js CHANGED
@@ -44,6 +44,13 @@ export const DataTypesCreateTaskRequestTypeEnum = {
44
44
  Manual: 'manual',
45
45
  PluginConnector: 'plugin_connector'
46
46
  };
47
+ export const DataTypesCreditTransactionTransactionTypeEnum = {
48
+ Purchase: 'purchase',
49
+ Consume: 'consume',
50
+ Refund: 'refund',
51
+ Bonus: 'bonus',
52
+ Expire: 'expire'
53
+ };
47
54
  /**
48
55
  * APICallsApi - axios parameter creator
49
56
  * @export
@@ -426,6 +433,128 @@ export class APICallsApi extends BaseAPI {
426
433
  */
427
434
  export const AccountSettingsApiAxiosParamCreator = function (configuration) {
428
435
  return {
436
+ /**
437
+ * Retrieves the organization details of the currently logged-in user
438
+ * @summary Retrieve user\'s organization
439
+ * @param {*} [options] Override http request option.
440
+ * @throws {RequiredError}
441
+ */
442
+ accountSettingsOrganizationGet: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
443
+ const localVarPath = `/account-settings/organization`;
444
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
445
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
446
+ let baseOptions;
447
+ if (configuration) {
448
+ baseOptions = configuration.baseOptions;
449
+ }
450
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
451
+ const localVarHeaderParameter = {};
452
+ const localVarQueryParameter = {};
453
+ // authentication BearerAuth required
454
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
455
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
456
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
457
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
458
+ return {
459
+ url: toPathString(localVarUrlObj),
460
+ options: localVarRequestOptions,
461
+ };
462
+ }),
463
+ /**
464
+ * Removes the logo of the currently logged-in user\'s organization
465
+ * @summary Delete user\'s organization logo
466
+ * @param {*} [options] Override http request option.
467
+ * @throws {RequiredError}
468
+ */
469
+ accountSettingsOrganizationLogoDelete: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
470
+ const localVarPath = `/account-settings/organization/logo`;
471
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
472
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
473
+ let baseOptions;
474
+ if (configuration) {
475
+ baseOptions = configuration.baseOptions;
476
+ }
477
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
478
+ const localVarHeaderParameter = {};
479
+ const localVarQueryParameter = {};
480
+ // authentication BearerAuth required
481
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
482
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
483
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
484
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
485
+ return {
486
+ url: toPathString(localVarUrlObj),
487
+ options: localVarRequestOptions,
488
+ };
489
+ }),
490
+ /**
491
+ * Updates the logo of the currently logged-in user\'s organization
492
+ * @summary Update user\'s organization logo
493
+ * @param {File} logo Organization logo file
494
+ * @param {*} [options] Override http request option.
495
+ * @throws {RequiredError}
496
+ */
497
+ accountSettingsOrganizationLogoPut: (logo_1, ...args_1) => __awaiter(this, [logo_1, ...args_1], void 0, function* (logo, options = {}) {
498
+ // verify required parameter 'logo' is not null or undefined
499
+ assertParamExists('accountSettingsOrganizationLogoPut', 'logo', logo);
500
+ const localVarPath = `/account-settings/organization/logo`;
501
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
502
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
503
+ let baseOptions;
504
+ if (configuration) {
505
+ baseOptions = configuration.baseOptions;
506
+ }
507
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
508
+ const localVarHeaderParameter = {};
509
+ const localVarQueryParameter = {};
510
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
511
+ // authentication BearerAuth required
512
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
513
+ if (logo !== undefined) {
514
+ localVarFormParams.append('logo', logo);
515
+ }
516
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
517
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
518
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
519
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
520
+ localVarRequestOptions.data = localVarFormParams;
521
+ return {
522
+ url: toPathString(localVarUrlObj),
523
+ options: localVarRequestOptions,
524
+ };
525
+ }),
526
+ /**
527
+ * Updates the organization details of the currently logged-in user
528
+ * @summary Update user\'s organization
529
+ * @param {DataTypesUpdateOrganizationRequest} organization Organization update request
530
+ * @param {*} [options] Override http request option.
531
+ * @throws {RequiredError}
532
+ */
533
+ accountSettingsOrganizationPut: (organization_1, ...args_1) => __awaiter(this, [organization_1, ...args_1], void 0, function* (organization, options = {}) {
534
+ // verify required parameter 'organization' is not null or undefined
535
+ assertParamExists('accountSettingsOrganizationPut', 'organization', organization);
536
+ const localVarPath = `/account-settings/organization`;
537
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
538
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
539
+ let baseOptions;
540
+ if (configuration) {
541
+ baseOptions = configuration.baseOptions;
542
+ }
543
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
544
+ const localVarHeaderParameter = {};
545
+ const localVarQueryParameter = {};
546
+ // authentication BearerAuth required
547
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
548
+ localVarHeaderParameter['Content-Type'] = 'application/json';
549
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
550
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
551
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
552
+ localVarRequestOptions.data = serializeDataIfNeeded(organization, localVarRequestOptions, configuration);
553
+ return {
554
+ url: toPathString(localVarUrlObj),
555
+ options: localVarRequestOptions,
556
+ };
557
+ }),
429
558
  /**
430
559
  * Updates the password of the currently logged-in user
431
560
  * @summary Update user password
@@ -433,10 +562,10 @@ export const AccountSettingsApiAxiosParamCreator = function (configuration) {
433
562
  * @param {*} [options] Override http request option.
434
563
  * @throws {RequiredError}
435
564
  */
436
- passwordPut: (password_1, ...args_1) => __awaiter(this, [password_1, ...args_1], void 0, function* (password, options = {}) {
565
+ accountSettingsPasswordPut: (password_1, ...args_1) => __awaiter(this, [password_1, ...args_1], void 0, function* (password, options = {}) {
437
566
  // verify required parameter 'password' is not null or undefined
438
- assertParamExists('passwordPut', 'password', password);
439
- const localVarPath = `/password`;
567
+ assertParamExists('accountSettingsPasswordPut', 'password', password);
568
+ const localVarPath = `/account-settings/password`;
440
569
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
441
570
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
442
571
  let baseOptions;
@@ -464,8 +593,8 @@ export const AccountSettingsApiAxiosParamCreator = function (configuration) {
464
593
  * @param {*} [options] Override http request option.
465
594
  * @throws {RequiredError}
466
595
  */
467
- profileGet: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
468
- const localVarPath = `/profile`;
596
+ accountSettingsProfileGet: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
597
+ const localVarPath = `/account-settings/profile`;
469
598
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
470
599
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
471
600
  let baseOptions;
@@ -492,10 +621,10 @@ export const AccountSettingsApiAxiosParamCreator = function (configuration) {
492
621
  * @param {*} [options] Override http request option.
493
622
  * @throws {RequiredError}
494
623
  */
495
- profilePut: (profile_1, ...args_1) => __awaiter(this, [profile_1, ...args_1], void 0, function* (profile, options = {}) {
624
+ accountSettingsProfilePut: (profile_1, ...args_1) => __awaiter(this, [profile_1, ...args_1], void 0, function* (profile, options = {}) {
496
625
  // verify required parameter 'profile' is not null or undefined
497
- assertParamExists('profilePut', 'profile', profile);
498
- const localVarPath = `/profile`;
626
+ assertParamExists('accountSettingsProfilePut', 'profile', profile);
627
+ const localVarPath = `/account-settings/profile`;
499
628
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
500
629
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
501
630
  let baseOptions;
@@ -526,6 +655,68 @@ export const AccountSettingsApiAxiosParamCreator = function (configuration) {
526
655
  export const AccountSettingsApiFp = function (configuration) {
527
656
  const localVarAxiosParamCreator = AccountSettingsApiAxiosParamCreator(configuration);
528
657
  return {
658
+ /**
659
+ * Retrieves the organization details of the currently logged-in user
660
+ * @summary Retrieve user\'s organization
661
+ * @param {*} [options] Override http request option.
662
+ * @throws {RequiredError}
663
+ */
664
+ accountSettingsOrganizationGet(options) {
665
+ return __awaiter(this, void 0, void 0, function* () {
666
+ var _a, _b, _c;
667
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.accountSettingsOrganizationGet(options);
668
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
669
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountSettingsApi.accountSettingsOrganizationGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
670
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
671
+ });
672
+ },
673
+ /**
674
+ * Removes the logo of the currently logged-in user\'s organization
675
+ * @summary Delete user\'s organization logo
676
+ * @param {*} [options] Override http request option.
677
+ * @throws {RequiredError}
678
+ */
679
+ accountSettingsOrganizationLogoDelete(options) {
680
+ return __awaiter(this, void 0, void 0, function* () {
681
+ var _a, _b, _c;
682
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.accountSettingsOrganizationLogoDelete(options);
683
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
684
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountSettingsApi.accountSettingsOrganizationLogoDelete']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
685
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
686
+ });
687
+ },
688
+ /**
689
+ * Updates the logo of the currently logged-in user\'s organization
690
+ * @summary Update user\'s organization logo
691
+ * @param {File} logo Organization logo file
692
+ * @param {*} [options] Override http request option.
693
+ * @throws {RequiredError}
694
+ */
695
+ accountSettingsOrganizationLogoPut(logo, options) {
696
+ return __awaiter(this, void 0, void 0, function* () {
697
+ var _a, _b, _c;
698
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.accountSettingsOrganizationLogoPut(logo, options);
699
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
700
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountSettingsApi.accountSettingsOrganizationLogoPut']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
701
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
702
+ });
703
+ },
704
+ /**
705
+ * Updates the organization details of the currently logged-in user
706
+ * @summary Update user\'s organization
707
+ * @param {DataTypesUpdateOrganizationRequest} organization Organization update request
708
+ * @param {*} [options] Override http request option.
709
+ * @throws {RequiredError}
710
+ */
711
+ accountSettingsOrganizationPut(organization, options) {
712
+ return __awaiter(this, void 0, void 0, function* () {
713
+ var _a, _b, _c;
714
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.accountSettingsOrganizationPut(organization, options);
715
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
716
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountSettingsApi.accountSettingsOrganizationPut']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
717
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
718
+ });
719
+ },
529
720
  /**
530
721
  * Updates the password of the currently logged-in user
531
722
  * @summary Update user password
@@ -533,12 +724,12 @@ export const AccountSettingsApiFp = function (configuration) {
533
724
  * @param {*} [options] Override http request option.
534
725
  * @throws {RequiredError}
535
726
  */
536
- passwordPut(password, options) {
727
+ accountSettingsPasswordPut(password, options) {
537
728
  return __awaiter(this, void 0, void 0, function* () {
538
729
  var _a, _b, _c;
539
- const localVarAxiosArgs = yield localVarAxiosParamCreator.passwordPut(password, options);
730
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.accountSettingsPasswordPut(password, options);
540
731
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
541
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountSettingsApi.passwordPut']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
732
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountSettingsApi.accountSettingsPasswordPut']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
542
733
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
543
734
  });
544
735
  },
@@ -548,12 +739,12 @@ export const AccountSettingsApiFp = function (configuration) {
548
739
  * @param {*} [options] Override http request option.
549
740
  * @throws {RequiredError}
550
741
  */
551
- profileGet(options) {
742
+ accountSettingsProfileGet(options) {
552
743
  return __awaiter(this, void 0, void 0, function* () {
553
744
  var _a, _b, _c;
554
- const localVarAxiosArgs = yield localVarAxiosParamCreator.profileGet(options);
745
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.accountSettingsProfileGet(options);
555
746
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
556
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountSettingsApi.profileGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
747
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountSettingsApi.accountSettingsProfileGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
557
748
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
558
749
  });
559
750
  },
@@ -564,12 +755,12 @@ export const AccountSettingsApiFp = function (configuration) {
564
755
  * @param {*} [options] Override http request option.
565
756
  * @throws {RequiredError}
566
757
  */
567
- profilePut(profile, options) {
758
+ accountSettingsProfilePut(profile, options) {
568
759
  return __awaiter(this, void 0, void 0, function* () {
569
760
  var _a, _b, _c;
570
- const localVarAxiosArgs = yield localVarAxiosParamCreator.profilePut(profile, options);
761
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.accountSettingsProfilePut(profile, options);
571
762
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
572
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountSettingsApi.profilePut']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
763
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AccountSettingsApi.accountSettingsProfilePut']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
573
764
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
574
765
  });
575
766
  },
@@ -582,6 +773,44 @@ export const AccountSettingsApiFp = function (configuration) {
582
773
  export const AccountSettingsApiFactory = function (configuration, basePath, axios) {
583
774
  const localVarFp = AccountSettingsApiFp(configuration);
584
775
  return {
776
+ /**
777
+ * Retrieves the organization details of the currently logged-in user
778
+ * @summary Retrieve user\'s organization
779
+ * @param {*} [options] Override http request option.
780
+ * @throws {RequiredError}
781
+ */
782
+ accountSettingsOrganizationGet(options) {
783
+ return localVarFp.accountSettingsOrganizationGet(options).then((request) => request(axios, basePath));
784
+ },
785
+ /**
786
+ * Removes the logo of the currently logged-in user\'s organization
787
+ * @summary Delete user\'s organization logo
788
+ * @param {*} [options] Override http request option.
789
+ * @throws {RequiredError}
790
+ */
791
+ accountSettingsOrganizationLogoDelete(options) {
792
+ return localVarFp.accountSettingsOrganizationLogoDelete(options).then((request) => request(axios, basePath));
793
+ },
794
+ /**
795
+ * Updates the logo of the currently logged-in user\'s organization
796
+ * @summary Update user\'s organization logo
797
+ * @param {File} logo Organization logo file
798
+ * @param {*} [options] Override http request option.
799
+ * @throws {RequiredError}
800
+ */
801
+ accountSettingsOrganizationLogoPut(logo, options) {
802
+ return localVarFp.accountSettingsOrganizationLogoPut(logo, options).then((request) => request(axios, basePath));
803
+ },
804
+ /**
805
+ * Updates the organization details of the currently logged-in user
806
+ * @summary Update user\'s organization
807
+ * @param {DataTypesUpdateOrganizationRequest} organization Organization update request
808
+ * @param {*} [options] Override http request option.
809
+ * @throws {RequiredError}
810
+ */
811
+ accountSettingsOrganizationPut(organization, options) {
812
+ return localVarFp.accountSettingsOrganizationPut(organization, options).then((request) => request(axios, basePath));
813
+ },
585
814
  /**
586
815
  * Updates the password of the currently logged-in user
587
816
  * @summary Update user password
@@ -589,8 +818,8 @@ export const AccountSettingsApiFactory = function (configuration, basePath, axio
589
818
  * @param {*} [options] Override http request option.
590
819
  * @throws {RequiredError}
591
820
  */
592
- passwordPut(password, options) {
593
- return localVarFp.passwordPut(password, options).then((request) => request(axios, basePath));
821
+ accountSettingsPasswordPut(password, options) {
822
+ return localVarFp.accountSettingsPasswordPut(password, options).then((request) => request(axios, basePath));
594
823
  },
595
824
  /**
596
825
  * Retrieves the profile of the currently logged-in user
@@ -598,8 +827,8 @@ export const AccountSettingsApiFactory = function (configuration, basePath, axio
598
827
  * @param {*} [options] Override http request option.
599
828
  * @throws {RequiredError}
600
829
  */
601
- profileGet(options) {
602
- return localVarFp.profileGet(options).then((request) => request(axios, basePath));
830
+ accountSettingsProfileGet(options) {
831
+ return localVarFp.accountSettingsProfileGet(options).then((request) => request(axios, basePath));
603
832
  },
604
833
  /**
605
834
  * Updates the profile of the currently logged-in user
@@ -608,8 +837,8 @@ export const AccountSettingsApiFactory = function (configuration, basePath, axio
608
837
  * @param {*} [options] Override http request option.
609
838
  * @throws {RequiredError}
610
839
  */
611
- profilePut(profile, options) {
612
- return localVarFp.profilePut(profile, options).then((request) => request(axios, basePath));
840
+ accountSettingsProfilePut(profile, options) {
841
+ return localVarFp.accountSettingsProfilePut(profile, options).then((request) => request(axios, basePath));
613
842
  },
614
843
  };
615
844
  };
@@ -620,6 +849,48 @@ export const AccountSettingsApiFactory = function (configuration, basePath, axio
620
849
  * @extends {BaseAPI}
621
850
  */
622
851
  export class AccountSettingsApi extends BaseAPI {
852
+ /**
853
+ * Retrieves the organization details of the currently logged-in user
854
+ * @summary Retrieve user\'s organization
855
+ * @param {*} [options] Override http request option.
856
+ * @throws {RequiredError}
857
+ * @memberof AccountSettingsApi
858
+ */
859
+ accountSettingsOrganizationGet(options) {
860
+ return AccountSettingsApiFp(this.configuration).accountSettingsOrganizationGet(options).then((request) => request(this.axios, this.basePath));
861
+ }
862
+ /**
863
+ * Removes the logo of the currently logged-in user\'s organization
864
+ * @summary Delete user\'s organization logo
865
+ * @param {*} [options] Override http request option.
866
+ * @throws {RequiredError}
867
+ * @memberof AccountSettingsApi
868
+ */
869
+ accountSettingsOrganizationLogoDelete(options) {
870
+ return AccountSettingsApiFp(this.configuration).accountSettingsOrganizationLogoDelete(options).then((request) => request(this.axios, this.basePath));
871
+ }
872
+ /**
873
+ * Updates the logo of the currently logged-in user\'s organization
874
+ * @summary Update user\'s organization logo
875
+ * @param {File} logo Organization logo file
876
+ * @param {*} [options] Override http request option.
877
+ * @throws {RequiredError}
878
+ * @memberof AccountSettingsApi
879
+ */
880
+ accountSettingsOrganizationLogoPut(logo, options) {
881
+ return AccountSettingsApiFp(this.configuration).accountSettingsOrganizationLogoPut(logo, options).then((request) => request(this.axios, this.basePath));
882
+ }
883
+ /**
884
+ * Updates the organization details of the currently logged-in user
885
+ * @summary Update user\'s organization
886
+ * @param {DataTypesUpdateOrganizationRequest} organization Organization update request
887
+ * @param {*} [options] Override http request option.
888
+ * @throws {RequiredError}
889
+ * @memberof AccountSettingsApi
890
+ */
891
+ accountSettingsOrganizationPut(organization, options) {
892
+ return AccountSettingsApiFp(this.configuration).accountSettingsOrganizationPut(organization, options).then((request) => request(this.axios, this.basePath));
893
+ }
623
894
  /**
624
895
  * Updates the password of the currently logged-in user
625
896
  * @summary Update user password
@@ -628,8 +899,8 @@ export class AccountSettingsApi extends BaseAPI {
628
899
  * @throws {RequiredError}
629
900
  * @memberof AccountSettingsApi
630
901
  */
631
- passwordPut(password, options) {
632
- return AccountSettingsApiFp(this.configuration).passwordPut(password, options).then((request) => request(this.axios, this.basePath));
902
+ accountSettingsPasswordPut(password, options) {
903
+ return AccountSettingsApiFp(this.configuration).accountSettingsPasswordPut(password, options).then((request) => request(this.axios, this.basePath));
633
904
  }
634
905
  /**
635
906
  * Retrieves the profile of the currently logged-in user
@@ -638,8 +909,8 @@ export class AccountSettingsApi extends BaseAPI {
638
909
  * @throws {RequiredError}
639
910
  * @memberof AccountSettingsApi
640
911
  */
641
- profileGet(options) {
642
- return AccountSettingsApiFp(this.configuration).profileGet(options).then((request) => request(this.axios, this.basePath));
912
+ accountSettingsProfileGet(options) {
913
+ return AccountSettingsApiFp(this.configuration).accountSettingsProfileGet(options).then((request) => request(this.axios, this.basePath));
643
914
  }
644
915
  /**
645
916
  * Updates the profile of the currently logged-in user
@@ -649,8 +920,8 @@ export class AccountSettingsApi extends BaseAPI {
649
920
  * @throws {RequiredError}
650
921
  * @memberof AccountSettingsApi
651
922
  */
652
- profilePut(profile, options) {
653
- return AccountSettingsApiFp(this.configuration).profilePut(profile, options).then((request) => request(this.axios, this.basePath));
923
+ accountSettingsProfilePut(profile, options) {
924
+ return AccountSettingsApiFp(this.configuration).accountSettingsProfilePut(profile, options).then((request) => request(this.axios, this.basePath));
654
925
  }
655
926
  }
656
927
  /**
@@ -1902,6 +2173,710 @@ export class ConnectorsApi extends BaseAPI {
1902
2173
  return ConnectorsApiFp(this.configuration).v1ConnectorsTasksTaskIdRunPost(taskId, initiatedBy, options).then((request) => request(this.axios, this.basePath));
1903
2174
  }
1904
2175
  }
2176
+ /**
2177
+ * CreditsApi - axios parameter creator
2178
+ * @export
2179
+ */
2180
+ export const CreditsApiAxiosParamCreator = function (configuration) {
2181
+ return {
2182
+ /**
2183
+ * Manually adjust credits for an organization (admin only) - supports both positive and negative adjustments
2184
+ * @summary Manually adjust organization credits
2185
+ * @param {DataTypesManualCreditAdjustmentRequest} request Credit adjustment details
2186
+ * @param {*} [options] Override http request option.
2187
+ * @throws {RequiredError}
2188
+ */
2189
+ apiCreditsAdminAdjustPost: (request_1, ...args_1) => __awaiter(this, [request_1, ...args_1], void 0, function* (request, options = {}) {
2190
+ // verify required parameter 'request' is not null or undefined
2191
+ assertParamExists('apiCreditsAdminAdjustPost', 'request', request);
2192
+ const localVarPath = `/api/credits/admin/adjust`;
2193
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2194
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2195
+ let baseOptions;
2196
+ if (configuration) {
2197
+ baseOptions = configuration.baseOptions;
2198
+ }
2199
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2200
+ const localVarHeaderParameter = {};
2201
+ const localVarQueryParameter = {};
2202
+ // authentication BearerAuth required
2203
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
2204
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2205
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2206
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2207
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2208
+ localVarRequestOptions.data = serializeDataIfNeeded(request, localVarRequestOptions, configuration);
2209
+ return {
2210
+ url: toPathString(localVarUrlObj),
2211
+ options: localVarRequestOptions,
2212
+ };
2213
+ }),
2214
+ /**
2215
+ * Get comprehensive credit balance including recent transactions, usage patterns, and expiry details
2216
+ * @summary Get detailed organization credit balance
2217
+ * @param {number} [limit] Number of recent transactions to include
2218
+ * @param {*} [options] Override http request option.
2219
+ * @throws {RequiredError}
2220
+ */
2221
+ apiCreditsBalanceDetailedGet: (limit_1, ...args_1) => __awaiter(this, [limit_1, ...args_1], void 0, function* (limit, options = {}) {
2222
+ const localVarPath = `/api/credits/balance/detailed`;
2223
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2224
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2225
+ let baseOptions;
2226
+ if (configuration) {
2227
+ baseOptions = configuration.baseOptions;
2228
+ }
2229
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2230
+ const localVarHeaderParameter = {};
2231
+ const localVarQueryParameter = {};
2232
+ // authentication BearerAuth required
2233
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
2234
+ if (limit !== undefined) {
2235
+ localVarQueryParameter['limit'] = limit;
2236
+ }
2237
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2238
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2239
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2240
+ return {
2241
+ url: toPathString(localVarUrlObj),
2242
+ options: localVarRequestOptions,
2243
+ };
2244
+ }),
2245
+ /**
2246
+ * Get current credit balance and summary for the authenticated user\'s organization
2247
+ * @summary Get organization credit balance
2248
+ * @param {*} [options] Override http request option.
2249
+ * @throws {RequiredError}
2250
+ */
2251
+ apiCreditsBalanceGet: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
2252
+ const localVarPath = `/api/credits/balance`;
2253
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2254
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2255
+ let baseOptions;
2256
+ if (configuration) {
2257
+ baseOptions = configuration.baseOptions;
2258
+ }
2259
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2260
+ const localVarHeaderParameter = {};
2261
+ const localVarQueryParameter = {};
2262
+ // authentication BearerAuth required
2263
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
2264
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2265
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2266
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2267
+ return {
2268
+ url: toPathString(localVarUrlObj),
2269
+ options: localVarRequestOptions,
2270
+ };
2271
+ }),
2272
+ /**
2273
+ * Get current credit balance for a specific store (legacy endpoint - use organization endpoints instead)
2274
+ * @summary Get store credit balance (legacy)
2275
+ * @param {number} storeId Store ID
2276
+ * @param {*} [options] Override http request option.
2277
+ * @deprecated
2278
+ * @throws {RequiredError}
2279
+ */
2280
+ apiCreditsBalanceStoreStoreIdGet: (storeId_1, ...args_1) => __awaiter(this, [storeId_1, ...args_1], void 0, function* (storeId, options = {}) {
2281
+ // verify required parameter 'storeId' is not null or undefined
2282
+ assertParamExists('apiCreditsBalanceStoreStoreIdGet', 'storeId', storeId);
2283
+ const localVarPath = `/api/credits/balance/store/{storeId}`
2284
+ .replace(`{${"storeId"}}`, encodeURIComponent(String(storeId)));
2285
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2286
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2287
+ let baseOptions;
2288
+ if (configuration) {
2289
+ baseOptions = configuration.baseOptions;
2290
+ }
2291
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2292
+ const localVarHeaderParameter = {};
2293
+ const localVarQueryParameter = {};
2294
+ // authentication BearerAuth required
2295
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
2296
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2297
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2298
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2299
+ return {
2300
+ url: toPathString(localVarUrlObj),
2301
+ options: localVarRequestOptions,
2302
+ };
2303
+ }),
2304
+ /**
2305
+ * Manually consume credits for testing or administrative purposes using FIFO logic
2306
+ * @summary Manually consume credits
2307
+ * @param {DataTypesManualConsumeCreditsRequest} request Manual consumption request
2308
+ * @param {*} [options] Override http request option.
2309
+ * @throws {RequiredError}
2310
+ */
2311
+ apiCreditsConsumePost: (request_1, ...args_1) => __awaiter(this, [request_1, ...args_1], void 0, function* (request, options = {}) {
2312
+ // verify required parameter 'request' is not null or undefined
2313
+ assertParamExists('apiCreditsConsumePost', 'request', request);
2314
+ const localVarPath = `/api/credits/consume`;
2315
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2316
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2317
+ let baseOptions;
2318
+ if (configuration) {
2319
+ baseOptions = configuration.baseOptions;
2320
+ }
2321
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2322
+ const localVarHeaderParameter = {};
2323
+ const localVarQueryParameter = {};
2324
+ // authentication BearerAuth required
2325
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
2326
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2327
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2328
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2329
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2330
+ localVarRequestOptions.data = serializeDataIfNeeded(request, localVarRequestOptions, configuration);
2331
+ return {
2332
+ url: toPathString(localVarUrlObj),
2333
+ options: localVarRequestOptions,
2334
+ };
2335
+ }),
2336
+ /**
2337
+ * Get detailed history of credit consumption with FIFO breakdown and analytics
2338
+ * @summary Get FIFO consumption history
2339
+ * @param {number} [page] Page number
2340
+ * @param {number} [limit] Items per page
2341
+ * @param {string} [endpoint] Filter by API endpoint
2342
+ * @param {string} [startDate] Start date filter (RFC3339 format)
2343
+ * @param {string} [endDate] End date filter (RFC3339 format)
2344
+ * @param {*} [options] Override http request option.
2345
+ * @throws {RequiredError}
2346
+ */
2347
+ apiCreditsConsumptionHistoryGet: (page_1, limit_1, endpoint_1, startDate_1, endDate_1, ...args_1) => __awaiter(this, [page_1, limit_1, endpoint_1, startDate_1, endDate_1, ...args_1], void 0, function* (page, limit, endpoint, startDate, endDate, options = {}) {
2348
+ const localVarPath = `/api/credits/consumption-history`;
2349
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2350
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2351
+ let baseOptions;
2352
+ if (configuration) {
2353
+ baseOptions = configuration.baseOptions;
2354
+ }
2355
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2356
+ const localVarHeaderParameter = {};
2357
+ const localVarQueryParameter = {};
2358
+ // authentication BearerAuth required
2359
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
2360
+ if (page !== undefined) {
2361
+ localVarQueryParameter['page'] = page;
2362
+ }
2363
+ if (limit !== undefined) {
2364
+ localVarQueryParameter['limit'] = limit;
2365
+ }
2366
+ if (endpoint !== undefined) {
2367
+ localVarQueryParameter['endpoint'] = endpoint;
2368
+ }
2369
+ if (startDate !== undefined) {
2370
+ localVarQueryParameter['start_date'] = startDate;
2371
+ }
2372
+ if (endDate !== undefined) {
2373
+ localVarQueryParameter['end_date'] = endDate;
2374
+ }
2375
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2376
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2377
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2378
+ return {
2379
+ url: toPathString(localVarUrlObj),
2380
+ options: localVarRequestOptions,
2381
+ };
2382
+ }),
2383
+ /**
2384
+ * Get all active credit plans available for purchase with detailed pricing and features
2385
+ * @summary Get available credit plans
2386
+ * @param {*} [options] Override http request option.
2387
+ * @throws {RequiredError}
2388
+ */
2389
+ apiCreditsPlansGet: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
2390
+ const localVarPath = `/api/credits/plans`;
2391
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2392
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2393
+ let baseOptions;
2394
+ if (configuration) {
2395
+ baseOptions = configuration.baseOptions;
2396
+ }
2397
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2398
+ const localVarHeaderParameter = {};
2399
+ const localVarQueryParameter = {};
2400
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2401
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2402
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2403
+ return {
2404
+ url: toPathString(localVarUrlObj),
2405
+ options: localVarRequestOptions,
2406
+ };
2407
+ }),
2408
+ /**
2409
+ * Purchase credits using a credit plan with payment processing
2410
+ * @summary Purchase credits
2411
+ * @param {DataTypesPurchaseCreditsRequest} request Purchase request with payment details
2412
+ * @param {*} [options] Override http request option.
2413
+ * @throws {RequiredError}
2414
+ */
2415
+ apiCreditsPurchasePost: (request_1, ...args_1) => __awaiter(this, [request_1, ...args_1], void 0, function* (request, options = {}) {
2416
+ // verify required parameter 'request' is not null or undefined
2417
+ assertParamExists('apiCreditsPurchasePost', 'request', request);
2418
+ const localVarPath = `/api/credits/purchase`;
2419
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2420
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2421
+ let baseOptions;
2422
+ if (configuration) {
2423
+ baseOptions = configuration.baseOptions;
2424
+ }
2425
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2426
+ const localVarHeaderParameter = {};
2427
+ const localVarQueryParameter = {};
2428
+ // authentication BearerAuth required
2429
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
2430
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2431
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2432
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2433
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2434
+ localVarRequestOptions.data = serializeDataIfNeeded(request, localVarRequestOptions, configuration);
2435
+ return {
2436
+ url: toPathString(localVarUrlObj),
2437
+ options: localVarRequestOptions,
2438
+ };
2439
+ }),
2440
+ /**
2441
+ * Get paginated credit transaction history for the authenticated organization
2442
+ * @summary Get organization credit transactions
2443
+ * @param {number} [page] Page number
2444
+ * @param {number} [limit] Items per page
2445
+ * @param {ApiCreditsTransactionsGetTypeEnum} [type] Filter by transaction type
2446
+ * @param {string} [startDate] Start date filter (RFC3339 format)
2447
+ * @param {string} [endDate] End date filter (RFC3339 format)
2448
+ * @param {*} [options] Override http request option.
2449
+ * @throws {RequiredError}
2450
+ */
2451
+ apiCreditsTransactionsGet: (page_1, limit_1, type_1, startDate_1, endDate_1, ...args_1) => __awaiter(this, [page_1, limit_1, type_1, startDate_1, endDate_1, ...args_1], void 0, function* (page, limit, type, startDate, endDate, options = {}) {
2452
+ const localVarPath = `/api/credits/transactions`;
2453
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2454
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2455
+ let baseOptions;
2456
+ if (configuration) {
2457
+ baseOptions = configuration.baseOptions;
2458
+ }
2459
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2460
+ const localVarHeaderParameter = {};
2461
+ const localVarQueryParameter = {};
2462
+ // authentication BearerAuth required
2463
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
2464
+ if (page !== undefined) {
2465
+ localVarQueryParameter['page'] = page;
2466
+ }
2467
+ if (limit !== undefined) {
2468
+ localVarQueryParameter['limit'] = limit;
2469
+ }
2470
+ if (type !== undefined) {
2471
+ localVarQueryParameter['type'] = type;
2472
+ }
2473
+ if (startDate !== undefined) {
2474
+ localVarQueryParameter['start_date'] = startDate;
2475
+ }
2476
+ if (endDate !== undefined) {
2477
+ localVarQueryParameter['end_date'] = endDate;
2478
+ }
2479
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2480
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2481
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2482
+ return {
2483
+ url: toPathString(localVarUrlObj),
2484
+ options: localVarRequestOptions,
2485
+ };
2486
+ }),
2487
+ };
2488
+ };
2489
+ /**
2490
+ * CreditsApi - functional programming interface
2491
+ * @export
2492
+ */
2493
+ export const CreditsApiFp = function (configuration) {
2494
+ const localVarAxiosParamCreator = CreditsApiAxiosParamCreator(configuration);
2495
+ return {
2496
+ /**
2497
+ * Manually adjust credits for an organization (admin only) - supports both positive and negative adjustments
2498
+ * @summary Manually adjust organization credits
2499
+ * @param {DataTypesManualCreditAdjustmentRequest} request Credit adjustment details
2500
+ * @param {*} [options] Override http request option.
2501
+ * @throws {RequiredError}
2502
+ */
2503
+ apiCreditsAdminAdjustPost(request, options) {
2504
+ return __awaiter(this, void 0, void 0, function* () {
2505
+ var _a, _b, _c;
2506
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.apiCreditsAdminAdjustPost(request, options);
2507
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2508
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['CreditsApi.apiCreditsAdminAdjustPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2509
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2510
+ });
2511
+ },
2512
+ /**
2513
+ * Get comprehensive credit balance including recent transactions, usage patterns, and expiry details
2514
+ * @summary Get detailed organization credit balance
2515
+ * @param {number} [limit] Number of recent transactions to include
2516
+ * @param {*} [options] Override http request option.
2517
+ * @throws {RequiredError}
2518
+ */
2519
+ apiCreditsBalanceDetailedGet(limit, options) {
2520
+ return __awaiter(this, void 0, void 0, function* () {
2521
+ var _a, _b, _c;
2522
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.apiCreditsBalanceDetailedGet(limit, options);
2523
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2524
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['CreditsApi.apiCreditsBalanceDetailedGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2525
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2526
+ });
2527
+ },
2528
+ /**
2529
+ * Get current credit balance and summary for the authenticated user\'s organization
2530
+ * @summary Get organization credit balance
2531
+ * @param {*} [options] Override http request option.
2532
+ * @throws {RequiredError}
2533
+ */
2534
+ apiCreditsBalanceGet(options) {
2535
+ return __awaiter(this, void 0, void 0, function* () {
2536
+ var _a, _b, _c;
2537
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.apiCreditsBalanceGet(options);
2538
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2539
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['CreditsApi.apiCreditsBalanceGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2540
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2541
+ });
2542
+ },
2543
+ /**
2544
+ * Get current credit balance for a specific store (legacy endpoint - use organization endpoints instead)
2545
+ * @summary Get store credit balance (legacy)
2546
+ * @param {number} storeId Store ID
2547
+ * @param {*} [options] Override http request option.
2548
+ * @deprecated
2549
+ * @throws {RequiredError}
2550
+ */
2551
+ apiCreditsBalanceStoreStoreIdGet(storeId, options) {
2552
+ return __awaiter(this, void 0, void 0, function* () {
2553
+ var _a, _b, _c;
2554
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.apiCreditsBalanceStoreStoreIdGet(storeId, options);
2555
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2556
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['CreditsApi.apiCreditsBalanceStoreStoreIdGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2557
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2558
+ });
2559
+ },
2560
+ /**
2561
+ * Manually consume credits for testing or administrative purposes using FIFO logic
2562
+ * @summary Manually consume credits
2563
+ * @param {DataTypesManualConsumeCreditsRequest} request Manual consumption request
2564
+ * @param {*} [options] Override http request option.
2565
+ * @throws {RequiredError}
2566
+ */
2567
+ apiCreditsConsumePost(request, options) {
2568
+ return __awaiter(this, void 0, void 0, function* () {
2569
+ var _a, _b, _c;
2570
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.apiCreditsConsumePost(request, options);
2571
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2572
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['CreditsApi.apiCreditsConsumePost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2573
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2574
+ });
2575
+ },
2576
+ /**
2577
+ * Get detailed history of credit consumption with FIFO breakdown and analytics
2578
+ * @summary Get FIFO consumption history
2579
+ * @param {number} [page] Page number
2580
+ * @param {number} [limit] Items per page
2581
+ * @param {string} [endpoint] Filter by API endpoint
2582
+ * @param {string} [startDate] Start date filter (RFC3339 format)
2583
+ * @param {string} [endDate] End date filter (RFC3339 format)
2584
+ * @param {*} [options] Override http request option.
2585
+ * @throws {RequiredError}
2586
+ */
2587
+ apiCreditsConsumptionHistoryGet(page, limit, endpoint, startDate, endDate, options) {
2588
+ return __awaiter(this, void 0, void 0, function* () {
2589
+ var _a, _b, _c;
2590
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.apiCreditsConsumptionHistoryGet(page, limit, endpoint, startDate, endDate, options);
2591
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2592
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['CreditsApi.apiCreditsConsumptionHistoryGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2593
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2594
+ });
2595
+ },
2596
+ /**
2597
+ * Get all active credit plans available for purchase with detailed pricing and features
2598
+ * @summary Get available credit plans
2599
+ * @param {*} [options] Override http request option.
2600
+ * @throws {RequiredError}
2601
+ */
2602
+ apiCreditsPlansGet(options) {
2603
+ return __awaiter(this, void 0, void 0, function* () {
2604
+ var _a, _b, _c;
2605
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.apiCreditsPlansGet(options);
2606
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2607
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['CreditsApi.apiCreditsPlansGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2608
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2609
+ });
2610
+ },
2611
+ /**
2612
+ * Purchase credits using a credit plan with payment processing
2613
+ * @summary Purchase credits
2614
+ * @param {DataTypesPurchaseCreditsRequest} request Purchase request with payment details
2615
+ * @param {*} [options] Override http request option.
2616
+ * @throws {RequiredError}
2617
+ */
2618
+ apiCreditsPurchasePost(request, options) {
2619
+ return __awaiter(this, void 0, void 0, function* () {
2620
+ var _a, _b, _c;
2621
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.apiCreditsPurchasePost(request, options);
2622
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2623
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['CreditsApi.apiCreditsPurchasePost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2624
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2625
+ });
2626
+ },
2627
+ /**
2628
+ * Get paginated credit transaction history for the authenticated organization
2629
+ * @summary Get organization credit transactions
2630
+ * @param {number} [page] Page number
2631
+ * @param {number} [limit] Items per page
2632
+ * @param {ApiCreditsTransactionsGetTypeEnum} [type] Filter by transaction type
2633
+ * @param {string} [startDate] Start date filter (RFC3339 format)
2634
+ * @param {string} [endDate] End date filter (RFC3339 format)
2635
+ * @param {*} [options] Override http request option.
2636
+ * @throws {RequiredError}
2637
+ */
2638
+ apiCreditsTransactionsGet(page, limit, type, startDate, endDate, options) {
2639
+ return __awaiter(this, void 0, void 0, function* () {
2640
+ var _a, _b, _c;
2641
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.apiCreditsTransactionsGet(page, limit, type, startDate, endDate, options);
2642
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2643
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['CreditsApi.apiCreditsTransactionsGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2644
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2645
+ });
2646
+ },
2647
+ };
2648
+ };
2649
+ /**
2650
+ * CreditsApi - factory interface
2651
+ * @export
2652
+ */
2653
+ export const CreditsApiFactory = function (configuration, basePath, axios) {
2654
+ const localVarFp = CreditsApiFp(configuration);
2655
+ return {
2656
+ /**
2657
+ * Manually adjust credits for an organization (admin only) - supports both positive and negative adjustments
2658
+ * @summary Manually adjust organization credits
2659
+ * @param {DataTypesManualCreditAdjustmentRequest} request Credit adjustment details
2660
+ * @param {*} [options] Override http request option.
2661
+ * @throws {RequiredError}
2662
+ */
2663
+ apiCreditsAdminAdjustPost(request, options) {
2664
+ return localVarFp.apiCreditsAdminAdjustPost(request, options).then((request) => request(axios, basePath));
2665
+ },
2666
+ /**
2667
+ * Get comprehensive credit balance including recent transactions, usage patterns, and expiry details
2668
+ * @summary Get detailed organization credit balance
2669
+ * @param {number} [limit] Number of recent transactions to include
2670
+ * @param {*} [options] Override http request option.
2671
+ * @throws {RequiredError}
2672
+ */
2673
+ apiCreditsBalanceDetailedGet(limit, options) {
2674
+ return localVarFp.apiCreditsBalanceDetailedGet(limit, options).then((request) => request(axios, basePath));
2675
+ },
2676
+ /**
2677
+ * Get current credit balance and summary for the authenticated user\'s organization
2678
+ * @summary Get organization credit balance
2679
+ * @param {*} [options] Override http request option.
2680
+ * @throws {RequiredError}
2681
+ */
2682
+ apiCreditsBalanceGet(options) {
2683
+ return localVarFp.apiCreditsBalanceGet(options).then((request) => request(axios, basePath));
2684
+ },
2685
+ /**
2686
+ * Get current credit balance for a specific store (legacy endpoint - use organization endpoints instead)
2687
+ * @summary Get store credit balance (legacy)
2688
+ * @param {number} storeId Store ID
2689
+ * @param {*} [options] Override http request option.
2690
+ * @deprecated
2691
+ * @throws {RequiredError}
2692
+ */
2693
+ apiCreditsBalanceStoreStoreIdGet(storeId, options) {
2694
+ return localVarFp.apiCreditsBalanceStoreStoreIdGet(storeId, options).then((request) => request(axios, basePath));
2695
+ },
2696
+ /**
2697
+ * Manually consume credits for testing or administrative purposes using FIFO logic
2698
+ * @summary Manually consume credits
2699
+ * @param {DataTypesManualConsumeCreditsRequest} request Manual consumption request
2700
+ * @param {*} [options] Override http request option.
2701
+ * @throws {RequiredError}
2702
+ */
2703
+ apiCreditsConsumePost(request, options) {
2704
+ return localVarFp.apiCreditsConsumePost(request, options).then((request) => request(axios, basePath));
2705
+ },
2706
+ /**
2707
+ * Get detailed history of credit consumption with FIFO breakdown and analytics
2708
+ * @summary Get FIFO consumption history
2709
+ * @param {number} [page] Page number
2710
+ * @param {number} [limit] Items per page
2711
+ * @param {string} [endpoint] Filter by API endpoint
2712
+ * @param {string} [startDate] Start date filter (RFC3339 format)
2713
+ * @param {string} [endDate] End date filter (RFC3339 format)
2714
+ * @param {*} [options] Override http request option.
2715
+ * @throws {RequiredError}
2716
+ */
2717
+ apiCreditsConsumptionHistoryGet(page, limit, endpoint, startDate, endDate, options) {
2718
+ return localVarFp.apiCreditsConsumptionHistoryGet(page, limit, endpoint, startDate, endDate, options).then((request) => request(axios, basePath));
2719
+ },
2720
+ /**
2721
+ * Get all active credit plans available for purchase with detailed pricing and features
2722
+ * @summary Get available credit plans
2723
+ * @param {*} [options] Override http request option.
2724
+ * @throws {RequiredError}
2725
+ */
2726
+ apiCreditsPlansGet(options) {
2727
+ return localVarFp.apiCreditsPlansGet(options).then((request) => request(axios, basePath));
2728
+ },
2729
+ /**
2730
+ * Purchase credits using a credit plan with payment processing
2731
+ * @summary Purchase credits
2732
+ * @param {DataTypesPurchaseCreditsRequest} request Purchase request with payment details
2733
+ * @param {*} [options] Override http request option.
2734
+ * @throws {RequiredError}
2735
+ */
2736
+ apiCreditsPurchasePost(request, options) {
2737
+ return localVarFp.apiCreditsPurchasePost(request, options).then((request) => request(axios, basePath));
2738
+ },
2739
+ /**
2740
+ * Get paginated credit transaction history for the authenticated organization
2741
+ * @summary Get organization credit transactions
2742
+ * @param {number} [page] Page number
2743
+ * @param {number} [limit] Items per page
2744
+ * @param {ApiCreditsTransactionsGetTypeEnum} [type] Filter by transaction type
2745
+ * @param {string} [startDate] Start date filter (RFC3339 format)
2746
+ * @param {string} [endDate] End date filter (RFC3339 format)
2747
+ * @param {*} [options] Override http request option.
2748
+ * @throws {RequiredError}
2749
+ */
2750
+ apiCreditsTransactionsGet(page, limit, type, startDate, endDate, options) {
2751
+ return localVarFp.apiCreditsTransactionsGet(page, limit, type, startDate, endDate, options).then((request) => request(axios, basePath));
2752
+ },
2753
+ };
2754
+ };
2755
+ /**
2756
+ * CreditsApi - object-oriented interface
2757
+ * @export
2758
+ * @class CreditsApi
2759
+ * @extends {BaseAPI}
2760
+ */
2761
+ export class CreditsApi extends BaseAPI {
2762
+ /**
2763
+ * Manually adjust credits for an organization (admin only) - supports both positive and negative adjustments
2764
+ * @summary Manually adjust organization credits
2765
+ * @param {DataTypesManualCreditAdjustmentRequest} request Credit adjustment details
2766
+ * @param {*} [options] Override http request option.
2767
+ * @throws {RequiredError}
2768
+ * @memberof CreditsApi
2769
+ */
2770
+ apiCreditsAdminAdjustPost(request, options) {
2771
+ return CreditsApiFp(this.configuration).apiCreditsAdminAdjustPost(request, options).then((request) => request(this.axios, this.basePath));
2772
+ }
2773
+ /**
2774
+ * Get comprehensive credit balance including recent transactions, usage patterns, and expiry details
2775
+ * @summary Get detailed organization credit balance
2776
+ * @param {number} [limit] Number of recent transactions to include
2777
+ * @param {*} [options] Override http request option.
2778
+ * @throws {RequiredError}
2779
+ * @memberof CreditsApi
2780
+ */
2781
+ apiCreditsBalanceDetailedGet(limit, options) {
2782
+ return CreditsApiFp(this.configuration).apiCreditsBalanceDetailedGet(limit, options).then((request) => request(this.axios, this.basePath));
2783
+ }
2784
+ /**
2785
+ * Get current credit balance and summary for the authenticated user\'s organization
2786
+ * @summary Get organization credit balance
2787
+ * @param {*} [options] Override http request option.
2788
+ * @throws {RequiredError}
2789
+ * @memberof CreditsApi
2790
+ */
2791
+ apiCreditsBalanceGet(options) {
2792
+ return CreditsApiFp(this.configuration).apiCreditsBalanceGet(options).then((request) => request(this.axios, this.basePath));
2793
+ }
2794
+ /**
2795
+ * Get current credit balance for a specific store (legacy endpoint - use organization endpoints instead)
2796
+ * @summary Get store credit balance (legacy)
2797
+ * @param {number} storeId Store ID
2798
+ * @param {*} [options] Override http request option.
2799
+ * @deprecated
2800
+ * @throws {RequiredError}
2801
+ * @memberof CreditsApi
2802
+ */
2803
+ apiCreditsBalanceStoreStoreIdGet(storeId, options) {
2804
+ return CreditsApiFp(this.configuration).apiCreditsBalanceStoreStoreIdGet(storeId, options).then((request) => request(this.axios, this.basePath));
2805
+ }
2806
+ /**
2807
+ * Manually consume credits for testing or administrative purposes using FIFO logic
2808
+ * @summary Manually consume credits
2809
+ * @param {DataTypesManualConsumeCreditsRequest} request Manual consumption request
2810
+ * @param {*} [options] Override http request option.
2811
+ * @throws {RequiredError}
2812
+ * @memberof CreditsApi
2813
+ */
2814
+ apiCreditsConsumePost(request, options) {
2815
+ return CreditsApiFp(this.configuration).apiCreditsConsumePost(request, options).then((request) => request(this.axios, this.basePath));
2816
+ }
2817
+ /**
2818
+ * Get detailed history of credit consumption with FIFO breakdown and analytics
2819
+ * @summary Get FIFO consumption history
2820
+ * @param {number} [page] Page number
2821
+ * @param {number} [limit] Items per page
2822
+ * @param {string} [endpoint] Filter by API endpoint
2823
+ * @param {string} [startDate] Start date filter (RFC3339 format)
2824
+ * @param {string} [endDate] End date filter (RFC3339 format)
2825
+ * @param {*} [options] Override http request option.
2826
+ * @throws {RequiredError}
2827
+ * @memberof CreditsApi
2828
+ */
2829
+ apiCreditsConsumptionHistoryGet(page, limit, endpoint, startDate, endDate, options) {
2830
+ return CreditsApiFp(this.configuration).apiCreditsConsumptionHistoryGet(page, limit, endpoint, startDate, endDate, options).then((request) => request(this.axios, this.basePath));
2831
+ }
2832
+ /**
2833
+ * Get all active credit plans available for purchase with detailed pricing and features
2834
+ * @summary Get available credit plans
2835
+ * @param {*} [options] Override http request option.
2836
+ * @throws {RequiredError}
2837
+ * @memberof CreditsApi
2838
+ */
2839
+ apiCreditsPlansGet(options) {
2840
+ return CreditsApiFp(this.configuration).apiCreditsPlansGet(options).then((request) => request(this.axios, this.basePath));
2841
+ }
2842
+ /**
2843
+ * Purchase credits using a credit plan with payment processing
2844
+ * @summary Purchase credits
2845
+ * @param {DataTypesPurchaseCreditsRequest} request Purchase request with payment details
2846
+ * @param {*} [options] Override http request option.
2847
+ * @throws {RequiredError}
2848
+ * @memberof CreditsApi
2849
+ */
2850
+ apiCreditsPurchasePost(request, options) {
2851
+ return CreditsApiFp(this.configuration).apiCreditsPurchasePost(request, options).then((request) => request(this.axios, this.basePath));
2852
+ }
2853
+ /**
2854
+ * Get paginated credit transaction history for the authenticated organization
2855
+ * @summary Get organization credit transactions
2856
+ * @param {number} [page] Page number
2857
+ * @param {number} [limit] Items per page
2858
+ * @param {ApiCreditsTransactionsGetTypeEnum} [type] Filter by transaction type
2859
+ * @param {string} [startDate] Start date filter (RFC3339 format)
2860
+ * @param {string} [endDate] End date filter (RFC3339 format)
2861
+ * @param {*} [options] Override http request option.
2862
+ * @throws {RequiredError}
2863
+ * @memberof CreditsApi
2864
+ */
2865
+ apiCreditsTransactionsGet(page, limit, type, startDate, endDate, options) {
2866
+ return CreditsApiFp(this.configuration).apiCreditsTransactionsGet(page, limit, type, startDate, endDate, options).then((request) => request(this.axios, this.basePath));
2867
+ }
2868
+ }
2869
+ /**
2870
+ * @export
2871
+ */
2872
+ export const ApiCreditsTransactionsGetTypeEnum = {
2873
+ Purchase: 'purchase',
2874
+ Consume: 'consume',
2875
+ Refund: 'refund',
2876
+ Bonus: 'bonus',
2877
+ Expire: 'expire',
2878
+ Manual: 'manual'
2879
+ };
1905
2880
  /**
1906
2881
  * LimitsApi - axios parameter creator
1907
2882
  * @export