@botpress/api 0.27.12 → 0.27.14

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
@@ -5931,15 +5931,15 @@ var require_assert = __commonJS({
5931
5931
  }
5932
5932
  });
5933
5933
 
5934
- // ../../node_modules/.pnpm/extsprintf@1.4.1/node_modules/extsprintf/lib/extsprintf.js
5934
+ // ../../node_modules/.pnpm/extsprintf@1.3.0/node_modules/extsprintf/lib/extsprintf.js
5935
5935
  var require_extsprintf = __commonJS({
5936
- "../../node_modules/.pnpm/extsprintf@1.4.1/node_modules/extsprintf/lib/extsprintf.js"(exports) {
5936
+ "../../node_modules/.pnpm/extsprintf@1.3.0/node_modules/extsprintf/lib/extsprintf.js"(exports) {
5937
5937
  var mod_assert = require("assert");
5938
5938
  var mod_util = require("util");
5939
5939
  exports.sprintf = jsSprintf;
5940
5940
  exports.printf = jsPrintf;
5941
5941
  exports.fprintf = jsFprintf;
5942
- function jsSprintf(ofmt) {
5942
+ function jsSprintf(fmt) {
5943
5943
  var regex = [
5944
5944
  "([^%]*)",
5945
5945
  "%",
@@ -5951,25 +5951,14 @@ var require_extsprintf = __commonJS({
5951
5951
  ].join("");
5952
5952
  var re = new RegExp(regex);
5953
5953
  var args = Array.prototype.slice.call(arguments, 1);
5954
- var fmt = ofmt;
5955
5954
  var flags, width, precision, conversion;
5956
5955
  var left, pad, sign, arg, match;
5957
5956
  var ret = "";
5958
5957
  var argn = 1;
5959
- var posn = 0;
5960
- var convposn;
5961
- var curconv;
5962
- mod_assert.equal(
5963
- "string",
5964
- typeof fmt,
5965
- "first argument must be a format string"
5966
- );
5958
+ mod_assert.equal("string", typeof fmt);
5967
5959
  while ((match = re.exec(fmt)) !== null) {
5968
5960
  ret += match[1];
5969
5961
  fmt = fmt.substring(match[0].length);
5970
- curconv = match[0].substring(match[1].length);
5971
- convposn = posn + match[1].length + 1;
5972
- posn += match[0].length;
5973
5962
  flags = match[2] || "";
5974
5963
  width = match[3] || 0;
5975
5964
  precision = match[4] || "";
@@ -5981,32 +5970,18 @@ var require_extsprintf = __commonJS({
5981
5970
  ret += "%";
5982
5971
  continue;
5983
5972
  }
5984
- if (args.length === 0) {
5985
- throw jsError(
5986
- ofmt,
5987
- convposn,
5988
- curconv,
5989
- "has no matching argument (too few arguments passed)"
5990
- );
5991
- }
5973
+ if (args.length === 0)
5974
+ throw new Error("too few args to sprintf");
5992
5975
  arg = args.shift();
5993
5976
  argn++;
5994
- if (flags.match(/[\' #]/)) {
5995
- throw jsError(
5996
- ofmt,
5997
- convposn,
5998
- curconv,
5999
- "uses unsupported flags"
5977
+ if (flags.match(/[\' #]/))
5978
+ throw new Error(
5979
+ "unsupported flags: " + flags
6000
5980
  );
6001
- }
6002
- if (precision.length > 0) {
6003
- throw jsError(
6004
- ofmt,
6005
- convposn,
6006
- curconv,
6007
- "uses non-zero precision (not supported)"
5981
+ if (precision.length > 0)
5982
+ throw new Error(
5983
+ "non-zero precision not supported"
6008
5984
  );
6009
- }
6010
5985
  if (flags.match(/-/))
6011
5986
  left = true;
6012
5987
  if (flags.match(/0/))
@@ -6015,14 +5990,8 @@ var require_extsprintf = __commonJS({
6015
5990
  sign = true;
6016
5991
  switch (conversion) {
6017
5992
  case "s":
6018
- if (arg === void 0 || arg === null) {
6019
- throw jsError(
6020
- ofmt,
6021
- convposn,
6022
- curconv,
6023
- "attempted to print undefined or null as a string (argument " + argn + " to sprintf)"
6024
- );
6025
- }
5993
+ if (arg === void 0 || arg === null)
5994
+ throw new Error("argument " + argn + ": attempted to print undefined or null as a string");
6026
5995
  ret += doPad(pad, width, left, arg.toString());
6027
5996
  break;
6028
5997
  case "d":
@@ -6048,24 +6017,12 @@ var require_extsprintf = __commonJS({
6048
6017
  ret += dumpException(arg);
6049
6018
  break;
6050
6019
  default:
6051
- throw jsError(
6052
- ofmt,
6053
- convposn,
6054
- curconv,
6055
- "is not supported"
6056
- );
6020
+ throw new Error("unsupported conversion: " + conversion);
6057
6021
  }
6058
6022
  }
6059
6023
  ret += fmt;
6060
6024
  return ret;
6061
6025
  }
6062
- function jsError(fmtstr, convposn, curconv, reason) {
6063
- mod_assert.equal(typeof fmtstr, "string");
6064
- mod_assert.equal(typeof curconv, "string");
6065
- mod_assert.equal(typeof convposn, "number");
6066
- mod_assert.equal(typeof reason, "string");
6067
- return new Error('format string "' + fmtstr + '": conversion specifier "' + curconv + '" at character ' + convposn + " " + reason);
6068
- }
6069
6026
  function jsPrintf() {
6070
6027
  var args = Array.prototype.slice.call(arguments);
6071
6028
  args.unshift(process.stdout);
@@ -279204,6 +279161,54 @@ var state = {
279204
279161
  }
279205
279162
  }
279206
279163
  },
279164
+ "getWorkspaceMember": {
279165
+ "name": "getWorkspaceMember",
279166
+ "description": "Get details of the account authenticating with this endpoint.",
279167
+ "section": "workspaceMember",
279168
+ "method": "get",
279169
+ "path": "/v1/admin/workspace-members/me",
279170
+ "response": {
279171
+ "description": "Success",
279172
+ "schema": {
279173
+ "type": "object",
279174
+ "properties": {
279175
+ "id": {
279176
+ "type": "string"
279177
+ },
279178
+ "userId": {
279179
+ "type": "string",
279180
+ "format": "uuid"
279181
+ },
279182
+ "email": {
279183
+ "type": "string"
279184
+ },
279185
+ "createdAt": {
279186
+ "type": "string"
279187
+ },
279188
+ "role": {
279189
+ "type": "string",
279190
+ "enum": [
279191
+ "viewer",
279192
+ "billing",
279193
+ "developer",
279194
+ "manager",
279195
+ "administrator",
279196
+ "owner"
279197
+ ]
279198
+ }
279199
+ },
279200
+ "required": [
279201
+ "id",
279202
+ "email",
279203
+ "createdAt",
279204
+ "role"
279205
+ ],
279206
+ "title": "getWorkspaceMemberResponse",
279207
+ "additionalProperties": false
279208
+ }
279209
+ },
279210
+ "parameters": {}
279211
+ },
279207
279212
  "deleteWorkspaceMember": {
279208
279213
  "name": "deleteWorkspaceMember",
279209
279214
  "description": "Remove a member of a workspace",
@@ -281649,15 +281654,15 @@ var state = {
281649
281654
  "type": "number",
281650
281655
  "description": "The total number of rows present in the table."
281651
281656
  },
281652
- "indexingCount": {
281657
+ "staleCount": {
281653
281658
  "type": "number",
281654
- "description": "The number of rows pending indexing, relevant for search functionalities."
281659
+ "description": "The number of stale rows that are waiting to be processed"
281655
281660
  }
281656
281661
  },
281657
281662
  "required": [
281658
281663
  "table",
281659
281664
  "rows",
281660
- "indexingCount"
281665
+ "staleCount"
281661
281666
  ],
281662
281667
  "title": "getTableResponse",
281663
281668
  "additionalProperties": false
@@ -281703,6 +281708,10 @@ var state = {
281703
281708
  "type": "string"
281704
281709
  },
281705
281710
  "description": "Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs."
281711
+ },
281712
+ "isComputeEnabled": {
281713
+ "type": "boolean",
281714
+ "description": "Indicates if the table is enabled for computation."
281706
281715
  }
281707
281716
  },
281708
281717
  "required": [
@@ -281729,16 +281738,16 @@ var state = {
281729
281738
  "type": "number",
281730
281739
  "description": "The total number of rows present in the table."
281731
281740
  },
281732
- "indexingCount": {
281741
+ "staleCount": {
281733
281742
  "type": "number",
281734
- "description": "The number of rows pending indexing, relevant for search functionalities."
281743
+ "description": "The number of stale rows that are waiting to be processed"
281735
281744
  }
281736
281745
  },
281737
281746
  "required": [
281738
281747
  "table",
281739
281748
  "created",
281740
281749
  "rows",
281741
- "indexingCount"
281750
+ "staleCount"
281742
281751
  ],
281743
281752
  "title": "getOrCreateTableResponse",
281744
281753
  "additionalProperties": false
@@ -281782,6 +281791,10 @@ var state = {
281782
281791
  "type": "string"
281783
281792
  },
281784
281793
  "description": "Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs."
281794
+ },
281795
+ "isComputeEnabled": {
281796
+ "type": "boolean",
281797
+ "description": "Indicates if the table is enabled for computation."
281785
281798
  }
281786
281799
  },
281787
281800
  "required": [
@@ -281904,6 +281917,10 @@ var state = {
281904
281917
  "type": "string"
281905
281918
  },
281906
281919
  "description": "Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs."
281920
+ },
281921
+ "isComputeEnabled": {
281922
+ "type": "boolean",
281923
+ "description": "Indicates if the table is enabled for computation."
281907
281924
  }
281908
281925
  },
281909
281926
  "title": "updateTableBody",
@@ -281918,6 +281935,13 @@ var state = {
281918
281935
  "properties": {
281919
281936
  "table": {
281920
281937
  "$ref": "#/components/schemas/Table"
281938
+ },
281939
+ "staleColumns": {
281940
+ "type": "array",
281941
+ "items": {
281942
+ "type": "string"
281943
+ },
281944
+ "description": "List of columns that have become stale following the modification."
281921
281945
  }
281922
281946
  },
281923
281947
  "required": [
@@ -282173,6 +282197,10 @@ var state = {
282173
282197
  },
282174
282198
  "minItems": 1,
282175
282199
  "maxItems": 1e3
282200
+ },
282201
+ "waitComputed": {
282202
+ "type": "boolean",
282203
+ "description": "Ensure computed columns are fully processed before returning the result. This is applicable only when the number of rows involved is fewer than 1."
282176
282204
  }
282177
282205
  },
282178
282206
  "required": [
@@ -282308,6 +282336,10 @@ var state = {
282308
282336
  "minItems": 1,
282309
282337
  "maxItems": 1e3,
282310
282338
  "description": "Rows with updated data, identified by ID."
282339
+ },
282340
+ "waitComputed": {
282341
+ "type": "boolean",
282342
+ "description": "Ensure computed columns are fully processed before returning the result. This is applicable only when the number of rows involved is fewer than 1."
282311
282343
  }
282312
282344
  },
282313
282345
  "required": [
@@ -282389,6 +282421,10 @@ var state = {
282389
282421
  "minLength": 1,
282390
282422
  "maxLength": 30,
282391
282423
  "description": 'Determines if a row is inserted or updated. Defaults to "id".'
282424
+ },
282425
+ "waitComputed": {
282426
+ "type": "boolean",
282427
+ "description": "Ensure computed columns are fully processed before returning the result. This is applicable only when the number of rows involved is fewer than 1."
282392
282428
  }
282393
282429
  },
282394
282430
  "required": [
@@ -282445,7 +282481,7 @@ var state = {
282445
282481
  "title": "Botpress API",
282446
282482
  "description": "API for Botpress Cloud",
282447
282483
  "server": "https://api.botpress.cloud",
282448
- "version": "0.27.12",
282484
+ "version": "0.27.14",
282449
282485
  "prefix": "v1"
282450
282486
  },
282451
282487
  "errors": [
@@ -282698,6 +282734,7 @@ var state = {
282698
282734
  "deleteWorkspaceResponse": true,
282699
282735
  "getAuditRecordsResponse": true,
282700
282736
  "listWorkspaceMembersResponse": true,
282737
+ "getWorkspaceMemberResponse": true,
282701
282738
  "deleteWorkspaceMemberResponse": true,
282702
282739
  "createWorkspaceMemberResponse": true,
282703
282740
  "updateWorkspaceMemberResponse": true,
@@ -284599,6 +284636,61 @@ var state = {
284599
284636
  "type": "boolean",
284600
284637
  "description": "Indicates if the column is vectorized and searchable."
284601
284638
  },
284639
+ "hidden": {
284640
+ "type": "boolean",
284641
+ "description": "Indicates if the field is hidden in the UI"
284642
+ },
284643
+ "order": {
284644
+ "type": "number",
284645
+ "description": "Order of the column in the UI"
284646
+ },
284647
+ "width": {
284648
+ "type": "number",
284649
+ "description": "Width of the column in the UI"
284650
+ },
284651
+ "computed": {
284652
+ "type": "object",
284653
+ "properties": {
284654
+ "action": {
284655
+ "type": "string",
284656
+ "enum": [
284657
+ "ai",
284658
+ "code"
284659
+ ]
284660
+ },
284661
+ "dependencies": {
284662
+ "default": [],
284663
+ "type": "array",
284664
+ "items": {
284665
+ "type": "string"
284666
+ }
284667
+ },
284668
+ "prompt": {
284669
+ "type": "string",
284670
+ "description": 'Prompt when action is "ai"'
284671
+ },
284672
+ "model": {
284673
+ "default": "gpt-3.5-turbo",
284674
+ "type": "string",
284675
+ "enum": [
284676
+ "gpt-3.5-turbo",
284677
+ "gpt-4-turbo"
284678
+ ],
284679
+ "description": 'Model to use when action is "ai"'
284680
+ },
284681
+ "code": {
284682
+ "type": "string",
284683
+ "description": 'Code to execute when action is "code"'
284684
+ },
284685
+ "enabled": {
284686
+ "type": "boolean"
284687
+ }
284688
+ },
284689
+ "required": [
284690
+ "action"
284691
+ ],
284692
+ "additionalProperties": false
284693
+ },
284602
284694
  "typings": {
284603
284695
  "type": "string",
284604
284696
  "description": 'TypeScript typings for the column. Recommended if the type is "object", ex: "\\{ foo: string; bar: number \\}"'
@@ -284654,6 +284746,10 @@ var state = {
284654
284746
  },
284655
284747
  "description": "Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs."
284656
284748
  },
284749
+ "isComputeEnabled": {
284750
+ "type": "boolean",
284751
+ "description": "Indicates if the table is enabled for computation."
284752
+ },
284657
284753
  "createdAt": {
284658
284754
  "type": "string",
284659
284755
  "format": "date-time",
@@ -284711,6 +284807,49 @@ var state = {
284711
284807
  "type": "string",
284712
284808
  "description": 'TypeScript typings for the column. Recommended if the type is "object", ex: "\\{ foo: string; bar: number \\}"'
284713
284809
  },
284810
+ "computed": {
284811
+ "type": "object",
284812
+ "properties": {
284813
+ "action": {
284814
+ "type": "string",
284815
+ "enum": [
284816
+ "ai",
284817
+ "code"
284818
+ ]
284819
+ },
284820
+ "dependencies": {
284821
+ "default": [],
284822
+ "type": "array",
284823
+ "items": {
284824
+ "type": "string"
284825
+ }
284826
+ },
284827
+ "prompt": {
284828
+ "type": "string",
284829
+ "description": 'Prompt when action is "ai"'
284830
+ },
284831
+ "model": {
284832
+ "default": "gpt-3.5-turbo",
284833
+ "type": "string",
284834
+ "enum": [
284835
+ "gpt-3.5-turbo",
284836
+ "gpt-4-turbo"
284837
+ ],
284838
+ "description": 'Model to use when action is "ai"'
284839
+ },
284840
+ "code": {
284841
+ "type": "string",
284842
+ "description": 'Code to execute when action is "code"'
284843
+ },
284844
+ "enabled": {
284845
+ "type": "boolean"
284846
+ }
284847
+ },
284848
+ "required": [
284849
+ "action"
284850
+ ],
284851
+ "additionalProperties": false
284852
+ },
284714
284853
  "schema": {
284715
284854
  "type": "object",
284716
284855
  "additionalProperties": true
@@ -284742,13 +284881,45 @@ var state = {
284742
284881
  "format": "date-time",
284743
284882
  "description": "Timestamp of the last row update."
284744
284883
  },
284884
+ "computed": {
284885
+ "type": "object",
284886
+ "additionalProperties": {
284887
+ "type": "object",
284888
+ "properties": {
284889
+ "status": {
284890
+ "type": "string"
284891
+ },
284892
+ "error": {
284893
+ "type": "string"
284894
+ },
284895
+ "updatedBy": {
284896
+ "type": "string"
284897
+ },
284898
+ "updatedAt": {
284899
+ "type": "string"
284900
+ }
284901
+ },
284902
+ "required": [
284903
+ "status"
284904
+ ],
284905
+ "additionalProperties": false
284906
+ }
284907
+ },
284908
+ "stale": {
284909
+ "type": "array",
284910
+ "items": {
284911
+ "type": "string"
284912
+ },
284913
+ "description": "[Read-only] List of stale values that are waiting to be recomputed."
284914
+ },
284745
284915
  "similarity": {
284746
284916
  "type": "number",
284747
284917
  "description": "Optional numeric value indicating similarity, when using findTableRows."
284748
284918
  }
284749
284919
  },
284750
284920
  "required": [
284751
- "id"
284921
+ "id",
284922
+ "computed"
284752
284923
  ],
284753
284924
  "additionalProperties": true
284754
284925
  }
@@ -285027,6 +285198,7 @@ var state = {
285027
285198
  "name": "workspaceMember",
285028
285199
  "operations": [
285029
285200
  "listWorkspaceMembers",
285201
+ "getWorkspaceMember",
285030
285202
  "deleteWorkspaceMember",
285031
285203
  "createWorkspaceMember",
285032
285204
  "updateWorkspaceMember"