@breign/client 1.0.116 → 1.0.117

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.
@@ -81,6 +81,9 @@ export interface GetKnowledgeFilesByIdsRequest {
81
81
  export interface GetKnowledgeSitePagesForFileRequest {
82
82
  fileId: string;
83
83
  }
84
+ export interface GetScrappingJobStatusRequest {
85
+ jobId: string;
86
+ }
84
87
  export interface ImportFileToAgentKnowledgeRequest {
85
88
  agentId: string;
86
89
  file: Blob;
@@ -330,6 +333,20 @@ export declare class KnowledgeApi extends runtime.BaseAPI {
330
333
  * Get knowledge site pages for a file
331
334
  */
332
335
  getKnowledgeSitePagesForFile(fileId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<KnowledgeSitePageUio>>;
336
+ /**
337
+ * Returns the current status and logs of a scrapping job
338
+ * Get scrapping job status
339
+ */
340
+ getScrappingJobStatusRaw(requestParameters: GetScrappingJobStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
341
+ [key: string]: any;
342
+ }>>;
343
+ /**
344
+ * Returns the current status and logs of a scrapping job
345
+ * Get scrapping job status
346
+ */
347
+ getScrappingJobStatus(jobId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
348
+ [key: string]: any;
349
+ }>;
333
350
  /**
334
351
  * Processes documents like PDFs, CSVs, and text files, and adds them to the brain\'s knowledge base
335
352
  * Upload and import a file into the brain\'s knowledge base
@@ -653,6 +653,35 @@ class KnowledgeApi extends runtime.BaseAPI {
653
653
  const response = await this.getKnowledgeSitePagesForFileRaw({ fileId: fileId }, initOverrides);
654
654
  return await response.value();
655
655
  }
656
+ /**
657
+ * Returns the current status and logs of a scrapping job
658
+ * Get scrapping job status
659
+ */
660
+ async getScrappingJobStatusRaw(requestParameters, initOverrides) {
661
+ if (requestParameters['jobId'] == null) {
662
+ throw new runtime.RequiredError('jobId', 'Required parameter "jobId" was null or undefined when calling getScrappingJobStatus().');
663
+ }
664
+ const queryParameters = {};
665
+ const headerParameters = {};
666
+ if (this.configuration && this.configuration.apiKey) {
667
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
668
+ }
669
+ const response = await this.request({
670
+ path: `/scrapping-jobs/{jobId}/status`.replace(`{${"jobId"}}`, encodeURIComponent(String(requestParameters['jobId']))),
671
+ method: 'GET',
672
+ headers: headerParameters,
673
+ query: queryParameters,
674
+ }, initOverrides);
675
+ return new runtime.JSONApiResponse(response);
676
+ }
677
+ /**
678
+ * Returns the current status and logs of a scrapping job
679
+ * Get scrapping job status
680
+ */
681
+ async getScrappingJobStatus(jobId, initOverrides) {
682
+ const response = await this.getScrappingJobStatusRaw({ jobId: jobId }, initOverrides);
683
+ return await response.value();
684
+ }
656
685
  /**
657
686
  * Processes documents like PDFs, CSVs, and text files, and adds them to the brain\'s knowledge base
658
687
  * Upload and import a file into the brain\'s knowledge base
package/dist/openapi.json CHANGED
@@ -8256,6 +8256,46 @@
8256
8256
  "tags" : [ "knowledge" ]
8257
8257
  }
8258
8258
  },
8259
+ "/scrapping-jobs/{jobId}/status" : {
8260
+ "get" : {
8261
+ "description" : "Returns the current status and logs of a scrapping job",
8262
+ "operationId" : "getScrappingJobStatus",
8263
+ "parameters" : [ {
8264
+ "description" : "ID of the scrapping job",
8265
+ "in" : "path",
8266
+ "name" : "jobId",
8267
+ "required" : true,
8268
+ "schema" : {
8269
+ "type" : "string"
8270
+ }
8271
+ } ],
8272
+ "responses" : {
8273
+ "200" : {
8274
+ "content" : {
8275
+ "application/json" : {
8276
+ "schema" : {
8277
+ "additionalProperties" : true,
8278
+ "description" : "Status payload returned by the scrapping service",
8279
+ "type" : "object"
8280
+ }
8281
+ }
8282
+ },
8283
+ "description" : "Scrapping job status retrieved successfully"
8284
+ },
8285
+ "401" : {
8286
+ "description" : "Unauthorized"
8287
+ },
8288
+ "404" : {
8289
+ "description" : "Scrapping job not found"
8290
+ },
8291
+ "500" : {
8292
+ "description" : "Error while fetching scrapping status"
8293
+ }
8294
+ },
8295
+ "summary" : "Get scrapping job status",
8296
+ "tags" : [ "knowledge" ]
8297
+ }
8298
+ },
8259
8299
  "/knowledge-bases/{knowledgebaseId}/chunks/{chunkIdKnowledge}" : {
8260
8300
  "delete" : {
8261
8301
  "description" : "Deletes a chunk from a knowledge file",
@@ -11794,6 +11834,15 @@
11794
11834
  "type" : "string"
11795
11835
  }
11796
11836
  },
11837
+ "scrappingJobIdPath" : {
11838
+ "description" : "ID of the scrapping job",
11839
+ "in" : "path",
11840
+ "name" : "jobId",
11841
+ "required" : true,
11842
+ "schema" : {
11843
+ "type" : "string"
11844
+ }
11845
+ },
11797
11846
  "chunkIdKnowledgePath" : {
11798
11847
  "description" : "ID of the chunk knowledge file",
11799
11848
  "in" : "path",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.116",
3
+ "version": "1.0.117",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",