@botpress/api 0.63.2 → 0.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +158 -1
- package/dist/src/gen/state.d.ts +130 -0
- package/package.json +1 -1
- package/src/gen/metadata.json +1 -1
- package/src/gen/openapi.json +1 -1
- package/src/gen/state.ts +158 -1
package/src/gen/state.ts
CHANGED
|
@@ -12264,6 +12264,160 @@ export const state = {
|
|
|
12264
12264
|
}
|
|
12265
12265
|
}
|
|
12266
12266
|
},
|
|
12267
|
+
"copyFile": {
|
|
12268
|
+
"name": "copyFile",
|
|
12269
|
+
"path": "/v1/files/{idOrKey}/{destinationKey}",
|
|
12270
|
+
"description": "Copy file",
|
|
12271
|
+
"method": "post",
|
|
12272
|
+
"section": "files",
|
|
12273
|
+
"parameters": {
|
|
12274
|
+
"idOrKey": {
|
|
12275
|
+
"type": "string",
|
|
12276
|
+
"description": "File ID or Key",
|
|
12277
|
+
"in": "path"
|
|
12278
|
+
},
|
|
12279
|
+
"destinationKey": {
|
|
12280
|
+
"in": "path",
|
|
12281
|
+
"type": "string",
|
|
12282
|
+
"description": "The new key of the file. The file key must not be in use already in the destination bot."
|
|
12283
|
+
},
|
|
12284
|
+
"x-destination-bot-id": {
|
|
12285
|
+
"in": "header",
|
|
12286
|
+
"type": "string",
|
|
12287
|
+
"description": "The bot ID to copy the file to. You must have permission to create files in the destination bot. If the destination bot ID is omitted, the file will be copied to the same bot the source file belongs to."
|
|
12288
|
+
}
|
|
12289
|
+
},
|
|
12290
|
+
"requestBody": {
|
|
12291
|
+
"description": "An object containing the destination bot ID and file key",
|
|
12292
|
+
"schema": {
|
|
12293
|
+
"type": "object",
|
|
12294
|
+
"properties": {
|
|
12295
|
+
"i": {
|
|
12296
|
+
"type": "boolean"
|
|
12297
|
+
}
|
|
12298
|
+
},
|
|
12299
|
+
"title": "copyFileBody",
|
|
12300
|
+
"additionalProperties": false
|
|
12301
|
+
}
|
|
12302
|
+
},
|
|
12303
|
+
"response": {
|
|
12304
|
+
"description": "An object containing the file metadata and URL",
|
|
12305
|
+
"schema": {
|
|
12306
|
+
"type": "object",
|
|
12307
|
+
"properties": {
|
|
12308
|
+
"file": {
|
|
12309
|
+
"type": "object",
|
|
12310
|
+
"properties": {
|
|
12311
|
+
"id": {
|
|
12312
|
+
"type": "string",
|
|
12313
|
+
"description": "File ID"
|
|
12314
|
+
},
|
|
12315
|
+
"botId": {
|
|
12316
|
+
"type": "string",
|
|
12317
|
+
"description": "The ID of the bot the file belongs to"
|
|
12318
|
+
},
|
|
12319
|
+
"key": {
|
|
12320
|
+
"type": "string",
|
|
12321
|
+
"description": "Unique key for the file. Must be unique across the bot (and the integration, when applicable)."
|
|
12322
|
+
},
|
|
12323
|
+
"url": {
|
|
12324
|
+
"type": "string",
|
|
12325
|
+
"description": "URL to retrieve the file content. This URL will be ready to use once the file is uploaded.\n\nIf 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."
|
|
12326
|
+
},
|
|
12327
|
+
"size": {
|
|
12328
|
+
"type": "number",
|
|
12329
|
+
"description": "File size in bytes. Non-null if file upload status is \"COMPLETE\".",
|
|
12330
|
+
"nullable": true
|
|
12331
|
+
},
|
|
12332
|
+
"contentType": {
|
|
12333
|
+
"type": "string",
|
|
12334
|
+
"description": "MIME type of the file's content"
|
|
12335
|
+
},
|
|
12336
|
+
"tags": {
|
|
12337
|
+
"type": "object",
|
|
12338
|
+
"additionalProperties": {
|
|
12339
|
+
"type": "string",
|
|
12340
|
+
"maxLength": 1000
|
|
12341
|
+
},
|
|
12342
|
+
"description": "The tags of the file as an object of key/value pairs"
|
|
12343
|
+
},
|
|
12344
|
+
"metadata": {
|
|
12345
|
+
"type": "object",
|
|
12346
|
+
"additionalProperties": {
|
|
12347
|
+
"nullable": true
|
|
12348
|
+
},
|
|
12349
|
+
"description": "Metadata of the file as an object of key/value pairs. The values can be of any type."
|
|
12350
|
+
},
|
|
12351
|
+
"createdAt": {
|
|
12352
|
+
"type": "string",
|
|
12353
|
+
"description": "File creation timestamp in ISO 8601 format"
|
|
12354
|
+
},
|
|
12355
|
+
"updatedAt": {
|
|
12356
|
+
"type": "string",
|
|
12357
|
+
"description": "File last update timestamp in ISO 8601 format"
|
|
12358
|
+
},
|
|
12359
|
+
"accessPolicies": {
|
|
12360
|
+
"type": "array",
|
|
12361
|
+
"items": {
|
|
12362
|
+
"type": "string",
|
|
12363
|
+
"enum": [
|
|
12364
|
+
"integrations",
|
|
12365
|
+
"public_content"
|
|
12366
|
+
]
|
|
12367
|
+
},
|
|
12368
|
+
"description": "Access policies configured for the file."
|
|
12369
|
+
},
|
|
12370
|
+
"index": {
|
|
12371
|
+
"type": "boolean",
|
|
12372
|
+
"description": "Whether the file was requested to be indexed for search or not."
|
|
12373
|
+
},
|
|
12374
|
+
"status": {
|
|
12375
|
+
"type": "string",
|
|
12376
|
+
"enum": [
|
|
12377
|
+
"upload_pending",
|
|
12378
|
+
"upload_failed",
|
|
12379
|
+
"upload_completed",
|
|
12380
|
+
"indexing_pending",
|
|
12381
|
+
"indexing_failed",
|
|
12382
|
+
"indexing_completed"
|
|
12383
|
+
],
|
|
12384
|
+
"description": "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.\n\nIf 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.\n\nHowever, 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).\n\nOnce 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."
|
|
12385
|
+
},
|
|
12386
|
+
"failedStatusReason": {
|
|
12387
|
+
"type": "string",
|
|
12388
|
+
"description": "If the file status is `upload_failed` or `indexing_failed` this will contain the reason of the failure."
|
|
12389
|
+
},
|
|
12390
|
+
"expiresAt": {
|
|
12391
|
+
"type": "string",
|
|
12392
|
+
"description": "File expiry timestamp in ISO 8601 format"
|
|
12393
|
+
}
|
|
12394
|
+
},
|
|
12395
|
+
"required": [
|
|
12396
|
+
"id",
|
|
12397
|
+
"botId",
|
|
12398
|
+
"key",
|
|
12399
|
+
"url",
|
|
12400
|
+
"size",
|
|
12401
|
+
"contentType",
|
|
12402
|
+
"tags",
|
|
12403
|
+
"metadata",
|
|
12404
|
+
"createdAt",
|
|
12405
|
+
"updatedAt",
|
|
12406
|
+
"accessPolicies",
|
|
12407
|
+
"index",
|
|
12408
|
+
"status"
|
|
12409
|
+
],
|
|
12410
|
+
"additionalProperties": false
|
|
12411
|
+
}
|
|
12412
|
+
},
|
|
12413
|
+
"required": [
|
|
12414
|
+
"file"
|
|
12415
|
+
],
|
|
12416
|
+
"title": "copyFileResponse",
|
|
12417
|
+
"additionalProperties": false
|
|
12418
|
+
}
|
|
12419
|
+
}
|
|
12420
|
+
},
|
|
12267
12421
|
"searchFiles": {
|
|
12268
12422
|
"name": "searchFiles",
|
|
12269
12423
|
"path": "/v1/files/search",
|
|
@@ -13747,7 +13901,7 @@ export const state = {
|
|
|
13747
13901
|
"title": "Botpress API",
|
|
13748
13902
|
"description": "API for Botpress Cloud",
|
|
13749
13903
|
"server": "https://api.botpress.cloud",
|
|
13750
|
-
"version": "0.
|
|
13904
|
+
"version": "0.64.0",
|
|
13751
13905
|
"prefix": "v1"
|
|
13752
13906
|
},
|
|
13753
13907
|
"errors": [
|
|
@@ -13925,6 +14079,7 @@ export const state = {
|
|
|
13925
14079
|
"introspectBody": true,
|
|
13926
14080
|
"upsertFileBody": true,
|
|
13927
14081
|
"updateFileMetadataBody": true,
|
|
14082
|
+
"copyFileBody": true,
|
|
13928
14083
|
"getOrCreateTableBody": true,
|
|
13929
14084
|
"createTableBody": true,
|
|
13930
14085
|
"duplicateTableBody": true,
|
|
@@ -14069,6 +14224,7 @@ export const state = {
|
|
|
14069
14224
|
"listFilesResponse": true,
|
|
14070
14225
|
"getFileResponse": true,
|
|
14071
14226
|
"updateFileMetadataResponse": true,
|
|
14227
|
+
"copyFileResponse": true,
|
|
14072
14228
|
"searchFilesResponse": true,
|
|
14073
14229
|
"listFilePassagesResponse": true,
|
|
14074
14230
|
"listTablesResponse": true,
|
|
@@ -17581,6 +17737,7 @@ export const state = {
|
|
|
17581
17737
|
"listFiles",
|
|
17582
17738
|
"getFile",
|
|
17583
17739
|
"updateFileMetadata",
|
|
17740
|
+
"copyFile",
|
|
17584
17741
|
"searchFiles",
|
|
17585
17742
|
"listFilePassages"
|
|
17586
17743
|
],
|