@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
@@ -0,0 +1,44 @@
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 EditOrganizationMemoryFileContent409ResponseUio
16
+ */
17
+ export interface EditOrganizationMemoryFileContent409ResponseUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof EditOrganizationMemoryFileContent409ResponseUio
22
+ */
23
+ code: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof EditOrganizationMemoryFileContent409ResponseUio
28
+ */
29
+ message: string;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof EditOrganizationMemoryFileContent409ResponseUio
34
+ */
35
+ currentVersion: number;
36
+ }
37
+ /**
38
+ * Check if a given object implements the EditOrganizationMemoryFileContent409ResponseUio interface.
39
+ */
40
+ export declare function instanceOfEditOrganizationMemoryFileContent409ResponseUio(value: object): value is EditOrganizationMemoryFileContent409ResponseUio;
41
+ export declare function EditOrganizationMemoryFileContent409ResponseUioFromJSON(json: any): EditOrganizationMemoryFileContent409ResponseUio;
42
+ export declare function EditOrganizationMemoryFileContent409ResponseUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): EditOrganizationMemoryFileContent409ResponseUio;
43
+ export declare function EditOrganizationMemoryFileContent409ResponseUioToJSON(json: any): EditOrganizationMemoryFileContent409ResponseUio;
44
+ export declare function EditOrganizationMemoryFileContent409ResponseUioToJSONTyped(value?: EditOrganizationMemoryFileContent409ResponseUio | 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.instanceOfEditOrganizationMemoryFileContent409ResponseUio = instanceOfEditOrganizationMemoryFileContent409ResponseUio;
17
+ exports.EditOrganizationMemoryFileContent409ResponseUioFromJSON = EditOrganizationMemoryFileContent409ResponseUioFromJSON;
18
+ exports.EditOrganizationMemoryFileContent409ResponseUioFromJSONTyped = EditOrganizationMemoryFileContent409ResponseUioFromJSONTyped;
19
+ exports.EditOrganizationMemoryFileContent409ResponseUioToJSON = EditOrganizationMemoryFileContent409ResponseUioToJSON;
20
+ exports.EditOrganizationMemoryFileContent409ResponseUioToJSONTyped = EditOrganizationMemoryFileContent409ResponseUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the EditOrganizationMemoryFileContent409ResponseUio interface.
23
+ */
24
+ function instanceOfEditOrganizationMemoryFileContent409ResponseUio(value) {
25
+ if (!('code' in value) || value['code'] === undefined)
26
+ return false;
27
+ if (!('message' in value) || value['message'] === undefined)
28
+ return false;
29
+ if (!('currentVersion' in value) || value['currentVersion'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function EditOrganizationMemoryFileContent409ResponseUioFromJSON(json) {
34
+ return EditOrganizationMemoryFileContent409ResponseUioFromJSONTyped(json, false);
35
+ }
36
+ function EditOrganizationMemoryFileContent409ResponseUioFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'code': json['code'],
42
+ 'message': json['message'],
43
+ 'currentVersion': json['currentVersion'],
44
+ };
45
+ }
46
+ function EditOrganizationMemoryFileContent409ResponseUioToJSON(json) {
47
+ return EditOrganizationMemoryFileContent409ResponseUioToJSONTyped(json, false);
48
+ }
49
+ function EditOrganizationMemoryFileContent409ResponseUioToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'code': value['code'],
55
+ 'message': value['message'],
56
+ 'currentVersion': value['currentVersion'],
57
+ };
58
+ }
@@ -0,0 +1,62 @@
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
+ * The current state of a memory file. There is no history.
14
+ * @export
15
+ * @interface MemoryFileContentUio
16
+ */
17
+ export interface MemoryFileContentUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof MemoryFileContentUio
22
+ */
23
+ path: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof MemoryFileContentUio
28
+ */
29
+ agentId: string | null;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof MemoryFileContentUio
34
+ */
35
+ content: string;
36
+ /**
37
+ * Length of the content, in characters.
38
+ * @type {number}
39
+ * @memberof MemoryFileContentUio
40
+ */
41
+ size: number;
42
+ /**
43
+ * Incremented on every write, by an agent or a user.
44
+ * @type {number}
45
+ * @memberof MemoryFileContentUio
46
+ */
47
+ version: number;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof MemoryFileContentUio
52
+ */
53
+ updatedAt: string;
54
+ }
55
+ /**
56
+ * Check if a given object implements the MemoryFileContentUio interface.
57
+ */
58
+ export declare function instanceOfMemoryFileContentUio(value: object): value is MemoryFileContentUio;
59
+ export declare function MemoryFileContentUioFromJSON(json: any): MemoryFileContentUio;
60
+ export declare function MemoryFileContentUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): MemoryFileContentUio;
61
+ export declare function MemoryFileContentUioToJSON(json: any): MemoryFileContentUio;
62
+ export declare function MemoryFileContentUioToJSONTyped(value?: MemoryFileContentUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,70 @@
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.instanceOfMemoryFileContentUio = instanceOfMemoryFileContentUio;
17
+ exports.MemoryFileContentUioFromJSON = MemoryFileContentUioFromJSON;
18
+ exports.MemoryFileContentUioFromJSONTyped = MemoryFileContentUioFromJSONTyped;
19
+ exports.MemoryFileContentUioToJSON = MemoryFileContentUioToJSON;
20
+ exports.MemoryFileContentUioToJSONTyped = MemoryFileContentUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the MemoryFileContentUio interface.
23
+ */
24
+ function instanceOfMemoryFileContentUio(value) {
25
+ if (!('path' in value) || value['path'] === undefined)
26
+ return false;
27
+ if (!('agentId' in value) || value['agentId'] === undefined)
28
+ return false;
29
+ if (!('content' in value) || value['content'] === undefined)
30
+ return false;
31
+ if (!('size' in value) || value['size'] === undefined)
32
+ return false;
33
+ if (!('version' in value) || value['version'] === undefined)
34
+ return false;
35
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
36
+ return false;
37
+ return true;
38
+ }
39
+ function MemoryFileContentUioFromJSON(json) {
40
+ return MemoryFileContentUioFromJSONTyped(json, false);
41
+ }
42
+ function MemoryFileContentUioFromJSONTyped(json, ignoreDiscriminator) {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+ 'path': json['path'],
48
+ 'agentId': json['agentId'],
49
+ 'content': json['content'],
50
+ 'size': json['size'],
51
+ 'version': json['version'],
52
+ 'updatedAt': json['updatedAt'],
53
+ };
54
+ }
55
+ function MemoryFileContentUioToJSON(json) {
56
+ return MemoryFileContentUioToJSONTyped(json, false);
57
+ }
58
+ function MemoryFileContentUioToJSONTyped(value, ignoreDiscriminator = false) {
59
+ if (value == null) {
60
+ return value;
61
+ }
62
+ return {
63
+ 'path': value['path'],
64
+ 'agentId': value['agentId'],
65
+ 'content': value['content'],
66
+ 'size': value['size'],
67
+ 'version': value['version'],
68
+ 'updatedAt': value['updatedAt'],
69
+ };
70
+ }
@@ -0,0 +1,56 @@
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
+ * One memory file the caller can manage in the organisation. Listing entry: it carries only the start of the content (`preview`), enough to recognise the file without opening it.
14
+ * @export
15
+ * @interface MemoryFileEntryUio
16
+ */
17
+ export interface MemoryFileEntryUio {
18
+ /**
19
+ * Virtual path. Its root names the space: /org (the organisation's memory), /shared (the caller's memory shared by all their agents) or /memories (the caller's memory with one agent).
20
+ * @type {string}
21
+ * @memberof MemoryFileEntryUio
22
+ */
23
+ path: string;
24
+ /**
25
+ * The agent a /memories file belongs to; null for /org and /shared.
26
+ * @type {string}
27
+ * @memberof MemoryFileEntryUio
28
+ */
29
+ agentId: string | null;
30
+ /**
31
+ * Length of the content, in characters.
32
+ * @type {number}
33
+ * @memberof MemoryFileEntryUio
34
+ */
35
+ size: number;
36
+ /**
37
+ * Last write, by an agent or a user (ISO 8601).
38
+ * @type {string}
39
+ * @memberof MemoryFileEntryUio
40
+ */
41
+ updatedAt: string;
42
+ /**
43
+ * The first 200 characters of the content.
44
+ * @type {string}
45
+ * @memberof MemoryFileEntryUio
46
+ */
47
+ preview: string;
48
+ }
49
+ /**
50
+ * Check if a given object implements the MemoryFileEntryUio interface.
51
+ */
52
+ export declare function instanceOfMemoryFileEntryUio(value: object): value is MemoryFileEntryUio;
53
+ export declare function MemoryFileEntryUioFromJSON(json: any): MemoryFileEntryUio;
54
+ export declare function MemoryFileEntryUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): MemoryFileEntryUio;
55
+ export declare function MemoryFileEntryUioToJSON(json: any): MemoryFileEntryUio;
56
+ export declare function MemoryFileEntryUioToJSONTyped(value?: MemoryFileEntryUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,66 @@
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.instanceOfMemoryFileEntryUio = instanceOfMemoryFileEntryUio;
17
+ exports.MemoryFileEntryUioFromJSON = MemoryFileEntryUioFromJSON;
18
+ exports.MemoryFileEntryUioFromJSONTyped = MemoryFileEntryUioFromJSONTyped;
19
+ exports.MemoryFileEntryUioToJSON = MemoryFileEntryUioToJSON;
20
+ exports.MemoryFileEntryUioToJSONTyped = MemoryFileEntryUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the MemoryFileEntryUio interface.
23
+ */
24
+ function instanceOfMemoryFileEntryUio(value) {
25
+ if (!('path' in value) || value['path'] === undefined)
26
+ return false;
27
+ if (!('agentId' in value) || value['agentId'] === undefined)
28
+ return false;
29
+ if (!('size' in value) || value['size'] === undefined)
30
+ return false;
31
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
32
+ return false;
33
+ if (!('preview' in value) || value['preview'] === undefined)
34
+ return false;
35
+ return true;
36
+ }
37
+ function MemoryFileEntryUioFromJSON(json) {
38
+ return MemoryFileEntryUioFromJSONTyped(json, false);
39
+ }
40
+ function MemoryFileEntryUioFromJSONTyped(json, ignoreDiscriminator) {
41
+ if (json == null) {
42
+ return json;
43
+ }
44
+ return {
45
+ 'path': json['path'],
46
+ 'agentId': json['agentId'],
47
+ 'size': json['size'],
48
+ 'updatedAt': json['updatedAt'],
49
+ 'preview': json['preview'],
50
+ };
51
+ }
52
+ function MemoryFileEntryUioToJSON(json) {
53
+ return MemoryFileEntryUioToJSONTyped(json, false);
54
+ }
55
+ function MemoryFileEntryUioToJSONTyped(value, ignoreDiscriminator = false) {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+ return {
60
+ 'path': value['path'],
61
+ 'agentId': value['agentId'],
62
+ 'size': value['size'],
63
+ 'updatedAt': value['updatedAt'],
64
+ 'preview': value['preview'],
65
+ };
66
+ }
@@ -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
+ * A user edit of a memory file. Optimistic: `expectedVersion` is the version the client read, and the write is refused with a 409 if an agent wrote since. The file must already exist; this never creates one.
14
+ * @export
15
+ * @interface MemoryFileWriteRequestUio
16
+ */
17
+ export interface MemoryFileWriteRequestUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof MemoryFileWriteRequestUio
22
+ */
23
+ path: string;
24
+ /**
25
+ * Required for a /memories path, rejected otherwise.
26
+ * @type {string}
27
+ * @memberof MemoryFileWriteRequestUio
28
+ */
29
+ agentId?: string | null;
30
+ /**
31
+ * Bounded by the same length limit as the agents' own writes.
32
+ * @type {string}
33
+ * @memberof MemoryFileWriteRequestUio
34
+ */
35
+ content: string;
36
+ /**
37
+ * The version the client last read. A mismatch yields a 409.
38
+ * @type {number}
39
+ * @memberof MemoryFileWriteRequestUio
40
+ */
41
+ expectedVersion: number;
42
+ }
43
+ /**
44
+ * Check if a given object implements the MemoryFileWriteRequestUio interface.
45
+ */
46
+ export declare function instanceOfMemoryFileWriteRequestUio(value: object): value is MemoryFileWriteRequestUio;
47
+ export declare function MemoryFileWriteRequestUioFromJSON(json: any): MemoryFileWriteRequestUio;
48
+ export declare function MemoryFileWriteRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): MemoryFileWriteRequestUio;
49
+ export declare function MemoryFileWriteRequestUioToJSON(json: any): MemoryFileWriteRequestUio;
50
+ export declare function MemoryFileWriteRequestUioToJSONTyped(value?: MemoryFileWriteRequestUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,60 @@
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.instanceOfMemoryFileWriteRequestUio = instanceOfMemoryFileWriteRequestUio;
17
+ exports.MemoryFileWriteRequestUioFromJSON = MemoryFileWriteRequestUioFromJSON;
18
+ exports.MemoryFileWriteRequestUioFromJSONTyped = MemoryFileWriteRequestUioFromJSONTyped;
19
+ exports.MemoryFileWriteRequestUioToJSON = MemoryFileWriteRequestUioToJSON;
20
+ exports.MemoryFileWriteRequestUioToJSONTyped = MemoryFileWriteRequestUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the MemoryFileWriteRequestUio interface.
23
+ */
24
+ function instanceOfMemoryFileWriteRequestUio(value) {
25
+ if (!('path' in value) || value['path'] === undefined)
26
+ return false;
27
+ if (!('content' in value) || value['content'] === undefined)
28
+ return false;
29
+ if (!('expectedVersion' in value) || value['expectedVersion'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function MemoryFileWriteRequestUioFromJSON(json) {
34
+ return MemoryFileWriteRequestUioFromJSONTyped(json, false);
35
+ }
36
+ function MemoryFileWriteRequestUioFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'path': json['path'],
42
+ 'agentId': json['agentId'] == null ? undefined : json['agentId'],
43
+ 'content': json['content'],
44
+ 'expectedVersion': json['expectedVersion'],
45
+ };
46
+ }
47
+ function MemoryFileWriteRequestUioToJSON(json) {
48
+ return MemoryFileWriteRequestUioToJSONTyped(json, false);
49
+ }
50
+ function MemoryFileWriteRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'path': value['path'],
56
+ 'agentId': value['agentId'],
57
+ 'content': value['content'],
58
+ 'expectedVersion': value['expectedVersion'],
59
+ };
60
+ }
@@ -58,6 +58,20 @@ export interface ModelConsumptionItemUio {
58
58
  * @memberof ModelConsumptionItemUio
59
59
  */
60
60
  totalTokens: number;
61
+ /**
62
+ * 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.
63
+ * @type {{ [key: string]: number; }}
64
+ * @memberof ModelConsumptionItemUio
65
+ */
66
+ cost: {
67
+ [key: string]: number;
68
+ };
69
+ /**
70
+ *
71
+ * @type {number}
72
+ * @memberof ModelConsumptionItemUio
73
+ */
74
+ unpricedTokens: number;
61
75
  /**
62
76
  *
63
77
  * @type {Array<ModelConsumptionSliceUio>}
@@ -37,6 +37,10 @@ function instanceOfModelConsumptionItemUio(value) {
37
37
  return false;
38
38
  if (!('totalTokens' in value) || value['totalTokens'] === undefined)
39
39
  return false;
40
+ if (!('cost' in value) || value['cost'] === undefined)
41
+ return false;
42
+ if (!('unpricedTokens' in value) || value['unpricedTokens'] === undefined)
43
+ return false;
40
44
  if (!('sources' in value) || value['sources'] === undefined)
41
45
  return false;
42
46
  if (!('users' in value) || value['users'] === undefined)
@@ -58,6 +62,8 @@ function ModelConsumptionItemUioFromJSONTyped(json, ignoreDiscriminator) {
58
62
  'inputTokens': json['inputTokens'],
59
63
  'outputTokens': json['outputTokens'],
60
64
  'totalTokens': json['totalTokens'],
65
+ 'cost': json['cost'],
66
+ 'unpricedTokens': json['unpricedTokens'],
61
67
  'sources': (json['sources'].map(ModelConsumptionSliceUio_1.ModelConsumptionSliceUioFromJSON)),
62
68
  'users': (json['users'].map(ModelConsumptionSliceUio_1.ModelConsumptionSliceUioFromJSON)),
63
69
  };
@@ -77,6 +83,8 @@ function ModelConsumptionItemUioToJSONTyped(value, ignoreDiscriminator = false)
77
83
  'inputTokens': value['inputTokens'],
78
84
  'outputTokens': value['outputTokens'],
79
85
  'totalTokens': value['totalTokens'],
86
+ 'cost': value['cost'],
87
+ 'unpricedTokens': value['unpricedTokens'],
80
88
  'sources': (value['sources'].map(ModelConsumptionSliceUio_1.ModelConsumptionSliceUioToJSON)),
81
89
  'users': (value['users'].map(ModelConsumptionSliceUio_1.ModelConsumptionSliceUioToJSON)),
82
90
  };
@@ -57,6 +57,20 @@ export interface ModelConsumptionSliceUio {
57
57
  * @memberof ModelConsumptionSliceUio
58
58
  */
59
59
  totalTokens: number;
60
+ /**
61
+ * 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.
62
+ * @type {{ [key: string]: number; }}
63
+ * @memberof ModelConsumptionSliceUio
64
+ */
65
+ cost: {
66
+ [key: string]: number;
67
+ };
68
+ /**
69
+ * Tokens sans prix connu ; le coût est alors une estimation partielle.
70
+ * @type {number}
71
+ * @memberof ModelConsumptionSliceUio
72
+ */
73
+ unpricedTokens: number;
60
74
  }
61
75
  /**
62
76
  * @export
@@ -46,6 +46,10 @@ function instanceOfModelConsumptionSliceUio(value) {
46
46
  return false;
47
47
  if (!('totalTokens' in value) || value['totalTokens'] === undefined)
48
48
  return false;
49
+ if (!('cost' in value) || value['cost'] === undefined)
50
+ return false;
51
+ if (!('unpricedTokens' in value) || value['unpricedTokens'] === undefined)
52
+ return false;
49
53
  return true;
50
54
  }
51
55
  function ModelConsumptionSliceUioFromJSON(json) {
@@ -63,6 +67,8 @@ function ModelConsumptionSliceUioFromJSONTyped(json, ignoreDiscriminator) {
63
67
  'inputTokens': json['inputTokens'],
64
68
  'outputTokens': json['outputTokens'],
65
69
  'totalTokens': json['totalTokens'],
70
+ 'cost': json['cost'],
71
+ 'unpricedTokens': json['unpricedTokens'],
66
72
  };
67
73
  }
68
74
  function ModelConsumptionSliceUioToJSON(json) {
@@ -80,5 +86,7 @@ function ModelConsumptionSliceUioToJSONTyped(value, ignoreDiscriminator = false)
80
86
  'inputTokens': value['inputTokens'],
81
87
  'outputTokens': value['outputTokens'],
82
88
  'totalTokens': value['totalTokens'],
89
+ 'cost': value['cost'],
90
+ 'unpricedTokens': value['unpricedTokens'],
83
91
  };
84
92
  }
@@ -45,6 +45,20 @@ export interface OrganizationModelConsumptionTotalUio {
45
45
  * @memberof OrganizationModelConsumptionTotalUio
46
46
  */
47
47
  uniqueUsers: number;
48
+ /**
49
+ * 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.
50
+ * @type {{ [key: string]: number; }}
51
+ * @memberof OrganizationModelConsumptionTotalUio
52
+ */
53
+ cost: {
54
+ [key: string]: number;
55
+ };
56
+ /**
57
+ *
58
+ * @type {number}
59
+ * @memberof OrganizationModelConsumptionTotalUio
60
+ */
61
+ unpricedTokens: number;
48
62
  }
49
63
  /**
50
64
  * Check if a given object implements the OrganizationModelConsumptionTotalUio interface.
@@ -32,6 +32,10 @@ function instanceOfOrganizationModelConsumptionTotalUio(value) {
32
32
  return false;
33
33
  if (!('uniqueUsers' in value) || value['uniqueUsers'] === undefined)
34
34
  return false;
35
+ if (!('cost' in value) || value['cost'] === undefined)
36
+ return false;
37
+ if (!('unpricedTokens' in value) || value['unpricedTokens'] === undefined)
38
+ return false;
35
39
  return true;
36
40
  }
37
41
  function OrganizationModelConsumptionTotalUioFromJSON(json) {
@@ -47,6 +51,8 @@ function OrganizationModelConsumptionTotalUioFromJSONTyped(json, ignoreDiscrimin
47
51
  'outputTokens': json['outputTokens'],
48
52
  'totalTokens': json['totalTokens'],
49
53
  'uniqueUsers': json['uniqueUsers'],
54
+ 'cost': json['cost'],
55
+ 'unpricedTokens': json['unpricedTokens'],
50
56
  };
51
57
  }
52
58
  function OrganizationModelConsumptionTotalUioToJSON(json) {
@@ -62,5 +68,7 @@ function OrganizationModelConsumptionTotalUioToJSONTyped(value, ignoreDiscrimina
62
68
  'outputTokens': value['outputTokens'],
63
69
  'totalTokens': value['totalTokens'],
64
70
  'uniqueUsers': value['uniqueUsers'],
71
+ 'cost': value['cost'],
72
+ 'unpricedTokens': value['unpricedTokens'],
65
73
  };
66
74
  }
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { ModelConsumptionSliceUio } from './ModelConsumptionSliceUio';
12
13
  import type { OrganizationModelConsumptionTotalUio } from './OrganizationModelConsumptionTotalUio';
13
14
  import type { ModelConsumptionItemUio } from './ModelConsumptionItemUio';
14
15
  /**
@@ -29,6 +30,12 @@ export interface OrganizationModelConsumptionUio {
29
30
  * @memberof OrganizationModelConsumptionUio
30
31
  */
31
32
  byModel: Array<ModelConsumptionItemUio>;
33
+ /**
34
+ * Consommation par utilisateur, tous modèles confondus.
35
+ * @type {Array<ModelConsumptionSliceUio>}
36
+ * @memberof OrganizationModelConsumptionUio
37
+ */
38
+ byUser: Array<ModelConsumptionSliceUio>;
32
39
  }
33
40
  /**
34
41
  * Check if a given object implements the OrganizationModelConsumptionUio interface.
@@ -18,6 +18,7 @@ exports.OrganizationModelConsumptionUioFromJSON = OrganizationModelConsumptionUi
18
18
  exports.OrganizationModelConsumptionUioFromJSONTyped = OrganizationModelConsumptionUioFromJSONTyped;
19
19
  exports.OrganizationModelConsumptionUioToJSON = OrganizationModelConsumptionUioToJSON;
20
20
  exports.OrganizationModelConsumptionUioToJSONTyped = OrganizationModelConsumptionUioToJSONTyped;
21
+ const ModelConsumptionSliceUio_1 = require("./ModelConsumptionSliceUio");
21
22
  const OrganizationModelConsumptionTotalUio_1 = require("./OrganizationModelConsumptionTotalUio");
22
23
  const ModelConsumptionItemUio_1 = require("./ModelConsumptionItemUio");
23
24
  /**
@@ -28,6 +29,8 @@ function instanceOfOrganizationModelConsumptionUio(value) {
28
29
  return false;
29
30
  if (!('byModel' in value) || value['byModel'] === undefined)
30
31
  return false;
32
+ if (!('byUser' in value) || value['byUser'] === undefined)
33
+ return false;
31
34
  return true;
32
35
  }
33
36
  function OrganizationModelConsumptionUioFromJSON(json) {
@@ -40,6 +43,7 @@ function OrganizationModelConsumptionUioFromJSONTyped(json, ignoreDiscriminator)
40
43
  return {
41
44
  'total': (0, OrganizationModelConsumptionTotalUio_1.OrganizationModelConsumptionTotalUioFromJSON)(json['total']),
42
45
  'byModel': (json['byModel'].map(ModelConsumptionItemUio_1.ModelConsumptionItemUioFromJSON)),
46
+ 'byUser': (json['byUser'].map(ModelConsumptionSliceUio_1.ModelConsumptionSliceUioFromJSON)),
43
47
  };
44
48
  }
45
49
  function OrganizationModelConsumptionUioToJSON(json) {
@@ -52,5 +56,6 @@ function OrganizationModelConsumptionUioToJSONTyped(value, ignoreDiscriminator =
52
56
  return {
53
57
  'total': (0, OrganizationModelConsumptionTotalUio_1.OrganizationModelConsumptionTotalUioToJSON)(value['total']),
54
58
  'byModel': (value['byModel'].map(ModelConsumptionItemUio_1.ModelConsumptionItemUioToJSON)),
59
+ 'byUser': (value['byUser'].map(ModelConsumptionSliceUio_1.ModelConsumptionSliceUioToJSON)),
55
60
  };
56
61
  }