@botpress/api 0.27.8 → 0.27.10

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
@@ -242865,9 +242865,9 @@ var require_lib3 = __commonJS({
242865
242865
  }
242866
242866
  });
242867
242867
 
242868
- // ../../node_modules/.pnpm/@readme+openapi-parser@2.5.0_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/util.js
242868
+ // ../../node_modules/.pnpm/@readme+openapi-parser@2.5.1_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/util.js
242869
242869
  var require_util12 = __commonJS({
242870
- "../../node_modules/.pnpm/@readme+openapi-parser@2.5.0_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/util.js"(exports) {
242870
+ "../../node_modules/.pnpm/@readme+openapi-parser@2.5.1_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/util.js"(exports) {
242871
242871
  var util3 = require("util");
242872
242872
  var url2 = require_url2();
242873
242873
  exports.format = util3.format;
@@ -258675,9 +258675,9 @@ var require_dist4 = __commonJS({
258675
258675
  }
258676
258676
  });
258677
258677
 
258678
- // ../../node_modules/.pnpm/@readme+openapi-parser@2.5.0_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/validators/schema.js
258678
+ // ../../node_modules/.pnpm/@readme+openapi-parser@2.5.1_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/validators/schema.js
258679
258679
  var require_schema6 = __commonJS({
258680
- "../../node_modules/.pnpm/@readme+openapi-parser@2.5.0_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/validators/schema.js"(exports, module2) {
258680
+ "../../node_modules/.pnpm/@readme+openapi-parser@2.5.1_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/validators/schema.js"(exports, module2) {
258681
258681
  var { openapi } = require_lib4();
258682
258682
  var { ono } = require_cjs();
258683
258683
  var betterAjvErrors = require_lib8();
@@ -258711,6 +258711,7 @@ var require_schema6 = __commonJS({
258711
258711
  const err = ajv.errors;
258712
258712
  let additionalErrors = 0;
258713
258713
  let reducedErrors = reduceAjvErrors(err);
258714
+ const totalErrors = reducedErrors.length;
258714
258715
  if (reducedErrors.length >= LARGE_SPEC_ERROR_CAP) {
258715
258716
  try {
258716
258717
  if (JSON.stringify(api2).length >= LARGE_SPEC_SIZE_CAP) {
@@ -258731,7 +258732,7 @@ var require_schema6 = __commonJS({
258731
258732
  message += "\n\n";
258732
258733
  message += `Plus an additional ${additionalErrors} errors. Please resolve the above and re-run validation to see more.`;
258733
258734
  }
258734
- throw ono.syntax(err, { details: err }, message);
258735
+ throw ono.syntax(err, { details: err, totalErrors }, message);
258735
258736
  }
258736
258737
  }
258737
258738
  function initializeAjv(draft04 = true) {
@@ -258791,9 +258792,9 @@ var require_lib9 = __commonJS({
258791
258792
  }
258792
258793
  });
258793
258794
 
258794
- // ../../node_modules/.pnpm/@readme+openapi-parser@2.5.0_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/validators/spec/openapi.js
258795
+ // ../../node_modules/.pnpm/@readme+openapi-parser@2.5.1_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/validators/spec/openapi.js
258795
258796
  var require_openapi = __commonJS({
258796
- "../../node_modules/.pnpm/@readme+openapi-parser@2.5.0_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/validators/spec/openapi.js"(exports, module2) {
258797
+ "../../node_modules/.pnpm/@readme+openapi-parser@2.5.1_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/validators/spec/openapi.js"(exports, module2) {
258797
258798
  var swaggerMethods = require_lib9();
258798
258799
  var { ono } = require_cjs();
258799
258800
  var util3 = require_util12();
@@ -258939,9 +258940,9 @@ var require_openapi = __commonJS({
258939
258940
  }
258940
258941
  });
258941
258942
 
258942
- // ../../node_modules/.pnpm/@readme+openapi-parser@2.5.0_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/validators/spec/swagger.js
258943
+ // ../../node_modules/.pnpm/@readme+openapi-parser@2.5.1_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/validators/spec/swagger.js
258943
258944
  var require_swagger = __commonJS({
258944
- "../../node_modules/.pnpm/@readme+openapi-parser@2.5.0_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/validators/spec/swagger.js"(exports, module2) {
258945
+ "../../node_modules/.pnpm/@readme+openapi-parser@2.5.1_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/validators/spec/swagger.js"(exports, module2) {
258945
258946
  var swaggerMethods = require_lib9();
258946
258947
  var { ono } = require_cjs();
258947
258948
  var util3 = require_util12();
@@ -259164,9 +259165,9 @@ var require_swagger = __commonJS({
259164
259165
  }
259165
259166
  });
259166
259167
 
259167
- // ../../node_modules/.pnpm/@readme+openapi-parser@2.5.0_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/validators/spec.js
259168
+ // ../../node_modules/.pnpm/@readme+openapi-parser@2.5.1_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/validators/spec.js
259168
259169
  var require_spec = __commonJS({
259169
- "../../node_modules/.pnpm/@readme+openapi-parser@2.5.0_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/validators/spec.js"(exports, module2) {
259170
+ "../../node_modules/.pnpm/@readme+openapi-parser@2.5.1_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/validators/spec.js"(exports, module2) {
259170
259171
  var validateOpenAPI = require_openapi();
259171
259172
  var validateSwagger = require_swagger();
259172
259173
  module2.exports = function validateSpec(api2) {
@@ -259178,9 +259179,9 @@ var require_spec = __commonJS({
259178
259179
  }
259179
259180
  });
259180
259181
 
259181
- // ../../node_modules/.pnpm/@readme+openapi-parser@2.5.0_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/options.js
259182
+ // ../../node_modules/.pnpm/@readme+openapi-parser@2.5.1_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/options.js
259182
259183
  var require_options3 = __commonJS({
259183
- "../../node_modules/.pnpm/@readme+openapi-parser@2.5.0_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/options.js"(exports, module2) {
259184
+ "../../node_modules/.pnpm/@readme+openapi-parser@2.5.1_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/options.js"(exports, module2) {
259184
259185
  var $RefParserOptions = require_options2();
259185
259186
  var util3 = require_util12();
259186
259187
  var schemaValidator = require_schema6();
@@ -259201,9 +259202,9 @@ var require_options3 = __commonJS({
259201
259202
  }
259202
259203
  });
259203
259204
 
259204
- // ../../node_modules/.pnpm/@readme+openapi-parser@2.5.0_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/index.js
259205
+ // ../../node_modules/.pnpm/@readme+openapi-parser@2.5.1_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/index.js
259205
259206
  var require_lib10 = __commonJS({
259206
- "../../node_modules/.pnpm/@readme+openapi-parser@2.5.0_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/index.js"(exports, module2) {
259207
+ "../../node_modules/.pnpm/@readme+openapi-parser@2.5.1_openapi-types@12.1.3/node_modules/@readme/openapi-parser/lib/index.js"(exports, module2) {
259207
259208
  var { ono } = require_cjs();
259208
259209
  var $RefParser = require_lib3();
259209
259210
  var dereference = require_dereference2();
@@ -259317,7 +259318,7 @@ __export(src_exports, {
259317
259318
  });
259318
259319
  module.exports = __toCommonJS(src_exports);
259319
259320
 
259320
- // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.12_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
259321
+ // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.15_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
259321
259322
  var import_zod_openapi = __toESM(require_src(), 1);
259322
259323
  var import_zod_openapi2 = __toESM(require_src(), 1);
259323
259324
  var import_path = __toESM(require("path"), 1);
@@ -259363,7 +259364,7 @@ var title = (str2) => {
259363
259364
  return str2.split(/(?=[A-Z])|[\.\-\s_]/).map((s2) => s2.trim()).filter((s2) => !!s2).map((s2) => capitalize(s2.toLowerCase())).join(" ");
259364
259365
  };
259365
259366
 
259366
- // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.12_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
259367
+ // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.15_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
259367
259368
  var import_decompress = __toESM(require_decompress(), 1);
259368
259369
  var import_fs3 = __toESM(require("fs"), 1);
259369
259370
  var import_promises = __toESM(require("fs/promises"), 1);
@@ -262280,7 +262281,7 @@ var {
262280
262281
  mergeConfig: mergeConfig2
262281
262282
  } = axios_default;
262282
262283
 
262283
- // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.12_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
262284
+ // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.15_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
262284
262285
  var import_json_schema_to_typescript = __toESM(require_src3(), 1);
262285
262286
  var import_fs4 = __toESM(require("fs"), 1);
262286
262287
  var import_path3 = __toESM(require("path"), 1);
@@ -266616,7 +266617,7 @@ async function openapiTS(schema3, options = {}) {
266616
266617
  }
266617
266618
  var dist_default = openapiTS;
266618
266619
 
266619
- // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.12_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
266620
+ // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.15_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
266620
266621
  var import_openapi3_ts = __toESM(require_dist3(), 1);
266621
266622
  var import_verror2 = __toESM(require_verror(), 1);
266622
266623
  var import_verror3 = __toESM(require_verror(), 1);
@@ -270257,7 +270258,7 @@ var z = /* @__PURE__ */ Object.freeze({
270257
270258
  ZodError
270258
270259
  });
270259
270260
 
270260
- // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.12_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
270261
+ // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.15_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
270261
270262
  var import_openapi_parser = __toESM(require_lib10(), 1);
270262
270263
  var import_json_schema_to_typescript2 = __toESM(require_src3(), 1);
270263
270264
  var import_zod_openapi4 = __toESM(require_src(), 1);
@@ -271484,7 +271485,7 @@ function createState(props, opts = {}) {
271484
271485
  throw new import_verror3.VError(`Invalid operation name ${name}. It must be alphanumeric and start with a letter`);
271485
271486
  }
271486
271487
  if (schemas[name]) {
271487
- throw new import_verror3.VError(`Operation ${name} already exists`);
271488
+ throw new import_verror3.VError(`Schema ${name} already exists`);
271488
271489
  }
271489
271490
  schemas[name] = {
271490
271491
  section: schemaEntry.section,
@@ -272350,7 +272351,7 @@ const parseOperationRequest =
272350
272351
  ) =>
272351
272352
  async (props: OperationProps, req: unknown): Promise<types.Response> => {
272352
272353
 
272353
- const validate = ajv.compile(requestSchema)
272354
+ const validate = ajv.compile<unknown>(requestSchema)
272354
272355
  const isValid = validate(req)
272355
272356
  if (!isValid) {
272356
272357
  const message = validate.errors?.[0]?.message ?? 'Invalid request'
@@ -272415,6 +272416,23 @@ var exportRouteTree = (operations) => async (path2) => {
272415
272416
  content += CREATE_ROUTE_TREE_FOOT;
272416
272417
  await import_fs7.default.promises.writeFile(path2, content);
272417
272418
  };
272419
+ var fixSchema2 = (schema22) => {
272420
+ schema22 = replaceNullableWithUnion(schema22);
272421
+ schema22 = setDefaultAdditionalProperties(schema22, false);
272422
+ return schema22;
272423
+ };
272424
+ var toTs2 = async (originalSchema, name) => {
272425
+ let { title: title4, ...schema22 } = originalSchema;
272426
+ schema22 = fixSchema2(schema22);
272427
+ const typeCode = await (0, import_json_schema_to_typescript3.compile)(schema22, name, {
272428
+ unknownAny: false,
272429
+ bannerComment: "",
272430
+ additionalProperties: false,
272431
+ ignoreMinAndMaxItems: true
272432
+ });
272433
+ return `${typeCode}
272434
+ `;
272435
+ };
272418
272436
  var exportSchemas = (schemas) => async (outDir) => {
272419
272437
  await import_promises4.default.mkdir(outDir, { recursive: true });
272420
272438
  const jsonFiles = [];
@@ -272431,7 +272449,7 @@ var exportSchemas = (schemas) => async (outDir) => {
272431
272449
  await import_promises4.default.writeFile(jsonFilePath, jsonCode);
272432
272450
  jsonFiles.push({ name, filename: jsonFileName });
272433
272451
  const typeFileName = `${name}.t`;
272434
- const typeCode = await (0, import_json_schema_to_typescript3.compile)(jsonSchema, name, { unknownAny: false });
272452
+ const typeCode = await toTs2(jsonSchema, name);
272435
272453
  const typeFilePath = import_path6.default.join(outDir, `${typeFileName}.ts`);
272436
272454
  await import_promises4.default.writeFile(typeFilePath, typeCode);
272437
272455
  typeFiles.push({ name, filename: typeFileName });
@@ -272686,7 +272704,11 @@ var generateHandler2 = async (state2, outDir) => {
272686
272704
  await exportHandler(handlerFile);
272687
272705
  generateOpenapi(state2, outDir);
272688
272706
  };
272689
- var schema2 = import_zod_openapi2.extendApi;
272707
+ var schema2 = (schema22, schemaObject) => {
272708
+ const This = schema22.constructor;
272709
+ const copy = new This(schema22._def);
272710
+ return (0, import_zod_openapi2.extendApi)(copy, schemaObject);
272711
+ };
272690
272712
  function exportClient(state2) {
272691
272713
  function _exportClient(dir = ".", props, postProcessors) {
272692
272714
  let options;
@@ -272742,7 +272764,7 @@ var state = {
272742
272764
  "channel": {
272743
272765
  "type": "string",
272744
272766
  "maxLength": 200,
272745
- "description": "Unique identifier of the integration that was installed on the bot"
272767
+ "description": "Channel name"
272746
272768
  },
272747
272769
  "tags": {
272748
272770
  "type": "object",
@@ -272895,7 +272917,7 @@ var state = {
272895
272917
  "channel": {
272896
272918
  "type": "string",
272897
272919
  "maxLength": 200,
272898
- "description": "Unique identifier of the integration that was installed on the bot"
272920
+ "description": "Channel name"
272899
272921
  },
272900
272922
  "tags": {
272901
272923
  "type": "object",
@@ -273185,7 +273207,7 @@ var state = {
273185
273207
  "type": {
273186
273208
  "type": "string",
273187
273209
  "maxLength": 200,
273188
- "description": "Unique identifier of the integration that was installed on the bot"
273210
+ "description": "Type of the [Event](#schema_event)."
273189
273211
  },
273190
273212
  "payload": {
273191
273213
  "type": "object",
@@ -273373,18 +273395,18 @@ var state = {
273373
273395
  "type": "string",
273374
273396
  "minLength": 28,
273375
273397
  "maxLength": 36,
273376
- "description": "User id"
273398
+ "description": "ID of the [User](#schema_user)"
273377
273399
  },
273378
273400
  "conversationId": {
273379
273401
  "type": "string",
273380
273402
  "minLength": 28,
273381
273403
  "maxLength": 36,
273382
- "description": "User id"
273404
+ "description": "ID of the [Conversation](#schema_conversation)"
273383
273405
  },
273384
273406
  "type": {
273385
273407
  "type": "string",
273386
273408
  "maxLength": 200,
273387
- "description": "Unique identifier of the integration that was installed on the bot"
273409
+ "description": "Type of the [Message](#schema_message) represents the resource type that the message is related to"
273388
273410
  },
273389
273411
  "tags": {
273390
273412
  "type": "object",
@@ -273401,7 +273423,7 @@ var state = {
273401
273423
  "type": "string",
273402
273424
  "maxLength": 28,
273403
273425
  "minLength": 24,
273404
- "description": "When the [Event](#schema_event) will be sent, in the ISO 8601 format"
273426
+ "description": "When the [Message](#schema_message) will be sent, in the ISO 8601 format"
273405
273427
  },
273406
273428
  "delay": {
273407
273429
  "type": "number",
@@ -273462,18 +273484,18 @@ var state = {
273462
273484
  "type": "string",
273463
273485
  "minLength": 28,
273464
273486
  "maxLength": 36,
273465
- "description": "User id"
273487
+ "description": "ID of the [User](#schema_user)"
273466
273488
  },
273467
273489
  "conversationId": {
273468
273490
  "type": "string",
273469
273491
  "minLength": 28,
273470
273492
  "maxLength": 36,
273471
- "description": "User id"
273493
+ "description": "ID of the [Conversation](#schema_conversation)"
273472
273494
  },
273473
273495
  "type": {
273474
273496
  "type": "string",
273475
273497
  "maxLength": 200,
273476
- "description": "Unique identifier of the integration that was installed on the bot"
273498
+ "description": "Type of the [Message](#schema_message) represents the resource type that the message is related to"
273477
273499
  },
273478
273500
  "tags": {
273479
273501
  "type": "object",
@@ -273490,7 +273512,7 @@ var state = {
273490
273512
  "type": "string",
273491
273513
  "maxLength": 28,
273492
273514
  "minLength": 24,
273493
- "description": "When the [Event](#schema_event) will be sent, in the ISO 8601 format"
273515
+ "description": "When the [Message](#schema_message) will be sent, in the ISO 8601 format"
273494
273516
  },
273495
273517
  "delay": {
273496
273518
  "type": "number",
@@ -274256,7 +274278,7 @@ var state = {
274256
274278
  "type": {
274257
274279
  "type": "string",
274258
274280
  "maxLength": 200,
274259
- "description": "Unique identifier of the integration that was installed on the bot"
274281
+ "description": "Type of the action"
274260
274282
  },
274261
274283
  "input": {
274262
274284
  "type": "object",
@@ -274378,7 +274400,7 @@ var state = {
274378
274400
  "type": {
274379
274401
  "type": "string",
274380
274402
  "maxLength": 200,
274381
- "description": "Unique identifier of the integration that was installed on the bot"
274403
+ "description": "Type of the task"
274382
274404
  },
274383
274405
  "data": {
274384
274406
  "type": "object",
@@ -275087,17 +275109,17 @@ var state = {
275087
275109
  "type": "string",
275088
275110
  "minLength": 28,
275089
275111
  "maxLength": 36,
275090
- "description": "User id"
275112
+ "description": "ID of the [Integration](#schema_integration)"
275091
275113
  },
275092
275114
  "name": {
275093
275115
  "type": "string",
275094
275116
  "maxLength": 200,
275095
- "description": "Unique identifier of the integration that was installed on the bot"
275117
+ "description": "Name of the [Integration](#schema_integration)"
275096
275118
  },
275097
275119
  "version": {
275098
275120
  "type": "string",
275099
275121
  "maxLength": 200,
275100
- "description": "Unique identifier of the integration that was installed on the bot"
275122
+ "description": "Version of the [Integration](#schema_integration)"
275101
275123
  },
275102
275124
  "createdAt": {
275103
275125
  "type": "string",
@@ -275211,7 +275233,7 @@ var state = {
275211
275233
  "type": "string",
275212
275234
  "minLength": 28,
275213
275235
  "maxLength": 36,
275214
- "description": "User id"
275236
+ "description": "ID of the [Integration](#schema_integration)"
275215
275237
  },
275216
275238
  "createdAt": {
275217
275239
  "type": "string",
@@ -275243,17 +275265,17 @@ var state = {
275243
275265
  "url": {
275244
275266
  "type": "string",
275245
275267
  "maxLength": 2e3,
275246
- "description": "Title describing the task"
275268
+ "description": "URL of the [Integration](#schema_integration)"
275247
275269
  },
275248
275270
  "name": {
275249
275271
  "type": "string",
275250
275272
  "maxLength": 200,
275251
- "description": "Unique identifier of the integration that was installed on the bot"
275273
+ "description": "Name of the [Integration](#schema_integration)"
275252
275274
  },
275253
275275
  "version": {
275254
275276
  "type": "string",
275255
275277
  "maxLength": 200,
275256
- "description": "Unique identifier of the integration that was installed on the bot"
275278
+ "description": "Version of the [Integration](#schema_integration)"
275257
275279
  },
275258
275280
  "configuration": {
275259
275281
  "type": "object",
@@ -275263,8 +275285,7 @@ var state = {
275263
275285
  "properties": {
275264
275286
  "linkTemplateScript": {
275265
275287
  "type": "string",
275266
- "maxLength": 2e3,
275267
- "description": "Title describing the task"
275288
+ "maxLength": 2e3
275268
275289
  },
275269
275290
  "required": {
275270
275291
  "type": "boolean"
@@ -275722,7 +275743,7 @@ var state = {
275722
275743
  "type": "string",
275723
275744
  "minLength": 28,
275724
275745
  "maxLength": 36,
275725
- "description": "User id"
275746
+ "description": "ID of the [Integration](#schema_integration)"
275726
275747
  },
275727
275748
  "createdAt": {
275728
275749
  "type": "string",
@@ -275754,17 +275775,17 @@ var state = {
275754
275775
  "url": {
275755
275776
  "type": "string",
275756
275777
  "maxLength": 2e3,
275757
- "description": "Title describing the task"
275778
+ "description": "URL of the [Integration](#schema_integration)"
275758
275779
  },
275759
275780
  "name": {
275760
275781
  "type": "string",
275761
275782
  "maxLength": 200,
275762
- "description": "Unique identifier of the integration that was installed on the bot"
275783
+ "description": "Name of the [Integration](#schema_integration)"
275763
275784
  },
275764
275785
  "version": {
275765
275786
  "type": "string",
275766
275787
  "maxLength": 200,
275767
- "description": "Unique identifier of the integration that was installed on the bot"
275788
+ "description": "Version of the [Integration](#schema_integration)"
275768
275789
  },
275769
275790
  "configuration": {
275770
275791
  "type": "object",
@@ -275774,8 +275795,7 @@ var state = {
275774
275795
  "properties": {
275775
275796
  "linkTemplateScript": {
275776
275797
  "type": "string",
275777
- "maxLength": 2e3,
275778
- "description": "Title describing the task"
275798
+ "maxLength": 2e3
275779
275799
  },
275780
275800
  "required": {
275781
275801
  "type": "boolean"
@@ -276283,8 +276303,7 @@ var state = {
276283
276303
  "properties": {
276284
276304
  "cron": {
276285
276305
  "type": "string",
276286
- "maxLength": 200,
276287
- "description": "Unique identifier of the integration that was installed on the bot"
276306
+ "maxLength": 200
276288
276307
  }
276289
276308
  },
276290
276309
  "required": [
@@ -276294,8 +276313,7 @@ var state = {
276294
276313
  },
276295
276314
  "type": {
276296
276315
  "type": "string",
276297
- "maxLength": 200,
276298
- "description": "Unique identifier of the integration that was installed on the bot"
276316
+ "maxLength": 200
276299
276317
  },
276300
276318
  "payload": {
276301
276319
  "type": "object",
@@ -276789,8 +276807,7 @@ var state = {
276789
276807
  "properties": {
276790
276808
  "cron": {
276791
276809
  "type": "string",
276792
- "maxLength": 200,
276793
- "description": "Unique identifier of the integration that was installed on the bot"
276810
+ "maxLength": 200
276794
276811
  }
276795
276812
  },
276796
276813
  "required": [
@@ -276800,8 +276817,7 @@ var state = {
276800
276817
  },
276801
276818
  "type": {
276802
276819
  "type": "string",
276803
- "maxLength": 200,
276804
- "description": "Unique identifier of the integration that was installed on the bot"
276820
+ "maxLength": 200
276805
276821
  },
276806
276822
  "payload": {
276807
276823
  "type": "object",
@@ -276975,7 +276991,7 @@ var state = {
276975
276991
  "type": "string",
276976
276992
  "minLength": 28,
276977
276993
  "maxLength": 36,
276978
- "description": "User id"
276994
+ "description": "Id of the [Bot](#schema_bot)"
276979
276995
  },
276980
276996
  "createdAt": {
276981
276997
  "type": "string",
@@ -279390,12 +279406,12 @@ var state = {
279390
279406
  "name": {
279391
279407
  "type": "string",
279392
279408
  "maxLength": 200,
279393
- "description": "Unique identifier of the integration that was installed on the bot"
279409
+ "description": "Name of the [Integration](#schema_integration)"
279394
279410
  },
279395
279411
  "version": {
279396
279412
  "type": "string",
279397
279413
  "maxLength": 200,
279398
- "description": "Unique identifier of the integration that was installed on the bot"
279414
+ "description": "Version of the [Integration](#schema_integration)"
279399
279415
  },
279400
279416
  "configuration": {
279401
279417
  "type": "object",
@@ -279413,8 +279429,7 @@ var state = {
279413
279429
  },
279414
279430
  "linkTemplateScript": {
279415
279431
  "type": "string",
279416
- "maxLength": 2e3,
279417
- "description": "Title describing the task"
279432
+ "maxLength": 2e3
279418
279433
  }
279419
279434
  },
279420
279435
  "additionalProperties": false
@@ -279559,13 +279574,11 @@ var state = {
279559
279574
  "properties": {
279560
279575
  "fallbackHandlerScript": {
279561
279576
  "type": "string",
279562
- "maxLength": 2e3,
279563
- "description": "Title describing the task"
279577
+ "maxLength": 2e3
279564
279578
  },
279565
279579
  "extractScript": {
279566
279580
  "type": "string",
279567
- "maxLength": 2e3,
279568
- "description": "Title describing the task"
279581
+ "maxLength": 2e3
279569
279582
  }
279570
279583
  },
279571
279584
  "additionalProperties": false
@@ -279832,7 +279845,6 @@ var state = {
279832
279845
  "linkTemplateScript": {
279833
279846
  "type": "string",
279834
279847
  "maxLength": 2e3,
279835
- "description": "Title describing the task",
279836
279848
  "nullable": true
279837
279849
  },
279838
279850
  "required": {
@@ -279964,13 +279976,11 @@ var state = {
279964
279976
  "extractScript": {
279965
279977
  "type": "string",
279966
279978
  "maxLength": 2e3,
279967
- "description": "Title describing the task",
279968
279979
  "nullable": true
279969
279980
  },
279970
279981
  "fallbackHandlerScript": {
279971
279982
  "type": "string",
279972
279983
  "maxLength": 2e3,
279973
- "description": "Title describing the task",
279974
279984
  "nullable": true
279975
279985
  }
279976
279986
  },
@@ -280266,17 +280276,17 @@ var state = {
280266
280276
  "type": "string",
280267
280277
  "minLength": 28,
280268
280278
  "maxLength": 36,
280269
- "description": "User id"
280279
+ "description": "ID of the [Integration](#schema_integration)"
280270
280280
  },
280271
280281
  "name": {
280272
280282
  "type": "string",
280273
280283
  "maxLength": 200,
280274
- "description": "Unique identifier of the integration that was installed on the bot"
280284
+ "description": "Name of the [Integration](#schema_integration)"
280275
280285
  },
280276
280286
  "version": {
280277
280287
  "type": "string",
280278
280288
  "maxLength": 200,
280279
- "description": "Unique identifier of the integration that was installed on the bot"
280289
+ "description": "Version of the [Integration](#schema_integration)"
280280
280290
  },
280281
280291
  "createdAt": {
280282
280292
  "type": "string",
@@ -280937,7 +280947,7 @@ var state = {
280937
280947
  },
280938
280948
  "listFiles": {
280939
280949
  "name": "listFiles",
280940
- "path": "/v1/files/bot/{botId}",
280950
+ "path": "/v1/files",
280941
280951
  "description": "List files for bot",
280942
280952
  "method": "get",
280943
280953
  "section": "files",
@@ -280947,11 +280957,6 @@ var state = {
280947
280957
  "description": "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
280948
280958
  "type": "string"
280949
280959
  },
280950
- "botId": {
280951
- "type": "string",
280952
- "description": "Bot ID",
280953
- "in": "path"
280954
- },
280955
280960
  "tags": {
280956
280961
  "in": "query",
280957
280962
  "description": "Filter by tags",
@@ -281359,16 +281364,11 @@ var state = {
281359
281364
  },
281360
281365
  "searchFiles": {
281361
281366
  "name": "searchFiles",
281362
- "path": "/v1/files/bot/{botId}/search",
281367
+ "path": "/v1/files/search",
281363
281368
  "description": "Search files",
281364
281369
  "method": "get",
281365
281370
  "section": "files",
281366
281371
  "parameters": {
281367
- "botId": {
281368
- "type": "string",
281369
- "description": "Bot ID",
281370
- "in": "path"
281371
- },
281372
281372
  "tags": {
281373
281373
  "in": "query",
281374
281374
  "description": "Filter by tags",
@@ -282329,7 +282329,7 @@ var state = {
282329
282329
  "title": "Botpress API",
282330
282330
  "description": "API for Botpress Cloud",
282331
282331
  "server": "https://api.botpress.cloud",
282332
- "version": "0.27.8",
282332
+ "version": "0.27.10",
282333
282333
  "prefix": "v1"
282334
282334
  },
282335
282335
  "errors": [
@@ -282653,7 +282653,7 @@ var state = {
282653
282653
  "type": "string",
282654
282654
  "minLength": 28,
282655
282655
  "maxLength": 36,
282656
- "description": "ID of the [Conversation](#schema_conversation)"
282656
+ "description": "Id of the [Bot](#schema_bot)"
282657
282657
  },
282658
282658
  "createdAt": {
282659
282659
  "type": "string",
@@ -282668,7 +282668,7 @@ var state = {
282668
282668
  "signingSecret": {
282669
282669
  "type": "string",
282670
282670
  "maxLength": 2e3,
282671
- "description": "Title describing the task"
282671
+ "description": "Signing secret of the [Bot](#schema_bot)"
282672
282672
  },
282673
282673
  "integrations": {
282674
282674
  "type": "object",
@@ -282681,27 +282681,24 @@ var state = {
282681
282681
  "name": {
282682
282682
  "type": "string",
282683
282683
  "maxLength": 200,
282684
- "description": "Type of the task"
282684
+ "description": "Name of the [Integration](#schema_integration)"
282685
282685
  },
282686
282686
  "version": {
282687
282687
  "type": "string",
282688
282688
  "maxLength": 200,
282689
- "description": "Type of the task"
282689
+ "description": "Version of the [Integration](#schema_integration)"
282690
282690
  },
282691
282691
  "webhookUrl": {
282692
282692
  "type": "string",
282693
- "maxLength": 2e3,
282694
- "description": "Title describing the task"
282693
+ "maxLength": 2e3
282695
282694
  },
282696
282695
  "webhookId": {
282697
282696
  "type": "string",
282698
- "maxLength": 200,
282699
- "description": "Type of the task"
282697
+ "maxLength": 200
282700
282698
  },
282701
282699
  "identifier": {
282702
282700
  "type": "string",
282703
- "maxLength": 2e3,
282704
- "description": "Title describing the task"
282701
+ "maxLength": 2e3
282705
282702
  },
282706
282703
  "configuration": {
282707
282704
  "type": "object",
@@ -282721,14 +282718,13 @@ var state = {
282721
282718
  "statusReason": {
282722
282719
  "type": "string",
282723
282720
  "maxLength": 2e3,
282724
- "description": "Title describing the task",
282725
282721
  "nullable": true
282726
282722
  },
282727
282723
  "id": {
282728
282724
  "type": "string",
282729
282725
  "minLength": 28,
282730
282726
  "maxLength": 36,
282731
- "description": "ID of the [Conversation](#schema_conversation)"
282727
+ "description": "ID of the [Integration](#schema_integration)"
282732
282728
  },
282733
282729
  "createdAt": {
282734
282730
  "type": "string",
@@ -282964,8 +282960,7 @@ var state = {
282964
282960
  "properties": {
282965
282961
  "cron": {
282966
282962
  "type": "string",
282967
- "maxLength": 200,
282968
- "description": "Type of the task"
282963
+ "maxLength": 200
282969
282964
  }
282970
282965
  },
282971
282966
  "required": [
@@ -282975,8 +282970,7 @@ var state = {
282975
282970
  },
282976
282971
  "type": {
282977
282972
  "type": "string",
282978
- "maxLength": 200,
282979
- "description": "Type of the task"
282973
+ "maxLength": 200
282980
282974
  },
282981
282975
  "payload": {
282982
282976
  "type": "object",
@@ -283158,7 +283152,7 @@ var state = {
283158
283152
  "type": "string",
283159
283153
  "minLength": 28,
283160
283154
  "maxLength": 36,
283161
- "description": "ID of the [Conversation](#schema_conversation)"
283155
+ "description": "ID of the [Integration](#schema_integration)"
283162
283156
  },
283163
283157
  "createdAt": {
283164
283158
  "type": "string",
@@ -283190,17 +283184,17 @@ var state = {
283190
283184
  "url": {
283191
283185
  "type": "string",
283192
283186
  "maxLength": 2e3,
283193
- "description": "Title describing the task"
283187
+ "description": "URL of the [Integration](#schema_integration)"
283194
283188
  },
283195
283189
  "name": {
283196
283190
  "type": "string",
283197
283191
  "maxLength": 200,
283198
- "description": "Type of the task"
283192
+ "description": "Name of the [Integration](#schema_integration)"
283199
283193
  },
283200
283194
  "version": {
283201
283195
  "type": "string",
283202
283196
  "maxLength": 200,
283203
- "description": "Type of the task"
283197
+ "description": "Version of the [Integration](#schema_integration)"
283204
283198
  },
283205
283199
  "configuration": {
283206
283200
  "type": "object",
@@ -283210,8 +283204,7 @@ var state = {
283210
283204
  "properties": {
283211
283205
  "linkTemplateScript": {
283212
283206
  "type": "string",
283213
- "maxLength": 2e3,
283214
- "description": "Title describing the task"
283207
+ "maxLength": 2e3
283215
283208
  },
283216
283209
  "required": {
283217
283210
  "type": "boolean"
@@ -283998,7 +283991,7 @@ var state = {
283998
283991
  "type": "string",
283999
283992
  "minLength": 28,
284000
283993
  "maxLength": 36,
284001
- "description": "ID of the [Conversation](#schema_conversation)"
283994
+ "description": "Id of the [User](#schema_user)"
284002
283995
  },
284003
283996
  "createdAt": {
284004
283997
  "type": "string",
@@ -284047,7 +284040,7 @@ var state = {
284047
284040
  "type": "string",
284048
284041
  "minLength": 28,
284049
284042
  "maxLength": 36,
284050
- "description": "ID of the [Conversation](#schema_conversation)"
284043
+ "description": "Id of the [Conversation](#schema_conversation)"
284051
284044
  },
284052
284045
  "currentTaskId": {
284053
284046
  "type": "string",
@@ -284102,7 +284095,7 @@ var state = {
284102
284095
  "type": "string",
284103
284096
  "minLength": 28,
284104
284097
  "maxLength": 36,
284105
- "description": "ID of the [Conversation](#schema_conversation)"
284098
+ "description": "Id of the [Event](#schema_event)"
284106
284099
  },
284107
284100
  "createdAt": {
284108
284101
  "type": "string",
@@ -284112,7 +284105,7 @@ var state = {
284112
284105
  "type": {
284113
284106
  "type": "string",
284114
284107
  "maxLength": 200,
284115
- "description": "Type of the task"
284108
+ "description": "Type of the [Event](#schema_event)."
284116
284109
  },
284117
284110
  "payload": {
284118
284111
  "type": "object",
@@ -284149,8 +284142,8 @@ var state = {
284149
284142
  "failureReason": {
284150
284143
  "type": "string",
284151
284144
  "maxLength": 2e3,
284152
- "description": "Reason why the event failed to be processed",
284153
- "nullable": true
284145
+ "nullable": true,
284146
+ "description": "Reason why the event failed to be processed"
284154
284147
  }
284155
284148
  },
284156
284149
  "required": [
@@ -284174,7 +284167,7 @@ var state = {
284174
284167
  "type": "string",
284175
284168
  "minLength": 28,
284176
284169
  "maxLength": 36,
284177
- "description": "ID of the [Conversation](#schema_conversation)"
284170
+ "description": "Id of the [Message](#schema_message)"
284178
284171
  },
284179
284172
  "createdAt": {
284180
284173
  "type": "string",
@@ -284184,7 +284177,7 @@ var state = {
284184
284177
  "type": {
284185
284178
  "type": "string",
284186
284179
  "maxLength": 200,
284187
- "description": "Type of the task"
284180
+ "description": "Type of the [Message](#schema_message) represents the resource type that the message is related to"
284188
284181
  },
284189
284182
  "payload": {
284190
284183
  "type": "object",
@@ -284203,7 +284196,7 @@ var state = {
284203
284196
  "type": "string",
284204
284197
  "minLength": 28,
284205
284198
  "maxLength": 36,
284206
- "description": "ID of the [Conversation](#schema_conversation)"
284199
+ "description": "ID of the [User](#schema_user)"
284207
284200
  },
284208
284201
  "conversationId": {
284209
284202
  "type": "string",
@@ -284242,7 +284235,7 @@ var state = {
284242
284235
  "type": "string",
284243
284236
  "minLength": 28,
284244
284237
  "maxLength": 36,
284245
- "description": "ID of the [Conversation](#schema_conversation)"
284238
+ "description": "Id of the [State](#schema_state)"
284246
284239
  },
284247
284240
  "createdAt": {
284248
284241
  "type": "string",
@@ -284258,7 +284251,7 @@ var state = {
284258
284251
  "type": "string",
284259
284252
  "minLength": 28,
284260
284253
  "maxLength": 36,
284261
- "description": "ID of the [Conversation](#schema_conversation)"
284254
+ "description": "Id of the [Bot](#schema_bot)"
284262
284255
  },
284263
284256
  "conversationId": {
284264
284257
  "type": "string",
@@ -284275,7 +284268,7 @@ var state = {
284275
284268
  "name": {
284276
284269
  "type": "string",
284277
284270
  "maxLength": 200,
284278
- "description": "Type of the task"
284271
+ "description": "Name of the [State](#schema_state) which is declared inside the bot definition"
284279
284272
  },
284280
284273
  "type": {
284281
284274
  "type": "string",
@@ -284316,7 +284309,7 @@ var state = {
284316
284309
  "type": "string",
284317
284310
  "minLength": 28,
284318
284311
  "maxLength": 36,
284319
- "description": "ID of the [Conversation](#schema_conversation)"
284312
+ "description": "Id of the [Task](#schema_task)"
284320
284313
  },
284321
284314
  "title": {
284322
284315
  "type": "string",