qanswer-sdk 3.1649.0-main → 3.1650.0-main

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
@@ -19366,6 +19366,12 @@ export interface User {
19366
19366
  * @memberof User
19367
19367
  */
19368
19368
  'dataPackage'?: number;
19369
+ /**
19370
+ *
19371
+ * @type {number}
19372
+ * @memberof User
19373
+ */
19374
+ 'rateLimitBucket'?: number;
19369
19375
  /**
19370
19376
  *
19371
19377
  * @type {string}
@@ -19576,6 +19582,12 @@ export interface User {
19576
19582
  * @memberof User
19577
19583
  */
19578
19584
  'selectedOrgId'?: number;
19585
+ /**
19586
+ *
19587
+ * @type {number}
19588
+ * @memberof User
19589
+ */
19590
+ 'rateLimitBucketForUser'?: number;
19579
19591
  }
19580
19592
 
19581
19593
  export const UserPricingPlanEnum = {
@@ -20624,6 +20636,12 @@ export interface UserProfileDto {
20624
20636
  * @memberof UserProfileDto
20625
20637
  */
20626
20638
  'quotaDatasetSpaceMbUsed'?: number;
20639
+ /**
20640
+ *
20641
+ * @type {number}
20642
+ * @memberof UserProfileDto
20643
+ */
20644
+ 'rateLimitBucket'?: number;
20627
20645
  /**
20628
20646
  *
20629
20647
  * @type {string}
@@ -21743,6 +21761,99 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration
21743
21761
 
21744
21762
 
21745
21763
 
21764
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
21765
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
21766
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
21767
+
21768
+ return {
21769
+ url: toPathString(localVarUrlObj),
21770
+ options: localVarRequestOptions,
21771
+ };
21772
+ },
21773
+ /**
21774
+ *
21775
+ * @summary Get the rate limit for a user
21776
+ * @param {string} username
21777
+ * @param {*} [options] Override http request option.
21778
+ * @throws {RequiredError}
21779
+ */
21780
+ getRateLimit: async (username: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
21781
+ // verify required parameter 'username' is not null or undefined
21782
+ assertParamExists('getRateLimit', 'username', username)
21783
+ const localVarPath = `/api/admin/rate-limit`;
21784
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
21785
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
21786
+ let baseOptions;
21787
+ if (configuration) {
21788
+ baseOptions = configuration.baseOptions;
21789
+ }
21790
+
21791
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
21792
+ const localVarHeaderParameter = {} as any;
21793
+ const localVarQueryParameter = {} as any;
21794
+
21795
+ // authentication QAnswer-Api-Key required
21796
+ await setApiKeyToObject(localVarHeaderParameter, "QAnswer-Api-Key", configuration)
21797
+
21798
+ // authentication Bearer required
21799
+ // http bearer authentication required
21800
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
21801
+
21802
+ if (username !== undefined) {
21803
+ localVarQueryParameter['username'] = username;
21804
+ }
21805
+
21806
+
21807
+
21808
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
21809
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
21810
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
21811
+
21812
+ return {
21813
+ url: toPathString(localVarUrlObj),
21814
+ options: localVarRequestOptions,
21815
+ };
21816
+ },
21817
+ /**
21818
+ *
21819
+ * @summary Get the rate limit for a user
21820
+ * @param {string} username
21821
+ * @param {number} [rateLimit]
21822
+ * @param {*} [options] Override http request option.
21823
+ * @throws {RequiredError}
21824
+ */
21825
+ getRateLimit1: async (username: string, rateLimit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
21826
+ // verify required parameter 'username' is not null or undefined
21827
+ assertParamExists('getRateLimit1', 'username', username)
21828
+ const localVarPath = `/api/admin/rate-limit`;
21829
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
21830
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
21831
+ let baseOptions;
21832
+ if (configuration) {
21833
+ baseOptions = configuration.baseOptions;
21834
+ }
21835
+
21836
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
21837
+ const localVarHeaderParameter = {} as any;
21838
+ const localVarQueryParameter = {} as any;
21839
+
21840
+ // authentication QAnswer-Api-Key required
21841
+ await setApiKeyToObject(localVarHeaderParameter, "QAnswer-Api-Key", configuration)
21842
+
21843
+ // authentication Bearer required
21844
+ // http bearer authentication required
21845
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
21846
+
21847
+ if (username !== undefined) {
21848
+ localVarQueryParameter['username'] = username;
21849
+ }
21850
+
21851
+ if (rateLimit !== undefined) {
21852
+ localVarQueryParameter['rateLimit'] = rateLimit;
21853
+ }
21854
+
21855
+
21856
+
21746
21857
  setSearchParams(localVarUrlObj, localVarQueryParameter);
21747
21858
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
21748
21859
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -22345,6 +22456,33 @@ export const AdminApiFp = function(configuration?: Configuration) {
22345
22456
  const localVarOperationServerBasePath = operationServerMap['AdminApi.getGlobalCredits']?.[localVarOperationServerIndex]?.url;
22346
22457
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
22347
22458
  },
22459
+ /**
22460
+ *
22461
+ * @summary Get the rate limit for a user
22462
+ * @param {string} username
22463
+ * @param {*} [options] Override http request option.
22464
+ * @throws {RequiredError}
22465
+ */
22466
+ async getRateLimit(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<number>> {
22467
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getRateLimit(username, options);
22468
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
22469
+ const localVarOperationServerBasePath = operationServerMap['AdminApi.getRateLimit']?.[localVarOperationServerIndex]?.url;
22470
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
22471
+ },
22472
+ /**
22473
+ *
22474
+ * @summary Get the rate limit for a user
22475
+ * @param {string} username
22476
+ * @param {number} [rateLimit]
22477
+ * @param {*} [options] Override http request option.
22478
+ * @throws {RequiredError}
22479
+ */
22480
+ async getRateLimit1(username: string, rateLimit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
22481
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getRateLimit1(username, rateLimit, options);
22482
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
22483
+ const localVarOperationServerBasePath = operationServerMap['AdminApi.getRateLimit1']?.[localVarOperationServerIndex]?.url;
22484
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
22485
+ },
22348
22486
  /**
22349
22487
  *
22350
22488
  * @summary Get the conversation statistics of all users/datasets over time
@@ -22603,6 +22741,26 @@ export const AdminApiFactory = function (configuration?: Configuration, basePath
22603
22741
  getGlobalCredits(options?: RawAxiosRequestConfig): AxiosPromise<CreditsInfoGlobalDto> {
22604
22742
  return localVarFp.getGlobalCredits(options).then((request) => request(axios, basePath));
22605
22743
  },
22744
+ /**
22745
+ *
22746
+ * @summary Get the rate limit for a user
22747
+ * @param {AdminApiGetRateLimitRequest} requestParameters Request parameters.
22748
+ * @param {*} [options] Override http request option.
22749
+ * @throws {RequiredError}
22750
+ */
22751
+ getRateLimit(requestParameters: AdminApiGetRateLimitRequest, options?: RawAxiosRequestConfig): AxiosPromise<number> {
22752
+ return localVarFp.getRateLimit(requestParameters.username, options).then((request) => request(axios, basePath));
22753
+ },
22754
+ /**
22755
+ *
22756
+ * @summary Get the rate limit for a user
22757
+ * @param {AdminApiGetRateLimit1Request} requestParameters Request parameters.
22758
+ * @param {*} [options] Override http request option.
22759
+ * @throws {RequiredError}
22760
+ */
22761
+ getRateLimit1(requestParameters: AdminApiGetRateLimit1Request, options?: RawAxiosRequestConfig): AxiosPromise<void> {
22762
+ return localVarFp.getRateLimit1(requestParameters.username, requestParameters.rateLimit, options).then((request) => request(axios, basePath));
22763
+ },
22606
22764
  /**
22607
22765
  *
22608
22766
  * @summary Get the conversation statistics of all users/datasets over time
@@ -22942,6 +23100,41 @@ export interface AdminApiGetAiAssistantRequest {
22942
23100
  readonly aiAssistantId: number
22943
23101
  }
22944
23102
 
23103
+ /**
23104
+ * Request parameters for getRateLimit operation in AdminApi.
23105
+ * @export
23106
+ * @interface AdminApiGetRateLimitRequest
23107
+ */
23108
+ export interface AdminApiGetRateLimitRequest {
23109
+ /**
23110
+ *
23111
+ * @type {string}
23112
+ * @memberof AdminApiGetRateLimit
23113
+ */
23114
+ readonly username: string
23115
+ }
23116
+
23117
+ /**
23118
+ * Request parameters for getRateLimit1 operation in AdminApi.
23119
+ * @export
23120
+ * @interface AdminApiGetRateLimit1Request
23121
+ */
23122
+ export interface AdminApiGetRateLimit1Request {
23123
+ /**
23124
+ *
23125
+ * @type {string}
23126
+ * @memberof AdminApiGetRateLimit1
23127
+ */
23128
+ readonly username: string
23129
+
23130
+ /**
23131
+ *
23132
+ * @type {number}
23133
+ * @memberof AdminApiGetRateLimit1
23134
+ */
23135
+ readonly rateLimit?: number
23136
+ }
23137
+
22945
23138
  /**
22946
23139
  * Request parameters for getStatisticsOfConversationOverTime operation in AdminApi.
22947
23140
  * @export
@@ -23205,6 +23398,30 @@ export class AdminApi extends BaseAPI {
23205
23398
  return AdminApiFp(this.configuration).getGlobalCredits(options).then((request) => request(this.axios, this.basePath));
23206
23399
  }
23207
23400
 
23401
+ /**
23402
+ *
23403
+ * @summary Get the rate limit for a user
23404
+ * @param {AdminApiGetRateLimitRequest} requestParameters Request parameters.
23405
+ * @param {*} [options] Override http request option.
23406
+ * @throws {RequiredError}
23407
+ * @memberof AdminApi
23408
+ */
23409
+ public getRateLimit(requestParameters: AdminApiGetRateLimitRequest, options?: RawAxiosRequestConfig) {
23410
+ return AdminApiFp(this.configuration).getRateLimit(requestParameters.username, options).then((request) => request(this.axios, this.basePath));
23411
+ }
23412
+
23413
+ /**
23414
+ *
23415
+ * @summary Get the rate limit for a user
23416
+ * @param {AdminApiGetRateLimit1Request} requestParameters Request parameters.
23417
+ * @param {*} [options] Override http request option.
23418
+ * @throws {RequiredError}
23419
+ * @memberof AdminApi
23420
+ */
23421
+ public getRateLimit1(requestParameters: AdminApiGetRateLimit1Request, options?: RawAxiosRequestConfig) {
23422
+ return AdminApiFp(this.configuration).getRateLimit1(requestParameters.username, requestParameters.rateLimit, options).then((request) => request(this.axios, this.basePath));
23423
+ }
23424
+
23208
23425
  /**
23209
23426
  *
23210
23427
  * @summary Get the conversation statistics of all users/datasets over time
package/dist/api.d.ts CHANGED
@@ -19134,6 +19134,12 @@ export interface User {
19134
19134
  * @memberof User
19135
19135
  */
19136
19136
  'dataPackage'?: number;
19137
+ /**
19138
+ *
19139
+ * @type {number}
19140
+ * @memberof User
19141
+ */
19142
+ 'rateLimitBucket'?: number;
19137
19143
  /**
19138
19144
  *
19139
19145
  * @type {string}
@@ -19344,6 +19350,12 @@ export interface User {
19344
19350
  * @memberof User
19345
19351
  */
19346
19352
  'selectedOrgId'?: number;
19353
+ /**
19354
+ *
19355
+ * @type {number}
19356
+ * @memberof User
19357
+ */
19358
+ 'rateLimitBucketForUser'?: number;
19347
19359
  }
19348
19360
  export declare const UserPricingPlanEnum: {
19349
19361
  readonly NotLogged: "NOT_LOGGED";
@@ -20379,6 +20391,12 @@ export interface UserProfileDto {
20379
20391
  * @memberof UserProfileDto
20380
20392
  */
20381
20393
  'quotaDatasetSpaceMbUsed'?: number;
20394
+ /**
20395
+ *
20396
+ * @type {number}
20397
+ * @memberof UserProfileDto
20398
+ */
20399
+ 'rateLimitBucket'?: number;
20382
20400
  /**
20383
20401
  *
20384
20402
  * @type {string}
@@ -21017,6 +21035,23 @@ export declare const AdminApiAxiosParamCreator: (configuration?: Configuration)
21017
21035
  * @throws {RequiredError}
21018
21036
  */
21019
21037
  getGlobalCredits: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
21038
+ /**
21039
+ *
21040
+ * @summary Get the rate limit for a user
21041
+ * @param {string} username
21042
+ * @param {*} [options] Override http request option.
21043
+ * @throws {RequiredError}
21044
+ */
21045
+ getRateLimit: (username: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
21046
+ /**
21047
+ *
21048
+ * @summary Get the rate limit for a user
21049
+ * @param {string} username
21050
+ * @param {number} [rateLimit]
21051
+ * @param {*} [options] Override http request option.
21052
+ * @throws {RequiredError}
21053
+ */
21054
+ getRateLimit1: (username: string, rateLimit?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
21020
21055
  /**
21021
21056
  *
21022
21057
  * @summary Get the conversation statistics of all users/datasets over time
@@ -21209,6 +21244,23 @@ export declare const AdminApiFp: (configuration?: Configuration) => {
21209
21244
  * @throws {RequiredError}
21210
21245
  */
21211
21246
  getGlobalCredits(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditsInfoGlobalDto>>;
21247
+ /**
21248
+ *
21249
+ * @summary Get the rate limit for a user
21250
+ * @param {string} username
21251
+ * @param {*} [options] Override http request option.
21252
+ * @throws {RequiredError}
21253
+ */
21254
+ getRateLimit(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<number>>;
21255
+ /**
21256
+ *
21257
+ * @summary Get the rate limit for a user
21258
+ * @param {string} username
21259
+ * @param {number} [rateLimit]
21260
+ * @param {*} [options] Override http request option.
21261
+ * @throws {RequiredError}
21262
+ */
21263
+ getRateLimit1(username: string, rateLimit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
21212
21264
  /**
21213
21265
  *
21214
21266
  * @summary Get the conversation statistics of all users/datasets over time
@@ -21389,6 +21441,22 @@ export declare const AdminApiFactory: (configuration?: Configuration, basePath?:
21389
21441
  * @throws {RequiredError}
21390
21442
  */
21391
21443
  getGlobalCredits(options?: RawAxiosRequestConfig): AxiosPromise<CreditsInfoGlobalDto>;
21444
+ /**
21445
+ *
21446
+ * @summary Get the rate limit for a user
21447
+ * @param {AdminApiGetRateLimitRequest} requestParameters Request parameters.
21448
+ * @param {*} [options] Override http request option.
21449
+ * @throws {RequiredError}
21450
+ */
21451
+ getRateLimit(requestParameters: AdminApiGetRateLimitRequest, options?: RawAxiosRequestConfig): AxiosPromise<number>;
21452
+ /**
21453
+ *
21454
+ * @summary Get the rate limit for a user
21455
+ * @param {AdminApiGetRateLimit1Request} requestParameters Request parameters.
21456
+ * @param {*} [options] Override http request option.
21457
+ * @throws {RequiredError}
21458
+ */
21459
+ getRateLimit1(requestParameters: AdminApiGetRateLimit1Request, options?: RawAxiosRequestConfig): AxiosPromise<void>;
21392
21460
  /**
21393
21461
  *
21394
21462
  * @summary Get the conversation statistics of all users/datasets over time
@@ -21683,6 +21751,38 @@ export interface AdminApiGetAiAssistantRequest {
21683
21751
  */
21684
21752
  readonly aiAssistantId: number;
21685
21753
  }
21754
+ /**
21755
+ * Request parameters for getRateLimit operation in AdminApi.
21756
+ * @export
21757
+ * @interface AdminApiGetRateLimitRequest
21758
+ */
21759
+ export interface AdminApiGetRateLimitRequest {
21760
+ /**
21761
+ *
21762
+ * @type {string}
21763
+ * @memberof AdminApiGetRateLimit
21764
+ */
21765
+ readonly username: string;
21766
+ }
21767
+ /**
21768
+ * Request parameters for getRateLimit1 operation in AdminApi.
21769
+ * @export
21770
+ * @interface AdminApiGetRateLimit1Request
21771
+ */
21772
+ export interface AdminApiGetRateLimit1Request {
21773
+ /**
21774
+ *
21775
+ * @type {string}
21776
+ * @memberof AdminApiGetRateLimit1
21777
+ */
21778
+ readonly username: string;
21779
+ /**
21780
+ *
21781
+ * @type {number}
21782
+ * @memberof AdminApiGetRateLimit1
21783
+ */
21784
+ readonly rateLimit?: number;
21785
+ }
21686
21786
  /**
21687
21787
  * Request parameters for getStatisticsOfConversationOverTime operation in AdminApi.
21688
21788
  * @export
@@ -21902,6 +22002,24 @@ export declare class AdminApi extends BaseAPI {
21902
22002
  * @memberof AdminApi
21903
22003
  */
21904
22004
  getGlobalCredits(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CreditsInfoGlobalDto, any, {}>>;
22005
+ /**
22006
+ *
22007
+ * @summary Get the rate limit for a user
22008
+ * @param {AdminApiGetRateLimitRequest} requestParameters Request parameters.
22009
+ * @param {*} [options] Override http request option.
22010
+ * @throws {RequiredError}
22011
+ * @memberof AdminApi
22012
+ */
22013
+ getRateLimit(requestParameters: AdminApiGetRateLimitRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<number, any, {}>>;
22014
+ /**
22015
+ *
22016
+ * @summary Get the rate limit for a user
22017
+ * @param {AdminApiGetRateLimit1Request} requestParameters Request parameters.
22018
+ * @param {*} [options] Override http request option.
22019
+ * @throws {RequiredError}
22020
+ * @memberof AdminApi
22021
+ */
22022
+ getRateLimit1(requestParameters: AdminApiGetRateLimit1Request, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
21905
22023
  /**
21906
22024
  *
21907
22025
  * @summary Get the conversation statistics of all users/datasets over time
package/dist/api.js CHANGED
@@ -1914,6 +1914,124 @@ var AdminApiAxiosParamCreator = function (configuration) {
1914
1914
  });
1915
1915
  });
1916
1916
  },
1917
+ /**
1918
+ *
1919
+ * @summary Get the rate limit for a user
1920
+ * @param {string} username
1921
+ * @param {*} [options] Override http request option.
1922
+ * @throws {RequiredError}
1923
+ */
1924
+ getRateLimit: function (username_1) {
1925
+ var args_1 = [];
1926
+ for (var _i = 1; _i < arguments.length; _i++) {
1927
+ args_1[_i - 1] = arguments[_i];
1928
+ }
1929
+ return __awaiter(_this, __spreadArray([username_1], args_1, true), void 0, function (username, options) {
1930
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1931
+ if (options === void 0) { options = {}; }
1932
+ return __generator(this, function (_a) {
1933
+ switch (_a.label) {
1934
+ case 0:
1935
+ // verify required parameter 'username' is not null or undefined
1936
+ (0, common_1.assertParamExists)('getRateLimit', 'username', username);
1937
+ localVarPath = "/api/admin/rate-limit";
1938
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1939
+ if (configuration) {
1940
+ baseOptions = configuration.baseOptions;
1941
+ }
1942
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1943
+ localVarHeaderParameter = {};
1944
+ localVarQueryParameter = {};
1945
+ // authentication QAnswer-Api-Key required
1946
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "QAnswer-Api-Key", configuration)
1947
+ // authentication Bearer required
1948
+ // http bearer authentication required
1949
+ ];
1950
+ case 1:
1951
+ // authentication QAnswer-Api-Key required
1952
+ _a.sent();
1953
+ // authentication Bearer required
1954
+ // http bearer authentication required
1955
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1956
+ case 2:
1957
+ // authentication Bearer required
1958
+ // http bearer authentication required
1959
+ _a.sent();
1960
+ if (username !== undefined) {
1961
+ localVarQueryParameter['username'] = username;
1962
+ }
1963
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1964
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1965
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1966
+ return [2 /*return*/, {
1967
+ url: (0, common_1.toPathString)(localVarUrlObj),
1968
+ options: localVarRequestOptions,
1969
+ }];
1970
+ }
1971
+ });
1972
+ });
1973
+ },
1974
+ /**
1975
+ *
1976
+ * @summary Get the rate limit for a user
1977
+ * @param {string} username
1978
+ * @param {number} [rateLimit]
1979
+ * @param {*} [options] Override http request option.
1980
+ * @throws {RequiredError}
1981
+ */
1982
+ getRateLimit1: function (username_1, rateLimit_1) {
1983
+ var args_1 = [];
1984
+ for (var _i = 2; _i < arguments.length; _i++) {
1985
+ args_1[_i - 2] = arguments[_i];
1986
+ }
1987
+ return __awaiter(_this, __spreadArray([username_1, rateLimit_1], args_1, true), void 0, function (username, rateLimit, options) {
1988
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1989
+ if (options === void 0) { options = {}; }
1990
+ return __generator(this, function (_a) {
1991
+ switch (_a.label) {
1992
+ case 0:
1993
+ // verify required parameter 'username' is not null or undefined
1994
+ (0, common_1.assertParamExists)('getRateLimit1', 'username', username);
1995
+ localVarPath = "/api/admin/rate-limit";
1996
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1997
+ if (configuration) {
1998
+ baseOptions = configuration.baseOptions;
1999
+ }
2000
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
2001
+ localVarHeaderParameter = {};
2002
+ localVarQueryParameter = {};
2003
+ // authentication QAnswer-Api-Key required
2004
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "QAnswer-Api-Key", configuration)
2005
+ // authentication Bearer required
2006
+ // http bearer authentication required
2007
+ ];
2008
+ case 1:
2009
+ // authentication QAnswer-Api-Key required
2010
+ _a.sent();
2011
+ // authentication Bearer required
2012
+ // http bearer authentication required
2013
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
2014
+ case 2:
2015
+ // authentication Bearer required
2016
+ // http bearer authentication required
2017
+ _a.sent();
2018
+ if (username !== undefined) {
2019
+ localVarQueryParameter['username'] = username;
2020
+ }
2021
+ if (rateLimit !== undefined) {
2022
+ localVarQueryParameter['rateLimit'] = rateLimit;
2023
+ }
2024
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2025
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2026
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2027
+ return [2 /*return*/, {
2028
+ url: (0, common_1.toPathString)(localVarUrlObj),
2029
+ options: localVarRequestOptions,
2030
+ }];
2031
+ }
2032
+ });
2033
+ });
2034
+ },
1917
2035
  /**
1918
2036
  *
1919
2037
  * @summary Get the conversation statistics of all users/datasets over time
@@ -2759,6 +2877,53 @@ var AdminApiFp = function (configuration) {
2759
2877
  });
2760
2878
  });
2761
2879
  },
2880
+ /**
2881
+ *
2882
+ * @summary Get the rate limit for a user
2883
+ * @param {string} username
2884
+ * @param {*} [options] Override http request option.
2885
+ * @throws {RequiredError}
2886
+ */
2887
+ getRateLimit: function (username, options) {
2888
+ return __awaiter(this, void 0, void 0, function () {
2889
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
2890
+ var _a, _b, _c;
2891
+ return __generator(this, function (_d) {
2892
+ switch (_d.label) {
2893
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getRateLimit(username, options)];
2894
+ case 1:
2895
+ localVarAxiosArgs = _d.sent();
2896
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2897
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdminApi.getRateLimit']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2898
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
2899
+ }
2900
+ });
2901
+ });
2902
+ },
2903
+ /**
2904
+ *
2905
+ * @summary Get the rate limit for a user
2906
+ * @param {string} username
2907
+ * @param {number} [rateLimit]
2908
+ * @param {*} [options] Override http request option.
2909
+ * @throws {RequiredError}
2910
+ */
2911
+ getRateLimit1: function (username, rateLimit, options) {
2912
+ return __awaiter(this, void 0, void 0, function () {
2913
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
2914
+ var _a, _b, _c;
2915
+ return __generator(this, function (_d) {
2916
+ switch (_d.label) {
2917
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getRateLimit1(username, rateLimit, options)];
2918
+ case 1:
2919
+ localVarAxiosArgs = _d.sent();
2920
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2921
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdminApi.getRateLimit1']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2922
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
2923
+ }
2924
+ });
2925
+ });
2926
+ },
2762
2927
  /**
2763
2928
  *
2764
2929
  * @summary Get the conversation statistics of all users/datasets over time
@@ -3117,6 +3282,26 @@ var AdminApiFactory = function (configuration, basePath, axios) {
3117
3282
  getGlobalCredits: function (options) {
3118
3283
  return localVarFp.getGlobalCredits(options).then(function (request) { return request(axios, basePath); });
3119
3284
  },
3285
+ /**
3286
+ *
3287
+ * @summary Get the rate limit for a user
3288
+ * @param {AdminApiGetRateLimitRequest} requestParameters Request parameters.
3289
+ * @param {*} [options] Override http request option.
3290
+ * @throws {RequiredError}
3291
+ */
3292
+ getRateLimit: function (requestParameters, options) {
3293
+ return localVarFp.getRateLimit(requestParameters.username, options).then(function (request) { return request(axios, basePath); });
3294
+ },
3295
+ /**
3296
+ *
3297
+ * @summary Get the rate limit for a user
3298
+ * @param {AdminApiGetRateLimit1Request} requestParameters Request parameters.
3299
+ * @param {*} [options] Override http request option.
3300
+ * @throws {RequiredError}
3301
+ */
3302
+ getRateLimit1: function (requestParameters, options) {
3303
+ return localVarFp.getRateLimit1(requestParameters.username, requestParameters.rateLimit, options).then(function (request) { return request(axios, basePath); });
3304
+ },
3120
3305
  /**
3121
3306
  *
3122
3307
  * @summary Get the conversation statistics of all users/datasets over time
@@ -3378,6 +3563,30 @@ var AdminApi = /** @class */ (function (_super) {
3378
3563
  var _this = this;
3379
3564
  return (0, exports.AdminApiFp)(this.configuration).getGlobalCredits(options).then(function (request) { return request(_this.axios, _this.basePath); });
3380
3565
  };
3566
+ /**
3567
+ *
3568
+ * @summary Get the rate limit for a user
3569
+ * @param {AdminApiGetRateLimitRequest} requestParameters Request parameters.
3570
+ * @param {*} [options] Override http request option.
3571
+ * @throws {RequiredError}
3572
+ * @memberof AdminApi
3573
+ */
3574
+ AdminApi.prototype.getRateLimit = function (requestParameters, options) {
3575
+ var _this = this;
3576
+ return (0, exports.AdminApiFp)(this.configuration).getRateLimit(requestParameters.username, options).then(function (request) { return request(_this.axios, _this.basePath); });
3577
+ };
3578
+ /**
3579
+ *
3580
+ * @summary Get the rate limit for a user
3581
+ * @param {AdminApiGetRateLimit1Request} requestParameters Request parameters.
3582
+ * @param {*} [options] Override http request option.
3583
+ * @throws {RequiredError}
3584
+ * @memberof AdminApi
3585
+ */
3586
+ AdminApi.prototype.getRateLimit1 = function (requestParameters, options) {
3587
+ var _this = this;
3588
+ return (0, exports.AdminApiFp)(this.configuration).getRateLimit1(requestParameters.username, requestParameters.rateLimit, options).then(function (request) { return request(_this.axios, _this.basePath); });
3589
+ };
3381
3590
  /**
3382
3591
  *
3383
3592
  * @summary Get the conversation statistics of all users/datasets over time
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qanswer-sdk",
3
- "version": "3.1649.0-main",
3
+ "version": "3.1650.0-main",
4
4
  "description": "OpenAPI client for qanswer-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {
Binary file
Binary file