@botpress/api 0.42.2 → 0.43.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
@@ -236173,9 +236173,9 @@ var require_js_tokens = __commonJS({
236173
236173
  }
236174
236174
  });
236175
236175
 
236176
- // ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.22.20/node_modules/@babel/helper-validator-identifier/lib/identifier.js
236176
+ // ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.24.7/node_modules/@babel/helper-validator-identifier/lib/identifier.js
236177
236177
  var require_identifier = __commonJS({
236178
- "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.22.20/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
236178
+ "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.24.7/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
236179
236179
  "use strict";
236180
236180
  Object.defineProperty(exports, "__esModule", {
236181
236181
  value: true
@@ -236258,9 +236258,9 @@ var require_identifier = __commonJS({
236258
236258
  }
236259
236259
  });
236260
236260
 
236261
- // ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.22.20/node_modules/@babel/helper-validator-identifier/lib/keyword.js
236261
+ // ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.24.7/node_modules/@babel/helper-validator-identifier/lib/keyword.js
236262
236262
  var require_keyword = __commonJS({
236263
- "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.22.20/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
236263
+ "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.24.7/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
236264
236264
  "use strict";
236265
236265
  Object.defineProperty(exports, "__esModule", {
236266
236266
  value: true
@@ -236296,9 +236296,9 @@ var require_keyword = __commonJS({
236296
236296
  }
236297
236297
  });
236298
236298
 
236299
- // ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.22.20/node_modules/@babel/helper-validator-identifier/lib/index.js
236299
+ // ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.24.7/node_modules/@babel/helper-validator-identifier/lib/index.js
236300
236300
  var require_lib4 = __commonJS({
236301
- "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.22.20/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
236301
+ "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.24.7/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
236302
236302
  "use strict";
236303
236303
  Object.defineProperty(exports, "__esModule", {
236304
236304
  value: true
@@ -236356,6 +236356,79 @@ var require_lib4 = __commonJS({
236356
236356
  }
236357
236357
  });
236358
236358
 
236359
+ // ../../node_modules/.pnpm/picocolors@1.1.0/node_modules/picocolors/picocolors.js
236360
+ var require_picocolors = __commonJS({
236361
+ "../../node_modules/.pnpm/picocolors@1.1.0/node_modules/picocolors/picocolors.js"(exports, module2) {
236362
+ var argv = process.argv || [];
236363
+ var env2 = process.env;
236364
+ var isColorSupported = !("NO_COLOR" in env2 || argv.includes("--no-color")) && ("FORCE_COLOR" in env2 || argv.includes("--color") || process.platform === "win32" || require != null && require("tty").isatty(1) && env2.TERM !== "dumb" || "CI" in env2);
236365
+ var formatter = (open, close, replace2 = open) => (input) => {
236366
+ let string = "" + input;
236367
+ let index = string.indexOf(close, open.length);
236368
+ return ~index ? open + replaceClose(string, close, replace2, index) + close : open + string + close;
236369
+ };
236370
+ var replaceClose = (string, close, replace2, index) => {
236371
+ let result = "";
236372
+ let cursor = 0;
236373
+ do {
236374
+ result += string.substring(cursor, index) + replace2;
236375
+ cursor = index + close.length;
236376
+ index = string.indexOf(close, cursor);
236377
+ } while (~index);
236378
+ return result + string.substring(cursor);
236379
+ };
236380
+ var createColors = (enabled = isColorSupported) => {
236381
+ let init = enabled ? formatter : () => String;
236382
+ return {
236383
+ isColorSupported: enabled,
236384
+ reset: init("\x1B[0m", "\x1B[0m"),
236385
+ bold: init("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
236386
+ dim: init("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
236387
+ italic: init("\x1B[3m", "\x1B[23m"),
236388
+ underline: init("\x1B[4m", "\x1B[24m"),
236389
+ inverse: init("\x1B[7m", "\x1B[27m"),
236390
+ hidden: init("\x1B[8m", "\x1B[28m"),
236391
+ strikethrough: init("\x1B[9m", "\x1B[29m"),
236392
+ black: init("\x1B[30m", "\x1B[39m"),
236393
+ red: init("\x1B[31m", "\x1B[39m"),
236394
+ green: init("\x1B[32m", "\x1B[39m"),
236395
+ yellow: init("\x1B[33m", "\x1B[39m"),
236396
+ blue: init("\x1B[34m", "\x1B[39m"),
236397
+ magenta: init("\x1B[35m", "\x1B[39m"),
236398
+ cyan: init("\x1B[36m", "\x1B[39m"),
236399
+ white: init("\x1B[37m", "\x1B[39m"),
236400
+ gray: init("\x1B[90m", "\x1B[39m"),
236401
+ bgBlack: init("\x1B[40m", "\x1B[49m"),
236402
+ bgRed: init("\x1B[41m", "\x1B[49m"),
236403
+ bgGreen: init("\x1B[42m", "\x1B[49m"),
236404
+ bgYellow: init("\x1B[43m", "\x1B[49m"),
236405
+ bgBlue: init("\x1B[44m", "\x1B[49m"),
236406
+ bgMagenta: init("\x1B[45m", "\x1B[49m"),
236407
+ bgCyan: init("\x1B[46m", "\x1B[49m"),
236408
+ bgWhite: init("\x1B[47m", "\x1B[49m"),
236409
+ blackBright: init("\x1B[90m", "\x1B[39m"),
236410
+ redBright: init("\x1B[91m", "\x1B[39m"),
236411
+ greenBright: init("\x1B[92m", "\x1B[39m"),
236412
+ yellowBright: init("\x1B[93m", "\x1B[39m"),
236413
+ blueBright: init("\x1B[94m", "\x1B[39m"),
236414
+ magentaBright: init("\x1B[95m", "\x1B[39m"),
236415
+ cyanBright: init("\x1B[96m", "\x1B[39m"),
236416
+ whiteBright: init("\x1B[97m", "\x1B[39m"),
236417
+ bgBlackBright: init("\x1B[100m", "\x1B[49m"),
236418
+ bgRedBright: init("\x1B[101m", "\x1B[49m"),
236419
+ bgGreenBright: init("\x1B[102m", "\x1B[49m"),
236420
+ bgYellowBright: init("\x1B[103m", "\x1B[49m"),
236421
+ bgBlueBright: init("\x1B[104m", "\x1B[49m"),
236422
+ bgMagentaBright: init("\x1B[105m", "\x1B[49m"),
236423
+ bgCyanBright: init("\x1B[106m", "\x1B[49m"),
236424
+ bgWhiteBright: init("\x1B[107m", "\x1B[49m")
236425
+ };
236426
+ };
236427
+ module2.exports = createColors();
236428
+ module2.exports.createColors = createColors;
236429
+ }
236430
+ });
236431
+
236359
236432
  // ../../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js
236360
236433
  var require_escape_string_regexp = __commonJS({
236361
236434
  "../../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js"(exports, module2) {
@@ -236897,9 +236970,9 @@ var require_chalk = __commonJS({
236897
236970
  }
236898
236971
  });
236899
236972
 
236900
- // ../../node_modules/.pnpm/@babel+highlight@7.23.4/node_modules/@babel/highlight/lib/index.js
236973
+ // ../../node_modules/.pnpm/@babel+highlight@7.24.7/node_modules/@babel/highlight/lib/index.js
236901
236974
  var require_lib5 = __commonJS({
236902
- "../../node_modules/.pnpm/@babel+highlight@7.23.4/node_modules/@babel/highlight/lib/index.js"(exports) {
236975
+ "../../node_modules/.pnpm/@babel+highlight@7.24.7/node_modules/@babel/highlight/lib/index.js"(exports) {
236903
236976
  "use strict";
236904
236977
  Object.defineProperty(exports, "__esModule", {
236905
236978
  value: true
@@ -236908,7 +236981,7 @@ var require_lib5 = __commonJS({
236908
236981
  exports.shouldHighlight = shouldHighlight;
236909
236982
  var _jsTokens = require_js_tokens();
236910
236983
  var _helperValidatorIdentifier = require_lib4();
236911
- var _chalk = _interopRequireWildcard(require_chalk(), true);
236984
+ var _picocolors = _interopRequireWildcard(require_picocolors(), true);
236912
236985
  function _getRequireWildcardCache(e) {
236913
236986
  if ("function" != typeof WeakMap)
236914
236987
  return null;
@@ -236927,24 +237000,26 @@ var require_lib5 = __commonJS({
236927
237000
  return t.get(e);
236928
237001
  var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor;
236929
237002
  for (var u in e)
236930
- if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
237003
+ if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
236931
237004
  var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
236932
237005
  i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
236933
237006
  }
236934
237007
  return n.default = e, t && t.set(e, n), n;
236935
237008
  }
237009
+ var colors = typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? (0, _picocolors.createColors)(false) : _picocolors.default;
237010
+ var compose = (f, g) => (v) => f(g(v));
236936
237011
  var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
236937
- function getDefs(chalk3) {
237012
+ function getDefs(colors2) {
236938
237013
  return {
236939
- keyword: chalk3.cyan,
236940
- capitalized: chalk3.yellow,
236941
- jsxIdentifier: chalk3.yellow,
236942
- punctuator: chalk3.yellow,
236943
- number: chalk3.magenta,
236944
- string: chalk3.green,
236945
- regex: chalk3.magenta,
236946
- comment: chalk3.grey,
236947
- invalid: chalk3.white.bgRed.bold
237014
+ keyword: colors2.cyan,
237015
+ capitalized: colors2.yellow,
237016
+ jsxIdentifier: colors2.yellow,
237017
+ punctuator: colors2.yellow,
237018
+ number: colors2.magenta,
237019
+ string: colors2.green,
237020
+ regex: colors2.magenta,
237021
+ comment: colors2.gray,
237022
+ invalid: compose(compose(colors2.white, colors2.bgRed), colors2.bold)
236948
237023
  };
236949
237024
  }
236950
237025
  var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
@@ -236957,7 +237032,7 @@ var require_lib5 = __commonJS({
236957
237032
  if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) {
236958
237033
  return "keyword";
236959
237034
  }
236960
- if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) == "</")) {
237035
+ if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) === "</")) {
236961
237036
  return "jsxIdentifier";
236962
237037
  }
236963
237038
  if (token.value[0] !== token.value[0].toLowerCase()) {
@@ -236999,37 +237074,49 @@ var require_lib5 = __commonJS({
236999
237074
  return highlighted;
237000
237075
  }
237001
237076
  function shouldHighlight(options) {
237002
- return _chalk.default.level > 0 || options.forceColor;
237077
+ return colors.isColorSupported || options.forceColor;
237003
237078
  }
237004
- var chalkWithForcedColor = void 0;
237005
- function getChalk(forceColor) {
237079
+ var pcWithForcedColor = void 0;
237080
+ function getColors(forceColor) {
237006
237081
  if (forceColor) {
237007
- var _chalkWithForcedColor;
237008
- (_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({
237009
- enabled: true,
237010
- level: 1
237011
- });
237012
- return chalkWithForcedColor;
237082
+ var _pcWithForcedColor;
237083
+ (_pcWithForcedColor = pcWithForcedColor) != null ? _pcWithForcedColor : pcWithForcedColor = (0, _picocolors.createColors)(true);
237084
+ return pcWithForcedColor;
237013
237085
  }
237014
- return _chalk.default;
237015
- }
237016
- {
237017
- exports.getChalk = (options) => getChalk(options.forceColor);
237086
+ return colors;
237018
237087
  }
237019
237088
  function highlight(code, options = {}) {
237020
237089
  if (code !== "" && shouldHighlight(options)) {
237021
- const defs = getDefs(getChalk(options.forceColor));
237090
+ const defs = getDefs(getColors(options.forceColor));
237022
237091
  return highlightTokens(defs, code);
237023
237092
  } else {
237024
237093
  return code;
237025
237094
  }
237026
237095
  }
237096
+ {
237097
+ let chalk3, chalkWithForcedColor;
237098
+ exports.getChalk = ({
237099
+ forceColor
237100
+ }) => {
237101
+ var _chalk;
237102
+ (_chalk = chalk3) != null ? _chalk : chalk3 = require_chalk();
237103
+ if (forceColor) {
237104
+ var _chalkWithForcedColor;
237105
+ (_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new chalk3.constructor({
237106
+ enabled: true,
237107
+ level: 1
237108
+ });
237109
+ return chalkWithForcedColor;
237110
+ }
237111
+ return chalk3;
237112
+ };
237113
+ }
237027
237114
  }
237028
237115
  });
237029
237116
 
237030
- // ../../node_modules/.pnpm/@babel+code-frame@7.23.5/node_modules/@babel/code-frame/lib/index.js
237117
+ // ../../node_modules/.pnpm/@babel+code-frame@7.24.7/node_modules/@babel/code-frame/lib/index.js
237031
237118
  var require_lib6 = __commonJS({
237032
- "../../node_modules/.pnpm/@babel+code-frame@7.23.5/node_modules/@babel/code-frame/lib/index.js"(exports) {
237119
+ "../../node_modules/.pnpm/@babel+code-frame@7.24.7/node_modules/@babel/code-frame/lib/index.js"(exports) {
237033
237120
  "use strict";
237034
237121
  Object.defineProperty(exports, "__esModule", {
237035
237122
  value: true
@@ -237037,7 +237124,7 @@ var require_lib6 = __commonJS({
237037
237124
  exports.codeFrameColumns = codeFrameColumns;
237038
237125
  exports.default = _default2;
237039
237126
  var _highlight = require_lib5();
237040
- var _chalk = _interopRequireWildcard(require_chalk(), true);
237127
+ var _picocolors = _interopRequireWildcard(require_picocolors(), true);
237041
237128
  function _getRequireWildcardCache(e) {
237042
237129
  if ("function" != typeof WeakMap)
237043
237130
  return null;
@@ -237056,30 +237143,29 @@ var require_lib6 = __commonJS({
237056
237143
  return t.get(e);
237057
237144
  var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor;
237058
237145
  for (var u in e)
237059
- if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
237146
+ if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
237060
237147
  var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
237061
237148
  i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
237062
237149
  }
237063
237150
  return n.default = e, t && t.set(e, n), n;
237064
237151
  }
237065
- var chalkWithForcedColor = void 0;
237066
- function getChalk(forceColor) {
237152
+ var colors = typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? (0, _picocolors.createColors)(false) : _picocolors.default;
237153
+ var compose = (f, g) => (v) => f(g(v));
237154
+ var pcWithForcedColor = void 0;
237155
+ function getColors(forceColor) {
237067
237156
  if (forceColor) {
237068
- var _chalkWithForcedColor;
237069
- (_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({
237070
- enabled: true,
237071
- level: 1
237072
- });
237073
- return chalkWithForcedColor;
237157
+ var _pcWithForcedColor;
237158
+ (_pcWithForcedColor = pcWithForcedColor) != null ? _pcWithForcedColor : pcWithForcedColor = (0, _picocolors.createColors)(true);
237159
+ return pcWithForcedColor;
237074
237160
  }
237075
- return _chalk.default;
237161
+ return colors;
237076
237162
  }
237077
237163
  var deprecationWarningShown = false;
237078
- function getDefs(chalk3) {
237164
+ function getDefs(colors2) {
237079
237165
  return {
237080
- gutter: chalk3.grey,
237081
- marker: chalk3.red.bold,
237082
- message: chalk3.red.bold
237166
+ gutter: colors2.gray,
237167
+ marker: compose(colors2.red, colors2.bold),
237168
+ message: compose(colors2.red, colors2.bold)
237083
237169
  };
237084
237170
  }
237085
237171
  var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
@@ -237141,10 +237227,10 @@ var require_lib6 = __commonJS({
237141
237227
  }
237142
237228
  function codeFrameColumns(rawLines, loc, opts = {}) {
237143
237229
  const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
237144
- const chalk3 = getChalk(opts.forceColor);
237145
- const defs = getDefs(chalk3);
237146
- const maybeHighlight = (chalkFn, string) => {
237147
- return highlighted ? chalkFn(string) : string;
237230
+ const colors2 = getColors(opts.forceColor);
237231
+ const defs = getDefs(colors2);
237232
+ const maybeHighlight = (fmt, string) => {
237233
+ return highlighted ? fmt(string) : string;
237148
237234
  };
237149
237235
  const lines = rawLines.split(NEWLINE);
237150
237236
  const {
@@ -237181,7 +237267,7 @@ var require_lib6 = __commonJS({
237181
237267
  ${frame}`;
237182
237268
  }
237183
237269
  if (highlighted) {
237184
- return chalk3.reset(frame);
237270
+ return colors2.reset(frame);
237185
237271
  } else {
237186
237272
  return frame;
237187
237273
  }
@@ -292565,13 +292651,20 @@ var state = {
292565
292651
  },
292566
292652
  "tags": {
292567
292653
  "in": "query",
292568
- "description": "Filter files by tags. Tags should be passed as a URL-encoded JSON object of key-value pairs that must be present in the tags of a file.",
292654
+ "description": "Filter files by tags. Tags should be passed as a URL-encoded JSON object of key-value pairs that must be present in the tags of a file. An array of multiple string values for the same key are treated as an OR condition. To exclude a value, express it as an object with a nested `not` key with the string or string-array value(s) to exclude.",
292655
+ "type": "object",
292656
+ "schema": {}
292657
+ },
292658
+ "ids": {
292659
+ "in": "query",
292660
+ "description": "Filter files by IDs.",
292569
292661
  "type": "object",
292570
292662
  "schema": {
292571
- "type": "object",
292572
- "additionalProperties": {
292663
+ "type": "array",
292664
+ "items": {
292573
292665
  "type": "string"
292574
- }
292666
+ },
292667
+ "maxItems": 50
292575
292668
  }
292576
292669
  }
292577
292670
  },
@@ -292989,14 +293082,9 @@ var state = {
292989
293082
  "parameters": {
292990
293083
  "tags": {
292991
293084
  "in": "query",
292992
- "description": "Filter files by tags. Tags should be passed as a URL-encoded JSON object of key-value pairs that must be present in the tags of a file.",
293085
+ "description": "Filter files by tags. Tags should be passed as a URL-encoded JSON object of key-value pairs that must be present in the tags of a file. An array of multiple string values for the same key are treated as an OR condition. To exclude a value, express it as an object with a nested `not` key with the string or string-array value(s) to exclude.",
292993
293086
  "type": "object",
292994
- "schema": {
292995
- "type": "object",
292996
- "additionalProperties": {
292997
- "type": "string"
292998
- }
292999
- }
293087
+ "schema": {}
293000
293088
  },
293001
293089
  "query": {
293002
293090
  "in": "query",
@@ -294144,7 +294232,7 @@ var state = {
294144
294232
  "title": "Botpress API",
294145
294233
  "description": "API for Botpress Cloud",
294146
294234
  "server": "https://api.botpress.cloud",
294147
- "version": "0.42.2",
294235
+ "version": "0.43.0",
294148
294236
  "prefix": "v1"
294149
294237
  },
294150
294238
  "errors": [
@@ -8812,14 +8812,21 @@ export declare const state: {
8812
8812
  type: "string";
8813
8813
  };
8814
8814
  tags: {
8815
+ in: "query";
8816
+ description: string;
8817
+ type: "object";
8818
+ schema: {};
8819
+ };
8820
+ ids: {
8815
8821
  in: "query";
8816
8822
  description: string;
8817
8823
  type: "object";
8818
8824
  schema: {
8819
- type: "object";
8820
- additionalProperties: {
8825
+ type: "array";
8826
+ items: {
8821
8827
  type: "string";
8822
8828
  };
8829
+ maxItems: number;
8823
8830
  };
8824
8831
  };
8825
8832
  };
@@ -9160,12 +9167,7 @@ export declare const state: {
9160
9167
  in: "query";
9161
9168
  description: string;
9162
9169
  type: "object";
9163
- schema: {
9164
- type: "object";
9165
- additionalProperties: {
9166
- type: "string";
9167
- };
9168
- };
9170
+ schema: {};
9169
9171
  };
9170
9172
  query: {
9171
9173
  in: "query";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/api",
3
- "version": "0.42.2",
3
+ "version": "0.43.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {