@breign/client 1.0.161 → 1.0.163

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 { AddModuleRequestUio, AdvancedFlowEditorUio, AdvancedFlowEditorUpdateRequestUio, AgentDuplicateRequestUio, AgentFlowCreateUio, AgentFlowUio, AgentImportRequestUio, AgentImportResponseUio, AgentMetricsEventUio, AgentMetricsOverviewUio, AgentModuleUio, AgentPatchUio, AgentRequestUio, AgentSubscriptionUio, AgentToolAllowedMethodsRequestUio, AgentUio, AgentUsageMetricsUio, BodyWithIdUio, ChatUio, ConversationAttachmentDownloadUrlUio, DeleteMessageAudio200ResponseUio, EphemeralInstancesMetricsResponseUio, FileCreationRequestUio, FileCreationResponseUio, FlowEditorUio, FlowEditorUpdateRequestUio, MessageAudioDownloadUrlUio, OrgUsageMetricsResponseUio, S3UploadBodyUio, STTResponseUio } from '../models/index';
13
+ import type { AddModuleRequestUio, AdvancedFlowEditorUio, AdvancedFlowEditorUpdateRequestUio, AgentDuplicateRequestUio, AgentFlowCreateUio, AgentFlowUio, AgentImportRequestUio, AgentImportResponseUio, AgentMetricsEventUio, AgentMetricsOverviewUio, AgentModuleUio, AgentPatchUio, AgentRequestUio, AgentSubscriptionUio, AgentToolAllowedMethodsRequestUio, AgentUio, AgentUsageMetricsUio, BodyWithIdUio, ChatUio, ConversationAttachmentDownloadUrlUio, ConversationMessageImagesUio, DeleteMessageAudio200ResponseUio, EphemeralInstancesMetricsResponseUio, FileCreationRequestUio, FileCreationResponseUio, FlowEditorUio, FlowEditorUpdateRequestUio, MessageAudioDownloadUrlUio, OrgUsageMetricsResponseUio, S3UploadBodyUio, STTResponseUio } from '../models/index';
14
14
  export interface AddModuleRequest {
15
15
  agentId: string;
16
16
  addModuleRequestUio: AddModuleRequestUio;
@@ -104,6 +104,11 @@ export interface GetConversationContextAttachmentDownloadUrlRequest {
104
104
  conversationId: string;
105
105
  attachmentId: string;
106
106
  }
107
+ export interface GetConversationMessageImagesRequest {
108
+ agentId: string;
109
+ conversationId: string;
110
+ messageId: string;
111
+ }
107
112
  export interface GetConversationsForAgentRequest {
108
113
  agentId: string;
109
114
  page?: number;
@@ -400,6 +405,16 @@ export declare class AgentApi extends runtime.BaseAPI {
400
405
  * Get presigned download URL for a conversation context attachment
401
406
  */
402
407
  getConversationContextAttachmentDownloadUrl(agentId: string, conversationId: string, attachmentId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationAttachmentDownloadUrlUio>;
408
+ /**
409
+ * Returns the images of documents the language model received while answering, with presigned URLs created on each call. For an assistant message, the images of every tool message of its turn; for a tool (System) message, its own. Returns an empty list for a turn without images. Call this when displaying a message\'s \"consulted images\" block, live or in history.
410
+ * Get the document images the agent was given in a conversation turn
411
+ */
412
+ getConversationMessageImagesRaw(requestParameters: GetConversationMessageImagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationMessageImagesUio>>;
413
+ /**
414
+ * Returns the images of documents the language model received while answering, with presigned URLs created on each call. For an assistant message, the images of every tool message of its turn; for a tool (System) message, its own. Returns an empty list for a turn without images. Call this when displaying a message\'s \"consulted images\" block, live or in history.
415
+ * Get the document images the agent was given in a conversation turn
416
+ */
417
+ getConversationMessageImages(agentId: string, conversationId: string, messageId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationMessageImagesUio>;
403
418
  /**
404
419
  * Get conversations for an agent
405
420
  * Get conversations for an agent
@@ -742,6 +742,41 @@ class AgentApi extends runtime.BaseAPI {
742
742
  const response = await this.getConversationContextAttachmentDownloadUrlRaw({ agentId: agentId, conversationId: conversationId, attachmentId: attachmentId }, initOverrides);
743
743
  return await response.value();
744
744
  }
745
+ /**
746
+ * Returns the images of documents the language model received while answering, with presigned URLs created on each call. For an assistant message, the images of every tool message of its turn; for a tool (System) message, its own. Returns an empty list for a turn without images. Call this when displaying a message\'s \"consulted images\" block, live or in history.
747
+ * Get the document images the agent was given in a conversation turn
748
+ */
749
+ async getConversationMessageImagesRaw(requestParameters, initOverrides) {
750
+ if (requestParameters['agentId'] == null) {
751
+ throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getConversationMessageImages().');
752
+ }
753
+ if (requestParameters['conversationId'] == null) {
754
+ throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling getConversationMessageImages().');
755
+ }
756
+ if (requestParameters['messageId'] == null) {
757
+ throw new runtime.RequiredError('messageId', 'Required parameter "messageId" was null or undefined when calling getConversationMessageImages().');
758
+ }
759
+ const queryParameters = {};
760
+ const headerParameters = {};
761
+ if (this.configuration && this.configuration.apiKey) {
762
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
763
+ }
764
+ const response = await this.request({
765
+ path: `/agents/{agentId}/conversations/{conversationId}/messages/{messageId}/images`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId']))).replace(`{${"messageId"}}`, encodeURIComponent(String(requestParameters['messageId']))),
766
+ method: 'GET',
767
+ headers: headerParameters,
768
+ query: queryParameters,
769
+ }, initOverrides);
770
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ConversationMessageImagesUioFromJSON)(jsonValue));
771
+ }
772
+ /**
773
+ * Returns the images of documents the language model received while answering, with presigned URLs created on each call. For an assistant message, the images of every tool message of its turn; for a tool (System) message, its own. Returns an empty list for a turn without images. Call this when displaying a message\'s \"consulted images\" block, live or in history.
774
+ * Get the document images the agent was given in a conversation turn
775
+ */
776
+ async getConversationMessageImages(agentId, conversationId, messageId, initOverrides) {
777
+ const response = await this.getConversationMessageImagesRaw({ agentId: agentId, conversationId: conversationId, messageId: messageId }, initOverrides);
778
+ return await response.value();
779
+ }
745
780
  /**
746
781
  * Get conversations for an agent
747
782
  * Get conversations for an agent
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AgentChatOverviewEntryUio, AttachmentCreateRequestUio, AttachmentCreateResponseUio, AttachmentDetailsResponseUio, AttachmentProcessedRequestUio, BodyWithMessageUio, ContextLocationRequestUio, ContextUio, ConversationSummaryUio, CreateCustomVariable200ResponseUio, HumanRequestAnswerResultUio, HumanRequestAnswerUio, HumanRequestSummaryUio, MarkConversationReadRequestUio, MessageAnonymizationUio, SetUserAgentConversationRequestUio, ToolCallResultRequestUio, ToolCallResultResponseUio, ToolCallsResponseUio, UpdateConversationTitleRequestUio, UpdateUserChatPreferencesRequestUio, UserChatPreferencesUio, WorkspaceFileContentUio, WorkspaceFileEntryUio, WorkspaceFileWriteRequestUio } from '../models/index';
13
+ import type { AgentChatOverviewEntryUio, AttachmentCreateRequestUio, AttachmentCreateResponseUio, AttachmentDetailsResponseUio, AttachmentProcessedRequestUio, BodyWithMessageUio, ChatSessionSummaryUio, ContextLocationRequestUio, ContextUio, ConversationSummaryUio, CreateCustomVariable200ResponseUio, HumanRequestAnswerResultUio, HumanRequestAnswerUio, HumanRequestSummaryUio, MarkConversationReadRequestUio, MessageAnonymizationUio, SetUserAgentConversationRequestUio, ToolCallResultRequestUio, ToolCallResultResponseUio, ToolCallsResponseUio, UpdateConversationTitleRequestUio, UpdateUserChatPreferencesRequestUio, UserChatPreferencesUio, WorkspaceFileContentUio, WorkspaceFileEntryUio, WorkspaceFileWriteRequestUio } from '../models/index';
14
14
  export interface AnswerHumanRequestRequest {
15
15
  callId: string;
16
16
  humanRequestAnswerUio: HumanRequestAnswerUio;
@@ -49,6 +49,7 @@ export interface EditConversationWorkspaceFileContentRequest {
49
49
  }
50
50
  export interface GetAgentChatOverviewRequest {
51
51
  organizationId: string;
52
+ recent?: number;
52
53
  }
53
54
  export interface GetAnonymizedMessagesRequest {
54
55
  conversationId: string;
@@ -89,6 +90,13 @@ export interface ListMessageToolCallsRequest {
89
90
  export interface ListPendingHumanRequestsRequest {
90
91
  organizationId: string;
91
92
  }
93
+ export interface ListUserAgentConversationsRequest {
94
+ organizationId: string;
95
+ agentId: string;
96
+ page?: number;
97
+ limit?: number;
98
+ unreadOnly?: boolean;
99
+ }
92
100
  export interface MarkAttachmentProcessedRequest {
93
101
  conversationId: string;
94
102
  attachmentId: string;
@@ -226,15 +234,15 @@ export declare class ConversationsApi extends runtime.BaseAPI {
226
234
  */
227
235
  editConversationWorkspaceFileContent(conversationId: string, workspaceFileWriteRequestUio: WorkspaceFileWriteRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkspaceFileContentUio>;
228
236
  /**
229
- * Pour chaque agent de l\'organisation avec lequel l\'utilisateur a une conversation, renvoie sa conversation la plus récente, le nombre de messages non lus et l\'indication d\'une réponse en cours de génération.
237
+ * Pour chaque agent de l\'organisation avec lequel l\'utilisateur a une conversation, renvoie sa conversation la plus récente, le nombre de messages non lus et l\'indication d\'une réponse en cours de génération, ainsi que les totaux sur l\'ensemble de ses sessions et ses sessions les plus récentes.
230
238
  * Get the multi-agent chat overview
231
239
  */
232
240
  getAgentChatOverviewRaw(requestParameters: GetAgentChatOverviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AgentChatOverviewEntryUio>>>;
233
241
  /**
234
- * Pour chaque agent de l\'organisation avec lequel l\'utilisateur a une conversation, renvoie sa conversation la plus récente, le nombre de messages non lus et l\'indication d\'une réponse en cours de génération.
242
+ * Pour chaque agent de l\'organisation avec lequel l\'utilisateur a une conversation, renvoie sa conversation la plus récente, le nombre de messages non lus et l\'indication d\'une réponse en cours de génération, ainsi que les totaux sur l\'ensemble de ses sessions et ses sessions les plus récentes.
235
243
  * Get the multi-agent chat overview
236
244
  */
237
- getAgentChatOverview(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AgentChatOverviewEntryUio>>;
245
+ getAgentChatOverview(organizationId: string, recent?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AgentChatOverviewEntryUio>>;
238
246
  /**
239
247
  * Retrieve the list of anonymized messages for a given conversation.
240
248
  * Get the anonymized messages of a conversation
@@ -339,6 +347,16 @@ export declare class ConversationsApi extends runtime.BaseAPI {
339
347
  * List the questions waiting for the current user
340
348
  */
341
349
  listPendingHumanRequests(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<HumanRequestSummaryUio>>;
350
+ /**
351
+ * Sessions de chat de l\'utilisateur courant avec cet agent, de la plus récemment active à la plus ancienne. Chaque session porte son nombre de non-lus, un aperçu du dernier message et l\'indication qu\'elle est la conversation principale (celle mémorisée par setUserAgentConversation).
352
+ * List the current user\'s sessions with an agent
353
+ */
354
+ listUserAgentConversationsRaw(requestParameters: ListUserAgentConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ChatSessionSummaryUio>>>;
355
+ /**
356
+ * Sessions de chat de l\'utilisateur courant avec cet agent, de la plus récemment active à la plus ancienne. Chaque session porte son nombre de non-lus, un aperçu du dernier message et l\'indication qu\'elle est la conversation principale (celle mémorisée par setUserAgentConversation).
357
+ * List the current user\'s sessions with an agent
358
+ */
359
+ listUserAgentConversations(organizationId: string, agentId: string, page?: number, limit?: number, unreadOnly?: boolean, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ChatSessionSummaryUio>>;
342
360
  /**
343
361
  * Internal callback endpoint called when attachment processing is complete. Réservé au service de documents : tout autre appelant reçoit un 403. L\'attachment doit être en état `PROCESSING`.
344
362
  * Mark a conversation attachment as processed
@@ -342,7 +342,7 @@ class ConversationsApi extends runtime.BaseAPI {
342
342
  return await response.value();
343
343
  }
344
344
  /**
345
- * Pour chaque agent de l\'organisation avec lequel l\'utilisateur a une conversation, renvoie sa conversation la plus récente, le nombre de messages non lus et l\'indication d\'une réponse en cours de génération.
345
+ * Pour chaque agent de l\'organisation avec lequel l\'utilisateur a une conversation, renvoie sa conversation la plus récente, le nombre de messages non lus et l\'indication d\'une réponse en cours de génération, ainsi que les totaux sur l\'ensemble de ses sessions et ses sessions les plus récentes.
346
346
  * Get the multi-agent chat overview
347
347
  */
348
348
  async getAgentChatOverviewRaw(requestParameters, initOverrides) {
@@ -350,6 +350,9 @@ class ConversationsApi extends runtime.BaseAPI {
350
350
  throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getAgentChatOverview().');
351
351
  }
352
352
  const queryParameters = {};
353
+ if (requestParameters['recent'] != null) {
354
+ queryParameters['recent'] = requestParameters['recent'];
355
+ }
353
356
  const headerParameters = {};
354
357
  if (this.configuration && this.configuration.apiKey) {
355
358
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
@@ -363,11 +366,11 @@ class ConversationsApi extends runtime.BaseAPI {
363
366
  return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AgentChatOverviewEntryUioFromJSON));
364
367
  }
365
368
  /**
366
- * Pour chaque agent de l\'organisation avec lequel l\'utilisateur a une conversation, renvoie sa conversation la plus récente, le nombre de messages non lus et l\'indication d\'une réponse en cours de génération.
369
+ * Pour chaque agent de l\'organisation avec lequel l\'utilisateur a une conversation, renvoie sa conversation la plus récente, le nombre de messages non lus et l\'indication d\'une réponse en cours de génération, ainsi que les totaux sur l\'ensemble de ses sessions et ses sessions les plus récentes.
367
370
  * Get the multi-agent chat overview
368
371
  */
369
- async getAgentChatOverview(organizationId, initOverrides) {
370
- const response = await this.getAgentChatOverviewRaw({ organizationId: organizationId }, initOverrides);
372
+ async getAgentChatOverview(organizationId, recent, initOverrides) {
373
+ const response = await this.getAgentChatOverviewRaw({ organizationId: organizationId, recent: recent }, initOverrides);
371
374
  return await response.value();
372
375
  }
373
376
  /**
@@ -693,6 +696,47 @@ class ConversationsApi extends runtime.BaseAPI {
693
696
  const response = await this.listPendingHumanRequestsRaw({ organizationId: organizationId }, initOverrides);
694
697
  return await response.value();
695
698
  }
699
+ /**
700
+ * Sessions de chat de l\'utilisateur courant avec cet agent, de la plus récemment active à la plus ancienne. Chaque session porte son nombre de non-lus, un aperçu du dernier message et l\'indication qu\'elle est la conversation principale (celle mémorisée par setUserAgentConversation).
701
+ * List the current user\'s sessions with an agent
702
+ */
703
+ async listUserAgentConversationsRaw(requestParameters, initOverrides) {
704
+ if (requestParameters['organizationId'] == null) {
705
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling listUserAgentConversations().');
706
+ }
707
+ if (requestParameters['agentId'] == null) {
708
+ throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling listUserAgentConversations().');
709
+ }
710
+ const queryParameters = {};
711
+ if (requestParameters['page'] != null) {
712
+ queryParameters['page'] = requestParameters['page'];
713
+ }
714
+ if (requestParameters['limit'] != null) {
715
+ queryParameters['limit'] = requestParameters['limit'];
716
+ }
717
+ if (requestParameters['unreadOnly'] != null) {
718
+ queryParameters['unreadOnly'] = requestParameters['unreadOnly'];
719
+ }
720
+ const headerParameters = {};
721
+ if (this.configuration && this.configuration.apiKey) {
722
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
723
+ }
724
+ const response = await this.request({
725
+ path: `/organizations/{organizationId}/chat/agents/{agentId}/conversations`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
726
+ method: 'GET',
727
+ headers: headerParameters,
728
+ query: queryParameters,
729
+ }, initOverrides);
730
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.ChatSessionSummaryUioFromJSON));
731
+ }
732
+ /**
733
+ * Sessions de chat de l\'utilisateur courant avec cet agent, de la plus récemment active à la plus ancienne. Chaque session porte son nombre de non-lus, un aperçu du dernier message et l\'indication qu\'elle est la conversation principale (celle mémorisée par setUserAgentConversation).
734
+ * List the current user\'s sessions with an agent
735
+ */
736
+ async listUserAgentConversations(organizationId, agentId, page, limit, unreadOnly, initOverrides) {
737
+ const response = await this.listUserAgentConversationsRaw({ organizationId: organizationId, agentId: agentId, page: page, limit: limit, unreadOnly: unreadOnly }, initOverrides);
738
+ return await response.value();
739
+ }
696
740
  /**
697
741
  * Internal callback endpoint called when attachment processing is complete. Réservé au service de documents : tout autre appelant reçoit un 403. L\'attachment doit être en état `PROCESSING`.
698
742
  * Mark a conversation attachment as processed
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { ChatSessionSummaryUio } from './ChatSessionSummaryUio';
12
13
  /**
13
14
  * État de la conversation d'un agent pour l'utilisateur courant. Le nombre de non-lus est dérivé des messages postérieurs à sa marque de lecture.
14
15
  * @export
@@ -34,7 +35,7 @@ export interface AgentChatOverviewEntryUio {
34
35
  */
35
36
  lastMessageAt?: string | null;
36
37
  /**
37
- * Messages non lus, hors messages de l'utilisateur lui-même
38
+ * Non-lus de cette conversation : messages de l'agent postérieurs à la marque de lecture, et interactions qui attendent l'utilisateur (question Human_ask, validation d'outil) tant qu'elles ne sont pas traitées.
38
39
  * @type {number}
39
40
  * @memberof AgentChatOverviewEntryUio
40
41
  */
@@ -51,6 +52,24 @@ export interface AgentChatOverviewEntryUio {
51
52
  * @memberof AgentChatOverviewEntryUio
52
53
  */
53
54
  pendingHumanRequests?: number;
55
+ /**
56
+ * Somme des non-lus sur toutes les sessions de l'utilisateur avec cet agent
57
+ * @type {number}
58
+ * @memberof AgentChatOverviewEntryUio
59
+ */
60
+ totalUnreadCount?: number;
61
+ /**
62
+ * Nombre de sessions de l'utilisateur avec cet agent
63
+ * @type {number}
64
+ * @memberof AgentChatOverviewEntryUio
65
+ */
66
+ sessionCount?: number;
67
+ /**
68
+ * Sessions les plus récemment actives, conversation principale comprise
69
+ * @type {Array<ChatSessionSummaryUio>}
70
+ * @memberof AgentChatOverviewEntryUio
71
+ */
72
+ recentSessions?: Array<ChatSessionSummaryUio>;
54
73
  }
55
74
  /**
56
75
  * Check if a given object implements the AgentChatOverviewEntryUio interface.
@@ -18,6 +18,7 @@ exports.AgentChatOverviewEntryUioFromJSON = AgentChatOverviewEntryUioFromJSON;
18
18
  exports.AgentChatOverviewEntryUioFromJSONTyped = AgentChatOverviewEntryUioFromJSONTyped;
19
19
  exports.AgentChatOverviewEntryUioToJSON = AgentChatOverviewEntryUioToJSON;
20
20
  exports.AgentChatOverviewEntryUioToJSONTyped = AgentChatOverviewEntryUioToJSONTyped;
21
+ const ChatSessionSummaryUio_1 = require("./ChatSessionSummaryUio");
21
22
  /**
22
23
  * Check if a given object implements the AgentChatOverviewEntryUio interface.
23
24
  */
@@ -46,6 +47,9 @@ function AgentChatOverviewEntryUioFromJSONTyped(json, ignoreDiscriminator) {
46
47
  'unreadCount': json['unreadCount'],
47
48
  'isGenerating': json['isGenerating'],
48
49
  'pendingHumanRequests': json['pendingHumanRequests'] == null ? undefined : json['pendingHumanRequests'],
50
+ 'totalUnreadCount': json['totalUnreadCount'] == null ? undefined : json['totalUnreadCount'],
51
+ 'sessionCount': json['sessionCount'] == null ? undefined : json['sessionCount'],
52
+ 'recentSessions': json['recentSessions'] == null ? undefined : (json['recentSessions'].map(ChatSessionSummaryUio_1.ChatSessionSummaryUioFromJSON)),
49
53
  };
50
54
  }
51
55
  function AgentChatOverviewEntryUioToJSON(json) {
@@ -62,5 +66,8 @@ function AgentChatOverviewEntryUioToJSONTyped(value, ignoreDiscriminator = false
62
66
  'unreadCount': value['unreadCount'],
63
67
  'isGenerating': value['isGenerating'],
64
68
  'pendingHumanRequests': value['pendingHumanRequests'],
69
+ 'totalUnreadCount': value['totalUnreadCount'],
70
+ 'sessionCount': value['sessionCount'],
71
+ 'recentSessions': value['recentSessions'] == null ? undefined : (value['recentSessions'].map(ChatSessionSummaryUio_1.ChatSessionSummaryUioToJSON)),
65
72
  };
66
73
  }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface ChatSessionSummaryLastMessagePreviewUio
16
+ */
17
+ export interface ChatSessionSummaryLastMessagePreviewUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ChatSessionSummaryLastMessagePreviewUio
22
+ */
23
+ role: ChatSessionSummaryLastMessagePreviewUioRoleEnum;
24
+ /**
25
+ * Début du dernier message, tronqué
26
+ * @type {string}
27
+ * @memberof ChatSessionSummaryLastMessagePreviewUio
28
+ */
29
+ content: string;
30
+ }
31
+ /**
32
+ * @export
33
+ */
34
+ export declare const ChatSessionSummaryLastMessagePreviewUioRoleEnum: {
35
+ readonly User: "USER";
36
+ readonly Assistant: "ASSISTANT";
37
+ };
38
+ export type ChatSessionSummaryLastMessagePreviewUioRoleEnum = typeof ChatSessionSummaryLastMessagePreviewUioRoleEnum[keyof typeof ChatSessionSummaryLastMessagePreviewUioRoleEnum];
39
+ /**
40
+ * Check if a given object implements the ChatSessionSummaryLastMessagePreviewUio interface.
41
+ */
42
+ export declare function instanceOfChatSessionSummaryLastMessagePreviewUio(value: object): value is ChatSessionSummaryLastMessagePreviewUio;
43
+ export declare function ChatSessionSummaryLastMessagePreviewUioFromJSON(json: any): ChatSessionSummaryLastMessagePreviewUio;
44
+ export declare function ChatSessionSummaryLastMessagePreviewUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatSessionSummaryLastMessagePreviewUio;
45
+ export declare function ChatSessionSummaryLastMessagePreviewUioToJSON(json: any): ChatSessionSummaryLastMessagePreviewUio;
46
+ export declare function ChatSessionSummaryLastMessagePreviewUioToJSONTyped(value?: ChatSessionSummaryLastMessagePreviewUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,62 @@
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.ChatSessionSummaryLastMessagePreviewUioRoleEnum = void 0;
17
+ exports.instanceOfChatSessionSummaryLastMessagePreviewUio = instanceOfChatSessionSummaryLastMessagePreviewUio;
18
+ exports.ChatSessionSummaryLastMessagePreviewUioFromJSON = ChatSessionSummaryLastMessagePreviewUioFromJSON;
19
+ exports.ChatSessionSummaryLastMessagePreviewUioFromJSONTyped = ChatSessionSummaryLastMessagePreviewUioFromJSONTyped;
20
+ exports.ChatSessionSummaryLastMessagePreviewUioToJSON = ChatSessionSummaryLastMessagePreviewUioToJSON;
21
+ exports.ChatSessionSummaryLastMessagePreviewUioToJSONTyped = ChatSessionSummaryLastMessagePreviewUioToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.ChatSessionSummaryLastMessagePreviewUioRoleEnum = {
26
+ User: 'USER',
27
+ Assistant: 'ASSISTANT'
28
+ };
29
+ /**
30
+ * Check if a given object implements the ChatSessionSummaryLastMessagePreviewUio interface.
31
+ */
32
+ function instanceOfChatSessionSummaryLastMessagePreviewUio(value) {
33
+ if (!('role' in value) || value['role'] === undefined)
34
+ return false;
35
+ if (!('content' in value) || value['content'] === undefined)
36
+ return false;
37
+ return true;
38
+ }
39
+ function ChatSessionSummaryLastMessagePreviewUioFromJSON(json) {
40
+ return ChatSessionSummaryLastMessagePreviewUioFromJSONTyped(json, false);
41
+ }
42
+ function ChatSessionSummaryLastMessagePreviewUioFromJSONTyped(json, ignoreDiscriminator) {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+ 'role': json['role'],
48
+ 'content': json['content'],
49
+ };
50
+ }
51
+ function ChatSessionSummaryLastMessagePreviewUioToJSON(json) {
52
+ return ChatSessionSummaryLastMessagePreviewUioToJSONTyped(json, false);
53
+ }
54
+ function ChatSessionSummaryLastMessagePreviewUioToJSONTyped(value, ignoreDiscriminator = false) {
55
+ if (value == null) {
56
+ return value;
57
+ }
58
+ return {
59
+ 'role': value['role'],
60
+ 'content': value['content'],
61
+ };
62
+ }
@@ -0,0 +1,87 @@
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 { ChatSessionSummaryLastMessagePreviewUio } from './ChatSessionSummaryLastMessagePreviewUio';
13
+ /**
14
+ * Une session de chat de l'utilisateur courant avec un agent.
15
+ * @export
16
+ * @interface ChatSessionSummaryUio
17
+ */
18
+ export interface ChatSessionSummaryUio {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof ChatSessionSummaryUio
23
+ */
24
+ id: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof ChatSessionSummaryUio
29
+ */
30
+ agentId: string;
31
+ /**
32
+ * Titre de la session ; à défaut, le premier message tronqué
33
+ * @type {string}
34
+ * @memberof ChatSessionSummaryUio
35
+ */
36
+ title: string | null;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof ChatSessionSummaryUio
41
+ */
42
+ createdAt: string;
43
+ /**
44
+ * Horodatage du dernier message, null si la session est vide
45
+ * @type {string}
46
+ * @memberof ChatSessionSummaryUio
47
+ */
48
+ lastMessageAt: string | null;
49
+ /**
50
+ *
51
+ * @type {ChatSessionSummaryLastMessagePreviewUio}
52
+ * @memberof ChatSessionSummaryUio
53
+ */
54
+ lastMessagePreview?: ChatSessionSummaryLastMessagePreviewUio | null;
55
+ /**
56
+ * Même définition que AgentChatOverviewEntry.unreadCount
57
+ * @type {number}
58
+ * @memberof ChatSessionSummaryUio
59
+ */
60
+ unreadCount: number;
61
+ /**
62
+ *
63
+ * @type {boolean}
64
+ * @memberof ChatSessionSummaryUio
65
+ */
66
+ isGenerating: boolean;
67
+ /**
68
+ * Vrai si c'est la conversation principale de l'utilisateur avec cet agent
69
+ * @type {boolean}
70
+ * @memberof ChatSessionSummaryUio
71
+ */
72
+ isMain: boolean;
73
+ /**
74
+ * Questions Human_ask en attente dans cette session
75
+ * @type {number}
76
+ * @memberof ChatSessionSummaryUio
77
+ */
78
+ pendingHumanRequests: number;
79
+ }
80
+ /**
81
+ * Check if a given object implements the ChatSessionSummaryUio interface.
82
+ */
83
+ export declare function instanceOfChatSessionSummaryUio(value: object): value is ChatSessionSummaryUio;
84
+ export declare function ChatSessionSummaryUioFromJSON(json: any): ChatSessionSummaryUio;
85
+ export declare function ChatSessionSummaryUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatSessionSummaryUio;
86
+ export declare function ChatSessionSummaryUioToJSON(json: any): ChatSessionSummaryUio;
87
+ export declare function ChatSessionSummaryUioToJSONTyped(value?: ChatSessionSummaryUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,85 @@
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.instanceOfChatSessionSummaryUio = instanceOfChatSessionSummaryUio;
17
+ exports.ChatSessionSummaryUioFromJSON = ChatSessionSummaryUioFromJSON;
18
+ exports.ChatSessionSummaryUioFromJSONTyped = ChatSessionSummaryUioFromJSONTyped;
19
+ exports.ChatSessionSummaryUioToJSON = ChatSessionSummaryUioToJSON;
20
+ exports.ChatSessionSummaryUioToJSONTyped = ChatSessionSummaryUioToJSONTyped;
21
+ const ChatSessionSummaryLastMessagePreviewUio_1 = require("./ChatSessionSummaryLastMessagePreviewUio");
22
+ /**
23
+ * Check if a given object implements the ChatSessionSummaryUio interface.
24
+ */
25
+ function instanceOfChatSessionSummaryUio(value) {
26
+ if (!('id' in value) || value['id'] === undefined)
27
+ return false;
28
+ if (!('agentId' in value) || value['agentId'] === undefined)
29
+ return false;
30
+ if (!('title' in value) || value['title'] === undefined)
31
+ return false;
32
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
33
+ return false;
34
+ if (!('lastMessageAt' in value) || value['lastMessageAt'] === undefined)
35
+ return false;
36
+ if (!('unreadCount' in value) || value['unreadCount'] === undefined)
37
+ return false;
38
+ if (!('isGenerating' in value) || value['isGenerating'] === undefined)
39
+ return false;
40
+ if (!('isMain' in value) || value['isMain'] === undefined)
41
+ return false;
42
+ if (!('pendingHumanRequests' in value) || value['pendingHumanRequests'] === undefined)
43
+ return false;
44
+ return true;
45
+ }
46
+ function ChatSessionSummaryUioFromJSON(json) {
47
+ return ChatSessionSummaryUioFromJSONTyped(json, false);
48
+ }
49
+ function ChatSessionSummaryUioFromJSONTyped(json, ignoreDiscriminator) {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+ 'id': json['id'],
55
+ 'agentId': json['agentId'],
56
+ 'title': json['title'],
57
+ 'createdAt': json['createdAt'],
58
+ 'lastMessageAt': json['lastMessageAt'],
59
+ 'lastMessagePreview': json['lastMessagePreview'] == null ? undefined : (0, ChatSessionSummaryLastMessagePreviewUio_1.ChatSessionSummaryLastMessagePreviewUioFromJSON)(json['lastMessagePreview']),
60
+ 'unreadCount': json['unreadCount'],
61
+ 'isGenerating': json['isGenerating'],
62
+ 'isMain': json['isMain'],
63
+ 'pendingHumanRequests': json['pendingHumanRequests'],
64
+ };
65
+ }
66
+ function ChatSessionSummaryUioToJSON(json) {
67
+ return ChatSessionSummaryUioToJSONTyped(json, false);
68
+ }
69
+ function ChatSessionSummaryUioToJSONTyped(value, ignoreDiscriminator = false) {
70
+ if (value == null) {
71
+ return value;
72
+ }
73
+ return {
74
+ 'id': value['id'],
75
+ 'agentId': value['agentId'],
76
+ 'title': value['title'],
77
+ 'createdAt': value['createdAt'],
78
+ 'lastMessageAt': value['lastMessageAt'],
79
+ 'lastMessagePreview': (0, ChatSessionSummaryLastMessagePreviewUio_1.ChatSessionSummaryLastMessagePreviewUioToJSON)(value['lastMessagePreview']),
80
+ 'unreadCount': value['unreadCount'],
81
+ 'isGenerating': value['isGenerating'],
82
+ 'isMain': value['isMain'],
83
+ 'pendingHumanRequests': value['pendingHumanRequests'],
84
+ };
85
+ }
@@ -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 ConversationMessageImageUio
16
+ */
17
+ export interface ConversationMessageImageUio {
18
+ /**
19
+ * Identifier of the image within its document (16 hexadecimal characters)
20
+ * @type {string}
21
+ * @memberof ConversationMessageImageUio
22
+ */
23
+ imageId: string;
24
+ /**
25
+ * Alternative text of the image, empty when the document gives none
26
+ * @type {string}
27
+ * @memberof ConversationMessageImageUio
28
+ */
29
+ alt: string;
30
+ /**
31
+ * Presigned download URL, short-lived and created on each call
32
+ * @type {string}
33
+ * @memberof ConversationMessageImageUio
34
+ */
35
+ url: string;
36
+ }
37
+ /**
38
+ * Check if a given object implements the ConversationMessageImageUio interface.
39
+ */
40
+ export declare function instanceOfConversationMessageImageUio(value: object): value is ConversationMessageImageUio;
41
+ export declare function ConversationMessageImageUioFromJSON(json: any): ConversationMessageImageUio;
42
+ export declare function ConversationMessageImageUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationMessageImageUio;
43
+ export declare function ConversationMessageImageUioToJSON(json: any): ConversationMessageImageUio;
44
+ export declare function ConversationMessageImageUioToJSONTyped(value?: ConversationMessageImageUio | 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.instanceOfConversationMessageImageUio = instanceOfConversationMessageImageUio;
17
+ exports.ConversationMessageImageUioFromJSON = ConversationMessageImageUioFromJSON;
18
+ exports.ConversationMessageImageUioFromJSONTyped = ConversationMessageImageUioFromJSONTyped;
19
+ exports.ConversationMessageImageUioToJSON = ConversationMessageImageUioToJSON;
20
+ exports.ConversationMessageImageUioToJSONTyped = ConversationMessageImageUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ConversationMessageImageUio interface.
23
+ */
24
+ function instanceOfConversationMessageImageUio(value) {
25
+ if (!('imageId' in value) || value['imageId'] === undefined)
26
+ return false;
27
+ if (!('alt' in value) || value['alt'] === undefined)
28
+ return false;
29
+ if (!('url' in value) || value['url'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function ConversationMessageImageUioFromJSON(json) {
34
+ return ConversationMessageImageUioFromJSONTyped(json, false);
35
+ }
36
+ function ConversationMessageImageUioFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'imageId': json['imageId'],
42
+ 'alt': json['alt'],
43
+ 'url': json['url'],
44
+ };
45
+ }
46
+ function ConversationMessageImageUioToJSON(json) {
47
+ return ConversationMessageImageUioToJSONTyped(json, false);
48
+ }
49
+ function ConversationMessageImageUioToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'imageId': value['imageId'],
55
+ 'alt': value['alt'],
56
+ 'url': value['url'],
57
+ };
58
+ }
@@ -0,0 +1,33 @@
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 { ConversationMessageImageUio } from './ConversationMessageImageUio';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ConversationMessageImagesUio
17
+ */
18
+ export interface ConversationMessageImagesUio {
19
+ /**
20
+ *
21
+ * @type {Array<ConversationMessageImageUio>}
22
+ * @memberof ConversationMessageImagesUio
23
+ */
24
+ images: Array<ConversationMessageImageUio>;
25
+ }
26
+ /**
27
+ * Check if a given object implements the ConversationMessageImagesUio interface.
28
+ */
29
+ export declare function instanceOfConversationMessageImagesUio(value: object): value is ConversationMessageImagesUio;
30
+ export declare function ConversationMessageImagesUioFromJSON(json: any): ConversationMessageImagesUio;
31
+ export declare function ConversationMessageImagesUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationMessageImagesUio;
32
+ export declare function ConversationMessageImagesUioToJSON(json: any): ConversationMessageImagesUio;
33
+ export declare function ConversationMessageImagesUioToJSONTyped(value?: ConversationMessageImagesUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,51 @@
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.instanceOfConversationMessageImagesUio = instanceOfConversationMessageImagesUio;
17
+ exports.ConversationMessageImagesUioFromJSON = ConversationMessageImagesUioFromJSON;
18
+ exports.ConversationMessageImagesUioFromJSONTyped = ConversationMessageImagesUioFromJSONTyped;
19
+ exports.ConversationMessageImagesUioToJSON = ConversationMessageImagesUioToJSON;
20
+ exports.ConversationMessageImagesUioToJSONTyped = ConversationMessageImagesUioToJSONTyped;
21
+ const ConversationMessageImageUio_1 = require("./ConversationMessageImageUio");
22
+ /**
23
+ * Check if a given object implements the ConversationMessageImagesUio interface.
24
+ */
25
+ function instanceOfConversationMessageImagesUio(value) {
26
+ if (!('images' in value) || value['images'] === undefined)
27
+ return false;
28
+ return true;
29
+ }
30
+ function ConversationMessageImagesUioFromJSON(json) {
31
+ return ConversationMessageImagesUioFromJSONTyped(json, false);
32
+ }
33
+ function ConversationMessageImagesUioFromJSONTyped(json, ignoreDiscriminator) {
34
+ if (json == null) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'images': (json['images'].map(ConversationMessageImageUio_1.ConversationMessageImageUioFromJSON)),
39
+ };
40
+ }
41
+ function ConversationMessageImagesUioToJSON(json) {
42
+ return ConversationMessageImagesUioToJSONTyped(json, false);
43
+ }
44
+ function ConversationMessageImagesUioToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'images': (value['images'].map(ConversationMessageImageUio_1.ConversationMessageImageUioToJSON)),
50
+ };
51
+ }
@@ -167,6 +167,8 @@ export * from './ChatMessageAudioInnerUio';
167
167
  export * from './ChatMessageRoleUio';
168
168
  export * from './ChatMessageStreamUio';
169
169
  export * from './ChatMessageUio';
170
+ export * from './ChatSessionSummaryLastMessagePreviewUio';
171
+ export * from './ChatSessionSummaryUio';
170
172
  export * from './ChatUio';
171
173
  export * from './ChunkContentCreateUio';
172
174
  export * from './ChunkContentUio';
@@ -188,6 +190,8 @@ export * from './ConversationDetailUio';
188
190
  export * from './ConversationHumanRequestRequestedByUio';
189
191
  export * from './ConversationHumanRequestUio';
190
192
  export * from './ConversationMessageApprovalUio';
193
+ export * from './ConversationMessageImageUio';
194
+ export * from './ConversationMessageImagesUio';
191
195
  export * from './ConversationMessagesInnerFlowNodeEntrypointsUio';
192
196
  export * from './ConversationMessagesInnerFlowNodeUio';
193
197
  export * from './ConversationMessagesInnerSuggestionsInnerUio';
@@ -185,6 +185,8 @@ __exportStar(require("./ChatMessageAudioInnerUio"), exports);
185
185
  __exportStar(require("./ChatMessageRoleUio"), exports);
186
186
  __exportStar(require("./ChatMessageStreamUio"), exports);
187
187
  __exportStar(require("./ChatMessageUio"), exports);
188
+ __exportStar(require("./ChatSessionSummaryLastMessagePreviewUio"), exports);
189
+ __exportStar(require("./ChatSessionSummaryUio"), exports);
188
190
  __exportStar(require("./ChatUio"), exports);
189
191
  __exportStar(require("./ChunkContentCreateUio"), exports);
190
192
  __exportStar(require("./ChunkContentUio"), exports);
@@ -206,6 +208,8 @@ __exportStar(require("./ConversationDetailUio"), exports);
206
208
  __exportStar(require("./ConversationHumanRequestRequestedByUio"), exports);
207
209
  __exportStar(require("./ConversationHumanRequestUio"), exports);
208
210
  __exportStar(require("./ConversationMessageApprovalUio"), exports);
211
+ __exportStar(require("./ConversationMessageImageUio"), exports);
212
+ __exportStar(require("./ConversationMessageImagesUio"), exports);
209
213
  __exportStar(require("./ConversationMessagesInnerFlowNodeEntrypointsUio"), exports);
210
214
  __exportStar(require("./ConversationMessagesInnerFlowNodeUio"), exports);
211
215
  __exportStar(require("./ConversationMessagesInnerSuggestionsInnerUio"), exports);
package/dist/openapi.json CHANGED
@@ -2349,6 +2349,61 @@
2349
2349
  "tags" : [ "agent" ]
2350
2350
  }
2351
2351
  },
2352
+ "/agents/{agentId}/conversations/{conversationId}/messages/{messageId}/images" : {
2353
+ "get" : {
2354
+ "description" : "Returns the images of documents the language model received while answering, with presigned\nURLs created on each call. For an assistant message, the images of every tool message of its\nturn; for a tool (System) message, its own. Returns an empty list for a turn without images.\nCall this when displaying a message's \"consulted images\" block, live or in history.\n",
2355
+ "operationId" : "getConversationMessageImages",
2356
+ "parameters" : [ {
2357
+ "description" : "ID of the agent",
2358
+ "in" : "path",
2359
+ "name" : "agentId",
2360
+ "required" : true,
2361
+ "schema" : {
2362
+ "format" : "uuid",
2363
+ "type" : "string"
2364
+ }
2365
+ }, {
2366
+ "description" : "The ID of the conversation",
2367
+ "in" : "path",
2368
+ "name" : "conversationId",
2369
+ "required" : true,
2370
+ "schema" : {
2371
+ "type" : "string"
2372
+ }
2373
+ }, {
2374
+ "description" : "The ID of the message",
2375
+ "in" : "path",
2376
+ "name" : "messageId",
2377
+ "required" : true,
2378
+ "schema" : {
2379
+ "type" : "string"
2380
+ }
2381
+ } ],
2382
+ "responses" : {
2383
+ "200" : {
2384
+ "content" : {
2385
+ "application/json" : {
2386
+ "schema" : {
2387
+ "$ref" : "#/components/schemas/ConversationMessageImages"
2388
+ }
2389
+ }
2390
+ },
2391
+ "description" : "The images of the turn, each with a short-lived presigned URL"
2392
+ },
2393
+ "401" : {
2394
+ "description" : "Unauthorized"
2395
+ },
2396
+ "403" : {
2397
+ "description" : "Forbidden - User doesn't have access to this agent"
2398
+ },
2399
+ "404" : {
2400
+ "description" : "Agent, conversation, or message not found, or the message is a user message"
2401
+ }
2402
+ },
2403
+ "summary" : "Get the document images the agent was given in a conversation turn",
2404
+ "tags" : [ "agent" ]
2405
+ }
2406
+ },
2352
2407
  "/agents/{agentId}/scheduled-tasks" : {
2353
2408
  "get" : {
2354
2409
  "operationId" : "listScheduledTasks",
@@ -5394,9 +5449,109 @@
5394
5449
  "tags" : [ "conversations" ]
5395
5450
  }
5396
5451
  },
5452
+ "/organizations/{organizationId}/chat/agents/{agentId}/conversations" : {
5453
+ "get" : {
5454
+ "description" : "Sessions de chat de l'utilisateur courant avec cet agent, de la plus récemment active à la plus ancienne. Chaque session porte son nombre de non-lus, un aperçu du dernier message et l'indication qu'elle est la conversation principale (celle mémorisée par setUserAgentConversation).",
5455
+ "operationId" : "listUserAgentConversations",
5456
+ "parameters" : [ {
5457
+ "description" : "ID of the organization",
5458
+ "in" : "path",
5459
+ "name" : "organizationId",
5460
+ "required" : true,
5461
+ "schema" : {
5462
+ "type" : "string"
5463
+ }
5464
+ }, {
5465
+ "description" : "ID of the agent",
5466
+ "in" : "path",
5467
+ "name" : "agentId",
5468
+ "required" : true,
5469
+ "schema" : {
5470
+ "format" : "uuid",
5471
+ "type" : "string"
5472
+ }
5473
+ }, {
5474
+ "description" : "Page number (1-based). Must be used together with limit.",
5475
+ "in" : "query",
5476
+ "name" : "page",
5477
+ "required" : false,
5478
+ "schema" : {
5479
+ "minimum" : 1,
5480
+ "type" : "integer"
5481
+ }
5482
+ }, {
5483
+ "description" : "Number of sessions per page. Must be used together with page.",
5484
+ "in" : "query",
5485
+ "name" : "limit",
5486
+ "required" : false,
5487
+ "schema" : {
5488
+ "maximum" : 100,
5489
+ "minimum" : 1,
5490
+ "type" : "integer"
5491
+ }
5492
+ }, {
5493
+ "description" : "Ne renvoie que les sessions ayant des non-lus",
5494
+ "in" : "query",
5495
+ "name" : "unreadOnly",
5496
+ "required" : false,
5497
+ "schema" : {
5498
+ "type" : "boolean"
5499
+ }
5500
+ } ],
5501
+ "responses" : {
5502
+ "200" : {
5503
+ "content" : {
5504
+ "application/json" : {
5505
+ "schema" : {
5506
+ "items" : {
5507
+ "$ref" : "#/components/schemas/ChatSessionSummary"
5508
+ },
5509
+ "type" : "array"
5510
+ }
5511
+ }
5512
+ },
5513
+ "description" : "Sessions retrieved successfully",
5514
+ "headers" : {
5515
+ "X-Total-Count" : {
5516
+ "description" : "Total number of sessions matching the filters",
5517
+ "schema" : {
5518
+ "type" : "integer"
5519
+ }
5520
+ },
5521
+ "X-Page" : {
5522
+ "description" : "Current page number",
5523
+ "schema" : {
5524
+ "type" : "integer"
5525
+ }
5526
+ },
5527
+ "X-Limit" : {
5528
+ "description" : "Number of items per page",
5529
+ "schema" : {
5530
+ "type" : "integer"
5531
+ }
5532
+ },
5533
+ "X-Total-Pages" : {
5534
+ "description" : "Total number of pages",
5535
+ "schema" : {
5536
+ "type" : "integer"
5537
+ }
5538
+ }
5539
+ }
5540
+ },
5541
+ "401" : {
5542
+ "description" : "Unauthenticated"
5543
+ },
5544
+ "403" : {
5545
+ "description" : "Forbidden — the caller is not part of the organization or cannot use this agent"
5546
+ }
5547
+ },
5548
+ "summary" : "List the current user's sessions with an agent",
5549
+ "tags" : [ "conversations" ]
5550
+ }
5551
+ },
5397
5552
  "/organizations/{organizationId}/chat/overview" : {
5398
5553
  "get" : {
5399
- "description" : "Pour chaque agent de l'organisation avec lequel l'utilisateur a une conversation, renvoie sa conversation la plus récente, le nombre de messages non lus et l'indication d'une réponse en cours de génération.",
5554
+ "description" : "Pour chaque agent de l'organisation avec lequel l'utilisateur a une conversation, renvoie sa conversation la plus récente, le nombre de messages non lus et l'indication d'une réponse en cours de génération, ainsi que les totaux sur l'ensemble de ses sessions et ses sessions les plus récentes.",
5400
5555
  "operationId" : "getAgentChatOverview",
5401
5556
  "parameters" : [ {
5402
5557
  "description" : "ID of the organization",
@@ -5406,6 +5561,16 @@
5406
5561
  "schema" : {
5407
5562
  "type" : "string"
5408
5563
  }
5564
+ }, {
5565
+ "description" : "Nombre de sessions récentes renvoyées par agent (recentSessions), 5 par défaut",
5566
+ "in" : "query",
5567
+ "name" : "recent",
5568
+ "required" : false,
5569
+ "schema" : {
5570
+ "maximum" : 20,
5571
+ "minimum" : 0,
5572
+ "type" : "integer"
5573
+ }
5409
5574
  } ],
5410
5575
  "responses" : {
5411
5576
  "200" : {
@@ -16396,6 +16561,15 @@
16396
16561
  "type" : "string"
16397
16562
  }
16398
16563
  },
16564
+ "messageIdPath" : {
16565
+ "description" : "The ID of the message",
16566
+ "in" : "path",
16567
+ "name" : "messageId",
16568
+ "required" : true,
16569
+ "schema" : {
16570
+ "type" : "string"
16571
+ }
16572
+ },
16399
16573
  "taskIdPath" : {
16400
16574
  "description" : "ID of the scheduled task",
16401
16575
  "in" : "path",
@@ -16691,15 +16865,6 @@
16691
16865
  "type" : "boolean"
16692
16866
  }
16693
16867
  },
16694
- "messageIdPath" : {
16695
- "description" : "The ID of the message",
16696
- "in" : "path",
16697
- "name" : "messageId",
16698
- "required" : true,
16699
- "schema" : {
16700
- "type" : "string"
16701
- }
16702
- },
16703
16868
  "languagePath" : {
16704
16869
  "description" : "Language code",
16705
16870
  "in" : "path",
@@ -18994,6 +19159,36 @@
18994
19159
  "required" : [ "url" ],
18995
19160
  "type" : "object"
18996
19161
  },
19162
+ "ConversationMessageImages" : {
19163
+ "properties" : {
19164
+ "images" : {
19165
+ "items" : {
19166
+ "$ref" : "#/components/schemas/ConversationMessageImage"
19167
+ },
19168
+ "type" : "array"
19169
+ }
19170
+ },
19171
+ "required" : [ "images" ],
19172
+ "type" : "object"
19173
+ },
19174
+ "ConversationMessageImage" : {
19175
+ "properties" : {
19176
+ "imageId" : {
19177
+ "description" : "Identifier of the image within its document (16 hexadecimal characters)",
19178
+ "type" : "string"
19179
+ },
19180
+ "alt" : {
19181
+ "description" : "Alternative text of the image, empty when the document gives none",
19182
+ "type" : "string"
19183
+ },
19184
+ "url" : {
19185
+ "description" : "Presigned download URL, short-lived and created on each call",
19186
+ "type" : "string"
19187
+ }
19188
+ },
19189
+ "required" : [ "alt", "imageId", "url" ],
19190
+ "type" : "object"
19191
+ },
18997
19192
  "ScheduledTaskList" : {
18998
19193
  "properties" : {
18999
19194
  "tasks" : {
@@ -20513,6 +20708,52 @@
20513
20708
  "required" : [ "conversationId" ],
20514
20709
  "type" : "object"
20515
20710
  },
20711
+ "ChatSessionSummary" : {
20712
+ "description" : "Une session de chat de l'utilisateur courant avec un agent.",
20713
+ "properties" : {
20714
+ "id" : {
20715
+ "format" : "uuid",
20716
+ "type" : "string"
20717
+ },
20718
+ "agentId" : {
20719
+ "format" : "uuid",
20720
+ "type" : "string"
20721
+ },
20722
+ "title" : {
20723
+ "description" : "Titre de la session ; à défaut, le premier message tronqué",
20724
+ "nullable" : true,
20725
+ "type" : "string"
20726
+ },
20727
+ "createdAt" : {
20728
+ "type" : "string"
20729
+ },
20730
+ "lastMessageAt" : {
20731
+ "description" : "Horodatage du dernier message, null si la session est vide",
20732
+ "nullable" : true,
20733
+ "type" : "string"
20734
+ },
20735
+ "lastMessagePreview" : {
20736
+ "$ref" : "#/components/schemas/ChatSessionSummary_lastMessagePreview"
20737
+ },
20738
+ "unreadCount" : {
20739
+ "description" : "Même définition que AgentChatOverviewEntry.unreadCount",
20740
+ "type" : "integer"
20741
+ },
20742
+ "isGenerating" : {
20743
+ "type" : "boolean"
20744
+ },
20745
+ "isMain" : {
20746
+ "description" : "Vrai si c'est la conversation principale de l'utilisateur avec cet agent",
20747
+ "type" : "boolean"
20748
+ },
20749
+ "pendingHumanRequests" : {
20750
+ "description" : "Questions Human_ask en attente dans cette session",
20751
+ "type" : "integer"
20752
+ }
20753
+ },
20754
+ "required" : [ "agentId", "createdAt", "id", "isGenerating", "isMain", "lastMessageAt", "pendingHumanRequests", "title", "unreadCount" ],
20755
+ "type" : "object"
20756
+ },
20516
20757
  "AgentChatOverviewEntry" : {
20517
20758
  "description" : "État de la conversation d'un agent pour l'utilisateur courant. Le nombre de non-lus est dérivé des messages postérieurs à sa marque de lecture.",
20518
20759
  "properties" : {
@@ -20530,7 +20771,7 @@
20530
20771
  "type" : "string"
20531
20772
  },
20532
20773
  "unreadCount" : {
20533
- "description" : "Messages non lus, hors messages de l'utilisateur lui-même",
20774
+ "description" : "Non-lus de cette conversation : messages de l'agent postérieurs à la marque de lecture, et interactions qui attendent l'utilisateur (question Human_ask, validation d'outil) tant qu'elles ne sont pas traitées.",
20534
20775
  "type" : "integer"
20535
20776
  },
20536
20777
  "isGenerating" : {
@@ -20540,6 +20781,21 @@
20540
20781
  "pendingHumanRequests" : {
20541
20782
  "description" : "Questions de cet agent qui attendent une réponse de l'utilisateur courant (outil Human_ask), toutes tâches confondues.",
20542
20783
  "type" : "integer"
20784
+ },
20785
+ "totalUnreadCount" : {
20786
+ "description" : "Somme des non-lus sur toutes les sessions de l'utilisateur avec cet agent",
20787
+ "type" : "integer"
20788
+ },
20789
+ "sessionCount" : {
20790
+ "description" : "Nombre de sessions de l'utilisateur avec cet agent",
20791
+ "type" : "integer"
20792
+ },
20793
+ "recentSessions" : {
20794
+ "description" : "Sessions les plus récemment actives, conversation principale comprise",
20795
+ "items" : {
20796
+ "$ref" : "#/components/schemas/ChatSessionSummary"
20797
+ },
20798
+ "type" : "array"
20543
20799
  }
20544
20800
  },
20545
20801
  "required" : [ "agentId", "conversationId", "isGenerating", "unreadCount" ],
@@ -27228,6 +27484,21 @@
27228
27484
  "required" : [ "contentType", "ext", "size" ],
27229
27485
  "type" : "object"
27230
27486
  },
27487
+ "ChatSessionSummary_lastMessagePreview" : {
27488
+ "nullable" : true,
27489
+ "properties" : {
27490
+ "role" : {
27491
+ "enum" : [ "USER", "ASSISTANT" ],
27492
+ "type" : "string"
27493
+ },
27494
+ "content" : {
27495
+ "description" : "Début du dernier message, tronqué",
27496
+ "type" : "string"
27497
+ }
27498
+ },
27499
+ "required" : [ "content", "role" ],
27500
+ "type" : "object"
27501
+ },
27231
27502
  "HumanRequestSummary_requestedBy" : {
27232
27503
  "properties" : {
27233
27504
  "kind" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.161",
3
+ "version": "1.0.163",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",