@botpress/api 0.30.0 → 0.30.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 CHANGED
@@ -271259,6 +271259,113 @@ var state = {
271259
271259
  }
271260
271260
  }
271261
271261
  },
271262
+ "listPublicWorkspaces": {
271263
+ "name": "listPublicWorkspaces",
271264
+ "description": "List public workspaces",
271265
+ "section": "workspace",
271266
+ "method": "get",
271267
+ "path": "/v1/admin/workspaces/public",
271268
+ "disableDefaultParameters": {
271269
+ "x-workspace-id": true
271270
+ },
271271
+ "parameters": {
271272
+ "nextToken": {
271273
+ "in": "query",
271274
+ "description": "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
271275
+ "type": "string"
271276
+ },
271277
+ "workspaceIds": {
271278
+ "in": "query",
271279
+ "description": "Ids of the workspaces to list",
271280
+ "type": "string[]",
271281
+ "required": false
271282
+ },
271283
+ "search": {
271284
+ "in": "query",
271285
+ "description": "Search query",
271286
+ "type": "string",
271287
+ "required": false
271288
+ }
271289
+ },
271290
+ "response": {
271291
+ "description": "Success",
271292
+ "schema": {
271293
+ "type": "object",
271294
+ "properties": {
271295
+ "workspaces": {
271296
+ "type": "array",
271297
+ "items": {
271298
+ "type": "object",
271299
+ "properties": {
271300
+ "id": {
271301
+ "type": "string"
271302
+ },
271303
+ "name": {
271304
+ "type": "string"
271305
+ },
271306
+ "createdAt": {
271307
+ "type": "string"
271308
+ },
271309
+ "updatedAt": {
271310
+ "type": "string"
271311
+ },
271312
+ "about": {
271313
+ "default": "",
271314
+ "type": "string"
271315
+ },
271316
+ "profilePicture": {
271317
+ "default": "",
271318
+ "type": "string"
271319
+ },
271320
+ "contactEmail": {
271321
+ "default": "",
271322
+ "type": "string"
271323
+ },
271324
+ "website": {
271325
+ "default": "",
271326
+ "type": "string"
271327
+ },
271328
+ "socialAccounts": {
271329
+ "default": [],
271330
+ "type": "array",
271331
+ "items": {
271332
+ "type": "string"
271333
+ }
271334
+ },
271335
+ "handle": {
271336
+ "default": "",
271337
+ "type": "string"
271338
+ }
271339
+ },
271340
+ "required": [
271341
+ "id",
271342
+ "name",
271343
+ "createdAt",
271344
+ "updatedAt"
271345
+ ],
271346
+ "title": "getPublicWorkspaceResponse"
271347
+ }
271348
+ },
271349
+ "meta": {
271350
+ "type": "object",
271351
+ "properties": {
271352
+ "nextToken": {
271353
+ "type": "string",
271354
+ "description": "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."
271355
+ }
271356
+ },
271357
+ "additionalProperties": false
271358
+ }
271359
+ },
271360
+ "required": [
271361
+ "workspaces",
271362
+ "meta"
271363
+ ],
271364
+ "title": "listPublicWorkspacesResponse",
271365
+ "additionalProperties": false
271366
+ }
271367
+ }
271368
+ },
271262
271369
  "deleteWorkspace": {
271263
271370
  "name": "deleteWorkspace",
271264
271371
  "description": "Delete workspace",
@@ -273377,19 +273484,19 @@ var state = {
273377
273484
  },
273378
273485
  "parameters": {}
273379
273486
  },
273380
- "createFile": {
273381
- "name": "createFile",
273487
+ "upsertFile": {
273488
+ "name": "upsertFile",
273382
273489
  "path": "/v1/files",
273383
- "description": "Creates a file. Once the file is created, use the uploadUrl from the response body to upload the file content, using a PUT request.",
273384
- "method": "post",
273490
+ "description": "Creates or updates a file using the `key` parameter as unique identifier. Updating a file will erase the existing content of the file. Upload the file content by sending it in a PUT request to the `uploadUrl` returned in the response.",
273491
+ "method": "put",
273385
273492
  "requestBody": {
273386
- "description": "The file to upload.",
273493
+ "description": "Properties of the file to create or update.",
273387
273494
  "schema": {
273388
273495
  "type": "object",
273389
273496
  "properties": {
273390
- "name": {
273497
+ "key": {
273391
273498
  "type": "string",
273392
- "description": "File name"
273499
+ "description": "Unique key for the file. Must be unique across the bot (and the integration, when applicable)."
273393
273500
  },
273394
273501
  "tags": {
273395
273502
  "type": "object",
@@ -273401,12 +273508,12 @@ var state = {
273401
273508
  },
273402
273509
  "size": {
273403
273510
  "type": "number",
273404
- "description": "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 database storage quota."
273511
+ "description": "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."
273405
273512
  },
273406
273513
  "index": {
273407
273514
  "default": false,
273408
273515
  "type": "boolean",
273409
- "description": "Set to a value of 'true' to index the file in vector storage. Only PDFs, Office documents, and text-based files are currently supported. Note that if a file is indexed, it will count towards the Vector Storage quota of the workspace rather than the File Storage quota."
273516
+ "description": "Set to a value of 'true' to index the file in vector storage. Only PDFs, Office documents, and text-based files are currently supported. 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."
273410
273517
  },
273411
273518
  "accessPolicies": {
273412
273519
  "type": "array",
@@ -273421,20 +273528,21 @@ var state = {
273421
273528
  },
273422
273529
  "contentType": {
273423
273530
  "type": "string",
273424
- "description": 'File content type. If omitted, the content type will be inferred from the file extension. If a type cannot be inferred, the default is "application/octet-stream".'
273531
+ "description": '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".'
273425
273532
  }
273426
273533
  },
273427
273534
  "required": [
273535
+ "key",
273428
273536
  "size"
273429
273537
  ],
273430
- "title": "createFileBody",
273538
+ "title": "upsertFileBody",
273431
273539
  "additionalProperties": false
273432
273540
  }
273433
273541
  },
273434
273542
  "contentType": "application/json",
273435
273543
  "section": "files",
273436
273544
  "response": {
273437
- "description": "The created file",
273545
+ "description": "The created or updated file",
273438
273546
  "schema": {
273439
273547
  "type": "object",
273440
273548
  "properties": {
@@ -273449,10 +273557,9 @@ var state = {
273449
273557
  "type": "string",
273450
273558
  "description": "The ID of the bot the file belongs to"
273451
273559
  },
273452
- "name": {
273560
+ "key": {
273453
273561
  "type": "string",
273454
- "description": "File name",
273455
- "nullable": true
273562
+ "description": "Unique key for the file. Must be unique across the bot (and the integration, when applicable)."
273456
273563
  },
273457
273564
  "size": {
273458
273565
  "type": "number",
@@ -273518,7 +273625,7 @@ var state = {
273518
273625
  "required": [
273519
273626
  "id",
273520
273627
  "botId",
273521
- "name",
273628
+ "key",
273522
273629
  "size",
273523
273630
  "contentType",
273524
273631
  "tags",
@@ -273535,7 +273642,7 @@ var state = {
273535
273642
  "required": [
273536
273643
  "file"
273537
273644
  ],
273538
- "title": "createFileResponse",
273645
+ "title": "upsertFileResponse",
273539
273646
  "additionalProperties": false
273540
273647
  }
273541
273648
  },
@@ -273605,10 +273712,9 @@ var state = {
273605
273712
  "type": "string",
273606
273713
  "description": "The ID of the bot the file belongs to"
273607
273714
  },
273608
- "name": {
273715
+ "key": {
273609
273716
  "type": "string",
273610
- "description": "File name",
273611
- "nullable": true
273717
+ "description": "Unique key for the file. Must be unique across the bot (and the integration, when applicable)."
273612
273718
  },
273613
273719
  "url": {
273614
273720
  "type": "string",
@@ -273675,7 +273781,7 @@ var state = {
273675
273781
  "required": [
273676
273782
  "id",
273677
273783
  "botId",
273678
- "name",
273784
+ "key",
273679
273785
  "url",
273680
273786
  "size",
273681
273787
  "contentType",
@@ -273737,10 +273843,9 @@ var state = {
273737
273843
  "type": "string",
273738
273844
  "description": "The ID of the bot the file belongs to"
273739
273845
  },
273740
- "name": {
273846
+ "key": {
273741
273847
  "type": "string",
273742
- "description": "File name",
273743
- "nullable": true
273848
+ "description": "Unique key for the file. Must be unique across the bot (and the integration, when applicable)."
273744
273849
  },
273745
273850
  "url": {
273746
273851
  "type": "string",
@@ -273807,7 +273912,7 @@ var state = {
273807
273912
  "required": [
273808
273913
  "id",
273809
273914
  "botId",
273810
- "name",
273915
+ "key",
273811
273916
  "url",
273812
273917
  "size",
273813
273918
  "contentType",
@@ -273829,10 +273934,10 @@ var state = {
273829
273934
  }
273830
273935
  }
273831
273936
  },
273832
- "updateFile": {
273833
- "name": "updateFile",
273937
+ "updateFileMetadata": {
273938
+ "name": "updateFileMetadata",
273834
273939
  "path": "/v1/files/{id}",
273835
- "description": "Update file",
273940
+ "description": "Update file metadata, without updating the file content.",
273836
273941
  "method": "put",
273837
273942
  "section": "files",
273838
273943
  "parameters": {
@@ -273868,7 +273973,7 @@ var state = {
273868
273973
  "description": "New access policies to set for the file. Omit to keep existing policies intact."
273869
273974
  }
273870
273975
  },
273871
- "title": "updateFileBody",
273976
+ "title": "updateFileMetadataBody",
273872
273977
  "additionalProperties": false
273873
273978
  }
273874
273979
  },
@@ -273888,10 +273993,9 @@ var state = {
273888
273993
  "type": "string",
273889
273994
  "description": "The ID of the bot the file belongs to"
273890
273995
  },
273891
- "name": {
273996
+ "key": {
273892
273997
  "type": "string",
273893
- "description": "File name",
273894
- "nullable": true
273998
+ "description": "Unique key for the file. Must be unique across the bot (and the integration, when applicable)."
273895
273999
  },
273896
274000
  "url": {
273897
274001
  "type": "string",
@@ -273958,7 +274062,7 @@ var state = {
273958
274062
  "required": [
273959
274063
  "id",
273960
274064
  "botId",
273961
- "name",
274065
+ "key",
273962
274066
  "url",
273963
274067
  "size",
273964
274068
  "contentType",
@@ -273975,7 +274079,7 @@ var state = {
273975
274079
  "required": [
273976
274080
  "file"
273977
274081
  ],
273978
- "title": "updateFileResponse",
274082
+ "title": "updateFileMetadataResponse",
273979
274083
  "additionalProperties": false
273980
274084
  }
273981
274085
  }
@@ -274040,11 +274144,6 @@ var state = {
274040
274144
  "type": "string",
274041
274145
  "description": "File ID"
274042
274146
  },
274043
- "name": {
274044
- "type": "string",
274045
- "description": "File name",
274046
- "nullable": true
274047
- },
274048
274147
  "tags": {
274049
274148
  "type": "object",
274050
274149
  "additionalProperties": {
@@ -274064,7 +274163,6 @@ var state = {
274064
274163
  },
274065
274164
  "required": [
274066
274165
  "id",
274067
- "name",
274068
274166
  "tags",
274069
274167
  "createdAt",
274070
274168
  "updatedAt"
@@ -274988,7 +275086,7 @@ var state = {
274988
275086
  "title": "Botpress API",
274989
275087
  "description": "API for Botpress Cloud",
274990
275088
  "server": "https://api.botpress.cloud",
274991
- "version": "0.30.0",
275089
+ "version": "0.30.2",
274992
275090
  "prefix": "v1"
274993
275091
  },
274994
275092
  "errors": [
@@ -275062,6 +275160,11 @@ var state = {
275062
275160
  "type": "ReferenceConstraint",
275063
275161
  "description": "The resource cannot be deleted because it's referenced by another resource"
275064
275162
  },
275163
+ {
275164
+ "status": 409,
275165
+ "type": "ResourceLockedConflict",
275166
+ "description": "The resource is current locked and cannot be operated on until the lock is released."
275167
+ },
275065
275168
  {
275066
275169
  "status": 400,
275067
275170
  "type": "ReferenceNotFound",
@@ -275149,8 +275252,8 @@ var state = {
275149
275252
  "updateIntegrationBody": true,
275150
275253
  "changeAISpendQuotaBody": true,
275151
275254
  "introspectBody": true,
275152
- "createFileBody": true,
275153
- "updateFileBody": true,
275255
+ "upsertFileBody": true,
275256
+ "updateFileMetadataBody": true,
275154
275257
  "getOrCreateTableBody": true,
275155
275258
  "createTableBody": true,
275156
275259
  "duplicateTableBody": true,
@@ -275239,6 +275342,7 @@ var state = {
275239
275342
  "updateWorkspaceResponse": true,
275240
275343
  "checkHandleAvailabilityResponse": true,
275241
275344
  "listWorkspacesResponse": true,
275345
+ "listPublicWorkspacesResponse": true,
275242
275346
  "deleteWorkspaceResponse": true,
275243
275347
  "getAuditRecordsResponse": true,
275244
275348
  "listWorkspaceMembersResponse": true,
@@ -275262,11 +275366,11 @@ var state = {
275262
275366
  "changeAISpendQuotaResponse": true,
275263
275367
  "listActivitiesResponse": true,
275264
275368
  "introspectResponse": true,
275265
- "createFileResponse": true,
275369
+ "upsertFileResponse": true,
275266
275370
  "deleteFileResponse": true,
275267
275371
  "listFilesResponse": true,
275268
275372
  "getFileResponse": true,
275269
- "updateFileResponse": true,
275373
+ "updateFileMetadataResponse": true,
275270
275374
  "searchFilesResponse": true,
275271
275375
  "listTablesResponse": true,
275272
275376
  "getTableResponse": true,
@@ -277522,10 +277626,9 @@ var state = {
277522
277626
  "type": "string",
277523
277627
  "description": "The ID of the bot the file belongs to"
277524
277628
  },
277525
- "name": {
277629
+ "key": {
277526
277630
  "type": "string",
277527
- "description": "File name",
277528
- "nullable": true
277631
+ "description": "Unique key for the file. Must be unique across the bot (and the integration, when applicable)."
277529
277632
  },
277530
277633
  "url": {
277531
277634
  "type": "string",
@@ -277592,7 +277695,7 @@ var state = {
277592
277695
  "required": [
277593
277696
  "id",
277594
277697
  "botId",
277595
- "name",
277698
+ "key",
277596
277699
  "url",
277597
277700
  "size",
277598
277701
  "contentType",
@@ -277773,6 +277876,7 @@ var state = {
277773
277876
  "updateWorkspace",
277774
277877
  "checkHandleAvailability",
277775
277878
  "listWorkspaces",
277879
+ "listPublicWorkspaces",
277776
277880
  "deleteWorkspace",
277777
277881
  "getAuditRecords"
277778
277882
  ],
@@ -277868,11 +277972,11 @@ var state = {
277868
277972
  "description": "The Files API allows you to create, manage, and index files that can be used by your bots and integrations. Files can be in any text or binary format, and documents (such as PDF, Microsoft Office, HTML, CSV, etc.) can be indexed to be used for semantic search in RAG (Retrieval Augmented Generation) implementations. Files are private by default but can be made publicly accessible through a permanent URL that's unique for each file.",
277869
277973
  "name": "files",
277870
277974
  "operations": [
277871
- "createFile",
277975
+ "upsertFile",
277872
277976
  "deleteFile",
277873
277977
  "listFiles",
277874
277978
  "getFile",
277875
- "updateFile",
277979
+ "updateFileMetadata",
277876
277980
  "searchFiles"
277877
277981
  ],
277878
277982
  "schema": "File"
@@ -5586,6 +5586,105 @@ export declare const state: {
5586
5586
  };
5587
5587
  };
5588
5588
  };
5589
+ listPublicWorkspaces: {
5590
+ name: string;
5591
+ description: string;
5592
+ section: "workspace";
5593
+ method: "get";
5594
+ path: string;
5595
+ disableDefaultParameters: {
5596
+ "x-workspace-id": boolean;
5597
+ };
5598
+ parameters: {
5599
+ nextToken: {
5600
+ in: "query";
5601
+ description: string;
5602
+ type: "string";
5603
+ };
5604
+ workspaceIds: {
5605
+ in: "query";
5606
+ description: string;
5607
+ type: "string[]";
5608
+ required: false;
5609
+ };
5610
+ search: {
5611
+ in: "query";
5612
+ description: string;
5613
+ type: "string";
5614
+ required: false;
5615
+ };
5616
+ };
5617
+ response: {
5618
+ description: string;
5619
+ schema: {
5620
+ type: "object";
5621
+ properties: {
5622
+ workspaces: {
5623
+ type: "array";
5624
+ items: {
5625
+ type: "object";
5626
+ properties: {
5627
+ id: {
5628
+ type: "string";
5629
+ };
5630
+ name: {
5631
+ type: "string";
5632
+ };
5633
+ createdAt: {
5634
+ type: "string";
5635
+ };
5636
+ updatedAt: {
5637
+ type: "string";
5638
+ };
5639
+ about: {
5640
+ default: string;
5641
+ type: "string";
5642
+ };
5643
+ profilePicture: {
5644
+ default: string;
5645
+ type: "string";
5646
+ };
5647
+ contactEmail: {
5648
+ default: string;
5649
+ type: "string";
5650
+ };
5651
+ website: {
5652
+ default: string;
5653
+ type: "string";
5654
+ };
5655
+ socialAccounts: {
5656
+ default: never[];
5657
+ type: "array";
5658
+ items: {
5659
+ type: "string";
5660
+ };
5661
+ };
5662
+ handle: {
5663
+ default: string;
5664
+ type: "string";
5665
+ };
5666
+ };
5667
+ required: string[];
5668
+ title: string;
5669
+ };
5670
+ };
5671
+ meta: {
5672
+ type: "object";
5673
+ properties: {
5674
+ nextToken: {
5675
+ type: "string";
5676
+ description: string;
5677
+ };
5678
+ };
5679
+ additionalProperties: false;
5680
+ };
5681
+ };
5682
+ required: string[];
5683
+ title: string;
5684
+ additionalProperties: false;
5685
+ };
5686
+ };
5687
+ };
5589
5688
  deleteWorkspace: {
5590
5689
  name: string;
5591
5690
  description: string;
@@ -7444,17 +7543,17 @@ export declare const state: {
7444
7543
  };
7445
7544
  parameters: {};
7446
7545
  };
7447
- createFile: {
7546
+ upsertFile: {
7448
7547
  name: string;
7449
7548
  path: string;
7450
7549
  description: string;
7451
- method: "post";
7550
+ method: "put";
7452
7551
  requestBody: {
7453
7552
  description: string;
7454
7553
  schema: {
7455
7554
  type: "object";
7456
7555
  properties: {
7457
- name: {
7556
+ key: {
7458
7557
  type: "string";
7459
7558
  description: string;
7460
7559
  };
@@ -7511,10 +7610,9 @@ export declare const state: {
7511
7610
  type: "string";
7512
7611
  description: string;
7513
7612
  };
7514
- name: {
7613
+ key: {
7515
7614
  type: "string";
7516
7615
  description: string;
7517
- nullable: true;
7518
7616
  };
7519
7617
  size: {
7520
7618
  type: "number";
@@ -7642,10 +7740,9 @@ export declare const state: {
7642
7740
  type: "string";
7643
7741
  description: string;
7644
7742
  };
7645
- name: {
7743
+ key: {
7646
7744
  type: "string";
7647
7745
  description: string;
7648
- nullable: true;
7649
7746
  };
7650
7747
  url: {
7651
7748
  type: "string";
@@ -7748,10 +7845,9 @@ export declare const state: {
7748
7845
  type: "string";
7749
7846
  description: string;
7750
7847
  };
7751
- name: {
7848
+ key: {
7752
7849
  type: "string";
7753
7850
  description: string;
7754
- nullable: true;
7755
7851
  };
7756
7852
  url: {
7757
7853
  type: "string";
@@ -7815,7 +7911,7 @@ export declare const state: {
7815
7911
  };
7816
7912
  };
7817
7913
  };
7818
- updateFile: {
7914
+ updateFileMetadata: {
7819
7915
  name: string;
7820
7916
  path: string;
7821
7917
  description: string;
@@ -7871,10 +7967,9 @@ export declare const state: {
7871
7967
  type: "string";
7872
7968
  description: string;
7873
7969
  };
7874
- name: {
7970
+ key: {
7875
7971
  type: "string";
7876
7972
  description: string;
7877
- nullable: true;
7878
7973
  };
7879
7974
  url: {
7880
7975
  type: "string";
@@ -7998,11 +8093,6 @@ export declare const state: {
7998
8093
  type: "string";
7999
8094
  description: string;
8000
8095
  };
8001
- name: {
8002
- type: "string";
8003
- description: string;
8004
- nullable: true;
8005
- };
8006
8096
  tags: {
8007
8097
  type: "object";
8008
8098
  additionalProperties: {
@@ -8966,8 +9056,8 @@ export declare const state: {
8966
9056
  updateIntegrationBody: true;
8967
9057
  changeAISpendQuotaBody: true;
8968
9058
  introspectBody: true;
8969
- createFileBody: true;
8970
- updateFileBody: true;
9059
+ upsertFileBody: true;
9060
+ updateFileMetadataBody: true;
8971
9061
  getOrCreateTableBody: true;
8972
9062
  createTableBody: true;
8973
9063
  duplicateTableBody: true;
@@ -9056,6 +9146,7 @@ export declare const state: {
9056
9146
  updateWorkspaceResponse: true;
9057
9147
  checkHandleAvailabilityResponse: true;
9058
9148
  listWorkspacesResponse: true;
9149
+ listPublicWorkspacesResponse: true;
9059
9150
  deleteWorkspaceResponse: true;
9060
9151
  getAuditRecordsResponse: true;
9061
9152
  listWorkspaceMembersResponse: true;
@@ -9079,11 +9170,11 @@ export declare const state: {
9079
9170
  changeAISpendQuotaResponse: true;
9080
9171
  listActivitiesResponse: true;
9081
9172
  introspectResponse: true;
9082
- createFileResponse: true;
9173
+ upsertFileResponse: true;
9083
9174
  deleteFileResponse: true;
9084
9175
  listFilesResponse: true;
9085
9176
  getFileResponse: true;
9086
- updateFileResponse: true;
9177
+ updateFileMetadataResponse: true;
9087
9178
  searchFilesResponse: true;
9088
9179
  listTablesResponse: true;
9089
9180
  getTableResponse: true;
@@ -10941,10 +11032,9 @@ export declare const state: {
10941
11032
  type: "string";
10942
11033
  description: string;
10943
11034
  };
10944
- name: {
11035
+ key: {
10945
11036
  type: "string";
10946
11037
  description: string;
10947
- nullable: true;
10948
11038
  };
10949
11039
  url: {
10950
11040
  type: "string";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/api",
3
- "version": "0.30.0",
3
+ "version": "0.30.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {