@breign/client 1.0.209 → 1.0.211

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 (31) hide show
  1. package/dist/apis/OrganizationsApi.d.ts +56 -1
  2. package/dist/apis/OrganizationsApi.js +136 -0
  3. package/dist/models/AgentMetricsOverviewUio.d.ts +7 -0
  4. package/dist/models/AgentMetricsOverviewUio.js +3 -0
  5. package/dist/models/AgentTokenCostByAppInnerUio.d.ts +40 -0
  6. package/dist/models/AgentTokenCostByAppInnerUio.js +54 -0
  7. package/dist/models/AgentTokenCostByModelInnerUio.d.ts +46 -0
  8. package/dist/models/AgentTokenCostByModelInnerUio.js +58 -0
  9. package/dist/models/AgentTokenCostUio.d.ts +54 -0
  10. package/dist/models/AgentTokenCostUio.js +64 -0
  11. package/dist/models/AiGatewayUsageCostUio.d.ts +1 -1
  12. package/dist/models/EditOrganizationMemoryFileContent409ResponseUio.d.ts +44 -0
  13. package/dist/models/EditOrganizationMemoryFileContent409ResponseUio.js +58 -0
  14. package/dist/models/MemoryFileContentUio.d.ts +62 -0
  15. package/dist/models/MemoryFileContentUio.js +70 -0
  16. package/dist/models/MemoryFileEntryUio.d.ts +56 -0
  17. package/dist/models/MemoryFileEntryUio.js +66 -0
  18. package/dist/models/MemoryFileWriteRequestUio.d.ts +50 -0
  19. package/dist/models/MemoryFileWriteRequestUio.js +60 -0
  20. package/dist/models/ModelConsumptionItemUio.d.ts +14 -0
  21. package/dist/models/ModelConsumptionItemUio.js +8 -0
  22. package/dist/models/ModelConsumptionSliceUio.d.ts +14 -0
  23. package/dist/models/ModelConsumptionSliceUio.js +8 -0
  24. package/dist/models/OrganizationModelConsumptionTotalUio.d.ts +14 -0
  25. package/dist/models/OrganizationModelConsumptionTotalUio.js +8 -0
  26. package/dist/models/OrganizationModelConsumptionUio.d.ts +7 -0
  27. package/dist/models/OrganizationModelConsumptionUio.js +5 -0
  28. package/dist/models/index.d.ts +7 -0
  29. package/dist/models/index.js +7 -0
  30. package/dist/openapi.json +429 -5
  31. 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 { AccessRoleCreateRequestUio, AccessRolePermissionsRequestUio, AccessRoleUio, AccessRoleUpdateRequestUio, CreateToolApprovalRequestUio, DeleteOrganizationUser200ResponseUio, EditToolApprovalRequestUio, MemberAccessRolesUio, OrganizationEngineUio, OrganizationMemberUio, OrganizationOcrConfigUio, OrganizationOcrConfigUpdateRequestUio, OrganizationUio, OrganizationUserInviteRequestUio, OrganizationUserInviteResponseUio, RoleCreateRequestUio, RoleUio, ToolApprovalUio, ToolApprovalsResponseUio, UserAccessRolesRequestUio, UserAccessUio, UserAgentAccessRequestUio, UserAgentAccessUio, UserDirectPermissionsRequestUio } from '../models/index';
13
+ import type { AccessRoleCreateRequestUio, AccessRolePermissionsRequestUio, AccessRoleUio, AccessRoleUpdateRequestUio, CreateToolApprovalRequestUio, DeleteOrganizationUser200ResponseUio, EditToolApprovalRequestUio, MemberAccessRolesUio, MemoryFileContentUio, MemoryFileEntryUio, MemoryFileWriteRequestUio, OrganizationEngineUio, OrganizationMemberUio, OrganizationOcrConfigUio, OrganizationOcrConfigUpdateRequestUio, OrganizationUio, OrganizationUserInviteRequestUio, OrganizationUserInviteResponseUio, RoleCreateRequestUio, RoleUio, ToolApprovalUio, ToolApprovalsResponseUio, UserAccessRolesRequestUio, UserAccessUio, UserAgentAccessRequestUio, UserAgentAccessUio, UserDirectPermissionsRequestUio } from '../models/index';
14
14
  export interface CreateOrganizationAccessRoleRequest {
15
15
  organizationId: string;
16
16
  accessRoleCreateRequestUio: AccessRoleCreateRequestUio;
@@ -30,6 +30,11 @@ export interface DeleteOrganizationAccessRoleRequest {
30
30
  organizationId: string;
31
31
  roleId: string;
32
32
  }
33
+ export interface DeleteOrganizationMemoryFileRequest {
34
+ organizationId: string;
35
+ path: string;
36
+ agentId?: string;
37
+ }
33
38
  export interface DeleteOrganizationRoleRequest {
34
39
  organizationId: string;
35
40
  roleId: string;
@@ -38,6 +43,10 @@ export interface DeleteOrganizationUserRequest {
38
43
  organizationId: string;
39
44
  userId: string;
40
45
  }
46
+ export interface EditOrganizationMemoryFileContentRequest {
47
+ organizationId: string;
48
+ memoryFileWriteRequestUio: MemoryFileWriteRequestUio;
49
+ }
41
50
  export interface EditToolApprovalRequest {
42
51
  organizationId: string;
43
52
  approvalId: string;
@@ -56,6 +65,11 @@ export interface GetOrganizationMemberPermissionsRequest {
56
65
  organizationId: string;
57
66
  agentId?: string;
58
67
  }
68
+ export interface GetOrganizationMemoryFileContentRequest {
69
+ organizationId: string;
70
+ path: string;
71
+ agentId?: string;
72
+ }
59
73
  export interface GetOrganizationOcrConfigRequest {
60
74
  organizationId: string;
61
75
  }
@@ -77,6 +91,9 @@ export interface ListOrganizationAccessRolesRequest {
77
91
  export interface ListOrganizationMemberAccessRolesRequest {
78
92
  organizationId: string;
79
93
  }
94
+ export interface ListOrganizationMemoryFilesRequest {
95
+ organizationId: string;
96
+ }
80
97
  export interface ListOrganizationRolesRequest {
81
98
  organizationId: string;
82
99
  }
@@ -175,6 +192,16 @@ export declare class OrganizationsApi extends runtime.BaseAPI {
175
192
  * Delete an access role from an organization
176
193
  */
177
194
  deleteOrganizationAccessRole(organizationId: string, roleId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
195
+ /**
196
+ * Deletes one file, or every file of a personal space when the path is its root (/shared, or /memories with `agentId`) — the user\'s \"forget everything\". The organisation\'s memory is deleted file by file only. Cannot be undone.
197
+ * Delete a memory file, or a whole personal memory space
198
+ */
199
+ deleteOrganizationMemoryFileRaw(requestParameters: DeleteOrganizationMemoryFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
200
+ /**
201
+ * Deletes one file, or every file of a personal space when the path is its root (/shared, or /memories with `agentId`) — the user\'s \"forget everything\". The organisation\'s memory is deleted file by file only. Cannot be undone.
202
+ * Delete a memory file, or a whole personal memory space
203
+ */
204
+ deleteOrganizationMemoryFile(organizationId: string, path: string, agentId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
178
205
  /**
179
206
  * Deletes an agent role from the specified organization
180
207
  * Delete a role from an organization
@@ -193,6 +220,16 @@ export declare class OrganizationsApi extends runtime.BaseAPI {
193
220
  * Remove a user from an organization
194
221
  */
195
222
  deleteOrganizationUser(organizationId: string, userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteOrganizationUser200ResponseUio>;
223
+ /**
224
+ * Saves a user edit. Optimistic concurrency: the write only lands if the file is still at `expectedVersion`, otherwise a 409 is returned carrying the current version so the client can re-read. The edit is signed by the caller.
225
+ * Edit a memory file
226
+ */
227
+ editOrganizationMemoryFileContentRaw(requestParameters: EditOrganizationMemoryFileContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MemoryFileContentUio>>;
228
+ /**
229
+ * Saves a user edit. Optimistic concurrency: the write only lands if the file is still at `expectedVersion`, otherwise a 409 is returned carrying the current version so the client can re-read. The edit is signed by the caller.
230
+ * Edit a memory file
231
+ */
232
+ editOrganizationMemoryFileContent(organizationId: string, memoryFileWriteRequestUio: MemoryFileWriteRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MemoryFileContentUio>;
196
233
  /**
197
234
  * Rewrites what one approval covers — widening an address into a pattern, or correcting a command. Only an approval the caller granted himself, and only its resource: the scope, the agent and the author never change. An approval cannot be created this way; a right only ever starts with a question the agent actually asked.
198
235
  * Edit an approval the caller granted
@@ -245,6 +282,14 @@ export declare class OrganizationsApi extends runtime.BaseAPI {
245
282
  getOrganizationMemberPermissions(organizationId: string, agentId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
246
283
  [key: string]: boolean;
247
284
  }>;
285
+ /**
286
+ * Read a memory file
287
+ */
288
+ getOrganizationMemoryFileContentRaw(requestParameters: GetOrganizationMemoryFileContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MemoryFileContentUio>>;
289
+ /**
290
+ * Read a memory file
291
+ */
292
+ getOrganizationMemoryFileContent(organizationId: string, path: string, agentId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MemoryFileContentUio>;
248
293
  /**
249
294
  * Retourne la configuration OCR (mode, providerId, modelId) de l\'organisation. Une organisation sans configuration renvoie une configuration désactivée (mode DISABLED) : l\'absence de configuration vaut OCR désactivé.
250
295
  * Get an organization OCR configuration
@@ -295,6 +340,16 @@ export declare class OrganizationsApi extends runtime.BaseAPI {
295
340
  * List access roles of every organization member
296
341
  */
297
342
  listOrganizationMemberAccessRoles(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<MemberAccessRolesUio>>;
343
+ /**
344
+ * The organisation\'s memory (/org) and the caller\'s own personal memory: /shared, and /memories of every agent, whatever the agents\' memory settings (a disabled space still holds what it retained). Never another user\'s personal memory. The content is not returned here; use the content endpoint for that.
345
+ * List the memory files the caller can manage in the organisation
346
+ */
347
+ listOrganizationMemoryFilesRaw(requestParameters: ListOrganizationMemoryFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<MemoryFileEntryUio>>>;
348
+ /**
349
+ * The organisation\'s memory (/org) and the caller\'s own personal memory: /shared, and /memories of every agent, whatever the agents\' memory settings (a disabled space still holds what it retained). Never another user\'s personal memory. The content is not returned here; use the content endpoint for that.
350
+ * List the memory files the caller can manage in the organisation
351
+ */
352
+ listOrganizationMemoryFiles(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<MemoryFileEntryUio>>;
298
353
  /**
299
354
  * Retrieves all roles configured for the given organization
300
355
  * List roles of an organization
@@ -210,6 +210,43 @@ class OrganizationsApi extends runtime.BaseAPI {
210
210
  async deleteOrganizationAccessRole(organizationId, roleId, initOverrides) {
211
211
  await this.deleteOrganizationAccessRoleRaw({ organizationId: organizationId, roleId: roleId }, initOverrides);
212
212
  }
213
+ /**
214
+ * Deletes one file, or every file of a personal space when the path is its root (/shared, or /memories with `agentId`) — the user\'s \"forget everything\". The organisation\'s memory is deleted file by file only. Cannot be undone.
215
+ * Delete a memory file, or a whole personal memory space
216
+ */
217
+ async deleteOrganizationMemoryFileRaw(requestParameters, initOverrides) {
218
+ if (requestParameters['organizationId'] == null) {
219
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling deleteOrganizationMemoryFile().');
220
+ }
221
+ if (requestParameters['path'] == null) {
222
+ throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling deleteOrganizationMemoryFile().');
223
+ }
224
+ const queryParameters = {};
225
+ if (requestParameters['path'] != null) {
226
+ queryParameters['path'] = requestParameters['path'];
227
+ }
228
+ if (requestParameters['agentId'] != null) {
229
+ queryParameters['agentId'] = requestParameters['agentId'];
230
+ }
231
+ const headerParameters = {};
232
+ if (this.configuration && this.configuration.apiKey) {
233
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
234
+ }
235
+ const response = await this.request({
236
+ path: `/organizations/{organizationId}/memory/files`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
237
+ method: 'DELETE',
238
+ headers: headerParameters,
239
+ query: queryParameters,
240
+ }, initOverrides);
241
+ return new runtime.VoidApiResponse(response);
242
+ }
243
+ /**
244
+ * Deletes one file, or every file of a personal space when the path is its root (/shared, or /memories with `agentId`) — the user\'s \"forget everything\". The organisation\'s memory is deleted file by file only. Cannot be undone.
245
+ * Delete a memory file, or a whole personal memory space
246
+ */
247
+ async deleteOrganizationMemoryFile(organizationId, path, agentId, initOverrides) {
248
+ await this.deleteOrganizationMemoryFileRaw({ organizationId: organizationId, path: path, agentId: agentId }, initOverrides);
249
+ }
213
250
  /**
214
251
  * Deletes an agent role from the specified organization
215
252
  * Delete a role from an organization
@@ -271,6 +308,40 @@ class OrganizationsApi extends runtime.BaseAPI {
271
308
  const response = await this.deleteOrganizationUserRaw({ organizationId: organizationId, userId: userId }, initOverrides);
272
309
  return await response.value();
273
310
  }
311
+ /**
312
+ * Saves a user edit. Optimistic concurrency: the write only lands if the file is still at `expectedVersion`, otherwise a 409 is returned carrying the current version so the client can re-read. The edit is signed by the caller.
313
+ * Edit a memory file
314
+ */
315
+ async editOrganizationMemoryFileContentRaw(requestParameters, initOverrides) {
316
+ if (requestParameters['organizationId'] == null) {
317
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling editOrganizationMemoryFileContent().');
318
+ }
319
+ if (requestParameters['memoryFileWriteRequestUio'] == null) {
320
+ throw new runtime.RequiredError('memoryFileWriteRequestUio', 'Required parameter "memoryFileWriteRequestUio" was null or undefined when calling editOrganizationMemoryFileContent().');
321
+ }
322
+ const queryParameters = {};
323
+ const headerParameters = {};
324
+ headerParameters['Content-Type'] = 'application/json';
325
+ if (this.configuration && this.configuration.apiKey) {
326
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
327
+ }
328
+ const response = await this.request({
329
+ path: `/organizations/{organizationId}/memory/files/content`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
330
+ method: 'PUT',
331
+ headers: headerParameters,
332
+ query: queryParameters,
333
+ body: (0, index_1.MemoryFileWriteRequestUioToJSON)(requestParameters['memoryFileWriteRequestUio']),
334
+ }, initOverrides);
335
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.MemoryFileContentUioFromJSON)(jsonValue));
336
+ }
337
+ /**
338
+ * Saves a user edit. Optimistic concurrency: the write only lands if the file is still at `expectedVersion`, otherwise a 409 is returned carrying the current version so the client can re-read. The edit is signed by the caller.
339
+ * Edit a memory file
340
+ */
341
+ async editOrganizationMemoryFileContent(organizationId, memoryFileWriteRequestUio, initOverrides) {
342
+ const response = await this.editOrganizationMemoryFileContentRaw({ organizationId: organizationId, memoryFileWriteRequestUio: memoryFileWriteRequestUio }, initOverrides);
343
+ return await response.value();
344
+ }
274
345
  /**
275
346
  * Rewrites what one approval covers — widening an address into a pattern, or correcting a command. Only an approval the caller granted himself, and only its resource: the scope, the agent and the author never change. An approval cannot be created this way; a right only ever starts with a question the agent actually asked.
276
347
  * Edit an approval the caller granted
@@ -425,6 +496,42 @@ class OrganizationsApi extends runtime.BaseAPI {
425
496
  const response = await this.getOrganizationMemberPermissionsRaw({ organizationId: organizationId, agentId: agentId }, initOverrides);
426
497
  return await response.value();
427
498
  }
499
+ /**
500
+ * Read a memory file
501
+ */
502
+ async getOrganizationMemoryFileContentRaw(requestParameters, initOverrides) {
503
+ if (requestParameters['organizationId'] == null) {
504
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getOrganizationMemoryFileContent().');
505
+ }
506
+ if (requestParameters['path'] == null) {
507
+ throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling getOrganizationMemoryFileContent().');
508
+ }
509
+ const queryParameters = {};
510
+ if (requestParameters['path'] != null) {
511
+ queryParameters['path'] = requestParameters['path'];
512
+ }
513
+ if (requestParameters['agentId'] != null) {
514
+ queryParameters['agentId'] = requestParameters['agentId'];
515
+ }
516
+ const headerParameters = {};
517
+ if (this.configuration && this.configuration.apiKey) {
518
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
519
+ }
520
+ const response = await this.request({
521
+ path: `/organizations/{organizationId}/memory/files/content`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
522
+ method: 'GET',
523
+ headers: headerParameters,
524
+ query: queryParameters,
525
+ }, initOverrides);
526
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.MemoryFileContentUioFromJSON)(jsonValue));
527
+ }
528
+ /**
529
+ * Read a memory file
530
+ */
531
+ async getOrganizationMemoryFileContent(organizationId, path, agentId, initOverrides) {
532
+ const response = await this.getOrganizationMemoryFileContentRaw({ organizationId: organizationId, path: path, agentId: agentId }, initOverrides);
533
+ return await response.value();
534
+ }
428
535
  /**
429
536
  * Retourne la configuration OCR (mode, providerId, modelId) de l\'organisation. Une organisation sans configuration renvoie une configuration désactivée (mode DISABLED) : l\'absence de configuration vaut OCR désactivé.
430
537
  * Get an organization OCR configuration
@@ -600,6 +707,35 @@ class OrganizationsApi extends runtime.BaseAPI {
600
707
  const response = await this.listOrganizationMemberAccessRolesRaw({ organizationId: organizationId }, initOverrides);
601
708
  return await response.value();
602
709
  }
710
+ /**
711
+ * The organisation\'s memory (/org) and the caller\'s own personal memory: /shared, and /memories of every agent, whatever the agents\' memory settings (a disabled space still holds what it retained). Never another user\'s personal memory. The content is not returned here; use the content endpoint for that.
712
+ * List the memory files the caller can manage in the organisation
713
+ */
714
+ async listOrganizationMemoryFilesRaw(requestParameters, initOverrides) {
715
+ if (requestParameters['organizationId'] == null) {
716
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling listOrganizationMemoryFiles().');
717
+ }
718
+ const queryParameters = {};
719
+ const headerParameters = {};
720
+ if (this.configuration && this.configuration.apiKey) {
721
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
722
+ }
723
+ const response = await this.request({
724
+ path: `/organizations/{organizationId}/memory/files`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
725
+ method: 'GET',
726
+ headers: headerParameters,
727
+ query: queryParameters,
728
+ }, initOverrides);
729
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.MemoryFileEntryUioFromJSON));
730
+ }
731
+ /**
732
+ * The organisation\'s memory (/org) and the caller\'s own personal memory: /shared, and /memories of every agent, whatever the agents\' memory settings (a disabled space still holds what it retained). Never another user\'s personal memory. The content is not returned here; use the content endpoint for that.
733
+ * List the memory files the caller can manage in the organisation
734
+ */
735
+ async listOrganizationMemoryFiles(organizationId, initOverrides) {
736
+ const response = await this.listOrganizationMemoryFilesRaw({ organizationId: organizationId }, initOverrides);
737
+ return await response.value();
738
+ }
603
739
  /**
604
740
  * Retrieves all roles configured for the given organization
605
741
  * List roles of an organization
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { SubscriptionMetricUio } from './SubscriptionMetricUio';
13
+ import type { AgentTokenCostUio } from './AgentTokenCostUio';
13
14
  import type { AgentMetricsByAppUio } from './AgentMetricsByAppUio';
14
15
  import type { AgentTokenUsageByTaskUio } from './AgentTokenUsageByTaskUio';
15
16
  import type { AgentTokenBreakdownUio } from './AgentTokenBreakdownUio';
@@ -114,6 +115,12 @@ export interface AgentMetricsOverviewUio {
114
115
  * @memberof AgentMetricsOverviewUio
115
116
  */
116
117
  periodComparison?: AgentMetricsPeriodComparisonUio;
118
+ /**
119
+ *
120
+ * @type {AgentTokenCostUio}
121
+ * @memberof AgentMetricsOverviewUio
122
+ */
123
+ tokenCost?: AgentTokenCostUio;
117
124
  /**
118
125
  *
119
126
  * @type {Array<AgentTokenUsageMetricUio>}
@@ -19,6 +19,7 @@ exports.AgentMetricsOverviewUioFromJSONTyped = AgentMetricsOverviewUioFromJSONTy
19
19
  exports.AgentMetricsOverviewUioToJSON = AgentMetricsOverviewUioToJSON;
20
20
  exports.AgentMetricsOverviewUioToJSONTyped = AgentMetricsOverviewUioToJSONTyped;
21
21
  const SubscriptionMetricUio_1 = require("./SubscriptionMetricUio");
22
+ const AgentTokenCostUio_1 = require("./AgentTokenCostUio");
22
23
  const AgentMetricsByAppUio_1 = require("./AgentMetricsByAppUio");
23
24
  const AgentTokenUsageByTaskUio_1 = require("./AgentTokenUsageByTaskUio");
24
25
  const AgentTokenBreakdownUio_1 = require("./AgentTokenBreakdownUio");
@@ -64,6 +65,7 @@ function AgentMetricsOverviewUioFromJSONTyped(json, ignoreDiscriminator) {
64
65
  'metricsByApp': json['metricsByApp'] == null ? undefined : (json['metricsByApp'].map(AgentMetricsByAppUio_1.AgentMetricsByAppUioFromJSON)),
65
66
  'topTools': json['topTools'] == null ? undefined : (json['topTools'].map(AgentToolUsageMetricUio_1.AgentToolUsageMetricUioFromJSON)),
66
67
  'periodComparison': json['periodComparison'] == null ? undefined : (0, AgentMetricsPeriodComparisonUio_1.AgentMetricsPeriodComparisonUioFromJSON)(json['periodComparison']),
68
+ 'tokenCost': json['tokenCost'] == null ? undefined : (0, AgentTokenCostUio_1.AgentTokenCostUioFromJSON)(json['tokenCost']),
67
69
  'tokenUsage': json['tokenUsage'] == null ? undefined : (json['tokenUsage'].map(AgentTokenUsageMetricUio_1.AgentTokenUsageMetricUioFromJSON)),
68
70
  'subscription': json['subscription'] == null ? undefined : (0, SubscriptionMetricUio_1.SubscriptionMetricUioFromJSON)(json['subscription']),
69
71
  'costs': json['costs'] == null ? undefined : (0, CostMetricUio_1.CostMetricUioFromJSON)(json['costs']),
@@ -92,6 +94,7 @@ function AgentMetricsOverviewUioToJSONTyped(value, ignoreDiscriminator = false)
92
94
  'metricsByApp': value['metricsByApp'] == null ? undefined : (value['metricsByApp'].map(AgentMetricsByAppUio_1.AgentMetricsByAppUioToJSON)),
93
95
  'topTools': value['topTools'] == null ? undefined : (value['topTools'].map(AgentToolUsageMetricUio_1.AgentToolUsageMetricUioToJSON)),
94
96
  'periodComparison': (0, AgentMetricsPeriodComparisonUio_1.AgentMetricsPeriodComparisonUioToJSON)(value['periodComparison']),
97
+ 'tokenCost': (0, AgentTokenCostUio_1.AgentTokenCostUioToJSON)(value['tokenCost']),
95
98
  'tokenUsage': value['tokenUsage'] == null ? undefined : (value['tokenUsage'].map(AgentTokenUsageMetricUio_1.AgentTokenUsageMetricUioToJSON)),
96
99
  'subscription': (0, SubscriptionMetricUio_1.SubscriptionMetricUioToJSON)(value['subscription']),
97
100
  'costs': (0, CostMetricUio_1.CostMetricUioToJSON)(value['costs']),
@@ -0,0 +1,40 @@
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 AgentTokenCostByAppInnerUio
16
+ */
17
+ export interface AgentTokenCostByAppInnerUio {
18
+ /**
19
+ * Null pour les tours sans app (appel direct).
20
+ * @type {string}
21
+ * @memberof AgentTokenCostByAppInnerUio
22
+ */
23
+ appId: string | null;
24
+ /**
25
+ * Montant par devise ISO ; deux devises ne s'additionnent pas. Coût figé à l'écriture de la métrique, sinon prix actuel. Les modèles Breign ne sont valorisés que pour le superAdmin.
26
+ * @type {{ [key: string]: number; }}
27
+ * @memberof AgentTokenCostByAppInnerUio
28
+ */
29
+ cost: {
30
+ [key: string]: number;
31
+ };
32
+ }
33
+ /**
34
+ * Check if a given object implements the AgentTokenCostByAppInnerUio interface.
35
+ */
36
+ export declare function instanceOfAgentTokenCostByAppInnerUio(value: object): value is AgentTokenCostByAppInnerUio;
37
+ export declare function AgentTokenCostByAppInnerUioFromJSON(json: any): AgentTokenCostByAppInnerUio;
38
+ export declare function AgentTokenCostByAppInnerUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentTokenCostByAppInnerUio;
39
+ export declare function AgentTokenCostByAppInnerUioToJSON(json: any): AgentTokenCostByAppInnerUio;
40
+ export declare function AgentTokenCostByAppInnerUioToJSONTyped(value?: AgentTokenCostByAppInnerUio | 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.instanceOfAgentTokenCostByAppInnerUio = instanceOfAgentTokenCostByAppInnerUio;
17
+ exports.AgentTokenCostByAppInnerUioFromJSON = AgentTokenCostByAppInnerUioFromJSON;
18
+ exports.AgentTokenCostByAppInnerUioFromJSONTyped = AgentTokenCostByAppInnerUioFromJSONTyped;
19
+ exports.AgentTokenCostByAppInnerUioToJSON = AgentTokenCostByAppInnerUioToJSON;
20
+ exports.AgentTokenCostByAppInnerUioToJSONTyped = AgentTokenCostByAppInnerUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AgentTokenCostByAppInnerUio interface.
23
+ */
24
+ function instanceOfAgentTokenCostByAppInnerUio(value) {
25
+ if (!('appId' in value) || value['appId'] === undefined)
26
+ return false;
27
+ if (!('cost' in value) || value['cost'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function AgentTokenCostByAppInnerUioFromJSON(json) {
32
+ return AgentTokenCostByAppInnerUioFromJSONTyped(json, false);
33
+ }
34
+ function AgentTokenCostByAppInnerUioFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'appId': json['appId'],
40
+ 'cost': json['cost'],
41
+ };
42
+ }
43
+ function AgentTokenCostByAppInnerUioToJSON(json) {
44
+ return AgentTokenCostByAppInnerUioToJSONTyped(json, false);
45
+ }
46
+ function AgentTokenCostByAppInnerUioToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'appId': value['appId'],
52
+ 'cost': value['cost'],
53
+ };
54
+ }
@@ -0,0 +1,46 @@
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 AgentTokenCostByModelInnerUio
16
+ */
17
+ export interface AgentTokenCostByModelInnerUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AgentTokenCostByModelInnerUio
22
+ */
23
+ provider: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof AgentTokenCostByModelInnerUio
28
+ */
29
+ model: string;
30
+ /**
31
+ * Montant par devise ISO ; deux devises ne s'additionnent pas. Coût figé à l'écriture de la métrique, sinon prix actuel. Les modèles Breign ne sont valorisés que pour le superAdmin.
32
+ * @type {{ [key: string]: number; }}
33
+ * @memberof AgentTokenCostByModelInnerUio
34
+ */
35
+ cost: {
36
+ [key: string]: number;
37
+ };
38
+ }
39
+ /**
40
+ * Check if a given object implements the AgentTokenCostByModelInnerUio interface.
41
+ */
42
+ export declare function instanceOfAgentTokenCostByModelInnerUio(value: object): value is AgentTokenCostByModelInnerUio;
43
+ export declare function AgentTokenCostByModelInnerUioFromJSON(json: any): AgentTokenCostByModelInnerUio;
44
+ export declare function AgentTokenCostByModelInnerUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentTokenCostByModelInnerUio;
45
+ export declare function AgentTokenCostByModelInnerUioToJSON(json: any): AgentTokenCostByModelInnerUio;
46
+ export declare function AgentTokenCostByModelInnerUioToJSONTyped(value?: AgentTokenCostByModelInnerUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,58 @@
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.instanceOfAgentTokenCostByModelInnerUio = instanceOfAgentTokenCostByModelInnerUio;
17
+ exports.AgentTokenCostByModelInnerUioFromJSON = AgentTokenCostByModelInnerUioFromJSON;
18
+ exports.AgentTokenCostByModelInnerUioFromJSONTyped = AgentTokenCostByModelInnerUioFromJSONTyped;
19
+ exports.AgentTokenCostByModelInnerUioToJSON = AgentTokenCostByModelInnerUioToJSON;
20
+ exports.AgentTokenCostByModelInnerUioToJSONTyped = AgentTokenCostByModelInnerUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AgentTokenCostByModelInnerUio interface.
23
+ */
24
+ function instanceOfAgentTokenCostByModelInnerUio(value) {
25
+ if (!('provider' in value) || value['provider'] === undefined)
26
+ return false;
27
+ if (!('model' in value) || value['model'] === undefined)
28
+ return false;
29
+ if (!('cost' in value) || value['cost'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function AgentTokenCostByModelInnerUioFromJSON(json) {
34
+ return AgentTokenCostByModelInnerUioFromJSONTyped(json, false);
35
+ }
36
+ function AgentTokenCostByModelInnerUioFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'provider': json['provider'],
42
+ 'model': json['model'],
43
+ 'cost': json['cost'],
44
+ };
45
+ }
46
+ function AgentTokenCostByModelInnerUioToJSON(json) {
47
+ return AgentTokenCostByModelInnerUioToJSONTyped(json, false);
48
+ }
49
+ function AgentTokenCostByModelInnerUioToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'provider': value['provider'],
55
+ 'model': value['model'],
56
+ 'cost': value['cost'],
57
+ };
58
+ }
@@ -0,0 +1,54 @@
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
+ import type { AgentTokenCostByAppInnerUio } from './AgentTokenCostByAppInnerUio';
13
+ import type { AgentTokenCostByModelInnerUio } from './AgentTokenCostByModelInnerUio';
14
+ /**
15
+ * Coût des tokens de l'agent sur la période (coût figé à l'écriture, sinon prix actuel). Joint seulement pour un administrateur de l'organisation ; les modèles Breign ne sont valorisés que pour le superAdmin.
16
+ * @export
17
+ * @interface AgentTokenCostUio
18
+ */
19
+ export interface AgentTokenCostUio {
20
+ /**
21
+ * Montant par devise ISO ; deux devises ne s'additionnent pas. Coût figé à l'écriture de la métrique, sinon prix actuel. Les modèles Breign ne sont valorisés que pour le superAdmin.
22
+ * @type {{ [key: string]: number; }}
23
+ * @memberof AgentTokenCostUio
24
+ */
25
+ total: {
26
+ [key: string]: number;
27
+ };
28
+ /**
29
+ * Tokens sans prix connu ; le coût est alors une estimation partielle.
30
+ * @type {number}
31
+ * @memberof AgentTokenCostUio
32
+ */
33
+ unpricedTokens: number;
34
+ /**
35
+ *
36
+ * @type {Array<AgentTokenCostByAppInnerUio>}
37
+ * @memberof AgentTokenCostUio
38
+ */
39
+ byApp: Array<AgentTokenCostByAppInnerUio>;
40
+ /**
41
+ *
42
+ * @type {Array<AgentTokenCostByModelInnerUio>}
43
+ * @memberof AgentTokenCostUio
44
+ */
45
+ byModel: Array<AgentTokenCostByModelInnerUio>;
46
+ }
47
+ /**
48
+ * Check if a given object implements the AgentTokenCostUio interface.
49
+ */
50
+ export declare function instanceOfAgentTokenCostUio(value: object): value is AgentTokenCostUio;
51
+ export declare function AgentTokenCostUioFromJSON(json: any): AgentTokenCostUio;
52
+ export declare function AgentTokenCostUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentTokenCostUio;
53
+ export declare function AgentTokenCostUioToJSON(json: any): AgentTokenCostUio;
54
+ export declare function AgentTokenCostUioToJSONTyped(value?: AgentTokenCostUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,64 @@
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.instanceOfAgentTokenCostUio = instanceOfAgentTokenCostUio;
17
+ exports.AgentTokenCostUioFromJSON = AgentTokenCostUioFromJSON;
18
+ exports.AgentTokenCostUioFromJSONTyped = AgentTokenCostUioFromJSONTyped;
19
+ exports.AgentTokenCostUioToJSON = AgentTokenCostUioToJSON;
20
+ exports.AgentTokenCostUioToJSONTyped = AgentTokenCostUioToJSONTyped;
21
+ const AgentTokenCostByAppInnerUio_1 = require("./AgentTokenCostByAppInnerUio");
22
+ const AgentTokenCostByModelInnerUio_1 = require("./AgentTokenCostByModelInnerUio");
23
+ /**
24
+ * Check if a given object implements the AgentTokenCostUio interface.
25
+ */
26
+ function instanceOfAgentTokenCostUio(value) {
27
+ if (!('total' in value) || value['total'] === undefined)
28
+ return false;
29
+ if (!('unpricedTokens' in value) || value['unpricedTokens'] === undefined)
30
+ return false;
31
+ if (!('byApp' in value) || value['byApp'] === undefined)
32
+ return false;
33
+ if (!('byModel' in value) || value['byModel'] === undefined)
34
+ return false;
35
+ return true;
36
+ }
37
+ function AgentTokenCostUioFromJSON(json) {
38
+ return AgentTokenCostUioFromJSONTyped(json, false);
39
+ }
40
+ function AgentTokenCostUioFromJSONTyped(json, ignoreDiscriminator) {
41
+ if (json == null) {
42
+ return json;
43
+ }
44
+ return {
45
+ 'total': json['total'],
46
+ 'unpricedTokens': json['unpricedTokens'],
47
+ 'byApp': (json['byApp'].map(AgentTokenCostByAppInnerUio_1.AgentTokenCostByAppInnerUioFromJSON)),
48
+ 'byModel': (json['byModel'].map(AgentTokenCostByModelInnerUio_1.AgentTokenCostByModelInnerUioFromJSON)),
49
+ };
50
+ }
51
+ function AgentTokenCostUioToJSON(json) {
52
+ return AgentTokenCostUioToJSONTyped(json, false);
53
+ }
54
+ function AgentTokenCostUioToJSONTyped(value, ignoreDiscriminator = false) {
55
+ if (value == null) {
56
+ return value;
57
+ }
58
+ return {
59
+ 'total': value['total'],
60
+ 'unpricedTokens': value['unpricedTokens'],
61
+ 'byApp': (value['byApp'].map(AgentTokenCostByAppInnerUio_1.AgentTokenCostByAppInnerUioToJSON)),
62
+ 'byModel': (value['byModel'].map(AgentTokenCostByModelInnerUio_1.AgentTokenCostByModelInnerUioToJSON)),
63
+ };
64
+ }
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- * Coût estimé, joint seulement sur le périmètre des modèles Breign (réservé au superAdmin).
13
+ * Coût estimé du périmètre demandé : moteurs de l'organisation, ou modèles Breign (`providerSource=INTERNAL`, réservé au superAdmin).
14
14
  * @export
15
15
  * @interface AiGatewayUsageCostUio
16
16
  */