@botpress/api 0.3.0 → 0.3.1

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
@@ -228668,8 +228668,12 @@ var state = {
228668
228668
  updatedAt: {
228669
228669
  type: "string"
228670
228670
  },
228671
+ botCount: {
228672
+ type: "number"
228673
+ },
228671
228674
  accountType: {
228672
- type: "string"
228675
+ type: "string",
228676
+ enum: ["free", "premium"]
228673
228677
  },
228674
228678
  blocked: {
228675
228679
  type: "boolean"
@@ -228684,6 +228688,7 @@ var state = {
228684
228688
  "ownerId",
228685
228689
  "createdAt",
228686
228690
  "updatedAt",
228691
+ "botCount",
228687
228692
  "accountType",
228688
228693
  "blocked",
228689
228694
  "spendingLimit"
@@ -228693,6 +228698,92 @@ var state = {
228693
228698
  }
228694
228699
  }
228695
228700
  },
228701
+ updateWorkspace: {
228702
+ name: "updateWorkspace",
228703
+ description: "Update workspace",
228704
+ method: "put",
228705
+ path: "/v1/admin/workspaces/{id}",
228706
+ parameters: {
228707
+ id: {
228708
+ type: "string",
228709
+ description: "Workspace ID",
228710
+ in: "path"
228711
+ }
228712
+ },
228713
+ requestBody: {
228714
+ description: "Workspace metadata",
228715
+ schema: {
228716
+ type: "object",
228717
+ properties: {
228718
+ name: {
228719
+ type: "string",
228720
+ minLength: 1,
228721
+ maxLength: 64
228722
+ },
228723
+ accountType: {
228724
+ type: "string",
228725
+ enum: ["free", "premium"]
228726
+ },
228727
+ spendingLimit: {
228728
+ type: "number",
228729
+ minimum: 5,
228730
+ maximum: 1e3
228731
+ }
228732
+ },
228733
+ title: "updateWorkspaceBody",
228734
+ additionalProperties: false
228735
+ }
228736
+ },
228737
+ response: {
228738
+ description: "Success",
228739
+ schema: {
228740
+ type: "object",
228741
+ properties: {
228742
+ id: {
228743
+ type: "string"
228744
+ },
228745
+ name: {
228746
+ type: "string"
228747
+ },
228748
+ ownerId: {
228749
+ type: "string"
228750
+ },
228751
+ createdAt: {
228752
+ type: "string"
228753
+ },
228754
+ updatedAt: {
228755
+ type: "string"
228756
+ },
228757
+ botCount: {
228758
+ type: "number"
228759
+ },
228760
+ accountType: {
228761
+ type: "string",
228762
+ enum: ["free", "premium"]
228763
+ },
228764
+ blocked: {
228765
+ type: "boolean"
228766
+ },
228767
+ spendingLimit: {
228768
+ type: "number"
228769
+ }
228770
+ },
228771
+ required: [
228772
+ "id",
228773
+ "name",
228774
+ "ownerId",
228775
+ "createdAt",
228776
+ "updatedAt",
228777
+ "botCount",
228778
+ "accountType",
228779
+ "blocked",
228780
+ "spendingLimit"
228781
+ ],
228782
+ title: "updateWorkspaceResponse",
228783
+ additionalProperties: false
228784
+ }
228785
+ }
228786
+ },
228696
228787
  listWorkspaces: {
228697
228788
  name: "listWorkspaces",
228698
228789
  description: "List workspaces the user has access to",
@@ -228732,9 +228823,24 @@ var state = {
228732
228823
  },
228733
228824
  updatedAt: {
228734
228825
  type: "string"
228826
+ },
228827
+ botCount: {
228828
+ type: "number"
228829
+ },
228830
+ accountType: {
228831
+ type: "string",
228832
+ enum: ["free", "premium"]
228735
228833
  }
228736
228834
  },
228737
- required: ["id", "name", "ownerId", "createdAt", "updatedAt"]
228835
+ required: [
228836
+ "id",
228837
+ "name",
228838
+ "ownerId",
228839
+ "createdAt",
228840
+ "updatedAt",
228841
+ "botCount",
228842
+ "accountType"
228843
+ ]
228738
228844
  }
228739
228845
  },
228740
228846
  meta: {
@@ -229557,6 +229663,222 @@ var state = {
229557
229663
  }
229558
229664
  }
229559
229665
  },
229666
+ listWorkspaceMembers: {
229667
+ name: "listWorkspaceMembers",
229668
+ description: "Lists all the members in a workspace",
229669
+ method: "get",
229670
+ path: "/v1/admin/workspace-members",
229671
+ parameters: {
229672
+ nextToken: {
229673
+ in: "query",
229674
+ description: "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
229675
+ type: "string"
229676
+ }
229677
+ },
229678
+ response: {
229679
+ description: "Success",
229680
+ schema: {
229681
+ type: "object",
229682
+ properties: {
229683
+ members: {
229684
+ type: "array",
229685
+ items: {
229686
+ type: "object",
229687
+ properties: {
229688
+ id: {
229689
+ type: "string"
229690
+ },
229691
+ userId: {
229692
+ type: "string",
229693
+ format: "uuid"
229694
+ },
229695
+ email: {
229696
+ type: "string"
229697
+ },
229698
+ role: {
229699
+ type: "string",
229700
+ enum: [
229701
+ "viewer",
229702
+ "billing",
229703
+ "developer",
229704
+ "manager",
229705
+ "administrator",
229706
+ "owner"
229707
+ ]
229708
+ }
229709
+ },
229710
+ required: ["id", "email", "role"]
229711
+ }
229712
+ },
229713
+ meta: {
229714
+ type: "object",
229715
+ properties: {
229716
+ nextToken: {
229717
+ type: "string",
229718
+ 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."
229719
+ }
229720
+ },
229721
+ additionalProperties: false
229722
+ }
229723
+ },
229724
+ required: ["members", "meta"],
229725
+ title: "listWorkspaceMembersResponse",
229726
+ additionalProperties: false
229727
+ }
229728
+ }
229729
+ },
229730
+ deleteWorkspaceMember: {
229731
+ name: "deleteWorkspaceMember",
229732
+ description: "Remove a member of a workspace",
229733
+ method: "delete",
229734
+ path: "/v1/admin/workspace-members/{id}",
229735
+ parameters: {
229736
+ id: {
229737
+ type: "string",
229738
+ description: "Workspace member ID",
229739
+ in: "path"
229740
+ }
229741
+ },
229742
+ response: {
229743
+ description: "Success",
229744
+ schema: {
229745
+ type: "object",
229746
+ title: "deleteWorkspaceMemberResponse",
229747
+ additionalProperties: false
229748
+ }
229749
+ }
229750
+ },
229751
+ createWorkspaceMember: {
229752
+ name: "createWorkspaceMember",
229753
+ description: "Add a member to the workspace",
229754
+ method: "post",
229755
+ path: "/v1/admin/workspace-members",
229756
+ requestBody: {
229757
+ description: "Workspace member metadata",
229758
+ schema: {
229759
+ type: "object",
229760
+ properties: {
229761
+ email: {
229762
+ type: "string",
229763
+ format: "email"
229764
+ },
229765
+ role: {
229766
+ type: "string",
229767
+ enum: [
229768
+ "viewer",
229769
+ "billing",
229770
+ "developer",
229771
+ "manager",
229772
+ "administrator",
229773
+ "owner"
229774
+ ]
229775
+ }
229776
+ },
229777
+ required: ["email", "role"],
229778
+ title: "createWorkspaceMemberBody",
229779
+ additionalProperties: false
229780
+ }
229781
+ },
229782
+ response: {
229783
+ description: "Success",
229784
+ schema: {
229785
+ type: "object",
229786
+ properties: {
229787
+ id: {
229788
+ type: "string"
229789
+ },
229790
+ userId: {
229791
+ type: "string",
229792
+ format: "uuid"
229793
+ },
229794
+ email: {
229795
+ type: "string"
229796
+ },
229797
+ role: {
229798
+ type: "string",
229799
+ enum: [
229800
+ "viewer",
229801
+ "billing",
229802
+ "developer",
229803
+ "manager",
229804
+ "administrator",
229805
+ "owner"
229806
+ ]
229807
+ }
229808
+ },
229809
+ required: ["id", "email", "role"],
229810
+ title: "createWorkspaceMemberResponse",
229811
+ additionalProperties: false
229812
+ }
229813
+ },
229814
+ parameters: {}
229815
+ },
229816
+ updateWorkspaceMember: {
229817
+ name: "updateWorkspaceMember",
229818
+ description: "Update the member of a workspace",
229819
+ method: "put",
229820
+ path: "/v1/admin/workspace-members/{id}",
229821
+ parameters: {
229822
+ id: {
229823
+ type: "string",
229824
+ description: "Workspace member ID",
229825
+ in: "path"
229826
+ }
229827
+ },
229828
+ requestBody: {
229829
+ description: "Workspace member metadata",
229830
+ schema: {
229831
+ type: "object",
229832
+ properties: {
229833
+ role: {
229834
+ type: "string",
229835
+ enum: [
229836
+ "viewer",
229837
+ "billing",
229838
+ "developer",
229839
+ "manager",
229840
+ "administrator",
229841
+ "owner"
229842
+ ]
229843
+ }
229844
+ },
229845
+ title: "updateWorkspaceMemberBody",
229846
+ additionalProperties: false
229847
+ }
229848
+ },
229849
+ response: {
229850
+ description: "Success",
229851
+ schema: {
229852
+ type: "object",
229853
+ properties: {
229854
+ id: {
229855
+ type: "string"
229856
+ },
229857
+ userId: {
229858
+ type: "string",
229859
+ format: "uuid"
229860
+ },
229861
+ email: {
229862
+ type: "string"
229863
+ },
229864
+ role: {
229865
+ type: "string",
229866
+ enum: [
229867
+ "viewer",
229868
+ "billing",
229869
+ "developer",
229870
+ "manager",
229871
+ "administrator",
229872
+ "owner"
229873
+ ]
229874
+ }
229875
+ },
229876
+ required: ["id", "email", "role"],
229877
+ title: "updateWorkspaceMemberResponse",
229878
+ additionalProperties: false
229879
+ }
229880
+ }
229881
+ },
229560
229882
  introspect: {
229561
229883
  name: "introspect",
229562
229884
  description: "Introspect the API",
@@ -229775,7 +230097,7 @@ var state = {
229775
230097
  title: "Botpress API",
229776
230098
  description: "API for Botpress Cloud",
229777
230099
  server: "https://api.botpress.cloud",
229778
- version: "0.2.2",
230100
+ version: "0.3.1",
229779
230101
  prefix: "v1"
229780
230102
  },
229781
230103
  errors: [
@@ -229880,8 +230202,11 @@ var state = {
229880
230202
  createBotBody: true,
229881
230203
  updateBotBody: true,
229882
230204
  transferBotBody: true,
230205
+ updateWorkspaceBody: true,
229883
230206
  createIntegrationBody: true,
229884
230207
  updateIntegrationBody: true,
230208
+ createWorkspaceMemberBody: true,
230209
+ updateWorkspaceMemberBody: true,
229885
230210
  introspectBody: true,
229886
230211
  createFileBody: true
229887
230212
  },
@@ -229925,6 +230250,7 @@ var state = {
229925
230250
  getBotWebchatResponse: true,
229926
230251
  getBotAnalyticsResponse: true,
229927
230252
  getWorkspaceResponse: true,
230253
+ updateWorkspaceResponse: true,
229928
230254
  listWorkspacesResponse: true,
229929
230255
  createIntegrationResponse: true,
229930
230256
  updateIntegrationResponse: true,
@@ -229933,6 +230259,10 @@ var state = {
229933
230259
  getIntegrationLogsResponse: true,
229934
230260
  getIntegrationByNameResponse: true,
229935
230261
  deleteIntegrationResponse: true,
230262
+ listWorkspaceMembersResponse: true,
230263
+ deleteWorkspaceMemberResponse: true,
230264
+ createWorkspaceMemberResponse: true,
230265
+ updateWorkspaceMemberResponse: true,
229936
230266
  introspectResponse: true,
229937
230267
  createFileResponse: true,
229938
230268
  getFileResponse: true,
@@ -230560,8 +230890,12 @@ var state = {
230560
230890
  updatedAt: {
230561
230891
  type: "string"
230562
230892
  },
230893
+ botCount: {
230894
+ type: "number"
230895
+ },
230563
230896
  accountType: {
230564
- type: "string"
230897
+ type: "string",
230898
+ enum: ["free", "premium"]
230565
230899
  },
230566
230900
  blocked: {
230567
230901
  type: "boolean"
@@ -230576,6 +230910,7 @@ var state = {
230576
230910
  "ownerId",
230577
230911
  "createdAt",
230578
230912
  "updatedAt",
230913
+ "botCount",
230579
230914
  "accountType",
230580
230915
  "blocked",
230581
230916
  "spendingLimit"
package/package.json CHANGED
@@ -1,16 +1,8 @@
1
1
  {
2
2
  "name": "@botpress/api",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
- "scripts": {
7
- "openapi": "es-node openapi/generator.ts && pnpm run build",
8
- "openapi:lint": "spectral lint --fail-severity warn --ruleset ../../.spectral.yaml src/gen/openapi.json",
9
- "type-check": "tsc --noEmit",
10
- "build:type": "tsc -p tsconfig.package.json --emitDeclarationOnly",
11
- "build:impl": "esbuild --bundle --platform=node --outfile=dist/index.js src/index.ts",
12
- "build": "pnpm run build:type && pnpm run build:impl"
13
- },
14
6
  "devDependencies": {
15
7
  "esbuild": "^0.16.10",
16
8
  "esb-node": "0.0.1",
@@ -22,5 +14,13 @@
22
14
  },
23
15
  "dependencies": {
24
16
  "@bpinternal/opapi": "0.2.1"
17
+ },
18
+ "scripts": {
19
+ "openapi": "es-node openapi/generator.ts && pnpm run build",
20
+ "openapi:lint": "spectral lint --fail-severity warn --ruleset ../../.spectral.yaml src/gen/openapi.json",
21
+ "type-check": "tsc --noEmit",
22
+ "build:type": "tsc -p tsconfig.package.json --emitDeclarationOnly",
23
+ "build:impl": "esbuild --bundle --platform=node --outfile=dist/index.js src/index.ts",
24
+ "build": "pnpm run build:type && pnpm run build:impl"
25
25
  }
26
- }
26
+ }