@botpress/client 0.24.1 → 0.25.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 +11 -11
- package/dist/bundle.cjs.map +4 -4
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +259 -11
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +4 -4
- package/package.json +3 -4
- package/tests/e2e/node.ts +1 -1
- package/tests/e2e/browser/index.ts +0 -71
- package/tests/e2e/browser/script.ts +0 -34
package/dist/index.d.ts
CHANGED
|
@@ -132,6 +132,8 @@ interface ListConversationsRequestHeaders {
|
|
|
132
132
|
}
|
|
133
133
|
interface ListConversationsRequestQuery {
|
|
134
134
|
nextToken?: string;
|
|
135
|
+
sortField?: "createdAt" | "updatedAt";
|
|
136
|
+
sortDirection?: "asc" | "desc";
|
|
135
137
|
tags?: {
|
|
136
138
|
[k: string]: string;
|
|
137
139
|
};
|
|
@@ -8109,7 +8111,7 @@ interface SearchFilesResponse {
|
|
|
8109
8111
|
*/
|
|
8110
8112
|
score: number;
|
|
8111
8113
|
/**
|
|
8112
|
-
* The passage metadata
|
|
8114
|
+
* The passage metadata.
|
|
8113
8115
|
*/
|
|
8114
8116
|
meta: {
|
|
8115
8117
|
/**
|
|
@@ -8117,13 +8119,17 @@ interface SearchFilesResponse {
|
|
|
8117
8119
|
*/
|
|
8118
8120
|
type?: "chunk";
|
|
8119
8121
|
/**
|
|
8120
|
-
* The subtype of passage, if
|
|
8122
|
+
* The subtype of passage, if available.
|
|
8121
8123
|
*/
|
|
8122
|
-
subtype?: "title" | "subtitle" | "paragraph" | "list" | "
|
|
8124
|
+
subtype?: "title" | "subtitle" | "paragraph" | "list" | "blockquote" | "table" | "code";
|
|
8123
8125
|
/**
|
|
8124
8126
|
* Page number the passage is located on. Only applicable if the passage was extracted from a PDF file.
|
|
8125
8127
|
*/
|
|
8126
8128
|
pageNumber?: number;
|
|
8129
|
+
/**
|
|
8130
|
+
* Position number of the passage in the file relative to the other passages, if available. Can be used to know the order of passages within a file.
|
|
8131
|
+
*/
|
|
8132
|
+
position?: number;
|
|
8127
8133
|
};
|
|
8128
8134
|
file: {
|
|
8129
8135
|
/**
|
|
@@ -8148,6 +8154,58 @@ interface SearchFilesResponse {
|
|
|
8148
8154
|
}[];
|
|
8149
8155
|
}
|
|
8150
8156
|
|
|
8157
|
+
interface ListFilePassagesRequestHeaders {
|
|
8158
|
+
}
|
|
8159
|
+
interface ListFilePassagesRequestQuery {
|
|
8160
|
+
nextToken?: string;
|
|
8161
|
+
limit?: number;
|
|
8162
|
+
}
|
|
8163
|
+
interface ListFilePassagesRequestParams {
|
|
8164
|
+
fileId: string;
|
|
8165
|
+
}
|
|
8166
|
+
interface ListFilePassagesRequestBody {
|
|
8167
|
+
}
|
|
8168
|
+
type ListFilePassagesInput = ListFilePassagesRequestBody & ListFilePassagesRequestHeaders & ListFilePassagesRequestQuery & ListFilePassagesRequestParams;
|
|
8169
|
+
interface ListFilePassagesResponse {
|
|
8170
|
+
passages: {
|
|
8171
|
+
/**
|
|
8172
|
+
* Passage ID
|
|
8173
|
+
*/
|
|
8174
|
+
id: string;
|
|
8175
|
+
/**
|
|
8176
|
+
* The content of the passage.
|
|
8177
|
+
*/
|
|
8178
|
+
content: string;
|
|
8179
|
+
/**
|
|
8180
|
+
* The passage metadata.
|
|
8181
|
+
*/
|
|
8182
|
+
meta: {
|
|
8183
|
+
/**
|
|
8184
|
+
* The type of passage
|
|
8185
|
+
*/
|
|
8186
|
+
type?: "chunk";
|
|
8187
|
+
/**
|
|
8188
|
+
* The subtype of passage, if available.
|
|
8189
|
+
*/
|
|
8190
|
+
subtype?: "title" | "subtitle" | "paragraph" | "list" | "blockquote" | "table" | "code";
|
|
8191
|
+
/**
|
|
8192
|
+
* Page number the passage is located on. Only applicable if the passage was extracted from a PDF file.
|
|
8193
|
+
*/
|
|
8194
|
+
pageNumber?: number;
|
|
8195
|
+
/**
|
|
8196
|
+
* Position number of the passage in the file relative to the other passages, if available. Can be used to know the order of passages within a file.
|
|
8197
|
+
*/
|
|
8198
|
+
position?: number;
|
|
8199
|
+
};
|
|
8200
|
+
}[];
|
|
8201
|
+
meta: {
|
|
8202
|
+
/**
|
|
8203
|
+
* The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint.
|
|
8204
|
+
*/
|
|
8205
|
+
nextToken?: string;
|
|
8206
|
+
};
|
|
8207
|
+
}
|
|
8208
|
+
|
|
8151
8209
|
interface ListTablesRequestHeaders {
|
|
8152
8210
|
}
|
|
8153
8211
|
interface ListTablesRequestQuery {
|
|
@@ -8221,7 +8279,7 @@ interface ListTablesResponse {
|
|
|
8221
8279
|
/**
|
|
8222
8280
|
* Model to use when action is "ai"
|
|
8223
8281
|
*/
|
|
8224
|
-
model?:
|
|
8282
|
+
model?: string;
|
|
8225
8283
|
/**
|
|
8226
8284
|
* ID of Workflow to execute when action is "workflow"
|
|
8227
8285
|
*/
|
|
@@ -8337,7 +8395,7 @@ interface GetTableResponse {
|
|
|
8337
8395
|
/**
|
|
8338
8396
|
* Model to use when action is "ai"
|
|
8339
8397
|
*/
|
|
8340
|
-
model?:
|
|
8398
|
+
model?: string;
|
|
8341
8399
|
/**
|
|
8342
8400
|
* ID of Workflow to execute when action is "workflow"
|
|
8343
8401
|
*/
|
|
@@ -8489,7 +8547,7 @@ interface GetOrCreateTableResponse {
|
|
|
8489
8547
|
/**
|
|
8490
8548
|
* Model to use when action is "ai"
|
|
8491
8549
|
*/
|
|
8492
|
-
model?:
|
|
8550
|
+
model?: string;
|
|
8493
8551
|
/**
|
|
8494
8552
|
* ID of Workflow to execute when action is "workflow"
|
|
8495
8553
|
*/
|
|
@@ -8648,7 +8706,7 @@ interface CreateTableResponse {
|
|
|
8648
8706
|
/**
|
|
8649
8707
|
* Model to use when action is "ai"
|
|
8650
8708
|
*/
|
|
8651
|
-
model?:
|
|
8709
|
+
model?: string;
|
|
8652
8710
|
/**
|
|
8653
8711
|
* ID of Workflow to execute when action is "workflow"
|
|
8654
8712
|
*/
|
|
@@ -8773,7 +8831,7 @@ interface DuplicateTableResponse {
|
|
|
8773
8831
|
/**
|
|
8774
8832
|
* Model to use when action is "ai"
|
|
8775
8833
|
*/
|
|
8776
|
-
model?:
|
|
8834
|
+
model?: string;
|
|
8777
8835
|
/**
|
|
8778
8836
|
* ID of Workflow to execute when action is "workflow"
|
|
8779
8837
|
*/
|
|
@@ -8917,7 +8975,7 @@ interface UpdateTableResponse {
|
|
|
8917
8975
|
/**
|
|
8918
8976
|
* Model to use when action is "ai"
|
|
8919
8977
|
*/
|
|
8920
|
-
model?:
|
|
8978
|
+
model?: string;
|
|
8921
8979
|
/**
|
|
8922
8980
|
* ID of Workflow to execute when action is "workflow"
|
|
8923
8981
|
*/
|
|
@@ -9045,7 +9103,7 @@ interface RenameTableColumnResponse {
|
|
|
9045
9103
|
/**
|
|
9046
9104
|
* Model to use when action is "ai"
|
|
9047
9105
|
*/
|
|
9048
|
-
model?:
|
|
9106
|
+
model?: string;
|
|
9049
9107
|
/**
|
|
9050
9108
|
* ID of Workflow to execute when action is "workflow"
|
|
9051
9109
|
*/
|
|
@@ -10173,6 +10231,15 @@ interface Workspace {
|
|
|
10173
10231
|
isPublic?: boolean;
|
|
10174
10232
|
handle?: string;
|
|
10175
10233
|
}
|
|
10234
|
+
interface WorkspaceMember {
|
|
10235
|
+
id: string;
|
|
10236
|
+
userId?: string;
|
|
10237
|
+
email: string;
|
|
10238
|
+
createdAt: string;
|
|
10239
|
+
role: "viewer" | "billing" | "developer" | "manager" | "administrator" | "owner";
|
|
10240
|
+
profilePicture?: string;
|
|
10241
|
+
displayName?: string;
|
|
10242
|
+
}
|
|
10176
10243
|
interface Account {
|
|
10177
10244
|
id: string;
|
|
10178
10245
|
email: string;
|
|
@@ -10423,6 +10490,186 @@ interface State {
|
|
|
10423
10490
|
[k: string]: any;
|
|
10424
10491
|
};
|
|
10425
10492
|
}
|
|
10493
|
+
interface Table {
|
|
10494
|
+
/**
|
|
10495
|
+
* Unique identifier for the table
|
|
10496
|
+
*/
|
|
10497
|
+
id: string;
|
|
10498
|
+
/**
|
|
10499
|
+
* Required. This name is used to identify your table.
|
|
10500
|
+
*/
|
|
10501
|
+
name: string;
|
|
10502
|
+
/**
|
|
10503
|
+
* The 'factor' multiplies the row's data storage limit by 4KB and its quota count, but can only be set at table creation and not modified later. For instance, a factor of 2 increases storage to 8KB but counts as 2 rows in your quota. The default factor is 1.
|
|
10504
|
+
*/
|
|
10505
|
+
factor?: number;
|
|
10506
|
+
/**
|
|
10507
|
+
* A table designated as "frozen" is immutable in terms of its name and schema structure; modifications to its schema or a renaming operation are not permitted. The only action that can be taken on such a table is deletion. The schema established at the time of creation is locked in as the final structure. To implement any changes, the table must be duplicated with the desired alterations.
|
|
10508
|
+
*/
|
|
10509
|
+
frozen?: boolean;
|
|
10510
|
+
schema: {
|
|
10511
|
+
$schema: string;
|
|
10512
|
+
/**
|
|
10513
|
+
* List of keys/columns in the table.
|
|
10514
|
+
*/
|
|
10515
|
+
properties: {
|
|
10516
|
+
[k: string]: {
|
|
10517
|
+
type: "string" | "number" | "boolean" | "object" | "null";
|
|
10518
|
+
format?: "date-time";
|
|
10519
|
+
description?: string;
|
|
10520
|
+
nullable?: boolean;
|
|
10521
|
+
"x-zui": {
|
|
10522
|
+
index: number;
|
|
10523
|
+
/**
|
|
10524
|
+
* [deprecated] ID of the column.
|
|
10525
|
+
*/
|
|
10526
|
+
id?: string;
|
|
10527
|
+
/**
|
|
10528
|
+
* Indicates if the column is vectorized and searchable.
|
|
10529
|
+
*/
|
|
10530
|
+
searchable?: boolean;
|
|
10531
|
+
/**
|
|
10532
|
+
* Indicates if the field is hidden in the UI
|
|
10533
|
+
*/
|
|
10534
|
+
hidden?: boolean;
|
|
10535
|
+
/**
|
|
10536
|
+
* Order of the column in the UI
|
|
10537
|
+
*/
|
|
10538
|
+
order?: number;
|
|
10539
|
+
/**
|
|
10540
|
+
* Width of the column in the UI
|
|
10541
|
+
*/
|
|
10542
|
+
width?: number;
|
|
10543
|
+
computed?: {
|
|
10544
|
+
action: "ai" | "workflow";
|
|
10545
|
+
dependencies?: string[];
|
|
10546
|
+
/**
|
|
10547
|
+
* Prompt when action is "ai"
|
|
10548
|
+
*/
|
|
10549
|
+
prompt?: string;
|
|
10550
|
+
/**
|
|
10551
|
+
* Model to use when action is "ai"
|
|
10552
|
+
*/
|
|
10553
|
+
model?: string;
|
|
10554
|
+
/**
|
|
10555
|
+
* ID of Workflow to execute when action is "workflow"
|
|
10556
|
+
*/
|
|
10557
|
+
workflowId?: string;
|
|
10558
|
+
enabled?: boolean;
|
|
10559
|
+
};
|
|
10560
|
+
/**
|
|
10561
|
+
* TypeScript typings for the column. Recommended if the type is "object", ex: "\{ foo: string; bar: number \}"
|
|
10562
|
+
*/
|
|
10563
|
+
typings?: string;
|
|
10564
|
+
};
|
|
10565
|
+
};
|
|
10566
|
+
};
|
|
10567
|
+
/**
|
|
10568
|
+
* Additional properties can be provided, but they will be ignored if no column matches.
|
|
10569
|
+
*/
|
|
10570
|
+
additionalProperties: true;
|
|
10571
|
+
/**
|
|
10572
|
+
* Array of required properties.
|
|
10573
|
+
*/
|
|
10574
|
+
required?: string[];
|
|
10575
|
+
type: "object";
|
|
10576
|
+
};
|
|
10577
|
+
/**
|
|
10578
|
+
* Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs.
|
|
10579
|
+
*/
|
|
10580
|
+
tags?: {
|
|
10581
|
+
[k: string]: string;
|
|
10582
|
+
};
|
|
10583
|
+
/**
|
|
10584
|
+
* Indicates if the table is enabled for computation.
|
|
10585
|
+
*/
|
|
10586
|
+
isComputeEnabled?: boolean;
|
|
10587
|
+
/**
|
|
10588
|
+
* Timestamp of table creation.
|
|
10589
|
+
*/
|
|
10590
|
+
createdAt?: string;
|
|
10591
|
+
/**
|
|
10592
|
+
* Timestamp of the last table update.
|
|
10593
|
+
*/
|
|
10594
|
+
updatedAt?: string;
|
|
10595
|
+
}
|
|
10596
|
+
interface Column {
|
|
10597
|
+
/**
|
|
10598
|
+
* Unique identifier for the column.
|
|
10599
|
+
*/
|
|
10600
|
+
id?: string;
|
|
10601
|
+
/**
|
|
10602
|
+
* Name of the column, must be within length limits.
|
|
10603
|
+
*/
|
|
10604
|
+
name: string;
|
|
10605
|
+
/**
|
|
10606
|
+
* Optional descriptive text about the column.
|
|
10607
|
+
*/
|
|
10608
|
+
description?: string;
|
|
10609
|
+
/**
|
|
10610
|
+
* Indicates if the column is vectorized and searchable.
|
|
10611
|
+
*/
|
|
10612
|
+
searchable?: boolean;
|
|
10613
|
+
/**
|
|
10614
|
+
* Specifies the data type of the column. Use "object" for complex data structures.
|
|
10615
|
+
*/
|
|
10616
|
+
type: "string" | "number" | "boolean" | "date" | "object";
|
|
10617
|
+
/**
|
|
10618
|
+
* TypeScript typings for the column. Recommended if the type is "object", ex: "\{ foo: string; bar: number \}"
|
|
10619
|
+
*/
|
|
10620
|
+
typings?: string;
|
|
10621
|
+
computed?: {
|
|
10622
|
+
action: "ai" | "workflow";
|
|
10623
|
+
dependencies?: string[];
|
|
10624
|
+
/**
|
|
10625
|
+
* Prompt when action is "ai"
|
|
10626
|
+
*/
|
|
10627
|
+
prompt?: string;
|
|
10628
|
+
/**
|
|
10629
|
+
* Model to use when action is "ai"
|
|
10630
|
+
*/
|
|
10631
|
+
model?: string;
|
|
10632
|
+
/**
|
|
10633
|
+
* ID of Workflow to execute when action is "workflow"
|
|
10634
|
+
*/
|
|
10635
|
+
workflowId?: string;
|
|
10636
|
+
enabled?: boolean;
|
|
10637
|
+
};
|
|
10638
|
+
schema?: {
|
|
10639
|
+
[k: string]: any;
|
|
10640
|
+
};
|
|
10641
|
+
}
|
|
10642
|
+
interface Row {
|
|
10643
|
+
/**
|
|
10644
|
+
* Unique identifier for the row.
|
|
10645
|
+
*/
|
|
10646
|
+
id: number;
|
|
10647
|
+
/**
|
|
10648
|
+
* Timestamp of row creation.
|
|
10649
|
+
*/
|
|
10650
|
+
createdAt?: string;
|
|
10651
|
+
/**
|
|
10652
|
+
* Timestamp of the last row update.
|
|
10653
|
+
*/
|
|
10654
|
+
updatedAt?: string;
|
|
10655
|
+
computed: {
|
|
10656
|
+
[k: string]: {
|
|
10657
|
+
status: string;
|
|
10658
|
+
error?: string;
|
|
10659
|
+
updatedBy?: string;
|
|
10660
|
+
updatedAt?: string;
|
|
10661
|
+
};
|
|
10662
|
+
};
|
|
10663
|
+
/**
|
|
10664
|
+
* [Read-only] List of stale values that are waiting to be recomputed.
|
|
10665
|
+
*/
|
|
10666
|
+
stale?: string[];
|
|
10667
|
+
/**
|
|
10668
|
+
* Optional numeric value indicating similarity, when using findTableRows.
|
|
10669
|
+
*/
|
|
10670
|
+
similarity?: number;
|
|
10671
|
+
[k: string]: any;
|
|
10672
|
+
}
|
|
10426
10673
|
interface File {
|
|
10427
10674
|
/**
|
|
10428
10675
|
* File ID
|
|
@@ -10611,6 +10858,7 @@ declare class Client$1 {
|
|
|
10611
10858
|
readonly getFile: (input: GetFileInput) => Promise<GetFileResponse>;
|
|
10612
10859
|
readonly updateFileMetadata: (input: UpdateFileMetadataInput) => Promise<UpdateFileMetadataResponse>;
|
|
10613
10860
|
readonly searchFiles: (input: SearchFilesInput) => Promise<SearchFilesResponse>;
|
|
10861
|
+
readonly listFilePassages: (input: ListFilePassagesInput) => Promise<ListFilePassagesResponse>;
|
|
10614
10862
|
readonly listTables: (input: ListTablesInput) => Promise<ListTablesResponse>;
|
|
10615
10863
|
readonly getTable: (input: GetTableInput) => Promise<GetTableResponse>;
|
|
10616
10864
|
readonly getOrCreateTable: (input: GetOrCreateTableInput) => Promise<GetOrCreateTableResponse>;
|
|
@@ -10933,4 +11181,4 @@ declare class Client extends Client$1 implements IClient {
|
|
|
10933
11181
|
readonly uploadFile: ({ key, index, tags, contentType, accessPolicies, content, url, }: ClientInputs['uploadFile']) => Promise<ClientOutputs['uploadFile']>;
|
|
10934
11182
|
}
|
|
10935
11183
|
|
|
10936
|
-
export { type Account, AlreadyExistsError, type ApiError, type Bot, BreakingChangesError, Client, type ClientConfig, type ClientInputs, type ClientOutputs, type ClientParams, type ClientProps, type ClientReturn, type Conversation, type ErrorType, type Event, type File, ForbiddenError, type IClient, type Integration, type Interface, InternalError, InvalidDataFormatError, InvalidIdentifierError, InvalidJsonSchemaError, InvalidPayloadError, InvalidQueryError, type Issue, type IssueEvent, LimitExceededError, type Message, MethodNotFoundError, type Operation, PayloadTooLargeError, PaymentRequiredError, QuotaExceededError, RateLimitedError, ReferenceConstraintError, ReferenceNotFoundError, RelationConflictError, ResourceLockedConflictError, ResourceNotFoundError, RuntimeError, type State, UnauthorizedError, UnknownError, UnsupportedMediaTypeError, UploadFileError, type Usage, type User, type Workspace, errorFrom, isApiError };
|
|
11184
|
+
export { type Account, AlreadyExistsError, type ApiError, type Bot, BreakingChangesError, Client, type ClientConfig, type ClientInputs, type ClientOutputs, type ClientParams, type ClientProps, type ClientReturn, type Column, type Conversation, type ErrorType, type Event, type File, ForbiddenError, type IClient, type Integration, type Interface, InternalError, InvalidDataFormatError, InvalidIdentifierError, InvalidJsonSchemaError, InvalidPayloadError, InvalidQueryError, type Issue, type IssueEvent, LimitExceededError, type Message, MethodNotFoundError, type Operation, PayloadTooLargeError, PaymentRequiredError, QuotaExceededError, RateLimitedError, ReferenceConstraintError, ReferenceNotFoundError, RelationConflictError, ResourceLockedConflictError, ResourceNotFoundError, type Row, RuntimeError, type State, type Table, UnauthorizedError, UnknownError, UnsupportedMediaTypeError, UploadFileError, type Usage, type User, type Workspace, type WorkspaceMember, errorFrom, isApiError };
|