instill-sdk 0.19.0-rc.2 → 0.19.0-rc.3

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
@@ -1184,10 +1184,123 @@ var CreditClient = class extends APIResource {
1184
1184
  }
1185
1185
  };
1186
1186
 
1187
- // ../../node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs
1187
+ // ../../node_modules/.pnpm/zod@3.25.56/node_modules/zod/dist/esm/v3/external.js
1188
+ var external_exports = {};
1189
+ __export(external_exports, {
1190
+ BRAND: () => BRAND,
1191
+ DIRTY: () => DIRTY,
1192
+ EMPTY_PATH: () => EMPTY_PATH,
1193
+ INVALID: () => INVALID,
1194
+ NEVER: () => NEVER,
1195
+ OK: () => OK,
1196
+ ParseStatus: () => ParseStatus,
1197
+ Schema: () => ZodType,
1198
+ ZodAny: () => ZodAny,
1199
+ ZodArray: () => ZodArray,
1200
+ ZodBigInt: () => ZodBigInt,
1201
+ ZodBoolean: () => ZodBoolean,
1202
+ ZodBranded: () => ZodBranded,
1203
+ ZodCatch: () => ZodCatch,
1204
+ ZodDate: () => ZodDate,
1205
+ ZodDefault: () => ZodDefault,
1206
+ ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
1207
+ ZodEffects: () => ZodEffects,
1208
+ ZodEnum: () => ZodEnum,
1209
+ ZodError: () => ZodError,
1210
+ ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
1211
+ ZodFunction: () => ZodFunction,
1212
+ ZodIntersection: () => ZodIntersection,
1213
+ ZodIssueCode: () => ZodIssueCode,
1214
+ ZodLazy: () => ZodLazy,
1215
+ ZodLiteral: () => ZodLiteral,
1216
+ ZodMap: () => ZodMap,
1217
+ ZodNaN: () => ZodNaN,
1218
+ ZodNativeEnum: () => ZodNativeEnum,
1219
+ ZodNever: () => ZodNever,
1220
+ ZodNull: () => ZodNull,
1221
+ ZodNullable: () => ZodNullable,
1222
+ ZodNumber: () => ZodNumber,
1223
+ ZodObject: () => ZodObject,
1224
+ ZodOptional: () => ZodOptional,
1225
+ ZodParsedType: () => ZodParsedType,
1226
+ ZodPipeline: () => ZodPipeline,
1227
+ ZodPromise: () => ZodPromise,
1228
+ ZodReadonly: () => ZodReadonly,
1229
+ ZodRecord: () => ZodRecord,
1230
+ ZodSchema: () => ZodType,
1231
+ ZodSet: () => ZodSet,
1232
+ ZodString: () => ZodString,
1233
+ ZodSymbol: () => ZodSymbol,
1234
+ ZodTransformer: () => ZodEffects,
1235
+ ZodTuple: () => ZodTuple,
1236
+ ZodType: () => ZodType,
1237
+ ZodUndefined: () => ZodUndefined,
1238
+ ZodUnion: () => ZodUnion,
1239
+ ZodUnknown: () => ZodUnknown,
1240
+ ZodVoid: () => ZodVoid,
1241
+ addIssueToContext: () => addIssueToContext,
1242
+ any: () => anyType,
1243
+ array: () => arrayType,
1244
+ bigint: () => bigIntType,
1245
+ boolean: () => booleanType,
1246
+ coerce: () => coerce,
1247
+ custom: () => custom,
1248
+ date: () => dateType,
1249
+ datetimeRegex: () => datetimeRegex,
1250
+ defaultErrorMap: () => en_default,
1251
+ discriminatedUnion: () => discriminatedUnionType,
1252
+ effect: () => effectsType,
1253
+ enum: () => enumType,
1254
+ function: () => functionType,
1255
+ getErrorMap: () => getErrorMap,
1256
+ getParsedType: () => getParsedType,
1257
+ instanceof: () => instanceOfType,
1258
+ intersection: () => intersectionType,
1259
+ isAborted: () => isAborted,
1260
+ isAsync: () => isAsync,
1261
+ isDirty: () => isDirty,
1262
+ isValid: () => isValid,
1263
+ late: () => late,
1264
+ lazy: () => lazyType,
1265
+ literal: () => literalType,
1266
+ makeIssue: () => makeIssue,
1267
+ map: () => mapType,
1268
+ nan: () => nanType,
1269
+ nativeEnum: () => nativeEnumType,
1270
+ never: () => neverType,
1271
+ null: () => nullType,
1272
+ nullable: () => nullableType,
1273
+ number: () => numberType,
1274
+ object: () => objectType,
1275
+ objectUtil: () => objectUtil,
1276
+ oboolean: () => oboolean,
1277
+ onumber: () => onumber,
1278
+ optional: () => optionalType,
1279
+ ostring: () => ostring,
1280
+ pipeline: () => pipelineType,
1281
+ preprocess: () => preprocessType,
1282
+ promise: () => promiseType,
1283
+ quotelessJson: () => quotelessJson,
1284
+ record: () => recordType,
1285
+ set: () => setType,
1286
+ setErrorMap: () => setErrorMap,
1287
+ strictObject: () => strictObjectType,
1288
+ string: () => stringType,
1289
+ symbol: () => symbolType,
1290
+ transformer: () => effectsType,
1291
+ tuple: () => tupleType,
1292
+ undefined: () => undefinedType,
1293
+ union: () => unionType,
1294
+ unknown: () => unknownType,
1295
+ util: () => util,
1296
+ void: () => voidType
1297
+ });
1298
+
1299
+ // ../../node_modules/.pnpm/zod@3.25.56/node_modules/zod/dist/esm/v3/helpers/util.js
1188
1300
  var util;
1189
1301
  (function(util2) {
1190
- util2.assertEqual = (val) => val;
1302
+ util2.assertEqual = (_) => {
1303
+ };
1191
1304
  function assertIs(_arg) {
1192
1305
  }
1193
1306
  util2.assertIs = assertIs;
@@ -1231,7 +1344,7 @@ var util;
1231
1344
  }
1232
1345
  return void 0;
1233
1346
  };
1234
- util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val;
1347
+ util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
1235
1348
  function joinValues(array, separator = " | ") {
1236
1349
  return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
1237
1350
  }
@@ -1283,7 +1396,7 @@ var getParsedType = (data) => {
1283
1396
  case "string":
1284
1397
  return ZodParsedType.string;
1285
1398
  case "number":
1286
- return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
1399
+ return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
1287
1400
  case "boolean":
1288
1401
  return ZodParsedType.boolean;
1289
1402
  case "function":
@@ -1316,6 +1429,8 @@ var getParsedType = (data) => {
1316
1429
  return ZodParsedType.unknown;
1317
1430
  }
1318
1431
  };
1432
+
1433
+ // ../../node_modules/.pnpm/zod@3.25.56/node_modules/zod/dist/esm/v3/ZodError.js
1319
1434
  var ZodIssueCode = util.arrayToEnum([
1320
1435
  "invalid_type",
1321
1436
  "invalid_literal",
@@ -1339,6 +1454,9 @@ var quotelessJson = (obj) => {
1339
1454
  return json.replace(/"([^"]+)":/g, "$1:");
1340
1455
  };
1341
1456
  var ZodError = class _ZodError extends Error {
1457
+ get errors() {
1458
+ return this.issues;
1459
+ }
1342
1460
  constructor(issues) {
1343
1461
  super();
1344
1462
  this.issues = [];
@@ -1357,9 +1475,6 @@ var ZodError = class _ZodError extends Error {
1357
1475
  this.name = "ZodError";
1358
1476
  this.issues = issues;
1359
1477
  }
1360
- get errors() {
1361
- return this.issues;
1362
- }
1363
1478
  format(_mapper) {
1364
1479
  const mapper = _mapper || function(issue) {
1365
1480
  return issue.message;
@@ -1431,6 +1546,8 @@ ZodError.create = (issues) => {
1431
1546
  const error = new ZodError(issues);
1432
1547
  return error;
1433
1548
  };
1549
+
1550
+ // ../../node_modules/.pnpm/zod@3.25.56/node_modules/zod/dist/esm/v3/locales/en.js
1434
1551
  var errorMap = (issue, _ctx) => {
1435
1552
  let message;
1436
1553
  switch (issue.code) {
@@ -1529,13 +1646,18 @@ var errorMap = (issue, _ctx) => {
1529
1646
  }
1530
1647
  return { message };
1531
1648
  };
1532
- var overrideErrorMap = errorMap;
1649
+ var en_default = errorMap;
1650
+
1651
+ // ../../node_modules/.pnpm/zod@3.25.56/node_modules/zod/dist/esm/v3/errors.js
1652
+ var overrideErrorMap = en_default;
1533
1653
  function setErrorMap(map) {
1534
1654
  overrideErrorMap = map;
1535
1655
  }
1536
1656
  function getErrorMap() {
1537
1657
  return overrideErrorMap;
1538
1658
  }
1659
+
1660
+ // ../../node_modules/.pnpm/zod@3.25.56/node_modules/zod/dist/esm/v3/helpers/parseUtil.js
1539
1661
  var makeIssue = (params) => {
1540
1662
  const { data, path, errorMaps, issueData } = params;
1541
1663
  const fullPath = [...path, ...issueData.path || []];
@@ -1570,9 +1692,12 @@ function addIssueToContext(ctx, issueData) {
1570
1692
  path: ctx.path,
1571
1693
  errorMaps: [
1572
1694
  ctx.common.contextualErrorMap,
1695
+ // contextual error map is first priority
1573
1696
  ctx.schemaErrorMap,
1697
+ // then schema-bound map if available
1574
1698
  overrideMap,
1575
- overrideMap === errorMap ? void 0 : errorMap
1699
+ // then global override map
1700
+ overrideMap === en_default ? void 0 : en_default
1576
1701
  // then global default map
1577
1702
  ].filter((x) => !!x)
1578
1703
  });
@@ -1641,24 +1766,15 @@ var isAborted = (x) => x.status === "aborted";
1641
1766
  var isDirty = (x) => x.status === "dirty";
1642
1767
  var isValid = (x) => x.status === "valid";
1643
1768
  var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
1644
- function __classPrivateFieldGet(receiver, state, kind, f) {
1645
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
1646
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
1647
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
1648
- }
1649
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
1650
- if (kind === "m") throw new TypeError("Private method is not writable");
1651
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
1652
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
1653
- return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
1654
- }
1769
+
1770
+ // ../../node_modules/.pnpm/zod@3.25.56/node_modules/zod/dist/esm/v3/helpers/errorUtil.js
1655
1771
  var errorUtil;
1656
1772
  (function(errorUtil2) {
1657
1773
  errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
1658
- errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
1774
+ errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
1659
1775
  })(errorUtil || (errorUtil = {}));
1660
- var _ZodEnum_cache;
1661
- var _ZodNativeEnum_cache;
1776
+
1777
+ // ../../node_modules/.pnpm/zod@3.25.56/node_modules/zod/dist/esm/v3/types.js
1662
1778
  var ParseInputLazyPath = class {
1663
1779
  constructor(parent, value, path, key) {
1664
1780
  this._cachedPath = [];
@@ -1669,7 +1785,7 @@ var ParseInputLazyPath = class {
1669
1785
  }
1670
1786
  get path() {
1671
1787
  if (!this._cachedPath.length) {
1672
- if (this._key instanceof Array) {
1788
+ if (Array.isArray(this._key)) {
1673
1789
  this._cachedPath.push(...this._path, ...this._key);
1674
1790
  } else {
1675
1791
  this._cachedPath.push(...this._path, this._key);
@@ -1707,49 +1823,20 @@ function processCreateParams(params) {
1707
1823
  if (errorMap2)
1708
1824
  return { errorMap: errorMap2, description };
1709
1825
  const customMap = (iss, ctx) => {
1710
- var _a, _b;
1711
1826
  const { message } = params;
1712
1827
  if (iss.code === "invalid_enum_value") {
1713
- return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
1828
+ return { message: message ?? ctx.defaultError };
1714
1829
  }
1715
1830
  if (typeof ctx.data === "undefined") {
1716
- return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };
1831
+ return { message: message ?? required_error ?? ctx.defaultError };
1717
1832
  }
1718
1833
  if (iss.code !== "invalid_type")
1719
1834
  return { message: ctx.defaultError };
1720
- return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };
1835
+ return { message: message ?? invalid_type_error ?? ctx.defaultError };
1721
1836
  };
1722
1837
  return { errorMap: customMap, description };
1723
1838
  }
1724
1839
  var ZodType = class {
1725
- constructor(def) {
1726
- this.spa = this.safeParseAsync;
1727
- this._def = def;
1728
- this.parse = this.parse.bind(this);
1729
- this.safeParse = this.safeParse.bind(this);
1730
- this.parseAsync = this.parseAsync.bind(this);
1731
- this.safeParseAsync = this.safeParseAsync.bind(this);
1732
- this.spa = this.spa.bind(this);
1733
- this.refine = this.refine.bind(this);
1734
- this.refinement = this.refinement.bind(this);
1735
- this.superRefine = this.superRefine.bind(this);
1736
- this.optional = this.optional.bind(this);
1737
- this.nullable = this.nullable.bind(this);
1738
- this.nullish = this.nullish.bind(this);
1739
- this.array = this.array.bind(this);
1740
- this.promise = this.promise.bind(this);
1741
- this.or = this.or.bind(this);
1742
- this.and = this.and.bind(this);
1743
- this.transform = this.transform.bind(this);
1744
- this.brand = this.brand.bind(this);
1745
- this.default = this.default.bind(this);
1746
- this.catch = this.catch.bind(this);
1747
- this.describe = this.describe.bind(this);
1748
- this.pipe = this.pipe.bind(this);
1749
- this.readonly = this.readonly.bind(this);
1750
- this.isNullable = this.isNullable.bind(this);
1751
- this.isOptional = this.isOptional.bind(this);
1752
- }
1753
1840
  get description() {
1754
1841
  return this._def.description;
1755
1842
  }
@@ -1797,14 +1884,13 @@ var ZodType = class {
1797
1884
  throw result.error;
1798
1885
  }
1799
1886
  safeParse(data, params) {
1800
- var _a;
1801
1887
  const ctx = {
1802
1888
  common: {
1803
1889
  issues: [],
1804
- async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,
1805
- contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap
1890
+ async: params?.async ?? false,
1891
+ contextualErrorMap: params?.errorMap
1806
1892
  },
1807
- path: (params === null || params === void 0 ? void 0 : params.path) || [],
1893
+ path: params?.path || [],
1808
1894
  schemaErrorMap: this._def.errorMap,
1809
1895
  parent: null,
1810
1896
  data,
@@ -1813,6 +1899,42 @@ var ZodType = class {
1813
1899
  const result = this._parseSync({ data, path: ctx.path, parent: ctx });
1814
1900
  return handleResult(ctx, result);
1815
1901
  }
1902
+ "~validate"(data) {
1903
+ const ctx = {
1904
+ common: {
1905
+ issues: [],
1906
+ async: !!this["~standard"].async
1907
+ },
1908
+ path: [],
1909
+ schemaErrorMap: this._def.errorMap,
1910
+ parent: null,
1911
+ data,
1912
+ parsedType: getParsedType(data)
1913
+ };
1914
+ if (!this["~standard"].async) {
1915
+ try {
1916
+ const result = this._parseSync({ data, path: [], parent: ctx });
1917
+ return isValid(result) ? {
1918
+ value: result.value
1919
+ } : {
1920
+ issues: ctx.common.issues
1921
+ };
1922
+ } catch (err) {
1923
+ if (err?.message?.toLowerCase()?.includes("encountered")) {
1924
+ this["~standard"].async = true;
1925
+ }
1926
+ ctx.common = {
1927
+ issues: [],
1928
+ async: true
1929
+ };
1930
+ }
1931
+ }
1932
+ return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result) ? {
1933
+ value: result.value
1934
+ } : {
1935
+ issues: ctx.common.issues
1936
+ });
1937
+ }
1816
1938
  async parseAsync(data, params) {
1817
1939
  const result = await this.safeParseAsync(data, params);
1818
1940
  if (result.success)
@@ -1823,10 +1945,10 @@ var ZodType = class {
1823
1945
  const ctx = {
1824
1946
  common: {
1825
1947
  issues: [],
1826
- contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,
1948
+ contextualErrorMap: params?.errorMap,
1827
1949
  async: true
1828
1950
  },
1829
- path: (params === null || params === void 0 ? void 0 : params.path) || [],
1951
+ path: params?.path || [],
1830
1952
  schemaErrorMap: this._def.errorMap,
1831
1953
  parent: null,
1832
1954
  data,
@@ -1890,6 +2012,39 @@ var ZodType = class {
1890
2012
  superRefine(refinement) {
1891
2013
  return this._refinement(refinement);
1892
2014
  }
2015
+ constructor(def) {
2016
+ this.spa = this.safeParseAsync;
2017
+ this._def = def;
2018
+ this.parse = this.parse.bind(this);
2019
+ this.safeParse = this.safeParse.bind(this);
2020
+ this.parseAsync = this.parseAsync.bind(this);
2021
+ this.safeParseAsync = this.safeParseAsync.bind(this);
2022
+ this.spa = this.spa.bind(this);
2023
+ this.refine = this.refine.bind(this);
2024
+ this.refinement = this.refinement.bind(this);
2025
+ this.superRefine = this.superRefine.bind(this);
2026
+ this.optional = this.optional.bind(this);
2027
+ this.nullable = this.nullable.bind(this);
2028
+ this.nullish = this.nullish.bind(this);
2029
+ this.array = this.array.bind(this);
2030
+ this.promise = this.promise.bind(this);
2031
+ this.or = this.or.bind(this);
2032
+ this.and = this.and.bind(this);
2033
+ this.transform = this.transform.bind(this);
2034
+ this.brand = this.brand.bind(this);
2035
+ this.default = this.default.bind(this);
2036
+ this.catch = this.catch.bind(this);
2037
+ this.describe = this.describe.bind(this);
2038
+ this.pipe = this.pipe.bind(this);
2039
+ this.readonly = this.readonly.bind(this);
2040
+ this.isNullable = this.isNullable.bind(this);
2041
+ this.isOptional = this.isOptional.bind(this);
2042
+ this["~standard"] = {
2043
+ version: 1,
2044
+ vendor: "zod",
2045
+ validate: (data) => this["~validate"](data)
2046
+ };
2047
+ }
1893
2048
  optional() {
1894
2049
  return ZodOptional.create(this, this._def);
1895
2050
  }
@@ -1900,7 +2055,7 @@ var ZodType = class {
1900
2055
  return this.nullable().optional();
1901
2056
  }
1902
2057
  array() {
1903
- return ZodArray.create(this, this._def);
2058
+ return ZodArray.create(this);
1904
2059
  }
1905
2060
  promise() {
1906
2061
  return ZodPromise.create(this, this._def);
@@ -1966,26 +2121,31 @@ var ZodType = class {
1966
2121
  };
1967
2122
  var cuidRegex = /^c[^\s-]{8,}$/i;
1968
2123
  var cuid2Regex = /^[0-9a-z]+$/;
1969
- var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;
2124
+ var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
1970
2125
  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;
1971
2126
  var nanoidRegex = /^[a-z0-9_-]{21}$/i;
2127
+ var jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
1972
2128
  var durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
1973
2129
  var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
1974
2130
  var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
1975
2131
  var emojiRegex;
1976
2132
  var ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
1977
- 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})))$/;
2133
+ var ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/;
2134
+ var ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
2135
+ var ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
1978
2136
  var base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
2137
+ var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;
1979
2138
  var dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
1980
2139
  var dateRegex = new RegExp(`^${dateRegexSource}$`);
1981
2140
  function timeRegexSource(args) {
1982
- let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
2141
+ let secondsRegexSource = `[0-5]\\d`;
1983
2142
  if (args.precision) {
1984
- regex = `${regex}\\.\\d{${args.precision}}`;
2143
+ secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
1985
2144
  } else if (args.precision == null) {
1986
- regex = `${regex}(\\.\\d+)?`;
2145
+ secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
1987
2146
  }
1988
- return regex;
2147
+ const secondsQuantifier = args.precision ? "+" : "?";
2148
+ return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
1989
2149
  }
1990
2150
  function timeRegex(args) {
1991
2151
  return new RegExp(`^${timeRegexSource(args)}$`);
@@ -2008,6 +2168,35 @@ function isValidIP(ip, version) {
2008
2168
  }
2009
2169
  return false;
2010
2170
  }
2171
+ function isValidJWT(jwt, alg) {
2172
+ if (!jwtRegex.test(jwt))
2173
+ return false;
2174
+ try {
2175
+ const [header] = jwt.split(".");
2176
+ const base64 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
2177
+ const decoded = JSON.parse(atob(base64));
2178
+ if (typeof decoded !== "object" || decoded === null)
2179
+ return false;
2180
+ if ("typ" in decoded && decoded?.typ !== "JWT")
2181
+ return false;
2182
+ if (!decoded.alg)
2183
+ return false;
2184
+ if (alg && decoded.alg !== alg)
2185
+ return false;
2186
+ return true;
2187
+ } catch {
2188
+ return false;
2189
+ }
2190
+ }
2191
+ function isValidCidr(ip, version) {
2192
+ if ((version === "v4" || !version) && ipv4CidrRegex.test(ip)) {
2193
+ return true;
2194
+ }
2195
+ if ((version === "v6" || !version) && ipv6CidrRegex.test(ip)) {
2196
+ return true;
2197
+ }
2198
+ return false;
2199
+ }
2011
2200
  var ZodString = class _ZodString extends ZodType {
2012
2201
  _parse(input) {
2013
2202
  if (this._def.coerce) {
@@ -2154,7 +2343,7 @@ var ZodString = class _ZodString extends ZodType {
2154
2343
  } else if (check.kind === "url") {
2155
2344
  try {
2156
2345
  new URL(input.data);
2157
- } catch (_a) {
2346
+ } catch {
2158
2347
  ctx = this._getOrReturnCtx(input, ctx);
2159
2348
  addIssueToContext(ctx, {
2160
2349
  validation: "url",
@@ -2264,6 +2453,26 @@ var ZodString = class _ZodString extends ZodType {
2264
2453
  });
2265
2454
  status.dirty();
2266
2455
  }
2456
+ } else if (check.kind === "jwt") {
2457
+ if (!isValidJWT(input.data, check.alg)) {
2458
+ ctx = this._getOrReturnCtx(input, ctx);
2459
+ addIssueToContext(ctx, {
2460
+ validation: "jwt",
2461
+ code: ZodIssueCode.invalid_string,
2462
+ message: check.message
2463
+ });
2464
+ status.dirty();
2465
+ }
2466
+ } else if (check.kind === "cidr") {
2467
+ if (!isValidCidr(input.data, check.version)) {
2468
+ ctx = this._getOrReturnCtx(input, ctx);
2469
+ addIssueToContext(ctx, {
2470
+ validation: "cidr",
2471
+ code: ZodIssueCode.invalid_string,
2472
+ message: check.message
2473
+ });
2474
+ status.dirty();
2475
+ }
2267
2476
  } else if (check.kind === "base64") {
2268
2477
  if (!base64Regex.test(input.data)) {
2269
2478
  ctx = this._getOrReturnCtx(input, ctx);
@@ -2274,6 +2483,16 @@ var ZodString = class _ZodString extends ZodType {
2274
2483
  });
2275
2484
  status.dirty();
2276
2485
  }
2486
+ } else if (check.kind === "base64url") {
2487
+ if (!base64urlRegex.test(input.data)) {
2488
+ ctx = this._getOrReturnCtx(input, ctx);
2489
+ addIssueToContext(ctx, {
2490
+ validation: "base64url",
2491
+ code: ZodIssueCode.invalid_string,
2492
+ message: check.message
2493
+ });
2494
+ status.dirty();
2495
+ }
2277
2496
  } else {
2278
2497
  util.assertNever(check);
2279
2498
  }
@@ -2320,11 +2539,22 @@ var ZodString = class _ZodString extends ZodType {
2320
2539
  base64(message) {
2321
2540
  return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) });
2322
2541
  }
2542
+ base64url(message) {
2543
+ return this._addCheck({
2544
+ kind: "base64url",
2545
+ ...errorUtil.errToObj(message)
2546
+ });
2547
+ }
2548
+ jwt(options) {
2549
+ return this._addCheck({ kind: "jwt", ...errorUtil.errToObj(options) });
2550
+ }
2323
2551
  ip(options) {
2324
2552
  return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) });
2325
2553
  }
2554
+ cidr(options) {
2555
+ return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) });
2556
+ }
2326
2557
  datetime(options) {
2327
- var _a, _b;
2328
2558
  if (typeof options === "string") {
2329
2559
  return this._addCheck({
2330
2560
  kind: "datetime",
@@ -2336,10 +2566,10 @@ var ZodString = class _ZodString extends ZodType {
2336
2566
  }
2337
2567
  return this._addCheck({
2338
2568
  kind: "datetime",
2339
- precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
2340
- offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,
2341
- local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,
2342
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
2569
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
2570
+ offset: options?.offset ?? false,
2571
+ local: options?.local ?? false,
2572
+ ...errorUtil.errToObj(options?.message)
2343
2573
  });
2344
2574
  }
2345
2575
  date(message) {
@@ -2355,8 +2585,8 @@ var ZodString = class _ZodString extends ZodType {
2355
2585
  }
2356
2586
  return this._addCheck({
2357
2587
  kind: "time",
2358
- precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
2359
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
2588
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
2589
+ ...errorUtil.errToObj(options?.message)
2360
2590
  });
2361
2591
  }
2362
2592
  duration(message) {
@@ -2373,8 +2603,8 @@ var ZodString = class _ZodString extends ZodType {
2373
2603
  return this._addCheck({
2374
2604
  kind: "includes",
2375
2605
  value,
2376
- position: options === null || options === void 0 ? void 0 : options.position,
2377
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
2606
+ position: options?.position,
2607
+ ...errorUtil.errToObj(options?.message)
2378
2608
  });
2379
2609
  }
2380
2610
  startsWith(value, message) {
@@ -2413,8 +2643,7 @@ var ZodString = class _ZodString extends ZodType {
2413
2643
  });
2414
2644
  }
2415
2645
  /**
2416
- * @deprecated Use z.string().min(1) instead.
2417
- * @see {@link ZodString.min}
2646
+ * Equivalent to `.min(1)`
2418
2647
  */
2419
2648
  nonempty(message) {
2420
2649
  return this.min(1, errorUtil.errToObj(message));
@@ -2476,9 +2705,15 @@ var ZodString = class _ZodString extends ZodType {
2476
2705
  get isIP() {
2477
2706
  return !!this._def.checks.find((ch) => ch.kind === "ip");
2478
2707
  }
2708
+ get isCIDR() {
2709
+ return !!this._def.checks.find((ch) => ch.kind === "cidr");
2710
+ }
2479
2711
  get isBase64() {
2480
2712
  return !!this._def.checks.find((ch) => ch.kind === "base64");
2481
2713
  }
2714
+ get isBase64url() {
2715
+ return !!this._def.checks.find((ch) => ch.kind === "base64url");
2716
+ }
2482
2717
  get minLength() {
2483
2718
  let min = null;
2484
2719
  for (const ch of this._def.checks) {
@@ -2501,11 +2736,10 @@ var ZodString = class _ZodString extends ZodType {
2501
2736
  }
2502
2737
  };
2503
2738
  ZodString.create = (params) => {
2504
- var _a;
2505
2739
  return new ZodString({
2506
2740
  checks: [],
2507
2741
  typeName: ZodFirstPartyTypeKind.ZodString,
2508
- coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
2742
+ coerce: params?.coerce ?? false,
2509
2743
  ...processCreateParams(params)
2510
2744
  });
2511
2745
  };
@@ -2513,9 +2747,9 @@ function floatSafeRemainder(val, step) {
2513
2747
  const valDecCount = (val.toString().split(".")[1] || "").length;
2514
2748
  const stepDecCount = (step.toString().split(".")[1] || "").length;
2515
2749
  const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
2516
- const valInt = parseInt(val.toFixed(decCount).replace(".", ""));
2517
- const stepInt = parseInt(step.toFixed(decCount).replace(".", ""));
2518
- return valInt % stepInt / Math.pow(10, decCount);
2750
+ const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
2751
+ const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
2752
+ return valInt % stepInt / 10 ** decCount;
2519
2753
  }
2520
2754
  var ZodNumber = class _ZodNumber extends ZodType {
2521
2755
  constructor() {
@@ -2725,7 +2959,8 @@ var ZodNumber = class _ZodNumber extends ZodType {
2725
2959
  return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
2726
2960
  }
2727
2961
  get isFinite() {
2728
- let max = null, min = null;
2962
+ let max = null;
2963
+ let min = null;
2729
2964
  for (const ch of this._def.checks) {
2730
2965
  if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
2731
2966
  return true;
@@ -2744,7 +2979,7 @@ ZodNumber.create = (params) => {
2744
2979
  return new ZodNumber({
2745
2980
  checks: [],
2746
2981
  typeName: ZodFirstPartyTypeKind.ZodNumber,
2747
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
2982
+ coerce: params?.coerce || false,
2748
2983
  ...processCreateParams(params)
2749
2984
  });
2750
2985
  };
@@ -2756,17 +2991,15 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
2756
2991
  }
2757
2992
  _parse(input) {
2758
2993
  if (this._def.coerce) {
2759
- input.data = BigInt(input.data);
2994
+ try {
2995
+ input.data = BigInt(input.data);
2996
+ } catch {
2997
+ return this._getInvalidInput(input);
2998
+ }
2760
2999
  }
2761
3000
  const parsedType = this._getType(input);
2762
3001
  if (parsedType !== ZodParsedType.bigint) {
2763
- const ctx2 = this._getOrReturnCtx(input);
2764
- addIssueToContext(ctx2, {
2765
- code: ZodIssueCode.invalid_type,
2766
- expected: ZodParsedType.bigint,
2767
- received: ctx2.parsedType
2768
- });
2769
- return INVALID;
3002
+ return this._getInvalidInput(input);
2770
3003
  }
2771
3004
  let ctx = void 0;
2772
3005
  const status = new ParseStatus();
@@ -2813,6 +3046,15 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
2813
3046
  }
2814
3047
  return { status: status.value, value: input.data };
2815
3048
  }
3049
+ _getInvalidInput(input) {
3050
+ const ctx = this._getOrReturnCtx(input);
3051
+ addIssueToContext(ctx, {
3052
+ code: ZodIssueCode.invalid_type,
3053
+ expected: ZodParsedType.bigint,
3054
+ received: ctx.parsedType
3055
+ });
3056
+ return INVALID;
3057
+ }
2816
3058
  gte(value, message) {
2817
3059
  return this.setLimit("min", value, true, errorUtil.toString(message));
2818
3060
  }
@@ -2906,11 +3148,10 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
2906
3148
  }
2907
3149
  };
2908
3150
  ZodBigInt.create = (params) => {
2909
- var _a;
2910
3151
  return new ZodBigInt({
2911
3152
  checks: [],
2912
3153
  typeName: ZodFirstPartyTypeKind.ZodBigInt,
2913
- coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
3154
+ coerce: params?.coerce ?? false,
2914
3155
  ...processCreateParams(params)
2915
3156
  });
2916
3157
  };
@@ -2935,7 +3176,7 @@ var ZodBoolean = class extends ZodType {
2935
3176
  ZodBoolean.create = (params) => {
2936
3177
  return new ZodBoolean({
2937
3178
  typeName: ZodFirstPartyTypeKind.ZodBoolean,
2938
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
3179
+ coerce: params?.coerce || false,
2939
3180
  ...processCreateParams(params)
2940
3181
  });
2941
3182
  };
@@ -2954,7 +3195,7 @@ var ZodDate = class _ZodDate extends ZodType {
2954
3195
  });
2955
3196
  return INVALID;
2956
3197
  }
2957
- if (isNaN(input.data.getTime())) {
3198
+ if (Number.isNaN(input.data.getTime())) {
2958
3199
  const ctx2 = this._getOrReturnCtx(input);
2959
3200
  addIssueToContext(ctx2, {
2960
3201
  code: ZodIssueCode.invalid_date
@@ -3043,7 +3284,7 @@ var ZodDate = class _ZodDate extends ZodType {
3043
3284
  ZodDate.create = (params) => {
3044
3285
  return new ZodDate({
3045
3286
  checks: [],
3046
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
3287
+ coerce: params?.coerce || false,
3047
3288
  typeName: ZodFirstPartyTypeKind.ZodDate,
3048
3289
  ...processCreateParams(params)
3049
3290
  });
@@ -3318,7 +3559,8 @@ var ZodObject = class _ZodObject extends ZodType {
3318
3559
  return this._cached;
3319
3560
  const shape = this._def.shape();
3320
3561
  const keys = util.objectKeys(shape);
3321
- return this._cached = { shape, keys };
3562
+ this._cached = { shape, keys };
3563
+ return this._cached;
3322
3564
  }
3323
3565
  _parse(input) {
3324
3566
  const parsedType = this._getType(input);
@@ -3368,8 +3610,8 @@ var ZodObject = class _ZodObject extends ZodType {
3368
3610
  });
3369
3611
  status.dirty();
3370
3612
  }
3371
- } else if (unknownKeys === "strip") ;
3372
- else {
3613
+ } else if (unknownKeys === "strip") {
3614
+ } else {
3373
3615
  throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
3374
3616
  }
3375
3617
  } else {
@@ -3416,11 +3658,10 @@ var ZodObject = class _ZodObject extends ZodType {
3416
3658
  unknownKeys: "strict",
3417
3659
  ...message !== void 0 ? {
3418
3660
  errorMap: (issue, ctx) => {
3419
- var _a, _b, _c, _d;
3420
- const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;
3661
+ const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;
3421
3662
  if (issue.code === "unrecognized_keys")
3422
3663
  return {
3423
- message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError
3664
+ message: errorUtil.errToObj(message).message ?? defaultError
3424
3665
  };
3425
3666
  return {
3426
3667
  message: defaultError
@@ -3551,11 +3792,11 @@ var ZodObject = class _ZodObject extends ZodType {
3551
3792
  }
3552
3793
  pick(mask) {
3553
3794
  const shape = {};
3554
- util.objectKeys(mask).forEach((key) => {
3795
+ for (const key of util.objectKeys(mask)) {
3555
3796
  if (mask[key] && this.shape[key]) {
3556
3797
  shape[key] = this.shape[key];
3557
3798
  }
3558
- });
3799
+ }
3559
3800
  return new _ZodObject({
3560
3801
  ...this._def,
3561
3802
  shape: () => shape
@@ -3563,11 +3804,11 @@ var ZodObject = class _ZodObject extends ZodType {
3563
3804
  }
3564
3805
  omit(mask) {
3565
3806
  const shape = {};
3566
- util.objectKeys(this.shape).forEach((key) => {
3807
+ for (const key of util.objectKeys(this.shape)) {
3567
3808
  if (!mask[key]) {
3568
3809
  shape[key] = this.shape[key];
3569
3810
  }
3570
- });
3811
+ }
3571
3812
  return new _ZodObject({
3572
3813
  ...this._def,
3573
3814
  shape: () => shape
@@ -3581,14 +3822,14 @@ var ZodObject = class _ZodObject extends ZodType {
3581
3822
  }
3582
3823
  partial(mask) {
3583
3824
  const newShape = {};
3584
- util.objectKeys(this.shape).forEach((key) => {
3825
+ for (const key of util.objectKeys(this.shape)) {
3585
3826
  const fieldSchema = this.shape[key];
3586
3827
  if (mask && !mask[key]) {
3587
3828
  newShape[key] = fieldSchema;
3588
3829
  } else {
3589
3830
  newShape[key] = fieldSchema.optional();
3590
3831
  }
3591
- });
3832
+ }
3592
3833
  return new _ZodObject({
3593
3834
  ...this._def,
3594
3835
  shape: () => newShape
@@ -3596,7 +3837,7 @@ var ZodObject = class _ZodObject extends ZodType {
3596
3837
  }
3597
3838
  required(mask) {
3598
3839
  const newShape = {};
3599
- util.objectKeys(this.shape).forEach((key) => {
3840
+ for (const key of util.objectKeys(this.shape)) {
3600
3841
  if (mask && !mask[key]) {
3601
3842
  newShape[key] = this.shape[key];
3602
3843
  } else {
@@ -3607,7 +3848,7 @@ var ZodObject = class _ZodObject extends ZodType {
3607
3848
  }
3608
3849
  newShape[key] = newField;
3609
3850
  }
3610
- });
3851
+ }
3611
3852
  return new _ZodObject({
3612
3853
  ...this._def,
3613
3854
  shape: () => newShape
@@ -4223,12 +4464,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
4223
4464
  return makeIssue({
4224
4465
  data: args,
4225
4466
  path: ctx.path,
4226
- errorMaps: [
4227
- ctx.common.contextualErrorMap,
4228
- ctx.schemaErrorMap,
4229
- getErrorMap(),
4230
- errorMap
4231
- ].filter((x) => !!x),
4467
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
4232
4468
  issueData: {
4233
4469
  code: ZodIssueCode.invalid_arguments,
4234
4470
  argumentsError: error
@@ -4239,12 +4475,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
4239
4475
  return makeIssue({
4240
4476
  data: returns,
4241
4477
  path: ctx.path,
4242
- errorMaps: [
4243
- ctx.common.contextualErrorMap,
4244
- ctx.schemaErrorMap,
4245
- getErrorMap(),
4246
- errorMap
4247
- ].filter((x) => !!x),
4478
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
4248
4479
  issueData: {
4249
4480
  code: ZodIssueCode.invalid_return_type,
4250
4481
  returnTypeError: error
@@ -4368,10 +4599,6 @@ function createZodEnum(values, params) {
4368
4599
  });
4369
4600
  }
4370
4601
  var ZodEnum = class _ZodEnum extends ZodType {
4371
- constructor() {
4372
- super(...arguments);
4373
- _ZodEnum_cache.set(this, void 0);
4374
- }
4375
4602
  _parse(input) {
4376
4603
  if (typeof input.data !== "string") {
4377
4604
  const ctx = this._getOrReturnCtx(input);
@@ -4383,10 +4610,10 @@ var ZodEnum = class _ZodEnum extends ZodType {
4383
4610
  });
4384
4611
  return INVALID;
4385
4612
  }
4386
- if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f")) {
4387
- __classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), "f");
4613
+ if (!this._cache) {
4614
+ this._cache = new Set(this._def.values);
4388
4615
  }
4389
- if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f").has(input.data)) {
4616
+ if (!this._cache.has(input.data)) {
4390
4617
  const ctx = this._getOrReturnCtx(input);
4391
4618
  const expectedValues = this._def.values;
4392
4619
  addIssueToContext(ctx, {
@@ -4435,13 +4662,8 @@ var ZodEnum = class _ZodEnum extends ZodType {
4435
4662
  });
4436
4663
  }
4437
4664
  };
4438
- _ZodEnum_cache = /* @__PURE__ */ new WeakMap();
4439
4665
  ZodEnum.create = createZodEnum;
4440
4666
  var ZodNativeEnum = class extends ZodType {
4441
- constructor() {
4442
- super(...arguments);
4443
- _ZodNativeEnum_cache.set(this, void 0);
4444
- }
4445
4667
  _parse(input) {
4446
4668
  const nativeEnumValues = util.getValidEnumValues(this._def.values);
4447
4669
  const ctx = this._getOrReturnCtx(input);
@@ -4454,10 +4676,10 @@ var ZodNativeEnum = class extends ZodType {
4454
4676
  });
4455
4677
  return INVALID;
4456
4678
  }
4457
- if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f")) {
4458
- __classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)), "f");
4679
+ if (!this._cache) {
4680
+ this._cache = new Set(util.getValidEnumValues(this._def.values));
4459
4681
  }
4460
- if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f").has(input.data)) {
4682
+ if (!this._cache.has(input.data)) {
4461
4683
  const expectedValues = util.objectValues(nativeEnumValues);
4462
4684
  addIssueToContext(ctx, {
4463
4685
  received: ctx.data,
@@ -4472,7 +4694,6 @@ var ZodNativeEnum = class extends ZodType {
4472
4694
  return this._def.values;
4473
4695
  }
4474
4696
  };
4475
- _ZodNativeEnum_cache = /* @__PURE__ */ new WeakMap();
4476
4697
  ZodNativeEnum.create = (values, params) => {
4477
4698
  return new ZodNativeEnum({
4478
4699
  values,
@@ -4613,7 +4834,7 @@ var ZodEffects = class extends ZodType {
4613
4834
  parent: ctx
4614
4835
  });
4615
4836
  if (!isValid(base))
4616
- return base;
4837
+ return INVALID;
4617
4838
  const result = effect.transform(base.value, checkCtx);
4618
4839
  if (result instanceof Promise) {
4619
4840
  throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
@@ -4622,8 +4843,11 @@ var ZodEffects = class extends ZodType {
4622
4843
  } else {
4623
4844
  return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {
4624
4845
  if (!isValid(base))
4625
- return base;
4626
- return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));
4846
+ return INVALID;
4847
+ return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
4848
+ status: status.value,
4849
+ value: result
4850
+ }));
4627
4851
  });
4628
4852
  }
4629
4853
  }
@@ -4875,16 +5099,30 @@ ZodReadonly.create = (type, params) => {
4875
5099
  ...processCreateParams(params)
4876
5100
  });
4877
5101
  };
4878
- function custom(check, params = {}, fatal) {
5102
+ function cleanParams(params, data) {
5103
+ const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
5104
+ const p2 = typeof p === "string" ? { message: p } : p;
5105
+ return p2;
5106
+ }
5107
+ function custom(check, _params = {}, fatal) {
4879
5108
  if (check)
4880
5109
  return ZodAny.create().superRefine((data, ctx) => {
4881
- var _a, _b;
4882
- if (!check(data)) {
4883
- const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
4884
- const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
4885
- const p2 = typeof p === "string" ? { message: p } : p;
4886
- ctx.addIssue({ code: "custom", ...p2, fatal: _fatal });
5110
+ const r = check(data);
5111
+ if (r instanceof Promise) {
5112
+ return r.then((r2) => {
5113
+ if (!r2) {
5114
+ const params = cleanParams(_params, data);
5115
+ const _fatal = params.fatal ?? fatal ?? true;
5116
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
5117
+ }
5118
+ });
4887
5119
  }
5120
+ if (!r) {
5121
+ const params = cleanParams(_params, data);
5122
+ const _fatal = params.fatal ?? fatal ?? true;
5123
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
5124
+ }
5125
+ return;
4888
5126
  });
4889
5127
  return ZodAny.create();
4890
5128
  }
@@ -4981,128 +5219,12 @@ var coerce = {
4981
5219
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
4982
5220
  };
4983
5221
  var NEVER = INVALID;
4984
- var z = /* @__PURE__ */ Object.freeze({
4985
- __proto__: null,
4986
- defaultErrorMap: errorMap,
4987
- setErrorMap,
4988
- getErrorMap,
4989
- makeIssue,
4990
- EMPTY_PATH,
4991
- addIssueToContext,
4992
- ParseStatus,
4993
- INVALID,
4994
- DIRTY,
4995
- OK,
4996
- isAborted,
4997
- isDirty,
4998
- isValid,
4999
- isAsync,
5000
- get util() {
5001
- return util;
5002
- },
5003
- get objectUtil() {
5004
- return objectUtil;
5005
- },
5006
- ZodParsedType,
5007
- getParsedType,
5008
- ZodType,
5009
- datetimeRegex,
5010
- ZodString,
5011
- ZodNumber,
5012
- ZodBigInt,
5013
- ZodBoolean,
5014
- ZodDate,
5015
- ZodSymbol,
5016
- ZodUndefined,
5017
- ZodNull,
5018
- ZodAny,
5019
- ZodUnknown,
5020
- ZodNever,
5021
- ZodVoid,
5022
- ZodArray,
5023
- ZodObject,
5024
- ZodUnion,
5025
- ZodDiscriminatedUnion,
5026
- ZodIntersection,
5027
- ZodTuple,
5028
- ZodRecord,
5029
- ZodMap,
5030
- ZodSet,
5031
- ZodFunction,
5032
- ZodLazy,
5033
- ZodLiteral,
5034
- ZodEnum,
5035
- ZodNativeEnum,
5036
- ZodPromise,
5037
- ZodEffects,
5038
- ZodTransformer: ZodEffects,
5039
- ZodOptional,
5040
- ZodNullable,
5041
- ZodDefault,
5042
- ZodCatch,
5043
- ZodNaN,
5044
- BRAND,
5045
- ZodBranded,
5046
- ZodPipeline,
5047
- ZodReadonly,
5048
- custom,
5049
- Schema: ZodType,
5050
- ZodSchema: ZodType,
5051
- late,
5052
- get ZodFirstPartyTypeKind() {
5053
- return ZodFirstPartyTypeKind;
5054
- },
5055
- coerce,
5056
- any: anyType,
5057
- array: arrayType,
5058
- bigint: bigIntType,
5059
- boolean: booleanType,
5060
- date: dateType,
5061
- discriminatedUnion: discriminatedUnionType,
5062
- effect: effectsType,
5063
- "enum": enumType,
5064
- "function": functionType,
5065
- "instanceof": instanceOfType,
5066
- intersection: intersectionType,
5067
- lazy: lazyType,
5068
- literal: literalType,
5069
- map: mapType,
5070
- nan: nanType,
5071
- nativeEnum: nativeEnumType,
5072
- never: neverType,
5073
- "null": nullType,
5074
- nullable: nullableType,
5075
- number: numberType,
5076
- object: objectType,
5077
- oboolean,
5078
- onumber,
5079
- optional: optionalType,
5080
- ostring,
5081
- pipeline: pipelineType,
5082
- preprocess: preprocessType,
5083
- promise: promiseType,
5084
- record: recordType,
5085
- set: setType,
5086
- strictObject: strictObjectType,
5087
- string: stringType,
5088
- symbol: symbolType,
5089
- transformer: effectsType,
5090
- tuple: tupleType,
5091
- "undefined": undefinedType,
5092
- union: unionType,
5093
- unknown: unknownType,
5094
- "void": voidType,
5095
- NEVER,
5096
- ZodIssueCode,
5097
- quotelessJson,
5098
- ZodError
5099
- });
5100
5222
 
5101
5223
  // src/core/credit/types.ts
5102
- var getNamespaceRemainingInstillCreditResponseValidator = z.object({
5103
- perishable: z.number(),
5104
- imperishable: z.number(),
5105
- total: z.number()
5224
+ var getNamespaceRemainingInstillCreditResponseValidator = external_exports.object({
5225
+ perishable: external_exports.number(),
5226
+ imperishable: external_exports.number(),
5227
+ total: external_exports.number()
5106
5228
  });
5107
5229
 
5108
5230
  // src/core/membership/MembershipClient.ts
@@ -5394,94 +5516,94 @@ var UserClient = class extends APIResource {
5394
5516
  };
5395
5517
 
5396
5518
  // src/core/user/types.ts
5397
- var OnboardingStatusSchema = z.enum([
5519
+ var OnboardingStatusSchema = external_exports.enum([
5398
5520
  "ONBOARDING_STATUS_UNSPECIFIED",
5399
5521
  "ONBOARDING_STATUS_IN_PROGRESS",
5400
5522
  "ONBOARDING_STATUS_COMPLETED"
5401
5523
  ]);
5402
- var UserProfileSchema = z.object({
5403
- displayName: z.string().optional(),
5404
- bio: z.string().optional(),
5405
- publicEmail: z.string().optional(),
5406
- companyName: z.string().optional(),
5407
- avatar: z.string().optional(),
5408
- socialProfilesLinks: z.object({
5409
- webiste: z.string().optional(),
5410
- x: z.string().optional(),
5411
- github: z.string().optional()
5524
+ var UserProfileSchema = external_exports.object({
5525
+ displayName: external_exports.string().optional(),
5526
+ bio: external_exports.string().optional(),
5527
+ publicEmail: external_exports.string().optional(),
5528
+ companyName: external_exports.string().optional(),
5529
+ avatar: external_exports.string().optional(),
5530
+ socialProfilesLinks: external_exports.object({
5531
+ webiste: external_exports.string().optional(),
5532
+ x: external_exports.string().optional(),
5533
+ github: external_exports.string().optional()
5412
5534
  }).optional()
5413
5535
  });
5414
- var UserSchema = z.object({
5415
- name: z.string(),
5416
- uid: z.string(),
5417
- id: z.string(),
5418
- createTime: z.string(),
5419
- updateTime: z.string(),
5536
+ var UserSchema = external_exports.object({
5537
+ name: external_exports.string(),
5538
+ uid: external_exports.string(),
5539
+ id: external_exports.string(),
5540
+ createTime: external_exports.string(),
5541
+ updateTime: external_exports.string(),
5420
5542
  profile: UserProfileSchema.optional()
5421
5543
  });
5422
- var AuthenticatedUserSchema = z.object({
5423
- name: z.string(),
5424
- uid: z.string(),
5425
- id: z.string(),
5426
- createTime: z.string(),
5427
- updateTime: z.string(),
5428
- customerId: z.string(),
5429
- email: z.string(),
5430
- newsletterSubscription: z.boolean(),
5431
- role: z.string(),
5544
+ var AuthenticatedUserSchema = external_exports.object({
5545
+ name: external_exports.string(),
5546
+ uid: external_exports.string(),
5547
+ id: external_exports.string(),
5548
+ createTime: external_exports.string(),
5549
+ updateTime: external_exports.string(),
5550
+ customerId: external_exports.string(),
5551
+ email: external_exports.string(),
5552
+ newsletterSubscription: external_exports.boolean(),
5553
+ role: external_exports.string(),
5432
5554
  onboardingStatus: OnboardingStatusSchema,
5433
- cookieToken: z.string().optional(),
5555
+ cookieToken: external_exports.string().optional(),
5434
5556
  profile: UserProfileSchema.optional()
5435
5557
  });
5436
- var listUsersWithPaginationResponseValidator = z.object({
5437
- users: z.array(UserSchema),
5438
- nextPageToken: z.string(),
5439
- totalSize: z.number()
5558
+ var listUsersWithPaginationResponseValidator = external_exports.object({
5559
+ users: external_exports.array(UserSchema),
5560
+ nextPageToken: external_exports.string(),
5561
+ totalSize: external_exports.number()
5440
5562
  });
5441
5563
 
5442
5564
  // src/core/organization/types.ts
5443
- var OrganizationProfileSchema = z.object({
5444
- displayName: z.string().optional(),
5445
- bio: z.string().optional(),
5446
- publicEmail: z.string().optional(),
5447
- avatar: z.string().optional(),
5448
- socialProfilesLinks: z.object({
5449
- webiste: z.string().optional(),
5450
- x: z.string().optional(),
5451
- github: z.string().optional()
5565
+ var OrganizationProfileSchema = external_exports.object({
5566
+ displayName: external_exports.string().optional(),
5567
+ bio: external_exports.string().optional(),
5568
+ publicEmail: external_exports.string().optional(),
5569
+ avatar: external_exports.string().optional(),
5570
+ socialProfilesLinks: external_exports.object({
5571
+ webiste: external_exports.string().optional(),
5572
+ x: external_exports.string().optional(),
5573
+ github: external_exports.string().optional()
5452
5574
  }).optional()
5453
5575
  });
5454
- var OrganizationSchema = z.object({
5455
- name: z.string(),
5456
- uid: z.string(),
5457
- id: z.string(),
5458
- createTime: z.string(),
5459
- updateTime: z.string(),
5576
+ var OrganizationSchema = external_exports.object({
5577
+ name: external_exports.string(),
5578
+ uid: external_exports.string(),
5579
+ id: external_exports.string(),
5580
+ createTime: external_exports.string(),
5581
+ updateTime: external_exports.string(),
5460
5582
  owner: UserSchema,
5461
5583
  profile: OrganizationProfileSchema.optional()
5462
5584
  });
5463
5585
 
5464
5586
  // src/core/membership/types.ts
5465
- var MembershipStateSchema = z.enum([
5587
+ var MembershipStateSchema = external_exports.enum([
5466
5588
  "MEMBERSHIP_STATE_ACTIVE",
5467
5589
  "MEMBERSHIP_STATE_PENDING"
5468
5590
  ]);
5469
- var UserMembershipSchema = z.object({
5591
+ var UserMembershipSchema = external_exports.object({
5470
5592
  user: UserSchema,
5471
5593
  organization: OrganizationSchema,
5472
- name: z.string().nullable(),
5473
- role: z.string(),
5594
+ name: external_exports.string().nullable(),
5595
+ role: external_exports.string(),
5474
5596
  state: MembershipStateSchema
5475
5597
  });
5476
- var OrganizationMembershipSchema = z.object({
5598
+ var OrganizationMembershipSchema = external_exports.object({
5477
5599
  user: UserSchema,
5478
5600
  organization: OrganizationSchema,
5479
- name: z.string().nullable(),
5480
- role: z.string(),
5601
+ name: external_exports.string().nullable(),
5602
+ role: external_exports.string(),
5481
5603
  state: MembershipStateSchema
5482
5604
  });
5483
- var listUserMembershipsResponseValidator = z.array(UserMembershipSchema);
5484
- var listOrganizationMembershipsResponseValidator = z.array(
5605
+ var listUserMembershipsResponseValidator = external_exports.array(UserMembershipSchema);
5606
+ var listOrganizationMembershipsResponseValidator = external_exports.array(
5485
5607
  OrganizationMembershipSchema
5486
5608
  );
5487
5609
 
@@ -6279,27 +6401,27 @@ var ComponentClient = class extends APIResource {
6279
6401
  };
6280
6402
 
6281
6403
  // src/types.ts
6282
- var PermissionSchema = z.object({
6283
- canEdit: z.boolean(),
6284
- canTrigger: z.boolean()
6404
+ var PermissionSchema = external_exports.object({
6405
+ canEdit: external_exports.boolean(),
6406
+ canTrigger: external_exports.boolean()
6285
6407
  });
6286
- var UserOwnerSchema = z.object({
6408
+ var UserOwnerSchema = external_exports.object({
6287
6409
  user: UserSchema
6288
6410
  });
6289
- var OrganizationOwnerSchema = z.object({
6411
+ var OrganizationOwnerSchema = external_exports.object({
6290
6412
  organization: OrganizationSchema
6291
6413
  });
6292
- var OwnerSchema = z.union([UserOwnerSchema, OrganizationOwnerSchema]);
6293
- var DataSpecificationSchema = z.object({
6294
- input: z.any().nullable(),
6295
- output: z.any().nullable()
6414
+ var OwnerSchema = external_exports.union([UserOwnerSchema, OrganizationOwnerSchema]);
6415
+ var DataSpecificationSchema = external_exports.object({
6416
+ input: external_exports.any().nullable(),
6417
+ output: external_exports.any().nullable()
6296
6418
  });
6297
- var SpecSchema = z.object({
6298
- componentSpecification: z.record(z.any()),
6299
- dataSpecifications: z.record(
6300
- z.object({
6301
- input: z.any().nullable(),
6302
- output: z.any().nullable()
6419
+ var SpecSchema = external_exports.object({
6420
+ componentSpecification: external_exports.record(external_exports.any()),
6421
+ dataSpecifications: external_exports.record(
6422
+ external_exports.object({
6423
+ input: external_exports.any().nullable(),
6424
+ output: external_exports.any().nullable()
6303
6425
  })
6304
6426
  ).nullable()
6305
6427
  });
@@ -6314,7 +6436,7 @@ var InstillError = class extends Error {
6314
6436
  };
6315
6437
 
6316
6438
  // src/vdp/component/types.ts
6317
- var ComponentTypeSchema = z.enum([
6439
+ var ComponentTypeSchema = external_exports.enum([
6318
6440
  "COMPONENT_TYPE_UNSPECIFIED",
6319
6441
  "COMPONENT_TYPE_OPERATOR",
6320
6442
  "COMPONENT_TYPE_DATA",
@@ -6322,79 +6444,79 @@ var ComponentTypeSchema = z.enum([
6322
6444
  "COMPONENT_TYPE_APPLICATION",
6323
6445
  "COMPONENT_TYPE_GENERIC"
6324
6446
  ]);
6325
- var TaskSchema = z.object({
6326
- name: z.string(),
6327
- title: z.string(),
6328
- description: z.string()
6447
+ var TaskSchema = external_exports.object({
6448
+ name: external_exports.string(),
6449
+ title: external_exports.string(),
6450
+ description: external_exports.string()
6329
6451
  });
6330
- var ConnectorDefinitionSchema = z.object({
6331
- name: z.string(),
6332
- uid: z.string(),
6333
- id: z.string(),
6334
- title: z.string(),
6335
- documentationUrl: z.string(),
6336
- icon: z.string(),
6452
+ var ConnectorDefinitionSchema = external_exports.object({
6453
+ name: external_exports.string(),
6454
+ uid: external_exports.string(),
6455
+ id: external_exports.string(),
6456
+ title: external_exports.string(),
6457
+ documentationUrl: external_exports.string(),
6458
+ icon: external_exports.string(),
6337
6459
  type: ComponentTypeSchema,
6338
6460
  spec: SpecSchema,
6339
- tombstone: z.boolean(),
6340
- public: z.boolean(),
6341
- custom: z.boolean(),
6342
- vendor: z.string(),
6343
- vendorAttributes: z.record(z.any()),
6344
- tasks: z.array(TaskSchema)
6461
+ tombstone: external_exports.boolean(),
6462
+ public: external_exports.boolean(),
6463
+ custom: external_exports.boolean(),
6464
+ vendor: external_exports.string(),
6465
+ vendorAttributes: external_exports.record(external_exports.any()),
6466
+ tasks: external_exports.array(TaskSchema)
6345
6467
  });
6346
- var ComponentDefinitionSchema = z.object({
6347
- name: z.string(),
6348
- uid: z.string(),
6349
- id: z.string(),
6350
- title: z.string(),
6351
- documentationUrl: z.string(),
6352
- icon: z.string(),
6468
+ var ComponentDefinitionSchema = external_exports.object({
6469
+ name: external_exports.string(),
6470
+ uid: external_exports.string(),
6471
+ id: external_exports.string(),
6472
+ title: external_exports.string(),
6473
+ documentationUrl: external_exports.string(),
6474
+ icon: external_exports.string(),
6353
6475
  spec: SpecSchema,
6354
6476
  type: ComponentTypeSchema,
6355
- tombstone: z.boolean(),
6356
- public: z.boolean(),
6357
- custom: z.boolean(),
6358
- vendor: z.string(),
6359
- vendorAttributes: z.record(z.any()),
6360
- sourceUrl: z.string(),
6361
- version: z.string(),
6362
- tasks: z.array(TaskSchema),
6363
- description: z.string(),
6364
- releaseStage: z.string()
6477
+ tombstone: external_exports.boolean(),
6478
+ public: external_exports.boolean(),
6479
+ custom: external_exports.boolean(),
6480
+ vendor: external_exports.string(),
6481
+ vendorAttributes: external_exports.record(external_exports.any()),
6482
+ sourceUrl: external_exports.string(),
6483
+ version: external_exports.string(),
6484
+ tasks: external_exports.array(TaskSchema),
6485
+ description: external_exports.string(),
6486
+ releaseStage: external_exports.string()
6365
6487
  });
6366
- var OperatorDefinitionSchema = z.object({
6367
- name: z.string(),
6368
- uid: z.string(),
6369
- id: z.string(),
6370
- title: z.string(),
6371
- documentationUrl: z.string(),
6372
- icon: z.string(),
6488
+ var OperatorDefinitionSchema = external_exports.object({
6489
+ name: external_exports.string(),
6490
+ uid: external_exports.string(),
6491
+ id: external_exports.string(),
6492
+ title: external_exports.string(),
6493
+ documentationUrl: external_exports.string(),
6494
+ icon: external_exports.string(),
6373
6495
  spec: SpecSchema,
6374
- tombstone: z.boolean(),
6375
- public: z.boolean(),
6376
- custom: z.boolean(),
6377
- tasks: z.array(TaskSchema),
6496
+ tombstone: external_exports.boolean(),
6497
+ public: external_exports.boolean(),
6498
+ custom: external_exports.boolean(),
6499
+ tasks: external_exports.array(TaskSchema),
6378
6500
  type: ComponentTypeSchema
6379
6501
  });
6380
- var listConnectorDefinitionsWithPaginationResponseValidator = z.object(
6502
+ var listConnectorDefinitionsWithPaginationResponseValidator = external_exports.object(
6381
6503
  {
6382
- connectorDefinitions: z.array(ConnectorDefinitionSchema),
6383
- nextPageToken: z.string(),
6384
- totalSize: z.number()
6504
+ connectorDefinitions: external_exports.array(ConnectorDefinitionSchema),
6505
+ nextPageToken: external_exports.string(),
6506
+ totalSize: external_exports.number()
6385
6507
  }
6386
6508
  );
6387
- var listComponentDefinitionsWithPaginationResponseValidator = z.object(
6509
+ var listComponentDefinitionsWithPaginationResponseValidator = external_exports.object(
6388
6510
  {
6389
- componentDefinitions: z.array(ComponentDefinitionSchema),
6390
- nextPageToken: z.string(),
6391
- totalSize: z.number()
6511
+ componentDefinitions: external_exports.array(ComponentDefinitionSchema),
6512
+ nextPageToken: external_exports.string(),
6513
+ totalSize: external_exports.number()
6392
6514
  }
6393
6515
  );
6394
- var listOperatorDefinitionsWithPaginationResponseValidator = z.object({
6395
- operatorDefinitions: z.array(OperatorDefinitionSchema),
6396
- nextPageToken: z.string(),
6397
- totalSize: z.number()
6516
+ var listOperatorDefinitionsWithPaginationResponseValidator = external_exports.object({
6517
+ operatorDefinitions: external_exports.array(OperatorDefinitionSchema),
6518
+ nextPageToken: external_exports.string(),
6519
+ totalSize: external_exports.number()
6398
6520
  });
6399
6521
 
6400
6522
  // src/vdp/pipeline/PipelineClient.ts
@@ -6754,82 +6876,82 @@ var ReleaseClient = class extends APIResource {
6754
6876
  };
6755
6877
 
6756
6878
  // src/vdp/release/types.ts
6757
- var PipelineReleaseSchema = z.object({
6758
- name: z.string(),
6759
- uid: z.string(),
6760
- id: z.string(),
6761
- description: z.string(),
6879
+ var PipelineReleaseSchema = external_exports.object({
6880
+ name: external_exports.string(),
6881
+ uid: external_exports.string(),
6882
+ id: external_exports.string(),
6883
+ description: external_exports.string(),
6762
6884
  // Our openapi isn't fully typed on the recipe field yet
6763
- recipe: z.record(z.any()),
6764
- createTime: z.string(),
6765
- updateTime: z.string(),
6766
- deleteTime: z.string().optional(),
6767
- metadata: z.record(z.any()),
6768
- alias: z.string().optional(),
6769
- readme: z.string(),
6770
- rawRecipe: z.string(),
6885
+ recipe: external_exports.record(external_exports.any()),
6886
+ createTime: external_exports.string(),
6887
+ updateTime: external_exports.string(),
6888
+ deleteTime: external_exports.string().optional(),
6889
+ metadata: external_exports.record(external_exports.any()),
6890
+ alias: external_exports.string().optional(),
6891
+ readme: external_exports.string(),
6892
+ rawRecipe: external_exports.string(),
6771
6893
  dataSpecification: DataSpecificationSchema
6772
6894
  });
6773
6895
 
6774
6896
  // src/vdp/pipeline/types.ts
6775
- var PipelineStatsSchema = z.object({
6776
- lastRunTime: z.string(),
6777
- numberOfRuns: z.number()
6897
+ var PipelineStatsSchema = external_exports.object({
6898
+ lastRunTime: external_exports.string(),
6899
+ numberOfRuns: external_exports.number()
6778
6900
  });
6779
- var PermissionRoleSchema = z.enum([
6901
+ var PermissionRoleSchema = external_exports.enum([
6780
6902
  "ROLE_UNSPECIFIED",
6781
6903
  "ROLE_VIEWER",
6782
6904
  "ROLE_EXECUTOR"
6783
6905
  ]);
6784
- var PipelineSharingCodeRuleSchema = z.object({
6785
- user: z.string(),
6786
- code: z.string().optional(),
6787
- enabled: z.boolean(),
6906
+ var PipelineSharingCodeRuleSchema = external_exports.object({
6907
+ user: external_exports.string(),
6908
+ code: external_exports.string().optional(),
6909
+ enabled: external_exports.boolean(),
6788
6910
  role: PermissionRoleSchema
6789
6911
  });
6790
- var PipelineSharingUserRulesSchema = z.record(
6791
- z.object({
6792
- enabled: z.boolean(),
6912
+ var PipelineSharingUserRulesSchema = external_exports.record(
6913
+ external_exports.object({
6914
+ enabled: external_exports.boolean(),
6793
6915
  role: PermissionRoleSchema
6794
6916
  }).optional()
6795
6917
  );
6796
- var PipelineSharingSchema = z.object({
6918
+ var PipelineSharingSchema = external_exports.object({
6797
6919
  users: PipelineSharingUserRulesSchema,
6798
6920
  shareCode: PipelineSharingCodeRuleSchema.nullable()
6799
6921
  });
6800
- var PipelineSchema = z.object({
6801
- name: z.string(),
6802
- uid: z.string(),
6803
- id: z.string(),
6804
- description: z.string(),
6805
- readme: z.string(),
6806
- createTime: z.string(),
6807
- updateTime: z.string(),
6922
+ var PipelineSchema = external_exports.object({
6923
+ name: external_exports.string(),
6924
+ uid: external_exports.string(),
6925
+ id: external_exports.string(),
6926
+ description: external_exports.string(),
6927
+ readme: external_exports.string(),
6928
+ createTime: external_exports.string(),
6929
+ updateTime: external_exports.string(),
6808
6930
  // Our openapi isn't fully typed on the recipe field yet
6809
- recipe: z.record(z.any()),
6931
+ recipe: external_exports.record(external_exports.any()),
6810
6932
  dataSpecification: DataSpecificationSchema,
6811
6933
  owner: OwnerSchema,
6812
- ownerName: z.string(),
6813
- releases: z.array(PipelineReleaseSchema),
6934
+ ownerName: external_exports.string(),
6935
+ releases: external_exports.array(PipelineReleaseSchema),
6814
6936
  sharing: PipelineSharingSchema,
6815
- metadata: z.record(z.any()),
6937
+ metadata: external_exports.record(external_exports.any()),
6816
6938
  permission: PermissionSchema,
6817
- tags: z.array(z.string()),
6939
+ tags: external_exports.array(external_exports.string()),
6818
6940
  stats: PipelineStatsSchema,
6819
- profileImage: z.string(),
6820
- sourceUrl: z.string(),
6821
- documentationUrl: z.string(),
6822
- license: z.string()
6941
+ profileImage: external_exports.string(),
6942
+ sourceUrl: external_exports.string(),
6943
+ documentationUrl: external_exports.string(),
6944
+ license: external_exports.string()
6823
6945
  });
6824
- var listAccessiblePipelinesWithPaginationResponseValidator = z.object({
6825
- pipelines: z.array(PipelineSchema),
6826
- nextPageToken: z.string(),
6827
- totalSize: z.number()
6946
+ var listAccessiblePipelinesWithPaginationResponseValidator = external_exports.object({
6947
+ pipelines: external_exports.array(PipelineSchema),
6948
+ nextPageToken: external_exports.string(),
6949
+ totalSize: external_exports.number()
6828
6950
  });
6829
- var listNamespacePipelinesWithPaginationResponseValidator = z.object({
6830
- pipelines: z.array(PipelineSchema),
6831
- nextPageToken: z.string(),
6832
- totalSize: z.number()
6951
+ var listNamespacePipelinesWithPaginationResponseValidator = external_exports.object({
6952
+ pipelines: external_exports.array(PipelineSchema),
6953
+ nextPageToken: external_exports.string(),
6954
+ totalSize: external_exports.number()
6833
6955
  });
6834
6956
 
6835
6957
  // src/vdp/secret/SecretClient.ts
@@ -7120,63 +7242,63 @@ var TriggerClient = class extends APIResource {
7120
7242
  };
7121
7243
 
7122
7244
  // src/vdp/types.ts
7123
- var PipelineVariableFieldSchema = z.object({
7124
- title: z.string(),
7125
- instillFormat: z.string(),
7126
- description: z.string().optional(),
7127
- instillUiOrder: z.number().optional(),
7128
- instillUiMultiline: z.boolean().optional()
7245
+ var PipelineVariableFieldSchema = external_exports.object({
7246
+ title: external_exports.string(),
7247
+ instillFormat: external_exports.string(),
7248
+ description: external_exports.string().optional(),
7249
+ instillUiOrder: external_exports.number().optional(),
7250
+ instillUiMultiline: external_exports.boolean().optional()
7129
7251
  });
7130
- var PipelineVariableFieldMapSchema = z.record(
7252
+ var PipelineVariableFieldMapSchema = external_exports.record(
7131
7253
  PipelineVariableFieldSchema.nullable()
7132
7254
  );
7133
- var PipelineOutputFieldSchema = z.object({
7134
- title: z.string(),
7135
- description: z.string().optional(),
7136
- value: z.string(),
7137
- instillUiOrder: z.number().optional()
7255
+ var PipelineOutputFieldSchema = external_exports.object({
7256
+ title: external_exports.string(),
7257
+ description: external_exports.string().optional(),
7258
+ value: external_exports.string(),
7259
+ instillUiOrder: external_exports.number().optional()
7138
7260
  });
7139
- var PipelineOutputFieldMapSchema = z.record(
7261
+ var PipelineOutputFieldMapSchema = external_exports.record(
7140
7262
  PipelineOutputFieldSchema.nullable()
7141
7263
  );
7142
- var PipelineComponentMapSchema = z.record(z.any());
7143
- var PipelineRunOnEventItemMapSchema = z.record(z.any());
7144
- var PipelineRunOnMapSchema = z.record(z.any());
7145
- var PipelineRecipeSchema = z.object({
7146
- version: z.string(),
7264
+ var PipelineComponentMapSchema = external_exports.record(external_exports.any());
7265
+ var PipelineRunOnEventItemMapSchema = external_exports.record(external_exports.any());
7266
+ var PipelineRunOnMapSchema = external_exports.record(external_exports.any());
7267
+ var PipelineRecipeSchema = external_exports.object({
7268
+ version: external_exports.string(),
7147
7269
  component: PipelineComponentMapSchema.optional(),
7148
7270
  variable: PipelineVariableFieldMapSchema.optional(),
7149
7271
  output: PipelineOutputFieldMapSchema.optional(),
7150
7272
  on: PipelineRunOnMapSchema.optional()
7151
7273
  });
7152
- var ResourceViewSchema = z.enum(["VIEW_FULL", "VIEW_BASIC"]);
7274
+ var ResourceViewSchema = external_exports.enum(["VIEW_FULL", "VIEW_BASIC"]);
7153
7275
 
7154
7276
  // src/core/integration/type.ts
7155
- var HelpLinkSchema = z.object({
7156
- text: z.string(),
7157
- url: z.string()
7277
+ var HelpLinkSchema = external_exports.object({
7278
+ text: external_exports.string(),
7279
+ url: external_exports.string()
7158
7280
  });
7159
- var OAuthConfigSchema = z.object({
7160
- authUrl: z.string(),
7161
- accessUrl: z.string(),
7162
- scopes: z.array(z.string())
7281
+ var OAuthConfigSchema = external_exports.object({
7282
+ authUrl: external_exports.string(),
7283
+ accessUrl: external_exports.string(),
7284
+ scopes: external_exports.array(external_exports.string())
7163
7285
  });
7164
- var IntegrationSchema = z.object({
7165
- uid: z.string(),
7166
- id: z.string(),
7167
- title: z.string(),
7168
- description: z.string(),
7169
- vendor: z.string(),
7170
- icon: z.string(),
7286
+ var IntegrationSchema = external_exports.object({
7287
+ uid: external_exports.string(),
7288
+ id: external_exports.string(),
7289
+ title: external_exports.string(),
7290
+ description: external_exports.string(),
7291
+ vendor: external_exports.string(),
7292
+ icon: external_exports.string(),
7171
7293
  helpLink: HelpLinkSchema,
7172
- setupSchema: z.any(),
7294
+ setupSchema: external_exports.any(),
7173
7295
  oAuthConfig: OAuthConfigSchema.nullable(),
7174
7296
  view: ResourceViewSchema
7175
7297
  });
7176
- var listPaginatedIntegrationsResponseValidator = z.object({
7177
- integrations: z.array(IntegrationSchema),
7178
- nextPageToken: z.string().nullable(),
7179
- totalSize: z.number()
7298
+ var listPaginatedIntegrationsResponseValidator = external_exports.object({
7299
+ integrations: external_exports.array(IntegrationSchema),
7300
+ nextPageToken: external_exports.string().nullable(),
7301
+ totalSize: external_exports.number()
7180
7302
  });
7181
7303
 
7182
7304
  // src/core/utils/UtilsClient.ts