@botpress/cognitive 0.1.10 → 0.1.12
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/dist/index.d.ts +735 -351
- package/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/cognitive@0.1.
|
|
2
|
+
> @botpress/cognitive@0.1.12 build /home/runner/work/botpress/botpress/packages/cognitive
|
|
3
3
|
> pnpm build:type && pnpm build:neutral && size-limit
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @botpress/cognitive@0.1.
|
|
6
|
+
> @botpress/cognitive@0.1.12 build:type /home/runner/work/botpress/botpress/packages/cognitive
|
|
7
7
|
> tsup --tsconfig tsconfig.build.json ./src/index.ts --dts-resolve --dts-only --clean
|
|
8
8
|
|
|
9
9
|
CLI Building entry: ./src/index.ts
|
|
10
10
|
CLI Using tsconfig: tsconfig.build.json
|
|
11
11
|
CLI tsup v8.0.2
|
|
12
12
|
DTS Build start
|
|
13
|
-
DTS ⚡️ Build success in
|
|
14
|
-
DTS dist/index.d.ts
|
|
13
|
+
DTS ⚡️ Build success in 11385ms
|
|
14
|
+
DTS dist/index.d.ts 521.56 KB
|
|
15
15
|
|
|
16
|
-
> @botpress/cognitive@0.1.
|
|
16
|
+
> @botpress/cognitive@0.1.12 build:neutral /home/runner/work/botpress/botpress/packages/cognitive
|
|
17
17
|
> ts-node -T ./build.ts --neutral
|
|
18
18
|
|
|
19
19
|
Done
|
package/dist/index.d.ts
CHANGED
|
@@ -1011,117 +1011,395 @@ declare module 'axios' {
|
|
|
1011
1011
|
}
|
|
1012
1012
|
}
|
|
1013
1013
|
|
|
1014
|
-
type
|
|
1015
|
-
type
|
|
1016
|
-
type
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1053
|
+
|
|
1054
|
+
interface UpsertFileRequestHeaders$1 {
|
|
1033
1055
|
}
|
|
1034
|
-
interface
|
|
1056
|
+
interface UpsertFileRequestQuery$1 {
|
|
1035
1057
|
}
|
|
1036
|
-
interface
|
|
1058
|
+
interface UpsertFileRequestParams$1 {
|
|
1059
|
+
}
|
|
1060
|
+
interface UpsertFileRequestBody$1 {
|
|
1037
1061
|
/**
|
|
1038
|
-
*
|
|
1062
|
+
* Unique key for the file. Must be unique across the bot (and the integration, when applicable).
|
|
1039
1063
|
*/
|
|
1040
|
-
|
|
1064
|
+
key: string;
|
|
1041
1065
|
/**
|
|
1042
|
-
*
|
|
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
|
-
*
|
|
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
|
-
|
|
1052
|
-
}
|
|
1053
|
-
type CreateConversationInput = CreateConversationRequestBody & CreateConversationRequestHeaders & CreateConversationRequestQuery & CreateConversationRequestParams;
|
|
1054
|
-
interface CreateConversationResponse {
|
|
1074
|
+
size: number;
|
|
1055
1075
|
/**
|
|
1056
|
-
*
|
|
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
|
-
|
|
1078
|
+
index?: boolean;
|
|
1079
|
+
indexing?: {
|
|
1059
1080
|
/**
|
|
1060
|
-
*
|
|
1081
|
+
* Configuration to use for indexing the file, will be stored in the file's metadata for reference.
|
|
1061
1082
|
*/
|
|
1062
|
-
|
|
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
|
-
*
|
|
1208
|
+
* File ID
|
|
1065
1209
|
*/
|
|
1066
|
-
|
|
1210
|
+
id: string;
|
|
1067
1211
|
/**
|
|
1068
|
-
*
|
|
1212
|
+
* The ID of the bot the file belongs to
|
|
1069
1213
|
*/
|
|
1070
|
-
|
|
1214
|
+
botId: string;
|
|
1071
1215
|
/**
|
|
1072
|
-
*
|
|
1216
|
+
* Unique key for the file. Must be unique across the bot (and the integration, when applicable).
|
|
1073
1217
|
*/
|
|
1074
|
-
|
|
1218
|
+
key: string;
|
|
1075
1219
|
/**
|
|
1076
|
-
*
|
|
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
|
-
|
|
1224
|
+
url: string;
|
|
1079
1225
|
/**
|
|
1080
|
-
*
|
|
1226
|
+
* File size in bytes. Non-null if file upload status is "COMPLETE".
|
|
1081
1227
|
*/
|
|
1082
|
-
|
|
1228
|
+
size: number | null;
|
|
1083
1229
|
/**
|
|
1084
|
-
*
|
|
1230
|
+
* MIME type of the file's content
|
|
1085
1231
|
*/
|
|
1086
|
-
|
|
1232
|
+
contentType: string;
|
|
1087
1233
|
/**
|
|
1088
|
-
*
|
|
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
|
-
*
|
|
1240
|
+
* Metadata of the file as an object of key/value pairs. The values can be of any type.
|
|
1113
1241
|
*/
|
|
1114
|
-
|
|
1242
|
+
metadata: {
|
|
1243
|
+
[k: string]: any;
|
|
1244
|
+
};
|
|
1115
1245
|
/**
|
|
1116
|
-
*
|
|
1246
|
+
* File creation timestamp in ISO 8601 format
|
|
1117
1247
|
*/
|
|
1118
|
-
|
|
1248
|
+
createdAt: string;
|
|
1119
1249
|
/**
|
|
1120
|
-
*
|
|
1250
|
+
* File last update timestamp in ISO 8601 format
|
|
1121
1251
|
*/
|
|
1122
|
-
|
|
1252
|
+
updatedAt: string;
|
|
1123
1253
|
/**
|
|
1124
|
-
*
|
|
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
|
*/
|
|
@@ -1979,6 +2269,10 @@ interface UpdateMessageResponse {
|
|
|
1979
2269
|
* Creation date of the [Message](#schema_message) in ISO 8601 format
|
|
1980
2270
|
*/
|
|
1981
2271
|
createdAt: string;
|
|
2272
|
+
/**
|
|
2273
|
+
* Update date of the [Message](#schema_message) in ISO 8601 format
|
|
2274
|
+
*/
|
|
2275
|
+
updatedAt: string;
|
|
1982
2276
|
/**
|
|
1983
2277
|
* Type of the [Message](#schema_message) represents the resource type that the message is related to
|
|
1984
2278
|
*/
|
|
@@ -2034,6 +2328,10 @@ interface ListMessagesResponse {
|
|
|
2034
2328
|
* Creation date of the [Message](#schema_message) in ISO 8601 format
|
|
2035
2329
|
*/
|
|
2036
2330
|
createdAt: string;
|
|
2331
|
+
/**
|
|
2332
|
+
* Update date of the [Message](#schema_message) in ISO 8601 format
|
|
2333
|
+
*/
|
|
2334
|
+
updatedAt: string;
|
|
2037
2335
|
/**
|
|
2038
2336
|
* Type of the [Message](#schema_message) represents the resource type that the message is related to
|
|
2039
2337
|
*/
|
|
@@ -6408,6 +6706,51 @@ type DeployBotVersionInput = DeployBotVersionRequestBody & DeployBotVersionReque
|
|
|
6408
6706
|
interface DeployBotVersionResponse {
|
|
6409
6707
|
}
|
|
6410
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
|
+
|
|
6411
6754
|
interface ListWorkspaceInvoicesRequestHeaders {
|
|
6412
6755
|
}
|
|
6413
6756
|
interface ListWorkspaceInvoicesRequestQuery {
|
|
@@ -6942,15 +7285,7 @@ interface ListWorkspaceMembersRequestBody {
|
|
|
6942
7285
|
}
|
|
6943
7286
|
type ListWorkspaceMembersInput = ListWorkspaceMembersRequestBody & ListWorkspaceMembersRequestHeaders & ListWorkspaceMembersRequestQuery & ListWorkspaceMembersRequestParams;
|
|
6944
7287
|
interface ListWorkspaceMembersResponse {
|
|
6945
|
-
members:
|
|
6946
|
-
id: string;
|
|
6947
|
-
userId?: string;
|
|
6948
|
-
email: string;
|
|
6949
|
-
createdAt: string;
|
|
6950
|
-
role: "viewer" | "billing" | "developer" | "manager" | "administrator" | "owner";
|
|
6951
|
-
profilePicture?: string;
|
|
6952
|
-
displayName?: string;
|
|
6953
|
-
}[];
|
|
7288
|
+
members: UpdateWorkspaceMemberResponse$1[];
|
|
6954
7289
|
meta: {
|
|
6955
7290
|
/**
|
|
6956
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.
|
|
@@ -6958,6 +7293,15 @@ interface ListWorkspaceMembersResponse {
|
|
|
6958
7293
|
nextToken?: string;
|
|
6959
7294
|
};
|
|
6960
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
|
+
}
|
|
6961
7305
|
|
|
6962
7306
|
interface GetWorkspaceMemberRequestHeaders {
|
|
6963
7307
|
}
|
|
@@ -14658,6 +15002,7 @@ interface UpsertTableRowsResponse {
|
|
|
14658
15002
|
|
|
14659
15003
|
type ClientProps$1 = {
|
|
14660
15004
|
toAxiosRequest: typeof toAxiosRequest;
|
|
15005
|
+
toApiError: typeof toApiError;
|
|
14661
15006
|
};
|
|
14662
15007
|
declare class Client$1 {
|
|
14663
15008
|
private axiosInstance;
|
|
@@ -14736,6 +15081,9 @@ declare class Client$1 {
|
|
|
14736
15081
|
readonly getBotVersion: (input: GetBotVersionInput) => Promise<GetBotVersionResponse>;
|
|
14737
15082
|
readonly createBotVersion: (input: CreateBotVersionInput) => Promise<CreateBotVersionResponse>;
|
|
14738
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>;
|
|
14739
15087
|
readonly listWorkspaceInvoices: (input: ListWorkspaceInvoicesInput) => Promise<ListWorkspaceInvoicesResponse>;
|
|
14740
15088
|
readonly getUpcomingInvoice: (input: GetUpcomingInvoiceInput) => Promise<GetUpcomingInvoiceResponse>;
|
|
14741
15089
|
readonly chargeWorkspaceUnpaidInvoices: (input: ChargeWorkspaceUnpaidInvoicesInput) => Promise<ChargeWorkspaceUnpaidInvoicesResponse>;
|
|
@@ -14824,295 +15172,331 @@ declare class Client$1 {
|
|
|
14824
15172
|
readonly updateTableRows: (input: UpdateTableRowsInput) => Promise<UpdateTableRowsResponse>;
|
|
14825
15173
|
readonly upsertTableRows: (input: UpsertTableRowsInput) => Promise<UpsertTableRowsResponse>;
|
|
14826
15174
|
}
|
|
15175
|
+
declare function toApiError(err: unknown): Error;
|
|
14827
15176
|
|
|
14828
|
-
type UploadFileInput = Omit<UpsertFileInput, 'size'> & {
|
|
14829
|
-
content?: ArrayBuffer | Buffer | Blob | Uint8Array | string;
|
|
14830
|
-
url?: string;
|
|
14831
|
-
};
|
|
14832
|
-
type UploadFileOutput = UpsertFileResponse;
|
|
14833
|
-
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 ? {
|
|
14834
|
-
[K in keyof O]: Simplify<O[K]>;
|
|
14835
|
-
} : never : T;
|
|
14836
|
-
type AsyncFunc = (...args: any[]) => Promise<any>;
|
|
14837
15177
|
type IClient = Simplify<Client$1 & {
|
|
14838
15178
|
uploadFile: (input: UploadFileInput) => Promise<UploadFileOutput>;
|
|
14839
15179
|
}>;
|
|
14840
|
-
type
|
|
14841
|
-
[K in keyof IClient as IClient[K] extends AsyncFunc ? K : never]: IClient[K];
|
|
14842
|
-
}>;
|
|
14843
|
-
type ClientInputs = Simplify<{
|
|
14844
|
-
[T in Operation]: Parameters<IClient[T]>[0];
|
|
14845
|
-
}>;
|
|
14846
|
-
type ClientOutputs = Simplify<{
|
|
14847
|
-
[T in Operation]: Awaited<ReturnType<IClient[T]>>;
|
|
14848
|
-
}>;
|
|
14849
|
-
type Headers = Record<string, string | string[]>;
|
|
14850
|
-
type RetryConfig = IAxiosRetryConfig;
|
|
14851
|
-
type ClientProps = {
|
|
15180
|
+
type ClientProps = CommonClientProps & {
|
|
14852
15181
|
integrationId?: string;
|
|
14853
15182
|
workspaceId?: string;
|
|
14854
15183
|
botId?: string;
|
|
14855
15184
|
token?: string;
|
|
14856
|
-
apiUrl?: string;
|
|
14857
|
-
timeout?: number;
|
|
14858
|
-
headers?: Headers;
|
|
14859
|
-
retry?: RetryConfig;
|
|
14860
|
-
};
|
|
14861
|
-
type ClientConfig = {
|
|
14862
|
-
apiUrl: string;
|
|
14863
|
-
headers: Headers;
|
|
14864
|
-
withCredentials: boolean;
|
|
14865
|
-
timeout: number;
|
|
14866
15185
|
};
|
|
14867
|
-
|
|
14868
|
-
|
|
14869
|
-
|
|
14870
|
-
|
|
14871
|
-
|
|
14872
|
-
|
|
14873
|
-
|
|
14874
|
-
|
|
14875
|
-
|
|
14876
|
-
|
|
14877
|
-
|
|
14878
|
-
|
|
14879
|
-
|
|
14880
|
-
|
|
14881
|
-
|
|
14882
|
-
|
|
14883
|
-
|
|
14884
|
-
|
|
14885
|
-
|
|
14886
|
-
|
|
14887
|
-
|
|
14888
|
-
|
|
14889
|
-
|
|
14890
|
-
|
|
14891
|
-
}
|
|
14892
|
-
|
|
14893
|
-
|
|
14894
|
-
|
|
14895
|
-
|
|
14896
|
-
|
|
14897
|
-
|
|
14898
|
-
|
|
14899
|
-
|
|
14900
|
-
|
|
14901
|
-
|
|
14902
|
-
|
|
14903
|
-
|
|
14904
|
-
|
|
14905
|
-
|
|
14906
|
-
|
|
14907
|
-
|
|
14908
|
-
|
|
14909
|
-
|
|
14910
|
-
|
|
14911
|
-
|
|
14912
|
-
|
|
14913
|
-
|
|
14914
|
-
|
|
14915
|
-
|
|
14916
|
-
|
|
14917
|
-
|
|
14918
|
-
|
|
14919
|
-
|
|
14920
|
-
|
|
14921
|
-
|
|
14922
|
-
|
|
14923
|
-
|
|
14924
|
-
|
|
14925
|
-
|
|
14926
|
-
|
|
14927
|
-
|
|
14928
|
-
|
|
14929
|
-
|
|
14930
|
-
|
|
14931
|
-
|
|
14932
|
-
|
|
14933
|
-
|
|
14934
|
-
|
|
14935
|
-
|
|
14936
|
-
|
|
14937
|
-
|
|
14938
|
-
|
|
14939
|
-
|
|
14940
|
-
|
|
14941
|
-
|
|
14942
|
-
}
|
|
14943
|
-
|
|
14944
|
-
|
|
14945
|
-
|
|
14946
|
-
|
|
14947
|
-
|
|
14948
|
-
|
|
14949
|
-
|
|
14950
|
-
|
|
14951
|
-
|
|
14952
|
-
|
|
14953
|
-
|
|
14954
|
-
|
|
14955
|
-
|
|
14956
|
-
|
|
14957
|
-
|
|
14958
|
-
|
|
14959
|
-
|
|
14960
|
-
|
|
14961
|
-
|
|
14962
|
-
|
|
14963
|
-
|
|
14964
|
-
|
|
14965
|
-
|
|
14966
|
-
|
|
14967
|
-
|
|
14968
|
-
|
|
14969
|
-
|
|
14970
|
-
|
|
14971
|
-
|
|
14972
|
-
|
|
14973
|
-
|
|
14974
|
-
|
|
14975
|
-
|
|
14976
|
-
|
|
14977
|
-
|
|
14978
|
-
|
|
14979
|
-
|
|
14980
|
-
|
|
14981
|
-
|
|
14982
|
-
|
|
14983
|
-
|
|
14984
|
-
|
|
14985
|
-
|
|
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<{
|
|
14986
15310
|
id: string;
|
|
14987
|
-
handle: string | null;
|
|
14988
15311
|
name: string;
|
|
14989
|
-
|
|
14990
|
-
|
|
14991
|
-
|
|
14992
|
-
|
|
14993
|
-
|
|
14994
|
-
|
|
14995
|
-
|
|
14996
|
-
|
|
14997
|
-
|
|
14998
|
-
|
|
14999
|
-
|
|
15000
|
-
|
|
15001
|
-
tags: {
|
|
15002
|
-
[k: string]: string;
|
|
15003
|
-
};
|
|
15004
|
-
}>;
|
|
15005
|
-
readonly botIssues: (props: ListInputs["listBotIssues"]) => AsyncCollection<{
|
|
15006
|
-
id: string;
|
|
15007
|
-
code: string;
|
|
15008
|
-
createdAt: string;
|
|
15009
|
-
lastSeenAt: string;
|
|
15010
|
-
title: string;
|
|
15011
|
-
description: string;
|
|
15012
|
-
groupedData: {
|
|
15013
|
-
[k: string]: {
|
|
15014
|
-
raw: string;
|
|
15015
|
-
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;
|
|
15016
15324
|
};
|
|
15017
|
-
|
|
15018
|
-
|
|
15019
|
-
|
|
15020
|
-
|
|
15021
|
-
|
|
15022
|
-
|
|
15023
|
-
|
|
15024
|
-
|
|
15025
|
-
|
|
15026
|
-
|
|
15027
|
-
|
|
15028
|
-
|
|
15029
|
-
|
|
15030
|
-
profilePicture?: string;
|
|
15031
|
-
displayName?: string;
|
|
15032
|
-
}>;
|
|
15033
|
-
readonly integrations: (props: ListInputs["listIntegrations"]) => AsyncCollection<{
|
|
15034
|
-
id: string;
|
|
15035
|
-
name: string;
|
|
15036
|
-
version: string;
|
|
15037
|
-
createdAt: string;
|
|
15038
|
-
updatedAt: string;
|
|
15039
|
-
title: string;
|
|
15040
|
-
description: string;
|
|
15041
|
-
iconUrl: string;
|
|
15042
|
-
public: boolean;
|
|
15043
|
-
verificationStatus: "unapproved" | "pending" | "approved" | "rejected";
|
|
15044
|
-
matchedOn?: {
|
|
15045
|
-
name?: boolean;
|
|
15046
|
-
title?: boolean;
|
|
15047
|
-
description?: boolean;
|
|
15048
|
-
actions?: string[];
|
|
15049
|
-
interfaces?: string[];
|
|
15050
|
-
};
|
|
15051
|
-
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<{
|
|
15052
15338
|
id: string;
|
|
15053
|
-
|
|
15339
|
+
createdAt: string;
|
|
15340
|
+
updatedAt: string;
|
|
15054
15341
|
name: string;
|
|
15055
|
-
|
|
15056
|
-
|
|
15057
|
-
|
|
15058
|
-
|
|
15059
|
-
|
|
15060
|
-
|
|
15061
|
-
|
|
15062
|
-
|
|
15063
|
-
|
|
15064
|
-
|
|
15065
|
-
|
|
15066
|
-
|
|
15067
|
-
|
|
15068
|
-
|
|
15069
|
-
|
|
15070
|
-
|
|
15071
|
-
|
|
15072
|
-
|
|
15073
|
-
|
|
15074
|
-
|
|
15075
|
-
|
|
15076
|
-
|
|
15077
|
-
|
|
15078
|
-
|
|
15079
|
-
|
|
15080
|
-
|
|
15081
|
-
|
|
15082
|
-
|
|
15083
|
-
|
|
15084
|
-
|
|
15085
|
-
|
|
15086
|
-
}
|
|
15087
|
-
|
|
15088
|
-
|
|
15089
|
-
|
|
15090
|
-
|
|
15091
|
-
|
|
15092
|
-
|
|
15093
|
-
|
|
15094
|
-
|
|
15095
|
-
|
|
15096
|
-
|
|
15097
|
-
|
|
15098
|
-
|
|
15099
|
-
|
|
15100
|
-
|
|
15101
|
-
|
|
15102
|
-
|
|
15103
|
-
|
|
15104
|
-
|
|
15105
|
-
|
|
15106
|
-
|
|
15107
|
-
|
|
15108
|
-
|
|
15109
|
-
|
|
15110
|
-
|
|
15111
|
-
|
|
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
|
+
usageActivity: (props: {
|
|
15474
|
+
type: "invocation_timeout" | "invocation_calls" | "storage_count" | "bot_count" | "knowledgebase_vector_storage" | "workspace_ratelimit" | "table_row_count" | "workspace_member_count" | "integrations_owned_count" | "ai_spend" | "openai_spend" | "bing_search_spend" | "always_alive";
|
|
15475
|
+
id: string;
|
|
15476
|
+
timestampFrom?: string | undefined;
|
|
15477
|
+
timestampUntil?: string | undefined;
|
|
15478
|
+
}) => AsyncCollection<{
|
|
15479
|
+
timestamp: string;
|
|
15480
|
+
value: number;
|
|
15481
|
+
period: string;
|
|
15482
|
+
metadata: {
|
|
15483
|
+
[k: string]: any | null;
|
|
15484
|
+
};
|
|
15485
|
+
}>;
|
|
15486
|
+
usageActivityDaily: (props: {
|
|
15487
|
+
type: "invocation_timeout" | "invocation_calls" | "storage_count" | "bot_count" | "knowledgebase_vector_storage" | "workspace_ratelimit" | "table_row_count" | "workspace_member_count" | "integrations_owned_count" | "ai_spend" | "openai_spend" | "bing_search_spend" | "always_alive";
|
|
15488
|
+
id: string;
|
|
15489
|
+
dateFrom?: string | undefined;
|
|
15490
|
+
dateUntil?: string | undefined;
|
|
15491
|
+
}) => AsyncCollection<{
|
|
15492
|
+
date: string;
|
|
15493
|
+
value: number;
|
|
15494
|
+
}>;
|
|
15495
|
+
};
|
|
15112
15496
|
/**
|
|
15113
15497
|
* Create/update and upload a file in a single step. Returns an object containing the file metadata and the URL to retrieve the file.
|
|
15114
15498
|
*/
|
|
15115
|
-
readonly uploadFile: (
|
|
15499
|
+
readonly uploadFile: (input: UploadFileInput) => Promise<UploadFileOutput>;
|
|
15116
15500
|
}
|
|
15117
15501
|
|
|
15118
15502
|
// TypeScript Version: 4.7
|