@breign/client 1.0.141 → 1.0.143

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, SetUserAgentConversationRequestUio, ToolCallResultRequestUio, ToolCallResultResponseUio, ToolCallsResponseUio, UpdateConversationTitleRequestUio, UpdateUserChatPreferencesRequestUio, UserChatPreferencesUio, WorkspaceFileContentUio, WorkspaceFileEntryUio } from '../models/index';
13
+ import type { AgentChatOverviewEntryUio, AttachmentCreateRequestUio, AttachmentCreateResponseUio, AttachmentDetailsResponseUio, AttachmentProcessedRequestUio, BodyWithMessageUio, ContextLocationRequestUio, ContextUio, ConversationSummaryUio, CreateCustomVariable200ResponseUio, MarkConversationReadRequestUio, MessageAnonymizationUio, SetUserAgentConversationRequestUio, ToolCallResultRequestUio, ToolCallResultResponseUio, ToolCallsResponseUio, UpdateConversationTitleRequestUio, UpdateUserChatPreferencesRequestUio, UserChatPreferencesUio, WorkspaceFileContentUio, WorkspaceFileEntryUio, WorkspaceFileWriteRequestUio } from '../models/index';
14
14
  export interface ArchiveConversationByIdRequest {
15
15
  conversationId: string;
16
16
  }
@@ -39,6 +39,10 @@ export interface DeleteConversationWorkspaceFileRequest {
39
39
  conversationId: string;
40
40
  path: string;
41
41
  }
42
+ export interface EditConversationWorkspaceFileContentRequest {
43
+ conversationId: string;
44
+ workspaceFileWriteRequestUio: WorkspaceFileWriteRequestUio;
45
+ }
42
46
  export interface GetAgentChatOverviewRequest {
43
47
  organizationId: string;
44
48
  }
@@ -194,6 +198,16 @@ export declare class ConversationsApi extends runtime.BaseAPI {
194
198
  * Delete a file from a conversation workspace
195
199
  */
196
200
  deleteConversationWorkspaceFile(conversationId: string, path: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
201
+ /**
202
+ * Saves a user edit. Optimistic concurrency: the write only lands if the file is still at `expectedVersion`, otherwise a 409 is returned carrying the current version so the client can re-read. The agent\'s own writes are unconditional by contrast — it overwrites, then reads the user\'s edit at its next turn. Saving also discards any running sandbox session for this conversation, so the agent cannot write the file back from a stale in-memory copy.
203
+ * Edit the content of a conversation workspace file
204
+ */
205
+ editConversationWorkspaceFileContentRaw(requestParameters: EditConversationWorkspaceFileContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkspaceFileContentUio>>;
206
+ /**
207
+ * Saves a user edit. Optimistic concurrency: the write only lands if the file is still at `expectedVersion`, otherwise a 409 is returned carrying the current version so the client can re-read. The agent\'s own writes are unconditional by contrast — it overwrites, then reads the user\'s edit at its next turn. Saving also discards any running sandbox session for this conversation, so the agent cannot write the file back from a stale in-memory copy.
208
+ * Edit the content of a conversation workspace file
209
+ */
210
+ editConversationWorkspaceFileContent(conversationId: string, workspaceFileWriteRequestUio: WorkspaceFileWriteRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkspaceFileContentUio>;
197
211
  /**
198
212
  * 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.
199
213
  * Get the multi-agent chat overview
@@ -273,6 +273,40 @@ class ConversationsApi extends runtime.BaseAPI {
273
273
  async deleteConversationWorkspaceFile(conversationId, path, initOverrides) {
274
274
  await this.deleteConversationWorkspaceFileRaw({ conversationId: conversationId, path: path }, initOverrides);
275
275
  }
276
+ /**
277
+ * Saves a user edit. Optimistic concurrency: the write only lands if the file is still at `expectedVersion`, otherwise a 409 is returned carrying the current version so the client can re-read. The agent\'s own writes are unconditional by contrast — it overwrites, then reads the user\'s edit at its next turn. Saving also discards any running sandbox session for this conversation, so the agent cannot write the file back from a stale in-memory copy.
278
+ * Edit the content of a conversation workspace file
279
+ */
280
+ async editConversationWorkspaceFileContentRaw(requestParameters, initOverrides) {
281
+ if (requestParameters['conversationId'] == null) {
282
+ throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling editConversationWorkspaceFileContent().');
283
+ }
284
+ if (requestParameters['workspaceFileWriteRequestUio'] == null) {
285
+ throw new runtime.RequiredError('workspaceFileWriteRequestUio', 'Required parameter "workspaceFileWriteRequestUio" was null or undefined when calling editConversationWorkspaceFileContent().');
286
+ }
287
+ const queryParameters = {};
288
+ const headerParameters = {};
289
+ headerParameters['Content-Type'] = 'application/json';
290
+ if (this.configuration && this.configuration.apiKey) {
291
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
292
+ }
293
+ const response = await this.request({
294
+ path: `/conversations/{conversationId}/workspace/files/content`.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId']))),
295
+ method: 'PUT',
296
+ headers: headerParameters,
297
+ query: queryParameters,
298
+ body: (0, index_1.WorkspaceFileWriteRequestUioToJSON)(requestParameters['workspaceFileWriteRequestUio']),
299
+ }, initOverrides);
300
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkspaceFileContentUioFromJSON)(jsonValue));
301
+ }
302
+ /**
303
+ * Saves a user edit. Optimistic concurrency: the write only lands if the file is still at `expectedVersion`, otherwise a 409 is returned carrying the current version so the client can re-read. The agent\'s own writes are unconditional by contrast — it overwrites, then reads the user\'s edit at its next turn. Saving also discards any running sandbox session for this conversation, so the agent cannot write the file back from a stale in-memory copy.
304
+ * Edit the content of a conversation workspace file
305
+ */
306
+ async editConversationWorkspaceFileContent(conversationId, workspaceFileWriteRequestUio, initOverrides) {
307
+ const response = await this.editConversationWorkspaceFileContentRaw({ conversationId: conversationId, workspaceFileWriteRequestUio: workspaceFileWriteRequestUio }, initOverrides);
308
+ return await response.value();
309
+ }
276
310
  /**
277
311
  * 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.
278
312
  * Get the multi-agent chat overview
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { ApiKeyCreateRequestUio, ApiKeyCreatedUio, UserCreateRequestUio, UserDetailUio, UserLockRequestUio, UserUpdateRequestUio } from '../models/index';
13
+ import type { ApiKeyCreateRequestUio, ApiKeyCreatedUio, ApiKeyRefUio, UserCreateRequestUio, UserDetailUio, UserLockRequestUio, UserUpdateRequestUio } from '../models/index';
14
14
  export interface CreateUserRequest {
15
15
  userCreateRequestUio: UserCreateRequestUio;
16
16
  }
@@ -32,6 +32,9 @@ export interface GetUsersRequest {
32
32
  offset?: number;
33
33
  limit?: number;
34
34
  }
35
+ export interface ListUserApiKeysRequest {
36
+ userId: string;
37
+ }
35
38
  export interface LockUserRequest {
36
39
  userId: string;
37
40
  userLockRequestUio: UserLockRequestUio;
@@ -104,6 +107,16 @@ export declare class UsersApi extends runtime.BaseAPI {
104
107
  * List users
105
108
  */
106
109
  getUsers(offset?: number, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<UserDetailUio>>;
110
+ /**
111
+ * Lists a user\'s API keys. Allowed for super administrators and for the user themselves. Only the id and the name of each key are returned — the secret is never re-exposed after its creation.
112
+ * List API keys
113
+ */
114
+ listUserApiKeysRaw(requestParameters: ListUserApiKeysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ApiKeyRefUio>>>;
115
+ /**
116
+ * Lists a user\'s API keys. Allowed for super administrators and for the user themselves. Only the id and the name of each key are returned — the secret is never re-exposed after its creation.
117
+ * List API keys
118
+ */
119
+ listUserApiKeys(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ApiKeyRefUio>>;
107
120
  /**
108
121
  * Locks or unlocks a user account. Restricted to super administrators. Locking stamps the current date on the account; unlocking clears it.
109
122
  * Lock or unlock a user
@@ -238,6 +238,35 @@ class UsersApi extends runtime.BaseAPI {
238
238
  const response = await this.getUsersRaw({ offset: offset, limit: limit }, initOverrides);
239
239
  return await response.value();
240
240
  }
241
+ /**
242
+ * Lists a user\'s API keys. Allowed for super administrators and for the user themselves. Only the id and the name of each key are returned — the secret is never re-exposed after its creation.
243
+ * List API keys
244
+ */
245
+ async listUserApiKeysRaw(requestParameters, initOverrides) {
246
+ if (requestParameters['userId'] == null) {
247
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling listUserApiKeys().');
248
+ }
249
+ const queryParameters = {};
250
+ const headerParameters = {};
251
+ if (this.configuration && this.configuration.apiKey) {
252
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
253
+ }
254
+ const response = await this.request({
255
+ path: `/users/{userId}/api-keys`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))),
256
+ method: 'GET',
257
+ headers: headerParameters,
258
+ query: queryParameters,
259
+ }, initOverrides);
260
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.ApiKeyRefUioFromJSON));
261
+ }
262
+ /**
263
+ * Lists a user\'s API keys. Allowed for super administrators and for the user themselves. Only the id and the name of each key are returned — the secret is never re-exposed after its creation.
264
+ * List API keys
265
+ */
266
+ async listUserApiKeys(userId, initOverrides) {
267
+ const response = await this.listUserApiKeysRaw({ userId: userId }, initOverrides);
268
+ return await response.value();
269
+ }
241
270
  /**
242
271
  * Locks or unlocks a user account. Restricted to super administrators. Locking stamps the current date on the account; unlocking clears it.
243
272
  * Lock or unlock a user
@@ -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 EditConversationWorkspaceFileContent409ResponseUio
16
+ */
17
+ export interface EditConversationWorkspaceFileContent409ResponseUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof EditConversationWorkspaceFileContent409ResponseUio
22
+ */
23
+ error?: string;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof EditConversationWorkspaceFileContent409ResponseUio
28
+ */
29
+ currentVersion?: number | null;
30
+ }
31
+ /**
32
+ * Check if a given object implements the EditConversationWorkspaceFileContent409ResponseUio interface.
33
+ */
34
+ export declare function instanceOfEditConversationWorkspaceFileContent409ResponseUio(value: object): value is EditConversationWorkspaceFileContent409ResponseUio;
35
+ export declare function EditConversationWorkspaceFileContent409ResponseUioFromJSON(json: any): EditConversationWorkspaceFileContent409ResponseUio;
36
+ export declare function EditConversationWorkspaceFileContent409ResponseUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): EditConversationWorkspaceFileContent409ResponseUio;
37
+ export declare function EditConversationWorkspaceFileContent409ResponseUioToJSON(json: any): EditConversationWorkspaceFileContent409ResponseUio;
38
+ export declare function EditConversationWorkspaceFileContent409ResponseUioToJSONTyped(value?: EditConversationWorkspaceFileContent409ResponseUio | 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.instanceOfEditConversationWorkspaceFileContent409ResponseUio = instanceOfEditConversationWorkspaceFileContent409ResponseUio;
17
+ exports.EditConversationWorkspaceFileContent409ResponseUioFromJSON = EditConversationWorkspaceFileContent409ResponseUioFromJSON;
18
+ exports.EditConversationWorkspaceFileContent409ResponseUioFromJSONTyped = EditConversationWorkspaceFileContent409ResponseUioFromJSONTyped;
19
+ exports.EditConversationWorkspaceFileContent409ResponseUioToJSON = EditConversationWorkspaceFileContent409ResponseUioToJSON;
20
+ exports.EditConversationWorkspaceFileContent409ResponseUioToJSONTyped = EditConversationWorkspaceFileContent409ResponseUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the EditConversationWorkspaceFileContent409ResponseUio interface.
23
+ */
24
+ function instanceOfEditConversationWorkspaceFileContent409ResponseUio(value) {
25
+ return true;
26
+ }
27
+ function EditConversationWorkspaceFileContent409ResponseUioFromJSON(json) {
28
+ return EditConversationWorkspaceFileContent409ResponseUioFromJSONTyped(json, false);
29
+ }
30
+ function EditConversationWorkspaceFileContent409ResponseUioFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'error': json['error'] == null ? undefined : json['error'],
36
+ 'currentVersion': json['currentVersion'] == null ? undefined : json['currentVersion'],
37
+ };
38
+ }
39
+ function EditConversationWorkspaceFileContent409ResponseUioToJSON(json) {
40
+ return EditConversationWorkspaceFileContent409ResponseUioToJSONTyped(json, false);
41
+ }
42
+ function EditConversationWorkspaceFileContent409ResponseUioToJSONTyped(value, ignoreDiscriminator = false) {
43
+ if (value == null) {
44
+ return value;
45
+ }
46
+ return {
47
+ 'error': value['error'],
48
+ 'currentVersion': value['currentVersion'],
49
+ };
50
+ }
@@ -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
+ * A user edit of a workspace file. Optimistic: `expectedVersion` is the version the client read, and the write is refused with a 409 if the store has moved since — the agent may have rewritten the file between the read and the save. The file must already exist; this never creates one. `mimeType` is not accepted: the server derives it from the extension.
14
+ * @export
15
+ * @interface WorkspaceFileWriteRequestUio
16
+ */
17
+ export interface WorkspaceFileWriteRequestUio {
18
+ /**
19
+ * Absolute path inside the sandbox, always under /home/user.
20
+ * @type {string}
21
+ * @memberof WorkspaceFileWriteRequestUio
22
+ */
23
+ path: string;
24
+ /**
25
+ * UTF-8 text, without NUL bytes. Bounded by the same per-file limit as the agent's own writes.
26
+ * @type {string}
27
+ * @memberof WorkspaceFileWriteRequestUio
28
+ */
29
+ content: string;
30
+ /**
31
+ * The version the client last read. A mismatch yields a 409.
32
+ * @type {number}
33
+ * @memberof WorkspaceFileWriteRequestUio
34
+ */
35
+ expectedVersion: number;
36
+ }
37
+ /**
38
+ * Check if a given object implements the WorkspaceFileWriteRequestUio interface.
39
+ */
40
+ export declare function instanceOfWorkspaceFileWriteRequestUio(value: object): value is WorkspaceFileWriteRequestUio;
41
+ export declare function WorkspaceFileWriteRequestUioFromJSON(json: any): WorkspaceFileWriteRequestUio;
42
+ export declare function WorkspaceFileWriteRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): WorkspaceFileWriteRequestUio;
43
+ export declare function WorkspaceFileWriteRequestUioToJSON(json: any): WorkspaceFileWriteRequestUio;
44
+ export declare function WorkspaceFileWriteRequestUioToJSONTyped(value?: WorkspaceFileWriteRequestUio | 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.instanceOfWorkspaceFileWriteRequestUio = instanceOfWorkspaceFileWriteRequestUio;
17
+ exports.WorkspaceFileWriteRequestUioFromJSON = WorkspaceFileWriteRequestUioFromJSON;
18
+ exports.WorkspaceFileWriteRequestUioFromJSONTyped = WorkspaceFileWriteRequestUioFromJSONTyped;
19
+ exports.WorkspaceFileWriteRequestUioToJSON = WorkspaceFileWriteRequestUioToJSON;
20
+ exports.WorkspaceFileWriteRequestUioToJSONTyped = WorkspaceFileWriteRequestUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the WorkspaceFileWriteRequestUio interface.
23
+ */
24
+ function instanceOfWorkspaceFileWriteRequestUio(value) {
25
+ if (!('path' in value) || value['path'] === undefined)
26
+ return false;
27
+ if (!('content' in value) || value['content'] === undefined)
28
+ return false;
29
+ if (!('expectedVersion' in value) || value['expectedVersion'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function WorkspaceFileWriteRequestUioFromJSON(json) {
34
+ return WorkspaceFileWriteRequestUioFromJSONTyped(json, false);
35
+ }
36
+ function WorkspaceFileWriteRequestUioFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'path': json['path'],
42
+ 'content': json['content'],
43
+ 'expectedVersion': json['expectedVersion'],
44
+ };
45
+ }
46
+ function WorkspaceFileWriteRequestUioToJSON(json) {
47
+ return WorkspaceFileWriteRequestUioToJSONTyped(json, false);
48
+ }
49
+ function WorkspaceFileWriteRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'path': value['path'],
55
+ 'content': value['content'],
56
+ 'expectedVersion': value['expectedVersion'],
57
+ };
58
+ }
@@ -196,6 +196,7 @@ export * from './DeleteMessageAudio200ResponseUio';
196
196
  export * from './DeleteOrganizationUser200ResponseUio';
197
197
  export * from './DeleteProvider200ResponseKnowledgeBasesAffectedInnerUio';
198
198
  export * from './DeleteProvider200ResponseUio';
199
+ export * from './EditConversationWorkspaceFileContent409ResponseUio';
199
200
  export * from './EditToolApprovalRequestUio';
200
201
  export * from './EmbeddingProviderModelsInnerUio';
201
202
  export * from './EmbeddingProviderUio';
@@ -452,3 +453,4 @@ export * from './UserLockRequestUio';
452
453
  export * from './UserUpdateRequestUio';
453
454
  export * from './WorkspaceFileContentUio';
454
455
  export * from './WorkspaceFileEntryUio';
456
+ export * from './WorkspaceFileWriteRequestUio';
@@ -214,6 +214,7 @@ __exportStar(require("./DeleteMessageAudio200ResponseUio"), exports);
214
214
  __exportStar(require("./DeleteOrganizationUser200ResponseUio"), exports);
215
215
  __exportStar(require("./DeleteProvider200ResponseKnowledgeBasesAffectedInnerUio"), exports);
216
216
  __exportStar(require("./DeleteProvider200ResponseUio"), exports);
217
+ __exportStar(require("./EditConversationWorkspaceFileContent409ResponseUio"), exports);
217
218
  __exportStar(require("./EditToolApprovalRequestUio"), exports);
218
219
  __exportStar(require("./EmbeddingProviderModelsInnerUio"), exports);
219
220
  __exportStar(require("./EmbeddingProviderUio"), exports);
@@ -470,3 +471,4 @@ __exportStar(require("./UserLockRequestUio"), exports);
470
471
  __exportStar(require("./UserUpdateRequestUio"), exports);
471
472
  __exportStar(require("./WorkspaceFileContentUio"), exports);
472
473
  __exportStar(require("./WorkspaceFileEntryUio"), exports);
474
+ __exportStar(require("./WorkspaceFileWriteRequestUio"), exports);
package/dist/openapi.json CHANGED
@@ -6077,6 +6077,71 @@
6077
6077
  },
6078
6078
  "summary" : "Read the content of a conversation workspace file",
6079
6079
  "tags" : [ "conversations" ]
6080
+ },
6081
+ "put" : {
6082
+ "description" : "Saves a user edit. Optimistic concurrency: the write only lands if the file is still at `expectedVersion`, otherwise a 409 is returned carrying the current version so the client can re-read. The agent's own writes are unconditional by contrast — it overwrites, then reads the user's edit at its next turn. Saving also discards any running sandbox session for this conversation, so the agent cannot write the file back from a stale in-memory copy.",
6083
+ "operationId" : "editConversationWorkspaceFileContent",
6084
+ "parameters" : [ {
6085
+ "description" : "The ID of the conversation",
6086
+ "in" : "path",
6087
+ "name" : "conversationId",
6088
+ "required" : true,
6089
+ "schema" : {
6090
+ "type" : "string"
6091
+ }
6092
+ } ],
6093
+ "requestBody" : {
6094
+ "content" : {
6095
+ "application/json" : {
6096
+ "schema" : {
6097
+ "$ref" : "#/components/schemas/WorkspaceFileWriteRequest"
6098
+ }
6099
+ }
6100
+ },
6101
+ "required" : true
6102
+ },
6103
+ "responses" : {
6104
+ "200" : {
6105
+ "content" : {
6106
+ "application/json" : {
6107
+ "schema" : {
6108
+ "$ref" : "#/components/schemas/WorkspaceFileContent"
6109
+ }
6110
+ }
6111
+ },
6112
+ "description" : "Successfully saved. Returns the file at its new version."
6113
+ },
6114
+ "400" : {
6115
+ "description" : "Invalid path, non-text content, or invalid expectedVersion"
6116
+ },
6117
+ "401" : {
6118
+ "description" : "Unauthorized"
6119
+ },
6120
+ "403" : {
6121
+ "description" : "Forbidden - User cannot access this conversation"
6122
+ },
6123
+ "404" : {
6124
+ "description" : "Conversation or workspace file not found"
6125
+ },
6126
+ "409" : {
6127
+ "content" : {
6128
+ "application/json" : {
6129
+ "schema" : {
6130
+ "$ref" : "#/components/schemas/editConversationWorkspaceFileContent_409_response"
6131
+ }
6132
+ }
6133
+ },
6134
+ "description" : "The file was modified since it was read. The body carries `currentVersion` so the client can re-read and let the user reconcile."
6135
+ },
6136
+ "413" : {
6137
+ "description" : "Content exceeds the per-file limit, or the workspace quota is reached"
6138
+ },
6139
+ "500" : {
6140
+ "description" : "Server error"
6141
+ }
6142
+ },
6143
+ "summary" : "Edit the content of a conversation workspace file",
6144
+ "tags" : [ "conversations" ]
6080
6145
  }
6081
6146
  },
6082
6147
  "/conversations/{conversationId}/anonymization" : {
@@ -13467,6 +13532,45 @@
13467
13532
  }
13468
13533
  },
13469
13534
  "/users/{userId}/api-keys" : {
13535
+ "get" : {
13536
+ "description" : "Lists a user's API keys. Allowed for super administrators and for the user themselves. Only the id and the name of each key are returned — the secret is never re-exposed after its creation.\n",
13537
+ "operationId" : "listUserApiKeys",
13538
+ "parameters" : [ {
13539
+ "description" : "ID of the user",
13540
+ "in" : "path",
13541
+ "name" : "userId",
13542
+ "required" : true,
13543
+ "schema" : {
13544
+ "type" : "string"
13545
+ }
13546
+ } ],
13547
+ "responses" : {
13548
+ "200" : {
13549
+ "content" : {
13550
+ "application/json" : {
13551
+ "schema" : {
13552
+ "items" : {
13553
+ "$ref" : "#/components/schemas/ApiKeyRef"
13554
+ },
13555
+ "type" : "array"
13556
+ }
13557
+ }
13558
+ },
13559
+ "description" : "API keys retrieved"
13560
+ },
13561
+ "401" : {
13562
+ "description" : "Unauthenticated — no caller identity could be established"
13563
+ },
13564
+ "403" : {
13565
+ "description" : "Forbidden — the caller is neither an administrator nor this user"
13566
+ },
13567
+ "404" : {
13568
+ "description" : "User not found"
13569
+ }
13570
+ },
13571
+ "summary" : "List API keys",
13572
+ "tags" : [ "users" ]
13573
+ },
13470
13574
  "post" : {
13471
13575
  "description" : "Creates an API key for a user. Allowed for super administrators and for the user themselves. The returned `keySecret` is the only time the secret is exposed — it is not retrievable afterwards.\n",
13472
13576
  "operationId" : "createUserApiKey",
@@ -19112,6 +19216,27 @@
19112
19216
  "required" : [ "content", "mimeType", "path", "size", "updatedAt", "version" ],
19113
19217
  "type" : "object"
19114
19218
  },
19219
+ "WorkspaceFileWriteRequest" : {
19220
+ "description" : "A user edit of a workspace file. Optimistic: `expectedVersion` is the version the client read, and the write is refused with a 409 if the store has moved since — the agent may have rewritten the file between the read and the save. The file must already exist; this never creates one. `mimeType` is not accepted: the server derives it from the extension.",
19221
+ "properties" : {
19222
+ "path" : {
19223
+ "description" : "Absolute path inside the sandbox, always under /home/user.",
19224
+ "example" : "/home/user/out/rapport.md",
19225
+ "type" : "string"
19226
+ },
19227
+ "content" : {
19228
+ "description" : "UTF-8 text, without NUL bytes. Bounded by the same per-file limit as the agent's own writes.",
19229
+ "type" : "string"
19230
+ },
19231
+ "expectedVersion" : {
19232
+ "description" : "The version the client last read. A mismatch yields a 409.",
19233
+ "minimum" : 1,
19234
+ "type" : "integer"
19235
+ }
19236
+ },
19237
+ "required" : [ "content", "expectedVersion", "path" ],
19238
+ "type" : "object"
19239
+ },
19115
19240
  "MessageAnonymization" : {
19116
19241
  "additionalProperties" : false,
19117
19242
  "properties" : {
@@ -23274,6 +23399,18 @@
23274
23399
  "required" : [ "error" ],
23275
23400
  "type" : "object"
23276
23401
  },
23402
+ "editConversationWorkspaceFileContent_409_response" : {
23403
+ "properties" : {
23404
+ "error" : {
23405
+ "type" : "string"
23406
+ },
23407
+ "currentVersion" : {
23408
+ "nullable" : true,
23409
+ "type" : "integer"
23410
+ }
23411
+ },
23412
+ "type" : "object"
23413
+ },
23277
23414
  "deleteProvider_200_response_knowledgeBasesAffected_inner" : {
23278
23415
  "properties" : {
23279
23416
  "id" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.141",
3
+ "version": "1.0.143",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",