@botpress/api 0.18.0 → 0.18.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.
@@ -1,5 +1,5 @@
1
- import * as opapi from "@bpinternal/opapi";
2
- export type State = opapi.State<"Bot" | "Integration" | "Workspace" | "WorkspaceMember" | "Account" | "Usage" | "Issue" | "IssueEvent" | "Activity" | "User" | "Conversation" | "Event" | "Message" | "State" | "Task" | "File" | "Table" | "Column" | "Row", never, "user" | "conversation" | "event" | "message" | "file" | "state" | "hub" | "action" | "task" | "bot" | "integration" | "workspace" | "workspaceMember" | "account" | "usage" | "quotas" | "helper" | "activity" | "tables">;
1
+ import * as opapi from '@bpinternal/opapi';
2
+ export type State = opapi.State<'Bot' | 'Integration' | 'Workspace' | 'WorkspaceMember' | 'Account' | 'Usage' | 'Issue' | 'IssueEvent' | 'Activity' | 'User' | 'Conversation' | 'Event' | 'Message' | 'State' | 'Task' | 'File' | 'Table' | 'Column' | 'Row', never, 'user' | 'conversation' | 'event' | 'message' | 'file' | 'state' | 'hub' | 'action' | 'task' | 'bot' | 'integration' | 'workspace' | 'workspaceMember' | 'account' | 'usage' | 'quotas' | 'helper' | 'activity' | 'tables'>;
3
3
  export declare const state: {
4
4
  operations: {
5
5
  createConversation: {
@@ -6157,6 +6157,664 @@ export declare const state: {
6157
6157
  };
6158
6158
  };
6159
6159
  };
6160
+ listTables: {
6161
+ name: string;
6162
+ path: string;
6163
+ description: string;
6164
+ method: "get";
6165
+ parameters: {
6166
+ tags: {
6167
+ in: "query";
6168
+ type: "object";
6169
+ schema: {
6170
+ type: "object";
6171
+ additionalProperties: {
6172
+ type: "string";
6173
+ };
6174
+ };
6175
+ description: string;
6176
+ };
6177
+ };
6178
+ section: "tables";
6179
+ response: {
6180
+ description: string;
6181
+ schema: {
6182
+ type: "object";
6183
+ properties: {
6184
+ tables: {
6185
+ type: "array";
6186
+ items: {
6187
+ $ref: string;
6188
+ };
6189
+ };
6190
+ };
6191
+ required: string[];
6192
+ title: string;
6193
+ additionalProperties: false;
6194
+ };
6195
+ };
6196
+ };
6197
+ getTable: {
6198
+ name: string;
6199
+ path: string;
6200
+ description: string;
6201
+ parameters: {
6202
+ table: {
6203
+ type: "string";
6204
+ description: string;
6205
+ in: "path";
6206
+ };
6207
+ };
6208
+ method: "get";
6209
+ section: "tables";
6210
+ response: {
6211
+ description: string;
6212
+ schema: {
6213
+ type: "object";
6214
+ properties: {
6215
+ table: {
6216
+ $ref: string;
6217
+ };
6218
+ rows: {
6219
+ type: "number";
6220
+ description: string;
6221
+ };
6222
+ indexingCount: {
6223
+ type: "number";
6224
+ description: string;
6225
+ };
6226
+ };
6227
+ required: string[];
6228
+ title: string;
6229
+ additionalProperties: false;
6230
+ };
6231
+ };
6232
+ };
6233
+ createTable: {
6234
+ name: string;
6235
+ path: string;
6236
+ description: string;
6237
+ method: "post";
6238
+ requestBody: {
6239
+ description: string;
6240
+ schema: {
6241
+ type: "object";
6242
+ properties: {
6243
+ name: {
6244
+ description: string;
6245
+ type: "string";
6246
+ minLength: number;
6247
+ };
6248
+ factor: {
6249
+ default: number;
6250
+ type: "number";
6251
+ minimum: number;
6252
+ maximum: number;
6253
+ description: string;
6254
+ };
6255
+ schema: {
6256
+ type: "object";
6257
+ additionalProperties: true;
6258
+ description: string;
6259
+ };
6260
+ tags: {
6261
+ type: "object";
6262
+ additionalProperties: {
6263
+ type: "string";
6264
+ };
6265
+ description: string;
6266
+ };
6267
+ };
6268
+ required: string[];
6269
+ title: string;
6270
+ additionalProperties: false;
6271
+ };
6272
+ };
6273
+ section: "tables";
6274
+ response: {
6275
+ description: string;
6276
+ schema: {
6277
+ type: "object";
6278
+ properties: {
6279
+ table: {
6280
+ $ref: string;
6281
+ };
6282
+ };
6283
+ required: string[];
6284
+ title: string;
6285
+ additionalProperties: false;
6286
+ };
6287
+ };
6288
+ parameters: {};
6289
+ };
6290
+ updateTable: {
6291
+ name: string;
6292
+ path: string;
6293
+ description: string;
6294
+ method: "put";
6295
+ parameters: {
6296
+ table: {
6297
+ type: "string";
6298
+ description: string;
6299
+ in: "path";
6300
+ };
6301
+ };
6302
+ requestBody: {
6303
+ description: string;
6304
+ schema: {
6305
+ type: "object";
6306
+ properties: {
6307
+ name: {
6308
+ description: string;
6309
+ type: "string";
6310
+ minLength: number;
6311
+ };
6312
+ schema: {
6313
+ type: "object";
6314
+ additionalProperties: true;
6315
+ description: string;
6316
+ };
6317
+ tags: {
6318
+ type: "object";
6319
+ additionalProperties: {
6320
+ type: "string";
6321
+ };
6322
+ description: string;
6323
+ };
6324
+ };
6325
+ title: string;
6326
+ additionalProperties: false;
6327
+ };
6328
+ };
6329
+ section: "tables";
6330
+ response: {
6331
+ description: string;
6332
+ schema: {
6333
+ type: "object";
6334
+ properties: {
6335
+ table: {
6336
+ $ref: string;
6337
+ };
6338
+ };
6339
+ required: string[];
6340
+ title: string;
6341
+ additionalProperties: false;
6342
+ };
6343
+ };
6344
+ };
6345
+ renameTableColumn: {
6346
+ name: string;
6347
+ path: string;
6348
+ description: string;
6349
+ method: "put";
6350
+ parameters: {
6351
+ table: {
6352
+ type: "string";
6353
+ description: string;
6354
+ in: "path";
6355
+ };
6356
+ };
6357
+ requestBody: {
6358
+ description: string;
6359
+ schema: {
6360
+ type: "object";
6361
+ properties: {
6362
+ name: {
6363
+ type: "string";
6364
+ description: string;
6365
+ };
6366
+ newName: {
6367
+ description: string;
6368
+ type: "string";
6369
+ minLength: number;
6370
+ maxLength: number;
6371
+ };
6372
+ };
6373
+ required: string[];
6374
+ title: string;
6375
+ additionalProperties: false;
6376
+ };
6377
+ };
6378
+ section: "tables";
6379
+ response: {
6380
+ description: string;
6381
+ schema: {
6382
+ type: "object";
6383
+ properties: {
6384
+ table: {
6385
+ $ref: string;
6386
+ };
6387
+ };
6388
+ required: string[];
6389
+ title: string;
6390
+ additionalProperties: false;
6391
+ };
6392
+ };
6393
+ };
6394
+ deleteTable: {
6395
+ name: string;
6396
+ path: string;
6397
+ description: string;
6398
+ parameters: {
6399
+ table: {
6400
+ type: "string";
6401
+ description: string;
6402
+ in: "path";
6403
+ };
6404
+ };
6405
+ method: "delete";
6406
+ section: "tables";
6407
+ response: {
6408
+ description: string;
6409
+ schema: {
6410
+ type: "object";
6411
+ title: string;
6412
+ additionalProperties: false;
6413
+ };
6414
+ };
6415
+ };
6416
+ getTableRow: {
6417
+ name: string;
6418
+ path: string;
6419
+ description: string;
6420
+ parameters: {
6421
+ table: {
6422
+ type: "string";
6423
+ description: string;
6424
+ in: "path";
6425
+ };
6426
+ id: {
6427
+ type: "object";
6428
+ description: string;
6429
+ in: "query";
6430
+ required: true;
6431
+ schema: {
6432
+ type: "integer";
6433
+ };
6434
+ };
6435
+ };
6436
+ method: "get";
6437
+ section: "tables";
6438
+ response: {
6439
+ description: string;
6440
+ schema: {
6441
+ type: "object";
6442
+ properties: {
6443
+ row: {
6444
+ $ref: string;
6445
+ };
6446
+ };
6447
+ required: string[];
6448
+ title: string;
6449
+ additionalProperties: false;
6450
+ };
6451
+ };
6452
+ };
6453
+ findTableRows: {
6454
+ name: string;
6455
+ path: string;
6456
+ description: string;
6457
+ parameters: {
6458
+ table: {
6459
+ type: "string";
6460
+ description: string;
6461
+ in: "path";
6462
+ };
6463
+ };
6464
+ requestBody: {
6465
+ description: string;
6466
+ schema: {
6467
+ type: "object";
6468
+ properties: {
6469
+ limit: {
6470
+ default: number;
6471
+ type: "integer";
6472
+ minimum: number;
6473
+ maximum: number;
6474
+ description: string;
6475
+ };
6476
+ offset: {
6477
+ default: number;
6478
+ type: "integer";
6479
+ minimum: number;
6480
+ description: string;
6481
+ };
6482
+ filter: {
6483
+ type: "object";
6484
+ additionalProperties: true;
6485
+ description: string;
6486
+ };
6487
+ group: {
6488
+ type: "object";
6489
+ additionalProperties: true;
6490
+ description: string;
6491
+ };
6492
+ search: {
6493
+ type: "string";
6494
+ maxLength: number;
6495
+ description: string;
6496
+ };
6497
+ orderBy: {
6498
+ default: string;
6499
+ type: "string";
6500
+ description: string;
6501
+ };
6502
+ orderDirection: {
6503
+ default: string;
6504
+ type: "string";
6505
+ enum: string[];
6506
+ description: string;
6507
+ };
6508
+ };
6509
+ title: string;
6510
+ additionalProperties: false;
6511
+ };
6512
+ };
6513
+ method: "post";
6514
+ section: "tables";
6515
+ response: {
6516
+ description: string;
6517
+ schema: {
6518
+ type: "object";
6519
+ properties: {
6520
+ rows: {
6521
+ type: "array";
6522
+ items: {
6523
+ $ref: string;
6524
+ };
6525
+ };
6526
+ count: {
6527
+ type: "integer";
6528
+ description: string;
6529
+ };
6530
+ offset: {
6531
+ type: "integer";
6532
+ };
6533
+ limit: {
6534
+ type: "integer";
6535
+ };
6536
+ };
6537
+ required: string[];
6538
+ title: string;
6539
+ additionalProperties: false;
6540
+ };
6541
+ };
6542
+ };
6543
+ createTableRows: {
6544
+ name: string;
6545
+ path: string;
6546
+ description: string;
6547
+ parameters: {
6548
+ table: {
6549
+ type: "string";
6550
+ description: string;
6551
+ in: "path";
6552
+ };
6553
+ };
6554
+ requestBody: {
6555
+ description: string;
6556
+ schema: {
6557
+ type: "object";
6558
+ properties: {
6559
+ rows: {
6560
+ type: "array";
6561
+ items: {
6562
+ type: "object";
6563
+ properties: {};
6564
+ additionalProperties: true;
6565
+ };
6566
+ minItems: number;
6567
+ maxItems: number;
6568
+ };
6569
+ };
6570
+ required: string[];
6571
+ title: string;
6572
+ additionalProperties: false;
6573
+ };
6574
+ };
6575
+ method: "post";
6576
+ section: "tables";
6577
+ response: {
6578
+ description: string;
6579
+ schema: {
6580
+ type: "object";
6581
+ properties: {
6582
+ rows: {
6583
+ type: "array";
6584
+ items: {
6585
+ $ref: string;
6586
+ };
6587
+ };
6588
+ warnings: {
6589
+ type: "array";
6590
+ items: {
6591
+ type: "string";
6592
+ };
6593
+ description: string;
6594
+ };
6595
+ errors: {
6596
+ type: "array";
6597
+ items: {
6598
+ type: "string";
6599
+ };
6600
+ description: string;
6601
+ };
6602
+ };
6603
+ required: string[];
6604
+ title: string;
6605
+ additionalProperties: false;
6606
+ };
6607
+ };
6608
+ };
6609
+ deleteTableRows: {
6610
+ name: string;
6611
+ path: string;
6612
+ description: string;
6613
+ parameters: {
6614
+ table: {
6615
+ type: "string";
6616
+ description: string;
6617
+ in: "path";
6618
+ };
6619
+ };
6620
+ requestBody: {
6621
+ description: string;
6622
+ schema: {
6623
+ type: "object";
6624
+ properties: {
6625
+ ids: {
6626
+ type: "array";
6627
+ items: {
6628
+ type: "number";
6629
+ };
6630
+ maxItems: number;
6631
+ };
6632
+ filter: {
6633
+ type: "object";
6634
+ additionalProperties: true;
6635
+ description: string;
6636
+ };
6637
+ deleteAllRows: {
6638
+ type: "boolean";
6639
+ description: string;
6640
+ };
6641
+ };
6642
+ title: string;
6643
+ additionalProperties: false;
6644
+ };
6645
+ };
6646
+ method: "post";
6647
+ section: "tables";
6648
+ response: {
6649
+ description: string;
6650
+ schema: {
6651
+ type: "object";
6652
+ properties: {
6653
+ deletedRows: {
6654
+ type: "number";
6655
+ };
6656
+ };
6657
+ required: string[];
6658
+ title: string;
6659
+ additionalProperties: false;
6660
+ };
6661
+ };
6662
+ };
6663
+ updateTableRows: {
6664
+ name: string;
6665
+ path: string;
6666
+ description: string;
6667
+ method: "put";
6668
+ parameters: {
6669
+ table: {
6670
+ type: "string";
6671
+ description: string;
6672
+ in: "path";
6673
+ };
6674
+ };
6675
+ requestBody: {
6676
+ description: string;
6677
+ schema: {
6678
+ type: "object";
6679
+ properties: {
6680
+ rows: {
6681
+ type: "array";
6682
+ items: {
6683
+ type: "object";
6684
+ properties: {
6685
+ id: {
6686
+ type: "number";
6687
+ };
6688
+ };
6689
+ required: string[];
6690
+ additionalProperties: true;
6691
+ };
6692
+ minItems: number;
6693
+ maxItems: number;
6694
+ description: string;
6695
+ };
6696
+ };
6697
+ required: string[];
6698
+ title: string;
6699
+ additionalProperties: false;
6700
+ };
6701
+ };
6702
+ section: "tables";
6703
+ response: {
6704
+ description: string;
6705
+ schema: {
6706
+ type: "object";
6707
+ properties: {
6708
+ rows: {
6709
+ type: "array";
6710
+ items: {
6711
+ $ref: string;
6712
+ };
6713
+ };
6714
+ warnings: {
6715
+ type: "array";
6716
+ items: {
6717
+ type: "string";
6718
+ };
6719
+ description: string;
6720
+ };
6721
+ errors: {
6722
+ type: "array";
6723
+ items: {
6724
+ type: "string";
6725
+ };
6726
+ description: string;
6727
+ };
6728
+ };
6729
+ required: string[];
6730
+ title: string;
6731
+ additionalProperties: false;
6732
+ };
6733
+ };
6734
+ };
6735
+ upsertTableRows: {
6736
+ name: string;
6737
+ path: string;
6738
+ description: string;
6739
+ method: "post";
6740
+ parameters: {
6741
+ table: {
6742
+ type: "string";
6743
+ description: string;
6744
+ in: "path";
6745
+ };
6746
+ };
6747
+ requestBody: {
6748
+ description: string;
6749
+ schema: {
6750
+ type: "object";
6751
+ properties: {
6752
+ rows: {
6753
+ type: "array";
6754
+ items: {
6755
+ type: "object";
6756
+ properties: {
6757
+ id: {
6758
+ type: "number";
6759
+ };
6760
+ };
6761
+ additionalProperties: true;
6762
+ };
6763
+ minItems: number;
6764
+ maxItems: number;
6765
+ };
6766
+ keyColumn: {
6767
+ default: string;
6768
+ type: "string";
6769
+ minLength: number;
6770
+ maxLength: number;
6771
+ description: string;
6772
+ };
6773
+ };
6774
+ required: string[];
6775
+ title: string;
6776
+ additionalProperties: false;
6777
+ };
6778
+ };
6779
+ section: "tables";
6780
+ response: {
6781
+ description: string;
6782
+ schema: {
6783
+ type: "object";
6784
+ properties: {
6785
+ inserted: {
6786
+ type: "array";
6787
+ items: {
6788
+ $ref: string;
6789
+ };
6790
+ };
6791
+ updated: {
6792
+ type: "array";
6793
+ items: {
6794
+ $ref: string;
6795
+ };
6796
+ };
6797
+ warnings: {
6798
+ type: "array";
6799
+ items: {
6800
+ type: "string";
6801
+ };
6802
+ description: string;
6803
+ };
6804
+ errors: {
6805
+ type: "array";
6806
+ items: {
6807
+ type: "string";
6808
+ };
6809
+ description: string;
6810
+ };
6811
+ };
6812
+ required: string[];
6813
+ title: string;
6814
+ additionalProperties: false;
6815
+ };
6816
+ };
6817
+ };
6160
6818
  };
6161
6819
  metadata: {
6162
6820
  title: string;
@@ -6250,6 +6908,14 @@ export declare const state: {
6250
6908
  changeAISpendQuotaBody: true;
6251
6909
  introspectBody: true;
6252
6910
  createFileBody: true;
6911
+ createTableBody: true;
6912
+ updateTableBody: true;
6913
+ renameTableColumnBody: true;
6914
+ findTableRowsBody: true;
6915
+ createTableRowsBody: true;
6916
+ deleteTableRowsBody: true;
6917
+ updateTableRowsBody: true;
6918
+ upsertTableRowsBody: true;
6253
6919
  };
6254
6920
  responses: {
6255
6921
  createConversationResponse: true;
@@ -6348,6 +7014,18 @@ export declare const state: {
6348
7014
  downloadFileResponse: true;
6349
7015
  deleteFileResponse: true;
6350
7016
  listFilesResponse: true;
7017
+ listTablesResponse: true;
7018
+ getTableResponse: true;
7019
+ createTableResponse: true;
7020
+ updateTableResponse: true;
7021
+ renameTableColumnResponse: true;
7022
+ deleteTableResponse: true;
7023
+ getTableRowResponse: true;
7024
+ findTableRowsResponse: true;
7025
+ createTableRowsResponse: true;
7026
+ deleteTableRowsResponse: true;
7027
+ updateTableRowsResponse: true;
7028
+ upsertTableRowsResponse: true;
6351
7029
  };
6352
7030
  schemas: {
6353
7031
  Bot: true;
@@ -7811,8 +8489,9 @@ export declare const state: {
7811
8489
  description: string;
7812
8490
  };
7813
8491
  name: {
7814
- type: "string";
7815
8492
  description: string;
8493
+ type: "string";
8494
+ minLength: number;
7816
8495
  };
7817
8496
  factor: {
7818
8497
  default: number;
@@ -7904,10 +8583,12 @@ export declare const state: {
7904
8583
  };
7905
8584
  createdAt: {
7906
8585
  type: "string";
8586
+ format: string;
7907
8587
  description: string;
7908
8588
  };
7909
8589
  updatedAt: {
7910
8590
  type: "string";
8591
+ format: string;
7911
8592
  description: string;
7912
8593
  };
7913
8594
  };
@@ -7967,10 +8648,12 @@ export declare const state: {
7967
8648
  };
7968
8649
  createdAt: {
7969
8650
  type: "string";
8651
+ format: string;
7970
8652
  description: string;
7971
8653
  };
7972
8654
  updatedAt: {
7973
8655
  type: "string";
8656
+ format: string;
7974
8657
  description: string;
7975
8658
  };
7976
8659
  similarity: {
@@ -8095,7 +8778,7 @@ export declare const state: {
8095
8778
  title: string;
8096
8779
  description: string;
8097
8780
  name: "tables";
8098
- operations: never[];
8781
+ operations: string[];
8099
8782
  schema: string;
8100
8783
  })[];
8101
8784
  options: {