@breign/client 1.0.133 → 1.0.134

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 { AgentChatOverviewEntryUio, AttachmentCreateRequestUio, AttachmentCreateResponseUio, AttachmentDetailsResponseUio, AttachmentProcessedRequestUio, BodyWithMessageUio, ContextLocationRequestUio, ContextUio, ConversationSummaryUio, CreateCustomVariable200ResponseUio, MarkConversationReadRequestUio, MessageAnonymizationUio, UpdateConversationTitleRequestUio, WorkspaceFileContentUio, WorkspaceFileEntryUio } from '../models/index';
13
+ import type { AgentChatOverviewEntryUio, AttachmentCreateRequestUio, AttachmentCreateResponseUio, AttachmentDetailsResponseUio, AttachmentProcessedRequestUio, BodyWithMessageUio, ContextLocationRequestUio, ContextUio, ConversationSummaryUio, CreateCustomVariable200ResponseUio, MarkConversationReadRequestUio, MessageAnonymizationUio, SetUserAgentConversationRequestUio, UpdateConversationTitleRequestUio, UpdateUserChatPreferencesRequestUio, UserChatPreferencesUio, WorkspaceFileContentUio, WorkspaceFileEntryUio } from '../models/index';
14
14
  export interface ArchiveConversationByIdRequest {
15
15
  conversationId: string;
16
16
  }
@@ -67,6 +67,9 @@ export interface GetConversationsRequest {
67
67
  period?: GetConversationsPeriodEnum;
68
68
  messageReaction?: GetConversationsMessageReactionEnum;
69
69
  }
70
+ export interface GetUserChatPreferencesRequest {
71
+ organizationId: string;
72
+ }
70
73
  export interface ListConversationWorkspaceFilesRequest {
71
74
  conversationId: string;
72
75
  }
@@ -83,6 +86,11 @@ export interface SetContextLocationRequest {
83
86
  conversationId: string;
84
87
  contextLocationRequestUio: ContextLocationRequestUio;
85
88
  }
89
+ export interface SetUserAgentConversationRequest {
90
+ organizationId: string;
91
+ agentId: string;
92
+ setUserAgentConversationRequestUio: SetUserAgentConversationRequestUio;
93
+ }
86
94
  export interface UpdateAttachmentStatusRequest {
87
95
  conversationId: string;
88
96
  attachmentId: string;
@@ -91,6 +99,10 @@ export interface UpdateConversationTitleRequest {
91
99
  conversationId: string;
92
100
  updateConversationTitleRequestUio: UpdateConversationTitleRequestUio;
93
101
  }
102
+ export interface UpdateUserChatPreferencesRequest {
103
+ organizationId: string;
104
+ updateUserChatPreferencesRequestUio: UpdateUserChatPreferencesRequestUio;
105
+ }
94
106
  export interface UploadAttachmentRequest {
95
107
  conversationId: string;
96
108
  attachmentCreateRequestUio: AttachmentCreateRequestUio;
@@ -245,6 +257,16 @@ export declare class ConversationsApi extends runtime.BaseAPI {
245
257
  * List conversations
246
258
  */
247
259
  getConversations(providerSource: GetConversationsProviderSourceEnum, organizationId?: string, page?: number, limit?: number, period?: GetConversationsPeriodEnum, messageReaction?: GetConversationsMessageReactionEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ConversationSummaryUio>>;
260
+ /**
261
+ * Agents épinglés, état du rail et conversation en cours avec chaque agent de l\'organisation, pour l\'utilisateur courant.
262
+ * Get the user\'s chat preferences
263
+ */
264
+ getUserChatPreferencesRaw(requestParameters: GetUserChatPreferencesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserChatPreferencesUio>>;
265
+ /**
266
+ * Agents épinglés, état du rail et conversation en cours avec chaque agent de l\'organisation, pour l\'utilisateur courant.
267
+ * Get the user\'s chat preferences
268
+ */
269
+ getUserChatPreferences(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserChatPreferencesUio>;
248
270
  /**
249
271
  * Reads the persisted workspace of the conversation directly from the store — no sandbox is started. The content is never returned here; use the content endpoint for that. Files whose name starts with a dot are persisted but hidden from this listing. The current usage is returned in the X-Workspace-File-Count and X-Workspace-Total-Bytes headers.
250
272
  * List the files of a conversation workspace
@@ -285,6 +307,16 @@ export declare class ConversationsApi extends runtime.BaseAPI {
285
307
  * Set the conversation location context
286
308
  */
287
309
  setContextLocation(conversationId: string, contextLocationRequestUio: ContextLocationRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BodyWithMessageUio>;
310
+ /**
311
+ * Mémorise la conversation que l\'utilisateur a en cours avec cet agent. Elle prime ensuite sur la conversation la plus récente dans l\'aperçu du chat.
312
+ * Set the conversation in progress with an agent
313
+ */
314
+ setUserAgentConversationRaw(requestParameters: SetUserAgentConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
315
+ /**
316
+ * Mémorise la conversation que l\'utilisateur a en cours avec cet agent. Elle prime ensuite sur la conversation la plus récente dans l\'aperçu du chat.
317
+ * Set the conversation in progress with an agent
318
+ */
319
+ setUserAgentConversation(organizationId: string, agentId: string, setUserAgentConversationRequestUio: SetUserAgentConversationRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
288
320
  /**
289
321
  * Change the status of an attachment to \'PROCESSING\' after it has been uploaded.
290
322
  * Update the status of an uploaded attachment
@@ -303,6 +335,16 @@ export declare class ConversationsApi extends runtime.BaseAPI {
303
335
  * Update conversation title
304
336
  */
305
337
  updateConversationTitle(conversationId: string, updateConversationTitleRequestUio: UpdateConversationTitleRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationSummaryUio>;
338
+ /**
339
+ * Mise à jour partielle — une propriété absente reste inchangée.
340
+ * Update the user\'s chat preferences
341
+ */
342
+ updateUserChatPreferencesRaw(requestParameters: UpdateUserChatPreferencesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserChatPreferencesUio>>;
343
+ /**
344
+ * Mise à jour partielle — une propriété absente reste inchangée.
345
+ * Update the user\'s chat preferences
346
+ */
347
+ updateUserChatPreferences(organizationId: string, updateUserChatPreferencesRequestUio: UpdateUserChatPreferencesRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserChatPreferencesUio>;
306
348
  /**
307
349
  * Upload one file attachment to the context of a specific conversation.
308
350
  * Upload attachment to a conversation context.
@@ -503,6 +503,35 @@ class ConversationsApi extends runtime.BaseAPI {
503
503
  const response = await this.getConversationsRaw({ providerSource: providerSource, organizationId: organizationId, page: page, limit: limit, period: period, messageReaction: messageReaction }, initOverrides);
504
504
  return await response.value();
505
505
  }
506
+ /**
507
+ * Agents épinglés, état du rail et conversation en cours avec chaque agent de l\'organisation, pour l\'utilisateur courant.
508
+ * Get the user\'s chat preferences
509
+ */
510
+ async getUserChatPreferencesRaw(requestParameters, initOverrides) {
511
+ if (requestParameters['organizationId'] == null) {
512
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getUserChatPreferences().');
513
+ }
514
+ const queryParameters = {};
515
+ const headerParameters = {};
516
+ if (this.configuration && this.configuration.apiKey) {
517
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
518
+ }
519
+ const response = await this.request({
520
+ path: `/organizations/{organizationId}/chat/preferences`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
521
+ method: 'GET',
522
+ headers: headerParameters,
523
+ query: queryParameters,
524
+ }, initOverrides);
525
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserChatPreferencesUioFromJSON)(jsonValue));
526
+ }
527
+ /**
528
+ * Agents épinglés, état du rail et conversation en cours avec chaque agent de l\'organisation, pour l\'utilisateur courant.
529
+ * Get the user\'s chat preferences
530
+ */
531
+ async getUserChatPreferences(organizationId, initOverrides) {
532
+ const response = await this.getUserChatPreferencesRaw({ organizationId: organizationId }, initOverrides);
533
+ return await response.value();
534
+ }
506
535
  /**
507
536
  * Reads the persisted workspace of the conversation directly from the store — no sandbox is started. The content is never returned here; use the content endpoint for that. Files whose name starts with a dot are persisted but hidden from this listing. The current usage is returned in the X-Workspace-File-Count and X-Workspace-Total-Bytes headers.
508
537
  * List the files of a conversation workspace
@@ -633,6 +662,42 @@ class ConversationsApi extends runtime.BaseAPI {
633
662
  const response = await this.setContextLocationRaw({ conversationId: conversationId, contextLocationRequestUio: contextLocationRequestUio }, initOverrides);
634
663
  return await response.value();
635
664
  }
665
+ /**
666
+ * Mémorise la conversation que l\'utilisateur a en cours avec cet agent. Elle prime ensuite sur la conversation la plus récente dans l\'aperçu du chat.
667
+ * Set the conversation in progress with an agent
668
+ */
669
+ async setUserAgentConversationRaw(requestParameters, initOverrides) {
670
+ if (requestParameters['organizationId'] == null) {
671
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling setUserAgentConversation().');
672
+ }
673
+ if (requestParameters['agentId'] == null) {
674
+ throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling setUserAgentConversation().');
675
+ }
676
+ if (requestParameters['setUserAgentConversationRequestUio'] == null) {
677
+ throw new runtime.RequiredError('setUserAgentConversationRequestUio', 'Required parameter "setUserAgentConversationRequestUio" was null or undefined when calling setUserAgentConversation().');
678
+ }
679
+ const queryParameters = {};
680
+ const headerParameters = {};
681
+ headerParameters['Content-Type'] = 'application/json';
682
+ if (this.configuration && this.configuration.apiKey) {
683
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
684
+ }
685
+ const response = await this.request({
686
+ path: `/organizations/{organizationId}/chat/agents/{agentId}/conversation`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
687
+ method: 'PUT',
688
+ headers: headerParameters,
689
+ query: queryParameters,
690
+ body: (0, index_1.SetUserAgentConversationRequestUioToJSON)(requestParameters['setUserAgentConversationRequestUio']),
691
+ }, initOverrides);
692
+ return new runtime.VoidApiResponse(response);
693
+ }
694
+ /**
695
+ * Mémorise la conversation que l\'utilisateur a en cours avec cet agent. Elle prime ensuite sur la conversation la plus récente dans l\'aperçu du chat.
696
+ * Set the conversation in progress with an agent
697
+ */
698
+ async setUserAgentConversation(organizationId, agentId, setUserAgentConversationRequestUio, initOverrides) {
699
+ await this.setUserAgentConversationRaw({ organizationId: organizationId, agentId: agentId, setUserAgentConversationRequestUio: setUserAgentConversationRequestUio }, initOverrides);
700
+ }
636
701
  /**
637
702
  * Change the status of an attachment to \'PROCESSING\' after it has been uploaded.
638
703
  * Update the status of an uploaded attachment
@@ -697,6 +762,40 @@ class ConversationsApi extends runtime.BaseAPI {
697
762
  const response = await this.updateConversationTitleRaw({ conversationId: conversationId, updateConversationTitleRequestUio: updateConversationTitleRequestUio }, initOverrides);
698
763
  return await response.value();
699
764
  }
765
+ /**
766
+ * Mise à jour partielle — une propriété absente reste inchangée.
767
+ * Update the user\'s chat preferences
768
+ */
769
+ async updateUserChatPreferencesRaw(requestParameters, initOverrides) {
770
+ if (requestParameters['organizationId'] == null) {
771
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling updateUserChatPreferences().');
772
+ }
773
+ if (requestParameters['updateUserChatPreferencesRequestUio'] == null) {
774
+ throw new runtime.RequiredError('updateUserChatPreferencesRequestUio', 'Required parameter "updateUserChatPreferencesRequestUio" was null or undefined when calling updateUserChatPreferences().');
775
+ }
776
+ const queryParameters = {};
777
+ const headerParameters = {};
778
+ headerParameters['Content-Type'] = 'application/json';
779
+ if (this.configuration && this.configuration.apiKey) {
780
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
781
+ }
782
+ const response = await this.request({
783
+ path: `/organizations/{organizationId}/chat/preferences`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
784
+ method: 'PUT',
785
+ headers: headerParameters,
786
+ query: queryParameters,
787
+ body: (0, index_1.UpdateUserChatPreferencesRequestUioToJSON)(requestParameters['updateUserChatPreferencesRequestUio']),
788
+ }, initOverrides);
789
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserChatPreferencesUioFromJSON)(jsonValue));
790
+ }
791
+ /**
792
+ * Mise à jour partielle — une propriété absente reste inchangée.
793
+ * Update the user\'s chat preferences
794
+ */
795
+ async updateUserChatPreferences(organizationId, updateUserChatPreferencesRequestUio, initOverrides) {
796
+ const response = await this.updateUserChatPreferencesRaw({ organizationId: organizationId, updateUserChatPreferencesRequestUio: updateUserChatPreferencesRequestUio }, initOverrides);
797
+ return await response.value();
798
+ }
700
799
  /**
701
800
  * Upload one file attachment to the context of a specific conversation.
702
801
  * Upload attachment to a conversation context.
@@ -0,0 +1,32 @@
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 SetUserAgentConversationRequestUio
16
+ */
17
+ export interface SetUserAgentConversationRequestUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof SetUserAgentConversationRequestUio
22
+ */
23
+ conversationId: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the SetUserAgentConversationRequestUio interface.
27
+ */
28
+ export declare function instanceOfSetUserAgentConversationRequestUio(value: object): value is SetUserAgentConversationRequestUio;
29
+ export declare function SetUserAgentConversationRequestUioFromJSON(json: any): SetUserAgentConversationRequestUio;
30
+ export declare function SetUserAgentConversationRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): SetUserAgentConversationRequestUio;
31
+ export declare function SetUserAgentConversationRequestUioToJSON(json: any): SetUserAgentConversationRequestUio;
32
+ export declare function SetUserAgentConversationRequestUioToJSONTyped(value?: SetUserAgentConversationRequestUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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.instanceOfSetUserAgentConversationRequestUio = instanceOfSetUserAgentConversationRequestUio;
17
+ exports.SetUserAgentConversationRequestUioFromJSON = SetUserAgentConversationRequestUioFromJSON;
18
+ exports.SetUserAgentConversationRequestUioFromJSONTyped = SetUserAgentConversationRequestUioFromJSONTyped;
19
+ exports.SetUserAgentConversationRequestUioToJSON = SetUserAgentConversationRequestUioToJSON;
20
+ exports.SetUserAgentConversationRequestUioToJSONTyped = SetUserAgentConversationRequestUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the SetUserAgentConversationRequestUio interface.
23
+ */
24
+ function instanceOfSetUserAgentConversationRequestUio(value) {
25
+ if (!('conversationId' in value) || value['conversationId'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function SetUserAgentConversationRequestUioFromJSON(json) {
30
+ return SetUserAgentConversationRequestUioFromJSONTyped(json, false);
31
+ }
32
+ function SetUserAgentConversationRequestUioFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'conversationId': json['conversationId'],
38
+ };
39
+ }
40
+ function SetUserAgentConversationRequestUioToJSON(json) {
41
+ return SetUserAgentConversationRequestUioToJSONTyped(json, false);
42
+ }
43
+ function SetUserAgentConversationRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'conversationId': value['conversationId'],
49
+ };
50
+ }
@@ -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
+ * Mise à jour partielle — une propriété absente reste inchangée.
14
+ * @export
15
+ * @interface UpdateUserChatPreferencesRequestUio
16
+ */
17
+ export interface UpdateUserChatPreferencesRequestUio {
18
+ /**
19
+ *
20
+ * @type {Array<string>}
21
+ * @memberof UpdateUserChatPreferencesRequestUio
22
+ */
23
+ pinnedAgentIds?: Array<string>;
24
+ /**
25
+ *
26
+ * @type {boolean}
27
+ * @memberof UpdateUserChatPreferencesRequestUio
28
+ */
29
+ railOpen?: boolean;
30
+ }
31
+ /**
32
+ * Check if a given object implements the UpdateUserChatPreferencesRequestUio interface.
33
+ */
34
+ export declare function instanceOfUpdateUserChatPreferencesRequestUio(value: object): value is UpdateUserChatPreferencesRequestUio;
35
+ export declare function UpdateUserChatPreferencesRequestUioFromJSON(json: any): UpdateUserChatPreferencesRequestUio;
36
+ export declare function UpdateUserChatPreferencesRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateUserChatPreferencesRequestUio;
37
+ export declare function UpdateUserChatPreferencesRequestUioToJSON(json: any): UpdateUserChatPreferencesRequestUio;
38
+ export declare function UpdateUserChatPreferencesRequestUioToJSONTyped(value?: UpdateUserChatPreferencesRequestUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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.instanceOfUpdateUserChatPreferencesRequestUio = instanceOfUpdateUserChatPreferencesRequestUio;
17
+ exports.UpdateUserChatPreferencesRequestUioFromJSON = UpdateUserChatPreferencesRequestUioFromJSON;
18
+ exports.UpdateUserChatPreferencesRequestUioFromJSONTyped = UpdateUserChatPreferencesRequestUioFromJSONTyped;
19
+ exports.UpdateUserChatPreferencesRequestUioToJSON = UpdateUserChatPreferencesRequestUioToJSON;
20
+ exports.UpdateUserChatPreferencesRequestUioToJSONTyped = UpdateUserChatPreferencesRequestUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the UpdateUserChatPreferencesRequestUio interface.
23
+ */
24
+ function instanceOfUpdateUserChatPreferencesRequestUio(value) {
25
+ return true;
26
+ }
27
+ function UpdateUserChatPreferencesRequestUioFromJSON(json) {
28
+ return UpdateUserChatPreferencesRequestUioFromJSONTyped(json, false);
29
+ }
30
+ function UpdateUserChatPreferencesRequestUioFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'pinnedAgentIds': json['pinnedAgentIds'] == null ? undefined : json['pinnedAgentIds'],
36
+ 'railOpen': json['railOpen'] == null ? undefined : json['railOpen'],
37
+ };
38
+ }
39
+ function UpdateUserChatPreferencesRequestUioToJSON(json) {
40
+ return UpdateUserChatPreferencesRequestUioToJSONTyped(json, false);
41
+ }
42
+ function UpdateUserChatPreferencesRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
43
+ if (value == null) {
44
+ return value;
45
+ }
46
+ return {
47
+ 'pinnedAgentIds': value['pinnedAgentIds'],
48
+ 'railOpen': value['railOpen'],
49
+ };
50
+ }
@@ -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 UserAgentConversationUio
16
+ */
17
+ export interface UserAgentConversationUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof UserAgentConversationUio
22
+ */
23
+ agentId: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof UserAgentConversationUio
28
+ */
29
+ conversationId: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the UserAgentConversationUio interface.
33
+ */
34
+ export declare function instanceOfUserAgentConversationUio(value: object): value is UserAgentConversationUio;
35
+ export declare function UserAgentConversationUioFromJSON(json: any): UserAgentConversationUio;
36
+ export declare function UserAgentConversationUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserAgentConversationUio;
37
+ export declare function UserAgentConversationUioToJSON(json: any): UserAgentConversationUio;
38
+ export declare function UserAgentConversationUioToJSONTyped(value?: UserAgentConversationUio | 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.instanceOfUserAgentConversationUio = instanceOfUserAgentConversationUio;
17
+ exports.UserAgentConversationUioFromJSON = UserAgentConversationUioFromJSON;
18
+ exports.UserAgentConversationUioFromJSONTyped = UserAgentConversationUioFromJSONTyped;
19
+ exports.UserAgentConversationUioToJSON = UserAgentConversationUioToJSON;
20
+ exports.UserAgentConversationUioToJSONTyped = UserAgentConversationUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the UserAgentConversationUio interface.
23
+ */
24
+ function instanceOfUserAgentConversationUio(value) {
25
+ if (!('agentId' in value) || value['agentId'] === undefined)
26
+ return false;
27
+ if (!('conversationId' in value) || value['conversationId'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function UserAgentConversationUioFromJSON(json) {
32
+ return UserAgentConversationUioFromJSONTyped(json, false);
33
+ }
34
+ function UserAgentConversationUioFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'agentId': json['agentId'],
40
+ 'conversationId': json['conversationId'],
41
+ };
42
+ }
43
+ function UserAgentConversationUioToJSON(json) {
44
+ return UserAgentConversationUioToJSONTyped(json, false);
45
+ }
46
+ function UserAgentConversationUioToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'agentId': value['agentId'],
52
+ 'conversationId': value['conversationId'],
53
+ };
54
+ }
@@ -0,0 +1,45 @@
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 { UserAgentConversationUio } from './UserAgentConversationUio';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface UserChatPreferencesUio
17
+ */
18
+ export interface UserChatPreferencesUio {
19
+ /**
20
+ * Liste ordonnée des agents épinglés dans le rail
21
+ * @type {Array<string>}
22
+ * @memberof UserChatPreferencesUio
23
+ */
24
+ pinnedAgentIds: Array<string>;
25
+ /**
26
+ *
27
+ * @type {boolean}
28
+ * @memberof UserChatPreferencesUio
29
+ */
30
+ railOpen: boolean;
31
+ /**
32
+ * Conversation en cours avec chaque agent de l'organisation
33
+ * @type {Array<UserAgentConversationUio>}
34
+ * @memberof UserChatPreferencesUio
35
+ */
36
+ agentConversations: Array<UserAgentConversationUio>;
37
+ }
38
+ /**
39
+ * Check if a given object implements the UserChatPreferencesUio interface.
40
+ */
41
+ export declare function instanceOfUserChatPreferencesUio(value: object): value is UserChatPreferencesUio;
42
+ export declare function UserChatPreferencesUioFromJSON(json: any): UserChatPreferencesUio;
43
+ export declare function UserChatPreferencesUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserChatPreferencesUio;
44
+ export declare function UserChatPreferencesUioToJSON(json: any): UserChatPreferencesUio;
45
+ export declare function UserChatPreferencesUioToJSONTyped(value?: UserChatPreferencesUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,59 @@
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.instanceOfUserChatPreferencesUio = instanceOfUserChatPreferencesUio;
17
+ exports.UserChatPreferencesUioFromJSON = UserChatPreferencesUioFromJSON;
18
+ exports.UserChatPreferencesUioFromJSONTyped = UserChatPreferencesUioFromJSONTyped;
19
+ exports.UserChatPreferencesUioToJSON = UserChatPreferencesUioToJSON;
20
+ exports.UserChatPreferencesUioToJSONTyped = UserChatPreferencesUioToJSONTyped;
21
+ const UserAgentConversationUio_1 = require("./UserAgentConversationUio");
22
+ /**
23
+ * Check if a given object implements the UserChatPreferencesUio interface.
24
+ */
25
+ function instanceOfUserChatPreferencesUio(value) {
26
+ if (!('pinnedAgentIds' in value) || value['pinnedAgentIds'] === undefined)
27
+ return false;
28
+ if (!('railOpen' in value) || value['railOpen'] === undefined)
29
+ return false;
30
+ if (!('agentConversations' in value) || value['agentConversations'] === undefined)
31
+ return false;
32
+ return true;
33
+ }
34
+ function UserChatPreferencesUioFromJSON(json) {
35
+ return UserChatPreferencesUioFromJSONTyped(json, false);
36
+ }
37
+ function UserChatPreferencesUioFromJSONTyped(json, ignoreDiscriminator) {
38
+ if (json == null) {
39
+ return json;
40
+ }
41
+ return {
42
+ 'pinnedAgentIds': json['pinnedAgentIds'],
43
+ 'railOpen': json['railOpen'],
44
+ 'agentConversations': (json['agentConversations'].map(UserAgentConversationUio_1.UserAgentConversationUioFromJSON)),
45
+ };
46
+ }
47
+ function UserChatPreferencesUioToJSON(json) {
48
+ return UserChatPreferencesUioToJSONTyped(json, false);
49
+ }
50
+ function UserChatPreferencesUioToJSONTyped(value, ignoreDiscriminator = false) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'pinnedAgentIds': value['pinnedAgentIds'],
56
+ 'railOpen': value['railOpen'],
57
+ 'agentConversations': (value['agentConversations'].map(UserAgentConversationUio_1.UserAgentConversationUioToJSON)),
58
+ };
59
+ }
@@ -347,6 +347,7 @@ export * from './SetContextLocation400ResponseUio';
347
347
  export * from './SetMessageReaction200ResponseUio';
348
348
  export * from './SetMessageReactionRequestUio';
349
349
  export * from './SetTokenRequestUio';
350
+ export * from './SetUserAgentConversationRequestUio';
350
351
  export * from './SetupToolRequestUio';
351
352
  export * from './SimpleAgentUio';
352
353
  export * from './SkillAssignRequestUio';
@@ -407,9 +408,12 @@ export * from './UpdateSelectedFillers200ResponseUio';
407
408
  export * from './UpdateSelectedFillersRequestDataInnerUio';
408
409
  export * from './UpdateSelectedFillersRequestUio';
409
410
  export * from './UpdateToolStaticCredentialsRequestUio';
411
+ export * from './UpdateUserChatPreferencesRequestUio';
410
412
  export * from './UploadImageToKnowledgeBaseLibrary200ResponseUio';
411
413
  export * from './UploadImageToKnowledgeBaseLibraryRequestUio';
412
414
  export * from './UploadedStatusUpdateRequestUio';
415
+ export * from './UserAgentConversationUio';
416
+ export * from './UserChatPreferencesUio';
413
417
  export * from './UserCreateRequestUio';
414
418
  export * from './UserDetailUio';
415
419
  export * from './UserIdentifierRequestUio';
@@ -365,6 +365,7 @@ __exportStar(require("./SetContextLocation400ResponseUio"), exports);
365
365
  __exportStar(require("./SetMessageReaction200ResponseUio"), exports);
366
366
  __exportStar(require("./SetMessageReactionRequestUio"), exports);
367
367
  __exportStar(require("./SetTokenRequestUio"), exports);
368
+ __exportStar(require("./SetUserAgentConversationRequestUio"), exports);
368
369
  __exportStar(require("./SetupToolRequestUio"), exports);
369
370
  __exportStar(require("./SimpleAgentUio"), exports);
370
371
  __exportStar(require("./SkillAssignRequestUio"), exports);
@@ -425,9 +426,12 @@ __exportStar(require("./UpdateSelectedFillers200ResponseUio"), exports);
425
426
  __exportStar(require("./UpdateSelectedFillersRequestDataInnerUio"), exports);
426
427
  __exportStar(require("./UpdateSelectedFillersRequestUio"), exports);
427
428
  __exportStar(require("./UpdateToolStaticCredentialsRequestUio"), exports);
429
+ __exportStar(require("./UpdateUserChatPreferencesRequestUio"), exports);
428
430
  __exportStar(require("./UploadImageToKnowledgeBaseLibrary200ResponseUio"), exports);
429
431
  __exportStar(require("./UploadImageToKnowledgeBaseLibraryRequestUio"), exports);
430
432
  __exportStar(require("./UploadedStatusUpdateRequestUio"), exports);
433
+ __exportStar(require("./UserAgentConversationUio"), exports);
434
+ __exportStar(require("./UserChatPreferencesUio"), exports);
431
435
  __exportStar(require("./UserCreateRequestUio"), exports);
432
436
  __exportStar(require("./UserDetailUio"), exports);
433
437
  __exportStar(require("./UserIdentifierRequestUio"), exports);
package/dist/openapi.json CHANGED
@@ -5103,6 +5103,140 @@
5103
5103
  "tags" : [ "conversations" ]
5104
5104
  }
5105
5105
  },
5106
+ "/organizations/{organizationId}/chat/preferences" : {
5107
+ "get" : {
5108
+ "description" : "Agents épinglés, état du rail et conversation en cours avec chaque agent de l'organisation, pour l'utilisateur courant.",
5109
+ "operationId" : "getUserChatPreferences",
5110
+ "parameters" : [ {
5111
+ "description" : "ID of the organization",
5112
+ "in" : "path",
5113
+ "name" : "organizationId",
5114
+ "required" : true,
5115
+ "schema" : {
5116
+ "type" : "string"
5117
+ }
5118
+ } ],
5119
+ "responses" : {
5120
+ "200" : {
5121
+ "content" : {
5122
+ "application/json" : {
5123
+ "schema" : {
5124
+ "$ref" : "#/components/schemas/UserChatPreferences"
5125
+ }
5126
+ }
5127
+ },
5128
+ "description" : "Preferences retrieved successfully"
5129
+ },
5130
+ "401" : {
5131
+ "description" : "Unauthenticated"
5132
+ },
5133
+ "403" : {
5134
+ "description" : "Forbidden — the caller is not part of the organization"
5135
+ }
5136
+ },
5137
+ "summary" : "Get the user's chat preferences",
5138
+ "tags" : [ "conversations" ]
5139
+ },
5140
+ "put" : {
5141
+ "description" : "Mise à jour partielle — une propriété absente reste inchangée.",
5142
+ "operationId" : "updateUserChatPreferences",
5143
+ "parameters" : [ {
5144
+ "description" : "ID of the organization",
5145
+ "in" : "path",
5146
+ "name" : "organizationId",
5147
+ "required" : true,
5148
+ "schema" : {
5149
+ "type" : "string"
5150
+ }
5151
+ } ],
5152
+ "requestBody" : {
5153
+ "content" : {
5154
+ "application/json" : {
5155
+ "schema" : {
5156
+ "$ref" : "#/components/schemas/UpdateUserChatPreferencesRequest"
5157
+ }
5158
+ }
5159
+ },
5160
+ "required" : true
5161
+ },
5162
+ "responses" : {
5163
+ "200" : {
5164
+ "content" : {
5165
+ "application/json" : {
5166
+ "schema" : {
5167
+ "$ref" : "#/components/schemas/UserChatPreferences"
5168
+ }
5169
+ }
5170
+ },
5171
+ "description" : "Updated preferences"
5172
+ },
5173
+ "400" : {
5174
+ "description" : "Invalid payload"
5175
+ },
5176
+ "401" : {
5177
+ "description" : "Unauthenticated"
5178
+ },
5179
+ "403" : {
5180
+ "description" : "Forbidden — the caller is not part of the organization"
5181
+ }
5182
+ },
5183
+ "summary" : "Update the user's chat preferences",
5184
+ "tags" : [ "conversations" ]
5185
+ }
5186
+ },
5187
+ "/organizations/{organizationId}/chat/agents/{agentId}/conversation" : {
5188
+ "put" : {
5189
+ "description" : "Mémorise la conversation que l'utilisateur a en cours avec cet agent. Elle prime ensuite sur la conversation la plus récente dans l'aperçu du chat.",
5190
+ "operationId" : "setUserAgentConversation",
5191
+ "parameters" : [ {
5192
+ "description" : "ID of the organization",
5193
+ "in" : "path",
5194
+ "name" : "organizationId",
5195
+ "required" : true,
5196
+ "schema" : {
5197
+ "type" : "string"
5198
+ }
5199
+ }, {
5200
+ "description" : "ID of the agent",
5201
+ "in" : "path",
5202
+ "name" : "agentId",
5203
+ "required" : true,
5204
+ "schema" : {
5205
+ "format" : "uuid",
5206
+ "type" : "string"
5207
+ }
5208
+ } ],
5209
+ "requestBody" : {
5210
+ "content" : {
5211
+ "application/json" : {
5212
+ "schema" : {
5213
+ "$ref" : "#/components/schemas/SetUserAgentConversationRequest"
5214
+ }
5215
+ }
5216
+ },
5217
+ "required" : true
5218
+ },
5219
+ "responses" : {
5220
+ "204" : {
5221
+ "description" : "Conversation pointer updated"
5222
+ },
5223
+ "400" : {
5224
+ "description" : "conversationId is required"
5225
+ },
5226
+ "401" : {
5227
+ "description" : "Unauthenticated"
5228
+ },
5229
+ "403" : {
5230
+ "description" : "Forbidden"
5231
+ },
5232
+ "404" : {
5233
+ "description" : "CONVERSATION_NOT_FOUND — unknown"
5234
+ }
5235
+ },
5236
+ "summary" : "Set the conversation in progress with an agent",
5237
+ "tags" : [ "conversations" ]
5238
+ }
5239
+ },
5106
5240
  "/organizations/{organizationId}/chat/overview" : {
5107
5241
  "get" : {
5108
5242
  "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.",
@@ -17475,6 +17609,70 @@
17475
17609
  "$ref" : "#/components/schemas/AudioFile"
17476
17610
  } ]
17477
17611
  },
17612
+ "UserChatPreferences" : {
17613
+ "properties" : {
17614
+ "pinnedAgentIds" : {
17615
+ "description" : "Liste ordonnée des agents épinglés dans le rail",
17616
+ "items" : {
17617
+ "format" : "uuid",
17618
+ "type" : "string"
17619
+ },
17620
+ "type" : "array"
17621
+ },
17622
+ "railOpen" : {
17623
+ "type" : "boolean"
17624
+ },
17625
+ "agentConversations" : {
17626
+ "description" : "Conversation en cours avec chaque agent de l'organisation",
17627
+ "items" : {
17628
+ "$ref" : "#/components/schemas/UserAgentConversation"
17629
+ },
17630
+ "type" : "array"
17631
+ }
17632
+ },
17633
+ "required" : [ "agentConversations", "pinnedAgentIds", "railOpen" ],
17634
+ "type" : "object"
17635
+ },
17636
+ "UserAgentConversation" : {
17637
+ "properties" : {
17638
+ "agentId" : {
17639
+ "format" : "uuid",
17640
+ "type" : "string"
17641
+ },
17642
+ "conversationId" : {
17643
+ "format" : "uuid",
17644
+ "type" : "string"
17645
+ }
17646
+ },
17647
+ "required" : [ "agentId", "conversationId" ],
17648
+ "type" : "object"
17649
+ },
17650
+ "UpdateUserChatPreferencesRequest" : {
17651
+ "description" : "Mise à jour partielle — une propriété absente reste inchangée.",
17652
+ "properties" : {
17653
+ "pinnedAgentIds" : {
17654
+ "items" : {
17655
+ "format" : "uuid",
17656
+ "type" : "string"
17657
+ },
17658
+ "type" : "array"
17659
+ },
17660
+ "railOpen" : {
17661
+ "type" : "boolean"
17662
+ }
17663
+ },
17664
+ "type" : "object"
17665
+ },
17666
+ "SetUserAgentConversationRequest" : {
17667
+ "properties" : {
17668
+ "conversationId" : {
17669
+ "format" : "uuid",
17670
+ "type" : "string"
17671
+ }
17672
+ },
17673
+ "required" : [ "conversationId" ],
17674
+ "type" : "object"
17675
+ },
17478
17676
  "AgentChatOverviewEntry" : {
17479
17677
  "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.",
17480
17678
  "properties" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.133",
3
+ "version": "1.0.134",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",