@botpress/api 0.15.12 → 0.16.2

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
@@ -36095,9 +36095,9 @@ var require_src2 = __commonJS({
36095
36095
  }
36096
36096
  });
36097
36097
 
36098
- // ../../node_modules/.pnpm/follow-redirects@1.15.2/node_modules/follow-redirects/debug.js
36098
+ // ../../node_modules/.pnpm/follow-redirects@1.15.4/node_modules/follow-redirects/debug.js
36099
36099
  var require_debug = __commonJS({
36100
- "../../node_modules/.pnpm/follow-redirects@1.15.2/node_modules/follow-redirects/debug.js"(exports, module2) {
36100
+ "../../node_modules/.pnpm/follow-redirects@1.15.4/node_modules/follow-redirects/debug.js"(exports, module2) {
36101
36101
  var debug;
36102
36102
  module2.exports = function() {
36103
36103
  if (!debug) {
@@ -36115,9 +36115,9 @@ var require_debug = __commonJS({
36115
36115
  }
36116
36116
  });
36117
36117
 
36118
- // ../../node_modules/.pnpm/follow-redirects@1.15.2/node_modules/follow-redirects/index.js
36118
+ // ../../node_modules/.pnpm/follow-redirects@1.15.4/node_modules/follow-redirects/index.js
36119
36119
  var require_follow_redirects = __commonJS({
36120
- "../../node_modules/.pnpm/follow-redirects@1.15.2/node_modules/follow-redirects/index.js"(exports, module2) {
36120
+ "../../node_modules/.pnpm/follow-redirects@1.15.4/node_modules/follow-redirects/index.js"(exports, module2) {
36121
36121
  var url2 = require("url");
36122
36122
  var URL4 = url2.URL;
36123
36123
  var http2 = require("http");
@@ -36125,6 +36125,24 @@ var require_follow_redirects = __commonJS({
36125
36125
  var Writable = require("stream").Writable;
36126
36126
  var assert = require("assert");
36127
36127
  var debug = require_debug();
36128
+ var useNativeURL = false;
36129
+ try {
36130
+ assert(new URL4());
36131
+ } catch (error2) {
36132
+ useNativeURL = error2.code === "ERR_INVALID_URL";
36133
+ }
36134
+ var preservedUrlFields = [
36135
+ "auth",
36136
+ "host",
36137
+ "hostname",
36138
+ "href",
36139
+ "path",
36140
+ "pathname",
36141
+ "port",
36142
+ "protocol",
36143
+ "query",
36144
+ "search"
36145
+ ];
36128
36146
  var events = ["abort", "aborted", "connect", "error", "socket", "timeout"];
36129
36147
  var eventHandlers = /* @__PURE__ */ Object.create(null);
36130
36148
  events.forEach(function(event) {
@@ -36143,7 +36161,8 @@ var require_follow_redirects = __commonJS({
36143
36161
  );
36144
36162
  var TooManyRedirectsError = createErrorType(
36145
36163
  "ERR_FR_TOO_MANY_REDIRECTS",
36146
- "Maximum number of redirects exceeded"
36164
+ "Maximum number of redirects exceeded",
36165
+ RedirectionError
36147
36166
  );
36148
36167
  var MaxBodyLengthExceededError = createErrorType(
36149
36168
  "ERR_FR_MAX_BODY_LENGTH_EXCEEDED",
@@ -36153,6 +36172,7 @@ var require_follow_redirects = __commonJS({
36153
36172
  "ERR_STREAM_WRITE_AFTER_END",
36154
36173
  "write after end"
36155
36174
  );
36175
+ var destroy = Writable.prototype.destroy || noop2;
36156
36176
  function RedirectableRequest(options, responseCallback) {
36157
36177
  Writable.call(this);
36158
36178
  this._sanitizeOptions(options);
@@ -36168,15 +36188,25 @@ var require_follow_redirects = __commonJS({
36168
36188
  }
36169
36189
  var self2 = this;
36170
36190
  this._onNativeResponse = function(response) {
36171
- self2._processResponse(response);
36191
+ try {
36192
+ self2._processResponse(response);
36193
+ } catch (cause) {
36194
+ self2.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause }));
36195
+ }
36172
36196
  };
36173
36197
  this._performRequest();
36174
36198
  }
36175
36199
  RedirectableRequest.prototype = Object.create(Writable.prototype);
36176
36200
  RedirectableRequest.prototype.abort = function() {
36177
- abortRequest(this._currentRequest);
36201
+ destroyRequest(this._currentRequest);
36202
+ this._currentRequest.abort();
36178
36203
  this.emit("abort");
36179
36204
  };
36205
+ RedirectableRequest.prototype.destroy = function(error2) {
36206
+ destroyRequest(this._currentRequest, error2);
36207
+ destroy.call(this, error2);
36208
+ return this;
36209
+ };
36180
36210
  RedirectableRequest.prototype.write = function(data, encoding, callback) {
36181
36211
  if (this._ending) {
36182
36212
  throw new WriteAfterEndError();
@@ -36257,6 +36287,7 @@ var require_follow_redirects = __commonJS({
36257
36287
  self2.removeListener("abort", clearTimer);
36258
36288
  self2.removeListener("error", clearTimer);
36259
36289
  self2.removeListener("response", clearTimer);
36290
+ self2.removeListener("close", clearTimer);
36260
36291
  if (callback) {
36261
36292
  self2.removeListener("timeout", callback);
36262
36293
  }
@@ -36276,6 +36307,7 @@ var require_follow_redirects = __commonJS({
36276
36307
  this.on("abort", clearTimer);
36277
36308
  this.on("error", clearTimer);
36278
36309
  this.on("response", clearTimer);
36310
+ this.on("close", clearTimer);
36279
36311
  return this;
36280
36312
  };
36281
36313
  [
@@ -36319,8 +36351,7 @@ var require_follow_redirects = __commonJS({
36319
36351
  var protocol = this._options.protocol;
36320
36352
  var nativeProtocol = this._options.nativeProtocols[protocol];
36321
36353
  if (!nativeProtocol) {
36322
- this.emit("error", new TypeError("Unsupported protocol " + protocol));
36323
- return;
36354
+ throw new TypeError("Unsupported protocol " + protocol);
36324
36355
  }
36325
36356
  if (this._options.agents) {
36326
36357
  var scheme = protocol.slice(0, -1);
@@ -36369,11 +36400,10 @@ var require_follow_redirects = __commonJS({
36369
36400
  this._requestBodyBuffers = [];
36370
36401
  return;
36371
36402
  }
36372
- abortRequest(this._currentRequest);
36403
+ destroyRequest(this._currentRequest);
36373
36404
  response.destroy();
36374
36405
  if (++this._redirectCount > this._options.maxRedirects) {
36375
- this.emit("error", new TooManyRedirectsError());
36376
- return;
36406
+ throw new TooManyRedirectsError();
36377
36407
  }
36378
36408
  var requestHeaders;
36379
36409
  var beforeRedirect = this._options.beforeRedirect;
@@ -36389,21 +36419,14 @@ var require_follow_redirects = __commonJS({
36389
36419
  removeMatchingHeaders(/^content-/i, this._options.headers);
36390
36420
  }
36391
36421
  var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
36392
- var currentUrlParts = url2.parse(this._currentUrl);
36422
+ var currentUrlParts = parseUrl(this._currentUrl);
36393
36423
  var currentHost = currentHostHeader || currentUrlParts.host;
36394
36424
  var currentUrl = /^\w+:/.test(location2) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost }));
36395
- var redirectUrl;
36396
- try {
36397
- redirectUrl = url2.resolve(currentUrl, location2);
36398
- } catch (cause) {
36399
- this.emit("error", new RedirectionError({ cause }));
36400
- return;
36401
- }
36402
- debug("redirecting to", redirectUrl);
36425
+ var redirectUrl = resolveUrl(location2, currentUrl);
36426
+ debug("redirecting to", redirectUrl.href);
36403
36427
  this._isRedirect = true;
36404
- var redirectUrlParts = url2.parse(redirectUrl);
36405
- Object.assign(this._options, redirectUrlParts);
36406
- if (redirectUrlParts.protocol !== currentUrlParts.protocol && redirectUrlParts.protocol !== "https:" || redirectUrlParts.host !== currentHost && !isSubdomain(redirectUrlParts.host, currentHost)) {
36428
+ spreadUrlObject(redirectUrl, this._options);
36429
+ if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
36407
36430
  removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);
36408
36431
  }
36409
36432
  if (isFunction2(beforeRedirect)) {
@@ -36416,19 +36439,10 @@ var require_follow_redirects = __commonJS({
36416
36439
  method,
36417
36440
  headers: requestHeaders
36418
36441
  };
36419
- try {
36420
- beforeRedirect(this._options, responseDetails, requestDetails);
36421
- } catch (err) {
36422
- this.emit("error", err);
36423
- return;
36424
- }
36442
+ beforeRedirect(this._options, responseDetails, requestDetails);
36425
36443
  this._sanitizeOptions(this._options);
36426
36444
  }
36427
- try {
36428
- this._performRequest();
36429
- } catch (cause) {
36430
- this.emit("error", new RedirectionError({ cause }));
36431
- }
36445
+ this._performRequest();
36432
36446
  };
36433
36447
  function wrap(protocols) {
36434
36448
  var exports2 = {
@@ -36441,22 +36455,13 @@ var require_follow_redirects = __commonJS({
36441
36455
  var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
36442
36456
  var wrappedProtocol = exports2[scheme] = Object.create(nativeProtocol);
36443
36457
  function request(input, options, callback) {
36444
- if (isString2(input)) {
36445
- var parsed;
36446
- try {
36447
- parsed = urlToOptions(new URL4(input));
36448
- } catch (err) {
36449
- parsed = url2.parse(input);
36450
- }
36451
- if (!isString2(parsed.protocol)) {
36452
- throw new InvalidUrlError({ input });
36453
- }
36454
- input = parsed;
36455
- } else if (URL4 && input instanceof URL4) {
36456
- input = urlToOptions(input);
36458
+ if (isURL(input)) {
36459
+ input = spreadUrlObject(input);
36460
+ } else if (isString2(input)) {
36461
+ input = spreadUrlObject(parseUrl(input));
36457
36462
  } else {
36458
36463
  callback = options;
36459
- options = input;
36464
+ options = validateUrl(input);
36460
36465
  input = { protocol };
36461
36466
  }
36462
36467
  if (isFunction2(options)) {
@@ -36489,20 +36494,43 @@ var require_follow_redirects = __commonJS({
36489
36494
  }
36490
36495
  function noop2() {
36491
36496
  }
36492
- function urlToOptions(urlObject) {
36493
- var options = {
36494
- protocol: urlObject.protocol,
36495
- hostname: urlObject.hostname.startsWith("[") ? urlObject.hostname.slice(1, -1) : urlObject.hostname,
36496
- hash: urlObject.hash,
36497
- search: urlObject.search,
36498
- pathname: urlObject.pathname,
36499
- path: urlObject.pathname + urlObject.search,
36500
- href: urlObject.href
36501
- };
36502
- if (urlObject.port !== "") {
36503
- options.port = Number(urlObject.port);
36497
+ function parseUrl(input) {
36498
+ var parsed;
36499
+ if (useNativeURL) {
36500
+ parsed = new URL4(input);
36501
+ } else {
36502
+ parsed = validateUrl(url2.parse(input));
36503
+ if (!isString2(parsed.protocol)) {
36504
+ throw new InvalidUrlError({ input });
36505
+ }
36506
+ }
36507
+ return parsed;
36508
+ }
36509
+ function resolveUrl(relative, base) {
36510
+ return useNativeURL ? new URL4(relative, base) : parseUrl(url2.resolve(base, relative));
36511
+ }
36512
+ function validateUrl(input) {
36513
+ if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
36514
+ throw new InvalidUrlError({ input: input.href || input });
36504
36515
  }
36505
- return options;
36516
+ if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) {
36517
+ throw new InvalidUrlError({ input: input.href || input });
36518
+ }
36519
+ return input;
36520
+ }
36521
+ function spreadUrlObject(urlObject, target) {
36522
+ var spread3 = target || {};
36523
+ for (var key of preservedUrlFields) {
36524
+ spread3[key] = urlObject[key];
36525
+ }
36526
+ if (spread3.hostname.startsWith("[")) {
36527
+ spread3.hostname = spread3.hostname.slice(1, -1);
36528
+ }
36529
+ if (spread3.port !== "") {
36530
+ spread3.port = Number(spread3.port);
36531
+ }
36532
+ spread3.path = spread3.search ? spread3.pathname + spread3.search : spread3.pathname;
36533
+ return spread3;
36506
36534
  }
36507
36535
  function removeMatchingHeaders(regex, headers) {
36508
36536
  var lastValue;
@@ -36522,16 +36550,24 @@ var require_follow_redirects = __commonJS({
36522
36550
  this.message = this.cause ? message + ": " + this.cause.message : message;
36523
36551
  }
36524
36552
  CustomError.prototype = new (baseClass || Error)();
36525
- CustomError.prototype.constructor = CustomError;
36526
- CustomError.prototype.name = "Error [" + code + "]";
36553
+ Object.defineProperties(CustomError.prototype, {
36554
+ constructor: {
36555
+ value: CustomError,
36556
+ enumerable: false
36557
+ },
36558
+ name: {
36559
+ value: "Error [" + code + "]",
36560
+ enumerable: false
36561
+ }
36562
+ });
36527
36563
  return CustomError;
36528
36564
  }
36529
- function abortRequest(request) {
36565
+ function destroyRequest(request, error2) {
36530
36566
  for (var event of events) {
36531
36567
  request.removeListener(event, eventHandlers[event]);
36532
36568
  }
36533
36569
  request.on("error", noop2);
36534
- request.abort();
36570
+ request.destroy(error2);
36535
36571
  }
36536
36572
  function isSubdomain(subdomain, domain) {
36537
36573
  assert(isString2(subdomain) && isString2(domain));
@@ -36547,6 +36583,9 @@ var require_follow_redirects = __commonJS({
36547
36583
  function isBuffer2(value) {
36548
36584
  return typeof value === "object" && "length" in value;
36549
36585
  }
36586
+ function isURL(value) {
36587
+ return URL4 && value instanceof URL4;
36588
+ }
36550
36589
  module2.exports = wrap({ http: http2, https: https2 });
36551
36590
  module2.exports.wrap = wrap;
36552
36591
  }
@@ -259778,14 +259817,14 @@ var import_decompress = __toESM(require_decompress(), 1);
259778
259817
  var import_fs2 = __toESM(require("fs"), 1);
259779
259818
  var import_promises = __toESM(require("fs/promises"), 1);
259780
259819
 
259781
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/bind.js
259820
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/bind.js
259782
259821
  function bind(fn, thisArg) {
259783
259822
  return function wrap() {
259784
259823
  return fn.apply(thisArg, arguments);
259785
259824
  };
259786
259825
  }
259787
259826
 
259788
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/utils.js
259827
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/utils.js
259789
259828
  var { toString } = Object.prototype;
259790
259829
  var { getPrototypeOf } = Object;
259791
259830
  var kindOf = ((cache) => (thing) => {
@@ -260142,7 +260181,7 @@ var utils_default = {
260142
260181
  isThenable
260143
260182
  };
260144
260183
 
260145
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/core/AxiosError.js
260184
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/core/AxiosError.js
260146
260185
  function AxiosError(message, code, config, request, response) {
260147
260186
  Error.call(this);
260148
260187
  if (Error.captureStackTrace) {
@@ -260209,11 +260248,11 @@ AxiosError.from = (error2, code, config, request, response, customProps) => {
260209
260248
  };
260210
260249
  var AxiosError_default = AxiosError;
260211
260250
 
260212
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/platform/node/classes/FormData.js
260251
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/platform/node/classes/FormData.js
260213
260252
  var import_form_data = __toESM(require_form_data(), 1);
260214
260253
  var FormData_default = import_form_data.default;
260215
260254
 
260216
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/toFormData.js
260255
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/toFormData.js
260217
260256
  function isVisitable(thing) {
260218
260257
  return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
260219
260258
  }
@@ -260327,7 +260366,7 @@ function toFormData(obj, formData, options) {
260327
260366
  }
260328
260367
  var toFormData_default = toFormData;
260329
260368
 
260330
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
260369
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
260331
260370
  function encode(str2) {
260332
260371
  const charMap = {
260333
260372
  "!": "%21",
@@ -260360,7 +260399,7 @@ prototype2.toString = function toString2(encoder) {
260360
260399
  };
260361
260400
  var AxiosURLSearchParams_default = AxiosURLSearchParams;
260362
260401
 
260363
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/buildURL.js
260402
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/buildURL.js
260364
260403
  function encode2(val) {
260365
260404
  return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
260366
260405
  }
@@ -260386,7 +260425,7 @@ function buildURL(url2, params, options) {
260386
260425
  return url2;
260387
260426
  }
260388
260427
 
260389
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/core/InterceptorManager.js
260428
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/core/InterceptorManager.js
260390
260429
  var InterceptorManager = class {
260391
260430
  constructor() {
260392
260431
  this.handlers = [];
@@ -260420,18 +260459,18 @@ var InterceptorManager = class {
260420
260459
  };
260421
260460
  var InterceptorManager_default = InterceptorManager;
260422
260461
 
260423
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/defaults/transitional.js
260462
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/defaults/transitional.js
260424
260463
  var transitional_default = {
260425
260464
  silentJSONParsing: true,
260426
260465
  forcedJSONParsing: true,
260427
260466
  clarifyTimeoutError: false
260428
260467
  };
260429
260468
 
260430
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
260469
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
260431
260470
  var import_url = __toESM(require("url"), 1);
260432
260471
  var URLSearchParams_default = import_url.default.URLSearchParams;
260433
260472
 
260434
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/platform/node/index.js
260473
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/platform/node/index.js
260435
260474
  var node_default = {
260436
260475
  isNode: true,
260437
260476
  classes: {
@@ -260442,7 +260481,7 @@ var node_default = {
260442
260481
  protocols: ["http", "https", "file", "data"]
260443
260482
  };
260444
260483
 
260445
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/platform/common/utils.js
260484
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/platform/common/utils.js
260446
260485
  var utils_exports = {};
260447
260486
  __export(utils_exports, {
260448
260487
  hasBrowserEnv: () => hasBrowserEnv,
@@ -260457,13 +260496,13 @@ var hasStandardBrowserWebWorkerEnv = (() => {
260457
260496
  return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
260458
260497
  })();
260459
260498
 
260460
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/platform/index.js
260499
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/platform/index.js
260461
260500
  var platform_default = {
260462
260501
  ...utils_exports,
260463
260502
  ...node_default
260464
260503
  };
260465
260504
 
260466
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/toURLEncodedForm.js
260505
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/toURLEncodedForm.js
260467
260506
  function toURLEncodedForm(data, options) {
260468
260507
  return toFormData_default(data, new platform_default.classes.URLSearchParams(), Object.assign({
260469
260508
  visitor: function(value, key, path2, helpers) {
@@ -260476,7 +260515,7 @@ function toURLEncodedForm(data, options) {
260476
260515
  }, options));
260477
260516
  }
260478
260517
 
260479
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/formDataToJSON.js
260518
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/formDataToJSON.js
260480
260519
  function parsePropPath(name) {
260481
260520
  return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
260482
260521
  return match[0] === "[]" ? "" : match[1] || match[0];
@@ -260497,6 +260536,8 @@ function arrayToObject(arr) {
260497
260536
  function formDataToJSON(formData) {
260498
260537
  function buildPath(path2, value, target, index) {
260499
260538
  let name = path2[index++];
260539
+ if (name === "__proto__")
260540
+ return true;
260500
260541
  const isNumericKey = Number.isFinite(+name);
260501
260542
  const isLast = index >= path2.length;
260502
260543
  name = !name && utils_default.isArray(target) ? target.length : name;
@@ -260528,7 +260569,7 @@ function formDataToJSON(formData) {
260528
260569
  }
260529
260570
  var formDataToJSON_default = formDataToJSON;
260530
260571
 
260531
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/defaults/index.js
260572
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/defaults/index.js
260532
260573
  function stringifySafely(rawValue, parser, encoder) {
260533
260574
  if (utils_default.isString(rawValue)) {
260534
260575
  try {
@@ -260633,7 +260674,7 @@ utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method
260633
260674
  });
260634
260675
  var defaults_default = defaults;
260635
260676
 
260636
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/parseHeaders.js
260677
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/parseHeaders.js
260637
260678
  var ignoreDuplicateOf = utils_default.toObjectSet([
260638
260679
  "age",
260639
260680
  "authorization",
@@ -260678,7 +260719,7 @@ var parseHeaders_default = (rawHeaders) => {
260678
260719
  return parsed;
260679
260720
  };
260680
260721
 
260681
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/core/AxiosHeaders.js
260722
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/core/AxiosHeaders.js
260682
260723
  var $internals = Symbol("internals");
260683
260724
  function normalizeHeader(header) {
260684
260725
  return header && String(header).trim().toLowerCase();
@@ -260896,7 +260937,7 @@ utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
260896
260937
  utils_default.freezeMethods(AxiosHeaders);
260897
260938
  var AxiosHeaders_default = AxiosHeaders;
260898
260939
 
260899
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/core/transformData.js
260940
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/core/transformData.js
260900
260941
  function transformData(fns, response) {
260901
260942
  const config = this || defaults_default;
260902
260943
  const context = response || config;
@@ -260909,12 +260950,12 @@ function transformData(fns, response) {
260909
260950
  return data;
260910
260951
  }
260911
260952
 
260912
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/cancel/isCancel.js
260953
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/cancel/isCancel.js
260913
260954
  function isCancel(value) {
260914
260955
  return !!(value && value.__CANCEL__);
260915
260956
  }
260916
260957
 
260917
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/cancel/CanceledError.js
260958
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/cancel/CanceledError.js
260918
260959
  function CanceledError(message, config, request) {
260919
260960
  AxiosError_default.call(this, message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
260920
260961
  this.name = "CanceledError";
@@ -260924,7 +260965,7 @@ utils_default.inherits(CanceledError, AxiosError_default, {
260924
260965
  });
260925
260966
  var CanceledError_default = CanceledError;
260926
260967
 
260927
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/core/settle.js
260968
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/core/settle.js
260928
260969
  function settle(resolve, reject, response) {
260929
260970
  const validateStatus2 = response.config.validateStatus;
260930
260971
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
@@ -260940,17 +260981,17 @@ function settle(resolve, reject, response) {
260940
260981
  }
260941
260982
  }
260942
260983
 
260943
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/isAbsoluteURL.js
260984
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/isAbsoluteURL.js
260944
260985
  function isAbsoluteURL(url2) {
260945
260986
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
260946
260987
  }
260947
260988
 
260948
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/combineURLs.js
260989
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/combineURLs.js
260949
260990
  function combineURLs(baseURL, relativeURL) {
260950
- return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
260991
+ return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
260951
260992
  }
260952
260993
 
260953
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/core/buildFullPath.js
260994
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/core/buildFullPath.js
260954
260995
  function buildFullPath(baseURL, requestedURL) {
260955
260996
  if (baseURL && !isAbsoluteURL(requestedURL)) {
260956
260997
  return combineURLs(baseURL, requestedURL);
@@ -260958,7 +260999,7 @@ function buildFullPath(baseURL, requestedURL) {
260958
260999
  return requestedURL;
260959
261000
  }
260960
261001
 
260961
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/adapters/http.js
261002
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/adapters/http.js
260962
261003
  var import_proxy_from_env = __toESM(require_proxy_from_env(), 1);
260963
261004
  var import_http = __toESM(require("http"), 1);
260964
261005
  var import_https = __toESM(require("https"), 1);
@@ -260966,16 +261007,16 @@ var import_util2 = __toESM(require("util"), 1);
260966
261007
  var import_follow_redirects = __toESM(require_follow_redirects(), 1);
260967
261008
  var import_zlib = __toESM(require("zlib"), 1);
260968
261009
 
260969
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/env/data.js
260970
- var VERSION = "1.6.2";
261010
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/env/data.js
261011
+ var VERSION = "1.6.5";
260971
261012
 
260972
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/parseProtocol.js
261013
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/parseProtocol.js
260973
261014
  function parseProtocol(url2) {
260974
261015
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
260975
261016
  return match && match[1] || "";
260976
261017
  }
260977
261018
 
260978
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/fromDataURI.js
261019
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/fromDataURI.js
260979
261020
  var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
260980
261021
  function fromDataURI(uri, asBlob, options) {
260981
261022
  const _Blob = options && options.Blob || platform_default.classes.Blob;
@@ -261004,13 +261045,13 @@ function fromDataURI(uri, asBlob, options) {
261004
261045
  throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT);
261005
261046
  }
261006
261047
 
261007
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/adapters/http.js
261048
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/adapters/http.js
261008
261049
  var import_stream4 = __toESM(require("stream"), 1);
261009
261050
 
261010
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/AxiosTransformStream.js
261051
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/AxiosTransformStream.js
261011
261052
  var import_stream = __toESM(require("stream"), 1);
261012
261053
 
261013
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/throttle.js
261054
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/throttle.js
261014
261055
  function throttle(fn, freq) {
261015
261056
  let timestamp2 = 0;
261016
261057
  const threshold = 1e3 / freq;
@@ -261036,7 +261077,7 @@ function throttle(fn, freq) {
261036
261077
  }
261037
261078
  var throttle_default = throttle;
261038
261079
 
261039
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/speedometer.js
261080
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/speedometer.js
261040
261081
  function speedometer(samplesCount, min2) {
261041
261082
  samplesCount = samplesCount || 10;
261042
261083
  const bytes = new Array(samplesCount);
@@ -261072,7 +261113,7 @@ function speedometer(samplesCount, min2) {
261072
261113
  }
261073
261114
  var speedometer_default = speedometer;
261074
261115
 
261075
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/AxiosTransformStream.js
261116
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/AxiosTransformStream.js
261076
261117
  var kInternals = Symbol("internals");
261077
261118
  var AxiosTransformStream = class extends import_stream.default.Transform {
261078
261119
  constructor(options) {
@@ -261222,14 +261263,14 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
261222
261263
  };
261223
261264
  var AxiosTransformStream_default = AxiosTransformStream;
261224
261265
 
261225
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/adapters/http.js
261266
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/adapters/http.js
261226
261267
  var import_events = __toESM(require("events"), 1);
261227
261268
 
261228
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/formDataToStream.js
261269
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/formDataToStream.js
261229
261270
  var import_util = require("util");
261230
261271
  var import_stream2 = require("stream");
261231
261272
 
261232
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/readBlob.js
261273
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/readBlob.js
261233
261274
  var { asyncIterator } = Symbol;
261234
261275
  var readBlob = async function* (blob) {
261235
261276
  if (blob.stream) {
@@ -261244,7 +261285,7 @@ var readBlob = async function* (blob) {
261244
261285
  };
261245
261286
  var readBlob_default = readBlob;
261246
261287
 
261247
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/formDataToStream.js
261288
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/formDataToStream.js
261248
261289
  var BOUNDARY_ALPHABET = utils_default.ALPHABET.ALPHA_DIGIT + "-_";
261249
261290
  var textEncoder = new import_util.TextEncoder();
261250
261291
  var CRLF = "\r\n";
@@ -261323,7 +261364,7 @@ var formDataToStream = (form, headersHandler, options) => {
261323
261364
  };
261324
261365
  var formDataToStream_default = formDataToStream;
261325
261366
 
261326
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
261367
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
261327
261368
  var import_stream3 = __toESM(require("stream"), 1);
261328
261369
  var ZlibHeaderTransformStream = class extends import_stream3.default.Transform {
261329
261370
  __transform(chunk, encoding, callback) {
@@ -261345,7 +261386,7 @@ var ZlibHeaderTransformStream = class extends import_stream3.default.Transform {
261345
261386
  };
261346
261387
  var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream;
261347
261388
 
261348
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/callbackify.js
261389
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/callbackify.js
261349
261390
  var callbackify = (fn, reducer) => {
261350
261391
  return utils_default.isAsyncFn(fn) ? function(...args) {
261351
261392
  const cb = args.pop();
@@ -261360,7 +261401,7 @@ var callbackify = (fn, reducer) => {
261360
261401
  };
261361
261402
  var callbackify_default = callbackify;
261362
261403
 
261363
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/adapters/http.js
261404
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/adapters/http.js
261364
261405
  var zlibOptions = {
261365
261406
  flush: import_zlib.default.constants.Z_SYNC_FLUSH,
261366
261407
  finishFlush: import_zlib.default.constants.Z_SYNC_FLUSH
@@ -261460,6 +261501,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
261460
261501
  const _lookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
261461
261502
  lookup = (hostname, opt, cb) => {
261462
261503
  _lookup(hostname, opt, (err, arg0, arg1) => {
261504
+ if (err) {
261505
+ return cb(err);
261506
+ }
261463
261507
  const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
261464
261508
  opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
261465
261509
  });
@@ -261856,7 +261900,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
261856
261900
  });
261857
261901
  };
261858
261902
 
261859
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/cookies.js
261903
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/cookies.js
261860
261904
  var cookies_default = platform_default.hasStandardBrowserEnv ? {
261861
261905
  write(name, value, expires, path2, domain, secure) {
261862
261906
  const cookie = [name + "=" + encodeURIComponent(value)];
@@ -261883,7 +261927,7 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? {
261883
261927
  }
261884
261928
  };
261885
261929
 
261886
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/isURLSameOrigin.js
261930
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/isURLSameOrigin.js
261887
261931
  var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? function standardBrowserEnv() {
261888
261932
  const msie = /(msie|trident)/i.test(navigator.userAgent);
261889
261933
  const urlParsingNode = document.createElement("a");
@@ -261917,7 +261961,7 @@ var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? function
261917
261961
  };
261918
261962
  }();
261919
261963
 
261920
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/adapters/xhr.js
261964
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/adapters/xhr.js
261921
261965
  function progressEventReducer(listener, isDownloadStream) {
261922
261966
  let bytesNotified = 0;
261923
261967
  const _speedometer = speedometer_default(50, 250);
@@ -262087,7 +262131,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
262087
262131
  });
262088
262132
  };
262089
262133
 
262090
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/adapters/adapters.js
262134
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/adapters/adapters.js
262091
262135
  var knownAdapters = {
262092
262136
  http: http_default,
262093
262137
  xhr: xhr_default
@@ -262140,7 +262184,7 @@ var adapters_default = {
262140
262184
  adapters: knownAdapters
262141
262185
  };
262142
262186
 
262143
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/core/dispatchRequest.js
262187
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/core/dispatchRequest.js
262144
262188
  function throwIfCancellationRequested(config) {
262145
262189
  if (config.cancelToken) {
262146
262190
  config.cancelToken.throwIfRequested();
@@ -262185,7 +262229,7 @@ function dispatchRequest(config) {
262185
262229
  });
262186
262230
  }
262187
262231
 
262188
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/core/mergeConfig.js
262232
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/core/mergeConfig.js
262189
262233
  var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? thing.toJSON() : thing;
262190
262234
  function mergeConfig(config1, config2) {
262191
262235
  config2 = config2 || {};
@@ -262265,7 +262309,7 @@ function mergeConfig(config1, config2) {
262265
262309
  return config;
262266
262310
  }
262267
262311
 
262268
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/validator.js
262312
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/validator.js
262269
262313
  var validators = {};
262270
262314
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type2, i) => {
262271
262315
  validators[type2] = function validator(thing) {
@@ -262323,7 +262367,7 @@ var validator_default = {
262323
262367
  validators
262324
262368
  };
262325
262369
 
262326
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/core/Axios.js
262370
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/core/Axios.js
262327
262371
  var validators2 = validator_default.validators;
262328
262372
  var Axios = class {
262329
262373
  constructor(instanceConfig) {
@@ -262458,7 +262502,7 @@ utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(m
262458
262502
  });
262459
262503
  var Axios_default = Axios;
262460
262504
 
262461
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/cancel/CancelToken.js
262505
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/cancel/CancelToken.js
262462
262506
  var CancelToken = class {
262463
262507
  constructor(executor) {
262464
262508
  if (typeof executor !== "function") {
@@ -262535,19 +262579,19 @@ var CancelToken = class {
262535
262579
  };
262536
262580
  var CancelToken_default = CancelToken;
262537
262581
 
262538
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/spread.js
262582
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/spread.js
262539
262583
  function spread(callback) {
262540
262584
  return function wrap(arr) {
262541
262585
  return callback.apply(null, arr);
262542
262586
  };
262543
262587
  }
262544
262588
 
262545
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/isAxiosError.js
262589
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/isAxiosError.js
262546
262590
  function isAxiosError(payload) {
262547
262591
  return utils_default.isObject(payload) && payload.isAxiosError === true;
262548
262592
  }
262549
262593
 
262550
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/HttpStatusCode.js
262594
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/helpers/HttpStatusCode.js
262551
262595
  var HttpStatusCode = {
262552
262596
  Continue: 100,
262553
262597
  SwitchingProtocols: 101,
@@ -262618,7 +262662,7 @@ Object.entries(HttpStatusCode).forEach(([key, value]) => {
262618
262662
  });
262619
262663
  var HttpStatusCode_default = HttpStatusCode;
262620
262664
 
262621
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/axios.js
262665
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/lib/axios.js
262622
262666
  function createInstance(defaultConfig) {
262623
262667
  const context = new Axios_default(defaultConfig);
262624
262668
  const instance = bind(Axios_default.prototype.request, context);
@@ -262651,7 +262695,7 @@ axios.HttpStatusCode = HttpStatusCode_default;
262651
262695
  axios.default = axios;
262652
262696
  var axios_default = axios;
262653
262697
 
262654
- // ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/index.js
262698
+ // ../../node_modules/.pnpm/axios@1.6.5/node_modules/axios/index.js
262655
262699
  var {
262656
262700
  Axios: Axios2,
262657
262701
  AxiosError: AxiosError2,
@@ -428254,6 +428298,293 @@ var state = {
428254
428298
  },
428255
428299
  parameters: {}
428256
428300
  },
428301
+ getTask: {
428302
+ name: "getTask",
428303
+ description: "Retrieves the [Task](#schema_task) object for a valid identifier.",
428304
+ method: "get",
428305
+ path: "/v1/chat/tasks/{id}",
428306
+ parameters: {
428307
+ id: {
428308
+ in: "path",
428309
+ type: "string",
428310
+ description: "Task id"
428311
+ }
428312
+ },
428313
+ section: "task",
428314
+ response: {
428315
+ description: "Returns a [Task](#schema_task) object if a valid identifier was provided. Returns [an error](#errors) otherwise",
428316
+ schema: {
428317
+ type: "object",
428318
+ properties: {
428319
+ task: {
428320
+ $ref: "#/components/schemas/Task"
428321
+ }
428322
+ },
428323
+ required: ["task"],
428324
+ title: "getTaskResponse",
428325
+ additionalProperties: false
428326
+ }
428327
+ }
428328
+ },
428329
+ createTask: {
428330
+ name: "createTask",
428331
+ description: "Creates a new [Task](#schema_task). When creating a new [Task](#schema_task), the required tags must be provided. See the specific integration for more details.",
428332
+ method: "post",
428333
+ path: "/v1/chat/tasks",
428334
+ requestBody: {
428335
+ description: "Task data",
428336
+ schema: {
428337
+ type: "object",
428338
+ properties: {
428339
+ title: {
428340
+ type: "string",
428341
+ description: "Title describing the task"
428342
+ },
428343
+ instruction: {
428344
+ type: "string",
428345
+ description: "All the notes related to the execution of the current task"
428346
+ },
428347
+ type: {
428348
+ type: "string",
428349
+ description: "Type of the task"
428350
+ },
428351
+ data: {
428352
+ type: "object",
428353
+ additionalProperties: true,
428354
+ description: "Content related to the task"
428355
+ },
428356
+ parentTaskId: {
428357
+ type: "string",
428358
+ description: "Parent task id is the parent task that created this task"
428359
+ },
428360
+ conversationId: {
428361
+ type: "string",
428362
+ description: "Conversation id related to this task"
428363
+ },
428364
+ userId: {
428365
+ type: "string",
428366
+ description: "Specific user related to this task"
428367
+ },
428368
+ timeoutAt: {
428369
+ type: "string",
428370
+ format: "date-time",
428371
+ description: "The timeout date where the task should be failed in the ISO 8601 format"
428372
+ },
428373
+ tags: {
428374
+ type: "object",
428375
+ additionalProperties: {
428376
+ type: "string",
428377
+ maxLength: 500
428378
+ },
428379
+ description: "Tags for the [Task](#schema_task)"
428380
+ }
428381
+ },
428382
+ required: ["title", "type", "conversationId"],
428383
+ title: "createTaskBody",
428384
+ additionalProperties: false
428385
+ }
428386
+ },
428387
+ section: "task",
428388
+ response: {
428389
+ description: "Returns a [Task](#schema_task) object if creation succeeds. Returns [an error](#errors) otherwise",
428390
+ status: 201,
428391
+ schema: {
428392
+ type: "object",
428393
+ properties: {
428394
+ task: {
428395
+ $ref: "#/components/schemas/Task"
428396
+ }
428397
+ },
428398
+ required: ["task"],
428399
+ title: "createTaskResponse",
428400
+ additionalProperties: false
428401
+ }
428402
+ },
428403
+ parameters: {}
428404
+ },
428405
+ updateTask: {
428406
+ name: "updateTask",
428407
+ description: "Update a [Task](#schema_task) object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.",
428408
+ method: "put",
428409
+ path: "/v1/chat/tasks/{id}",
428410
+ parameters: {
428411
+ id: {
428412
+ in: "path",
428413
+ type: "string",
428414
+ description: "Task id"
428415
+ }
428416
+ },
428417
+ requestBody: {
428418
+ description: "Task data",
428419
+ schema: {
428420
+ type: "object",
428421
+ properties: {
428422
+ title: {
428423
+ type: "string",
428424
+ description: "Title describing the task"
428425
+ },
428426
+ instruction: {
428427
+ type: "string",
428428
+ description: "All the notes related to the execution of the current task"
428429
+ },
428430
+ data: {
428431
+ type: "object",
428432
+ additionalProperties: true,
428433
+ description: "Content related to the task"
428434
+ },
428435
+ timeoutAt: {
428436
+ type: "string",
428437
+ format: "date-time",
428438
+ description: "The timeout date where the task should be failed in the ISO 8601 format"
428439
+ },
428440
+ status: {
428441
+ type: "string",
428442
+ enum: [
428443
+ "pending",
428444
+ "in_progress",
428445
+ "failed",
428446
+ "completed",
428447
+ "blocked",
428448
+ "paused"
428449
+ ],
428450
+ description: "Status of the task"
428451
+ },
428452
+ tags: {
428453
+ type: "object",
428454
+ additionalProperties: {
428455
+ type: "string",
428456
+ maxLength: 500
428457
+ },
428458
+ description: "Tags for the [Task](#schema_task)"
428459
+ }
428460
+ },
428461
+ title: "updateTaskBody",
428462
+ additionalProperties: false
428463
+ }
428464
+ },
428465
+ section: "task",
428466
+ response: {
428467
+ description: "Returns an updated [Task](#schema_task) object if a valid identifier was provided. Returns [an error](#errors) otherwise",
428468
+ schema: {
428469
+ type: "object",
428470
+ properties: {
428471
+ task: {
428472
+ $ref: "#/components/schemas/Task"
428473
+ }
428474
+ },
428475
+ required: ["task"],
428476
+ title: "updateTaskResponse",
428477
+ additionalProperties: false
428478
+ }
428479
+ }
428480
+ },
428481
+ deleteTask: {
428482
+ name: "deleteTask",
428483
+ description: "Permanently deletes a [Task](#schema_task). It cannot be undone.",
428484
+ method: "delete",
428485
+ path: "/v1/chat/tasks/{id}",
428486
+ parameters: {
428487
+ id: {
428488
+ in: "path",
428489
+ type: "string",
428490
+ description: "Task id"
428491
+ }
428492
+ },
428493
+ section: "task",
428494
+ response: {
428495
+ description: "Returns the [Task](#schema_task) object that was deleted",
428496
+ schema: {
428497
+ type: "object",
428498
+ title: "deleteTaskResponse",
428499
+ additionalProperties: false
428500
+ }
428501
+ }
428502
+ },
428503
+ listTasks: {
428504
+ name: "listTasks",
428505
+ description: "Retrieves a list of [Task](#schema_task) you've previously created. The tasks are returned in sorted order, with the most recent appearing first. The list can be filtered using [Tags](#tags).",
428506
+ method: "get",
428507
+ path: "/v1/chat/tasks",
428508
+ parameters: {
428509
+ nextToken: {
428510
+ in: "query",
428511
+ description: "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
428512
+ type: "string"
428513
+ },
428514
+ tags: {
428515
+ in: "query",
428516
+ type: "object",
428517
+ schema: {
428518
+ type: "object",
428519
+ additionalProperties: {
428520
+ type: "string"
428521
+ }
428522
+ },
428523
+ description: "Filter by tags"
428524
+ },
428525
+ conversationId: {
428526
+ in: "query",
428527
+ type: "string",
428528
+ description: "Conversation id"
428529
+ },
428530
+ userId: {
428531
+ in: "query",
428532
+ type: "string",
428533
+ description: "User id"
428534
+ },
428535
+ parentTaskId: {
428536
+ in: "query",
428537
+ type: "string",
428538
+ description: "Parent task id"
428539
+ },
428540
+ status: {
428541
+ in: "query",
428542
+ type: "string",
428543
+ description: "Status",
428544
+ enum: [
428545
+ "pending",
428546
+ "in_progress",
428547
+ "failed",
428548
+ "completed",
428549
+ "blocked",
428550
+ "paused"
428551
+ ]
428552
+ },
428553
+ type: {
428554
+ in: "query",
428555
+ type: "string",
428556
+ description: "Type"
428557
+ }
428558
+ },
428559
+ section: "task",
428560
+ response: {
428561
+ description: "Returns a list of [Task](#schema_task) objects",
428562
+ schema: {
428563
+ type: "object",
428564
+ properties: {
428565
+ tasks: {
428566
+ type: "array",
428567
+ items: {
428568
+ $ref: "#/components/schemas/Task"
428569
+ }
428570
+ },
428571
+ meta: {
428572
+ type: "object",
428573
+ properties: {
428574
+ nextToken: {
428575
+ type: "string",
428576
+ description: "The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint."
428577
+ }
428578
+ },
428579
+ additionalProperties: false
428580
+ }
428581
+ },
428582
+ required: ["tasks", "meta"],
428583
+ title: "listTasksResponse",
428584
+ additionalProperties: false
428585
+ }
428586
+ }
428587
+ },
428257
428588
  runVrl: {
428258
428589
  name: "runVrl",
428259
428590
  description: "Run a VRL script",
@@ -428798,6 +429129,25 @@ var state = {
428798
429129
  additionalProperties: false
428799
429130
  }
428800
429131
  },
429132
+ subscriptions: {
429133
+ type: "object",
429134
+ properties: {
429135
+ events: {
429136
+ type: "object",
429137
+ additionalProperties: {
429138
+ type: "object",
429139
+ additionalProperties: {
429140
+ readOnly: true
429141
+ }
429142
+ },
429143
+ nullable: true,
429144
+ description: 'Events that the bot is currently subscribed on (ex: "slack:reactionAdded"). If null, the bot is subscribed to all events.'
429145
+ }
429146
+ },
429147
+ required: ["events"],
429148
+ description: "Subscriptions of the bot",
429149
+ additionalProperties: false
429150
+ },
428801
429151
  configuration: {
428802
429152
  type: "object",
428803
429153
  properties: {
@@ -429178,6 +429528,24 @@ var state = {
429178
429528
  additionalProperties: false
429179
429529
  }
429180
429530
  },
429531
+ subscriptions: {
429532
+ type: "object",
429533
+ properties: {
429534
+ events: {
429535
+ type: "object",
429536
+ additionalProperties: {
429537
+ type: "object",
429538
+ additionalProperties: {
429539
+ readOnly: true
429540
+ },
429541
+ nullable: true
429542
+ },
429543
+ nullable: true
429544
+ }
429545
+ },
429546
+ required: ["events"],
429547
+ additionalProperties: false
429548
+ },
429181
429549
  code: {
429182
429550
  type: "string",
429183
429551
  description: "JavaScript code of the bot"
@@ -430183,6 +430551,36 @@ var state = {
430183
430551
  },
430184
430552
  spendingLimit: {
430185
430553
  type: "number"
430554
+ },
430555
+ about: {
430556
+ default: "",
430557
+ type: "string"
430558
+ },
430559
+ profilePicture: {
430560
+ default: "",
430561
+ type: "string"
430562
+ },
430563
+ contactEmail: {
430564
+ default: "",
430565
+ type: "string"
430566
+ },
430567
+ website: {
430568
+ default: "",
430569
+ type: "string"
430570
+ },
430571
+ socialAccounts: {
430572
+ default: [],
430573
+ type: "array",
430574
+ items: {
430575
+ type: "string"
430576
+ }
430577
+ },
430578
+ isPublic: {
430579
+ type: "boolean"
430580
+ },
430581
+ handle: {
430582
+ default: "",
430583
+ type: "string"
430186
430584
  }
430187
430585
  },
430188
430586
  required: [
@@ -430260,6 +430658,36 @@ var state = {
430260
430658
  },
430261
430659
  spendingLimit: {
430262
430660
  type: "number"
430661
+ },
430662
+ about: {
430663
+ default: "",
430664
+ type: "string"
430665
+ },
430666
+ profilePicture: {
430667
+ default: "",
430668
+ type: "string"
430669
+ },
430670
+ contactEmail: {
430671
+ default: "",
430672
+ type: "string"
430673
+ },
430674
+ website: {
430675
+ default: "",
430676
+ type: "string"
430677
+ },
430678
+ socialAccounts: {
430679
+ default: [],
430680
+ type: "array",
430681
+ items: {
430682
+ type: "string"
430683
+ }
430684
+ },
430685
+ isPublic: {
430686
+ type: "boolean"
430687
+ },
430688
+ handle: {
430689
+ default: "",
430690
+ type: "string"
430263
430691
  }
430264
430692
  },
430265
430693
  required: [
@@ -430646,10 +431074,38 @@ var state = {
430646
431074
  type: "number",
430647
431075
  minimum: 5,
430648
431076
  maximum: 1e3
431077
+ },
431078
+ about: {
431079
+ type: "string"
431080
+ },
431081
+ profilePicture: {
431082
+ type: "string"
431083
+ },
431084
+ contactEmail: {
431085
+ type: "string"
431086
+ },
431087
+ website: {
431088
+ type: "string"
431089
+ },
431090
+ socialAccounts: {
431091
+ type: "array",
431092
+ items: {
431093
+ type: "string"
431094
+ },
431095
+ maxItems: 5
431096
+ },
431097
+ isPublic: {
431098
+ type: "boolean"
431099
+ },
431100
+ handle: {
431101
+ type: "string",
431102
+ minLength: 1,
431103
+ maxLength: 64,
431104
+ pattern: "^[0-9a-z][a-z0-9-]+[0-9a-z]$"
430649
431105
  }
430650
431106
  },
430651
- title: "updateWorkspaceBody",
430652
- additionalProperties: false
431107
+ additionalProperties: false,
431108
+ title: "updateWorkspaceBody"
430653
431109
  }
430654
431110
  },
430655
431111
  response: {
@@ -430692,6 +431148,36 @@ var state = {
430692
431148
  },
430693
431149
  spendingLimit: {
430694
431150
  type: "number"
431151
+ },
431152
+ about: {
431153
+ default: "",
431154
+ type: "string"
431155
+ },
431156
+ profilePicture: {
431157
+ default: "",
431158
+ type: "string"
431159
+ },
431160
+ contactEmail: {
431161
+ default: "",
431162
+ type: "string"
431163
+ },
431164
+ website: {
431165
+ default: "",
431166
+ type: "string"
431167
+ },
431168
+ socialAccounts: {
431169
+ default: [],
431170
+ type: "array",
431171
+ items: {
431172
+ type: "string"
431173
+ }
431174
+ },
431175
+ isPublic: {
431176
+ type: "boolean"
431177
+ },
431178
+ handle: {
431179
+ default: "",
431180
+ type: "string"
430695
431181
  }
430696
431182
  },
430697
431183
  required: [
@@ -430712,6 +431198,57 @@ var state = {
430712
431198
  }
430713
431199
  }
430714
431200
  },
431201
+ checkHandleAvailability: {
431202
+ name: "checkHandleAvailability",
431203
+ description: "Check if a workspace handle is available",
431204
+ section: "workspace",
431205
+ method: "put",
431206
+ disableDefaultParameters: {
431207
+ "x-workspace-id": true
431208
+ },
431209
+ path: "/v1/admin/workspaces/handle-availability",
431210
+ requestBody: {
431211
+ description: "Workspace handle availability",
431212
+ schema: {
431213
+ type: "object",
431214
+ properties: {
431215
+ handle: {
431216
+ type: "string",
431217
+ minLength: 1,
431218
+ maxLength: 50,
431219
+ pattern: "^[a-z0-9-_]+$"
431220
+ }
431221
+ },
431222
+ required: ["handle"],
431223
+ title: "checkHandleAvailabilityBody",
431224
+ additionalProperties: false
431225
+ }
431226
+ },
431227
+ response: {
431228
+ description: "Success",
431229
+ schema: {
431230
+ type: "object",
431231
+ properties: {
431232
+ available: {
431233
+ type: "boolean"
431234
+ },
431235
+ suggestions: {
431236
+ type: "array",
431237
+ items: {
431238
+ type: "string"
431239
+ }
431240
+ },
431241
+ usedBy: {
431242
+ type: "string"
431243
+ }
431244
+ },
431245
+ required: ["available", "suggestions"],
431246
+ title: "checkHandleAvailabilityResponse",
431247
+ additionalProperties: false
431248
+ }
431249
+ },
431250
+ parameters: {}
431251
+ },
430715
431252
  listWorkspaces: {
430716
431253
  name: "listWorkspaces",
430717
431254
  description: "List workspaces the user has access to",
@@ -430773,6 +431310,36 @@ var state = {
430773
431310
  },
430774
431311
  spendingLimit: {
430775
431312
  type: "number"
431313
+ },
431314
+ about: {
431315
+ default: "",
431316
+ type: "string"
431317
+ },
431318
+ profilePicture: {
431319
+ default: "",
431320
+ type: "string"
431321
+ },
431322
+ contactEmail: {
431323
+ default: "",
431324
+ type: "string"
431325
+ },
431326
+ website: {
431327
+ default: "",
431328
+ type: "string"
431329
+ },
431330
+ socialAccounts: {
431331
+ default: [],
431332
+ type: "array",
431333
+ items: {
431334
+ type: "string"
431335
+ }
431336
+ },
431337
+ isPublic: {
431338
+ type: "boolean"
431339
+ },
431340
+ handle: {
431341
+ default: "",
431342
+ type: "string"
430776
431343
  }
430777
431344
  },
430778
431345
  required: [
@@ -430879,6 +431446,36 @@ var state = {
430879
431446
  },
430880
431447
  spendingLimit: {
430881
431448
  type: "number"
431449
+ },
431450
+ about: {
431451
+ default: "",
431452
+ type: "string"
431453
+ },
431454
+ profilePicture: {
431455
+ default: "",
431456
+ type: "string"
431457
+ },
431458
+ contactEmail: {
431459
+ default: "",
431460
+ type: "string"
431461
+ },
431462
+ website: {
431463
+ default: "",
431464
+ type: "string"
431465
+ },
431466
+ socialAccounts: {
431467
+ default: [],
431468
+ type: "array",
431469
+ items: {
431470
+ type: "string"
431471
+ }
431472
+ },
431473
+ isPublic: {
431474
+ type: "boolean"
431475
+ },
431476
+ handle: {
431477
+ default: "",
431478
+ type: "string"
430882
431479
  }
430883
431480
  },
430884
431481
  required: [
@@ -431063,6 +431660,9 @@ var state = {
431063
431660
  email: {
431064
431661
  type: "string"
431065
431662
  },
431663
+ createdAt: {
431664
+ type: "string"
431665
+ },
431066
431666
  role: {
431067
431667
  type: "string",
431068
431668
  enum: [
@@ -431075,7 +431675,7 @@ var state = {
431075
431675
  ]
431076
431676
  }
431077
431677
  },
431078
- required: ["id", "email", "role"]
431678
+ required: ["id", "email", "createdAt", "role"]
431079
431679
  }
431080
431680
  },
431081
431681
  meta: {
@@ -431164,6 +431764,9 @@ var state = {
431164
431764
  email: {
431165
431765
  type: "string"
431166
431766
  },
431767
+ createdAt: {
431768
+ type: "string"
431769
+ },
431167
431770
  role: {
431168
431771
  type: "string",
431169
431772
  enum: [
@@ -431176,7 +431779,7 @@ var state = {
431176
431779
  ]
431177
431780
  }
431178
431781
  },
431179
- required: ["id", "email", "role"],
431782
+ required: ["id", "email", "createdAt", "role"],
431180
431783
  title: "createWorkspaceMemberResponse",
431181
431784
  additionalProperties: false
431182
431785
  }
@@ -431232,6 +431835,9 @@ var state = {
431232
431835
  email: {
431233
431836
  type: "string"
431234
431837
  },
431838
+ createdAt: {
431839
+ type: "string"
431840
+ },
431235
431841
  role: {
431236
431842
  type: "string",
431237
431843
  enum: [
@@ -431244,7 +431850,7 @@ var state = {
431244
431850
  ]
431245
431851
  }
431246
431852
  },
431247
- required: ["id", "email", "role"],
431853
+ required: ["id", "email", "createdAt", "role"],
431248
431854
  title: "updateWorkspaceMemberResponse",
431249
431855
  additionalProperties: false
431250
431856
  }
@@ -432587,7 +433193,7 @@ var state = {
432587
433193
  title: "Botpress API",
432588
433194
  description: "API for Botpress Cloud",
432589
433195
  server: "https://api.botpress.cloud",
432590
- version: "0.15.12",
433196
+ version: "0.16.2",
432591
433197
  prefix: "v1"
432592
433198
  },
432593
433199
  errors: [
@@ -432715,6 +433321,8 @@ var state = {
432715
433321
  patchStateBody: true,
432716
433322
  callActionBody: true,
432717
433323
  configureIntegrationBody: true,
433324
+ createTaskBody: true,
433325
+ updateTaskBody: true,
432718
433326
  runVrlBody: true,
432719
433327
  createPersonalAccessTokenBody: true,
432720
433328
  setAccountPreferenceBody: true,
@@ -432725,6 +433333,7 @@ var state = {
432725
433333
  chargeWorkspaceUnpaidInvoicesBody: true,
432726
433334
  createWorkspaceBody: true,
432727
433335
  updateWorkspaceBody: true,
433336
+ checkHandleAvailabilityBody: true,
432728
433337
  changeWorkspacePlanBody: true,
432729
433338
  createWorkspaceMemberBody: true,
432730
433339
  updateWorkspaceMemberBody: true,
@@ -432765,6 +433374,11 @@ var state = {
432765
433374
  patchStateResponse: true,
432766
433375
  callActionResponse: true,
432767
433376
  configureIntegrationResponse: true,
433377
+ getTaskResponse: true,
433378
+ createTaskResponse: true,
433379
+ updateTaskResponse: true,
433380
+ deleteTaskResponse: true,
433381
+ listTasksResponse: true,
432768
433382
  runVrlResponse: true,
432769
433383
  getAccountResponse: true,
432770
433384
  listPersonalAccessTokensResponse: true,
@@ -432799,6 +433413,7 @@ var state = {
432799
433413
  getWorkspaceQuotaResponse: true,
432800
433414
  listWorkspaceQuotasResponse: true,
432801
433415
  updateWorkspaceResponse: true,
433416
+ checkHandleAvailabilityResponse: true,
432802
433417
  listWorkspacesResponse: true,
432803
433418
  changeWorkspacePlanResponse: true,
432804
433419
  deleteWorkspaceResponse: true,
@@ -432838,6 +433453,7 @@ var state = {
432838
433453
  Event: true,
432839
433454
  Message: true,
432840
433455
  State: true,
433456
+ Task: true,
432841
433457
  File: true,
432842
433458
  Table: true,
432843
433459
  Column: true,
@@ -433156,13 +433772,48 @@ var state = {
433156
433772
  payload: {
433157
433773
  type: "object",
433158
433774
  additionalProperties: true
433775
+ },
433776
+ failedAttempts: {
433777
+ type: "number",
433778
+ description: "The number of times the recurring event failed to run. This counter resets once the recurring event runs successfully."
433779
+ },
433780
+ lastFailureReason: {
433781
+ type: "string",
433782
+ maxLength: 2e3,
433783
+ description: "The reason why the recurring event failed to run in the last attempt.",
433784
+ nullable: true
433159
433785
  }
433160
433786
  },
433161
- required: ["schedule", "type", "payload"],
433787
+ required: [
433788
+ "schedule",
433789
+ "type",
433790
+ "payload",
433791
+ "failedAttempts",
433792
+ "lastFailureReason"
433793
+ ],
433162
433794
  additionalProperties: false
433163
433795
  },
433164
433796
  description: "Recurring events"
433165
433797
  },
433798
+ subscriptions: {
433799
+ type: "object",
433800
+ properties: {
433801
+ events: {
433802
+ type: "object",
433803
+ additionalProperties: {
433804
+ type: "object",
433805
+ additionalProperties: {
433806
+ readOnly: true
433807
+ }
433808
+ },
433809
+ nullable: true,
433810
+ description: 'Events that the bot is currently subscribed on (ex: "slack:reactionAdded"). If null, the bot is subscribed to all events.'
433811
+ }
433812
+ },
433813
+ required: ["events"],
433814
+ description: "Subscriptions of the bot",
433815
+ additionalProperties: false
433816
+ },
433166
433817
  name: {
433167
433818
  type: "string",
433168
433819
  description: "Name of the [Bot](#schema_bot)"
@@ -433221,6 +433872,7 @@ var state = {
433221
433872
  "configuration",
433222
433873
  "events",
433223
433874
  "recurringEvents",
433875
+ "subscriptions",
433224
433876
  "name",
433225
433877
  "dev",
433226
433878
  "alwaysAlive",
@@ -433648,6 +434300,36 @@ var state = {
433648
434300
  },
433649
434301
  spendingLimit: {
433650
434302
  type: "number"
434303
+ },
434304
+ about: {
434305
+ default: "",
434306
+ type: "string"
434307
+ },
434308
+ profilePicture: {
434309
+ default: "",
434310
+ type: "string"
434311
+ },
434312
+ contactEmail: {
434313
+ default: "",
434314
+ type: "string"
434315
+ },
434316
+ website: {
434317
+ default: "",
434318
+ type: "string"
434319
+ },
434320
+ socialAccounts: {
434321
+ default: [],
434322
+ type: "array",
434323
+ items: {
434324
+ type: "string"
434325
+ }
434326
+ },
434327
+ isPublic: {
434328
+ type: "boolean"
434329
+ },
434330
+ handle: {
434331
+ default: "",
434332
+ type: "string"
433651
434333
  }
433652
434334
  },
433653
434335
  required: [
@@ -433681,6 +434363,9 @@ var state = {
433681
434363
  email: {
433682
434364
  type: "string"
433683
434365
  },
434366
+ createdAt: {
434367
+ type: "string"
434368
+ },
433684
434369
  role: {
433685
434370
  type: "string",
433686
434371
  enum: [
@@ -433693,7 +434378,7 @@ var state = {
433693
434378
  ]
433694
434379
  }
433695
434380
  },
433696
- required: ["id", "email", "role"],
434381
+ required: ["id", "email", "createdAt", "role"],
433697
434382
  additionalProperties: false
433698
434383
  }
433699
434384
  },
@@ -433919,6 +434604,12 @@ var state = {
433919
434604
  maxLength: 36,
433920
434605
  description: "ID of the [Conversation](#schema_conversation)"
433921
434606
  },
434607
+ currentTaskId: {
434608
+ type: "string",
434609
+ minLength: 28,
434610
+ maxLength: 36,
434611
+ description: "Id of the current [Task](#schema_task)"
434612
+ },
433922
434613
  createdAt: {
433923
434614
  type: "string",
433924
434615
  format: "date-time",
@@ -434000,9 +434691,26 @@ var state = {
434000
434691
  minLength: 28,
434001
434692
  maxLength: 36,
434002
434693
  description: "ID of the [Message](#schema_message) to link the event to."
434694
+ },
434695
+ status: {
434696
+ type: "string",
434697
+ enum: ["pending", "processed", "ignored", "failed"]
434698
+ },
434699
+ failureReason: {
434700
+ type: "string",
434701
+ maxLength: 2e3,
434702
+ description: "Reason why the event failed to be processed",
434703
+ nullable: true
434003
434704
  }
434004
434705
  },
434005
- required: ["id", "createdAt", "type", "payload"],
434706
+ required: [
434707
+ "id",
434708
+ "createdAt",
434709
+ "type",
434710
+ "payload",
434711
+ "status",
434712
+ "failureReason"
434713
+ ],
434006
434714
  description: "The event object represents an action or an occurrence.",
434007
434715
  additionalProperties: false
434008
434716
  }
@@ -434140,6 +434848,110 @@ var state = {
434140
434848
  additionalProperties: false
434141
434849
  }
434142
434850
  },
434851
+ Task: {
434852
+ section: "task",
434853
+ schema: {
434854
+ type: "object",
434855
+ properties: {
434856
+ id: {
434857
+ type: "string",
434858
+ minLength: 28,
434859
+ maxLength: 36,
434860
+ description: "ID of the [Conversation](#schema_conversation)"
434861
+ },
434862
+ title: {
434863
+ type: "string",
434864
+ maxLength: 64,
434865
+ description: "Title describing the task"
434866
+ },
434867
+ instruction: {
434868
+ type: "string",
434869
+ maxLength: 256,
434870
+ description: "All the notes related to the execution of the current task"
434871
+ },
434872
+ type: {
434873
+ type: "string",
434874
+ description: "Type of the task"
434875
+ },
434876
+ data: {
434877
+ type: "object",
434878
+ additionalProperties: true,
434879
+ description: "Content related to the task"
434880
+ },
434881
+ status: {
434882
+ type: "string",
434883
+ enum: [
434884
+ "pending",
434885
+ "in_progress",
434886
+ "failed",
434887
+ "completed",
434888
+ "blocked",
434889
+ "paused"
434890
+ ],
434891
+ description: "Status of the task"
434892
+ },
434893
+ parentTaskId: {
434894
+ type: "string",
434895
+ minLength: 28,
434896
+ maxLength: 36,
434897
+ description: "Parent task id is the parent task that created this task"
434898
+ },
434899
+ conversationId: {
434900
+ type: "string",
434901
+ minLength: 28,
434902
+ maxLength: 36,
434903
+ description: "Conversation id related to this task"
434904
+ },
434905
+ userId: {
434906
+ type: "string",
434907
+ minLength: 28,
434908
+ maxLength: 36,
434909
+ description: "Specific user related to this task"
434910
+ },
434911
+ timeoutAt: {
434912
+ type: "string",
434913
+ format: "date-time",
434914
+ description: "The timeout date where the task should be failed in the ISO 8601 format"
434915
+ },
434916
+ createdAt: {
434917
+ type: "string",
434918
+ format: "date-time",
434919
+ description: "Creation date of the task in ISO 8601 format"
434920
+ },
434921
+ updatedAt: {
434922
+ type: "string",
434923
+ format: "date-time",
434924
+ description: "Updating date of the task in ISO 8601 format"
434925
+ },
434926
+ failureReason: {
434927
+ type: "string",
434928
+ maxLength: 2e3,
434929
+ description: "If the task fails this is the reason behind it"
434930
+ },
434931
+ tags: {
434932
+ type: "object",
434933
+ additionalProperties: {
434934
+ type: "string"
434935
+ },
434936
+ description: "Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Task](#schema_task). Individual keys can be unset by posting an empty value to them."
434937
+ }
434938
+ },
434939
+ required: [
434940
+ "id",
434941
+ "title",
434942
+ "instruction",
434943
+ "type",
434944
+ "data",
434945
+ "status",
434946
+ "timeoutAt",
434947
+ "createdAt",
434948
+ "updatedAt",
434949
+ "tags"
434950
+ ],
434951
+ description: "Task definition",
434952
+ additionalProperties: false
434953
+ }
434954
+ },
434143
434955
  File: {
434144
434956
  section: "file",
434145
434957
  schema: {
@@ -434200,53 +435012,74 @@ var state = {
434200
435012
  maximum: 30,
434201
435013
  description: "The 'factor' multiplies the row's data storage limit by 4KB and its quota count, but can only be set at table creation and not modified later. For instance, a factor of 2 increases storage to 8KB but counts as 2 rows in your quota. The default factor is 1."
434202
435014
  },
434203
- columns: {
434204
- type: "array",
434205
- items: {
434206
- type: "object",
435015
+ schema: {
435016
+ type: "object",
435017
+ properties: {
435018
+ $schema: {
435019
+ type: "string"
435020
+ },
434207
435021
  properties: {
434208
- id: {
434209
- type: "string",
434210
- description: "Unique identifier for the column."
434211
- },
434212
- name: {
434213
- type: "string",
434214
- minLength: 1,
434215
- maxLength: 30,
434216
- description: "Name of the column, must be within length limits."
434217
- },
434218
- description: {
434219
- type: "string",
434220
- description: "Optional descriptive text about the column."
434221
- },
434222
- searchable: {
434223
- type: "boolean",
434224
- description: "Indicates if the column is vectorized and searchable."
434225
- },
434226
- type: {
434227
- type: "string",
434228
- enum: ["string", "number", "boolean", "date", "object"],
434229
- description: 'Specifies the data type of the column. Use "object" for complex data structures.'
435022
+ type: "object",
435023
+ additionalProperties: {
435024
+ type: "object",
435025
+ properties: {
435026
+ type: {
435027
+ type: "string",
435028
+ enum: ["string", "number", "boolean", "object", "null"]
435029
+ },
435030
+ format: {
435031
+ type: "string",
435032
+ enum: ["date-time"]
435033
+ },
435034
+ description: {
435035
+ type: "string"
435036
+ },
435037
+ nullable: {
435038
+ default: true,
435039
+ type: "boolean"
435040
+ },
435041
+ "x-zui": {
435042
+ type: "object",
435043
+ properties: {
435044
+ index: {
435045
+ type: "integer"
435046
+ },
435047
+ searchable: {
435048
+ type: "boolean",
435049
+ description: "Indicates if the column is vectorized and searchable."
435050
+ },
435051
+ typings: {
435052
+ type: "string",
435053
+ description: 'TypeScript typings for the column. Recommended if the type is "object", ex: "\\{ foo: string; bar: number \\}"'
435054
+ }
435055
+ },
435056
+ required: ["index"],
435057
+ additionalProperties: false
435058
+ }
435059
+ },
435060
+ required: ["type", "x-zui"],
435061
+ additionalProperties: false
434230
435062
  },
434231
- typings: {
434232
- type: "string",
434233
- description: 'TypeScript typings for the column. Recommended if the type is "object", ex: "\\{ foo: string; bar: number \\}"'
435063
+ description: "List of keys/columns in the table."
435064
+ },
435065
+ additionalProperties: {
435066
+ type: "boolean",
435067
+ enum: [false]
435068
+ },
435069
+ required: {
435070
+ type: "array",
435071
+ items: {
435072
+ type: "string"
434234
435073
  },
434235
- schema: {
434236
- type: "object",
434237
- properties: {},
434238
- additionalProperties: true
434239
- }
435074
+ description: "Array of required properties."
434240
435075
  },
434241
- required: ["name", "type"]
435076
+ type: {
435077
+ type: "string",
435078
+ enum: ["object"]
435079
+ }
434242
435080
  },
434243
- maxItems: 20,
434244
- description: "Array of columns in the table."
434245
- },
434246
- schema: {
434247
- type: "object",
434248
- additionalProperties: true,
434249
- description: "Provide an object or a JSON schema to define the columns of the table. A maximum of 20 keys in the object/schema is allowed."
435081
+ required: ["$schema", "properties", "additionalProperties", "type"],
435082
+ additionalProperties: false
434250
435083
  },
434251
435084
  tags: {
434252
435085
  type: "object",
@@ -434264,7 +435097,7 @@ var state = {
434264
435097
  description: "Timestamp of the last table update."
434265
435098
  }
434266
435099
  },
434267
- required: ["id", "name", "columns", "schema"],
435100
+ required: ["id", "name", "schema"],
434268
435101
  additionalProperties: false
434269
435102
  }
434270
435103
  },
@@ -434426,6 +435259,19 @@ var state = {
434426
435259
  name: "action",
434427
435260
  operations: ["callAction"]
434428
435261
  },
435262
+ {
435263
+ description: "",
435264
+ title: "Task",
435265
+ name: "task",
435266
+ operations: [
435267
+ "getTask",
435268
+ "createTask",
435269
+ "updateTask",
435270
+ "deleteTask",
435271
+ "listTasks"
435272
+ ],
435273
+ schema: "Task"
435274
+ },
434429
435275
  {
434430
435276
  title: "Bot",
434431
435277
  description: "",
@@ -434478,6 +435324,7 @@ var state = {
434478
435324
  "getWorkspaceQuota",
434479
435325
  "listWorkspaceQuotas",
434480
435326
  "updateWorkspace",
435327
+ "checkHandleAvailability",
434481
435328
  "listWorkspaces",
434482
435329
  "changeWorkspacePlan",
434483
435330
  "deleteWorkspace",