@breign/client 1.0.19 → 1.0.20

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.
@@ -24,6 +24,10 @@ export interface CreateModuleForOrganizationRequest {
24
24
  organizationId: string;
25
25
  agentModuleUio: AgentModuleUio;
26
26
  }
27
+ export interface DeleteChunkFromKnowledgeFileRequest {
28
+ knowledgebaseId: string;
29
+ chunkIdKnowledge: string;
30
+ }
27
31
  export interface DeleteFileFromAgentKnowledgeRequest {
28
32
  agentId: string;
29
33
  fileId: string;
@@ -88,6 +92,16 @@ export declare class KnowledgeApi extends runtime.BaseAPI {
88
92
  * Create a new module for an organization
89
93
  */
90
94
  createModuleForOrganization(organizationId: string, agentModuleUio: AgentModuleUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentModuleUio>;
95
+ /**
96
+ * Deletes a chunk from a knowledge file
97
+ * Delete a chunk from a knowledge file
98
+ */
99
+ deleteChunkFromKnowledgeFileRaw(requestParameters: DeleteChunkFromKnowledgeFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
100
+ /**
101
+ * Deletes a chunk from a knowledge file
102
+ * Delete a chunk from a knowledge file
103
+ */
104
+ deleteChunkFromKnowledgeFile(knowledgebaseId: string, chunkIdKnowledge: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
91
105
  /**
92
106
  * Removes a file and its associated chunks from the agent\'s knowledge base
93
107
  * Delete a knowledge file from an agent
@@ -157,6 +157,37 @@ class KnowledgeApi extends runtime.BaseAPI {
157
157
  const response = await this.createModuleForOrganizationRaw({ organizationId: organizationId, agentModuleUio: agentModuleUio }, initOverrides);
158
158
  return await response.value();
159
159
  }
160
+ /**
161
+ * Deletes a chunk from a knowledge file
162
+ * Delete a chunk from a knowledge file
163
+ */
164
+ async deleteChunkFromKnowledgeFileRaw(requestParameters, initOverrides) {
165
+ if (requestParameters['knowledgebaseId'] == null) {
166
+ throw new runtime.RequiredError('knowledgebaseId', 'Required parameter "knowledgebaseId" was null or undefined when calling deleteChunkFromKnowledgeFile().');
167
+ }
168
+ if (requestParameters['chunkIdKnowledge'] == null) {
169
+ throw new runtime.RequiredError('chunkIdKnowledge', 'Required parameter "chunkIdKnowledge" was null or undefined when calling deleteChunkFromKnowledgeFile().');
170
+ }
171
+ const queryParameters = {};
172
+ const headerParameters = {};
173
+ if (this.configuration && this.configuration.apiKey) {
174
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
175
+ }
176
+ const response = await this.request({
177
+ path: `/knowledge-bases/{knowledgebaseId}/chunks/{chunkIdKnowledge}`.replace(`{${"knowledgebaseId"}}`, encodeURIComponent(String(requestParameters['knowledgebaseId']))).replace(`{${"chunkIdKnowledge"}}`, encodeURIComponent(String(requestParameters['chunkIdKnowledge']))),
178
+ method: 'DELETE',
179
+ headers: headerParameters,
180
+ query: queryParameters,
181
+ }, initOverrides);
182
+ return new runtime.VoidApiResponse(response);
183
+ }
184
+ /**
185
+ * Deletes a chunk from a knowledge file
186
+ * Delete a chunk from a knowledge file
187
+ */
188
+ async deleteChunkFromKnowledgeFile(knowledgebaseId, chunkIdKnowledge, initOverrides) {
189
+ await this.deleteChunkFromKnowledgeFileRaw({ knowledgebaseId: knowledgebaseId, chunkIdKnowledge: chunkIdKnowledge }, initOverrides);
190
+ }
160
191
  /**
161
192
  * Removes a file and its associated chunks from the agent\'s knowledge base
162
193
  * Delete a knowledge file from an agent
package/dist/openapi.json CHANGED
@@ -4432,6 +4432,46 @@
4432
4432
  "tags" : [ "knowledge" ]
4433
4433
  }
4434
4434
  },
4435
+ "/knowledge-bases/{knowledgebaseId}/chunks/{chunkIdKnowledge}" : {
4436
+ "delete" : {
4437
+ "description" : "Deletes a chunk from a knowledge file",
4438
+ "operationId" : "deleteChunkFromKnowledgeFile",
4439
+ "parameters" : [ {
4440
+ "description" : "ID of the knowledge base to retrieve",
4441
+ "in" : "path",
4442
+ "name" : "knowledgebaseId",
4443
+ "required" : true,
4444
+ "schema" : {
4445
+ "format" : "uuid",
4446
+ "type" : "string"
4447
+ }
4448
+ }, {
4449
+ "description" : "ID of the chunk knowledge file",
4450
+ "in" : "path",
4451
+ "name" : "chunkIdKnowledge",
4452
+ "required" : true,
4453
+ "schema" : {
4454
+ "type" : "string"
4455
+ }
4456
+ } ],
4457
+ "responses" : {
4458
+ "204" : {
4459
+ "description" : "Chunk deleted successfully"
4460
+ },
4461
+ "401" : {
4462
+ "description" : "Unauthorized"
4463
+ },
4464
+ "404" : {
4465
+ "description" : "chunk not found"
4466
+ },
4467
+ "500" : {
4468
+ "description" : "Server error"
4469
+ }
4470
+ },
4471
+ "summary" : "Delete a chunk from a knowledge file",
4472
+ "tags" : [ "knowledge" ]
4473
+ }
4474
+ },
4435
4475
  "/tools/text-to-speech" : {
4436
4476
  "post" : {
4437
4477
  "description" : "Converts text to speech using the specified provider",
@@ -5127,6 +5167,25 @@
5127
5167
  "type" : "boolean"
5128
5168
  }
5129
5169
  },
5170
+ "knowledgebaseIdPath" : {
5171
+ "description" : "ID of the knowledge base to retrieve",
5172
+ "in" : "path",
5173
+ "name" : "knowledgebaseId",
5174
+ "required" : true,
5175
+ "schema" : {
5176
+ "format" : "uuid",
5177
+ "type" : "string"
5178
+ }
5179
+ },
5180
+ "chunkIdKnowledgePath" : {
5181
+ "description" : "ID of the chunk knowledge file",
5182
+ "in" : "path",
5183
+ "name" : "chunkIdKnowledge",
5184
+ "required" : true,
5185
+ "schema" : {
5186
+ "type" : "string"
5187
+ }
5188
+ },
5130
5189
  "dry" : {
5131
5190
  "description" : "If true, returns a mock transcription without processing the file",
5132
5191
  "in" : "query",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",