@breign/client 1.0.167 → 1.0.169

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.
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AcceptTicketProposalRequestUio, ConversationTicketProposalUio, CreateTicketArtifactRequestUio, CreateTicketArtifactResponseUio, CreateTicketEventRequestUio, CreateTicketRequestUio, MemberTypeUio, SetTicketAssigneesRequestUio, TicketAgentExecutionUio, TicketArtifactDownloadUrlUio, TicketArtifactUio, TicketBoardUio, TicketEventUio, TicketReviewRequestUio, TicketStatusUio, TicketUio, UpdateTicketRequestUio } from '../models/index';
13
+ import type { AcceptTicketProposalRequestUio, ConversationTicketProposalUio, CreateTicketArtifactRequestUio, CreateTicketArtifactResponseUio, CreateTicketEventRequestUio, CreateTicketRequestUio, MemberTypeUio, SetTicketAssigneesRequestUio, TicketAgentExecutionUio, TicketArtifactDownloadUrlUio, TicketArtifactUio, TicketBoardUio, TicketEventUio, TicketReviewRequestUio, TicketStatusUio, TicketUio, TicketUsageUio, UpdateTicketRequestUio } from '../models/index';
14
14
  export interface AcceptTicketProposalRequest {
15
15
  proposalId: string;
16
16
  acceptTicketProposalRequestUio: AcceptTicketProposalRequestUio;
@@ -52,6 +52,9 @@ export interface GetTicketByKeyRequest {
52
52
  organizationId: string;
53
53
  ticketKey: string;
54
54
  }
55
+ export interface GetTicketUsageRequest {
56
+ ticketId: string;
57
+ }
55
58
  export interface GiveTicketGoAheadRequest {
56
59
  ticketId: string;
57
60
  assigneeType: MemberTypeUio;
@@ -208,6 +211,16 @@ export declare class TicketsApi extends runtime.BaseAPI {
208
211
  * Get a ticket by its key
209
212
  */
210
213
  getTicketByKey(organizationId: string, ticketKey: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TicketUio>;
214
+ /**
215
+ * Tokens consommés par les sessions de travail des agents sur le ticket et par les appels qu\'elles ont faits à d\'autres agents : au total, par modèle, et par agent puis par modèle.
216
+ * Get the tokens consumed by the agents on a ticket
217
+ */
218
+ getTicketUsageRaw(requestParameters: GetTicketUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TicketUsageUio>>;
219
+ /**
220
+ * Tokens consommés par les sessions de travail des agents sur le ticket et par les appels qu\'elles ont faits à d\'autres agents : au total, par modèle, et par agent puis par modèle.
221
+ * Get the tokens consumed by the agents on a ticket
222
+ */
223
+ getTicketUsage(ticketId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TicketUsageUio>;
211
224
  /**
212
225
  * Feu vert à un assigné en attente (held) : il passe à assigned et peut commencer.
213
226
  * Give the go-ahead to an assignee
@@ -403,6 +403,35 @@ class TicketsApi extends runtime.BaseAPI {
403
403
  const response = await this.getTicketByKeyRaw({ organizationId: organizationId, ticketKey: ticketKey }, initOverrides);
404
404
  return await response.value();
405
405
  }
406
+ /**
407
+ * Tokens consommés par les sessions de travail des agents sur le ticket et par les appels qu\'elles ont faits à d\'autres agents : au total, par modèle, et par agent puis par modèle.
408
+ * Get the tokens consumed by the agents on a ticket
409
+ */
410
+ async getTicketUsageRaw(requestParameters, initOverrides) {
411
+ if (requestParameters['ticketId'] == null) {
412
+ throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling getTicketUsage().');
413
+ }
414
+ const queryParameters = {};
415
+ const headerParameters = {};
416
+ if (this.configuration && this.configuration.apiKey) {
417
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
418
+ }
419
+ const response = await this.request({
420
+ path: `/tickets/{ticketId}/usage`.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId']))),
421
+ method: 'GET',
422
+ headers: headerParameters,
423
+ query: queryParameters,
424
+ }, initOverrides);
425
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TicketUsageUioFromJSON)(jsonValue));
426
+ }
427
+ /**
428
+ * Tokens consommés par les sessions de travail des agents sur le ticket et par les appels qu\'elles ont faits à d\'autres agents : au total, par modèle, et par agent puis par modèle.
429
+ * Get the tokens consumed by the agents on a ticket
430
+ */
431
+ async getTicketUsage(ticketId, initOverrides) {
432
+ const response = await this.getTicketUsageRaw({ ticketId: ticketId }, initOverrides);
433
+ return await response.value();
434
+ }
406
435
  /**
407
436
  * Feu vert à un assigné en attente (held) : il passe à assigned et peut commencer.
408
437
  * Give the go-ahead to an assignee
@@ -0,0 +1,63 @@
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 { TicketModelUsageUio } from './TicketModelUsageUio';
13
+ /**
14
+ * Tokens consommés par un agent sur le ticket, par modèle.
15
+ * @export
16
+ * @interface TicketAgentUsageUio
17
+ */
18
+ export interface TicketAgentUsageUio {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof TicketAgentUsageUio
23
+ */
24
+ agentId: string;
25
+ /**
26
+ *
27
+ * @type {number}
28
+ * @memberof TicketAgentUsageUio
29
+ */
30
+ inputTokens: number;
31
+ /**
32
+ *
33
+ * @type {number}
34
+ * @memberof TicketAgentUsageUio
35
+ */
36
+ outputTokens: number;
37
+ /**
38
+ *
39
+ * @type {number}
40
+ * @memberof TicketAgentUsageUio
41
+ */
42
+ reasoningTokens: number;
43
+ /**
44
+ *
45
+ * @type {number}
46
+ * @memberof TicketAgentUsageUio
47
+ */
48
+ totalTokens: number;
49
+ /**
50
+ *
51
+ * @type {Array<TicketModelUsageUio>}
52
+ * @memberof TicketAgentUsageUio
53
+ */
54
+ models: Array<TicketModelUsageUio>;
55
+ }
56
+ /**
57
+ * Check if a given object implements the TicketAgentUsageUio interface.
58
+ */
59
+ export declare function instanceOfTicketAgentUsageUio(value: object): value is TicketAgentUsageUio;
60
+ export declare function TicketAgentUsageUioFromJSON(json: any): TicketAgentUsageUio;
61
+ export declare function TicketAgentUsageUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): TicketAgentUsageUio;
62
+ export declare function TicketAgentUsageUioToJSON(json: any): TicketAgentUsageUio;
63
+ export declare function TicketAgentUsageUioToJSONTyped(value?: TicketAgentUsageUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,71 @@
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.instanceOfTicketAgentUsageUio = instanceOfTicketAgentUsageUio;
17
+ exports.TicketAgentUsageUioFromJSON = TicketAgentUsageUioFromJSON;
18
+ exports.TicketAgentUsageUioFromJSONTyped = TicketAgentUsageUioFromJSONTyped;
19
+ exports.TicketAgentUsageUioToJSON = TicketAgentUsageUioToJSON;
20
+ exports.TicketAgentUsageUioToJSONTyped = TicketAgentUsageUioToJSONTyped;
21
+ const TicketModelUsageUio_1 = require("./TicketModelUsageUio");
22
+ /**
23
+ * Check if a given object implements the TicketAgentUsageUio interface.
24
+ */
25
+ function instanceOfTicketAgentUsageUio(value) {
26
+ if (!('agentId' in value) || value['agentId'] === undefined)
27
+ return false;
28
+ if (!('inputTokens' in value) || value['inputTokens'] === undefined)
29
+ return false;
30
+ if (!('outputTokens' in value) || value['outputTokens'] === undefined)
31
+ return false;
32
+ if (!('reasoningTokens' in value) || value['reasoningTokens'] === undefined)
33
+ return false;
34
+ if (!('totalTokens' in value) || value['totalTokens'] === undefined)
35
+ return false;
36
+ if (!('models' in value) || value['models'] === undefined)
37
+ return false;
38
+ return true;
39
+ }
40
+ function TicketAgentUsageUioFromJSON(json) {
41
+ return TicketAgentUsageUioFromJSONTyped(json, false);
42
+ }
43
+ function TicketAgentUsageUioFromJSONTyped(json, ignoreDiscriminator) {
44
+ if (json == null) {
45
+ return json;
46
+ }
47
+ return {
48
+ 'agentId': json['agentId'],
49
+ 'inputTokens': json['inputTokens'],
50
+ 'outputTokens': json['outputTokens'],
51
+ 'reasoningTokens': json['reasoningTokens'],
52
+ 'totalTokens': json['totalTokens'],
53
+ 'models': (json['models'].map(TicketModelUsageUio_1.TicketModelUsageUioFromJSON)),
54
+ };
55
+ }
56
+ function TicketAgentUsageUioToJSON(json) {
57
+ return TicketAgentUsageUioToJSONTyped(json, false);
58
+ }
59
+ function TicketAgentUsageUioToJSONTyped(value, ignoreDiscriminator = false) {
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+ return {
64
+ 'agentId': value['agentId'],
65
+ 'inputTokens': value['inputTokens'],
66
+ 'outputTokens': value['outputTokens'],
67
+ 'reasoningTokens': value['reasoningTokens'],
68
+ 'totalTokens': value['totalTokens'],
69
+ 'models': (value['models'].map(TicketModelUsageUio_1.TicketModelUsageUioToJSON)),
70
+ };
71
+ }
@@ -0,0 +1,68 @@
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
+ * Tokens consommés avec un modèle d'un provider.
14
+ * @export
15
+ * @interface TicketModelUsageUio
16
+ */
17
+ export interface TicketModelUsageUio {
18
+ /**
19
+ * Nom du modèle tel qu'envoyé au provider ; unknown s'il n'a pas été relevé
20
+ * @type {string}
21
+ * @memberof TicketModelUsageUio
22
+ */
23
+ model: string;
24
+ /**
25
+ * Identifiant du provider
26
+ * @type {string}
27
+ * @memberof TicketModelUsageUio
28
+ */
29
+ provider: string | null;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof TicketModelUsageUio
34
+ */
35
+ providerName: string | null;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof TicketModelUsageUio
40
+ */
41
+ inputTokens: number;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof TicketModelUsageUio
46
+ */
47
+ outputTokens: number;
48
+ /**
49
+ *
50
+ * @type {number}
51
+ * @memberof TicketModelUsageUio
52
+ */
53
+ reasoningTokens: number;
54
+ /**
55
+ *
56
+ * @type {number}
57
+ * @memberof TicketModelUsageUio
58
+ */
59
+ totalTokens: number;
60
+ }
61
+ /**
62
+ * Check if a given object implements the TicketModelUsageUio interface.
63
+ */
64
+ export declare function instanceOfTicketModelUsageUio(value: object): value is TicketModelUsageUio;
65
+ export declare function TicketModelUsageUioFromJSON(json: any): TicketModelUsageUio;
66
+ export declare function TicketModelUsageUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): TicketModelUsageUio;
67
+ export declare function TicketModelUsageUioToJSON(json: any): TicketModelUsageUio;
68
+ export declare function TicketModelUsageUioToJSONTyped(value?: TicketModelUsageUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,74 @@
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.instanceOfTicketModelUsageUio = instanceOfTicketModelUsageUio;
17
+ exports.TicketModelUsageUioFromJSON = TicketModelUsageUioFromJSON;
18
+ exports.TicketModelUsageUioFromJSONTyped = TicketModelUsageUioFromJSONTyped;
19
+ exports.TicketModelUsageUioToJSON = TicketModelUsageUioToJSON;
20
+ exports.TicketModelUsageUioToJSONTyped = TicketModelUsageUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the TicketModelUsageUio interface.
23
+ */
24
+ function instanceOfTicketModelUsageUio(value) {
25
+ if (!('model' in value) || value['model'] === undefined)
26
+ return false;
27
+ if (!('provider' in value) || value['provider'] === undefined)
28
+ return false;
29
+ if (!('providerName' in value) || value['providerName'] === undefined)
30
+ return false;
31
+ if (!('inputTokens' in value) || value['inputTokens'] === undefined)
32
+ return false;
33
+ if (!('outputTokens' in value) || value['outputTokens'] === undefined)
34
+ return false;
35
+ if (!('reasoningTokens' in value) || value['reasoningTokens'] === undefined)
36
+ return false;
37
+ if (!('totalTokens' in value) || value['totalTokens'] === undefined)
38
+ return false;
39
+ return true;
40
+ }
41
+ function TicketModelUsageUioFromJSON(json) {
42
+ return TicketModelUsageUioFromJSONTyped(json, false);
43
+ }
44
+ function TicketModelUsageUioFromJSONTyped(json, ignoreDiscriminator) {
45
+ if (json == null) {
46
+ return json;
47
+ }
48
+ return {
49
+ 'model': json['model'],
50
+ 'provider': json['provider'],
51
+ 'providerName': json['providerName'],
52
+ 'inputTokens': json['inputTokens'],
53
+ 'outputTokens': json['outputTokens'],
54
+ 'reasoningTokens': json['reasoningTokens'],
55
+ 'totalTokens': json['totalTokens'],
56
+ };
57
+ }
58
+ function TicketModelUsageUioToJSON(json) {
59
+ return TicketModelUsageUioToJSONTyped(json, false);
60
+ }
61
+ function TicketModelUsageUioToJSONTyped(value, ignoreDiscriminator = false) {
62
+ if (value == null) {
63
+ return value;
64
+ }
65
+ return {
66
+ 'model': value['model'],
67
+ 'provider': value['provider'],
68
+ 'providerName': value['providerName'],
69
+ 'inputTokens': value['inputTokens'],
70
+ 'outputTokens': value['outputTokens'],
71
+ 'reasoningTokens': value['reasoningTokens'],
72
+ 'totalTokens': value['totalTokens'],
73
+ };
74
+ }
@@ -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
+ import type { TicketAgentUsageUio } from './TicketAgentUsageUio';
13
+ import type { TicketModelUsageUio } from './TicketModelUsageUio';
14
+ /**
15
+ * Consommation du ticket : sessions de travail des agents et conversations ouvertes par leurs appels à d'autres agents. Modèles et agents triés du plus consommateur au moins consommateur.
16
+ * @export
17
+ * @interface TicketUsageUio
18
+ */
19
+ export interface TicketUsageUio {
20
+ /**
21
+ *
22
+ * @type {number}
23
+ * @memberof TicketUsageUio
24
+ */
25
+ inputTokens: number;
26
+ /**
27
+ *
28
+ * @type {number}
29
+ * @memberof TicketUsageUio
30
+ */
31
+ outputTokens: number;
32
+ /**
33
+ *
34
+ * @type {number}
35
+ * @memberof TicketUsageUio
36
+ */
37
+ reasoningTokens: number;
38
+ /**
39
+ *
40
+ * @type {number}
41
+ * @memberof TicketUsageUio
42
+ */
43
+ totalTokens: number;
44
+ /**
45
+ *
46
+ * @type {Array<TicketModelUsageUio>}
47
+ * @memberof TicketUsageUio
48
+ */
49
+ models: Array<TicketModelUsageUio>;
50
+ /**
51
+ *
52
+ * @type {Array<TicketAgentUsageUio>}
53
+ * @memberof TicketUsageUio
54
+ */
55
+ agents: Array<TicketAgentUsageUio>;
56
+ }
57
+ /**
58
+ * Check if a given object implements the TicketUsageUio interface.
59
+ */
60
+ export declare function instanceOfTicketUsageUio(value: object): value is TicketUsageUio;
61
+ export declare function TicketUsageUioFromJSON(json: any): TicketUsageUio;
62
+ export declare function TicketUsageUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): TicketUsageUio;
63
+ export declare function TicketUsageUioToJSON(json: any): TicketUsageUio;
64
+ export declare function TicketUsageUioToJSONTyped(value?: TicketUsageUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,72 @@
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.instanceOfTicketUsageUio = instanceOfTicketUsageUio;
17
+ exports.TicketUsageUioFromJSON = TicketUsageUioFromJSON;
18
+ exports.TicketUsageUioFromJSONTyped = TicketUsageUioFromJSONTyped;
19
+ exports.TicketUsageUioToJSON = TicketUsageUioToJSON;
20
+ exports.TicketUsageUioToJSONTyped = TicketUsageUioToJSONTyped;
21
+ const TicketAgentUsageUio_1 = require("./TicketAgentUsageUio");
22
+ const TicketModelUsageUio_1 = require("./TicketModelUsageUio");
23
+ /**
24
+ * Check if a given object implements the TicketUsageUio interface.
25
+ */
26
+ function instanceOfTicketUsageUio(value) {
27
+ if (!('inputTokens' in value) || value['inputTokens'] === undefined)
28
+ return false;
29
+ if (!('outputTokens' in value) || value['outputTokens'] === undefined)
30
+ return false;
31
+ if (!('reasoningTokens' in value) || value['reasoningTokens'] === undefined)
32
+ return false;
33
+ if (!('totalTokens' in value) || value['totalTokens'] === undefined)
34
+ return false;
35
+ if (!('models' in value) || value['models'] === undefined)
36
+ return false;
37
+ if (!('agents' in value) || value['agents'] === undefined)
38
+ return false;
39
+ return true;
40
+ }
41
+ function TicketUsageUioFromJSON(json) {
42
+ return TicketUsageUioFromJSONTyped(json, false);
43
+ }
44
+ function TicketUsageUioFromJSONTyped(json, ignoreDiscriminator) {
45
+ if (json == null) {
46
+ return json;
47
+ }
48
+ return {
49
+ 'inputTokens': json['inputTokens'],
50
+ 'outputTokens': json['outputTokens'],
51
+ 'reasoningTokens': json['reasoningTokens'],
52
+ 'totalTokens': json['totalTokens'],
53
+ 'models': (json['models'].map(TicketModelUsageUio_1.TicketModelUsageUioFromJSON)),
54
+ 'agents': (json['agents'].map(TicketAgentUsageUio_1.TicketAgentUsageUioFromJSON)),
55
+ };
56
+ }
57
+ function TicketUsageUioToJSON(json) {
58
+ return TicketUsageUioToJSONTyped(json, false);
59
+ }
60
+ function TicketUsageUioToJSONTyped(value, ignoreDiscriminator = false) {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+ 'inputTokens': value['inputTokens'],
66
+ 'outputTokens': value['outputTokens'],
67
+ 'reasoningTokens': value['reasoningTokens'],
68
+ 'totalTokens': value['totalTokens'],
69
+ 'models': (value['models'].map(TicketModelUsageUio_1.TicketModelUsageUioToJSON)),
70
+ 'agents': (value['agents'].map(TicketAgentUsageUio_1.TicketAgentUsageUioToJSON)),
71
+ };
72
+ }
@@ -499,6 +499,7 @@ export * from './TicketAgentExecutionPendingQuestionUio';
499
499
  export * from './TicketAgentExecutionUio';
500
500
  export * from './TicketAgentPlanUio';
501
501
  export * from './TicketAgentRunStatusUio';
502
+ export * from './TicketAgentUsageUio';
502
503
  export * from './TicketArtifactDownloadUrlUio';
503
504
  export * from './TicketArtifactSourceUio';
504
505
  export * from './TicketArtifactStatusUio';
@@ -510,6 +511,7 @@ export * from './TicketBoardColumnUio';
510
511
  export * from './TicketBoardUio';
511
512
  export * from './TicketEventKindUio';
512
513
  export * from './TicketEventUio';
514
+ export * from './TicketModelUsageUio';
513
515
  export * from './TicketPlanStepStatusUio';
514
516
  export * from './TicketPlanStepUio';
515
517
  export * from './TicketPriorityUio';
@@ -520,6 +522,7 @@ export * from './TicketReviewRequestUio';
520
522
  export * from './TicketStartModeUio';
521
523
  export * from './TicketStatusUio';
522
524
  export * from './TicketUio';
525
+ export * from './TicketUsageUio';
523
526
  export * from './TokenUsageUio';
524
527
  export * from './ToolActionUio';
525
528
  export * from './ToolAllowedToolsRequestUio';
@@ -517,6 +517,7 @@ __exportStar(require("./TicketAgentExecutionPendingQuestionUio"), exports);
517
517
  __exportStar(require("./TicketAgentExecutionUio"), exports);
518
518
  __exportStar(require("./TicketAgentPlanUio"), exports);
519
519
  __exportStar(require("./TicketAgentRunStatusUio"), exports);
520
+ __exportStar(require("./TicketAgentUsageUio"), exports);
520
521
  __exportStar(require("./TicketArtifactDownloadUrlUio"), exports);
521
522
  __exportStar(require("./TicketArtifactSourceUio"), exports);
522
523
  __exportStar(require("./TicketArtifactStatusUio"), exports);
@@ -528,6 +529,7 @@ __exportStar(require("./TicketBoardColumnUio"), exports);
528
529
  __exportStar(require("./TicketBoardUio"), exports);
529
530
  __exportStar(require("./TicketEventKindUio"), exports);
530
531
  __exportStar(require("./TicketEventUio"), exports);
532
+ __exportStar(require("./TicketModelUsageUio"), exports);
531
533
  __exportStar(require("./TicketPlanStepStatusUio"), exports);
532
534
  __exportStar(require("./TicketPlanStepUio"), exports);
533
535
  __exportStar(require("./TicketPriorityUio"), exports);
@@ -538,6 +540,7 @@ __exportStar(require("./TicketReviewRequestUio"), exports);
538
540
  __exportStar(require("./TicketStartModeUio"), exports);
539
541
  __exportStar(require("./TicketStatusUio"), exports);
540
542
  __exportStar(require("./TicketUio"), exports);
543
+ __exportStar(require("./TicketUsageUio"), exports);
541
544
  __exportStar(require("./TokenUsageUio"), exports);
542
545
  __exportStar(require("./ToolActionUio"), exports);
543
546
  __exportStar(require("./ToolAllowedToolsRequestUio"), exports);
package/dist/openapi.json CHANGED
@@ -17207,6 +17207,45 @@
17207
17207
  "tags" : [ "tickets" ]
17208
17208
  }
17209
17209
  },
17210
+ "/tickets/{ticketId}/usage" : {
17211
+ "get" : {
17212
+ "description" : "Tokens consommés par les sessions de travail des agents sur le ticket et par les appels qu'elles ont faits à d'autres agents : au total, par modèle, et par agent puis par modèle.",
17213
+ "operationId" : "getTicketUsage",
17214
+ "parameters" : [ {
17215
+ "description" : "ID of the ticket",
17216
+ "in" : "path",
17217
+ "name" : "ticketId",
17218
+ "required" : true,
17219
+ "schema" : {
17220
+ "format" : "uuid",
17221
+ "type" : "string"
17222
+ }
17223
+ } ],
17224
+ "responses" : {
17225
+ "200" : {
17226
+ "content" : {
17227
+ "application/json" : {
17228
+ "schema" : {
17229
+ "$ref" : "#/components/schemas/TicketUsage"
17230
+ }
17231
+ }
17232
+ },
17233
+ "description" : "OK"
17234
+ },
17235
+ "401" : {
17236
+ "description" : "Unauthenticated"
17237
+ },
17238
+ "403" : {
17239
+ "description" : "Forbidden — the caller is not part of the organization or not a member of the project"
17240
+ },
17241
+ "404" : {
17242
+ "description" : "Not found"
17243
+ }
17244
+ },
17245
+ "summary" : "Get the tokens consumed by the agents on a ticket",
17246
+ "tags" : [ "tickets" ]
17247
+ }
17248
+ },
17210
17249
  "/tickets/{ticketId}/events" : {
17211
17250
  "get" : {
17212
17251
  "description" : "Fil du ticket, du plus ancien au plus récent : commentaires, rapports, questions et événements.",
@@ -19093,7 +19132,7 @@
19093
19132
  "type" : "boolean"
19094
19133
  },
19095
19134
  "maxToolSteps" : {
19096
- "maximum" : 50,
19135
+ "maximum" : 500,
19097
19136
  "minimum" : 1,
19098
19137
  "type" : "integer"
19099
19138
  },
@@ -19571,7 +19610,7 @@
19571
19610
  "type" : "boolean"
19572
19611
  },
19573
19612
  "maxToolSteps" : {
19574
- "maximum" : 50,
19613
+ "maximum" : 500,
19575
19614
  "minimum" : 1,
19576
19615
  "type" : "integer"
19577
19616
  },
@@ -28249,6 +28288,97 @@
28249
28288
  "required" : [ "status", "title" ],
28250
28289
  "type" : "object"
28251
28290
  },
28291
+ "TicketUsage" : {
28292
+ "description" : "Consommation du ticket : sessions de travail des agents et conversations ouvertes par leurs appels à d'autres agents. Modèles et agents triés du plus consommateur au moins consommateur.",
28293
+ "properties" : {
28294
+ "inputTokens" : {
28295
+ "type" : "integer"
28296
+ },
28297
+ "outputTokens" : {
28298
+ "type" : "integer"
28299
+ },
28300
+ "reasoningTokens" : {
28301
+ "type" : "integer"
28302
+ },
28303
+ "totalTokens" : {
28304
+ "type" : "integer"
28305
+ },
28306
+ "models" : {
28307
+ "items" : {
28308
+ "$ref" : "#/components/schemas/TicketModelUsage"
28309
+ },
28310
+ "type" : "array"
28311
+ },
28312
+ "agents" : {
28313
+ "items" : {
28314
+ "$ref" : "#/components/schemas/TicketAgentUsage"
28315
+ },
28316
+ "type" : "array"
28317
+ }
28318
+ },
28319
+ "required" : [ "agents", "inputTokens", "models", "outputTokens", "reasoningTokens", "totalTokens" ],
28320
+ "type" : "object"
28321
+ },
28322
+ "TicketModelUsage" : {
28323
+ "description" : "Tokens consommés avec un modèle d'un provider.",
28324
+ "properties" : {
28325
+ "model" : {
28326
+ "description" : "Nom du modèle tel qu'envoyé au provider ; unknown s'il n'a pas été relevé",
28327
+ "type" : "string"
28328
+ },
28329
+ "provider" : {
28330
+ "description" : "Identifiant du provider",
28331
+ "nullable" : true,
28332
+ "type" : "string"
28333
+ },
28334
+ "providerName" : {
28335
+ "nullable" : true,
28336
+ "type" : "string"
28337
+ },
28338
+ "inputTokens" : {
28339
+ "type" : "integer"
28340
+ },
28341
+ "outputTokens" : {
28342
+ "type" : "integer"
28343
+ },
28344
+ "reasoningTokens" : {
28345
+ "type" : "integer"
28346
+ },
28347
+ "totalTokens" : {
28348
+ "type" : "integer"
28349
+ }
28350
+ },
28351
+ "required" : [ "inputTokens", "model", "outputTokens", "provider", "providerName", "reasoningTokens", "totalTokens" ],
28352
+ "type" : "object"
28353
+ },
28354
+ "TicketAgentUsage" : {
28355
+ "description" : "Tokens consommés par un agent sur le ticket, par modèle.",
28356
+ "properties" : {
28357
+ "agentId" : {
28358
+ "type" : "string"
28359
+ },
28360
+ "inputTokens" : {
28361
+ "type" : "integer"
28362
+ },
28363
+ "outputTokens" : {
28364
+ "type" : "integer"
28365
+ },
28366
+ "reasoningTokens" : {
28367
+ "type" : "integer"
28368
+ },
28369
+ "totalTokens" : {
28370
+ "type" : "integer"
28371
+ },
28372
+ "models" : {
28373
+ "items" : {
28374
+ "$ref" : "#/components/schemas/TicketModelUsage"
28375
+ },
28376
+ "type" : "array"
28377
+ }
28378
+ },
28379
+ "required" : [ "agentId", "inputTokens", "models", "outputTokens", "reasoningTokens", "totalTokens" ],
28380
+ "type" : "object"
28381
+ },
28252
28382
  "TicketEvent" : {
28253
28383
  "properties" : {
28254
28384
  "id" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.167",
3
+ "version": "1.0.169",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",