@botpress/api 0.15.8 → 0.15.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
@@ -127,9 +127,9 @@ var require_dist = __commonJS({
127
127
  }
128
128
  });
129
129
 
130
- // ../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/helpers/util.js
130
+ // ../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/helpers/util.js
131
131
  var require_util = __commonJS({
132
- "../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/helpers/util.js"(exports) {
132
+ "../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/helpers/util.js"(exports) {
133
133
  "use strict";
134
134
  Object.defineProperty(exports, "__esModule", { value: true });
135
135
  exports.getParsedType = exports.ZodParsedType = exports.objectUtil = exports.util = void 0;
@@ -267,9 +267,9 @@ var require_util = __commonJS({
267
267
  }
268
268
  });
269
269
 
270
- // ../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/ZodError.js
270
+ // ../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/ZodError.js
271
271
  var require_ZodError = __commonJS({
272
- "../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/ZodError.js"(exports) {
272
+ "../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/ZodError.js"(exports) {
273
273
  "use strict";
274
274
  Object.defineProperty(exports, "__esModule", { value: true });
275
275
  exports.ZodError = exports.quotelessJson = exports.ZodIssueCode = void 0;
@@ -389,9 +389,9 @@ var require_ZodError = __commonJS({
389
389
  }
390
390
  });
391
391
 
392
- // ../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/locales/en.js
392
+ // ../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/locales/en.js
393
393
  var require_en = __commonJS({
394
- "../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/locales/en.js"(exports) {
394
+ "../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/locales/en.js"(exports) {
395
395
  "use strict";
396
396
  Object.defineProperty(exports, "__esModule", { value: true });
397
397
  var util_1 = require_util();
@@ -498,9 +498,9 @@ var require_en = __commonJS({
498
498
  }
499
499
  });
500
500
 
501
- // ../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/errors.js
501
+ // ../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/errors.js
502
502
  var require_errors = __commonJS({
503
- "../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/errors.js"(exports) {
503
+ "../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/errors.js"(exports) {
504
504
  "use strict";
505
505
  var __importDefault = exports && exports.__importDefault || function(mod) {
506
506
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -521,9 +521,9 @@ var require_errors = __commonJS({
521
521
  }
522
522
  });
523
523
 
524
- // ../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/helpers/parseUtil.js
524
+ // ../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/helpers/parseUtil.js
525
525
  var require_parseUtil = __commonJS({
526
- "../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/helpers/parseUtil.js"(exports) {
526
+ "../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/helpers/parseUtil.js"(exports) {
527
527
  "use strict";
528
528
  var __importDefault = exports && exports.__importDefault || function(mod) {
529
529
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -612,7 +612,7 @@ var require_parseUtil = __commonJS({
612
612
  status.dirty();
613
613
  if (value.status === "dirty")
614
614
  status.dirty();
615
- if (typeof value.value !== "undefined" || pair.alwaysSet) {
615
+ if (key.value !== "__proto__" && (typeof value.value !== "undefined" || pair.alwaysSet)) {
616
616
  finalObject[key.value] = value.value;
617
617
  }
618
618
  }
@@ -638,17 +638,17 @@ var require_parseUtil = __commonJS({
638
638
  }
639
639
  });
640
640
 
641
- // ../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/helpers/typeAliases.js
641
+ // ../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/helpers/typeAliases.js
642
642
  var require_typeAliases = __commonJS({
643
- "../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/helpers/typeAliases.js"(exports) {
643
+ "../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/helpers/typeAliases.js"(exports) {
644
644
  "use strict";
645
645
  Object.defineProperty(exports, "__esModule", { value: true });
646
646
  }
647
647
  });
648
648
 
649
- // ../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/helpers/errorUtil.js
649
+ // ../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/helpers/errorUtil.js
650
650
  var require_errorUtil = __commonJS({
651
- "../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/helpers/errorUtil.js"(exports) {
651
+ "../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/helpers/errorUtil.js"(exports) {
652
652
  "use strict";
653
653
  Object.defineProperty(exports, "__esModule", { value: true });
654
654
  exports.errorUtil = void 0;
@@ -660,13 +660,13 @@ var require_errorUtil = __commonJS({
660
660
  }
661
661
  });
662
662
 
663
- // ../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/types.js
663
+ // ../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/types.js
664
664
  var require_types = __commonJS({
665
- "../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/types.js"(exports) {
665
+ "../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/types.js"(exports) {
666
666
  "use strict";
667
667
  Object.defineProperty(exports, "__esModule", { value: true });
668
- exports.discriminatedUnion = exports.date = exports.boolean = exports.bigint = exports.array = exports.any = exports.coerce = exports.ZodFirstPartyTypeKind = exports.late = exports.ZodSchema = exports.Schema = exports.custom = exports.ZodPipeline = exports.ZodBranded = exports.BRAND = exports.ZodNaN = exports.ZodCatch = exports.ZodDefault = exports.ZodNullable = exports.ZodOptional = exports.ZodTransformer = exports.ZodEffects = exports.ZodPromise = exports.ZodNativeEnum = exports.ZodEnum = exports.ZodLiteral = exports.ZodLazy = exports.ZodFunction = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = exports.ZodIntersection = exports.ZodDiscriminatedUnion = exports.ZodUnion = exports.ZodObject = exports.ZodArray = exports.ZodVoid = exports.ZodNever = exports.ZodUnknown = exports.ZodAny = exports.ZodNull = exports.ZodUndefined = exports.ZodSymbol = exports.ZodDate = exports.ZodBoolean = exports.ZodBigInt = exports.ZodNumber = exports.ZodString = exports.ZodType = void 0;
669
- exports.NEVER = exports.void = exports.unknown = exports.union = exports.undefined = exports.tuple = exports.transformer = exports.symbol = exports.string = exports.strictObject = exports.set = exports.record = exports.promise = exports.preprocess = exports.pipeline = exports.ostring = exports.optional = exports.onumber = exports.oboolean = exports.object = exports.number = exports.nullable = exports.null = exports.never = exports.nativeEnum = exports.nan = exports.map = exports.literal = exports.lazy = exports.intersection = exports.instanceof = exports.function = exports.enum = exports.effect = void 0;
668
+ exports.date = exports.boolean = exports.bigint = exports.array = exports.any = exports.coerce = exports.ZodFirstPartyTypeKind = exports.late = exports.ZodSchema = exports.Schema = exports.custom = exports.ZodReadonly = exports.ZodPipeline = exports.ZodBranded = exports.BRAND = exports.ZodNaN = exports.ZodCatch = exports.ZodDefault = exports.ZodNullable = exports.ZodOptional = exports.ZodTransformer = exports.ZodEffects = exports.ZodPromise = exports.ZodNativeEnum = exports.ZodEnum = exports.ZodLiteral = exports.ZodLazy = exports.ZodFunction = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = exports.ZodIntersection = exports.ZodDiscriminatedUnion = exports.ZodUnion = exports.ZodObject = exports.ZodArray = exports.ZodVoid = exports.ZodNever = exports.ZodUnknown = exports.ZodAny = exports.ZodNull = exports.ZodUndefined = exports.ZodSymbol = exports.ZodDate = exports.ZodBoolean = exports.ZodBigInt = exports.ZodNumber = exports.ZodString = exports.ZodType = void 0;
669
+ exports.NEVER = exports.void = exports.unknown = exports.union = exports.undefined = exports.tuple = exports.transformer = exports.symbol = exports.string = exports.strictObject = exports.set = exports.record = exports.promise = exports.preprocess = exports.pipeline = exports.ostring = exports.optional = exports.onumber = exports.oboolean = exports.object = exports.number = exports.nullable = exports.null = exports.never = exports.nativeEnum = exports.nan = exports.map = exports.literal = exports.lazy = exports.intersection = exports.instanceof = exports.function = exports.enum = exports.effect = exports.discriminatedUnion = void 0;
670
670
  var errors_1 = require_errors();
671
671
  var errorUtil_1 = require_errorUtil();
672
672
  var parseUtil_1 = require_parseUtil();
@@ -754,6 +754,7 @@ var require_types = __commonJS({
754
754
  this.catch = this.catch.bind(this);
755
755
  this.describe = this.describe.bind(this);
756
756
  this.pipe = this.pipe.bind(this);
757
+ this.readonly = this.readonly.bind(this);
757
758
  this.isNullable = this.isNullable.bind(this);
758
759
  this.isOptional = this.isOptional.bind(this);
759
760
  }
@@ -961,6 +962,9 @@ var require_types = __commonJS({
961
962
  pipe(target) {
962
963
  return ZodPipeline2.create(this, target);
963
964
  }
965
+ readonly() {
966
+ return ZodReadonly2.create(this);
967
+ }
964
968
  isOptional() {
965
969
  return this.safeParse(void 0).success;
966
970
  }
@@ -973,10 +977,11 @@ var require_types = __commonJS({
973
977
  exports.ZodSchema = ZodType2;
974
978
  var cuidRegex2 = /^c[^\s-]{8,}$/i;
975
979
  var cuid2Regex2 = /^[a-z][a-z0-9]*$/;
976
- var ulidRegex2 = /[0-9A-HJKMNP-TV-Z]{26}/;
977
- var uuidRegex2 = /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;
978
- var emailRegex2 = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/;
979
- var emojiRegex2 = /^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u;
980
+ var ulidRegex2 = /^[0-9A-HJKMNP-TV-Z]{26}$/;
981
+ var uuidRegex2 = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
982
+ var emailRegex2 = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
983
+ var _emojiRegex2 = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
984
+ var emojiRegex2;
980
985
  var ipv4Regex2 = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/;
981
986
  var ipv6Regex2 = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
982
987
  var datetimeRegex2 = (args) => {
@@ -1010,27 +1015,6 @@ var require_types = __commonJS({
1010
1015
  return false;
1011
1016
  }
1012
1017
  var ZodString2 = class extends ZodType2 {
1013
- constructor() {
1014
- super(...arguments);
1015
- this._regex = (regex, validation, message) => this.refinement((data) => regex.test(data), {
1016
- validation,
1017
- code: ZodError_1.ZodIssueCode.invalid_string,
1018
- ...errorUtil_1.errorUtil.errToObj(message)
1019
- });
1020
- this.nonempty = (message) => this.min(1, errorUtil_1.errorUtil.errToObj(message));
1021
- this.trim = () => new ZodString2({
1022
- ...this._def,
1023
- checks: [...this._def.checks, { kind: "trim" }]
1024
- });
1025
- this.toLowerCase = () => new ZodString2({
1026
- ...this._def,
1027
- checks: [...this._def.checks, { kind: "toLowerCase" }]
1028
- });
1029
- this.toUpperCase = () => new ZodString2({
1030
- ...this._def,
1031
- checks: [...this._def.checks, { kind: "toUpperCase" }]
1032
- });
1033
- }
1034
1018
  _parse(input) {
1035
1019
  if (this._def.coerce) {
1036
1020
  input.data = String(input.data);
@@ -1038,11 +1022,14 @@ var require_types = __commonJS({
1038
1022
  const parsedType = this._getType(input);
1039
1023
  if (parsedType !== util_1.ZodParsedType.string) {
1040
1024
  const ctx2 = this._getOrReturnCtx(input);
1041
- (0, parseUtil_1.addIssueToContext)(ctx2, {
1042
- code: ZodError_1.ZodIssueCode.invalid_type,
1043
- expected: util_1.ZodParsedType.string,
1044
- received: ctx2.parsedType
1045
- });
1025
+ (0, parseUtil_1.addIssueToContext)(
1026
+ ctx2,
1027
+ {
1028
+ code: ZodError_1.ZodIssueCode.invalid_type,
1029
+ expected: util_1.ZodParsedType.string,
1030
+ received: ctx2.parsedType
1031
+ }
1032
+ );
1046
1033
  return parseUtil_1.INVALID;
1047
1034
  }
1048
1035
  const status = new parseUtil_1.ParseStatus();
@@ -1111,6 +1098,9 @@ var require_types = __commonJS({
1111
1098
  status.dirty();
1112
1099
  }
1113
1100
  } else if (check.kind === "emoji") {
1101
+ if (!emojiRegex2) {
1102
+ emojiRegex2 = new RegExp(_emojiRegex2, "u");
1103
+ }
1114
1104
  if (!emojiRegex2.test(input.data)) {
1115
1105
  ctx = this._getOrReturnCtx(input, ctx);
1116
1106
  (0, parseUtil_1.addIssueToContext)(ctx, {
@@ -1247,6 +1237,13 @@ var require_types = __commonJS({
1247
1237
  }
1248
1238
  return { status: status.value, value: input.data };
1249
1239
  }
1240
+ _regex(regex, validation, message) {
1241
+ return this.refinement((data) => regex.test(data), {
1242
+ validation,
1243
+ code: ZodError_1.ZodIssueCode.invalid_string,
1244
+ ...errorUtil_1.errorUtil.errToObj(message)
1245
+ });
1246
+ }
1250
1247
  _addCheck(check) {
1251
1248
  return new ZodString2({
1252
1249
  ...this._def,
@@ -1344,6 +1341,27 @@ var require_types = __commonJS({
1344
1341
  ...errorUtil_1.errorUtil.errToObj(message)
1345
1342
  });
1346
1343
  }
1344
+ nonempty(message) {
1345
+ return this.min(1, errorUtil_1.errorUtil.errToObj(message));
1346
+ }
1347
+ trim() {
1348
+ return new ZodString2({
1349
+ ...this._def,
1350
+ checks: [...this._def.checks, { kind: "trim" }]
1351
+ });
1352
+ }
1353
+ toLowerCase() {
1354
+ return new ZodString2({
1355
+ ...this._def,
1356
+ checks: [...this._def.checks, { kind: "toLowerCase" }]
1357
+ });
1358
+ }
1359
+ toUpperCase() {
1360
+ return new ZodString2({
1361
+ ...this._def,
1362
+ checks: [...this._def.checks, { kind: "toUpperCase" }]
1363
+ });
1364
+ }
1347
1365
  get isDatetime() {
1348
1366
  return !!this._def.checks.find((ch) => ch.kind === "datetime");
1349
1367
  }
@@ -2283,7 +2301,9 @@ var require_types = __commonJS({
2283
2301
  const value = ctx.data[key];
2284
2302
  pairs2.push({
2285
2303
  key: { status: "valid", value: key },
2286
- value: catchall._parse(new ParseInputLazyPath2(ctx, value, ctx.path, key)),
2304
+ value: catchall._parse(
2305
+ new ParseInputLazyPath2(ctx, value, ctx.path, key)
2306
+ ),
2287
2307
  alwaysSet: key in ctx.data
2288
2308
  });
2289
2309
  }
@@ -2861,6 +2881,12 @@ var require_types = __commonJS({
2861
2881
  };
2862
2882
  exports.ZodRecord = ZodRecord2;
2863
2883
  var ZodMap2 = class extends ZodType2 {
2884
+ get keySchema() {
2885
+ return this._def.keyType;
2886
+ }
2887
+ get valueSchema() {
2888
+ return this._def.valueType;
2889
+ }
2864
2890
  _parse(input) {
2865
2891
  const { status, ctx } = this._processInputParams(input);
2866
2892
  if (ctx.parsedType !== util_1.ZodParsedType.map) {
@@ -3057,27 +3083,29 @@ var require_types = __commonJS({
3057
3083
  const params = { errorMap: ctx.common.contextualErrorMap };
3058
3084
  const fn = ctx.data;
3059
3085
  if (this._def.returns instanceof ZodPromise2) {
3060
- return (0, parseUtil_1.OK)(async (...args) => {
3086
+ const me = this;
3087
+ return (0, parseUtil_1.OK)(async function(...args) {
3061
3088
  const error2 = new ZodError_1.ZodError([]);
3062
- const parsedArgs = await this._def.args.parseAsync(args, params).catch((e) => {
3089
+ const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
3063
3090
  error2.addIssue(makeArgsIssue(args, e));
3064
3091
  throw error2;
3065
3092
  });
3066
- const result = await fn(...parsedArgs);
3067
- const parsedReturns = await this._def.returns._def.type.parseAsync(result, params).catch((e) => {
3093
+ const result = await Reflect.apply(fn, this, parsedArgs);
3094
+ const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
3068
3095
  error2.addIssue(makeReturnsIssue(result, e));
3069
3096
  throw error2;
3070
3097
  });
3071
3098
  return parsedReturns;
3072
3099
  });
3073
3100
  } else {
3074
- return (0, parseUtil_1.OK)((...args) => {
3075
- const parsedArgs = this._def.args.safeParse(args, params);
3101
+ const me = this;
3102
+ return (0, parseUtil_1.OK)(function(...args) {
3103
+ const parsedArgs = me._def.args.safeParse(args, params);
3076
3104
  if (!parsedArgs.success) {
3077
3105
  throw new ZodError_1.ZodError([makeArgsIssue(args, parsedArgs.error)]);
3078
3106
  }
3079
- const result = fn(...parsedArgs.data);
3080
- const parsedReturns = this._def.returns.safeParse(result, params);
3107
+ const result = Reflect.apply(fn, this, parsedArgs.data);
3108
+ const parsedReturns = me._def.returns.safeParse(result, params);
3081
3109
  if (!parsedReturns.success) {
3082
3110
  throw new ZodError_1.ZodError([makeReturnsIssue(result, parsedReturns.error)]);
3083
3111
  }
@@ -3305,8 +3333,28 @@ var require_types = __commonJS({
3305
3333
  _parse(input) {
3306
3334
  const { status, ctx } = this._processInputParams(input);
3307
3335
  const effect = this._def.effect || null;
3336
+ const checkCtx = {
3337
+ addIssue: (arg) => {
3338
+ (0, parseUtil_1.addIssueToContext)(ctx, arg);
3339
+ if (arg.fatal) {
3340
+ status.abort();
3341
+ } else {
3342
+ status.dirty();
3343
+ }
3344
+ },
3345
+ get path() {
3346
+ return ctx.path;
3347
+ }
3348
+ };
3349
+ checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);
3308
3350
  if (effect.type === "preprocess") {
3309
- const processed = effect.transform(ctx.data);
3351
+ const processed = effect.transform(ctx.data, checkCtx);
3352
+ if (ctx.common.issues.length) {
3353
+ return {
3354
+ status: "dirty",
3355
+ value: ctx.data
3356
+ };
3357
+ }
3310
3358
  if (ctx.common.async) {
3311
3359
  return Promise.resolve(processed).then((processed2) => {
3312
3360
  return this._def.schema._parseAsync({
@@ -3323,20 +3371,6 @@ var require_types = __commonJS({
3323
3371
  });
3324
3372
  }
3325
3373
  }
3326
- const checkCtx = {
3327
- addIssue: (arg) => {
3328
- (0, parseUtil_1.addIssueToContext)(ctx, arg);
3329
- if (arg.fatal) {
3330
- status.abort();
3331
- } else {
3332
- status.dirty();
3333
- }
3334
- },
3335
- get path() {
3336
- return ctx.path;
3337
- }
3338
- };
3339
- checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);
3340
3374
  if (effect.type === "refinement") {
3341
3375
  const executeRefinement = (acc) => {
3342
3376
  const result = effect.refinement(acc, checkCtx);
@@ -3629,6 +3663,23 @@ var require_types = __commonJS({
3629
3663
  }
3630
3664
  };
3631
3665
  exports.ZodPipeline = ZodPipeline2;
3666
+ var ZodReadonly2 = class extends ZodType2 {
3667
+ _parse(input) {
3668
+ const result = this._def.innerType._parse(input);
3669
+ if ((0, parseUtil_1.isValid)(result)) {
3670
+ result.value = Object.freeze(result.value);
3671
+ }
3672
+ return result;
3673
+ }
3674
+ };
3675
+ exports.ZodReadonly = ZodReadonly2;
3676
+ ZodReadonly2.create = (type2, params) => {
3677
+ return new ZodReadonly2({
3678
+ innerType: type2,
3679
+ typeName: ZodFirstPartyTypeKind2.ZodReadonly,
3680
+ ...processCreateParams2(params)
3681
+ });
3682
+ };
3632
3683
  var custom2 = (check, params = {}, fatal) => {
3633
3684
  if (check)
3634
3685
  return ZodAny2.create().superRefine((data, ctx) => {
@@ -3683,6 +3734,7 @@ var require_types = __commonJS({
3683
3734
  ZodFirstPartyTypeKind3["ZodPromise"] = "ZodPromise";
3684
3735
  ZodFirstPartyTypeKind3["ZodBranded"] = "ZodBranded";
3685
3736
  ZodFirstPartyTypeKind3["ZodPipeline"] = "ZodPipeline";
3737
+ ZodFirstPartyTypeKind3["ZodReadonly"] = "ZodReadonly";
3686
3738
  })(ZodFirstPartyTypeKind2 = exports.ZodFirstPartyTypeKind || (exports.ZodFirstPartyTypeKind = {}));
3687
3739
  var instanceOfType2 = (cls, params = {
3688
3740
  message: `Input not instance of ${cls.name}`
@@ -3777,9 +3829,9 @@ var require_types = __commonJS({
3777
3829
  }
3778
3830
  });
3779
3831
 
3780
- // ../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/external.js
3832
+ // ../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/external.js
3781
3833
  var require_external = __commonJS({
3782
- "../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/external.js"(exports) {
3834
+ "../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/external.js"(exports) {
3783
3835
  "use strict";
3784
3836
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
3785
3837
  if (k2 === void 0)
@@ -3807,9 +3859,9 @@ var require_external = __commonJS({
3807
3859
  }
3808
3860
  });
3809
3861
 
3810
- // ../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/index.js
3862
+ // ../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.js
3811
3863
  var require_lib = __commonJS({
3812
- "../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/index.js"(exports) {
3864
+ "../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.js"(exports) {
3813
3865
  "use strict";
3814
3866
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
3815
3867
  if (k2 === void 0)
@@ -3853,9 +3905,9 @@ var require_lib = __commonJS({
3853
3905
  }
3854
3906
  });
3855
3907
 
3856
- // ../../node_modules/.pnpm/@anatine+zod-openapi@1.12.0_openapi3-ts@2.0.2_zod@3.21.4/node_modules/@anatine/zod-openapi/src/lib/zod-openapi.js
3908
+ // ../../node_modules/.pnpm/@anatine+zod-openapi@1.12.0_openapi3-ts@2.0.2_zod@3.22.4/node_modules/@anatine/zod-openapi/src/lib/zod-openapi.js
3857
3909
  var require_zod_openapi = __commonJS({
3858
- "../../node_modules/.pnpm/@anatine+zod-openapi@1.12.0_openapi3-ts@2.0.2_zod@3.21.4/node_modules/@anatine/zod-openapi/src/lib/zod-openapi.js"(exports) {
3910
+ "../../node_modules/.pnpm/@anatine+zod-openapi@1.12.0_openapi3-ts@2.0.2_zod@3.22.4/node_modules/@anatine/zod-openapi/src/lib/zod-openapi.js"(exports) {
3859
3911
  "use strict";
3860
3912
  Object.defineProperty(exports, "__esModule", { value: true });
3861
3913
  exports.generateSchema = exports.extendApi = void 0;
@@ -4109,9 +4161,9 @@ var require_zod_openapi = __commonJS({
4109
4161
  }
4110
4162
  });
4111
4163
 
4112
- // ../../node_modules/.pnpm/@anatine+zod-openapi@1.12.0_openapi3-ts@2.0.2_zod@3.21.4/node_modules/@anatine/zod-openapi/src/index.js
4164
+ // ../../node_modules/.pnpm/@anatine+zod-openapi@1.12.0_openapi3-ts@2.0.2_zod@3.22.4/node_modules/@anatine/zod-openapi/src/index.js
4113
4165
  var require_src = __commonJS({
4114
- "../../node_modules/.pnpm/@anatine+zod-openapi@1.12.0_openapi3-ts@2.0.2_zod@3.21.4/node_modules/@anatine/zod-openapi/src/index.js"(exports) {
4166
+ "../../node_modules/.pnpm/@anatine+zod-openapi@1.12.0_openapi3-ts@2.0.2_zod@3.22.4/node_modules/@anatine/zod-openapi/src/index.js"(exports) {
4115
4167
  "use strict";
4116
4168
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
4117
4169
  if (k2 === void 0)
@@ -266752,7 +266804,7 @@ var import_openapi3_ts = __toESM(require_dist3(), 1);
266752
266804
  var import_verror2 = __toESM(require_verror(), 1);
266753
266805
  var import_verror3 = __toESM(require_verror(), 1);
266754
266806
 
266755
- // ../../node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/index.mjs
266807
+ // ../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs
266756
266808
  var util2;
266757
266809
  (function(util3) {
266758
266810
  util3.assertEqual = (val) => val;
@@ -267176,7 +267228,7 @@ var ParseStatus = class {
267176
267228
  status.dirty();
267177
267229
  if (value.status === "dirty")
267178
267230
  status.dirty();
267179
- if (typeof value.value !== "undefined" || pair.alwaysSet) {
267231
+ if (key.value !== "__proto__" && (typeof value.value !== "undefined" || pair.alwaysSet)) {
267180
267232
  finalObject[key.value] = value.value;
267181
267233
  }
267182
267234
  }
@@ -267279,6 +267331,7 @@ var ZodType = class {
267279
267331
  this.catch = this.catch.bind(this);
267280
267332
  this.describe = this.describe.bind(this);
267281
267333
  this.pipe = this.pipe.bind(this);
267334
+ this.readonly = this.readonly.bind(this);
267282
267335
  this.isNullable = this.isNullable.bind(this);
267283
267336
  this.isOptional = this.isOptional.bind(this);
267284
267337
  }
@@ -267486,6 +267539,9 @@ var ZodType = class {
267486
267539
  pipe(target) {
267487
267540
  return ZodPipeline.create(this, target);
267488
267541
  }
267542
+ readonly() {
267543
+ return ZodReadonly.create(this);
267544
+ }
267489
267545
  isOptional() {
267490
267546
  return this.safeParse(void 0).success;
267491
267547
  }
@@ -267495,10 +267551,11 @@ var ZodType = class {
267495
267551
  };
267496
267552
  var cuidRegex = /^c[^\s-]{8,}$/i;
267497
267553
  var cuid2Regex = /^[a-z][a-z0-9]*$/;
267498
- var ulidRegex = /[0-9A-HJKMNP-TV-Z]{26}/;
267499
- var uuidRegex = /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;
267500
- var emailRegex = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/;
267501
- var emojiRegex = /^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u;
267554
+ var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;
267555
+ var uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
267556
+ var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
267557
+ var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
267558
+ var emojiRegex;
267502
267559
  var ipv4Regex = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/;
267503
267560
  var ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
267504
267561
  var datetimeRegex = (args) => {
@@ -267532,27 +267589,6 @@ function isValidIP(ip, version) {
267532
267589
  return false;
267533
267590
  }
267534
267591
  var ZodString = class extends ZodType {
267535
- constructor() {
267536
- super(...arguments);
267537
- this._regex = (regex, validation, message) => this.refinement((data) => regex.test(data), {
267538
- validation,
267539
- code: ZodIssueCode.invalid_string,
267540
- ...errorUtil.errToObj(message)
267541
- });
267542
- this.nonempty = (message) => this.min(1, errorUtil.errToObj(message));
267543
- this.trim = () => new ZodString({
267544
- ...this._def,
267545
- checks: [...this._def.checks, { kind: "trim" }]
267546
- });
267547
- this.toLowerCase = () => new ZodString({
267548
- ...this._def,
267549
- checks: [...this._def.checks, { kind: "toLowerCase" }]
267550
- });
267551
- this.toUpperCase = () => new ZodString({
267552
- ...this._def,
267553
- checks: [...this._def.checks, { kind: "toUpperCase" }]
267554
- });
267555
- }
267556
267592
  _parse(input) {
267557
267593
  if (this._def.coerce) {
267558
267594
  input.data = String(input.data);
@@ -267636,6 +267672,9 @@ var ZodString = class extends ZodType {
267636
267672
  status.dirty();
267637
267673
  }
267638
267674
  } else if (check.kind === "emoji") {
267675
+ if (!emojiRegex) {
267676
+ emojiRegex = new RegExp(_emojiRegex, "u");
267677
+ }
267639
267678
  if (!emojiRegex.test(input.data)) {
267640
267679
  ctx = this._getOrReturnCtx(input, ctx);
267641
267680
  addIssueToContext(ctx, {
@@ -267772,6 +267811,13 @@ var ZodString = class extends ZodType {
267772
267811
  }
267773
267812
  return { status: status.value, value: input.data };
267774
267813
  }
267814
+ _regex(regex, validation, message) {
267815
+ return this.refinement((data) => regex.test(data), {
267816
+ validation,
267817
+ code: ZodIssueCode.invalid_string,
267818
+ ...errorUtil.errToObj(message)
267819
+ });
267820
+ }
267775
267821
  _addCheck(check) {
267776
267822
  return new ZodString({
267777
267823
  ...this._def,
@@ -267869,6 +267915,27 @@ var ZodString = class extends ZodType {
267869
267915
  ...errorUtil.errToObj(message)
267870
267916
  });
267871
267917
  }
267918
+ nonempty(message) {
267919
+ return this.min(1, errorUtil.errToObj(message));
267920
+ }
267921
+ trim() {
267922
+ return new ZodString({
267923
+ ...this._def,
267924
+ checks: [...this._def.checks, { kind: "trim" }]
267925
+ });
267926
+ }
267927
+ toLowerCase() {
267928
+ return new ZodString({
267929
+ ...this._def,
267930
+ checks: [...this._def.checks, { kind: "toLowerCase" }]
267931
+ });
267932
+ }
267933
+ toUpperCase() {
267934
+ return new ZodString({
267935
+ ...this._def,
267936
+ checks: [...this._def.checks, { kind: "toUpperCase" }]
267937
+ });
267938
+ }
267872
267939
  get isDatetime() {
267873
267940
  return !!this._def.checks.find((ch) => ch.kind === "datetime");
267874
267941
  }
@@ -269370,6 +269437,12 @@ var ZodRecord = class extends ZodType {
269370
269437
  }
269371
269438
  };
269372
269439
  var ZodMap = class extends ZodType {
269440
+ get keySchema() {
269441
+ return this._def.keyType;
269442
+ }
269443
+ get valueSchema() {
269444
+ return this._def.valueType;
269445
+ }
269373
269446
  _parse(input) {
269374
269447
  const { status, ctx } = this._processInputParams(input);
269375
269448
  if (ctx.parsedType !== ZodParsedType.map) {
@@ -269564,27 +269637,29 @@ var ZodFunction = class extends ZodType {
269564
269637
  const params = { errorMap: ctx.common.contextualErrorMap };
269565
269638
  const fn = ctx.data;
269566
269639
  if (this._def.returns instanceof ZodPromise) {
269567
- return OK(async (...args) => {
269640
+ const me = this;
269641
+ return OK(async function(...args) {
269568
269642
  const error2 = new ZodError([]);
269569
- const parsedArgs = await this._def.args.parseAsync(args, params).catch((e) => {
269643
+ const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
269570
269644
  error2.addIssue(makeArgsIssue(args, e));
269571
269645
  throw error2;
269572
269646
  });
269573
- const result = await fn(...parsedArgs);
269574
- const parsedReturns = await this._def.returns._def.type.parseAsync(result, params).catch((e) => {
269647
+ const result = await Reflect.apply(fn, this, parsedArgs);
269648
+ const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
269575
269649
  error2.addIssue(makeReturnsIssue(result, e));
269576
269650
  throw error2;
269577
269651
  });
269578
269652
  return parsedReturns;
269579
269653
  });
269580
269654
  } else {
269581
- return OK((...args) => {
269582
- const parsedArgs = this._def.args.safeParse(args, params);
269655
+ const me = this;
269656
+ return OK(function(...args) {
269657
+ const parsedArgs = me._def.args.safeParse(args, params);
269583
269658
  if (!parsedArgs.success) {
269584
269659
  throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
269585
269660
  }
269586
- const result = fn(...parsedArgs.data);
269587
- const parsedReturns = this._def.returns.safeParse(result, params);
269661
+ const result = Reflect.apply(fn, this, parsedArgs.data);
269662
+ const parsedReturns = me._def.returns.safeParse(result, params);
269588
269663
  if (!parsedReturns.success) {
269589
269664
  throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
269590
269665
  }
@@ -269806,8 +269881,28 @@ var ZodEffects = class extends ZodType {
269806
269881
  _parse(input) {
269807
269882
  const { status, ctx } = this._processInputParams(input);
269808
269883
  const effect = this._def.effect || null;
269884
+ const checkCtx = {
269885
+ addIssue: (arg) => {
269886
+ addIssueToContext(ctx, arg);
269887
+ if (arg.fatal) {
269888
+ status.abort();
269889
+ } else {
269890
+ status.dirty();
269891
+ }
269892
+ },
269893
+ get path() {
269894
+ return ctx.path;
269895
+ }
269896
+ };
269897
+ checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);
269809
269898
  if (effect.type === "preprocess") {
269810
- const processed = effect.transform(ctx.data);
269899
+ const processed = effect.transform(ctx.data, checkCtx);
269900
+ if (ctx.common.issues.length) {
269901
+ return {
269902
+ status: "dirty",
269903
+ value: ctx.data
269904
+ };
269905
+ }
269811
269906
  if (ctx.common.async) {
269812
269907
  return Promise.resolve(processed).then((processed2) => {
269813
269908
  return this._def.schema._parseAsync({
@@ -269824,20 +269919,6 @@ var ZodEffects = class extends ZodType {
269824
269919
  });
269825
269920
  }
269826
269921
  }
269827
- const checkCtx = {
269828
- addIssue: (arg) => {
269829
- addIssueToContext(ctx, arg);
269830
- if (arg.fatal) {
269831
- status.abort();
269832
- } else {
269833
- status.dirty();
269834
- }
269835
- },
269836
- get path() {
269837
- return ctx.path;
269838
- }
269839
- };
269840
- checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);
269841
269922
  if (effect.type === "refinement") {
269842
269923
  const executeRefinement = (acc) => {
269843
269924
  const result = effect.refinement(acc, checkCtx);
@@ -270121,6 +270202,22 @@ var ZodPipeline = class extends ZodType {
270121
270202
  });
270122
270203
  }
270123
270204
  };
270205
+ var ZodReadonly = class extends ZodType {
270206
+ _parse(input) {
270207
+ const result = this._def.innerType._parse(input);
270208
+ if (isValid(result)) {
270209
+ result.value = Object.freeze(result.value);
270210
+ }
270211
+ return result;
270212
+ }
270213
+ };
270214
+ ZodReadonly.create = (type2, params) => {
270215
+ return new ZodReadonly({
270216
+ innerType: type2,
270217
+ typeName: ZodFirstPartyTypeKind.ZodReadonly,
270218
+ ...processCreateParams(params)
270219
+ });
270220
+ };
270124
270221
  var custom = (check, params = {}, fatal) => {
270125
270222
  if (check)
270126
270223
  return ZodAny.create().superRefine((data, ctx) => {
@@ -270174,6 +270271,7 @@ var ZodFirstPartyTypeKind;
270174
270271
  ZodFirstPartyTypeKind2["ZodPromise"] = "ZodPromise";
270175
270272
  ZodFirstPartyTypeKind2["ZodBranded"] = "ZodBranded";
270176
270273
  ZodFirstPartyTypeKind2["ZodPipeline"] = "ZodPipeline";
270274
+ ZodFirstPartyTypeKind2["ZodReadonly"] = "ZodReadonly";
270177
270275
  })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
270178
270276
  var instanceOfType = (cls, params = {
270179
270277
  message: `Input not instance of ${cls.name}`
@@ -270288,6 +270386,7 @@ var z = /* @__PURE__ */ Object.freeze({
270288
270386
  BRAND,
270289
270387
  ZodBranded,
270290
270388
  ZodPipeline,
270389
+ ZodReadonly,
270291
270390
  custom,
270292
270391
  Schema: ZodType,
270293
270392
  ZodSchema: ZodType,
@@ -427271,7 +427370,7 @@ var state = {
427271
427370
  },
427272
427371
  listEvents: {
427273
427372
  name: "listEvents",
427274
- description: "Retreives a list of [Event](#schema_event) you\u2019ve previously created. The events are returned in sorted order, with the most recent appearing first.",
427373
+ description: "Retrieves a list of [Event](#schema_event) you\u2019ve previously created. The events are returned in sorted order, with the most recent appearing first.",
427275
427374
  method: "get",
427276
427375
  path: "/v1/chat/events",
427277
427376
  section: "event",
@@ -428364,6 +428463,74 @@ var state = {
428364
428463
  }
428365
428464
  }
428366
428465
  },
428466
+ setAccountPreference: {
428467
+ name: "setAccountPreference",
428468
+ description: "Set a preference for the account",
428469
+ method: "post",
428470
+ path: "/v1/admin/account/preferences/{key}",
428471
+ section: "account",
428472
+ disableDefaultParameters: {
428473
+ "x-workspace-id": true
428474
+ },
428475
+ parameters: {
428476
+ key: {
428477
+ type: "string",
428478
+ description: "Preference key",
428479
+ in: "path"
428480
+ }
428481
+ },
428482
+ requestBody: {
428483
+ description: "Preference value",
428484
+ schema: {
428485
+ type: "object",
428486
+ properties: {
428487
+ value: {
428488
+ nullable: true
428489
+ }
428490
+ },
428491
+ title: "setAccountPreferenceBody",
428492
+ additionalProperties: false
428493
+ }
428494
+ },
428495
+ response: {
428496
+ description: "Success",
428497
+ schema: {
428498
+ type: "object",
428499
+ title: "setAccountPreferenceResponse",
428500
+ additionalProperties: false
428501
+ }
428502
+ }
428503
+ },
428504
+ getAccountPreference: {
428505
+ name: "getAccountPreference",
428506
+ description: "Get a preference of the account",
428507
+ method: "get",
428508
+ path: "/v1/admin/account/preferences/{key}",
428509
+ section: "account",
428510
+ disableDefaultParameters: {
428511
+ "x-workspace-id": true
428512
+ },
428513
+ parameters: {
428514
+ key: {
428515
+ type: "string",
428516
+ description: "Preference key",
428517
+ in: "path"
428518
+ }
428519
+ },
428520
+ response: {
428521
+ description: "Success",
428522
+ schema: {
428523
+ type: "object",
428524
+ properties: {
428525
+ value: {
428526
+ nullable: true
428527
+ }
428528
+ },
428529
+ title: "getAccountPreferenceResponse",
428530
+ additionalProperties: false
428531
+ }
428532
+ }
428533
+ },
428367
428534
  listPublicIntegrations: {
428368
428535
  name: "listPublicIntegrations",
428369
428536
  description: "List public integration",
@@ -428826,6 +428993,10 @@ var state = {
428826
428993
  blocked: {
428827
428994
  type: "boolean"
428828
428995
  },
428996
+ alwaysAlive: {
428997
+ type: "boolean",
428998
+ description: "Indicates if the [Bot](#schema_bot) should be in always alive mode"
428999
+ },
428829
429000
  user: {
428830
429001
  type: "object",
428831
429002
  properties: {
@@ -430141,7 +430312,8 @@ var state = {
430141
430312
  "integrations_owned_count",
430142
430313
  "ai_spend",
430143
430314
  "openai_spend",
430144
- "bing_search_spend"
430315
+ "bing_search_spend",
430316
+ "always_alive"
430145
430317
  ],
430146
430318
  required: true
430147
430319
  },
@@ -430201,7 +430373,8 @@ var state = {
430201
430373
  "integrations_owned_count",
430202
430374
  "ai_spend",
430203
430375
  "openai_spend",
430204
- "bing_search_spend"
430376
+ "bing_search_spend",
430377
+ "always_alive"
430205
430378
  ],
430206
430379
  required: true
430207
430380
  },
@@ -430269,7 +430442,8 @@ var state = {
430269
430442
  "integrations_owned_count",
430270
430443
  "ai_spend",
430271
430444
  "openai_spend",
430272
- "bing_search_spend"
430445
+ "bing_search_spend",
430446
+ "always_alive"
430273
430447
  ]
430274
430448
  },
430275
430449
  completion: {
@@ -430315,7 +430489,8 @@ var state = {
430315
430489
  "integrations_owned_count",
430316
430490
  "ai_spend",
430317
430491
  "openai_spend",
430318
- "bing_search_spend"
430492
+ "bing_search_spend",
430493
+ "always_alive"
430319
430494
  ],
430320
430495
  required: true
430321
430496
  },
@@ -430356,7 +430531,8 @@ var state = {
430356
430531
  "integrations_owned_count",
430357
430532
  "ai_spend",
430358
430533
  "openai_spend",
430359
- "bing_search_spend"
430534
+ "bing_search_spend",
430535
+ "always_alive"
430360
430536
  ],
430361
430537
  description: "Usage type that can be used"
430362
430538
  }
@@ -430425,7 +430601,8 @@ var state = {
430425
430601
  "integrations_owned_count",
430426
430602
  "ai_spend",
430427
430603
  "openai_spend",
430428
- "bing_search_spend"
430604
+ "bing_search_spend",
430605
+ "always_alive"
430429
430606
  ],
430430
430607
  description: "Usage type that can be used"
430431
430608
  }
@@ -431376,6 +431553,13 @@ var state = {
431376
431553
  },
431377
431554
  additionalProperties: false
431378
431555
  },
431556
+ secrets: {
431557
+ type: "object",
431558
+ additionalProperties: {
431559
+ type: "string"
431560
+ },
431561
+ description: "Secrets are integration-wide values available in the code via environment variables formatted as SECRET_${YOUR_SECRET_NAME}. A secret name must respect SCREAMING_SNAKE casing."
431562
+ },
431379
431563
  code: {
431380
431564
  type: "string",
431381
431565
  description: "JavaScript code of the integration"
@@ -431738,6 +431922,14 @@ var state = {
431738
431922
  },
431739
431923
  additionalProperties: false
431740
431924
  },
431925
+ secrets: {
431926
+ type: "object",
431927
+ additionalProperties: {
431928
+ type: "string",
431929
+ nullable: true
431930
+ },
431931
+ description: "Secrets are integration-wide values available in the code via environment variables formatted as SECRET_${YOUR_SECRET_NAME}. A secret name must respect SCREAMING_SNAKE casing."
431932
+ },
431741
431933
  code: {
431742
431934
  type: "string",
431743
431935
  description: "JavaScript code of the integration"
@@ -432065,7 +432257,8 @@ var state = {
432065
432257
  "integrations_owned_count",
432066
432258
  "ai_spend",
432067
432259
  "openai_spend",
432068
- "bing_search_spend"
432260
+ "bing_search_spend",
432261
+ "always_alive"
432069
432262
  ],
432070
432263
  required: true
432071
432264
  },
@@ -432118,7 +432311,8 @@ var state = {
432118
432311
  "integrations_owned_count",
432119
432312
  "ai_spend",
432120
432313
  "openai_spend",
432121
- "bing_search_spend"
432314
+ "bing_search_spend",
432315
+ "always_alive"
432122
432316
  ],
432123
432317
  required: true
432124
432318
  },
@@ -432394,7 +432588,7 @@ var state = {
432394
432588
  title: "Botpress API",
432395
432589
  description: "API for Botpress Cloud",
432396
432590
  server: "https://api.botpress.cloud",
432397
- version: "0.15.8",
432591
+ version: "0.15.10",
432398
432592
  prefix: "v1"
432399
432593
  },
432400
432594
  errors: [
@@ -432524,6 +432718,7 @@ var state = {
432524
432718
  configureIntegrationBody: true,
432525
432719
  runVrlBody: true,
432526
432720
  createPersonalAccessTokenBody: true,
432721
+ setAccountPreferenceBody: true,
432527
432722
  createBotBody: true,
432528
432723
  updateBotBody: true,
432529
432724
  transferBotBody: true,
@@ -432576,6 +432771,8 @@ var state = {
432576
432771
  listPersonalAccessTokensResponse: true,
432577
432772
  createPersonalAccessTokenResponse: true,
432578
432773
  deletePersonalAccessTokenResponse: true,
432774
+ setAccountPreferenceResponse: true,
432775
+ getAccountPreferenceResponse: true,
432579
432776
  listPublicIntegrationsResponse: true,
432580
432777
  getPublicIntegrationByIdResponse: true,
432581
432778
  getPublicIntegrationResponse: true,
@@ -432642,7 +432839,10 @@ var state = {
432642
432839
  Event: true,
432643
432840
  Message: true,
432644
432841
  State: true,
432645
- File: true
432842
+ File: true,
432843
+ Table: true,
432844
+ Column: true,
432845
+ Row: true
432646
432846
  }
432647
432847
  },
432648
432848
  schemas: {
@@ -432981,6 +433181,15 @@ var state = {
432981
433181
  type: "string",
432982
433182
  description: "Id of the user that created the bot"
432983
433183
  },
433184
+ alwaysAlive: {
433185
+ type: "boolean",
433186
+ description: "Indicates if the [Bot](#schema_bot) should be in always alive mode"
433187
+ },
433188
+ status: {
433189
+ type: "string",
433190
+ enum: ["active", "deploying"],
433191
+ description: "Status of the bot"
433192
+ },
432984
433193
  medias: {
432985
433194
  type: "array",
432986
433195
  items: {
@@ -433015,6 +433224,8 @@ var state = {
433015
433224
  "recurringEvents",
433016
433225
  "name",
433017
433226
  "dev",
433227
+ "alwaysAlive",
433228
+ "status",
433018
433229
  "medias"
433019
433230
  ],
433020
433231
  additionalProperties: false
@@ -433366,6 +433577,13 @@ var state = {
433366
433577
  readmeUrl: {
433367
433578
  type: "string",
433368
433579
  description: "URL of the readme of the integration. This is the readme that will be displayed in the UI"
433580
+ },
433581
+ secrets: {
433582
+ type: "array",
433583
+ items: {
433584
+ type: "string"
433585
+ },
433586
+ description: "Secrets are integration-wide values available in the code via environment variables formatted as SECRET_${YOUR_SECRET_NAME}. A secret name must respect SCREAMING_SNAKE casing."
433369
433587
  }
433370
433588
  },
433371
433589
  required: [
@@ -433385,7 +433603,8 @@ var state = {
433385
433603
  "title",
433386
433604
  "description",
433387
433605
  "iconUrl",
433388
- "readmeUrl"
433606
+ "readmeUrl",
433607
+ "secrets"
433389
433608
  ],
433390
433609
  additionalProperties: false
433391
433610
  }
@@ -433535,7 +433754,8 @@ var state = {
433535
433754
  "integrations_owned_count",
433536
433755
  "ai_spend",
433537
433756
  "openai_spend",
433538
- "bing_search_spend"
433757
+ "bing_search_spend",
433758
+ "always_alive"
433539
433759
  ],
433540
433760
  description: "Usage type that can be used"
433541
433761
  }
@@ -433960,6 +434180,132 @@ var state = {
433960
434180
  required: ["botId", "name", "accessType", "id", "createdAt", "size"],
433961
434181
  additionalProperties: false
433962
434182
  }
434183
+ },
434184
+ Table: {
434185
+ section: "tables",
434186
+ schema: {
434187
+ type: "object",
434188
+ properties: {
434189
+ id: {
434190
+ type: "string",
434191
+ description: "Unique identifier for the table"
434192
+ },
434193
+ name: {
434194
+ type: "string",
434195
+ description: "Required. This name is used to identify your table."
434196
+ },
434197
+ factor: {
434198
+ default: 1,
434199
+ type: "number",
434200
+ minimum: 1,
434201
+ maximum: 30,
434202
+ 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."
434203
+ },
434204
+ columns: {
434205
+ type: "array",
434206
+ items: {
434207
+ type: "object",
434208
+ properties: {
434209
+ id: {
434210
+ type: "string",
434211
+ description: "Unique identifier for the column."
434212
+ },
434213
+ name: {
434214
+ type: "string",
434215
+ minLength: 1,
434216
+ maxLength: 30,
434217
+ description: "Name of the column, must be within length limits."
434218
+ },
434219
+ description: {
434220
+ type: "string",
434221
+ description: "Optional descriptive text about the column."
434222
+ },
434223
+ searchable: {
434224
+ type: "boolean",
434225
+ description: "Indicates if the column is vectorized and searchable."
434226
+ },
434227
+ type: {
434228
+ type: "string",
434229
+ enum: ["string", "number", "boolean", "date", "object"],
434230
+ description: 'Specifies the data type of the column. Use "object" for complex data structures.'
434231
+ },
434232
+ typings: {
434233
+ type: "string",
434234
+ description: 'TypeScript typings for the column. Recommended if the type is "object", ex: "\\{ foo: string; bar: number \\}"'
434235
+ }
434236
+ },
434237
+ required: ["id", "name", "type"]
434238
+ },
434239
+ maxItems: 20,
434240
+ description: "Array of columns in the table."
434241
+ }
434242
+ },
434243
+ required: ["id", "name", "columns"],
434244
+ additionalProperties: false
434245
+ }
434246
+ },
434247
+ Column: {
434248
+ section: "tables",
434249
+ schema: {
434250
+ type: "object",
434251
+ properties: {
434252
+ id: {
434253
+ type: "string",
434254
+ description: "Unique identifier for the column."
434255
+ },
434256
+ name: {
434257
+ type: "string",
434258
+ minLength: 1,
434259
+ maxLength: 30,
434260
+ description: "Name of the column, must be within length limits."
434261
+ },
434262
+ description: {
434263
+ type: "string",
434264
+ description: "Optional descriptive text about the column."
434265
+ },
434266
+ searchable: {
434267
+ type: "boolean",
434268
+ description: "Indicates if the column is vectorized and searchable."
434269
+ },
434270
+ type: {
434271
+ type: "string",
434272
+ enum: ["string", "number", "boolean", "date", "object"],
434273
+ description: 'Specifies the data type of the column. Use "object" for complex data structures.'
434274
+ },
434275
+ typings: {
434276
+ type: "string",
434277
+ description: 'TypeScript typings for the column. Recommended if the type is "object", ex: "\\{ foo: string; bar: number \\}"'
434278
+ }
434279
+ },
434280
+ required: ["id", "name", "type"],
434281
+ additionalProperties: false
434282
+ }
434283
+ },
434284
+ Row: {
434285
+ section: "tables",
434286
+ schema: {
434287
+ type: "object",
434288
+ properties: {
434289
+ id: {
434290
+ type: "number",
434291
+ description: "Unique identifier for the row."
434292
+ },
434293
+ createdAt: {
434294
+ type: "string",
434295
+ description: "Timestamp of row creation."
434296
+ },
434297
+ updatedAt: {
434298
+ type: "string",
434299
+ description: "Timestamp of the last row update."
434300
+ },
434301
+ similarity: {
434302
+ type: "number",
434303
+ description: "Optional numeric value indicating similarity, when using findTableRows."
434304
+ }
434305
+ },
434306
+ required: ["id"],
434307
+ additionalProperties: true
434308
+ }
433963
434309
  }
433964
434310
  },
433965
434311
  sections: [
@@ -434131,7 +434477,9 @@ var state = {
434131
434477
  "getAccount",
434132
434478
  "listPersonalAccessTokens",
434133
434479
  "createPersonalAccessToken",
434134
- "deletePersonalAccessToken"
434480
+ "deletePersonalAccessToken",
434481
+ "setAccountPreference",
434482
+ "getAccountPreference"
434135
434483
  ],
434136
434484
  schema: "Account"
434137
434485
  },
@@ -434153,6 +434501,13 @@ var state = {
434153
434501
  description: "",
434154
434502
  name: "helper",
434155
434503
  operations: ["runVrl"]
434504
+ },
434505
+ {
434506
+ title: "Tables",
434507
+ description: "Operations related to table management.",
434508
+ name: "tables",
434509
+ operations: [],
434510
+ schema: "Table"
434156
434511
  }
434157
434512
  ],
434158
434513
  options: {