@botpress/cognitive 0.1.9 → 0.1.11

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/dist/index.d.ts CHANGED
@@ -1011,117 +1011,395 @@ declare module 'axios' {
1011
1011
  }
1012
1012
  }
1013
1013
 
1014
- type Primitive = string | number | boolean;
1015
- type Value<P extends Primitive> = P | P[] | Record<string, P>;
1016
- type QueryValue = Value<string> | Value<boolean> | Value<number> | undefined;
1017
- type AnyQueryParams = Record<string, QueryValue>;
1018
- type HeaderValue = string | undefined;
1019
- type AnyHeaderParams = Record<string, HeaderValue>;
1020
- type AnyBodyParams = Record<string, any>;
1021
- type ParsedRequest = {
1022
- method: string;
1023
- path: string;
1024
- query: AnyQueryParams;
1025
- headers: AnyHeaderParams;
1026
- body: AnyBodyParams;
1014
+ type Headers = Record<string, string | string[]>;
1015
+ type RetryConfig = IAxiosRetryConfig;
1016
+ type ClientConfig = {
1017
+ apiUrl: string;
1018
+ headers: Headers;
1019
+ withCredentials: boolean;
1020
+ timeout: number;
1027
1021
  };
1028
- declare const toAxiosRequest: (req: ParsedRequest) => AxiosRequestConfig$2;
1029
1022
 
1030
- interface CreateConversationRequestHeaders {
1023
+ type CommonClientProps = {
1024
+ apiUrl?: string;
1025
+ timeout?: number;
1026
+ headers?: Headers;
1027
+ retry?: RetryConfig;
1028
+ };
1029
+ type SimplifyTuple<T> = T extends [...infer A] ? {
1030
+ [K in keyof A]: Simplify<A[K]>;
1031
+ } : never;
1032
+ type SimplifyObject<T extends object> = T extends infer O ? {
1033
+ [K in keyof O]: Simplify<O[K]>;
1034
+ } : never;
1035
+ type Simplify<T> = T extends (...args: infer A) => infer R ? (...args: SimplifyTuple<A>) => Simplify<R> : T extends Array<infer E> ? Array<Simplify<E>> : T extends ReadonlyArray<infer E> ? ReadonlyArray<Simplify<E>> : T extends Promise<infer R> ? Promise<Simplify<R>> : T extends Buffer ? Buffer : T extends object ? SimplifyObject<T> : T;
1036
+
1037
+ type PageLister<R> = (t: {
1038
+ nextToken?: string;
1039
+ }) => Promise<{
1040
+ items: R[];
1041
+ meta: {
1042
+ nextToken?: string;
1043
+ };
1044
+ }>;
1045
+ declare class AsyncCollection<T> {
1046
+ private _list;
1047
+ constructor(_list: PageLister<T>);
1048
+ [Symbol.asyncIterator](): AsyncGenerator<Awaited<T>, void, unknown>;
1049
+ collect(props?: {
1050
+ limit?: number;
1051
+ }): Promise<T[]>;
1031
1052
  }
1032
- interface CreateConversationRequestQuery {
1053
+
1054
+ interface UpsertFileRequestHeaders$1 {
1033
1055
  }
1034
- interface CreateConversationRequestParams {
1056
+ interface UpsertFileRequestQuery$1 {
1035
1057
  }
1036
- interface CreateConversationRequestBody {
1058
+ interface UpsertFileRequestParams$1 {
1059
+ }
1060
+ interface UpsertFileRequestBody$1 {
1037
1061
  /**
1038
- * Channel name
1062
+ * Unique key for the file. Must be unique across the bot (and the integration, when applicable).
1039
1063
  */
1040
- channel: string;
1064
+ key: string;
1041
1065
  /**
1042
- * Tags for the [Conversation](#schema_conversation)
1066
+ * File tags as an object of key-value pairs. Tag values should be of `string` (text) type.
1043
1067
  */
1044
- tags: {
1068
+ tags?: {
1045
1069
  [k: string]: string;
1046
1070
  };
1047
1071
  /**
1048
- * @deprecated
1049
- * [DEPRECATED] To create a conversation from within a bot, call an action of the integration instead.
1072
+ * 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.
1050
1073
  */
1051
- integrationName?: string;
1052
- }
1053
- type CreateConversationInput = CreateConversationRequestBody & CreateConversationRequestHeaders & CreateConversationRequestQuery & CreateConversationRequestParams;
1054
- interface CreateConversationResponse {
1074
+ size: number;
1055
1075
  /**
1056
- * The [Conversation](#schema_conversation) object represents an exchange of messages between one or more users. A [Conversation](#schema_conversation) is always linked to an integration's channels. For example, a Slack channel represents a conversation.
1076
+ * Set to a value of 'true' to index the file in vector storage. Only certain file formats are currently supported for indexing. 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.
1057
1077
  */
1058
- conversation: {
1078
+ index?: boolean;
1079
+ indexing?: {
1059
1080
  /**
1060
- * Id of the [Conversation](#schema_conversation)
1081
+ * Configuration to use for indexing the file, will be stored in the file's metadata for reference.
1061
1082
  */
1062
- id: string;
1083
+ configuration: {
1084
+ parsing?: {
1085
+ /**
1086
+ * The minimum length a standalone paragraph should have. If a paragraph is shorter than this, it will be merged with the next immediate paragraph.
1087
+ */
1088
+ minimumParagraphLength?: number;
1089
+ /**
1090
+ * (Team/Enterprise plan only, charged as AI Spend) Enabling this will use a lightweight/inexpensive LLM to clean up the extracted content of PDF files before indexing them to increase the quality of the stored vectors, as PDFs often store raw text in unusual ways which when extracted may result in formatting issues (e.g. broken sentences/paragraphs, unexpected headings, garbled characters, etc.) that can affect retrieval performance for certain user queries if left untouched.
1091
+ *
1092
+ * Notes:
1093
+ * - This feature is only available in Team and Enterprise plans.
1094
+ * - This feature is only available for PDF files. If the file isn't a PDF, this setting will be ignored and no AI Spend will be incurred.
1095
+ * - We recommend using this feature for PDFs that have custom layouts or design. For simple text-based PDFs like documents and books, this feature is usually not necessary.
1096
+ * - The smart cleanup takes some time to perform due to the LLM calls involved, so enabling it will increase the total time it takes to index the file.
1097
+ * - We take steps to prevent the original text from being fundamentally changed but due to the nature of LLMs this could theoretically still happen so it's recommended to review the passages generated for the file after indexing to ensure the content is still accurate.
1098
+ * - This feature is limited to the first 30 pages or 20 KB of text in the PDF file (whichever comes first). If the file has more content than these limits then the rest of the file will be indexed as-is without any cleanup. If you need to clean up the content of the entire file, consider splitting it into smaller files.
1099
+ */
1100
+ smartCleanup?: boolean;
1101
+ };
1102
+ chunking?: {
1103
+ /**
1104
+ * The maximum length of a chunk in characters.
1105
+ */
1106
+ maximumChunkLength?: number;
1107
+ /**
1108
+ * The number of surrounding context levels to include in the vector embedding of the chunk.
1109
+ */
1110
+ embeddedContextLevels?: number;
1111
+ /**
1112
+ * Include the breadcrumb of the chunk in the vector embedding.
1113
+ */
1114
+ embedBreadcrumb?: boolean;
1115
+ };
1116
+ summarization?: {
1117
+ /**
1118
+ * (Team/Enterprise plan only, charged as AI Spend) Create summaries for this file and index them as standalone vectors. Enabling this option will incur in AI Spend cost (charged to the workspace of the bot) to generate the summaries based on the amount of content in the file and the summarization model used.
1119
+ *
1120
+ * Please note that this feature is only available in Team and Enterprise plans.
1121
+ */
1122
+ enable?: boolean;
1123
+ /**
1124
+ * The model type to use for summarization.
1125
+ */
1126
+ modelType?: "inexpensive" | "balanced" | "accurate";
1127
+ /**
1128
+ * The minimum length a section of the file should have to create a summary of it.
1129
+ */
1130
+ minimumInputLength?: number;
1131
+ /**
1132
+ * The maximum length of a summary (in tokens).
1133
+ */
1134
+ outputTokenLimit?: number;
1135
+ /**
1136
+ * Generate a summary of the entire file and index it as a standalone vector.
1137
+ */
1138
+ generateMasterSummary?: boolean;
1139
+ };
1140
+ vision?: {
1141
+ /**
1142
+ * (Team/Enterprise plan only, charged as AI Spend) For PDF files, set this option to `true` or pass an array with specific page numbers to use a vision-enabled LLM to transcribe each page of the PDF as standalone vectors and index them.
1143
+ *
1144
+ * This feature is useful when a PDF file contains custom designs or layouts, or when your document has many infographics, which require visual processing in order to index the file effectively, as the default text-based indexing may not be enough to allow your bot to correctly understand the content in your PDFs.
1145
+ *
1146
+ * Notes:
1147
+ * - This feature is only available in Team and Enterprise plans.
1148
+ * - Enabling this feature will incur in AI Spend cost to use a vision-enabled LLM to index the PDF pages.
1149
+ * - This is limited to a maximum of 100 pages of the PDF. If the file has more pages then the rest of the pages will NOT be transcribed using this vision feature, and will be processed using the default text-based indexing instead. If you need to transcribe the entire file using vision, please split it into smaller files.
1150
+ * - Pages that are vision-transcribed will not be processed by the default text-based indexing to avoid duplicate content in the index.
1151
+ * - This feature is only available for PDF files. If the file isn't a PDF, this setting will be ignored and no AI Spend will be incurred.
1152
+ */
1153
+ transcribePages?: {
1154
+ [k: string]: any;
1155
+ };
1156
+ /**
1157
+ * (Team/Enterprise plan only, charged as AI Spend) For PDF files, set this option to `true` or pass an array with specific page numbers to use a vision-enabled LLM to index each page of the PDF as a standalone image.
1158
+ *
1159
+ * Enabling this feature will allow Autonomous Nodes in your bot to answer visual or higher-level questions about the content in these pages that can usually not be answered correctly by the default text-based indexing or visual transcription.
1160
+ *
1161
+ * This feature is useful when a PDF has:
1162
+ * - Tables with complex layouts
1163
+ * - Charts, diagrams or infographics
1164
+ * - Photos or images that can be used to answer user queries
1165
+ *
1166
+ * Notes:
1167
+ * - This feature is only available in Team and Enterprise plans.
1168
+ * - Enabling this will incur in extra AI Spend cost and additional File Storage usage, in order to use a vision-enabled LLM to visually index the PDF pages and store them as standalone page images in the bot's file storage.
1169
+ * - Enabling this may increase the overall AI Spend cost of your bot as your bot may pass one or more indexed page images to a vision-enabled LLM for answering user queries.
1170
+ * - This is limited to the first 100 pages of the PDF. If the file has more pages then the rest of the pages will NOT be vision-indexed. If you need to visually index the entire file, please split it into smaller files.
1171
+ * - This feature is only available for PDF files. If the file isn't a PDF, this setting will be ignored and no AI Spend will be incurred.
1172
+ */
1173
+ indexPages?: {
1174
+ [k: string]: any;
1175
+ };
1176
+ };
1177
+ };
1178
+ };
1179
+ /**
1180
+ * File access policies. Add "public_content" to allow public access to the file content. Add "integrations" to allow read, search and list operations for any integration installed in the bot.
1181
+ */
1182
+ accessPolicies?: ("public_content" | "integrations")[];
1183
+ /**
1184
+ * 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".
1185
+ */
1186
+ contentType?: string;
1187
+ /**
1188
+ * 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.
1189
+ */
1190
+ expiresAt?: string;
1191
+ /**
1192
+ * Use when your file has "public_content" in its access policy and you need the file\'s content to be immediately accessible through its URL after the file has been uploaded without having to wait for the upload to be processed by our system.
1193
+ *
1194
+ * If set to `true`, the `x-amz-tagging` HTTP header with a value of `public=true` will need to be sent in the HTTP PUT request to the `uploadUrl` in order for the upload request to work.
1195
+ */
1196
+ publicContentImmediatelyAccessible?: boolean;
1197
+ /**
1198
+ * Custom metadata for the file expressed as an object of key-value pairs. The values can be of any type.
1199
+ */
1200
+ metadata?: {
1201
+ [k: string]: any;
1202
+ };
1203
+ }
1204
+ type UpsertFileInput$1 = UpsertFileRequestBody$1 & UpsertFileRequestHeaders$1 & UpsertFileRequestQuery$1 & UpsertFileRequestParams$1;
1205
+ interface UpsertFileResponse$1 {
1206
+ file: {
1063
1207
  /**
1064
- * Id of the current [Task](#schema_task)
1208
+ * File ID
1065
1209
  */
1066
- currentTaskId?: string;
1210
+ id: string;
1067
1211
  /**
1068
- * Id of the current [Workflow](#schema_workflow)
1212
+ * The ID of the bot the file belongs to
1069
1213
  */
1070
- currentWorkflowId?: string;
1214
+ botId: string;
1071
1215
  /**
1072
- * Creation date of the [Conversation](#schema_conversation) in ISO 8601 format
1216
+ * Unique key for the file. Must be unique across the bot (and the integration, when applicable).
1073
1217
  */
1074
- createdAt: string;
1218
+ key: string;
1075
1219
  /**
1076
- * Updating date of the [Conversation](#schema_conversation) in ISO 8601 format
1220
+ * URL to retrieve the file content. This URL will be ready to use once the file is uploaded.
1221
+ *
1222
+ * If the file has a `public_content` policy, this will contain the permanent public URL to retrieve the file, otherwise this will contain a temporary pre-signed URL to download the file which should be used shortly after retrieving and should not be stored long-term as the URL will expire after a short timeframe.
1077
1223
  */
1078
- updatedAt: string;
1224
+ url: string;
1079
1225
  /**
1080
- * Name of the channel where the [Conversation](#schema_conversation) is happening
1226
+ * File size in bytes. Non-null if file upload status is "COMPLETE".
1081
1227
  */
1082
- channel: string;
1228
+ size: number | null;
1083
1229
  /**
1084
- * Name of the integration that created the [Conversation](#schema_conversation)
1230
+ * MIME type of the file's content
1085
1231
  */
1086
- integration: string;
1232
+ contentType: string;
1087
1233
  /**
1088
- * Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Conversation](#schema_conversation). The set of [Tags](/docs/developers/concepts/tags) available on a [Conversation](#schema_conversation) is restricted by the list of [Tags](/docs/developers/concepts/tags) defined previously by the [Bot](#schema_bot). Individual keys can be unset by posting an empty value to them.
1234
+ * The tags of the file as an object of key/value pairs
1089
1235
  */
1090
1236
  tags: {
1091
1237
  [k: string]: string;
1092
1238
  };
1093
- };
1094
- }
1095
-
1096
- interface GetConversationRequestHeaders {
1097
- }
1098
- interface GetConversationRequestQuery {
1099
- }
1100
- interface GetConversationRequestParams {
1101
- id: string;
1102
- }
1103
- interface GetConversationRequestBody {
1104
- }
1105
- type GetConversationInput = GetConversationRequestBody & GetConversationRequestHeaders & GetConversationRequestQuery & GetConversationRequestParams;
1106
- interface GetConversationResponse {
1107
- /**
1108
- * The [Conversation](#schema_conversation) object represents an exchange of messages between one or more users. A [Conversation](#schema_conversation) is always linked to an integration's channels. For example, a Slack channel represents a conversation.
1109
- */
1110
- conversation: {
1111
1239
  /**
1112
- * Id of the [Conversation](#schema_conversation)
1240
+ * Metadata of the file as an object of key/value pairs. The values can be of any type.
1113
1241
  */
1114
- id: string;
1242
+ metadata: {
1243
+ [k: string]: any;
1244
+ };
1115
1245
  /**
1116
- * Id of the current [Task](#schema_task)
1246
+ * File creation timestamp in ISO 8601 format
1117
1247
  */
1118
- currentTaskId?: string;
1248
+ createdAt: string;
1119
1249
  /**
1120
- * Id of the current [Workflow](#schema_workflow)
1250
+ * File last update timestamp in ISO 8601 format
1121
1251
  */
1122
- currentWorkflowId?: string;
1252
+ updatedAt: string;
1123
1253
  /**
1124
- * Creation date of the [Conversation](#schema_conversation) in ISO 8601 format
1254
+ * Access policies configured for the file.
1255
+ */
1256
+ accessPolicies: ("integrations" | "public_content")[];
1257
+ /**
1258
+ * Whether the file was requested to be indexed for search or not.
1259
+ */
1260
+ index: boolean;
1261
+ /**
1262
+ * 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.
1263
+ *
1264
+ * 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.
1265
+ *
1266
+ * 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).
1267
+ *
1268
+ * 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.
1269
+ */
1270
+ status: "upload_pending" | "upload_failed" | "upload_completed" | "indexing_pending" | "indexing_failed" | "indexing_completed";
1271
+ /**
1272
+ * If the file status is `upload_failed` or `indexing_failed` this will contain the reason of the failure.
1273
+ */
1274
+ failedStatusReason?: string;
1275
+ /**
1276
+ * File expiry timestamp in ISO 8601 format
1277
+ */
1278
+ expiresAt?: string;
1279
+ /**
1280
+ * URL to upload the file content. File content needs to be sent to this URL via a PUT request.
1281
+ */
1282
+ uploadUrl: string;
1283
+ };
1284
+ }
1285
+
1286
+ type UploadFileInput = Simplify<Omit<UpsertFileInput$1, 'size'> & {
1287
+ content?: ArrayBuffer | Buffer | Blob | Uint8Array | string;
1288
+ url?: string;
1289
+ }>;
1290
+ type UploadFileOutput = UpsertFileResponse$1;
1291
+
1292
+ type Primitive = string | number | boolean;
1293
+ type Value<P extends Primitive> = P | P[] | Record<string, P>;
1294
+ type QueryValue = Value<string> | Value<boolean> | Value<number> | undefined;
1295
+ type AnyQueryParams = Record<string, QueryValue>;
1296
+ type HeaderValue = string | undefined;
1297
+ type AnyHeaderParams = Record<string, HeaderValue>;
1298
+ type AnyBodyParams = Record<string, any>;
1299
+ type ParsedRequest = {
1300
+ method: string;
1301
+ path: string;
1302
+ query: AnyQueryParams;
1303
+ headers: AnyHeaderParams;
1304
+ body: AnyBodyParams;
1305
+ };
1306
+ declare const toAxiosRequest: (req: ParsedRequest) => AxiosRequestConfig$2;
1307
+
1308
+ interface CreateConversationRequestHeaders {
1309
+ }
1310
+ interface CreateConversationRequestQuery {
1311
+ }
1312
+ interface CreateConversationRequestParams {
1313
+ }
1314
+ interface CreateConversationRequestBody {
1315
+ /**
1316
+ * Channel name
1317
+ */
1318
+ channel: string;
1319
+ /**
1320
+ * Tags for the [Conversation](#schema_conversation)
1321
+ */
1322
+ tags: {
1323
+ [k: string]: string;
1324
+ };
1325
+ /**
1326
+ * @deprecated
1327
+ * [DEPRECATED] To create a conversation from within a bot, call an action of the integration instead.
1328
+ */
1329
+ integrationName?: string;
1330
+ }
1331
+ type CreateConversationInput = CreateConversationRequestBody & CreateConversationRequestHeaders & CreateConversationRequestQuery & CreateConversationRequestParams;
1332
+ interface CreateConversationResponse {
1333
+ /**
1334
+ * The [Conversation](#schema_conversation) object represents an exchange of messages between one or more users. A [Conversation](#schema_conversation) is always linked to an integration's channels. For example, a Slack channel represents a conversation.
1335
+ */
1336
+ conversation: {
1337
+ /**
1338
+ * Id of the [Conversation](#schema_conversation)
1339
+ */
1340
+ id: string;
1341
+ /**
1342
+ * Id of the current [Task](#schema_task)
1343
+ */
1344
+ currentTaskId?: string;
1345
+ /**
1346
+ * Id of the current [Workflow](#schema_workflow)
1347
+ */
1348
+ currentWorkflowId?: string;
1349
+ /**
1350
+ * Creation date of the [Conversation](#schema_conversation) in ISO 8601 format
1351
+ */
1352
+ createdAt: string;
1353
+ /**
1354
+ * Updating date of the [Conversation](#schema_conversation) in ISO 8601 format
1355
+ */
1356
+ updatedAt: string;
1357
+ /**
1358
+ * Name of the channel where the [Conversation](#schema_conversation) is happening
1359
+ */
1360
+ channel: string;
1361
+ /**
1362
+ * Name of the integration that created the [Conversation](#schema_conversation)
1363
+ */
1364
+ integration: string;
1365
+ /**
1366
+ * Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Conversation](#schema_conversation). The set of [Tags](/docs/developers/concepts/tags) available on a [Conversation](#schema_conversation) is restricted by the list of [Tags](/docs/developers/concepts/tags) defined previously by the [Bot](#schema_bot). Individual keys can be unset by posting an empty value to them.
1367
+ */
1368
+ tags: {
1369
+ [k: string]: string;
1370
+ };
1371
+ };
1372
+ }
1373
+
1374
+ interface GetConversationRequestHeaders {
1375
+ }
1376
+ interface GetConversationRequestQuery {
1377
+ }
1378
+ interface GetConversationRequestParams {
1379
+ id: string;
1380
+ }
1381
+ interface GetConversationRequestBody {
1382
+ }
1383
+ type GetConversationInput = GetConversationRequestBody & GetConversationRequestHeaders & GetConversationRequestQuery & GetConversationRequestParams;
1384
+ interface GetConversationResponse {
1385
+ /**
1386
+ * The [Conversation](#schema_conversation) object represents an exchange of messages between one or more users. A [Conversation](#schema_conversation) is always linked to an integration's channels. For example, a Slack channel represents a conversation.
1387
+ */
1388
+ conversation: {
1389
+ /**
1390
+ * Id of the [Conversation](#schema_conversation)
1391
+ */
1392
+ id: string;
1393
+ /**
1394
+ * Id of the current [Task](#schema_task)
1395
+ */
1396
+ currentTaskId?: string;
1397
+ /**
1398
+ * Id of the current [Workflow](#schema_workflow)
1399
+ */
1400
+ currentWorkflowId?: string;
1401
+ /**
1402
+ * Creation date of the [Conversation](#schema_conversation) in ISO 8601 format
1125
1403
  */
1126
1404
  createdAt: string;
1127
1405
  /**
@@ -1765,6 +2043,10 @@ interface CreateMessageResponse {
1765
2043
  * Creation date of the [Message](#schema_message) in ISO 8601 format
1766
2044
  */
1767
2045
  createdAt: string;
2046
+ /**
2047
+ * Update date of the [Message](#schema_message) in ISO 8601 format
2048
+ */
2049
+ updatedAt: string;
1768
2050
  /**
1769
2051
  * Type of the [Message](#schema_message) represents the resource type that the message is related to
1770
2052
  */
@@ -1859,6 +2141,10 @@ interface GetOrCreateMessageResponse {
1859
2141
  * Creation date of the [Message](#schema_message) in ISO 8601 format
1860
2142
  */
1861
2143
  createdAt: string;
2144
+ /**
2145
+ * Update date of the [Message](#schema_message) in ISO 8601 format
2146
+ */
2147
+ updatedAt: string;
1862
2148
  /**
1863
2149
  * Type of the [Message](#schema_message) represents the resource type that the message is related to
1864
2150
  */
@@ -1913,6 +2199,10 @@ interface GetMessageResponse {
1913
2199
  * Creation date of the [Message](#schema_message) in ISO 8601 format
1914
2200
  */
1915
2201
  createdAt: string;
2202
+ /**
2203
+ * Update date of the [Message](#schema_message) in ISO 8601 format
2204
+ */
2205
+ updatedAt: string;
1916
2206
  /**
1917
2207
  * Type of the [Message](#schema_message) represents the resource type that the message is related to
1918
2208
  */
@@ -1958,6 +2248,12 @@ interface UpdateMessageRequestBody {
1958
2248
  tags: {
1959
2249
  [k: string]: string;
1960
2250
  };
2251
+ /**
2252
+ * Payload is the content type of the message. Accepted payload options: Text, Image, Choice, Dropdown, Card, Carousel, File, Audio, Video, Location
2253
+ */
2254
+ payload?: {
2255
+ [k: string]: any;
2256
+ };
1961
2257
  }
1962
2258
  type UpdateMessageInput = UpdateMessageRequestBody & UpdateMessageRequestHeaders & UpdateMessageRequestQuery & UpdateMessageRequestParams;
1963
2259
  interface UpdateMessageResponse {
@@ -1973,6 +2269,10 @@ interface UpdateMessageResponse {
1973
2269
  * Creation date of the [Message](#schema_message) in ISO 8601 format
1974
2270
  */
1975
2271
  createdAt: string;
2272
+ /**
2273
+ * Update date of the [Message](#schema_message) in ISO 8601 format
2274
+ */
2275
+ updatedAt: string;
1976
2276
  /**
1977
2277
  * Type of the [Message](#schema_message) represents the resource type that the message is related to
1978
2278
  */
@@ -2028,6 +2328,10 @@ interface ListMessagesResponse {
2028
2328
  * Creation date of the [Message](#schema_message) in ISO 8601 format
2029
2329
  */
2030
2330
  createdAt: string;
2331
+ /**
2332
+ * Update date of the [Message](#schema_message) in ISO 8601 format
2333
+ */
2334
+ updatedAt: string;
2031
2335
  /**
2032
2336
  * Type of the [Message](#schema_message) represents the resource type that the message is related to
2033
2337
  */
@@ -6402,6 +6706,51 @@ type DeployBotVersionInput = DeployBotVersionRequestBody & DeployBotVersionReque
6402
6706
  interface DeployBotVersionResponse {
6403
6707
  }
6404
6708
 
6709
+ interface CreateIntegrationShareableIdRequestHeaders {
6710
+ }
6711
+ interface CreateIntegrationShareableIdRequestQuery {
6712
+ }
6713
+ interface CreateIntegrationShareableIdRequestParams {
6714
+ botId: string;
6715
+ integrationId: string;
6716
+ }
6717
+ interface CreateIntegrationShareableIdRequestBody {
6718
+ }
6719
+ type CreateIntegrationShareableIdInput = CreateIntegrationShareableIdRequestBody & CreateIntegrationShareableIdRequestHeaders & CreateIntegrationShareableIdRequestQuery & CreateIntegrationShareableIdRequestParams;
6720
+ interface CreateIntegrationShareableIdResponse {
6721
+ shareableId: string;
6722
+ }
6723
+
6724
+ interface DeleteIntegrationShareableIdRequestHeaders {
6725
+ }
6726
+ interface DeleteIntegrationShareableIdRequestQuery {
6727
+ }
6728
+ interface DeleteIntegrationShareableIdRequestParams {
6729
+ botId: string;
6730
+ integrationId: string;
6731
+ }
6732
+ interface DeleteIntegrationShareableIdRequestBody {
6733
+ }
6734
+ type DeleteIntegrationShareableIdInput = DeleteIntegrationShareableIdRequestBody & DeleteIntegrationShareableIdRequestHeaders & DeleteIntegrationShareableIdRequestQuery & DeleteIntegrationShareableIdRequestParams;
6735
+ interface DeleteIntegrationShareableIdResponse {
6736
+ }
6737
+
6738
+ interface GetIntegrationShareableIdRequestHeaders {
6739
+ }
6740
+ interface GetIntegrationShareableIdRequestQuery {
6741
+ }
6742
+ interface GetIntegrationShareableIdRequestParams {
6743
+ botId: string;
6744
+ integrationId: string;
6745
+ }
6746
+ interface GetIntegrationShareableIdRequestBody {
6747
+ }
6748
+ type GetIntegrationShareableIdInput = GetIntegrationShareableIdRequestBody & GetIntegrationShareableIdRequestHeaders & GetIntegrationShareableIdRequestQuery & GetIntegrationShareableIdRequestParams;
6749
+ interface GetIntegrationShareableIdResponse {
6750
+ shareableId: string;
6751
+ isExpired: boolean;
6752
+ }
6753
+
6405
6754
  interface ListWorkspaceInvoicesRequestHeaders {
6406
6755
  }
6407
6756
  interface ListWorkspaceInvoicesRequestQuery {
@@ -6936,15 +7285,7 @@ interface ListWorkspaceMembersRequestBody {
6936
7285
  }
6937
7286
  type ListWorkspaceMembersInput = ListWorkspaceMembersRequestBody & ListWorkspaceMembersRequestHeaders & ListWorkspaceMembersRequestQuery & ListWorkspaceMembersRequestParams;
6938
7287
  interface ListWorkspaceMembersResponse {
6939
- members: {
6940
- id: string;
6941
- userId?: string;
6942
- email: string;
6943
- createdAt: string;
6944
- role: "viewer" | "billing" | "developer" | "manager" | "administrator" | "owner";
6945
- profilePicture?: string;
6946
- displayName?: string;
6947
- }[];
7288
+ members: UpdateWorkspaceMemberResponse$1[];
6948
7289
  meta: {
6949
7290
  /**
6950
7291
  * 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.
@@ -6952,6 +7293,15 @@ interface ListWorkspaceMembersResponse {
6952
7293
  nextToken?: string;
6953
7294
  };
6954
7295
  }
7296
+ interface UpdateWorkspaceMemberResponse$1 {
7297
+ id: string;
7298
+ userId?: string;
7299
+ email: string;
7300
+ createdAt: string;
7301
+ role: "viewer" | "billing" | "developer" | "manager" | "administrator" | "owner";
7302
+ profilePicture?: string;
7303
+ displayName?: string;
7304
+ }
6955
7305
 
6956
7306
  interface GetWorkspaceMemberRequestHeaders {
6957
7307
  }
@@ -12783,7 +13133,7 @@ interface SearchFilesResponse {
12783
13133
  /**
12784
13134
  * The subtype of passage, if available.
12785
13135
  */
12786
- subtype?: "title" | "subtitle" | "paragraph" | "blockquote" | "list" | "table" | "code" | "page";
13136
+ subtype?: "title" | "subtitle" | "paragraph" | "blockquote" | "list" | "table" | "code" | "image" | "page";
12787
13137
  /**
12788
13138
  * Page number the passage is located on. Only applicable if the passage was extracted from a PDF file.
12789
13139
  */
@@ -12861,7 +13211,7 @@ interface ListFilePassagesResponse {
12861
13211
  /**
12862
13212
  * The subtype of passage, if available.
12863
13213
  */
12864
- subtype?: "title" | "subtitle" | "paragraph" | "blockquote" | "list" | "table" | "code" | "page";
13214
+ subtype?: "title" | "subtitle" | "paragraph" | "blockquote" | "list" | "table" | "code" | "image" | "page";
12865
13215
  /**
12866
13216
  * Page number the passage is located on. Only applicable if the passage was extracted from a PDF file.
12867
13217
  */
@@ -14652,6 +15002,7 @@ interface UpsertTableRowsResponse {
14652
15002
 
14653
15003
  type ClientProps$1 = {
14654
15004
  toAxiosRequest: typeof toAxiosRequest;
15005
+ toApiError: typeof toApiError;
14655
15006
  };
14656
15007
  declare class Client$1 {
14657
15008
  private axiosInstance;
@@ -14730,6 +15081,9 @@ declare class Client$1 {
14730
15081
  readonly getBotVersion: (input: GetBotVersionInput) => Promise<GetBotVersionResponse>;
14731
15082
  readonly createBotVersion: (input: CreateBotVersionInput) => Promise<CreateBotVersionResponse>;
14732
15083
  readonly deployBotVersion: (input: DeployBotVersionInput) => Promise<DeployBotVersionResponse>;
15084
+ readonly createIntegrationShareableId: (input: CreateIntegrationShareableIdInput) => Promise<CreateIntegrationShareableIdResponse>;
15085
+ readonly deleteIntegrationShareableId: (input: DeleteIntegrationShareableIdInput) => Promise<DeleteIntegrationShareableIdResponse>;
15086
+ readonly getIntegrationShareableId: (input: GetIntegrationShareableIdInput) => Promise<GetIntegrationShareableIdResponse>;
14733
15087
  readonly listWorkspaceInvoices: (input: ListWorkspaceInvoicesInput) => Promise<ListWorkspaceInvoicesResponse>;
14734
15088
  readonly getUpcomingInvoice: (input: GetUpcomingInvoiceInput) => Promise<GetUpcomingInvoiceResponse>;
14735
15089
  readonly chargeWorkspaceUnpaidInvoices: (input: ChargeWorkspaceUnpaidInvoicesInput) => Promise<ChargeWorkspaceUnpaidInvoicesResponse>;
@@ -14818,295 +15172,309 @@ declare class Client$1 {
14818
15172
  readonly updateTableRows: (input: UpdateTableRowsInput) => Promise<UpdateTableRowsResponse>;
14819
15173
  readonly upsertTableRows: (input: UpsertTableRowsInput) => Promise<UpsertTableRowsResponse>;
14820
15174
  }
15175
+ declare function toApiError(err: unknown): Error;
14821
15176
 
14822
- type UploadFileInput = Omit<UpsertFileInput, 'size'> & {
14823
- content?: ArrayBuffer | Buffer | Blob | Uint8Array | string;
14824
- url?: string;
14825
- };
14826
- type UploadFileOutput = UpsertFileResponse;
14827
- type Simplify<T> = T extends (...args: infer A) => infer R ? (...args: Simplify<A>) => Simplify<R> : T extends Promise<infer R> ? Promise<Simplify<R>> : T extends Buffer ? Buffer : T extends object ? T extends infer O ? {
14828
- [K in keyof O]: Simplify<O[K]>;
14829
- } : never : T;
14830
- type AsyncFunc = (...args: any[]) => Promise<any>;
14831
15177
  type IClient = Simplify<Client$1 & {
14832
15178
  uploadFile: (input: UploadFileInput) => Promise<UploadFileOutput>;
14833
15179
  }>;
14834
- type Operation = Simplify<keyof {
14835
- [K in keyof IClient as IClient[K] extends AsyncFunc ? K : never]: IClient[K];
14836
- }>;
14837
- type ClientInputs = Simplify<{
14838
- [T in Operation]: Parameters<IClient[T]>[0];
14839
- }>;
14840
- type ClientOutputs = Simplify<{
14841
- [T in Operation]: Awaited<ReturnType<IClient[T]>>;
14842
- }>;
14843
- type Headers = Record<string, string | string[]>;
14844
- type RetryConfig = IAxiosRetryConfig;
14845
- type ClientProps = {
15180
+ type ClientProps = CommonClientProps & {
14846
15181
  integrationId?: string;
14847
15182
  workspaceId?: string;
14848
15183
  botId?: string;
14849
15184
  token?: string;
14850
- apiUrl?: string;
14851
- timeout?: number;
14852
- headers?: Headers;
14853
- retry?: RetryConfig;
14854
- };
14855
- type ClientConfig = {
14856
- apiUrl: string;
14857
- headers: Headers;
14858
- withCredentials: boolean;
14859
- timeout: number;
14860
- };
14861
-
14862
- type ListOperation = keyof {
14863
- [K in Operation as ClientInputs[K] extends {
14864
- nextToken?: string | undefined;
14865
- } ? K : never]: null;
14866
- };
14867
- type ListInputs = {
14868
- [K in ListOperation]: Omit<ClientInputs[K], 'nextToken'>;
14869
15185
  };
14870
- type PageLister<R> = (t: {
14871
- nextToken?: string;
14872
- }) => Promise<{
14873
- items: R[];
14874
- meta: {
14875
- nextToken?: string;
14876
- };
14877
- }>;
14878
- declare class AsyncCollection<T> {
14879
- private _list;
14880
- constructor(_list: PageLister<T>);
14881
- [Symbol.asyncIterator](): AsyncGenerator<Awaited<T>, void, unknown>;
14882
- collect(props?: {
14883
- limit?: number;
14884
- }): Promise<T[]>;
14885
- }
14886
- declare class Lister {
14887
- private _client;
14888
- constructor(_client: Client$1);
14889
- readonly conversations: (props: ListInputs["listConversations"]) => AsyncCollection<{
14890
- id: string;
14891
- currentTaskId?: string;
14892
- currentWorkflowId?: string;
14893
- createdAt: string;
14894
- updatedAt: string;
14895
- channel: string;
14896
- integration: string;
14897
- tags: {
14898
- [k: string]: string;
14899
- };
14900
- }>;
14901
- readonly participants: (props: ListInputs["listParticipants"]) => AsyncCollection<{
14902
- id: string;
14903
- createdAt: string;
14904
- updatedAt: string;
14905
- tags: {
14906
- [k: string]: string;
14907
- };
14908
- name?: string;
14909
- pictureUrl?: string;
14910
- }>;
14911
- readonly events: (props: ListInputs["listEvents"]) => AsyncCollection<{
14912
- id: string;
14913
- createdAt: string;
14914
- type: string;
14915
- payload: {
14916
- [k: string]: any;
14917
- };
14918
- conversationId?: string;
14919
- userId?: string;
14920
- messageId?: string;
14921
- status: "pending" | "processed" | "ignored" | "failed" | "scheduled";
14922
- failureReason: string | null;
14923
- }>;
14924
- readonly messages: (props: ListInputs["listMessages"]) => AsyncCollection<{
14925
- id: string;
14926
- createdAt: string;
14927
- type: string;
14928
- payload: {
14929
- [k: string]: any;
14930
- };
14931
- direction: "incoming" | "outgoing";
14932
- userId: string;
14933
- conversationId: string;
14934
- tags: {
14935
- [k: string]: string;
14936
- };
14937
- }>;
14938
- readonly users: (props: ListInputs["listUsers"]) => AsyncCollection<{
14939
- id: string;
14940
- createdAt: string;
14941
- updatedAt: string;
14942
- tags: {
14943
- [k: string]: string;
14944
- };
14945
- name?: string;
14946
- pictureUrl?: string;
14947
- }>;
14948
- readonly tasks: (props: ListInputs["listTasks"]) => AsyncCollection<{
14949
- id: string;
14950
- title: string;
14951
- description: string;
14952
- type: string;
14953
- data: {
14954
- [k: string]: any;
14955
- };
14956
- status: "pending" | "in_progress" | "failed" | "completed" | "blocked" | "paused" | "timeout" | "cancelled";
14957
- parentTaskId?: string;
14958
- conversationId?: string;
14959
- userId?: string;
14960
- timeoutAt: string;
14961
- createdAt: string;
14962
- updatedAt: string;
14963
- failureReason?: string;
14964
- tags: {
14965
- [k: string]: string;
14966
- };
14967
- }>;
14968
- readonly publicIntegrations: (props: ListInputs["listPublicIntegrations"]) => AsyncCollection<{
14969
- id: string;
14970
- name: string;
14971
- version: string;
14972
- createdAt: string;
14973
- updatedAt: string;
14974
- title: string;
14975
- description: string;
14976
- iconUrl: string;
14977
- public: boolean;
14978
- verificationStatus: "unapproved" | "pending" | "approved" | "rejected";
14979
- ownerWorkspace: {
15186
+ declare class Client extends Client$1 implements IClient {
15187
+ readonly config: Readonly<ClientConfig>;
15188
+ constructor(clientProps?: ClientProps);
15189
+ get list(): {
15190
+ conversations: (props: {
15191
+ tags?: {
15192
+ [x: string]: string;
15193
+ } | undefined;
15194
+ channel?: string | undefined;
15195
+ integrationName?: string | undefined;
15196
+ sortField?: ("createdAt" | "updatedAt") | undefined;
15197
+ sortDirection?: ("asc" | "desc") | undefined;
15198
+ participantIds?: string[] | undefined;
15199
+ }) => AsyncCollection<{
15200
+ id: string;
15201
+ currentTaskId?: string;
15202
+ currentWorkflowId?: string;
15203
+ createdAt: string;
15204
+ updatedAt: string;
15205
+ channel: string;
15206
+ integration: string;
15207
+ tags: {
15208
+ [k: string]: string;
15209
+ };
15210
+ }>;
15211
+ participants: (props: {
15212
+ id: string;
15213
+ }) => AsyncCollection<{
15214
+ id: string;
15215
+ createdAt: string;
15216
+ updatedAt: string;
15217
+ tags: {
15218
+ [k: string]: string;
15219
+ };
15220
+ name?: string;
15221
+ pictureUrl?: string;
15222
+ }>;
15223
+ events: (props: {
15224
+ type?: string | undefined;
15225
+ userId?: string | undefined;
15226
+ conversationId?: string | undefined;
15227
+ messageId?: string | undefined;
15228
+ status?: ("pending" | "ignored" | "processed" | "failed" | "scheduled") | undefined;
15229
+ }) => AsyncCollection<{
15230
+ id: string;
15231
+ createdAt: string;
15232
+ type: string;
15233
+ payload: {
15234
+ [k: string]: any;
15235
+ };
15236
+ conversationId?: string;
15237
+ userId?: string;
15238
+ messageId?: string;
15239
+ status: "pending" | "processed" | "ignored" | "failed" | "scheduled";
15240
+ failureReason: string | null;
15241
+ }>;
15242
+ messages: (props: {
15243
+ tags?: {
15244
+ [x: string]: string;
15245
+ } | undefined;
15246
+ conversationId?: string | undefined;
15247
+ }) => AsyncCollection<{
15248
+ id: string;
15249
+ createdAt: string;
15250
+ updatedAt: string;
15251
+ type: string;
15252
+ payload: {
15253
+ [k: string]: any;
15254
+ };
15255
+ direction: "incoming" | "outgoing";
15256
+ userId: string;
15257
+ conversationId: string;
15258
+ tags: {
15259
+ [k: string]: string;
15260
+ };
15261
+ }>;
15262
+ users: (props: {
15263
+ tags?: {
15264
+ [x: string]: string;
15265
+ } | undefined;
15266
+ conversationId?: string | undefined;
15267
+ }) => AsyncCollection<{
15268
+ id: string;
15269
+ createdAt: string;
15270
+ updatedAt: string;
15271
+ tags: {
15272
+ [k: string]: string;
15273
+ };
15274
+ name?: string;
15275
+ pictureUrl?: string;
15276
+ }>;
15277
+ tasks: (props: {
15278
+ tags?: {
15279
+ [x: string]: string;
15280
+ } | undefined;
15281
+ type?: string | undefined;
15282
+ userId?: string | undefined;
15283
+ conversationId?: string | undefined;
15284
+ status?: ("pending" | "failed" | "in_progress" | "completed" | "blocked" | "paused" | "timeout" | "cancelled")[] | undefined;
15285
+ parentTaskId?: string | undefined;
15286
+ }) => AsyncCollection<{
15287
+ id: string;
15288
+ title: string;
15289
+ description: string;
15290
+ type: string;
15291
+ data: {
15292
+ [k: string]: any;
15293
+ };
15294
+ status: "pending" | "in_progress" | "failed" | "completed" | "blocked" | "paused" | "timeout" | "cancelled";
15295
+ parentTaskId?: string;
15296
+ conversationId?: string;
15297
+ userId?: string;
15298
+ timeoutAt: string;
15299
+ createdAt: string;
15300
+ updatedAt: string;
15301
+ failureReason?: string;
15302
+ tags: {
15303
+ [k: string]: string;
15304
+ };
15305
+ }>;
15306
+ publicIntegrations: (props: {
15307
+ name?: string | undefined;
15308
+ version?: string | undefined;
15309
+ }) => AsyncCollection<{
14980
15310
  id: string;
14981
- handle: string | null;
14982
15311
  name: string;
14983
- };
14984
- meta: {
14985
- installs: number;
14986
- views: number;
14987
- };
14988
- }>;
14989
- readonly bots: (props: ListInputs["listBots"]) => AsyncCollection<{
14990
- id: string;
14991
- createdAt: string;
14992
- updatedAt: string;
14993
- name: string;
14994
- deployedAt?: string;
14995
- tags: {
14996
- [k: string]: string;
14997
- };
14998
- }>;
14999
- readonly botIssues: (props: ListInputs["listBotIssues"]) => AsyncCollection<{
15000
- id: string;
15001
- code: string;
15002
- createdAt: string;
15003
- lastSeenAt: string;
15004
- title: string;
15005
- description: string;
15006
- groupedData: {
15007
- [k: string]: {
15008
- raw: string;
15009
- pretty?: string;
15312
+ version: string;
15313
+ createdAt: string;
15314
+ updatedAt: string;
15315
+ title: string;
15316
+ description: string;
15317
+ iconUrl: string;
15318
+ public: boolean;
15319
+ verificationStatus: "unapproved" | "pending" | "approved" | "rejected";
15320
+ ownerWorkspace: {
15321
+ id: string;
15322
+ handle: string | null;
15323
+ name: string;
15010
15324
  };
15011
- };
15012
- eventsCount: number;
15013
- category: "user_code" | "limits" | "configuration" | "other";
15014
- resolutionLink: string | null;
15015
- }>;
15016
- readonly workspaces: (props: ListInputs["listWorkspaces"]) => AsyncCollection<UpdateWorkspaceResponse>;
15017
- readonly publicWorkspaces: (props: ListInputs["listPublicWorkspaces"]) => AsyncCollection<GetPublicWorkspaceResponse>;
15018
- readonly workspaceMembers: (props: ListInputs["listWorkspaceMembers"]) => AsyncCollection<{
15019
- id: string;
15020
- userId?: string;
15021
- email: string;
15022
- createdAt: string;
15023
- role: "viewer" | "billing" | "developer" | "manager" | "administrator" | "owner";
15024
- profilePicture?: string;
15025
- displayName?: string;
15026
- }>;
15027
- readonly integrations: (props: ListInputs["listIntegrations"]) => AsyncCollection<{
15028
- id: string;
15029
- name: string;
15030
- version: string;
15031
- createdAt: string;
15032
- updatedAt: string;
15033
- title: string;
15034
- description: string;
15035
- iconUrl: string;
15036
- public: boolean;
15037
- verificationStatus: "unapproved" | "pending" | "approved" | "rejected";
15038
- matchedOn?: {
15039
- name?: boolean;
15040
- title?: boolean;
15041
- description?: boolean;
15042
- actions?: string[];
15043
- interfaces?: string[];
15044
- };
15045
- ownerWorkspace?: {
15325
+ meta: {
15326
+ installs: number;
15327
+ views: number;
15328
+ };
15329
+ }>;
15330
+ bots: (props: {
15331
+ tags?: {
15332
+ [x: string]: string;
15333
+ } | undefined;
15334
+ sortField?: ("createdAt" | "updatedAt") | undefined;
15335
+ sortDirection?: ("asc" | "desc") | undefined;
15336
+ dev?: boolean | undefined;
15337
+ }) => AsyncCollection<{
15046
15338
  id: string;
15047
- handle: string | null;
15339
+ createdAt: string;
15340
+ updatedAt: string;
15048
15341
  name: string;
15049
- };
15050
- }>;
15051
- readonly interfaces: (props: ListInputs["listInterfaces"]) => AsyncCollection<{
15052
- id: string;
15053
- createdAt: string;
15054
- updatedAt: string;
15055
- name: string;
15056
- version: string;
15057
- }>;
15058
- readonly activities: (props: ListInputs["listActivities"]) => AsyncCollection<{
15059
- id: string;
15060
- description: string;
15061
- taskId: string;
15062
- category: "unknown" | "capture" | "bot_message" | "user_message" | "agent_message" | "event" | "action" | "task_status" | "subtask_status" | "exception";
15063
- data: {
15064
- [k: string]: any;
15065
- };
15066
- createdAt: string;
15067
- }>;
15068
- readonly files: (props: ListInputs["listFiles"]) => AsyncCollection<{
15069
- id: string;
15070
- botId: string;
15071
- key: string;
15072
- url: string;
15073
- size: number | null;
15074
- contentType: string;
15075
- tags: {
15076
- [k: string]: string;
15077
- };
15078
- metadata: {
15079
- [k: string]: any | null;
15080
- };
15081
- createdAt: string;
15082
- updatedAt: string;
15083
- accessPolicies: ("integrations" | "public_content")[];
15084
- index: boolean;
15085
- status: "upload_pending" | "upload_failed" | "upload_completed" | "indexing_pending" | "indexing_failed" | "indexing_completed";
15086
- failedStatusReason?: string;
15087
- expiresAt?: string;
15088
- }>;
15089
- readonly filePassages: (props: ListInputs["listFilePassages"]) => AsyncCollection<{
15090
- id: string;
15091
- content: string;
15092
- meta: {
15093
- type?: "chunk" | "summary" | "consolidated" | "image";
15094
- subtype?: "title" | "subtitle" | "paragraph" | "blockquote" | "list" | "table" | "code" | "page";
15095
- pageNumber?: number;
15096
- position?: number;
15097
- sourceUrl?: string;
15098
- };
15099
- }>;
15100
- }
15101
-
15102
- declare class Client extends Client$1 implements IClient {
15103
- readonly config: Readonly<ClientConfig>;
15104
- constructor(clientProps?: ClientProps);
15105
- get list(): Lister;
15342
+ deployedAt?: string;
15343
+ tags: {
15344
+ [k: string]: string;
15345
+ };
15346
+ }>;
15347
+ botIssues: (props: {
15348
+ id: string;
15349
+ }) => AsyncCollection<{
15350
+ id: string;
15351
+ code: string;
15352
+ createdAt: string;
15353
+ lastSeenAt: string;
15354
+ title: string;
15355
+ description: string;
15356
+ groupedData: {
15357
+ [k: string]: {
15358
+ raw: string;
15359
+ pretty?: string;
15360
+ };
15361
+ };
15362
+ eventsCount: number;
15363
+ category: "user_code" | "limits" | "configuration" | "other";
15364
+ resolutionLink: string | null;
15365
+ }>;
15366
+ workspaces: (props: {
15367
+ handle?: string | undefined;
15368
+ }) => AsyncCollection<UpdateWorkspaceResponse>;
15369
+ publicWorkspaces: (props: {
15370
+ search?: string | undefined;
15371
+ workspaceIds?: string[] | undefined;
15372
+ }) => AsyncCollection<GetPublicWorkspaceResponse>;
15373
+ workspaceMembers: (props: {}) => AsyncCollection<UpdateWorkspaceMemberResponse$1>;
15374
+ integrations: (props: {
15375
+ search?: string | undefined;
15376
+ name?: string | undefined;
15377
+ version?: string | undefined;
15378
+ dev?: boolean | undefined;
15379
+ limit?: number | undefined;
15380
+ interfaceId?: string | undefined;
15381
+ interfaceName?: string | undefined;
15382
+ visibility?: ("public" | "private") | undefined;
15383
+ installedByBotId?: string | undefined;
15384
+ verificationStatus?: ("unapproved" | "pending" | "approved" | "rejected") | undefined;
15385
+ sortBy?: ("popularity" | "name" | "createdAt" | "updatedAt" | "installCount") | undefined;
15386
+ direction?: ("asc" | "desc") | undefined;
15387
+ }) => AsyncCollection<{
15388
+ id: string;
15389
+ name: string;
15390
+ version: string;
15391
+ createdAt: string;
15392
+ updatedAt: string;
15393
+ title: string;
15394
+ description: string;
15395
+ iconUrl: string;
15396
+ public: boolean;
15397
+ verificationStatus: "unapproved" | "pending" | "approved" | "rejected";
15398
+ matchedOn?: {
15399
+ name?: boolean;
15400
+ title?: boolean;
15401
+ description?: boolean;
15402
+ actions?: string[];
15403
+ interfaces?: string[];
15404
+ };
15405
+ ownerWorkspace?: {
15406
+ id: string;
15407
+ handle: string | null;
15408
+ name: string;
15409
+ };
15410
+ }>;
15411
+ interfaces: (props: {
15412
+ name?: string | undefined;
15413
+ }) => AsyncCollection<{
15414
+ id: string;
15415
+ createdAt: string;
15416
+ updatedAt: string;
15417
+ name: string;
15418
+ version: string;
15419
+ }>;
15420
+ activities: (props: {
15421
+ botId: string;
15422
+ taskId: string;
15423
+ }) => AsyncCollection<{
15424
+ id: string;
15425
+ description: string;
15426
+ taskId: string;
15427
+ category: "unknown" | "capture" | "bot_message" | "user_message" | "agent_message" | "event" | "action" | "task_status" | "subtask_status" | "exception";
15428
+ data: {
15429
+ [k: string]: any;
15430
+ };
15431
+ createdAt: string;
15432
+ }>;
15433
+ files: (props: {
15434
+ tags?: any;
15435
+ sortField?: ("key" | "size" | "createdAt" | "updatedAt" | "status") | undefined;
15436
+ sortDirection?: ("asc" | "desc") | undefined;
15437
+ ids?: string[] | undefined;
15438
+ }) => AsyncCollection<{
15439
+ id: string;
15440
+ botId: string;
15441
+ key: string;
15442
+ url: string;
15443
+ size: number | null;
15444
+ contentType: string;
15445
+ tags: {
15446
+ [k: string]: string;
15447
+ };
15448
+ metadata: {
15449
+ [k: string]: any | null;
15450
+ };
15451
+ createdAt: string;
15452
+ updatedAt: string;
15453
+ accessPolicies: ("integrations" | "public_content")[];
15454
+ index: boolean;
15455
+ status: "upload_pending" | "upload_failed" | "upload_completed" | "indexing_pending" | "indexing_failed" | "indexing_completed";
15456
+ failedStatusReason?: string;
15457
+ expiresAt?: string;
15458
+ }>;
15459
+ filePassages: (props: {
15460
+ id: string;
15461
+ limit?: number | undefined;
15462
+ }) => AsyncCollection<{
15463
+ id: string;
15464
+ content: string;
15465
+ meta: {
15466
+ type?: "chunk" | "summary" | "consolidated" | "image";
15467
+ subtype?: "title" | "subtitle" | "paragraph" | "blockquote" | "list" | "table" | "code" | "image" | "page";
15468
+ pageNumber?: number;
15469
+ position?: number;
15470
+ sourceUrl?: string;
15471
+ };
15472
+ }>;
15473
+ };
15106
15474
  /**
15107
15475
  * Create/update and upload a file in a single step. Returns an object containing the file metadata and the URL to retrieve the file.
15108
15476
  */
15109
- readonly uploadFile: ({ key, index, tags, contentType, accessPolicies, content, url, indexing, expiresAt, metadata, publicContentImmediatelyAccessible, }: ClientInputs["uploadFile"]) => Promise<ClientOutputs["uploadFile"]>;
15477
+ readonly uploadFile: (input: UploadFileInput) => Promise<UploadFileOutput>;
15110
15478
  }
15111
15479
 
15112
15480
  // TypeScript Version: 4.7