@botpress/client 0.26.5 → 0.28.0
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.
- package/.turbo/turbo-build.log +7 -7
- package/.turbo/turbo-generate.log +1 -1
- package/dist/bundle.cjs +13 -13
- package/dist/bundle.cjs.map +4 -4
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +220 -2
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +4 -4
- package/package.json +2 -2
- package/readme.md +22 -13
package/dist/index.d.ts
CHANGED
|
@@ -7807,7 +7807,7 @@ interface UpsertFileRequestBody {
|
|
|
7807
7807
|
*/
|
|
7808
7808
|
contentType?: string;
|
|
7809
7809
|
/**
|
|
7810
|
-
* Expiry timestamp in ISO 8601 format with UTC timezone. After expiry, the File will be deleted. Must be in the future. Cannot be more than
|
|
7810
|
+
* Expiry timestamp in ISO 8601 format with UTC timezone. After expiry, the File will be deleted. Must be in the future. Cannot be more than 90 days from now. The value up to minutes is considered. Seconds and milliseconds are ignored.
|
|
7811
7811
|
*/
|
|
7812
7812
|
expiresAt?: string;
|
|
7813
7813
|
}
|
|
@@ -8090,7 +8090,7 @@ interface UpdateFileMetadataRequestBody {
|
|
|
8090
8090
|
*/
|
|
8091
8091
|
accessPolicies?: ("integrations" | "public_content")[];
|
|
8092
8092
|
/**
|
|
8093
|
-
* Expiry timestamp in ISO 8601 format with UTC timezone. After expiry, the File will be deleted. Must be in the future. Cannot be more than
|
|
8093
|
+
* Expiry timestamp in ISO 8601 format with UTC timezone. After expiry, the File will be deleted. Must be in the future. Cannot be more than 90 days from now. The value up to minutes is considered. Seconds and milliseconds are ignored. Omit to keep the existing expiry intact. Set to `null` to remove the expiry.
|
|
8094
8094
|
*/
|
|
8095
8095
|
expiresAt?: string | null;
|
|
8096
8096
|
}
|
|
@@ -8175,6 +8175,7 @@ interface SearchFilesRequestQuery {
|
|
|
8175
8175
|
query: string;
|
|
8176
8176
|
contextDepth?: number;
|
|
8177
8177
|
limit?: number;
|
|
8178
|
+
includeBreadcrumb?: boolean;
|
|
8178
8179
|
}
|
|
8179
8180
|
interface SearchFilesRequestParams {
|
|
8180
8181
|
}
|
|
@@ -11312,9 +11313,226 @@ declare class UploadFileError extends Error {
|
|
|
11312
11313
|
} | undefined);
|
|
11313
11314
|
}
|
|
11314
11315
|
|
|
11316
|
+
type ListOperation = keyof {
|
|
11317
|
+
[K in Operation as ClientInputs[K] extends {
|
|
11318
|
+
nextToken?: string | undefined;
|
|
11319
|
+
} ? K : never]: null;
|
|
11320
|
+
};
|
|
11321
|
+
type ListInputs = {
|
|
11322
|
+
[K in ListOperation]: Omit<ClientInputs[K], 'nextToken'>;
|
|
11323
|
+
};
|
|
11324
|
+
type PageLister<R> = (t: {
|
|
11325
|
+
nextToken?: string;
|
|
11326
|
+
}) => Promise<{
|
|
11327
|
+
items: R[];
|
|
11328
|
+
meta: {
|
|
11329
|
+
nextToken?: string;
|
|
11330
|
+
};
|
|
11331
|
+
}>;
|
|
11332
|
+
declare class AsyncCollection<T> {
|
|
11333
|
+
private _list;
|
|
11334
|
+
constructor(_list: PageLister<T>);
|
|
11335
|
+
[Symbol.asyncIterator](): AsyncGenerator<Awaited<T>, void, unknown>;
|
|
11336
|
+
collect(props?: {
|
|
11337
|
+
limit?: number;
|
|
11338
|
+
}): Promise<T[]>;
|
|
11339
|
+
}
|
|
11340
|
+
declare class Lister {
|
|
11341
|
+
private client;
|
|
11342
|
+
constructor(client: Client$1);
|
|
11343
|
+
readonly conversations: (props: ListInputs['listConversations']) => AsyncCollection<{
|
|
11344
|
+
id: string;
|
|
11345
|
+
currentTaskId?: string | undefined;
|
|
11346
|
+
createdAt: string;
|
|
11347
|
+
updatedAt: string;
|
|
11348
|
+
channel: string;
|
|
11349
|
+
integration: string;
|
|
11350
|
+
tags: {
|
|
11351
|
+
[k: string]: string;
|
|
11352
|
+
};
|
|
11353
|
+
}>;
|
|
11354
|
+
readonly participants: (props: ListInputs['listParticipants']) => AsyncCollection<{
|
|
11355
|
+
id: string;
|
|
11356
|
+
createdAt: string;
|
|
11357
|
+
updatedAt: string;
|
|
11358
|
+
tags: {
|
|
11359
|
+
[k: string]: string;
|
|
11360
|
+
};
|
|
11361
|
+
name?: string | undefined;
|
|
11362
|
+
pictureUrl?: string | undefined;
|
|
11363
|
+
}>;
|
|
11364
|
+
readonly events: (props: ListInputs['listEvents']) => AsyncCollection<{
|
|
11365
|
+
id: string;
|
|
11366
|
+
createdAt: string;
|
|
11367
|
+
type: string;
|
|
11368
|
+
payload: {
|
|
11369
|
+
[k: string]: any;
|
|
11370
|
+
};
|
|
11371
|
+
conversationId?: string | undefined;
|
|
11372
|
+
userId?: string | undefined;
|
|
11373
|
+
messageId?: string | undefined;
|
|
11374
|
+
status: "pending" | "processed" | "ignored" | "failed";
|
|
11375
|
+
failureReason: string | null;
|
|
11376
|
+
}>;
|
|
11377
|
+
readonly messages: (props: ListInputs['listMessages']) => AsyncCollection<{
|
|
11378
|
+
id: string;
|
|
11379
|
+
createdAt: string;
|
|
11380
|
+
type: string;
|
|
11381
|
+
payload: {
|
|
11382
|
+
[k: string]: any;
|
|
11383
|
+
};
|
|
11384
|
+
direction: "incoming" | "outgoing";
|
|
11385
|
+
userId: string;
|
|
11386
|
+
conversationId: string;
|
|
11387
|
+
tags: {
|
|
11388
|
+
[k: string]: string;
|
|
11389
|
+
};
|
|
11390
|
+
}>;
|
|
11391
|
+
readonly users: (props: ListInputs['listUsers']) => AsyncCollection<{
|
|
11392
|
+
id: string;
|
|
11393
|
+
createdAt: string;
|
|
11394
|
+
updatedAt: string;
|
|
11395
|
+
tags: {
|
|
11396
|
+
[k: string]: string;
|
|
11397
|
+
};
|
|
11398
|
+
name?: string | undefined;
|
|
11399
|
+
pictureUrl?: string | undefined;
|
|
11400
|
+
}>;
|
|
11401
|
+
readonly tasks: (props: ListInputs['listTasks']) => AsyncCollection<{
|
|
11402
|
+
id: string;
|
|
11403
|
+
title: string;
|
|
11404
|
+
description: string;
|
|
11405
|
+
type: string;
|
|
11406
|
+
data: {
|
|
11407
|
+
[k: string]: any;
|
|
11408
|
+
};
|
|
11409
|
+
status: "pending" | "failed" | "in_progress" | "completed" | "blocked" | "paused" | "timeout" | "cancelled";
|
|
11410
|
+
parentTaskId?: string | undefined;
|
|
11411
|
+
conversationId?: string | undefined;
|
|
11412
|
+
userId?: string | undefined;
|
|
11413
|
+
timeoutAt: string;
|
|
11414
|
+
createdAt: string;
|
|
11415
|
+
updatedAt: string;
|
|
11416
|
+
failureReason?: string | undefined;
|
|
11417
|
+
tags: {
|
|
11418
|
+
[k: string]: string;
|
|
11419
|
+
};
|
|
11420
|
+
}>;
|
|
11421
|
+
readonly publicIntegrations: (props: ListInputs['listPublicIntegrations']) => AsyncCollection<{
|
|
11422
|
+
id: string;
|
|
11423
|
+
name: string;
|
|
11424
|
+
version: string;
|
|
11425
|
+
createdAt: string;
|
|
11426
|
+
updatedAt: string;
|
|
11427
|
+
title: string;
|
|
11428
|
+
description: string;
|
|
11429
|
+
iconUrl: string;
|
|
11430
|
+
public: boolean;
|
|
11431
|
+
verificationStatus: "pending" | "unapproved" | "approved" | "rejected";
|
|
11432
|
+
ownerWorkspace: {
|
|
11433
|
+
id: string;
|
|
11434
|
+
handle: string | null;
|
|
11435
|
+
name: string;
|
|
11436
|
+
};
|
|
11437
|
+
}>;
|
|
11438
|
+
readonly bots: (props: ListInputs['listBots']) => AsyncCollection<{
|
|
11439
|
+
id: string;
|
|
11440
|
+
createdAt: string;
|
|
11441
|
+
updatedAt: string;
|
|
11442
|
+
name: string;
|
|
11443
|
+
deployedAt?: string | undefined;
|
|
11444
|
+
}>;
|
|
11445
|
+
readonly botIssues: (props: ListInputs['listBotIssues']) => AsyncCollection<{
|
|
11446
|
+
id: string;
|
|
11447
|
+
code: string;
|
|
11448
|
+
createdAt: string;
|
|
11449
|
+
lastSeenAt: string;
|
|
11450
|
+
title: string;
|
|
11451
|
+
description: string;
|
|
11452
|
+
groupedData: {
|
|
11453
|
+
[k: string]: {
|
|
11454
|
+
raw: string;
|
|
11455
|
+
pretty?: string | undefined;
|
|
11456
|
+
};
|
|
11457
|
+
};
|
|
11458
|
+
eventsCount: number;
|
|
11459
|
+
category: "configuration" | "user_code" | "limits" | "other";
|
|
11460
|
+
resolutionLink: string | null;
|
|
11461
|
+
}>;
|
|
11462
|
+
readonly workspaces: (props: ListInputs['listWorkspaces']) => AsyncCollection<UpdateWorkspaceResponse>;
|
|
11463
|
+
readonly publicWorkspaces: (props: ListInputs['listPublicWorkspaces']) => AsyncCollection<GetPublicWorkspaceResponse>;
|
|
11464
|
+
readonly workspaceMembers: (props: ListInputs['listWorkspaceMembers']) => AsyncCollection<{
|
|
11465
|
+
id: string;
|
|
11466
|
+
userId?: string | undefined;
|
|
11467
|
+
email: string;
|
|
11468
|
+
createdAt: string;
|
|
11469
|
+
role: "viewer" | "billing" | "developer" | "manager" | "administrator" | "owner";
|
|
11470
|
+
profilePicture?: string | undefined;
|
|
11471
|
+
displayName?: string | undefined;
|
|
11472
|
+
}>;
|
|
11473
|
+
readonly integrations: (props: ListInputs['listIntegrations']) => AsyncCollection<{
|
|
11474
|
+
id: string;
|
|
11475
|
+
name: string;
|
|
11476
|
+
version: string;
|
|
11477
|
+
createdAt: string;
|
|
11478
|
+
updatedAt: string;
|
|
11479
|
+
title: string;
|
|
11480
|
+
description: string;
|
|
11481
|
+
iconUrl: string;
|
|
11482
|
+
public: boolean;
|
|
11483
|
+
verificationStatus: "pending" | "unapproved" | "approved" | "rejected";
|
|
11484
|
+
}>;
|
|
11485
|
+
readonly interfaces: (props: ListInputs['listInterfaces']) => AsyncCollection<{
|
|
11486
|
+
id: string;
|
|
11487
|
+
createdAt: string;
|
|
11488
|
+
updatedAt: string;
|
|
11489
|
+
name: string;
|
|
11490
|
+
version: string;
|
|
11491
|
+
}>;
|
|
11492
|
+
readonly activities: (props: ListInputs['listActivities']) => AsyncCollection<{
|
|
11493
|
+
id: string;
|
|
11494
|
+
description: string;
|
|
11495
|
+
taskId: string;
|
|
11496
|
+
category: "unknown" | "capture" | "bot_message" | "user_message" | "agent_message" | "event" | "action" | "task_status" | "subtask_status" | "exception";
|
|
11497
|
+
data: {
|
|
11498
|
+
[k: string]: any;
|
|
11499
|
+
};
|
|
11500
|
+
createdAt: string;
|
|
11501
|
+
}>;
|
|
11502
|
+
readonly files: (props: ListInputs['listFiles']) => AsyncCollection<{
|
|
11503
|
+
id: string;
|
|
11504
|
+
botId: string;
|
|
11505
|
+
key: string;
|
|
11506
|
+
url: string;
|
|
11507
|
+
size: number | null;
|
|
11508
|
+
contentType: string;
|
|
11509
|
+
tags: {
|
|
11510
|
+
[k: string]: string;
|
|
11511
|
+
};
|
|
11512
|
+
createdAt: string;
|
|
11513
|
+
updatedAt: string;
|
|
11514
|
+
accessPolicies: ("integrations" | "public_content")[];
|
|
11515
|
+
index: boolean;
|
|
11516
|
+
status: "upload_pending" | "upload_failed" | "upload_completed" | "indexing_pending" | "indexing_failed" | "indexing_completed";
|
|
11517
|
+
failedStatusReason?: string | undefined;
|
|
11518
|
+
expiresAt?: string | undefined;
|
|
11519
|
+
}>;
|
|
11520
|
+
readonly filePassages: (props: ListInputs['listFilePassages']) => AsyncCollection<{
|
|
11521
|
+
id: string;
|
|
11522
|
+
content: string;
|
|
11523
|
+
meta: {
|
|
11524
|
+
type?: "chunk" | undefined;
|
|
11525
|
+
subtype?: "code" | "title" | "subtitle" | "paragraph" | "list" | "blockquote" | "table" | undefined;
|
|
11526
|
+
pageNumber?: number | undefined;
|
|
11527
|
+
position?: number | undefined;
|
|
11528
|
+
};
|
|
11529
|
+
}>;
|
|
11530
|
+
}
|
|
11531
|
+
|
|
11315
11532
|
declare class Client extends Client$1 implements IClient {
|
|
11316
11533
|
readonly config: Readonly<ClientConfig>;
|
|
11317
11534
|
constructor(clientProps?: ClientProps);
|
|
11535
|
+
get list(): Lister;
|
|
11318
11536
|
/**
|
|
11319
11537
|
* Create/update and upload a file in a single step. Returns an object containing the file metadata and the URL to retrieve the file.
|
|
11320
11538
|
*/
|