@botpress/api 0.29.4 → 0.29.6

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);
@@ -267494,6 +267451,74 @@ var state = {
267494
267451
  "maxLength": 200,
267495
267452
  "description": "Version of the [Integration](#schema_integration)"
267496
267453
  },
267454
+ "interfaces": {
267455
+ "type": "object",
267456
+ "additionalProperties": {
267457
+ "type": "object",
267458
+ "properties": {
267459
+ "id": {
267460
+ "type": "string",
267461
+ "minLength": 28,
267462
+ "maxLength": 36
267463
+ },
267464
+ "entities": {
267465
+ "type": "object",
267466
+ "additionalProperties": {
267467
+ "type": "object",
267468
+ "properties": {
267469
+ "name": {
267470
+ "type": "string",
267471
+ "maxLength": 200
267472
+ }
267473
+ },
267474
+ "required": [
267475
+ "name"
267476
+ ],
267477
+ "additionalProperties": false
267478
+ }
267479
+ },
267480
+ "actions": {
267481
+ "type": "object",
267482
+ "additionalProperties": {
267483
+ "type": "object",
267484
+ "properties": {
267485
+ "name": {
267486
+ "type": "string",
267487
+ "maxLength": 200
267488
+ }
267489
+ },
267490
+ "required": [
267491
+ "name"
267492
+ ],
267493
+ "additionalProperties": false
267494
+ }
267495
+ },
267496
+ "events": {
267497
+ "type": "object",
267498
+ "additionalProperties": {
267499
+ "type": "object",
267500
+ "properties": {
267501
+ "name": {
267502
+ "type": "string",
267503
+ "maxLength": 200
267504
+ }
267505
+ },
267506
+ "required": [
267507
+ "name"
267508
+ ],
267509
+ "additionalProperties": false
267510
+ }
267511
+ }
267512
+ },
267513
+ "required": [
267514
+ "id",
267515
+ "entities",
267516
+ "actions",
267517
+ "events"
267518
+ ],
267519
+ "additionalProperties": false
267520
+ }
267521
+ },
267497
267522
  "configuration": {
267498
267523
  "type": "object",
267499
267524
  "properties": {
@@ -267900,6 +267925,7 @@ var state = {
267900
267925
  "url",
267901
267926
  "name",
267902
267927
  "version",
267928
+ "interfaces",
267903
267929
  "configuration",
267904
267930
  "channels",
267905
267931
  "states",
@@ -268004,6 +268030,74 @@ var state = {
268004
268030
  "maxLength": 200,
268005
268031
  "description": "Version of the [Integration](#schema_integration)"
268006
268032
  },
268033
+ "interfaces": {
268034
+ "type": "object",
268035
+ "additionalProperties": {
268036
+ "type": "object",
268037
+ "properties": {
268038
+ "id": {
268039
+ "type": "string",
268040
+ "minLength": 28,
268041
+ "maxLength": 36
268042
+ },
268043
+ "entities": {
268044
+ "type": "object",
268045
+ "additionalProperties": {
268046
+ "type": "object",
268047
+ "properties": {
268048
+ "name": {
268049
+ "type": "string",
268050
+ "maxLength": 200
268051
+ }
268052
+ },
268053
+ "required": [
268054
+ "name"
268055
+ ],
268056
+ "additionalProperties": false
268057
+ }
268058
+ },
268059
+ "actions": {
268060
+ "type": "object",
268061
+ "additionalProperties": {
268062
+ "type": "object",
268063
+ "properties": {
268064
+ "name": {
268065
+ "type": "string",
268066
+ "maxLength": 200
268067
+ }
268068
+ },
268069
+ "required": [
268070
+ "name"
268071
+ ],
268072
+ "additionalProperties": false
268073
+ }
268074
+ },
268075
+ "events": {
268076
+ "type": "object",
268077
+ "additionalProperties": {
268078
+ "type": "object",
268079
+ "properties": {
268080
+ "name": {
268081
+ "type": "string",
268082
+ "maxLength": 200
268083
+ }
268084
+ },
268085
+ "required": [
268086
+ "name"
268087
+ ],
268088
+ "additionalProperties": false
268089
+ }
268090
+ }
268091
+ },
268092
+ "required": [
268093
+ "id",
268094
+ "entities",
268095
+ "actions",
268096
+ "events"
268097
+ ],
268098
+ "additionalProperties": false
268099
+ }
268100
+ },
268007
268101
  "configuration": {
268008
268102
  "type": "object",
268009
268103
  "properties": {
@@ -268410,6 +268504,7 @@ var state = {
268410
268504
  "url",
268411
268505
  "name",
268412
268506
  "version",
268507
+ "interfaces",
268413
268508
  "configuration",
268414
268509
  "channels",
268415
268510
  "states",
@@ -271750,6 +271845,74 @@ var state = {
271750
271845
  "maxLength": 200,
271751
271846
  "description": "Version of the [Integration](#schema_integration)"
271752
271847
  },
271848
+ "interfaces": {
271849
+ "type": "object",
271850
+ "additionalProperties": {
271851
+ "type": "object",
271852
+ "properties": {
271853
+ "id": {
271854
+ "type": "string",
271855
+ "minLength": 28,
271856
+ "maxLength": 36
271857
+ },
271858
+ "entities": {
271859
+ "type": "object",
271860
+ "additionalProperties": {
271861
+ "type": "object",
271862
+ "properties": {
271863
+ "name": {
271864
+ "type": "string",
271865
+ "maxLength": 200
271866
+ }
271867
+ },
271868
+ "required": [
271869
+ "name"
271870
+ ],
271871
+ "additionalProperties": false
271872
+ }
271873
+ },
271874
+ "actions": {
271875
+ "type": "object",
271876
+ "additionalProperties": {
271877
+ "type": "object",
271878
+ "properties": {
271879
+ "name": {
271880
+ "type": "string",
271881
+ "maxLength": 200
271882
+ }
271883
+ },
271884
+ "required": [
271885
+ "name"
271886
+ ],
271887
+ "additionalProperties": false
271888
+ }
271889
+ },
271890
+ "events": {
271891
+ "type": "object",
271892
+ "additionalProperties": {
271893
+ "type": "object",
271894
+ "properties": {
271895
+ "name": {
271896
+ "type": "string",
271897
+ "maxLength": 200
271898
+ }
271899
+ },
271900
+ "required": [
271901
+ "name"
271902
+ ],
271903
+ "additionalProperties": false
271904
+ }
271905
+ }
271906
+ },
271907
+ "required": [
271908
+ "id",
271909
+ "entities",
271910
+ "actions",
271911
+ "events"
271912
+ ],
271913
+ "additionalProperties": false
271914
+ }
271915
+ },
271753
271916
  "configuration": {
271754
271917
  "type": "object",
271755
271918
  "properties": {
@@ -272508,6 +272671,75 @@ var state = {
272508
272671
  "additionalProperties": false
272509
272672
  }
272510
272673
  },
272674
+ "interfaces": {
272675
+ "type": "object",
272676
+ "additionalProperties": {
272677
+ "type": "object",
272678
+ "properties": {
272679
+ "id": {
272680
+ "type": "string",
272681
+ "minLength": 28,
272682
+ "maxLength": 36
272683
+ },
272684
+ "entities": {
272685
+ "type": "object",
272686
+ "additionalProperties": {
272687
+ "type": "object",
272688
+ "properties": {
272689
+ "name": {
272690
+ "type": "string",
272691
+ "maxLength": 200
272692
+ }
272693
+ },
272694
+ "required": [
272695
+ "name"
272696
+ ],
272697
+ "additionalProperties": false
272698
+ }
272699
+ },
272700
+ "actions": {
272701
+ "type": "object",
272702
+ "additionalProperties": {
272703
+ "type": "object",
272704
+ "properties": {
272705
+ "name": {
272706
+ "type": "string",
272707
+ "maxLength": 200
272708
+ }
272709
+ },
272710
+ "required": [
272711
+ "name"
272712
+ ],
272713
+ "additionalProperties": false
272714
+ }
272715
+ },
272716
+ "events": {
272717
+ "type": "object",
272718
+ "additionalProperties": {
272719
+ "type": "object",
272720
+ "properties": {
272721
+ "name": {
272722
+ "type": "string",
272723
+ "maxLength": 200
272724
+ }
272725
+ },
272726
+ "required": [
272727
+ "name"
272728
+ ],
272729
+ "additionalProperties": false
272730
+ }
272731
+ }
272732
+ },
272733
+ "required": [
272734
+ "id",
272735
+ "entities",
272736
+ "actions",
272737
+ "events"
272738
+ ],
272739
+ "nullable": true,
272740
+ "additionalProperties": false
272741
+ }
272742
+ },
272511
272743
  "secrets": {
272512
272744
  "type": "object",
272513
272745
  "additionalProperties": {
@@ -273116,7 +273348,7 @@ var state = {
273116
273348
  "type": "string",
273117
273349
  "maxLength": 1e3
273118
273350
  },
273119
- "description": "File tags as an object of key/value pairs"
273351
+ "description": "File tags as an object of key-value pairs. Tag values should be of `string` (text) type."
273120
273352
  },
273121
273353
  "size": {
273122
273354
  "type": "number",
@@ -273296,7 +273528,7 @@ var state = {
273296
273528
  },
273297
273529
  "tags": {
273298
273530
  "in": "query",
273299
- "description": "Filter by tags",
273531
+ "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.",
273300
273532
  "type": "object",
273301
273533
  "schema": {
273302
273534
  "type": "object",
@@ -273573,7 +273805,7 @@ var state = {
273573
273805
  "maxLength": 1e3,
273574
273806
  "nullable": true
273575
273807
  },
273576
- "description": "The file tags to update as an object of key/value pairs with string (text) values. Omit to keep existing tags intact. Any existing tags not included will be preserved. New tags will be added. To delete a tag, set its value to `null`."
273808
+ "description": "The file tags to update as an object of key-value pairs with `string` (text) values. Omit to keep existing tags intact. Any existing tags not included will be preserved. New tags will be added. To delete a tag, set its value to `null`."
273577
273809
  },
273578
273810
  "accessPolicies": {
273579
273811
  "type": "array",
@@ -273708,7 +273940,7 @@ var state = {
273708
273940
  "parameters": {
273709
273941
  "tags": {
273710
273942
  "in": "query",
273711
- "description": "Filter by tags",
273943
+ "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.",
273712
273944
  "type": "object",
273713
273945
  "schema": {
273714
273946
  "type": "object",
@@ -273770,7 +274002,7 @@ var state = {
273770
274002
  "type": "string",
273771
274003
  "maxLength": 1e3
273772
274004
  },
273773
- "description": "The tags of the file as an object of key/value pairs."
274005
+ "description": "The tags of the file as an object of key-value pairs."
273774
274006
  },
273775
274007
  "createdAt": {
273776
274008
  "type": "string",
@@ -274707,7 +274939,7 @@ var state = {
274707
274939
  "title": "Botpress API",
274708
274940
  "description": "API for Botpress Cloud",
274709
274941
  "server": "https://api.botpress.cloud",
274710
- "version": "0.29.4",
274942
+ "version": "0.29.6",
274711
274943
  "prefix": "v1"
274712
274944
  },
274713
274945
  "errors": [
@@ -275576,6 +275808,74 @@ var state = {
275576
275808
  "maxLength": 200,
275577
275809
  "description": "Version of the [Integration](#schema_integration)"
275578
275810
  },
275811
+ "interfaces": {
275812
+ "type": "object",
275813
+ "additionalProperties": {
275814
+ "type": "object",
275815
+ "properties": {
275816
+ "id": {
275817
+ "type": "string",
275818
+ "minLength": 28,
275819
+ "maxLength": 36
275820
+ },
275821
+ "entities": {
275822
+ "type": "object",
275823
+ "additionalProperties": {
275824
+ "type": "object",
275825
+ "properties": {
275826
+ "name": {
275827
+ "type": "string",
275828
+ "maxLength": 200
275829
+ }
275830
+ },
275831
+ "required": [
275832
+ "name"
275833
+ ],
275834
+ "additionalProperties": false
275835
+ }
275836
+ },
275837
+ "actions": {
275838
+ "type": "object",
275839
+ "additionalProperties": {
275840
+ "type": "object",
275841
+ "properties": {
275842
+ "name": {
275843
+ "type": "string",
275844
+ "maxLength": 200
275845
+ }
275846
+ },
275847
+ "required": [
275848
+ "name"
275849
+ ],
275850
+ "additionalProperties": false
275851
+ }
275852
+ },
275853
+ "events": {
275854
+ "type": "object",
275855
+ "additionalProperties": {
275856
+ "type": "object",
275857
+ "properties": {
275858
+ "name": {
275859
+ "type": "string",
275860
+ "maxLength": 200
275861
+ }
275862
+ },
275863
+ "required": [
275864
+ "name"
275865
+ ],
275866
+ "additionalProperties": false
275867
+ }
275868
+ }
275869
+ },
275870
+ "required": [
275871
+ "id",
275872
+ "entities",
275873
+ "actions",
275874
+ "events"
275875
+ ],
275876
+ "additionalProperties": false
275877
+ }
275878
+ },
275579
275879
  "configuration": {
275580
275880
  "type": "object",
275581
275881
  "properties": {
@@ -275961,6 +276261,7 @@ var state = {
275961
276261
  "url",
275962
276262
  "name",
275963
276263
  "version",
276264
+ "interfaces",
275964
276265
  "configuration",
275965
276266
  "channels",
275966
276267
  "states",
@@ -277513,7 +277814,7 @@ var state = {
277513
277814
  },
277514
277815
  {
277515
277816
  "title": "Files",
277516
- "description": "Operations related to file management.",
277817
+ "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.",
277517
277818
  "name": "files",
277518
277819
  "operations": [
277519
277820
  "createFile",