@botpress/api 0.53.0 → 0.54.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 CHANGED
@@ -294210,6 +294210,316 @@ var state = {
294210
294210
  }
294211
294211
  }
294212
294212
  },
294213
+ "exportTable": {
294214
+ "name": "exportTable",
294215
+ "path": "/v1/tables/{table}/export",
294216
+ "description": "Starts an export job for the table",
294217
+ "parameters": {
294218
+ "table": {
294219
+ "type": "string",
294220
+ "description": "The table's unique identifier",
294221
+ "in": "path"
294222
+ },
294223
+ "format": {
294224
+ "in": "query",
294225
+ "type": "object",
294226
+ "description": "The format of the exported file. CSV includes only the data while JSON includes the schema.",
294227
+ "schema": {
294228
+ "type": "string",
294229
+ "enum": [
294230
+ "csv",
294231
+ "json"
294232
+ ]
294233
+ }
294234
+ },
294235
+ "compress": {
294236
+ "in": "query",
294237
+ "type": "object",
294238
+ "description": "Whether or not the export is compressed (gzipped).",
294239
+ "schema": {
294240
+ "default": true,
294241
+ "type": "boolean"
294242
+ }
294243
+ }
294244
+ },
294245
+ "method": "get",
294246
+ "section": "tables",
294247
+ "response": {
294248
+ "description": "The export job",
294249
+ "schema": {
294250
+ "type": "object",
294251
+ "properties": {
294252
+ "job": {
294253
+ "type": "object",
294254
+ "properties": {
294255
+ "id": {
294256
+ "type": "string"
294257
+ },
294258
+ "botId": {
294259
+ "type": "string"
294260
+ },
294261
+ "tableId": {
294262
+ "type": "string"
294263
+ },
294264
+ "type": {
294265
+ "type": "string",
294266
+ "enum": [
294267
+ "export",
294268
+ "import"
294269
+ ]
294270
+ },
294271
+ "status": {
294272
+ "type": "string",
294273
+ "enum": [
294274
+ "pending",
294275
+ "in_progress",
294276
+ "finalizing",
294277
+ "completed",
294278
+ "failed"
294279
+ ]
294280
+ },
294281
+ "progress": {
294282
+ "default": 0,
294283
+ "type": "number"
294284
+ },
294285
+ "inputFileId": {
294286
+ "type": "string",
294287
+ "nullable": true
294288
+ },
294289
+ "outputFileId": {
294290
+ "type": "string",
294291
+ "nullable": true
294292
+ },
294293
+ "createdAt": {
294294
+ "type": "string",
294295
+ "format": "date-time"
294296
+ },
294297
+ "updatedAt": {
294298
+ "type": "string",
294299
+ "format": "date-time"
294300
+ }
294301
+ },
294302
+ "required": [
294303
+ "id",
294304
+ "botId",
294305
+ "tableId",
294306
+ "type",
294307
+ "status",
294308
+ "inputFileId",
294309
+ "outputFileId",
294310
+ "createdAt",
294311
+ "updatedAt"
294312
+ ],
294313
+ "additionalProperties": false
294314
+ }
294315
+ },
294316
+ "required": [
294317
+ "job"
294318
+ ],
294319
+ "title": "exportTableResponse",
294320
+ "additionalProperties": false
294321
+ }
294322
+ }
294323
+ },
294324
+ "getTableJobs": {
294325
+ "name": "getTableJobs",
294326
+ "path": "/v1/tables/{table}/jobs",
294327
+ "description": "Returns a list of recent jobs for the table (export/import operations)",
294328
+ "parameters": {
294329
+ "table": {
294330
+ "type": "string",
294331
+ "description": "The table's unique identifier",
294332
+ "in": "path"
294333
+ }
294334
+ },
294335
+ "method": "get",
294336
+ "section": "tables",
294337
+ "response": {
294338
+ "description": "The most recent jobs",
294339
+ "schema": {
294340
+ "type": "object",
294341
+ "properties": {
294342
+ "jobs": {
294343
+ "type": "array",
294344
+ "items": {
294345
+ "type": "object",
294346
+ "properties": {
294347
+ "id": {
294348
+ "type": "string"
294349
+ },
294350
+ "botId": {
294351
+ "type": "string"
294352
+ },
294353
+ "tableId": {
294354
+ "type": "string"
294355
+ },
294356
+ "type": {
294357
+ "type": "string",
294358
+ "enum": [
294359
+ "export",
294360
+ "import"
294361
+ ]
294362
+ },
294363
+ "status": {
294364
+ "type": "string",
294365
+ "enum": [
294366
+ "pending",
294367
+ "in_progress",
294368
+ "finalizing",
294369
+ "completed",
294370
+ "failed"
294371
+ ]
294372
+ },
294373
+ "progress": {
294374
+ "default": 0,
294375
+ "type": "number"
294376
+ },
294377
+ "inputFileId": {
294378
+ "type": "string",
294379
+ "nullable": true
294380
+ },
294381
+ "outputFileId": {
294382
+ "type": "string",
294383
+ "nullable": true
294384
+ },
294385
+ "createdAt": {
294386
+ "type": "string",
294387
+ "format": "date-time"
294388
+ },
294389
+ "updatedAt": {
294390
+ "type": "string",
294391
+ "format": "date-time"
294392
+ }
294393
+ },
294394
+ "required": [
294395
+ "id",
294396
+ "botId",
294397
+ "tableId",
294398
+ "type",
294399
+ "status",
294400
+ "inputFileId",
294401
+ "outputFileId",
294402
+ "createdAt",
294403
+ "updatedAt"
294404
+ ]
294405
+ }
294406
+ }
294407
+ },
294408
+ "required": [
294409
+ "jobs"
294410
+ ],
294411
+ "title": "getTableJobsResponse",
294412
+ "additionalProperties": false
294413
+ }
294414
+ }
294415
+ },
294416
+ "importTable": {
294417
+ "name": "importTable",
294418
+ "path": "/v1/tables/{table}/import",
294419
+ "description": "Import the content of a file into a table. The table must already have been created with the correct schema. Data already in the table will be kept.",
294420
+ "method": "post",
294421
+ "parameters": {
294422
+ "table": {
294423
+ "type": "string",
294424
+ "description": "The table's name or unique identifier for targeting specific table operations.",
294425
+ "in": "path"
294426
+ }
294427
+ },
294428
+ "requestBody": {
294429
+ "description": "Content to import",
294430
+ "schema": {
294431
+ "type": "object",
294432
+ "properties": {
294433
+ "fileId": {
294434
+ "type": "string",
294435
+ "description": "The file ID to import. It must have been uploaded to the Files API before. Supported formats: CSV, JSON (gzipped or not)"
294436
+ }
294437
+ },
294438
+ "required": [
294439
+ "fileId"
294440
+ ],
294441
+ "title": "importTableBody",
294442
+ "additionalProperties": false
294443
+ }
294444
+ },
294445
+ "section": "tables",
294446
+ "response": {
294447
+ "description": "The import job",
294448
+ "schema": {
294449
+ "type": "object",
294450
+ "properties": {
294451
+ "job": {
294452
+ "type": "object",
294453
+ "properties": {
294454
+ "id": {
294455
+ "type": "string"
294456
+ },
294457
+ "botId": {
294458
+ "type": "string"
294459
+ },
294460
+ "tableId": {
294461
+ "type": "string"
294462
+ },
294463
+ "type": {
294464
+ "type": "string",
294465
+ "enum": [
294466
+ "export",
294467
+ "import"
294468
+ ]
294469
+ },
294470
+ "status": {
294471
+ "type": "string",
294472
+ "enum": [
294473
+ "pending",
294474
+ "in_progress",
294475
+ "finalizing",
294476
+ "completed",
294477
+ "failed"
294478
+ ]
294479
+ },
294480
+ "progress": {
294481
+ "default": 0,
294482
+ "type": "number"
294483
+ },
294484
+ "inputFileId": {
294485
+ "type": "string",
294486
+ "nullable": true
294487
+ },
294488
+ "outputFileId": {
294489
+ "type": "string",
294490
+ "nullable": true
294491
+ },
294492
+ "createdAt": {
294493
+ "type": "string",
294494
+ "format": "date-time"
294495
+ },
294496
+ "updatedAt": {
294497
+ "type": "string",
294498
+ "format": "date-time"
294499
+ }
294500
+ },
294501
+ "required": [
294502
+ "id",
294503
+ "botId",
294504
+ "tableId",
294505
+ "type",
294506
+ "status",
294507
+ "inputFileId",
294508
+ "outputFileId",
294509
+ "createdAt",
294510
+ "updatedAt"
294511
+ ],
294512
+ "additionalProperties": false
294513
+ }
294514
+ },
294515
+ "required": [
294516
+ "job"
294517
+ ],
294518
+ "title": "importTableResponse",
294519
+ "additionalProperties": false
294520
+ }
294521
+ }
294522
+ },
294213
294523
  "updateTable": {
294214
294524
  "name": "updateTable",
294215
294525
  "path": "/v1/tables/{table}",
@@ -294811,7 +295121,7 @@ var state = {
294811
295121
  "title": "Botpress API",
294812
295122
  "description": "API for Botpress Cloud",
294813
295123
  "server": "https://api.botpress.cloud",
294814
- "version": "0.53.0",
295124
+ "version": "0.54.0",
294815
295125
  "prefix": "v1"
294816
295126
  },
294817
295127
  "errors": [
@@ -294992,6 +295302,7 @@ var state = {
294992
295302
  "getOrCreateTableBody": true,
294993
295303
  "createTableBody": true,
294994
295304
  "duplicateTableBody": true,
295305
+ "importTableBody": true,
294995
295306
  "updateTableBody": true,
294996
295307
  "renameTableColumnBody": true,
294997
295308
  "findTableRowsBody": true,
@@ -295137,6 +295448,9 @@ var state = {
295137
295448
  "getOrCreateTableResponse": true,
295138
295449
  "createTableResponse": true,
295139
295450
  "duplicateTableResponse": true,
295451
+ "exportTableResponse": true,
295452
+ "getTableJobsResponse": true,
295453
+ "importTableResponse": true,
295140
295454
  "updateTableResponse": true,
295141
295455
  "renameTableColumnResponse": true,
295142
295456
  "deleteTableResponse": true,
@@ -297943,7 +298257,6 @@ var state = {
297943
298257
  }
297944
298258
  },
297945
298259
  "required": [
297946
- "$schema",
297947
298260
  "properties",
297948
298261
  "additionalProperties",
297949
298262
  "type"
@@ -298532,6 +298845,9 @@ var state = {
298532
298845
  "getOrCreateTable",
298533
298846
  "createTable",
298534
298847
  "duplicateTable",
298848
+ "exportTable",
298849
+ "getTableJobs",
298850
+ "importTable",
298535
298851
  "updateTable",
298536
298852
  "renameTableColumn",
298537
298853
  "deleteTable",
@@ -10938,6 +10938,248 @@ export declare const state: {
10938
10938
  };
10939
10939
  };
10940
10940
  };
10941
+ exportTable: {
10942
+ name: string;
10943
+ path: string;
10944
+ description: string;
10945
+ parameters: {
10946
+ table: {
10947
+ type: "string";
10948
+ description: string;
10949
+ in: "path";
10950
+ };
10951
+ format: {
10952
+ in: "query";
10953
+ type: "object";
10954
+ description: string;
10955
+ schema: {
10956
+ type: "string";
10957
+ enum: string[];
10958
+ };
10959
+ };
10960
+ compress: {
10961
+ in: "query";
10962
+ type: "object";
10963
+ description: string;
10964
+ schema: {
10965
+ default: boolean;
10966
+ type: "boolean";
10967
+ };
10968
+ };
10969
+ };
10970
+ method: "get";
10971
+ section: "tables";
10972
+ response: {
10973
+ description: string;
10974
+ schema: {
10975
+ type: "object";
10976
+ properties: {
10977
+ job: {
10978
+ type: "object";
10979
+ properties: {
10980
+ id: {
10981
+ type: "string";
10982
+ };
10983
+ botId: {
10984
+ type: "string";
10985
+ };
10986
+ tableId: {
10987
+ type: "string";
10988
+ };
10989
+ type: {
10990
+ type: "string";
10991
+ enum: string[];
10992
+ };
10993
+ status: {
10994
+ type: "string";
10995
+ enum: string[];
10996
+ };
10997
+ progress: {
10998
+ default: number;
10999
+ type: "number";
11000
+ };
11001
+ inputFileId: {
11002
+ type: "string";
11003
+ nullable: true;
11004
+ };
11005
+ outputFileId: {
11006
+ type: "string";
11007
+ nullable: true;
11008
+ };
11009
+ createdAt: {
11010
+ type: "string";
11011
+ format: string;
11012
+ };
11013
+ updatedAt: {
11014
+ type: "string";
11015
+ format: string;
11016
+ };
11017
+ };
11018
+ required: string[];
11019
+ additionalProperties: false;
11020
+ };
11021
+ };
11022
+ required: string[];
11023
+ title: string;
11024
+ additionalProperties: false;
11025
+ };
11026
+ };
11027
+ };
11028
+ getTableJobs: {
11029
+ name: string;
11030
+ path: string;
11031
+ description: string;
11032
+ parameters: {
11033
+ table: {
11034
+ type: "string";
11035
+ description: string;
11036
+ in: "path";
11037
+ };
11038
+ };
11039
+ method: "get";
11040
+ section: "tables";
11041
+ response: {
11042
+ description: string;
11043
+ schema: {
11044
+ type: "object";
11045
+ properties: {
11046
+ jobs: {
11047
+ type: "array";
11048
+ items: {
11049
+ type: "object";
11050
+ properties: {
11051
+ id: {
11052
+ type: "string";
11053
+ };
11054
+ botId: {
11055
+ type: "string";
11056
+ };
11057
+ tableId: {
11058
+ type: "string";
11059
+ };
11060
+ type: {
11061
+ type: "string";
11062
+ enum: string[];
11063
+ };
11064
+ status: {
11065
+ type: "string";
11066
+ enum: string[];
11067
+ };
11068
+ progress: {
11069
+ default: number;
11070
+ type: "number";
11071
+ };
11072
+ inputFileId: {
11073
+ type: "string";
11074
+ nullable: true;
11075
+ };
11076
+ outputFileId: {
11077
+ type: "string";
11078
+ nullable: true;
11079
+ };
11080
+ createdAt: {
11081
+ type: "string";
11082
+ format: string;
11083
+ };
11084
+ updatedAt: {
11085
+ type: "string";
11086
+ format: string;
11087
+ };
11088
+ };
11089
+ required: string[];
11090
+ };
11091
+ };
11092
+ };
11093
+ required: string[];
11094
+ title: string;
11095
+ additionalProperties: false;
11096
+ };
11097
+ };
11098
+ };
11099
+ importTable: {
11100
+ name: string;
11101
+ path: string;
11102
+ description: string;
11103
+ method: "post";
11104
+ parameters: {
11105
+ table: {
11106
+ type: "string";
11107
+ description: string;
11108
+ in: "path";
11109
+ };
11110
+ };
11111
+ requestBody: {
11112
+ description: string;
11113
+ schema: {
11114
+ type: "object";
11115
+ properties: {
11116
+ fileId: {
11117
+ type: "string";
11118
+ description: string;
11119
+ };
11120
+ };
11121
+ required: string[];
11122
+ title: string;
11123
+ additionalProperties: false;
11124
+ };
11125
+ };
11126
+ section: "tables";
11127
+ response: {
11128
+ description: string;
11129
+ schema: {
11130
+ type: "object";
11131
+ properties: {
11132
+ job: {
11133
+ type: "object";
11134
+ properties: {
11135
+ id: {
11136
+ type: "string";
11137
+ };
11138
+ botId: {
11139
+ type: "string";
11140
+ };
11141
+ tableId: {
11142
+ type: "string";
11143
+ };
11144
+ type: {
11145
+ type: "string";
11146
+ enum: string[];
11147
+ };
11148
+ status: {
11149
+ type: "string";
11150
+ enum: string[];
11151
+ };
11152
+ progress: {
11153
+ default: number;
11154
+ type: "number";
11155
+ };
11156
+ inputFileId: {
11157
+ type: "string";
11158
+ nullable: true;
11159
+ };
11160
+ outputFileId: {
11161
+ type: "string";
11162
+ nullable: true;
11163
+ };
11164
+ createdAt: {
11165
+ type: "string";
11166
+ format: string;
11167
+ };
11168
+ updatedAt: {
11169
+ type: "string";
11170
+ format: string;
11171
+ };
11172
+ };
11173
+ required: string[];
11174
+ additionalProperties: false;
11175
+ };
11176
+ };
11177
+ required: string[];
11178
+ title: string;
11179
+ additionalProperties: false;
11180
+ };
11181
+ };
11182
+ };
10941
11183
  updateTable: {
10942
11184
  name: string;
10943
11185
  path: string;
@@ -11609,6 +11851,7 @@ export declare const state: {
11609
11851
  getOrCreateTableBody: true;
11610
11852
  createTableBody: true;
11611
11853
  duplicateTableBody: true;
11854
+ importTableBody: true;
11612
11855
  updateTableBody: true;
11613
11856
  renameTableColumnBody: true;
11614
11857
  findTableRowsBody: true;
@@ -11754,6 +11997,9 @@ export declare const state: {
11754
11997
  getOrCreateTableResponse: true;
11755
11998
  createTableResponse: true;
11756
11999
  duplicateTableResponse: true;
12000
+ exportTableResponse: true;
12001
+ getTableJobsResponse: true;
12002
+ importTableResponse: true;
11757
12003
  updateTableResponse: true;
11758
12004
  renameTableColumnResponse: true;
11759
12005
  deleteTableResponse: true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/api",
3
- "version": "0.53.0",
3
+ "version": "0.54.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {