@botpress/api 0.27.0 → 0.27.2
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 +106 -57
- package/dist/src/gen/state.d.ts +68 -36
- package/package.json +1 -1
- package/src/gen/metadata.json +1 -1
- package/src/gen/openapi.json +1 -1
- package/src/gen/state.ts +106 -57
package/src/gen/state.ts
CHANGED
|
@@ -8070,7 +8070,7 @@ export const state = {
|
|
|
8070
8070
|
"contentType": "application/json",
|
|
8071
8071
|
"section": "files",
|
|
8072
8072
|
"response": {
|
|
8073
|
-
"description": "The file
|
|
8073
|
+
"description": "The created file",
|
|
8074
8074
|
"schema": {
|
|
8075
8075
|
"type": "object",
|
|
8076
8076
|
"properties": {
|
|
@@ -8335,10 +8335,10 @@ export const state = {
|
|
|
8335
8335
|
}
|
|
8336
8336
|
}
|
|
8337
8337
|
},
|
|
8338
|
-
"
|
|
8339
|
-
"name": "
|
|
8340
|
-
"path": "/v1/files/{id}
|
|
8341
|
-
"description": "Get file
|
|
8338
|
+
"getFile": {
|
|
8339
|
+
"name": "getFile",
|
|
8340
|
+
"path": "/v1/files/{id}",
|
|
8341
|
+
"description": "Get file",
|
|
8342
8342
|
"method": "get",
|
|
8343
8343
|
"section": "files",
|
|
8344
8344
|
"parameters": {
|
|
@@ -8349,7 +8349,7 @@ export const state = {
|
|
|
8349
8349
|
}
|
|
8350
8350
|
},
|
|
8351
8351
|
"response": {
|
|
8352
|
-
"description": "
|
|
8352
|
+
"description": "An object containing the file metadata and URL",
|
|
8353
8353
|
"schema": {
|
|
8354
8354
|
"type": "object",
|
|
8355
8355
|
"properties": {
|
|
@@ -8436,51 +8436,26 @@ export const state = {
|
|
|
8436
8436
|
"status"
|
|
8437
8437
|
],
|
|
8438
8438
|
"additionalProperties": false
|
|
8439
|
-
}
|
|
8440
|
-
},
|
|
8441
|
-
"required": [
|
|
8442
|
-
"file"
|
|
8443
|
-
],
|
|
8444
|
-
"title": "getFileMetadataResponse",
|
|
8445
|
-
"additionalProperties": false
|
|
8446
|
-
}
|
|
8447
|
-
}
|
|
8448
|
-
},
|
|
8449
|
-
"getFileContent": {
|
|
8450
|
-
"name": "getFileContent",
|
|
8451
|
-
"path": "/v1/files/{id}/content",
|
|
8452
|
-
"description": "Returns a presigned URL to download the file content.",
|
|
8453
|
-
"method": "get",
|
|
8454
|
-
"section": "files",
|
|
8455
|
-
"parameters": {
|
|
8456
|
-
"id": {
|
|
8457
|
-
"type": "string",
|
|
8458
|
-
"description": "File ID",
|
|
8459
|
-
"in": "path"
|
|
8460
|
-
}
|
|
8461
|
-
},
|
|
8462
|
-
"response": {
|
|
8463
|
-
"description": "Returns a temporary pre-signed URL to download the file content.",
|
|
8464
|
-
"schema": {
|
|
8465
|
-
"type": "object",
|
|
8466
|
-
"properties": {
|
|
8439
|
+
},
|
|
8467
8440
|
"url": {
|
|
8468
8441
|
"type": "string",
|
|
8469
|
-
"description": "
|
|
8442
|
+
"description": "If the file is not uploaded yet, this will be set to a `null` value.\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.",
|
|
8443
|
+
"nullable": true
|
|
8470
8444
|
}
|
|
8471
8445
|
},
|
|
8472
8446
|
"required": [
|
|
8447
|
+
"file",
|
|
8473
8448
|
"url"
|
|
8474
8449
|
],
|
|
8475
|
-
"title": "
|
|
8450
|
+
"title": "getFileResponse",
|
|
8476
8451
|
"additionalProperties": false
|
|
8477
8452
|
}
|
|
8478
8453
|
}
|
|
8479
8454
|
},
|
|
8480
|
-
"
|
|
8481
|
-
"name": "
|
|
8482
|
-
"path": "/v1/files/{id}
|
|
8483
|
-
"description": "Update file
|
|
8455
|
+
"updateFile": {
|
|
8456
|
+
"name": "updateFile",
|
|
8457
|
+
"path": "/v1/files/{id}",
|
|
8458
|
+
"description": "Update file",
|
|
8484
8459
|
"method": "put",
|
|
8485
8460
|
"section": "files",
|
|
8486
8461
|
"parameters": {
|
|
@@ -8508,28 +8483,104 @@ export const state = {
|
|
|
8508
8483
|
"required": [
|
|
8509
8484
|
"tags"
|
|
8510
8485
|
],
|
|
8511
|
-
"title": "
|
|
8486
|
+
"title": "updateFileBody",
|
|
8512
8487
|
"additionalProperties": false
|
|
8513
8488
|
}
|
|
8514
8489
|
},
|
|
8515
8490
|
"response": {
|
|
8516
|
-
"description": "An object containing the updated metadata
|
|
8491
|
+
"description": "An object containing the updated file metadata.",
|
|
8517
8492
|
"schema": {
|
|
8518
8493
|
"type": "object",
|
|
8519
8494
|
"properties": {
|
|
8520
|
-
"
|
|
8495
|
+
"file": {
|
|
8521
8496
|
"type": "object",
|
|
8522
|
-
"
|
|
8523
|
-
"
|
|
8524
|
-
|
|
8497
|
+
"properties": {
|
|
8498
|
+
"id": {
|
|
8499
|
+
"type": "string",
|
|
8500
|
+
"description": "File ID"
|
|
8501
|
+
},
|
|
8502
|
+
"botId": {
|
|
8503
|
+
"type": "string",
|
|
8504
|
+
"description": "The ID of the bot the file belongs to"
|
|
8505
|
+
},
|
|
8506
|
+
"name": {
|
|
8507
|
+
"type": "string",
|
|
8508
|
+
"description": "File name",
|
|
8509
|
+
"nullable": true
|
|
8510
|
+
},
|
|
8511
|
+
"size": {
|
|
8512
|
+
"type": "number",
|
|
8513
|
+
"description": "File size in bytes. Non-null if file upload status is \"COMPLETE\".",
|
|
8514
|
+
"nullable": true
|
|
8515
|
+
},
|
|
8516
|
+
"contentType": {
|
|
8517
|
+
"type": "string",
|
|
8518
|
+
"description": "MIME type of the file's content"
|
|
8519
|
+
},
|
|
8520
|
+
"tags": {
|
|
8521
|
+
"type": "object",
|
|
8522
|
+
"additionalProperties": {
|
|
8523
|
+
"type": "string",
|
|
8524
|
+
"maxLength": 1000
|
|
8525
|
+
},
|
|
8526
|
+
"description": "The tags of the file as an object of key/value pairs"
|
|
8527
|
+
},
|
|
8528
|
+
"createdAt": {
|
|
8529
|
+
"type": "string",
|
|
8530
|
+
"description": "File creation timestamp in ISO 8601 format"
|
|
8531
|
+
},
|
|
8532
|
+
"updatedAt": {
|
|
8533
|
+
"type": "string",
|
|
8534
|
+
"description": "File last update timestamp in ISO 8601 format"
|
|
8535
|
+
},
|
|
8536
|
+
"accessPolicies": {
|
|
8537
|
+
"type": "array",
|
|
8538
|
+
"items": {
|
|
8539
|
+
"type": "string"
|
|
8540
|
+
},
|
|
8541
|
+
"description": "Access policies configured for the file."
|
|
8542
|
+
},
|
|
8543
|
+
"index": {
|
|
8544
|
+
"type": "boolean",
|
|
8545
|
+
"description": "Whether the file was requested to be indexed for search or not."
|
|
8546
|
+
},
|
|
8547
|
+
"status": {
|
|
8548
|
+
"type": "string",
|
|
8549
|
+
"enum": [
|
|
8550
|
+
"UPLOAD_PENDING",
|
|
8551
|
+
"UPLOAD_FAILED",
|
|
8552
|
+
"UPLOAD_COMPLETED",
|
|
8553
|
+
"INDEXING_PENDING",
|
|
8554
|
+
"INDEXING_FAILED",
|
|
8555
|
+
"INDEXING_COMPLETED"
|
|
8556
|
+
],
|
|
8557
|
+
"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."
|
|
8558
|
+
},
|
|
8559
|
+
"failedStatusReason": {
|
|
8560
|
+
"type": "string",
|
|
8561
|
+
"description": "If the file status is \"UPLOAD_FAILED\" or \"INDEXING_FAILED\" this will contain the reason of the failure."
|
|
8562
|
+
}
|
|
8525
8563
|
},
|
|
8526
|
-
"
|
|
8564
|
+
"required": [
|
|
8565
|
+
"id",
|
|
8566
|
+
"botId",
|
|
8567
|
+
"name",
|
|
8568
|
+
"size",
|
|
8569
|
+
"contentType",
|
|
8570
|
+
"tags",
|
|
8571
|
+
"createdAt",
|
|
8572
|
+
"updatedAt",
|
|
8573
|
+
"accessPolicies",
|
|
8574
|
+
"index",
|
|
8575
|
+
"status"
|
|
8576
|
+
],
|
|
8577
|
+
"additionalProperties": false
|
|
8527
8578
|
}
|
|
8528
8579
|
},
|
|
8529
8580
|
"required": [
|
|
8530
|
-
"
|
|
8581
|
+
"file"
|
|
8531
8582
|
],
|
|
8532
|
-
"title": "
|
|
8583
|
+
"title": "updateFileResponse",
|
|
8533
8584
|
"additionalProperties": false
|
|
8534
8585
|
}
|
|
8535
8586
|
}
|
|
@@ -9506,7 +9557,7 @@ export const state = {
|
|
|
9506
9557
|
"title": "Botpress API",
|
|
9507
9558
|
"description": "API for Botpress Cloud",
|
|
9508
9559
|
"server": "https://api.botpress.cloud",
|
|
9509
|
-
"version": "0.27.
|
|
9560
|
+
"version": "0.27.2",
|
|
9510
9561
|
"prefix": "v1"
|
|
9511
9562
|
},
|
|
9512
9563
|
"errors": [
|
|
@@ -9668,7 +9719,7 @@ export const state = {
|
|
|
9668
9719
|
"changeAISpendQuotaBody": true,
|
|
9669
9720
|
"introspectBody": true,
|
|
9670
9721
|
"createFileBody": true,
|
|
9671
|
-
"
|
|
9722
|
+
"updateFileBody": true,
|
|
9672
9723
|
"getOrCreateTableBody": true,
|
|
9673
9724
|
"createTableBody": true,
|
|
9674
9725
|
"duplicateTableBody": true,
|
|
@@ -9780,9 +9831,8 @@ export const state = {
|
|
|
9780
9831
|
"createFileResponse": true,
|
|
9781
9832
|
"deleteFileResponse": true,
|
|
9782
9833
|
"listFilesResponse": true,
|
|
9783
|
-
"
|
|
9784
|
-
"
|
|
9785
|
-
"updateFileMetadataResponse": true,
|
|
9834
|
+
"getFileResponse": true,
|
|
9835
|
+
"updateFileResponse": true,
|
|
9786
9836
|
"searchFilesResponse": true,
|
|
9787
9837
|
"listTablesResponse": true,
|
|
9788
9838
|
"getTableResponse": true,
|
|
@@ -12167,9 +12217,8 @@ export const state = {
|
|
|
12167
12217
|
"createFile",
|
|
12168
12218
|
"deleteFile",
|
|
12169
12219
|
"listFiles",
|
|
12170
|
-
"
|
|
12171
|
-
"
|
|
12172
|
-
"updateFileMetadata",
|
|
12220
|
+
"getFile",
|
|
12221
|
+
"updateFile",
|
|
12173
12222
|
"searchFiles"
|
|
12174
12223
|
],
|
|
12175
12224
|
"schema": "File"
|