@botpress/client 0.20.1 → 0.21.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 +5 -5
- package/.turbo/turbo-generate.log +1 -1
- package/dist/bundle.cjs +12 -12
- package/dist/bundle.cjs.map +4 -4
- package/dist/client.d.ts +2 -2
- package/dist/errors.d.ts +3 -3
- package/dist/gen/errors.d.ts +9 -2
- package/dist/gen/index.d.ts +12 -6
- package/dist/gen/models.d.ts +27 -7
- package/dist/gen/operations/createIntegration.d.ts +40 -0
- package/dist/gen/operations/getFile.d.ts +7 -7
- package/dist/gen/operations/getIntegration.d.ts +20 -0
- package/dist/gen/operations/getIntegrationByName.d.ts +20 -0
- package/dist/gen/operations/getMultipleUsages.d.ts +45 -0
- package/dist/gen/operations/getPublicIntegration.d.ts +20 -0
- package/dist/gen/operations/getPublicIntegrationById.d.ts +20 -0
- package/dist/gen/operations/listFiles.d.ts +7 -7
- package/dist/gen/operations/listPublicWorkspaces.d.ts +42 -0
- package/dist/gen/operations/searchFiles.d.ts +1 -5
- package/dist/gen/operations/{updateFile.d.ts → updateFileMetadata.d.ts} +20 -20
- package/dist/gen/operations/updateIntegration.d.ts +40 -0
- package/dist/gen/operations/{createFile.d.ts → upsertFile.d.ts} +25 -25
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +4 -4
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +4 -4
- package/dist/types.d.ts +4 -4
- package/package.json +2 -2
- package/tests/manual/file-upload.test.ts +10 -10
|
@@ -199,6 +199,26 @@ export interface UpdateIntegrationRequestBody {
|
|
|
199
199
|
};
|
|
200
200
|
} | null;
|
|
201
201
|
};
|
|
202
|
+
interfaces?: {
|
|
203
|
+
[k: string]: {
|
|
204
|
+
id: string;
|
|
205
|
+
entities: {
|
|
206
|
+
[k: string]: {
|
|
207
|
+
name: string;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
actions: {
|
|
211
|
+
[k: string]: {
|
|
212
|
+
name: string;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
events: {
|
|
216
|
+
[k: string]: {
|
|
217
|
+
name: string;
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
} | null;
|
|
221
|
+
};
|
|
202
222
|
/**
|
|
203
223
|
* Secrets are integration-wide values available in the code via environment variables formatted with a SECRET_ prefix followed by your secret name. A secret name must respect SCREAMING_SNAKE casing.
|
|
204
224
|
*/
|
|
@@ -283,6 +303,26 @@ export interface UpdateIntegrationResponse {
|
|
|
283
303
|
* Version of the [Integration](#schema_integration)
|
|
284
304
|
*/
|
|
285
305
|
version: string;
|
|
306
|
+
interfaces: {
|
|
307
|
+
[k: string]: {
|
|
308
|
+
id: string;
|
|
309
|
+
entities: {
|
|
310
|
+
[k: string]: {
|
|
311
|
+
name: string;
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
actions: {
|
|
315
|
+
[k: string]: {
|
|
316
|
+
name: string;
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
events: {
|
|
320
|
+
[k: string]: {
|
|
321
|
+
name: string;
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
};
|
|
286
326
|
/**
|
|
287
327
|
* Configuration definition
|
|
288
328
|
*/
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface UpsertFileRequestHeaders {
|
|
2
2
|
}
|
|
3
|
-
export interface
|
|
3
|
+
export interface UpsertFileRequestQuery {
|
|
4
4
|
}
|
|
5
|
-
export interface
|
|
5
|
+
export interface UpsertFileRequestParams {
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
7
|
+
export interface UpsertFileRequestBody {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Unique key for the file. Must be unique across the bot (and the integration, when applicable).
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
key: string;
|
|
12
12
|
/**
|
|
13
|
-
* File tags as an object of key
|
|
13
|
+
* File tags as an object of key-value pairs. Tag values should be of `string` (text) type.
|
|
14
14
|
*/
|
|
15
15
|
tags?: {
|
|
16
16
|
[k: string]: string;
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
|
-
* File size in bytes. This will count against your
|
|
19
|
+
* File size in bytes. This will count against your File Storage quota. If the `index` parameter is set to `true`, this will also count against your Vector DB Storage quota.
|
|
20
20
|
*/
|
|
21
21
|
size: number;
|
|
22
22
|
/**
|
|
23
|
-
* Set to a value of 'true' to index the file in vector storage. Only PDFs, Office documents, and text-based files are currently supported. Note that if a file is indexed, it will count towards the Vector Storage quota
|
|
23
|
+
* Set to a value of 'true' to index the file in vector storage. Only PDFs, Office documents, and text-based files are currently supported. Note that if a file is indexed, it will count towards both the Vector DB Storage quota and the File Storage quota of the workspace.
|
|
24
24
|
*/
|
|
25
25
|
index?: boolean;
|
|
26
26
|
/**
|
|
@@ -28,21 +28,21 @@ export interface CreateFileRequestBody {
|
|
|
28
28
|
*/
|
|
29
29
|
accessPolicies?: ("public_content" | "integrations")[];
|
|
30
30
|
/**
|
|
31
|
-
* File content type. If omitted, the content type will be inferred from the file extension
|
|
31
|
+
* File content type. If omitted, the content type will be inferred from the file extension (if any) specified in `key`. If a content type cannot be inferred, the default is "application/octet-stream".
|
|
32
32
|
*/
|
|
33
33
|
contentType?: string;
|
|
34
34
|
}
|
|
35
|
-
export type
|
|
36
|
-
export type
|
|
37
|
-
headers:
|
|
38
|
-
query:
|
|
39
|
-
params:
|
|
40
|
-
body:
|
|
35
|
+
export type UpsertFileInput = UpsertFileRequestBody & UpsertFileRequestHeaders & UpsertFileRequestQuery & UpsertFileRequestParams;
|
|
36
|
+
export type UpsertFileRequest = {
|
|
37
|
+
headers: UpsertFileRequestHeaders;
|
|
38
|
+
query: UpsertFileRequestQuery;
|
|
39
|
+
params: UpsertFileRequestParams;
|
|
40
|
+
body: UpsertFileRequestBody;
|
|
41
41
|
};
|
|
42
|
-
export declare const parseReq: (input:
|
|
42
|
+
export declare const parseReq: (input: UpsertFileInput) => UpsertFileRequest & {
|
|
43
43
|
path: string;
|
|
44
44
|
};
|
|
45
|
-
export interface
|
|
45
|
+
export interface UpsertFileResponse {
|
|
46
46
|
file: {
|
|
47
47
|
/**
|
|
48
48
|
* File ID
|
|
@@ -53,9 +53,9 @@ export interface CreateFileResponse {
|
|
|
53
53
|
*/
|
|
54
54
|
botId: string;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* Unique key for the file. Must be unique across the bot (and the integration, when applicable).
|
|
57
57
|
*/
|
|
58
|
-
|
|
58
|
+
key: string;
|
|
59
59
|
/**
|
|
60
60
|
* File size in bytes. Non-null if file upload status is "COMPLETE".
|
|
61
61
|
*/
|
|
@@ -87,17 +87,17 @@ export interface CreateFileResponse {
|
|
|
87
87
|
*/
|
|
88
88
|
index: boolean;
|
|
89
89
|
/**
|
|
90
|
-
* Status of the file. If the status is
|
|
90
|
+
* Status of the file. If the status is `upload_pending`, the file content has not been uploaded yet. The status will be set to `upload_completed` once the file content has been uploaded successfully.
|
|
91
91
|
*
|
|
92
|
-
* If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to
|
|
92
|
+
* If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to `upload_failed` and the reason for the failure will be available in the `failedStatusReason` field of the file.
|
|
93
93
|
*
|
|
94
|
-
* However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the
|
|
94
|
+
* However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the `indexing_pending` status (the `upload_completed` status step will be skipped).
|
|
95
95
|
*
|
|
96
|
-
* Once the indexing is completed and the file is ready to be used for searching its status will be set to
|
|
96
|
+
* Once the indexing is completed and the file is ready to be used for searching its status will be set to `indexing_completed`. If the indexing failed the status will be set to `indexing_failed` and the reason for the failure will be available in the `failedStatusReason` field.
|
|
97
97
|
*/
|
|
98
98
|
status: "upload_pending" | "upload_failed" | "upload_completed" | "indexing_pending" | "indexing_failed" | "indexing_completed";
|
|
99
99
|
/**
|
|
100
|
-
* If the file status is
|
|
100
|
+
* If the file status is `upload_failed` or `indexing_failed` this will contain the reason of the failure.
|
|
101
101
|
*/
|
|
102
102
|
failedStatusReason?: string;
|
|
103
103
|
/**
|