@breign/client 1.0.116 → 1.0.118
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.
|
@@ -48,6 +48,9 @@ export interface GetContextCustomVariableRequest {
|
|
|
48
48
|
export interface GetConversationsRequest {
|
|
49
49
|
organizationId?: string;
|
|
50
50
|
providerSource?: GetConversationsProviderSourceEnum;
|
|
51
|
+
page?: number;
|
|
52
|
+
limit?: number;
|
|
53
|
+
period?: GetConversationsPeriodEnum;
|
|
51
54
|
messageReaction?: GetConversationsMessageReactionEnum;
|
|
52
55
|
}
|
|
53
56
|
export interface UpdateAttachmentStatusRequest {
|
|
@@ -171,7 +174,7 @@ export declare class ConversationsApi extends runtime.BaseAPI {
|
|
|
171
174
|
* Retrieve a list of conversations for the authenticated user.
|
|
172
175
|
* List conversations
|
|
173
176
|
*/
|
|
174
|
-
getConversations(organizationId?: string, providerSource?: GetConversationsProviderSourceEnum, messageReaction?: GetConversationsMessageReactionEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ConversationSummaryUio>>;
|
|
177
|
+
getConversations(organizationId?: string, providerSource?: GetConversationsProviderSourceEnum, page?: number, limit?: number, period?: GetConversationsPeriodEnum, messageReaction?: GetConversationsMessageReactionEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ConversationSummaryUio>>;
|
|
175
178
|
/**
|
|
176
179
|
* Change the status of an attachment to \'PROCESSING\' after it has been uploaded.
|
|
177
180
|
* Update the status of an uploaded attachment
|
|
@@ -217,6 +220,17 @@ export declare const GetConversationsProviderSourceEnum: {
|
|
|
217
220
|
readonly Internal: "INTERNAL";
|
|
218
221
|
};
|
|
219
222
|
export type GetConversationsProviderSourceEnum = typeof GetConversationsProviderSourceEnum[keyof typeof GetConversationsProviderSourceEnum];
|
|
223
|
+
/**
|
|
224
|
+
* @export
|
|
225
|
+
*/
|
|
226
|
+
export declare const GetConversationsPeriodEnum: {
|
|
227
|
+
readonly Today: "today";
|
|
228
|
+
readonly Last6days: "last6days";
|
|
229
|
+
readonly Week: "week";
|
|
230
|
+
readonly Month: "month";
|
|
231
|
+
readonly Older: "older";
|
|
232
|
+
};
|
|
233
|
+
export type GetConversationsPeriodEnum = typeof GetConversationsPeriodEnum[keyof typeof GetConversationsPeriodEnum];
|
|
220
234
|
/**
|
|
221
235
|
* @export
|
|
222
236
|
*/
|
|
@@ -46,7 +46,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
46
46
|
};
|
|
47
47
|
})();
|
|
48
48
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
-
exports.GetConversationsMessageReactionEnum = exports.GetConversationsProviderSourceEnum = exports.DeleteAllConversationsProviderSourceEnum = exports.ConversationsApi = void 0;
|
|
49
|
+
exports.GetConversationsMessageReactionEnum = exports.GetConversationsPeriodEnum = exports.GetConversationsProviderSourceEnum = exports.DeleteAllConversationsProviderSourceEnum = exports.ConversationsApi = void 0;
|
|
50
50
|
const runtime = __importStar(require("../runtime"));
|
|
51
51
|
const index_1 = require("../models/index");
|
|
52
52
|
/**
|
|
@@ -341,6 +341,15 @@ class ConversationsApi extends runtime.BaseAPI {
|
|
|
341
341
|
if (requestParameters['providerSource'] != null) {
|
|
342
342
|
queryParameters['providerSource'] = requestParameters['providerSource'];
|
|
343
343
|
}
|
|
344
|
+
if (requestParameters['page'] != null) {
|
|
345
|
+
queryParameters['page'] = requestParameters['page'];
|
|
346
|
+
}
|
|
347
|
+
if (requestParameters['limit'] != null) {
|
|
348
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
349
|
+
}
|
|
350
|
+
if (requestParameters['period'] != null) {
|
|
351
|
+
queryParameters['period'] = requestParameters['period'];
|
|
352
|
+
}
|
|
344
353
|
if (requestParameters['messageReaction'] != null) {
|
|
345
354
|
queryParameters['messageReaction'] = requestParameters['messageReaction'];
|
|
346
355
|
}
|
|
@@ -360,8 +369,8 @@ class ConversationsApi extends runtime.BaseAPI {
|
|
|
360
369
|
* Retrieve a list of conversations for the authenticated user.
|
|
361
370
|
* List conversations
|
|
362
371
|
*/
|
|
363
|
-
async getConversations(organizationId, providerSource, messageReaction, initOverrides) {
|
|
364
|
-
const response = await this.getConversationsRaw({ organizationId: organizationId, providerSource: providerSource, messageReaction: messageReaction }, initOverrides);
|
|
372
|
+
async getConversations(organizationId, providerSource, page, limit, period, messageReaction, initOverrides) {
|
|
373
|
+
const response = await this.getConversationsRaw({ organizationId: organizationId, providerSource: providerSource, page: page, limit: limit, period: period, messageReaction: messageReaction }, initOverrides);
|
|
365
374
|
return await response.value();
|
|
366
375
|
}
|
|
367
376
|
/**
|
|
@@ -478,6 +487,16 @@ exports.GetConversationsProviderSourceEnum = {
|
|
|
478
487
|
External: 'EXTERNAL',
|
|
479
488
|
Internal: 'INTERNAL'
|
|
480
489
|
};
|
|
490
|
+
/**
|
|
491
|
+
* @export
|
|
492
|
+
*/
|
|
493
|
+
exports.GetConversationsPeriodEnum = {
|
|
494
|
+
Today: 'today',
|
|
495
|
+
Last6days: 'last6days',
|
|
496
|
+
Week: 'week',
|
|
497
|
+
Month: 'month',
|
|
498
|
+
Older: 'older'
|
|
499
|
+
};
|
|
481
500
|
/**
|
|
482
501
|
* @export
|
|
483
502
|
*/
|
|
@@ -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
|
@@ -4594,6 +4594,33 @@
|
|
|
4594
4594
|
"enum" : [ "EXTERNAL", "INTERNAL" ],
|
|
4595
4595
|
"type" : "string"
|
|
4596
4596
|
}
|
|
4597
|
+
}, {
|
|
4598
|
+
"description" : "Page number (1-based). Must be used together with limit.",
|
|
4599
|
+
"in" : "query",
|
|
4600
|
+
"name" : "page",
|
|
4601
|
+
"required" : false,
|
|
4602
|
+
"schema" : {
|
|
4603
|
+
"minimum" : 1,
|
|
4604
|
+
"type" : "integer"
|
|
4605
|
+
}
|
|
4606
|
+
}, {
|
|
4607
|
+
"description" : "Number of conversations per page. Must be used together with page.",
|
|
4608
|
+
"in" : "query",
|
|
4609
|
+
"name" : "limit",
|
|
4610
|
+
"required" : false,
|
|
4611
|
+
"schema" : {
|
|
4612
|
+
"minimum" : 1,
|
|
4613
|
+
"type" : "integer"
|
|
4614
|
+
}
|
|
4615
|
+
}, {
|
|
4616
|
+
"description" : "Filter conversations by time period bucket",
|
|
4617
|
+
"in" : "query",
|
|
4618
|
+
"name" : "period",
|
|
4619
|
+
"required" : false,
|
|
4620
|
+
"schema" : {
|
|
4621
|
+
"enum" : [ "today", "last6days", "week", "month", "older" ],
|
|
4622
|
+
"type" : "string"
|
|
4623
|
+
}
|
|
4597
4624
|
}, {
|
|
4598
4625
|
"description" : "Filter conversations that have at least one message with this reaction",
|
|
4599
4626
|
"in" : "query",
|
|
@@ -4615,7 +4642,33 @@
|
|
|
4615
4642
|
}
|
|
4616
4643
|
}
|
|
4617
4644
|
},
|
|
4618
|
-
"description" : "Successfully retrieved the list of conversations."
|
|
4645
|
+
"description" : "Successfully retrieved the list of conversations.",
|
|
4646
|
+
"headers" : {
|
|
4647
|
+
"X-Total-Count" : {
|
|
4648
|
+
"description" : "Total number of conversations matching the filters",
|
|
4649
|
+
"schema" : {
|
|
4650
|
+
"type" : "integer"
|
|
4651
|
+
}
|
|
4652
|
+
},
|
|
4653
|
+
"X-Page" : {
|
|
4654
|
+
"description" : "Current page number",
|
|
4655
|
+
"schema" : {
|
|
4656
|
+
"type" : "integer"
|
|
4657
|
+
}
|
|
4658
|
+
},
|
|
4659
|
+
"X-Limit" : {
|
|
4660
|
+
"description" : "Number of items per page",
|
|
4661
|
+
"schema" : {
|
|
4662
|
+
"type" : "integer"
|
|
4663
|
+
}
|
|
4664
|
+
},
|
|
4665
|
+
"X-Total-Pages" : {
|
|
4666
|
+
"description" : "Total number of pages",
|
|
4667
|
+
"schema" : {
|
|
4668
|
+
"type" : "integer"
|
|
4669
|
+
}
|
|
4670
|
+
}
|
|
4671
|
+
}
|
|
4619
4672
|
},
|
|
4620
4673
|
"401" : {
|
|
4621
4674
|
"description" : "Unauthorized"
|
|
@@ -8256,6 +8309,46 @@
|
|
|
8256
8309
|
"tags" : [ "knowledge" ]
|
|
8257
8310
|
}
|
|
8258
8311
|
},
|
|
8312
|
+
"/scrapping-jobs/{jobId}/status" : {
|
|
8313
|
+
"get" : {
|
|
8314
|
+
"description" : "Returns the current status and logs of a scrapping job",
|
|
8315
|
+
"operationId" : "getScrappingJobStatus",
|
|
8316
|
+
"parameters" : [ {
|
|
8317
|
+
"description" : "ID of the scrapping job",
|
|
8318
|
+
"in" : "path",
|
|
8319
|
+
"name" : "jobId",
|
|
8320
|
+
"required" : true,
|
|
8321
|
+
"schema" : {
|
|
8322
|
+
"type" : "string"
|
|
8323
|
+
}
|
|
8324
|
+
} ],
|
|
8325
|
+
"responses" : {
|
|
8326
|
+
"200" : {
|
|
8327
|
+
"content" : {
|
|
8328
|
+
"application/json" : {
|
|
8329
|
+
"schema" : {
|
|
8330
|
+
"additionalProperties" : true,
|
|
8331
|
+
"description" : "Status payload returned by the scrapping service",
|
|
8332
|
+
"type" : "object"
|
|
8333
|
+
}
|
|
8334
|
+
}
|
|
8335
|
+
},
|
|
8336
|
+
"description" : "Scrapping job status retrieved successfully"
|
|
8337
|
+
},
|
|
8338
|
+
"401" : {
|
|
8339
|
+
"description" : "Unauthorized"
|
|
8340
|
+
},
|
|
8341
|
+
"404" : {
|
|
8342
|
+
"description" : "Scrapping job not found"
|
|
8343
|
+
},
|
|
8344
|
+
"500" : {
|
|
8345
|
+
"description" : "Error while fetching scrapping status"
|
|
8346
|
+
}
|
|
8347
|
+
},
|
|
8348
|
+
"summary" : "Get scrapping job status",
|
|
8349
|
+
"tags" : [ "knowledge" ]
|
|
8350
|
+
}
|
|
8351
|
+
},
|
|
8259
8352
|
"/knowledge-bases/{knowledgebaseId}/chunks/{chunkIdKnowledge}" : {
|
|
8260
8353
|
"delete" : {
|
|
8261
8354
|
"description" : "Deletes a chunk from a knowledge file",
|
|
@@ -11794,6 +11887,15 @@
|
|
|
11794
11887
|
"type" : "string"
|
|
11795
11888
|
}
|
|
11796
11889
|
},
|
|
11890
|
+
"scrappingJobIdPath" : {
|
|
11891
|
+
"description" : "ID of the scrapping job",
|
|
11892
|
+
"in" : "path",
|
|
11893
|
+
"name" : "jobId",
|
|
11894
|
+
"required" : true,
|
|
11895
|
+
"schema" : {
|
|
11896
|
+
"type" : "string"
|
|
11897
|
+
}
|
|
11898
|
+
},
|
|
11797
11899
|
"chunkIdKnowledgePath" : {
|
|
11798
11900
|
"description" : "ID of the chunk knowledge file",
|
|
11799
11901
|
"in" : "path",
|