@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.
@@ -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 CreateFileRequestHeaders {
1
+ export interface UpsertFileRequestHeaders {
2
2
  }
3
- export interface CreateFileRequestQuery {
3
+ export interface UpsertFileRequestQuery {
4
4
  }
5
- export interface CreateFileRequestParams {
5
+ export interface UpsertFileRequestParams {
6
6
  }
7
- export interface CreateFileRequestBody {
7
+ export interface UpsertFileRequestBody {
8
8
  /**
9
- * File name
9
+ * Unique key for the file. Must be unique across the bot (and the integration, when applicable).
10
10
  */
11
- name?: string;
11
+ key: string;
12
12
  /**
13
- * File tags as an object of key/value pairs
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 file storage quota. If the `index` parameter is set to `true`, this will also count against your vector database storage quota.
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 of the workspace rather than the File 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. If a type cannot be inferred, the default is "application/octet-stream".
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 CreateFileInput = CreateFileRequestBody & CreateFileRequestHeaders & CreateFileRequestQuery & CreateFileRequestParams;
36
- export type CreateFileRequest = {
37
- headers: CreateFileRequestHeaders;
38
- query: CreateFileRequestQuery;
39
- params: CreateFileRequestParams;
40
- body: CreateFileRequestBody;
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: CreateFileInput) => CreateFileRequest & {
42
+ export declare const parseReq: (input: UpsertFileInput) => UpsertFileRequest & {
43
43
  path: string;
44
44
  };
45
- export interface CreateFileResponse {
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
- * File name
56
+ * Unique key for the file. Must be unique across the bot (and the integration, when applicable).
57
57
  */
58
- name: string | null;
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 "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.
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 "upload_failed" and the reason for the failure will be available in the `failedStatusReason` field of the file.
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 "indexing_pending" status (the "upload_completed" status step will be skipped).
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 "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.
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 "upload_failed" or "indexing_failed" this will contain the reason of the failure.
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
  /**