@breign/client 1.0.159 → 1.0.161

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.
Files changed (34) hide show
  1. package/dist/apis/AiGatewayApi.d.ts +28 -1
  2. package/dist/apis/AiGatewayApi.js +63 -0
  3. package/dist/apis/PromptsApi.d.ts +41 -1
  4. package/dist/apis/PromptsApi.js +92 -0
  5. package/dist/models/AgentRateLimitSettingsUio.d.ts +80 -0
  6. package/dist/models/AgentRateLimitSettingsUio.js +80 -0
  7. package/dist/models/AgentRateLimitSettingsUpdateRequestUio.d.ts +50 -0
  8. package/dist/models/AgentRateLimitSettingsUpdateRequestUio.js +54 -0
  9. package/dist/models/AiGatewayModelTokenQuotaUio.d.ts +64 -0
  10. package/dist/models/AiGatewayModelTokenQuotaUio.js +72 -0
  11. package/dist/models/AiGatewaySettingsUio.d.ts +57 -0
  12. package/dist/models/AiGatewaySettingsUio.js +65 -0
  13. package/dist/models/AiGatewaySettingsUpdateRequestUio.d.ts +39 -0
  14. package/dist/models/AiGatewaySettingsUpdateRequestUio.js +51 -0
  15. package/dist/models/ChunkContentCreateUio.d.ts +16 -1
  16. package/dist/models/ChunkContentCreateUio.js +9 -0
  17. package/dist/models/FileAttachmentUploadResponseUio.d.ts +16 -1
  18. package/dist/models/FileAttachmentUploadResponseUio.js +9 -0
  19. package/dist/models/FileCreationResponseUio.d.ts +17 -2
  20. package/dist/models/FileCreationResponseUio.js +9 -0
  21. package/dist/models/ImageAttachmentUploadResponseUio.d.ts +16 -1
  22. package/dist/models/ImageAttachmentUploadResponseUio.js +9 -0
  23. package/dist/models/PromptRateLimitResponseUio.d.ts +50 -0
  24. package/dist/models/PromptRateLimitResponseUio.js +62 -0
  25. package/dist/models/S3UploadBodyUio.d.ts +17 -2
  26. package/dist/models/S3UploadBodyUio.js +9 -0
  27. package/dist/models/UploadImageToKnowledgeBaseLibrary200ResponseUio.d.ts +3 -4
  28. package/dist/models/UploadImageToKnowledgeBaseLibrary200ResponseUio.js +3 -2
  29. package/dist/models/UploadMethodUio.d.ts +25 -0
  30. package/dist/models/UploadMethodUio.js +51 -0
  31. package/dist/models/index.d.ts +7 -0
  32. package/dist/models/index.js +7 -0
  33. package/dist/openapi.json +418 -3
  34. package/package.json +1 -1
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AiGatewayChatCompletionRequestUio, AiGatewayChatCompletionResponseUio, AiGatewayEmbeddingRequestUio, AiGatewayEmbeddingResponseUio, AiGatewayModelListUio, AiGatewayModelUio, AiGatewayUsageUio, AiGatewayV1CreditsUio, AiGatewayV1GenerationUio, AiGatewayV1ModelEndpointsUio, AiGatewayV1ModelListUio, AiGatewayV1ReportUio, OpenAiChatCompletionRequestUio, OpenAiChatCompletionResponseUio } from '../models/index';
13
+ import type { AiGatewayChatCompletionRequestUio, AiGatewayChatCompletionResponseUio, AiGatewayEmbeddingRequestUio, AiGatewayEmbeddingResponseUio, AiGatewayModelListUio, AiGatewayModelUio, AiGatewaySettingsUio, AiGatewaySettingsUpdateRequestUio, AiGatewayUsageUio, AiGatewayV1CreditsUio, AiGatewayV1GenerationUio, AiGatewayV1ModelEndpointsUio, AiGatewayV1ModelListUio, AiGatewayV1ReportUio, OpenAiChatCompletionRequestUio, OpenAiChatCompletionResponseUio } from '../models/index';
14
14
  export interface CreateAiGatewayChatCompletionRequest {
15
15
  organizationId: string;
16
16
  aiGatewayChatCompletionRequestUio: AiGatewayChatCompletionRequestUio;
@@ -36,6 +36,9 @@ export interface GetAiGatewayModelRequest {
36
36
  organizationId: string;
37
37
  model: string;
38
38
  }
39
+ export interface GetAiGatewaySettingsRequest {
40
+ organizationId: string;
41
+ }
39
42
  export interface GetAiGatewayV1CreditsRequest {
40
43
  organizationId: string;
41
44
  }
@@ -66,6 +69,10 @@ export interface ListAiGatewayModelsRequest {
66
69
  export interface ListAiGatewayV1ModelsRequest {
67
70
  organizationId: string;
68
71
  }
72
+ export interface UpdateAiGatewaySettingsRequest {
73
+ organizationId: string;
74
+ aiGatewaySettingsUpdateRequestUio: AiGatewaySettingsUpdateRequestUio;
75
+ }
69
76
  /**
70
77
  *
71
78
  */
@@ -130,6 +137,16 @@ export declare class AiGatewayApi extends runtime.BaseAPI {
130
137
  * Get a model available through the AI gateway
131
138
  */
132
139
  getAiGatewayModel(organizationId: string, model: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AiGatewayModelUio>;
140
+ /**
141
+ * Organization admin settings for gateway RPM and per-model token quotas.
142
+ * Get AI Gateway limits settings
143
+ */
144
+ getAiGatewaySettingsRaw(requestParameters: GetAiGatewaySettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AiGatewaySettingsUio>>;
145
+ /**
146
+ * Organization admin settings for gateway RPM and per-model token quotas.
147
+ * Get AI Gateway limits settings
148
+ */
149
+ getAiGatewaySettings(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AiGatewaySettingsUio>;
133
150
  /**
134
151
  * Équivalent de `GET /v1/credits`. `total_used` est la dépense cumulée de l\'organisation, calculée depuis la configuration de prix. `balance` est toujours null : Breign n\'a pas de notion de crédits prépayés.
135
152
  * Check credit balance (AI Gateway REST API)
@@ -190,6 +207,16 @@ export declare class AiGatewayApi extends runtime.BaseAPI {
190
207
  * List models (AI Gateway REST API)
191
208
  */
192
209
  listAiGatewayV1Models(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AiGatewayV1ModelListUio>;
210
+ /**
211
+ * Organization admin can set gateway RPM and per-model token quotas.
212
+ * Update AI Gateway limits settings
213
+ */
214
+ updateAiGatewaySettingsRaw(requestParameters: UpdateAiGatewaySettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AiGatewaySettingsUio>>;
215
+ /**
216
+ * Organization admin can set gateway RPM and per-model token quotas.
217
+ * Update AI Gateway limits settings
218
+ */
219
+ updateAiGatewaySettings(organizationId: string, aiGatewaySettingsUpdateRequestUio: AiGatewaySettingsUpdateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AiGatewaySettingsUio>;
193
220
  }
194
221
  /**
195
222
  * @export
@@ -253,6 +253,35 @@ class AiGatewayApi extends runtime.BaseAPI {
253
253
  const response = await this.getAiGatewayModelRaw({ organizationId: organizationId, model: model }, initOverrides);
254
254
  return await response.value();
255
255
  }
256
+ /**
257
+ * Organization admin settings for gateway RPM and per-model token quotas.
258
+ * Get AI Gateway limits settings
259
+ */
260
+ async getAiGatewaySettingsRaw(requestParameters, initOverrides) {
261
+ if (requestParameters['organizationId'] == null) {
262
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getAiGatewaySettings().');
263
+ }
264
+ const queryParameters = {};
265
+ const headerParameters = {};
266
+ if (this.configuration && this.configuration.apiKey) {
267
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
268
+ }
269
+ const response = await this.request({
270
+ path: `/organizations/{organizationId}/ai-gateway/settings`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
271
+ method: 'GET',
272
+ headers: headerParameters,
273
+ query: queryParameters,
274
+ }, initOverrides);
275
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AiGatewaySettingsUioFromJSON)(jsonValue));
276
+ }
277
+ /**
278
+ * Organization admin settings for gateway RPM and per-model token quotas.
279
+ * Get AI Gateway limits settings
280
+ */
281
+ async getAiGatewaySettings(organizationId, initOverrides) {
282
+ const response = await this.getAiGatewaySettingsRaw({ organizationId: organizationId }, initOverrides);
283
+ return await response.value();
284
+ }
256
285
  /**
257
286
  * Équivalent de `GET /v1/credits`. `total_used` est la dépense cumulée de l\'organisation, calculée depuis la configuration de prix. `balance` est toujours null : Breign n\'a pas de notion de crédits prépayés.
258
287
  * Check credit balance (AI Gateway REST API)
@@ -472,6 +501,40 @@ class AiGatewayApi extends runtime.BaseAPI {
472
501
  const response = await this.listAiGatewayV1ModelsRaw({ organizationId: organizationId }, initOverrides);
473
502
  return await response.value();
474
503
  }
504
+ /**
505
+ * Organization admin can set gateway RPM and per-model token quotas.
506
+ * Update AI Gateway limits settings
507
+ */
508
+ async updateAiGatewaySettingsRaw(requestParameters, initOverrides) {
509
+ if (requestParameters['organizationId'] == null) {
510
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling updateAiGatewaySettings().');
511
+ }
512
+ if (requestParameters['aiGatewaySettingsUpdateRequestUio'] == null) {
513
+ throw new runtime.RequiredError('aiGatewaySettingsUpdateRequestUio', 'Required parameter "aiGatewaySettingsUpdateRequestUio" was null or undefined when calling updateAiGatewaySettings().');
514
+ }
515
+ const queryParameters = {};
516
+ const headerParameters = {};
517
+ headerParameters['Content-Type'] = 'application/json';
518
+ if (this.configuration && this.configuration.apiKey) {
519
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
520
+ }
521
+ const response = await this.request({
522
+ path: `/organizations/{organizationId}/ai-gateway/settings`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
523
+ method: 'PUT',
524
+ headers: headerParameters,
525
+ query: queryParameters,
526
+ body: (0, index_1.AiGatewaySettingsUpdateRequestUioToJSON)(requestParameters['aiGatewaySettingsUpdateRequestUio']),
527
+ }, initOverrides);
528
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AiGatewaySettingsUioFromJSON)(jsonValue));
529
+ }
530
+ /**
531
+ * Organization admin can set gateway RPM and per-model token quotas.
532
+ * Update AI Gateway limits settings
533
+ */
534
+ async updateAiGatewaySettings(organizationId, aiGatewaySettingsUpdateRequestUio, initOverrides) {
535
+ const response = await this.updateAiGatewaySettingsRaw({ organizationId: organizationId, aiGatewaySettingsUpdateRequestUio: aiGatewaySettingsUpdateRequestUio }, initOverrides);
536
+ return await response.value();
537
+ }
475
538
  }
476
539
  exports.AiGatewayApi = AiGatewayApi;
477
540
  /**
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { BodyWithIdUio, ChatMessageUio, ConversationDetailUio, MessageStatusUio, MessageUio, PromptCreateRequestUio, PromptCreateResponseUio, PromptFlowCreateRequestUio, PromptFlowCreateResponseUio, SetMessageReaction200ResponseUio, SetMessageReactionRequestUio } from '../models/index';
13
+ import type { AgentRateLimitSettingsUio, AgentRateLimitSettingsUpdateRequestUio, BodyWithIdUio, ChatMessageUio, ConversationDetailUio, MessageStatusUio, MessageUio, PromptCreateRequestUio, PromptCreateResponseUio, PromptFlowCreateRequestUio, PromptFlowCreateResponseUio, PromptRateLimitResponseUio, SetMessageReaction200ResponseUio, SetMessageReactionRequestUio } from '../models/index';
14
14
  export interface CreateConversationRequest {
15
15
  agentId: string;
16
16
  promptFlowCreateRequestUio: PromptFlowCreateRequestUio;
@@ -27,6 +27,9 @@ export interface CreatePromptRequest {
27
27
  async?: boolean;
28
28
  ephemeral?: boolean;
29
29
  }
30
+ export interface GetAgentRateLimitSettingsRequest {
31
+ organizationId: string;
32
+ }
30
33
  export interface GetConversationByIdRequest {
31
34
  conversationId: string;
32
35
  }
@@ -38,6 +41,9 @@ export interface GetMessageStatusRequest {
38
41
  conversationId: string;
39
42
  messageId: string;
40
43
  }
44
+ export interface GetPromptRateLimitRequest {
45
+ agentId: string;
46
+ }
41
47
  export interface SendMessageToConversationRequest {
42
48
  conversationId: string;
43
49
  messageUio: MessageUio;
@@ -48,6 +54,10 @@ export interface SetMessageReactionRequest {
48
54
  messageId: string;
49
55
  setMessageReactionRequestUio: SetMessageReactionRequestUio;
50
56
  }
57
+ export interface UpdateAgentRateLimitSettingsRequest {
58
+ organizationId: string;
59
+ agentRateLimitSettingsUpdateRequestUio: AgentRateLimitSettingsUpdateRequestUio;
60
+ }
51
61
  /**
52
62
  *
53
63
  */
@@ -82,6 +92,16 @@ export declare class PromptsApi extends runtime.BaseAPI {
82
92
  * Create a new prompt
83
93
  */
84
94
  createPrompt(agentId: string, promptCreateRequestUio: PromptCreateRequestUio, async?: boolean, ephemeral?: boolean, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PromptCreateResponseUio>;
95
+ /**
96
+ * Organization admin settings for agent chat anti-abuse limits.
97
+ * Get agent chat rate limit settings
98
+ */
99
+ getAgentRateLimitSettingsRaw(requestParameters: GetAgentRateLimitSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentRateLimitSettingsUio>>;
100
+ /**
101
+ * Organization admin settings for agent chat anti-abuse limits.
102
+ * Get agent chat rate limit settings
103
+ */
104
+ getAgentRateLimitSettings(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentRateLimitSettingsUio>;
85
105
  /**
86
106
  * Retrieves details of a specific conversation including all messages
87
107
  * Get a conversation by ID
@@ -112,6 +132,16 @@ export declare class PromptsApi extends runtime.BaseAPI {
112
132
  * Get the status of a message
113
133
  */
114
134
  getMessageStatus(conversationId: string, messageId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MessageStatusUio>;
135
+ /**
136
+ * Returns the current prompt rate-limit quota for the authenticated subject on the given agent, without consuming a slot.
137
+ * Get prompt rate-limit usage
138
+ */
139
+ getPromptRateLimitRaw(requestParameters: GetPromptRateLimitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PromptRateLimitResponseUio>>;
140
+ /**
141
+ * Returns the current prompt rate-limit quota for the authenticated subject on the given agent, without consuming a slot.
142
+ * Get prompt rate-limit usage
143
+ */
144
+ getPromptRateLimit(agentId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PromptRateLimitResponseUio>;
115
145
  /**
116
146
  * Adds a new message to an existing conversation and gets the AI response
117
147
  * Send a message to an existing conversation
@@ -132,4 +162,14 @@ export declare class PromptsApi extends runtime.BaseAPI {
132
162
  * Set reaction on a message
133
163
  */
134
164
  setMessageReaction(conversationId: string, messageId: string, setMessageReactionRequestUio: SetMessageReactionRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SetMessageReaction200ResponseUio>;
165
+ /**
166
+ * Organization admin can set per-org chat agent rate limits.
167
+ * Update agent chat rate limit settings
168
+ */
169
+ updateAgentRateLimitSettingsRaw(requestParameters: UpdateAgentRateLimitSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentRateLimitSettingsUio>>;
170
+ /**
171
+ * Organization admin can set per-org chat agent rate limits.
172
+ * Update agent chat rate limit settings
173
+ */
174
+ updateAgentRateLimitSettings(organizationId: string, agentRateLimitSettingsUpdateRequestUio: AgentRateLimitSettingsUpdateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentRateLimitSettingsUio>;
135
175
  }
@@ -167,6 +167,35 @@ class PromptsApi extends runtime.BaseAPI {
167
167
  const response = await this.createPromptRaw({ agentId: agentId, promptCreateRequestUio: promptCreateRequestUio, async: async, ephemeral: ephemeral }, initOverrides);
168
168
  return await response.value();
169
169
  }
170
+ /**
171
+ * Organization admin settings for agent chat anti-abuse limits.
172
+ * Get agent chat rate limit settings
173
+ */
174
+ async getAgentRateLimitSettingsRaw(requestParameters, initOverrides) {
175
+ if (requestParameters['organizationId'] == null) {
176
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getAgentRateLimitSettings().');
177
+ }
178
+ const queryParameters = {};
179
+ const headerParameters = {};
180
+ if (this.configuration && this.configuration.apiKey) {
181
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
182
+ }
183
+ const response = await this.request({
184
+ path: `/organizations/{organizationId}/agents/rate-limit/settings`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
185
+ method: 'GET',
186
+ headers: headerParameters,
187
+ query: queryParameters,
188
+ }, initOverrides);
189
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentRateLimitSettingsUioFromJSON)(jsonValue));
190
+ }
191
+ /**
192
+ * Organization admin settings for agent chat anti-abuse limits.
193
+ * Get agent chat rate limit settings
194
+ */
195
+ async getAgentRateLimitSettings(organizationId, initOverrides) {
196
+ const response = await this.getAgentRateLimitSettingsRaw({ organizationId: organizationId }, initOverrides);
197
+ return await response.value();
198
+ }
170
199
  /**
171
200
  * Retrieves details of a specific conversation including all messages
172
201
  * Get a conversation by ID
@@ -260,6 +289,35 @@ class PromptsApi extends runtime.BaseAPI {
260
289
  const response = await this.getMessageStatusRaw({ conversationId: conversationId, messageId: messageId }, initOverrides);
261
290
  return await response.value();
262
291
  }
292
+ /**
293
+ * Returns the current prompt rate-limit quota for the authenticated subject on the given agent, without consuming a slot.
294
+ * Get prompt rate-limit usage
295
+ */
296
+ async getPromptRateLimitRaw(requestParameters, initOverrides) {
297
+ if (requestParameters['agentId'] == null) {
298
+ throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getPromptRateLimit().');
299
+ }
300
+ const queryParameters = {};
301
+ const headerParameters = {};
302
+ if (this.configuration && this.configuration.apiKey) {
303
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
304
+ }
305
+ const response = await this.request({
306
+ path: `/agents/{agentId}/prompts/rate-limit`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
307
+ method: 'GET',
308
+ headers: headerParameters,
309
+ query: queryParameters,
310
+ }, initOverrides);
311
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PromptRateLimitResponseUioFromJSON)(jsonValue));
312
+ }
313
+ /**
314
+ * Returns the current prompt rate-limit quota for the authenticated subject on the given agent, without consuming a slot.
315
+ * Get prompt rate-limit usage
316
+ */
317
+ async getPromptRateLimit(agentId, initOverrides) {
318
+ const response = await this.getPromptRateLimitRaw({ agentId: agentId }, initOverrides);
319
+ return await response.value();
320
+ }
263
321
  /**
264
322
  * Adds a new message to an existing conversation and gets the AI response
265
323
  * Send a message to an existing conversation
@@ -334,5 +392,39 @@ class PromptsApi extends runtime.BaseAPI {
334
392
  const response = await this.setMessageReactionRaw({ conversationId: conversationId, messageId: messageId, setMessageReactionRequestUio: setMessageReactionRequestUio }, initOverrides);
335
393
  return await response.value();
336
394
  }
395
+ /**
396
+ * Organization admin can set per-org chat agent rate limits.
397
+ * Update agent chat rate limit settings
398
+ */
399
+ async updateAgentRateLimitSettingsRaw(requestParameters, initOverrides) {
400
+ if (requestParameters['organizationId'] == null) {
401
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling updateAgentRateLimitSettings().');
402
+ }
403
+ if (requestParameters['agentRateLimitSettingsUpdateRequestUio'] == null) {
404
+ throw new runtime.RequiredError('agentRateLimitSettingsUpdateRequestUio', 'Required parameter "agentRateLimitSettingsUpdateRequestUio" was null or undefined when calling updateAgentRateLimitSettings().');
405
+ }
406
+ const queryParameters = {};
407
+ const headerParameters = {};
408
+ headerParameters['Content-Type'] = 'application/json';
409
+ if (this.configuration && this.configuration.apiKey) {
410
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
411
+ }
412
+ const response = await this.request({
413
+ path: `/organizations/{organizationId}/agents/rate-limit/settings`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
414
+ method: 'PUT',
415
+ headers: headerParameters,
416
+ query: queryParameters,
417
+ body: (0, index_1.AgentRateLimitSettingsUpdateRequestUioToJSON)(requestParameters['agentRateLimitSettingsUpdateRequestUio']),
418
+ }, initOverrides);
419
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentRateLimitSettingsUioFromJSON)(jsonValue));
420
+ }
421
+ /**
422
+ * Organization admin can set per-org chat agent rate limits.
423
+ * Update agent chat rate limit settings
424
+ */
425
+ async updateAgentRateLimitSettings(organizationId, agentRateLimitSettingsUpdateRequestUio, initOverrides) {
426
+ const response = await this.updateAgentRateLimitSettingsRaw({ organizationId: organizationId, agentRateLimitSettingsUpdateRequestUio: agentRateLimitSettingsUpdateRequestUio }, initOverrides);
427
+ return await response.value();
428
+ }
337
429
  }
338
430
  exports.PromptsApi = PromptsApi;
@@ -0,0 +1,80 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface AgentRateLimitSettingsUio
16
+ */
17
+ export interface AgentRateLimitSettingsUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AgentRateLimitSettingsUio
22
+ */
23
+ organizationId: string;
24
+ /**
25
+ * Enable agent chat rate limiting for this organization
26
+ * @type {boolean}
27
+ * @memberof AgentRateLimitSettingsUio
28
+ */
29
+ enabled: boolean;
30
+ /**
31
+ * Max concurrent agent turns per user (chat agent)
32
+ * @type {number}
33
+ * @memberof AgentRateLimitSettingsUio
34
+ */
35
+ maxConcurrentTurnsPerSubject: number;
36
+ /**
37
+ * Max new conversations per user per minute
38
+ * @type {number}
39
+ * @memberof AgentRateLimitSettingsUio
40
+ */
41
+ maxConversationCreatesPerSubjectPerMinute: number;
42
+ /**
43
+ * Max prompts (messages) per user per agent per minute
44
+ * @type {number}
45
+ * @memberof AgentRateLimitSettingsUio
46
+ */
47
+ maxPromptsPerSubjectPerAgentPerMinute: number;
48
+ /**
49
+ * Platform-fixed sliding window for prompt and conversation counters (milliseconds). Not configurable per organization.
50
+ * @type {number}
51
+ * @memberof AgentRateLimitSettingsUio
52
+ */
53
+ windowMs: number;
54
+ /**
55
+ * Platform-fixed max duration of a concurrency slot if release is never called (milliseconds). Not configurable per organization.
56
+ * @type {number}
57
+ * @memberof AgentRateLimitSettingsUio
58
+ */
59
+ concurrencyLeaseMs: number;
60
+ /**
61
+ *
62
+ * @type {Date}
63
+ * @memberof AgentRateLimitSettingsUio
64
+ */
65
+ updatedAt: Date;
66
+ /**
67
+ *
68
+ * @type {string}
69
+ * @memberof AgentRateLimitSettingsUio
70
+ */
71
+ updatedBy?: string | null;
72
+ }
73
+ /**
74
+ * Check if a given object implements the AgentRateLimitSettingsUio interface.
75
+ */
76
+ export declare function instanceOfAgentRateLimitSettingsUio(value: object): value is AgentRateLimitSettingsUio;
77
+ export declare function AgentRateLimitSettingsUioFromJSON(json: any): AgentRateLimitSettingsUio;
78
+ export declare function AgentRateLimitSettingsUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentRateLimitSettingsUio;
79
+ export declare function AgentRateLimitSettingsUioToJSON(json: any): AgentRateLimitSettingsUio;
80
+ export declare function AgentRateLimitSettingsUioToJSONTyped(value?: AgentRateLimitSettingsUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfAgentRateLimitSettingsUio = instanceOfAgentRateLimitSettingsUio;
17
+ exports.AgentRateLimitSettingsUioFromJSON = AgentRateLimitSettingsUioFromJSON;
18
+ exports.AgentRateLimitSettingsUioFromJSONTyped = AgentRateLimitSettingsUioFromJSONTyped;
19
+ exports.AgentRateLimitSettingsUioToJSON = AgentRateLimitSettingsUioToJSON;
20
+ exports.AgentRateLimitSettingsUioToJSONTyped = AgentRateLimitSettingsUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AgentRateLimitSettingsUio interface.
23
+ */
24
+ function instanceOfAgentRateLimitSettingsUio(value) {
25
+ if (!('organizationId' in value) || value['organizationId'] === undefined)
26
+ return false;
27
+ if (!('enabled' in value) || value['enabled'] === undefined)
28
+ return false;
29
+ if (!('maxConcurrentTurnsPerSubject' in value) || value['maxConcurrentTurnsPerSubject'] === undefined)
30
+ return false;
31
+ if (!('maxConversationCreatesPerSubjectPerMinute' in value) || value['maxConversationCreatesPerSubjectPerMinute'] === undefined)
32
+ return false;
33
+ if (!('maxPromptsPerSubjectPerAgentPerMinute' in value) || value['maxPromptsPerSubjectPerAgentPerMinute'] === undefined)
34
+ return false;
35
+ if (!('windowMs' in value) || value['windowMs'] === undefined)
36
+ return false;
37
+ if (!('concurrencyLeaseMs' in value) || value['concurrencyLeaseMs'] === undefined)
38
+ return false;
39
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
40
+ return false;
41
+ return true;
42
+ }
43
+ function AgentRateLimitSettingsUioFromJSON(json) {
44
+ return AgentRateLimitSettingsUioFromJSONTyped(json, false);
45
+ }
46
+ function AgentRateLimitSettingsUioFromJSONTyped(json, ignoreDiscriminator) {
47
+ if (json == null) {
48
+ return json;
49
+ }
50
+ return {
51
+ 'organizationId': json['organizationId'],
52
+ 'enabled': json['enabled'],
53
+ 'maxConcurrentTurnsPerSubject': json['maxConcurrentTurnsPerSubject'],
54
+ 'maxConversationCreatesPerSubjectPerMinute': json['maxConversationCreatesPerSubjectPerMinute'],
55
+ 'maxPromptsPerSubjectPerAgentPerMinute': json['maxPromptsPerSubjectPerAgentPerMinute'],
56
+ 'windowMs': json['windowMs'],
57
+ 'concurrencyLeaseMs': json['concurrencyLeaseMs'],
58
+ 'updatedAt': (new Date(json['updatedAt'])),
59
+ 'updatedBy': json['updatedBy'] == null ? undefined : json['updatedBy'],
60
+ };
61
+ }
62
+ function AgentRateLimitSettingsUioToJSON(json) {
63
+ return AgentRateLimitSettingsUioToJSONTyped(json, false);
64
+ }
65
+ function AgentRateLimitSettingsUioToJSONTyped(value, ignoreDiscriminator = false) {
66
+ if (value == null) {
67
+ return value;
68
+ }
69
+ return {
70
+ 'organizationId': value['organizationId'],
71
+ 'enabled': value['enabled'],
72
+ 'maxConcurrentTurnsPerSubject': value['maxConcurrentTurnsPerSubject'],
73
+ 'maxConversationCreatesPerSubjectPerMinute': value['maxConversationCreatesPerSubjectPerMinute'],
74
+ 'maxPromptsPerSubjectPerAgentPerMinute': value['maxPromptsPerSubjectPerAgentPerMinute'],
75
+ 'windowMs': value['windowMs'],
76
+ 'concurrencyLeaseMs': value['concurrencyLeaseMs'],
77
+ 'updatedAt': ((value['updatedAt']).toISOString()),
78
+ 'updatedBy': value['updatedBy'],
79
+ };
80
+ }
@@ -0,0 +1,50 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface AgentRateLimitSettingsUpdateRequestUio
16
+ */
17
+ export interface AgentRateLimitSettingsUpdateRequestUio {
18
+ /**
19
+ *
20
+ * @type {boolean}
21
+ * @memberof AgentRateLimitSettingsUpdateRequestUio
22
+ */
23
+ enabled?: boolean;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof AgentRateLimitSettingsUpdateRequestUio
28
+ */
29
+ maxConcurrentTurnsPerSubject?: number;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof AgentRateLimitSettingsUpdateRequestUio
34
+ */
35
+ maxConversationCreatesPerSubjectPerMinute?: number;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof AgentRateLimitSettingsUpdateRequestUio
40
+ */
41
+ maxPromptsPerSubjectPerAgentPerMinute?: number;
42
+ }
43
+ /**
44
+ * Check if a given object implements the AgentRateLimitSettingsUpdateRequestUio interface.
45
+ */
46
+ export declare function instanceOfAgentRateLimitSettingsUpdateRequestUio(value: object): value is AgentRateLimitSettingsUpdateRequestUio;
47
+ export declare function AgentRateLimitSettingsUpdateRequestUioFromJSON(json: any): AgentRateLimitSettingsUpdateRequestUio;
48
+ export declare function AgentRateLimitSettingsUpdateRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentRateLimitSettingsUpdateRequestUio;
49
+ export declare function AgentRateLimitSettingsUpdateRequestUioToJSON(json: any): AgentRateLimitSettingsUpdateRequestUio;
50
+ export declare function AgentRateLimitSettingsUpdateRequestUioToJSONTyped(value?: AgentRateLimitSettingsUpdateRequestUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfAgentRateLimitSettingsUpdateRequestUio = instanceOfAgentRateLimitSettingsUpdateRequestUio;
17
+ exports.AgentRateLimitSettingsUpdateRequestUioFromJSON = AgentRateLimitSettingsUpdateRequestUioFromJSON;
18
+ exports.AgentRateLimitSettingsUpdateRequestUioFromJSONTyped = AgentRateLimitSettingsUpdateRequestUioFromJSONTyped;
19
+ exports.AgentRateLimitSettingsUpdateRequestUioToJSON = AgentRateLimitSettingsUpdateRequestUioToJSON;
20
+ exports.AgentRateLimitSettingsUpdateRequestUioToJSONTyped = AgentRateLimitSettingsUpdateRequestUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AgentRateLimitSettingsUpdateRequestUio interface.
23
+ */
24
+ function instanceOfAgentRateLimitSettingsUpdateRequestUio(value) {
25
+ return true;
26
+ }
27
+ function AgentRateLimitSettingsUpdateRequestUioFromJSON(json) {
28
+ return AgentRateLimitSettingsUpdateRequestUioFromJSONTyped(json, false);
29
+ }
30
+ function AgentRateLimitSettingsUpdateRequestUioFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'enabled': json['enabled'] == null ? undefined : json['enabled'],
36
+ 'maxConcurrentTurnsPerSubject': json['maxConcurrentTurnsPerSubject'] == null ? undefined : json['maxConcurrentTurnsPerSubject'],
37
+ 'maxConversationCreatesPerSubjectPerMinute': json['maxConversationCreatesPerSubjectPerMinute'] == null ? undefined : json['maxConversationCreatesPerSubjectPerMinute'],
38
+ 'maxPromptsPerSubjectPerAgentPerMinute': json['maxPromptsPerSubjectPerAgentPerMinute'] == null ? undefined : json['maxPromptsPerSubjectPerAgentPerMinute'],
39
+ };
40
+ }
41
+ function AgentRateLimitSettingsUpdateRequestUioToJSON(json) {
42
+ return AgentRateLimitSettingsUpdateRequestUioToJSONTyped(json, false);
43
+ }
44
+ function AgentRateLimitSettingsUpdateRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'enabled': value['enabled'],
50
+ 'maxConcurrentTurnsPerSubject': value['maxConcurrentTurnsPerSubject'],
51
+ 'maxConversationCreatesPerSubjectPerMinute': value['maxConversationCreatesPerSubjectPerMinute'],
52
+ 'maxPromptsPerSubjectPerAgentPerMinute': value['maxPromptsPerSubjectPerAgentPerMinute'],
53
+ };
54
+ }
@@ -0,0 +1,64 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface AiGatewayModelTokenQuotaUio
16
+ */
17
+ export interface AiGatewayModelTokenQuotaUio {
18
+ /**
19
+ * Breign user id this quota applies to
20
+ * @type {string}
21
+ * @memberof AiGatewayModelTokenQuotaUio
22
+ */
23
+ userId: string;
24
+ /**
25
+ * Bare model id or qualified providerId/modelId
26
+ * @type {string}
27
+ * @memberof AiGatewayModelTokenQuotaUio
28
+ */
29
+ model: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof AiGatewayModelTokenQuotaUio
34
+ */
35
+ providerId?: string | null;
36
+ /**
37
+ * Token cap for this user and period (input + output + reasoning)
38
+ * @type {number}
39
+ * @memberof AiGatewayModelTokenQuotaUio
40
+ */
41
+ limit: number;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof AiGatewayModelTokenQuotaUio
46
+ */
47
+ period: AiGatewayModelTokenQuotaUioPeriodEnum;
48
+ }
49
+ /**
50
+ * @export
51
+ */
52
+ export declare const AiGatewayModelTokenQuotaUioPeriodEnum: {
53
+ readonly Day: "day";
54
+ readonly Month: "month";
55
+ };
56
+ export type AiGatewayModelTokenQuotaUioPeriodEnum = typeof AiGatewayModelTokenQuotaUioPeriodEnum[keyof typeof AiGatewayModelTokenQuotaUioPeriodEnum];
57
+ /**
58
+ * Check if a given object implements the AiGatewayModelTokenQuotaUio interface.
59
+ */
60
+ export declare function instanceOfAiGatewayModelTokenQuotaUio(value: object): value is AiGatewayModelTokenQuotaUio;
61
+ export declare function AiGatewayModelTokenQuotaUioFromJSON(json: any): AiGatewayModelTokenQuotaUio;
62
+ export declare function AiGatewayModelTokenQuotaUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AiGatewayModelTokenQuotaUio;
63
+ export declare function AiGatewayModelTokenQuotaUioToJSON(json: any): AiGatewayModelTokenQuotaUio;
64
+ export declare function AiGatewayModelTokenQuotaUioToJSONTyped(value?: AiGatewayModelTokenQuotaUio | null, ignoreDiscriminator?: boolean): any;