@breign/client 1.0.166 → 1.0.167

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, 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, UpdateTicketRequestUio } from '../models/index';
14
14
  export interface AcceptTicketProposalRequest {
15
15
  proposalId: string;
16
16
  acceptTicketProposalRequestUio: AcceptTicketProposalRequestUio;
@@ -41,6 +41,9 @@ export interface GetProjectBoardRequest {
41
41
  export interface GetTicketRequest {
42
42
  ticketId: string;
43
43
  }
44
+ export interface GetTicketAgentExecutionRequest {
45
+ ticketId: string;
46
+ }
44
47
  export interface GetTicketArtifactDownloadUrlRequest {
45
48
  ticketId: string;
46
49
  artifactId: string;
@@ -175,6 +178,16 @@ export declare class TicketsApi extends runtime.BaseAPI {
175
178
  * Get a ticket
176
179
  */
177
180
  getTicket(ticketId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TicketUio>;
181
+ /**
182
+ * Pour chaque agent assigné : réveil en attente, exécution en cours, question en attente, plan publié et occupation du contexte de sa session de travail.
183
+ * Get what the assigned agents are doing on a ticket
184
+ */
185
+ getTicketAgentExecutionRaw(requestParameters: GetTicketAgentExecutionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TicketAgentExecutionUio>>>;
186
+ /**
187
+ * Pour chaque agent assigné : réveil en attente, exécution en cours, question en attente, plan publié et occupation du contexte de sa session de travail.
188
+ * Get what the assigned agents are doing on a ticket
189
+ */
190
+ getTicketAgentExecution(ticketId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TicketAgentExecutionUio>>;
178
191
  /**
179
192
  * URL présignée de téléchargement, valable quelques minutes.
180
193
  * Get a download URL for an artifact
@@ -310,6 +310,35 @@ class TicketsApi extends runtime.BaseAPI {
310
310
  const response = await this.getTicketRaw({ ticketId: ticketId }, initOverrides);
311
311
  return await response.value();
312
312
  }
313
+ /**
314
+ * Pour chaque agent assigné : réveil en attente, exécution en cours, question en attente, plan publié et occupation du contexte de sa session de travail.
315
+ * Get what the assigned agents are doing on a ticket
316
+ */
317
+ async getTicketAgentExecutionRaw(requestParameters, initOverrides) {
318
+ if (requestParameters['ticketId'] == null) {
319
+ throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling getTicketAgentExecution().');
320
+ }
321
+ const queryParameters = {};
322
+ const headerParameters = {};
323
+ if (this.configuration && this.configuration.apiKey) {
324
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
325
+ }
326
+ const response = await this.request({
327
+ path: `/tickets/{ticketId}/agents/execution`.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId']))),
328
+ method: 'GET',
329
+ headers: headerParameters,
330
+ query: queryParameters,
331
+ }, initOverrides);
332
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.TicketAgentExecutionUioFromJSON));
333
+ }
334
+ /**
335
+ * Pour chaque agent assigné : réveil en attente, exécution en cours, question en attente, plan publié et occupation du contexte de sa session de travail.
336
+ * Get what the assigned agents are doing on a ticket
337
+ */
338
+ async getTicketAgentExecution(ticketId, initOverrides) {
339
+ const response = await this.getTicketAgentExecutionRaw({ ticketId: ticketId }, initOverrides);
340
+ return await response.value();
341
+ }
313
342
  /**
314
343
  * URL présignée de téléchargement, valable quelques minutes.
315
344
  * Get a download URL for an artifact
@@ -29,6 +29,12 @@ export interface ProjectSettingsUio {
29
29
  * @memberof ProjectSettingsUio
30
30
  */
31
31
  defaultStartMode: TicketStartModeUio;
32
+ /**
33
+ * Les agents assignés se mettent au travail d'eux-mêmes quand on leur confie le ticket ou qu'on leur parle. Absent = activé.
34
+ * @type {boolean}
35
+ * @memberof ProjectSettingsUio
36
+ */
37
+ agentsAutoWork?: boolean;
32
38
  }
33
39
  /**
34
40
  * Check if a given object implements the ProjectSettingsUio interface.
@@ -40,6 +40,7 @@ function ProjectSettingsUioFromJSONTyped(json, ignoreDiscriminator) {
40
40
  return {
41
41
  'agentTicketCreation': (0, AgentTicketCreationUio_1.AgentTicketCreationUioFromJSON)(json['agentTicketCreation']),
42
42
  'defaultStartMode': (0, TicketStartModeUio_1.TicketStartModeUioFromJSON)(json['defaultStartMode']),
43
+ 'agentsAutoWork': json['agentsAutoWork'] == null ? undefined : json['agentsAutoWork'],
43
44
  };
44
45
  }
45
46
  function ProjectSettingsUioToJSON(json) {
@@ -52,5 +53,6 @@ function ProjectSettingsUioToJSONTyped(value, ignoreDiscriminator = false) {
52
53
  return {
53
54
  'agentTicketCreation': (0, AgentTicketCreationUio_1.AgentTicketCreationUioToJSON)(value['agentTicketCreation']),
54
55
  'defaultStartMode': (0, TicketStartModeUio_1.TicketStartModeUioToJSON)(value['defaultStartMode']),
56
+ 'agentsAutoWork': value['agentsAutoWork'],
55
57
  };
56
58
  }
@@ -0,0 +1,38 @@
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 TicketAgentExecutionPendingQuestionUio
16
+ */
17
+ export interface TicketAgentExecutionPendingQuestionUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof TicketAgentExecutionPendingQuestionUio
22
+ */
23
+ callId: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof TicketAgentExecutionPendingQuestionUio
28
+ */
29
+ question: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the TicketAgentExecutionPendingQuestionUio interface.
33
+ */
34
+ export declare function instanceOfTicketAgentExecutionPendingQuestionUio(value: object): value is TicketAgentExecutionPendingQuestionUio;
35
+ export declare function TicketAgentExecutionPendingQuestionUioFromJSON(json: any): TicketAgentExecutionPendingQuestionUio;
36
+ export declare function TicketAgentExecutionPendingQuestionUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): TicketAgentExecutionPendingQuestionUio;
37
+ export declare function TicketAgentExecutionPendingQuestionUioToJSON(json: any): TicketAgentExecutionPendingQuestionUio;
38
+ export declare function TicketAgentExecutionPendingQuestionUioToJSONTyped(value?: TicketAgentExecutionPendingQuestionUio | 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.instanceOfTicketAgentExecutionPendingQuestionUio = instanceOfTicketAgentExecutionPendingQuestionUio;
17
+ exports.TicketAgentExecutionPendingQuestionUioFromJSON = TicketAgentExecutionPendingQuestionUioFromJSON;
18
+ exports.TicketAgentExecutionPendingQuestionUioFromJSONTyped = TicketAgentExecutionPendingQuestionUioFromJSONTyped;
19
+ exports.TicketAgentExecutionPendingQuestionUioToJSON = TicketAgentExecutionPendingQuestionUioToJSON;
20
+ exports.TicketAgentExecutionPendingQuestionUioToJSONTyped = TicketAgentExecutionPendingQuestionUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the TicketAgentExecutionPendingQuestionUio interface.
23
+ */
24
+ function instanceOfTicketAgentExecutionPendingQuestionUio(value) {
25
+ if (!('callId' in value) || value['callId'] === undefined)
26
+ return false;
27
+ if (!('question' in value) || value['question'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function TicketAgentExecutionPendingQuestionUioFromJSON(json) {
32
+ return TicketAgentExecutionPendingQuestionUioFromJSONTyped(json, false);
33
+ }
34
+ function TicketAgentExecutionPendingQuestionUioFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'callId': json['callId'],
40
+ 'question': json['question'],
41
+ };
42
+ }
43
+ function TicketAgentExecutionPendingQuestionUioToJSON(json) {
44
+ return TicketAgentExecutionPendingQuestionUioToJSONTyped(json, false);
45
+ }
46
+ function TicketAgentExecutionPendingQuestionUioToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'callId': value['callId'],
52
+ 'question': value['question'],
53
+ };
54
+ }
@@ -0,0 +1,90 @@
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 { TicketAgentExecutionPendingQuestionUio } from './TicketAgentExecutionPendingQuestionUio';
13
+ import type { TicketAgentPlanUio } from './TicketAgentPlanUio';
14
+ import type { TicketAgentRunStatusUio } from './TicketAgentRunStatusUio';
15
+ import type { ConversationContextUsageUio } from './ConversationContextUsageUio';
16
+ /**
17
+ * Ce que fait un agent assigné sur le ticket, pour le panneau « Exécution en cours ».
18
+ * @export
19
+ * @interface TicketAgentExecutionUio
20
+ */
21
+ export interface TicketAgentExecutionUio {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof TicketAgentExecutionUio
26
+ */
27
+ agentId: string;
28
+ /**
29
+ *
30
+ * @type {TicketAgentRunStatusUio}
31
+ * @memberof TicketAgentExecutionUio
32
+ */
33
+ status: TicketAgentRunStatusUio;
34
+ /**
35
+ * Session de travail de l'agent sur ce ticket ; null tant qu'il n'a pas commencé.
36
+ * @type {string}
37
+ * @memberof TicketAgentExecutionUio
38
+ */
39
+ conversationId: string | null;
40
+ /**
41
+ * Début de l'exécution en cours.
42
+ * @type {string}
43
+ * @memberof TicketAgentExecutionUio
44
+ */
45
+ startedAt: string | null;
46
+ /**
47
+ * Fin de la dernière exécution.
48
+ * @type {string}
49
+ * @memberof TicketAgentExecutionUio
50
+ */
51
+ lastRunAt: string | null;
52
+ /**
53
+ * Heure prévue du prochain réveil, s'il y en a un en attente.
54
+ * @type {string}
55
+ * @memberof TicketAgentExecutionUio
56
+ */
57
+ queuedAt: string | null;
58
+ /**
59
+ *
60
+ * @type {TicketAgentPlanUio}
61
+ * @memberof TicketAgentExecutionUio
62
+ */
63
+ plan: TicketAgentPlanUio | null;
64
+ /**
65
+ *
66
+ * @type {ConversationContextUsageUio}
67
+ * @memberof TicketAgentExecutionUio
68
+ */
69
+ contextUsage?: ConversationContextUsageUio;
70
+ /**
71
+ *
72
+ * @type {TicketAgentExecutionPendingQuestionUio}
73
+ * @memberof TicketAgentExecutionUio
74
+ */
75
+ pendingQuestion: TicketAgentExecutionPendingQuestionUio | null;
76
+ /**
77
+ *
78
+ * @type {string}
79
+ * @memberof TicketAgentExecutionUio
80
+ */
81
+ lastError: string | null;
82
+ }
83
+ /**
84
+ * Check if a given object implements the TicketAgentExecutionUio interface.
85
+ */
86
+ export declare function instanceOfTicketAgentExecutionUio(value: object): value is TicketAgentExecutionUio;
87
+ export declare function TicketAgentExecutionUioFromJSON(json: any): TicketAgentExecutionUio;
88
+ export declare function TicketAgentExecutionUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): TicketAgentExecutionUio;
89
+ export declare function TicketAgentExecutionUioToJSON(json: any): TicketAgentExecutionUio;
90
+ export declare function TicketAgentExecutionUioToJSONTyped(value?: TicketAgentExecutionUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,88 @@
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.instanceOfTicketAgentExecutionUio = instanceOfTicketAgentExecutionUio;
17
+ exports.TicketAgentExecutionUioFromJSON = TicketAgentExecutionUioFromJSON;
18
+ exports.TicketAgentExecutionUioFromJSONTyped = TicketAgentExecutionUioFromJSONTyped;
19
+ exports.TicketAgentExecutionUioToJSON = TicketAgentExecutionUioToJSON;
20
+ exports.TicketAgentExecutionUioToJSONTyped = TicketAgentExecutionUioToJSONTyped;
21
+ const TicketAgentExecutionPendingQuestionUio_1 = require("./TicketAgentExecutionPendingQuestionUio");
22
+ const TicketAgentPlanUio_1 = require("./TicketAgentPlanUio");
23
+ const TicketAgentRunStatusUio_1 = require("./TicketAgentRunStatusUio");
24
+ const ConversationContextUsageUio_1 = require("./ConversationContextUsageUio");
25
+ /**
26
+ * Check if a given object implements the TicketAgentExecutionUio interface.
27
+ */
28
+ function instanceOfTicketAgentExecutionUio(value) {
29
+ if (!('agentId' in value) || value['agentId'] === undefined)
30
+ return false;
31
+ if (!('status' in value) || value['status'] === undefined)
32
+ return false;
33
+ if (!('conversationId' in value) || value['conversationId'] === undefined)
34
+ return false;
35
+ if (!('startedAt' in value) || value['startedAt'] === undefined)
36
+ return false;
37
+ if (!('lastRunAt' in value) || value['lastRunAt'] === undefined)
38
+ return false;
39
+ if (!('queuedAt' in value) || value['queuedAt'] === undefined)
40
+ return false;
41
+ if (!('plan' in value) || value['plan'] === undefined)
42
+ return false;
43
+ if (!('pendingQuestion' in value) || value['pendingQuestion'] === undefined)
44
+ return false;
45
+ if (!('lastError' in value) || value['lastError'] === undefined)
46
+ return false;
47
+ return true;
48
+ }
49
+ function TicketAgentExecutionUioFromJSON(json) {
50
+ return TicketAgentExecutionUioFromJSONTyped(json, false);
51
+ }
52
+ function TicketAgentExecutionUioFromJSONTyped(json, ignoreDiscriminator) {
53
+ if (json == null) {
54
+ return json;
55
+ }
56
+ return {
57
+ 'agentId': json['agentId'],
58
+ 'status': (0, TicketAgentRunStatusUio_1.TicketAgentRunStatusUioFromJSON)(json['status']),
59
+ 'conversationId': json['conversationId'],
60
+ 'startedAt': json['startedAt'],
61
+ 'lastRunAt': json['lastRunAt'],
62
+ 'queuedAt': json['queuedAt'],
63
+ 'plan': (0, TicketAgentPlanUio_1.TicketAgentPlanUioFromJSON)(json['plan']),
64
+ 'contextUsage': json['contextUsage'] == null ? undefined : (0, ConversationContextUsageUio_1.ConversationContextUsageUioFromJSON)(json['contextUsage']),
65
+ 'pendingQuestion': (0, TicketAgentExecutionPendingQuestionUio_1.TicketAgentExecutionPendingQuestionUioFromJSON)(json['pendingQuestion']),
66
+ 'lastError': json['lastError'],
67
+ };
68
+ }
69
+ function TicketAgentExecutionUioToJSON(json) {
70
+ return TicketAgentExecutionUioToJSONTyped(json, false);
71
+ }
72
+ function TicketAgentExecutionUioToJSONTyped(value, ignoreDiscriminator = false) {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+ return {
77
+ 'agentId': value['agentId'],
78
+ 'status': (0, TicketAgentRunStatusUio_1.TicketAgentRunStatusUioToJSON)(value['status']),
79
+ 'conversationId': value['conversationId'],
80
+ 'startedAt': value['startedAt'],
81
+ 'lastRunAt': value['lastRunAt'],
82
+ 'queuedAt': value['queuedAt'],
83
+ 'plan': (0, TicketAgentPlanUio_1.TicketAgentPlanUioToJSON)(value['plan']),
84
+ 'contextUsage': (0, ConversationContextUsageUio_1.ConversationContextUsageUioToJSON)(value['contextUsage']),
85
+ 'pendingQuestion': (0, TicketAgentExecutionPendingQuestionUio_1.TicketAgentExecutionPendingQuestionUioToJSON)(value['pendingQuestion']),
86
+ 'lastError': value['lastError'],
87
+ };
88
+ }
@@ -0,0 +1,39 @@
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 { TicketPlanStepUio } from './TicketPlanStepUio';
13
+ /**
14
+ * Le plan que l'agent a publié pour ce ticket, et où il en est.
15
+ * @export
16
+ * @interface TicketAgentPlanUio
17
+ */
18
+ export interface TicketAgentPlanUio {
19
+ /**
20
+ *
21
+ * @type {Array<TicketPlanStepUio>}
22
+ * @memberof TicketAgentPlanUio
23
+ */
24
+ steps: Array<TicketPlanStepUio>;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof TicketAgentPlanUio
29
+ */
30
+ updatedAt: string;
31
+ }
32
+ /**
33
+ * Check if a given object implements the TicketAgentPlanUio interface.
34
+ */
35
+ export declare function instanceOfTicketAgentPlanUio(value: object): value is TicketAgentPlanUio;
36
+ export declare function TicketAgentPlanUioFromJSON(json: any): TicketAgentPlanUio;
37
+ export declare function TicketAgentPlanUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): TicketAgentPlanUio;
38
+ export declare function TicketAgentPlanUioToJSON(json: any): TicketAgentPlanUio;
39
+ export declare function TicketAgentPlanUioToJSONTyped(value?: TicketAgentPlanUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
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.instanceOfTicketAgentPlanUio = instanceOfTicketAgentPlanUio;
17
+ exports.TicketAgentPlanUioFromJSON = TicketAgentPlanUioFromJSON;
18
+ exports.TicketAgentPlanUioFromJSONTyped = TicketAgentPlanUioFromJSONTyped;
19
+ exports.TicketAgentPlanUioToJSON = TicketAgentPlanUioToJSON;
20
+ exports.TicketAgentPlanUioToJSONTyped = TicketAgentPlanUioToJSONTyped;
21
+ const TicketPlanStepUio_1 = require("./TicketPlanStepUio");
22
+ /**
23
+ * Check if a given object implements the TicketAgentPlanUio interface.
24
+ */
25
+ function instanceOfTicketAgentPlanUio(value) {
26
+ if (!('steps' in value) || value['steps'] === undefined)
27
+ return false;
28
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
29
+ return false;
30
+ return true;
31
+ }
32
+ function TicketAgentPlanUioFromJSON(json) {
33
+ return TicketAgentPlanUioFromJSONTyped(json, false);
34
+ }
35
+ function TicketAgentPlanUioFromJSONTyped(json, ignoreDiscriminator) {
36
+ if (json == null) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'steps': (json['steps'].map(TicketPlanStepUio_1.TicketPlanStepUioFromJSON)),
41
+ 'updatedAt': json['updatedAt'],
42
+ };
43
+ }
44
+ function TicketAgentPlanUioToJSON(json) {
45
+ return TicketAgentPlanUioToJSONTyped(json, false);
46
+ }
47
+ function TicketAgentPlanUioToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'steps': (value['steps'].map(TicketPlanStepUio_1.TicketPlanStepUioToJSON)),
53
+ 'updatedAt': value['updatedAt'],
54
+ };
55
+ }
@@ -0,0 +1,28 @@
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
+ * Où en est le travail d'un agent sur un ticket : idle (rien en cours), queued (réveil en attente), running (il travaille), waiting_human (il attend la réponse à une question), failed (la dernière exécution a échoué).
14
+ * @export
15
+ */
16
+ export declare const TicketAgentRunStatusUio: {
17
+ readonly Idle: "idle";
18
+ readonly Queued: "queued";
19
+ readonly Running: "running";
20
+ readonly WaitingHuman: "waiting_human";
21
+ readonly Failed: "failed";
22
+ };
23
+ export type TicketAgentRunStatusUio = typeof TicketAgentRunStatusUio[keyof typeof TicketAgentRunStatusUio];
24
+ export declare function instanceOfTicketAgentRunStatusUio(value: any): boolean;
25
+ export declare function TicketAgentRunStatusUioFromJSON(json: any): TicketAgentRunStatusUio;
26
+ export declare function TicketAgentRunStatusUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): TicketAgentRunStatusUio;
27
+ export declare function TicketAgentRunStatusUioToJSON(value?: TicketAgentRunStatusUio | null): any;
28
+ export declare function TicketAgentRunStatusUioToJSONTyped(value: any, ignoreDiscriminator: boolean): TicketAgentRunStatusUio;
@@ -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.TicketAgentRunStatusUio = void 0;
17
+ exports.instanceOfTicketAgentRunStatusUio = instanceOfTicketAgentRunStatusUio;
18
+ exports.TicketAgentRunStatusUioFromJSON = TicketAgentRunStatusUioFromJSON;
19
+ exports.TicketAgentRunStatusUioFromJSONTyped = TicketAgentRunStatusUioFromJSONTyped;
20
+ exports.TicketAgentRunStatusUioToJSON = TicketAgentRunStatusUioToJSON;
21
+ exports.TicketAgentRunStatusUioToJSONTyped = TicketAgentRunStatusUioToJSONTyped;
22
+ /**
23
+ * Où en est le travail d'un agent sur un ticket : idle (rien en cours), queued (réveil en attente), running (il travaille), waiting_human (il attend la réponse à une question), failed (la dernière exécution a échoué).
24
+ * @export
25
+ */
26
+ exports.TicketAgentRunStatusUio = {
27
+ Idle: 'idle',
28
+ Queued: 'queued',
29
+ Running: 'running',
30
+ WaitingHuman: 'waiting_human',
31
+ Failed: 'failed'
32
+ };
33
+ function instanceOfTicketAgentRunStatusUio(value) {
34
+ for (const key in exports.TicketAgentRunStatusUio) {
35
+ if (Object.prototype.hasOwnProperty.call(exports.TicketAgentRunStatusUio, key)) {
36
+ if (exports.TicketAgentRunStatusUio[key] === value) {
37
+ return true;
38
+ }
39
+ }
40
+ }
41
+ return false;
42
+ }
43
+ function TicketAgentRunStatusUioFromJSON(json) {
44
+ return TicketAgentRunStatusUioFromJSONTyped(json, false);
45
+ }
46
+ function TicketAgentRunStatusUioFromJSONTyped(json, ignoreDiscriminator) {
47
+ return json;
48
+ }
49
+ function TicketAgentRunStatusUioToJSON(value) {
50
+ return value;
51
+ }
52
+ function TicketAgentRunStatusUioToJSONTyped(value, ignoreDiscriminator) {
53
+ return value;
54
+ }
@@ -48,7 +48,7 @@ export interface TicketEventUio {
48
48
  */
49
49
  body: string | null;
50
50
  /**
51
- * Détails selon le type : pour event, { action, from?, to?, member? } ; pour report, { title } ; pour question, { humanRequest } ; mentions dans { mentions: MemberRef[] }.
51
+ * Détails selon le type : pour event, { action, from?, to?, member? } ; pour report, { title } ; pour question, { humanRequest: TicketQuestion } ; mentions dans { mentions: MemberRef[] }.
52
52
  * @type {{ [key: string]: any; }}
53
53
  * @memberof TicketEventUio
54
54
  */
@@ -0,0 +1,26 @@
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
+ */
16
+ export declare const TicketPlanStepStatusUio: {
17
+ readonly Todo: "todo";
18
+ readonly Doing: "doing";
19
+ readonly Done: "done";
20
+ };
21
+ export type TicketPlanStepStatusUio = typeof TicketPlanStepStatusUio[keyof typeof TicketPlanStepStatusUio];
22
+ export declare function instanceOfTicketPlanStepStatusUio(value: any): boolean;
23
+ export declare function TicketPlanStepStatusUioFromJSON(json: any): TicketPlanStepStatusUio;
24
+ export declare function TicketPlanStepStatusUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): TicketPlanStepStatusUio;
25
+ export declare function TicketPlanStepStatusUioToJSON(value?: TicketPlanStepStatusUio | null): any;
26
+ export declare function TicketPlanStepStatusUioToJSONTyped(value: any, ignoreDiscriminator: boolean): TicketPlanStepStatusUio;
@@ -0,0 +1,52 @@
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.TicketPlanStepStatusUio = void 0;
17
+ exports.instanceOfTicketPlanStepStatusUio = instanceOfTicketPlanStepStatusUio;
18
+ exports.TicketPlanStepStatusUioFromJSON = TicketPlanStepStatusUioFromJSON;
19
+ exports.TicketPlanStepStatusUioFromJSONTyped = TicketPlanStepStatusUioFromJSONTyped;
20
+ exports.TicketPlanStepStatusUioToJSON = TicketPlanStepStatusUioToJSON;
21
+ exports.TicketPlanStepStatusUioToJSONTyped = TicketPlanStepStatusUioToJSONTyped;
22
+ /**
23
+ *
24
+ * @export
25
+ */
26
+ exports.TicketPlanStepStatusUio = {
27
+ Todo: 'todo',
28
+ Doing: 'doing',
29
+ Done: 'done'
30
+ };
31
+ function instanceOfTicketPlanStepStatusUio(value) {
32
+ for (const key in exports.TicketPlanStepStatusUio) {
33
+ if (Object.prototype.hasOwnProperty.call(exports.TicketPlanStepStatusUio, key)) {
34
+ if (exports.TicketPlanStepStatusUio[key] === value) {
35
+ return true;
36
+ }
37
+ }
38
+ }
39
+ return false;
40
+ }
41
+ function TicketPlanStepStatusUioFromJSON(json) {
42
+ return TicketPlanStepStatusUioFromJSONTyped(json, false);
43
+ }
44
+ function TicketPlanStepStatusUioFromJSONTyped(json, ignoreDiscriminator) {
45
+ return json;
46
+ }
47
+ function TicketPlanStepStatusUioToJSON(value) {
48
+ return value;
49
+ }
50
+ function TicketPlanStepStatusUioToJSONTyped(value, ignoreDiscriminator) {
51
+ return value;
52
+ }
@@ -0,0 +1,39 @@
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 { TicketPlanStepStatusUio } from './TicketPlanStepStatusUio';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface TicketPlanStepUio
17
+ */
18
+ export interface TicketPlanStepUio {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof TicketPlanStepUio
23
+ */
24
+ title: string;
25
+ /**
26
+ *
27
+ * @type {TicketPlanStepStatusUio}
28
+ * @memberof TicketPlanStepUio
29
+ */
30
+ status: TicketPlanStepStatusUio;
31
+ }
32
+ /**
33
+ * Check if a given object implements the TicketPlanStepUio interface.
34
+ */
35
+ export declare function instanceOfTicketPlanStepUio(value: object): value is TicketPlanStepUio;
36
+ export declare function TicketPlanStepUioFromJSON(json: any): TicketPlanStepUio;
37
+ export declare function TicketPlanStepUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): TicketPlanStepUio;
38
+ export declare function TicketPlanStepUioToJSON(json: any): TicketPlanStepUio;
39
+ export declare function TicketPlanStepUioToJSONTyped(value?: TicketPlanStepUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
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.instanceOfTicketPlanStepUio = instanceOfTicketPlanStepUio;
17
+ exports.TicketPlanStepUioFromJSON = TicketPlanStepUioFromJSON;
18
+ exports.TicketPlanStepUioFromJSONTyped = TicketPlanStepUioFromJSONTyped;
19
+ exports.TicketPlanStepUioToJSON = TicketPlanStepUioToJSON;
20
+ exports.TicketPlanStepUioToJSONTyped = TicketPlanStepUioToJSONTyped;
21
+ const TicketPlanStepStatusUio_1 = require("./TicketPlanStepStatusUio");
22
+ /**
23
+ * Check if a given object implements the TicketPlanStepUio interface.
24
+ */
25
+ function instanceOfTicketPlanStepUio(value) {
26
+ if (!('title' in value) || value['title'] === undefined)
27
+ return false;
28
+ if (!('status' in value) || value['status'] === undefined)
29
+ return false;
30
+ return true;
31
+ }
32
+ function TicketPlanStepUioFromJSON(json) {
33
+ return TicketPlanStepUioFromJSONTyped(json, false);
34
+ }
35
+ function TicketPlanStepUioFromJSONTyped(json, ignoreDiscriminator) {
36
+ if (json == null) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'title': json['title'],
41
+ 'status': (0, TicketPlanStepStatusUio_1.TicketPlanStepStatusUioFromJSON)(json['status']),
42
+ };
43
+ }
44
+ function TicketPlanStepUioToJSON(json) {
45
+ return TicketPlanStepUioToJSONTyped(json, false);
46
+ }
47
+ function TicketPlanStepUioToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'title': value['title'],
53
+ 'status': (0, TicketPlanStepStatusUio_1.TicketPlanStepStatusUioToJSON)(value['status']),
54
+ };
55
+ }
@@ -495,6 +495,10 @@ export * from './TaskScheduleEndUio';
495
495
  export * from './TaskScheduleIntervalUio';
496
496
  export * from './TaskScheduleUio';
497
497
  export * from './TextToSpeechProviderUio';
498
+ export * from './TicketAgentExecutionPendingQuestionUio';
499
+ export * from './TicketAgentExecutionUio';
500
+ export * from './TicketAgentPlanUio';
501
+ export * from './TicketAgentRunStatusUio';
498
502
  export * from './TicketArtifactDownloadUrlUio';
499
503
  export * from './TicketArtifactSourceUio';
500
504
  export * from './TicketArtifactStatusUio';
@@ -506,6 +510,8 @@ export * from './TicketBoardColumnUio';
506
510
  export * from './TicketBoardUio';
507
511
  export * from './TicketEventKindUio';
508
512
  export * from './TicketEventUio';
513
+ export * from './TicketPlanStepStatusUio';
514
+ export * from './TicketPlanStepUio';
509
515
  export * from './TicketPriorityUio';
510
516
  export * from './TicketProposalPayloadUio';
511
517
  export * from './TicketProposalStatusUio';
@@ -513,6 +513,10 @@ __exportStar(require("./TaskScheduleEndUio"), exports);
513
513
  __exportStar(require("./TaskScheduleIntervalUio"), exports);
514
514
  __exportStar(require("./TaskScheduleUio"), exports);
515
515
  __exportStar(require("./TextToSpeechProviderUio"), exports);
516
+ __exportStar(require("./TicketAgentExecutionPendingQuestionUio"), exports);
517
+ __exportStar(require("./TicketAgentExecutionUio"), exports);
518
+ __exportStar(require("./TicketAgentPlanUio"), exports);
519
+ __exportStar(require("./TicketAgentRunStatusUio"), exports);
516
520
  __exportStar(require("./TicketArtifactDownloadUrlUio"), exports);
517
521
  __exportStar(require("./TicketArtifactSourceUio"), exports);
518
522
  __exportStar(require("./TicketArtifactStatusUio"), exports);
@@ -524,6 +528,8 @@ __exportStar(require("./TicketBoardColumnUio"), exports);
524
528
  __exportStar(require("./TicketBoardUio"), exports);
525
529
  __exportStar(require("./TicketEventKindUio"), exports);
526
530
  __exportStar(require("./TicketEventUio"), exports);
531
+ __exportStar(require("./TicketPlanStepStatusUio"), exports);
532
+ __exportStar(require("./TicketPlanStepUio"), exports);
527
533
  __exportStar(require("./TicketPriorityUio"), exports);
528
534
  __exportStar(require("./TicketProposalPayloadUio"), exports);
529
535
  __exportStar(require("./TicketProposalStatusUio"), exports);
package/dist/openapi.json CHANGED
@@ -17165,6 +17165,48 @@
17165
17165
  "tags" : [ "tickets" ]
17166
17166
  }
17167
17167
  },
17168
+ "/tickets/{ticketId}/agents/execution" : {
17169
+ "get" : {
17170
+ "description" : "Pour chaque agent assigné : réveil en attente, exécution en cours, question en attente, plan publié et occupation du contexte de sa session de travail.",
17171
+ "operationId" : "getTicketAgentExecution",
17172
+ "parameters" : [ {
17173
+ "description" : "ID of the ticket",
17174
+ "in" : "path",
17175
+ "name" : "ticketId",
17176
+ "required" : true,
17177
+ "schema" : {
17178
+ "format" : "uuid",
17179
+ "type" : "string"
17180
+ }
17181
+ } ],
17182
+ "responses" : {
17183
+ "200" : {
17184
+ "content" : {
17185
+ "application/json" : {
17186
+ "schema" : {
17187
+ "items" : {
17188
+ "$ref" : "#/components/schemas/TicketAgentExecution"
17189
+ },
17190
+ "type" : "array"
17191
+ }
17192
+ }
17193
+ },
17194
+ "description" : "OK"
17195
+ },
17196
+ "401" : {
17197
+ "description" : "Unauthenticated"
17198
+ },
17199
+ "403" : {
17200
+ "description" : "Forbidden — the caller is not part of the organization or not a member of the project"
17201
+ },
17202
+ "404" : {
17203
+ "description" : "Not found"
17204
+ }
17205
+ },
17206
+ "summary" : "Get what the assigned agents are doing on a ticket",
17207
+ "tags" : [ "tickets" ]
17208
+ }
17209
+ },
17168
17210
  "/tickets/{ticketId}/events" : {
17169
17211
  "get" : {
17170
17212
  "description" : "Fil du ticket, du plus ancien au plus récent : commentaires, rapports, questions et événements.",
@@ -27592,6 +27634,10 @@
27592
27634
  },
27593
27635
  "defaultStartMode" : {
27594
27636
  "$ref" : "#/components/schemas/TicketStartMode"
27637
+ },
27638
+ "agentsAutoWork" : {
27639
+ "description" : "Les agents assignés se mettent au travail d'eux-mêmes quand on leur confie le ticket ou qu'on leur parle. Absent = activé.",
27640
+ "type" : "boolean"
27595
27641
  }
27596
27642
  },
27597
27643
  "required" : [ "agentTicketCreation", "defaultStartMode" ],
@@ -28124,6 +28170,85 @@
28124
28170
  "required" : [ "decision" ],
28125
28171
  "type" : "object"
28126
28172
  },
28173
+ "TicketAgentExecution" : {
28174
+ "description" : "Ce que fait un agent assigné sur le ticket, pour le panneau « Exécution en cours ».",
28175
+ "properties" : {
28176
+ "agentId" : {
28177
+ "format" : "uuid",
28178
+ "type" : "string"
28179
+ },
28180
+ "status" : {
28181
+ "$ref" : "#/components/schemas/TicketAgentRunStatus"
28182
+ },
28183
+ "conversationId" : {
28184
+ "description" : "Session de travail de l'agent sur ce ticket ; null tant qu'il n'a pas commencé.",
28185
+ "format" : "uuid",
28186
+ "nullable" : true,
28187
+ "type" : "string"
28188
+ },
28189
+ "startedAt" : {
28190
+ "description" : "Début de l'exécution en cours.",
28191
+ "nullable" : true,
28192
+ "type" : "string"
28193
+ },
28194
+ "lastRunAt" : {
28195
+ "description" : "Fin de la dernière exécution.",
28196
+ "nullable" : true,
28197
+ "type" : "string"
28198
+ },
28199
+ "queuedAt" : {
28200
+ "description" : "Heure prévue du prochain réveil, s'il y en a un en attente.",
28201
+ "nullable" : true,
28202
+ "type" : "string"
28203
+ },
28204
+ "plan" : {
28205
+ "allOf" : [ {
28206
+ "$ref" : "#/components/schemas/TicketAgentPlan"
28207
+ } ],
28208
+ "nullable" : true
28209
+ },
28210
+ "contextUsage" : {
28211
+ "$ref" : "#/components/schemas/ConversationContextUsage"
28212
+ },
28213
+ "pendingQuestion" : {
28214
+ "$ref" : "#/components/schemas/TicketAgentExecution_pendingQuestion"
28215
+ },
28216
+ "lastError" : {
28217
+ "nullable" : true,
28218
+ "type" : "string"
28219
+ }
28220
+ },
28221
+ "required" : [ "agentId", "conversationId", "lastError", "lastRunAt", "pendingQuestion", "plan", "queuedAt", "startedAt", "status" ],
28222
+ "type" : "object"
28223
+ },
28224
+ "TicketAgentPlan" : {
28225
+ "description" : "Le plan que l'agent a publié pour ce ticket, et où il en est.",
28226
+ "properties" : {
28227
+ "steps" : {
28228
+ "items" : {
28229
+ "$ref" : "#/components/schemas/TicketPlanStep"
28230
+ },
28231
+ "type" : "array"
28232
+ },
28233
+ "updatedAt" : {
28234
+ "type" : "string"
28235
+ }
28236
+ },
28237
+ "required" : [ "steps", "updatedAt" ],
28238
+ "type" : "object"
28239
+ },
28240
+ "TicketPlanStep" : {
28241
+ "properties" : {
28242
+ "title" : {
28243
+ "type" : "string"
28244
+ },
28245
+ "status" : {
28246
+ "$ref" : "#/components/schemas/TicketPlanStepStatus"
28247
+ }
28248
+ },
28249
+ "required" : [ "status", "title" ],
28250
+ "type" : "object"
28251
+ },
28127
28252
  "TicketEvent" : {
28128
28253
  "properties" : {
28129
28254
  "id" : {
@@ -28146,7 +28271,7 @@
28146
28271
  },
28147
28272
  "data" : {
28148
28273
  "additionalProperties" : true,
28149
- "description" : "Détails selon le type : pour event, { action, from?, to?, member? } ; pour report, { title } ; pour question, { humanRequest } ; mentions dans { mentions: MemberRef[] }.",
28274
+ "description" : "Détails selon le type : pour event, { action, from?, to?, member? } ; pour report, { title } ; pour question, { humanRequest: TicketQuestion } ; mentions dans { mentions: MemberRef[] }.",
28150
28275
  "type" : "object"
28151
28276
  },
28152
28277
  "artifactIds" : {
@@ -29039,6 +29164,15 @@
29039
29164
  "enum" : [ "approve", "changes" ],
29040
29165
  "type" : "string"
29041
29166
  },
29167
+ "TicketAgentRunStatus" : {
29168
+ "description" : "Où en est le travail d'un agent sur un ticket : idle (rien en cours), queued (réveil en attente), running (il travaille), waiting_human (il attend la réponse à une question), failed (la dernière exécution a échoué).",
29169
+ "enum" : [ "idle", "queued", "running", "waiting_human", "failed" ],
29170
+ "type" : "string"
29171
+ },
29172
+ "TicketPlanStepStatus" : {
29173
+ "enum" : [ "todo", "doing", "done" ],
29174
+ "type" : "string"
29175
+ },
29042
29176
  "TicketEventKind" : {
29043
29177
  "description" : "comment et report sont écrits par un humain ou un agent ; question porte une question d'agent à un humain ; event est une trace système (création, statut, assignation…).",
29044
29178
  "enum" : [ "comment", "report", "question", "event" ],
@@ -31130,6 +31264,19 @@
31130
31264
  },
31131
31265
  "type" : "object"
31132
31266
  },
31267
+ "TicketAgentExecution_pendingQuestion" : {
31268
+ "nullable" : true,
31269
+ "properties" : {
31270
+ "callId" : {
31271
+ "type" : "string"
31272
+ },
31273
+ "question" : {
31274
+ "type" : "string"
31275
+ }
31276
+ },
31277
+ "required" : [ "callId", "question" ],
31278
+ "type" : "object"
31279
+ },
31133
31280
  "InboxItem_project" : {
31134
31281
  "nullable" : true,
31135
31282
  "properties" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.166",
3
+ "version": "1.0.167",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",