@breign/client 1.0.43 → 1.0.45

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.
@@ -20,6 +20,9 @@ export interface CreateCustomVariableRequest {
20
20
  [key: string]: string;
21
21
  };
22
22
  }
23
+ export interface DeleteAllAttachmentsRequest {
24
+ conversationId: string;
25
+ }
23
26
  export interface DeleteAllConversationsRequest {
24
27
  organizationId: string;
25
28
  providerSource?: DeleteAllConversationsProviderSourceEnum;
@@ -80,6 +83,16 @@ export declare class ConversationsApi extends runtime.BaseAPI {
80
83
  createCustomVariable(conversationId: string, requestBody: {
81
84
  [key: string]: string;
82
85
  }, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
86
+ /**
87
+ * Remove all attachments from the context of a specific conversation.
88
+ * Delete all attachments from a conversation context.
89
+ */
90
+ deleteAllAttachmentsRaw(requestParameters: DeleteAllAttachmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
91
+ /**
92
+ * Remove all attachments from the context of a specific conversation.
93
+ * Delete all attachments from a conversation context.
94
+ */
95
+ deleteAllAttachments(conversationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
83
96
  /**
84
97
  * Delete all conversations created by the authenticated user in the specified organization.
85
98
  * Delete all conversations
@@ -114,6 +114,34 @@ class ConversationsApi extends runtime.BaseAPI {
114
114
  async createCustomVariable(conversationId, requestBody, initOverrides) {
115
115
  await this.createCustomVariableRaw({ conversationId: conversationId, requestBody: requestBody }, initOverrides);
116
116
  }
117
+ /**
118
+ * Remove all attachments from the context of a specific conversation.
119
+ * Delete all attachments from a conversation context.
120
+ */
121
+ async deleteAllAttachmentsRaw(requestParameters, initOverrides) {
122
+ if (requestParameters['conversationId'] == null) {
123
+ throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling deleteAllAttachments().');
124
+ }
125
+ const queryParameters = {};
126
+ const headerParameters = {};
127
+ if (this.configuration && this.configuration.apiKey) {
128
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
129
+ }
130
+ const response = await this.request({
131
+ path: `/conversations/{conversationId}/context/attachments`.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId']))),
132
+ method: 'DELETE',
133
+ headers: headerParameters,
134
+ query: queryParameters,
135
+ }, initOverrides);
136
+ return new runtime.VoidApiResponse(response);
137
+ }
138
+ /**
139
+ * Remove all attachments from the context of a specific conversation.
140
+ * Delete all attachments from a conversation context.
141
+ */
142
+ async deleteAllAttachments(conversationId, initOverrides) {
143
+ await this.deleteAllAttachmentsRaw({ conversationId: conversationId }, initOverrides);
144
+ }
117
145
  /**
118
146
  * Delete all conversations created by the authenticated user in the specified organization.
119
147
  * Delete all conversations
@@ -38,6 +38,8 @@ export interface DeleteImageFromKnowledgeBaseLibraryRequest {
38
38
  }
39
39
  export interface GetAgentKnowledgeFilesRequest {
40
40
  agentId: string;
41
+ searchName?: string;
42
+ searchFile?: string;
41
43
  }
42
44
  export interface GetAvailableKnowledgeBasesRequest {
43
45
  organizationId: string;
@@ -154,7 +156,7 @@ export declare class KnowledgeApi extends runtime.BaseAPI {
154
156
  * Returns all knowledge bases attached to the agent and their indexed files.
155
157
  * Get knowledge bases and files for an agent
156
158
  */
157
- getAgentKnowledgeFiles(agentId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<KnowledgeBaseWithFilesUio>>;
159
+ getAgentKnowledgeFiles(agentId: string, searchName?: string, searchFile?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<KnowledgeBaseWithFilesUio>>;
158
160
  /**
159
161
  * Returns all knowledge bases belonging to the organization that can be assigned to the specified agent…
160
162
  * List available knowledge bases for an agent
@@ -259,6 +259,12 @@ class KnowledgeApi extends runtime.BaseAPI {
259
259
  throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getAgentKnowledgeFiles().');
260
260
  }
261
261
  const queryParameters = {};
262
+ if (requestParameters['searchName'] != null) {
263
+ queryParameters['searchName'] = requestParameters['searchName'];
264
+ }
265
+ if (requestParameters['searchFile'] != null) {
266
+ queryParameters['searchFile'] = requestParameters['searchFile'];
267
+ }
262
268
  const headerParameters = {};
263
269
  if (this.configuration && this.configuration.apiKey) {
264
270
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
@@ -275,8 +281,8 @@ class KnowledgeApi extends runtime.BaseAPI {
275
281
  * Returns all knowledge bases attached to the agent and their indexed files.
276
282
  * Get knowledge bases and files for an agent
277
283
  */
278
- async getAgentKnowledgeFiles(agentId, initOverrides) {
279
- const response = await this.getAgentKnowledgeFilesRaw({ agentId: agentId }, initOverrides);
284
+ async getAgentKnowledgeFiles(agentId, searchName, searchFile, initOverrides) {
285
+ const response = await this.getAgentKnowledgeFilesRaw({ agentId: agentId, searchName: searchName, searchFile: searchFile }, initOverrides);
280
286
  return await response.value();
281
287
  }
282
288
  /**
package/dist/openapi.json CHANGED
@@ -2981,6 +2981,38 @@
2981
2981
  }
2982
2982
  },
2983
2983
  "/conversations/{conversationId}/context/attachments" : {
2984
+ "delete" : {
2985
+ "description" : "Remove all attachments from the context of a specific conversation.",
2986
+ "operationId" : "deleteAllAttachments",
2987
+ "parameters" : [ {
2988
+ "description" : "The ID of the conversation",
2989
+ "in" : "path",
2990
+ "name" : "conversationId",
2991
+ "required" : true,
2992
+ "schema" : {
2993
+ "type" : "string"
2994
+ }
2995
+ } ],
2996
+ "responses" : {
2997
+ "204" : {
2998
+ "description" : "Successfully deleted all attachments."
2999
+ },
3000
+ "401" : {
3001
+ "description" : "Unauthorized"
3002
+ },
3003
+ "403" : {
3004
+ "description" : "Forbidden - User cannot access this conversation"
3005
+ },
3006
+ "404" : {
3007
+ "description" : "Conversation not found"
3008
+ },
3009
+ "500" : {
3010
+ "description" : "Server error"
3011
+ }
3012
+ },
3013
+ "summary" : "Delete all attachments from a conversation context.",
3014
+ "tags" : [ "conversations" ]
3015
+ },
2984
3016
  "post" : {
2985
3017
  "description" : "Upload one file attachment to the context of a specific conversation.",
2986
3018
  "operationId" : "uploadAttachment",
@@ -4353,6 +4385,22 @@
4353
4385
  "format" : "uuid",
4354
4386
  "type" : "string"
4355
4387
  }
4388
+ }, {
4389
+ "description" : "Filter knowledge bases by name (case-insensitive substring)",
4390
+ "in" : "query",
4391
+ "name" : "searchName",
4392
+ "required" : false,
4393
+ "schema" : {
4394
+ "type" : "string"
4395
+ }
4396
+ }, {
4397
+ "description" : "Filter knowledge bases by file name (case-insensitive substring)",
4398
+ "in" : "query",
4399
+ "name" : "searchFile",
4400
+ "required" : false,
4401
+ "schema" : {
4402
+ "type" : "string"
4403
+ }
4356
4404
  } ],
4357
4405
  "responses" : {
4358
4406
  "200" : {
@@ -4366,7 +4414,7 @@
4366
4414
  }
4367
4415
  }
4368
4416
  },
4369
- "description" : "List of knowledge bases gand their files"
4417
+ "description" : "List of knowledge bases and their files"
4370
4418
  },
4371
4419
  "401" : {
4372
4420
  "description" : "Unauthorized"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.43",
3
+ "version": "1.0.45",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",