@authhero/drizzle 0.45.1 → 0.46.0

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.
@@ -1917,7 +1917,8 @@ const q = j("tenants", {
1917
1917
  length: 8
1918
1918
  }),
1919
1919
  colors_page_background_end: s("colors_page_background_end", { length: 8 }),
1920
- colors_page_background_angle_dev: w("colors_page_background_angle_dev")
1920
+ colors_page_background_angle_dev: w("colors_page_background_angle_dev"),
1921
+ dark_mode: s("dark_mode", { length: 8 })
1921
1922
  }), ot = j(
1922
1923
  "universal_login_templates",
1923
1924
  {
@@ -2290,7 +2291,7 @@ const q = j("tenants", {
2290
2291
  n.dead_lettered_at
2291
2292
  )
2292
2293
  ]
2293
- ), L_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2294
+ ), R_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2294
2295
  __proto__: null,
2295
2296
  authenticationCodes: as,
2296
2297
  authenticationMethods: ue,
@@ -2404,6 +2405,9 @@ function _s(n) {
2404
2405
  return typeof n == "string" ? parseInt(n, 10) : typeof n == "bigint" ? Number(n) : n;
2405
2406
  }
2406
2407
  function us(n) {
2408
+ return n === "dark" || n === "light" || n === "auto";
2409
+ }
2410
+ function ps(n) {
2407
2411
  return {
2408
2412
  async get(e) {
2409
2413
  const t = await n.select().from(It).where(c(It.tenant_id, e)).get();
@@ -2416,10 +2420,11 @@ function us(n) {
2416
2420
  colors_page_background_end: d,
2417
2421
  colors_page_background_angle_dev: u,
2418
2422
  font_url: f,
2419
- ...p
2423
+ dark_mode: p,
2424
+ ...v
2420
2425
  } = t;
2421
2426
  return J({
2422
- ...p,
2427
+ ...v,
2423
2428
  colors: {
2424
2429
  primary: o,
2425
2430
  page_background: {
@@ -2429,31 +2434,24 @@ function us(n) {
2429
2434
  angle_deg: u
2430
2435
  }
2431
2436
  },
2432
- font: f ? { url: f } : void 0
2437
+ font: f ? { url: f } : void 0,
2438
+ dark_mode: us(p) ? p : void 0
2433
2439
  });
2434
2440
  },
2435
2441
  async set(e, t) {
2436
- const { colors: i, font: o, ...r } = t, l = i == null ? void 0 : i.page_background, d = l && typeof l == "object" ? l : void 0, u = {
2437
- ...r,
2438
- tenant_id: e,
2442
+ const { colors: i, font: o, dark_mode: r, ...l } = t, d = i == null ? void 0 : i.page_background, u = d && typeof d == "object" ? d : void 0, f = {
2443
+ ...l,
2439
2444
  colors_primary: i == null ? void 0 : i.primary,
2440
- colors_page_background_type: d == null ? void 0 : d.type,
2441
- colors_page_background_start: d == null ? void 0 : d.start,
2442
- colors_page_background_end: d == null ? void 0 : d.end,
2443
- colors_page_background_angle_dev: d == null ? void 0 : d.angle_deg,
2444
- font_url: o == null ? void 0 : o.url
2445
+ colors_page_background_type: u == null ? void 0 : u.type,
2446
+ colors_page_background_start: u == null ? void 0 : u.start,
2447
+ colors_page_background_end: u == null ? void 0 : u.end,
2448
+ colors_page_background_angle_dev: u == null ? void 0 : u.angle_deg,
2449
+ font_url: o == null ? void 0 : o.url,
2450
+ dark_mode: r
2445
2451
  };
2446
- await n.insert(It).values(u).onConflictDoUpdate({
2452
+ await n.insert(It).values({ tenant_id: e, ...f }).onConflictDoUpdate({
2447
2453
  target: It.tenant_id,
2448
- set: {
2449
- ...r,
2450
- colors_primary: i == null ? void 0 : i.primary,
2451
- colors_page_background_type: d == null ? void 0 : d.type,
2452
- colors_page_background_start: d == null ? void 0 : d.start,
2453
- colors_page_background_end: d == null ? void 0 : d.end,
2454
- colors_page_background_angle_dev: d == null ? void 0 : d.angle_deg,
2455
- font_url: o == null ? void 0 : o.url
2456
- }
2454
+ set: f
2457
2455
  });
2458
2456
  }
2459
2457
  };
@@ -2635,7 +2633,7 @@ function Oi(n) {
2635
2633
  n[t] !== void 0 && (e[t] = JSON.stringify(n[t] || {}));
2636
2634
  return n.connections !== void 0 && (e.connections = JSON.stringify(n.connections || [])), sr(e);
2637
2635
  }
2638
- function ps(n) {
2636
+ function fs(n) {
2639
2637
  return {
2640
2638
  async create(e, t) {
2641
2639
  var l, d;
@@ -2746,7 +2744,7 @@ function ps(n) {
2746
2744
  }
2747
2745
  };
2748
2746
  }
2749
- function fs(n) {
2747
+ function hs(n) {
2750
2748
  const { tenant_id: e, is_system: t, options: i, metadata: o, ...r } = n;
2751
2749
  return J({
2752
2750
  ...r,
@@ -2755,7 +2753,7 @@ function fs(n) {
2755
2753
  is_system: t ? !0 : void 0
2756
2754
  });
2757
2755
  }
2758
- function hs(n) {
2756
+ function gs(n) {
2759
2757
  return {
2760
2758
  async listByClient(e, t) {
2761
2759
  const i = await n.select({ connections: V.connections }).from(V).where(
@@ -2772,7 +2770,7 @@ function hs(n) {
2772
2770
  c(pe.tenant_id, e),
2773
2771
  nt(pe.id, o)
2774
2772
  )
2775
- ).all()).map(fs);
2773
+ ).all()).map(hs);
2776
2774
  return o.map((d) => l.find((u) => u.id === d)).filter(Boolean);
2777
2775
  },
2778
2776
  async updateByClient(e, t, i) {
@@ -2823,7 +2821,7 @@ function hs(n) {
2823
2821
  }
2824
2822
  };
2825
2823
  }
2826
- let gs = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", ms = (n) => crypto.getRandomValues(new Uint8Array(n)), ys = (n, e, t) => {
2824
+ let ms = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", ys = (n) => crypto.getRandomValues(new Uint8Array(n)), vs = (n, e, t) => {
2827
2825
  let i = 256 - 256 % n.length;
2828
2826
  if (i === 256) {
2829
2827
  let r = n.length - 1;
@@ -2848,10 +2846,10 @@ let gs = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", ms
2848
2846
  return l;
2849
2847
  }
2850
2848
  };
2851
- }, vs = (n, e = 21) => ys(n, e | 0, ms), Ie = (n = 21) => {
2849
+ }, ws = (n, e = 21) => vs(n, e | 0, ys), Ie = (n = 21) => {
2852
2850
  let e = "", t = crypto.getRandomValues(new Uint8Array(n |= 0));
2853
2851
  for (; n--; )
2854
- e += gs[t[n] & 63];
2852
+ e += ms[t[n] & 63];
2855
2853
  return e;
2856
2854
  };
2857
2855
  function Ln(n) {
@@ -2874,7 +2872,7 @@ function Ln(n) {
2874
2872
  is_system: !!r
2875
2873
  });
2876
2874
  }
2877
- function ws(n) {
2875
+ function Ns(n) {
2878
2876
  return {
2879
2877
  async create(e, t) {
2880
2878
  const i = (/* @__PURE__ */ new Date()).toISOString(), r = {
@@ -2952,7 +2950,7 @@ function ws(n) {
2952
2950
  }
2953
2951
  };
2954
2952
  }
2955
- function Ns(n, e) {
2953
+ function Ss(n, e) {
2956
2954
  var t = {};
2957
2955
  for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && e.indexOf(i) < 0 && (t[i] = n[i]);
2958
2956
  if (n != null && typeof Object.getOwnPropertySymbols == "function")
@@ -2960,7 +2958,7 @@ function Ns(n, e) {
2960
2958
  e.indexOf(i[o]) < 0 && Object.prototype.propertyIsEnumerable.call(n, i[o]) && (t[i[o]] = n[i[o]]);
2961
2959
  return t;
2962
2960
  }
2963
- function Ss(n, e) {
2961
+ function bs(n, e) {
2964
2962
  var t;
2965
2963
  return ((t = n == null ? void 0 : n._def) === null || t === void 0 ? void 0 : t.typeName) === e;
2966
2964
  }
@@ -2971,15 +2969,15 @@ function At(n, e) {
2971
2969
  return o._def.openapi = this._def.openapi, o;
2972
2970
  };
2973
2971
  }
2974
- function bs(n) {
2972
+ function Es(n) {
2975
2973
  if (typeof n.ZodType.prototype.openapi < "u")
2976
2974
  return;
2977
2975
  n.ZodType.prototype.openapi = function(o, r) {
2978
2976
  var l, d, u, f, p, v;
2979
- const m = typeof o == "string" ? r : o, b = m ?? {}, { param: A } = b, te = Ns(b, ["param"]), ie = Object.assign(Object.assign({}, (l = this._def.openapi) === null || l === void 0 ? void 0 : l._internal), typeof o == "string" ? { refId: o } : void 0), oe = Object.assign(Object.assign(Object.assign({}, (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata), te), !((f = (u = this._def.openapi) === null || u === void 0 ? void 0 : u.metadata) === null || f === void 0) && f.param || A ? {
2977
+ const m = typeof o == "string" ? r : o, b = m ?? {}, { param: A } = b, te = Ss(b, ["param"]), ie = Object.assign(Object.assign({}, (l = this._def.openapi) === null || l === void 0 ? void 0 : l._internal), typeof o == "string" ? { refId: o } : void 0), oe = Object.assign(Object.assign(Object.assign({}, (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata), te), !((f = (u = this._def.openapi) === null || u === void 0 ? void 0 : u.metadata) === null || f === void 0) && f.param || A ? {
2980
2978
  param: Object.assign(Object.assign({}, (v = (p = this._def.openapi) === null || p === void 0 ? void 0 : p.metadata) === null || v === void 0 ? void 0 : v.param), A)
2981
2979
  } : void 0), Xe = new this.constructor(Object.assign(Object.assign({}, this._def), { openapi: Object.assign(Object.assign({}, Object.keys(ie).length > 0 ? { _internal: ie } : void 0), Object.keys(oe).length > 0 ? { metadata: oe } : void 0) }));
2982
- if (Ss(this, "ZodObject")) {
2980
+ if (bs(this, "ZodObject")) {
2983
2981
  const pt = this.extend;
2984
2982
  Xe.extend = function(...Nn) {
2985
2983
  var Sn, bn, En, xn, kn, On, Tn;
@@ -3239,9 +3237,9 @@ const cn = (n, e) => {
3239
3237
  }
3240
3238
  return { message: t };
3241
3239
  };
3242
- let Es = cn;
3240
+ let xs = cn;
3243
3241
  function dr() {
3244
- return Es;
3242
+ return xs;
3245
3243
  }
3246
3244
  const cr = (n) => {
3247
3245
  const { data: e, path: t, errorMaps: i, issueData: o } = n, r = [...t, ...o.path || []], l = {
@@ -3264,7 +3262,7 @@ const cr = (n) => {
3264
3262
  message: d
3265
3263
  };
3266
3264
  };
3267
- function E(n, e) {
3265
+ function x(n, e) {
3268
3266
  const t = dr(), i = cr({
3269
3267
  issueData: e,
3270
3268
  data: n.data,
@@ -3583,16 +3581,16 @@ class B {
3583
3581
  return this.safeParse(null).success;
3584
3582
  }
3585
3583
  }
3586
- const xs = /^c[^\s-]{8,}$/i, ks = /^[0-9a-z]+$/, Os = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Ts = /^[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, As = /^[a-z0-9_-]{21}$/i, Is = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Cs = /^[-+]?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)?)??$/, Ds = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Ls = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
3584
+ const ks = /^c[^\s-]{8,}$/i, Os = /^[0-9a-z]+$/, Ts = /^[0-9A-HJKMNP-TV-Z]{26}$/i, As = /^[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, Is = /^[a-z0-9_-]{21}$/i, Cs = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Ds = /^[-+]?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)?)??$/, Ls = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Rs = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
3587
3585
  let Rn;
3588
- const Rs = /^(?:(?: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])$/, Us = /^(?:(?: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])$/, zs = /^(([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]))$/, Fs = /^(([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])$/, Ps = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Ms = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, _r = "((\\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])))", qs = new RegExp(`^${_r}$`);
3586
+ const Us = /^(?:(?: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])$/, zs = /^(?:(?: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])$/, Fs = /^(([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]))$/, Ps = /^(([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])$/, Ms = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, qs = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, _r = "((\\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])))", Bs = new RegExp(`^${_r}$`);
3589
3587
  function ur(n) {
3590
3588
  let e = "[0-5]\\d";
3591
3589
  n.precision ? e = `${e}\\.\\d{${n.precision}}` : n.precision == null && (e = `${e}(\\.\\d+)?`);
3592
3590
  const t = n.precision ? "+" : "?";
3593
3591
  return `([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`;
3594
3592
  }
3595
- function Bs(n) {
3593
+ function js(n) {
3596
3594
  return new RegExp(`^${ur(n)}$`);
3597
3595
  }
3598
3596
  function pr(n) {
@@ -3600,11 +3598,11 @@ function pr(n) {
3600
3598
  const t = [];
3601
3599
  return t.push(n.local ? "Z?" : "Z"), n.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
3602
3600
  }
3603
- function js(n, e) {
3604
- return !!((e === "v4" || !e) && Rs.test(n) || (e === "v6" || !e) && zs.test(n));
3605
- }
3606
3601
  function $s(n, e) {
3607
- if (!Is.test(n))
3602
+ return !!((e === "v4" || !e) && Us.test(n) || (e === "v6" || !e) && Fs.test(n));
3603
+ }
3604
+ function Vs(n, e) {
3605
+ if (!Cs.test(n))
3608
3606
  return !1;
3609
3607
  try {
3610
3608
  const [t] = n.split(".");
@@ -3616,14 +3614,14 @@ function $s(n, e) {
3616
3614
  return !1;
3617
3615
  }
3618
3616
  }
3619
- function Vs(n, e) {
3620
- return !!((e === "v4" || !e) && Us.test(n) || (e === "v6" || !e) && Fs.test(n));
3617
+ function Zs(n, e) {
3618
+ return !!((e === "v4" || !e) && zs.test(n) || (e === "v6" || !e) && Ps.test(n));
3621
3619
  }
3622
3620
  class Ke extends B {
3623
3621
  _parse(e) {
3624
3622
  if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== O.string) {
3625
3623
  const r = this._getOrReturnCtx(e);
3626
- return E(r, {
3624
+ return x(r, {
3627
3625
  code: N.invalid_type,
3628
3626
  expected: O.string,
3629
3627
  received: r.parsedType
@@ -3633,7 +3631,7 @@ class Ke extends B {
3633
3631
  let o;
3634
3632
  for (const r of this._def.checks)
3635
3633
  if (r.kind === "min")
3636
- e.data.length < r.value && (o = this._getOrReturnCtx(e, o), E(o, {
3634
+ e.data.length < r.value && (o = this._getOrReturnCtx(e, o), x(o, {
3637
3635
  code: N.too_small,
3638
3636
  minimum: r.value,
3639
3637
  type: "string",
@@ -3642,7 +3640,7 @@ class Ke extends B {
3642
3640
  message: r.message
3643
3641
  }), i.dirty());
3644
3642
  else if (r.kind === "max")
3645
- e.data.length > r.value && (o = this._getOrReturnCtx(e, o), E(o, {
3643
+ e.data.length > r.value && (o = this._getOrReturnCtx(e, o), x(o, {
3646
3644
  code: N.too_big,
3647
3645
  maximum: r.value,
3648
3646
  type: "string",
@@ -3652,14 +3650,14 @@ class Ke extends B {
3652
3650
  }), i.dirty());
3653
3651
  else if (r.kind === "length") {
3654
3652
  const l = e.data.length > r.value, d = e.data.length < r.value;
3655
- (l || d) && (o = this._getOrReturnCtx(e, o), l ? E(o, {
3653
+ (l || d) && (o = this._getOrReturnCtx(e, o), l ? x(o, {
3656
3654
  code: N.too_big,
3657
3655
  maximum: r.value,
3658
3656
  type: "string",
3659
3657
  inclusive: !0,
3660
3658
  exact: !0,
3661
3659
  message: r.message
3662
- }) : d && E(o, {
3660
+ }) : d && x(o, {
3663
3661
  code: N.too_small,
3664
3662
  minimum: r.value,
3665
3663
  type: "string",
@@ -3668,43 +3666,43 @@ class Ke extends B {
3668
3666
  message: r.message
3669
3667
  }), i.dirty());
3670
3668
  } else if (r.kind === "email")
3671
- Ds.test(e.data) || (o = this._getOrReturnCtx(e, o), E(o, {
3669
+ Ls.test(e.data) || (o = this._getOrReturnCtx(e, o), x(o, {
3672
3670
  validation: "email",
3673
3671
  code: N.invalid_string,
3674
3672
  message: r.message
3675
3673
  }), i.dirty());
3676
3674
  else if (r.kind === "emoji")
3677
- Rn || (Rn = new RegExp(Ls, "u")), Rn.test(e.data) || (o = this._getOrReturnCtx(e, o), E(o, {
3675
+ Rn || (Rn = new RegExp(Rs, "u")), Rn.test(e.data) || (o = this._getOrReturnCtx(e, o), x(o, {
3678
3676
  validation: "emoji",
3679
3677
  code: N.invalid_string,
3680
3678
  message: r.message
3681
3679
  }), i.dirty());
3682
3680
  else if (r.kind === "uuid")
3683
- Ts.test(e.data) || (o = this._getOrReturnCtx(e, o), E(o, {
3681
+ As.test(e.data) || (o = this._getOrReturnCtx(e, o), x(o, {
3684
3682
  validation: "uuid",
3685
3683
  code: N.invalid_string,
3686
3684
  message: r.message
3687
3685
  }), i.dirty());
3688
3686
  else if (r.kind === "nanoid")
3689
- As.test(e.data) || (o = this._getOrReturnCtx(e, o), E(o, {
3687
+ Is.test(e.data) || (o = this._getOrReturnCtx(e, o), x(o, {
3690
3688
  validation: "nanoid",
3691
3689
  code: N.invalid_string,
3692
3690
  message: r.message
3693
3691
  }), i.dirty());
3694
3692
  else if (r.kind === "cuid")
3695
- xs.test(e.data) || (o = this._getOrReturnCtx(e, o), E(o, {
3693
+ ks.test(e.data) || (o = this._getOrReturnCtx(e, o), x(o, {
3696
3694
  validation: "cuid",
3697
3695
  code: N.invalid_string,
3698
3696
  message: r.message
3699
3697
  }), i.dirty());
3700
3698
  else if (r.kind === "cuid2")
3701
- ks.test(e.data) || (o = this._getOrReturnCtx(e, o), E(o, {
3699
+ Os.test(e.data) || (o = this._getOrReturnCtx(e, o), x(o, {
3702
3700
  validation: "cuid2",
3703
3701
  code: N.invalid_string,
3704
3702
  message: r.message
3705
3703
  }), i.dirty());
3706
3704
  else if (r.kind === "ulid")
3707
- Os.test(e.data) || (o = this._getOrReturnCtx(e, o), E(o, {
3705
+ Ts.test(e.data) || (o = this._getOrReturnCtx(e, o), x(o, {
3708
3706
  validation: "ulid",
3709
3707
  code: N.invalid_string,
3710
3708
  message: r.message
@@ -3713,61 +3711,61 @@ class Ke extends B {
3713
3711
  try {
3714
3712
  new URL(e.data);
3715
3713
  } catch {
3716
- o = this._getOrReturnCtx(e, o), E(o, {
3714
+ o = this._getOrReturnCtx(e, o), x(o, {
3717
3715
  validation: "url",
3718
3716
  code: N.invalid_string,
3719
3717
  message: r.message
3720
3718
  }), i.dirty();
3721
3719
  }
3722
- else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (o = this._getOrReturnCtx(e, o), E(o, {
3720
+ else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (o = this._getOrReturnCtx(e, o), x(o, {
3723
3721
  validation: "regex",
3724
3722
  code: N.invalid_string,
3725
3723
  message: r.message
3726
- }), i.dirty())) : r.kind === "trim" ? e.data = e.data.trim() : r.kind === "includes" ? e.data.includes(r.value, r.position) || (o = this._getOrReturnCtx(e, o), E(o, {
3724
+ }), i.dirty())) : r.kind === "trim" ? e.data = e.data.trim() : r.kind === "includes" ? e.data.includes(r.value, r.position) || (o = this._getOrReturnCtx(e, o), x(o, {
3727
3725
  code: N.invalid_string,
3728
3726
  validation: { includes: r.value, position: r.position },
3729
3727
  message: r.message
3730
- }), i.dirty()) : r.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : r.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : r.kind === "startsWith" ? e.data.startsWith(r.value) || (o = this._getOrReturnCtx(e, o), E(o, {
3728
+ }), i.dirty()) : r.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : r.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : r.kind === "startsWith" ? e.data.startsWith(r.value) || (o = this._getOrReturnCtx(e, o), x(o, {
3731
3729
  code: N.invalid_string,
3732
3730
  validation: { startsWith: r.value },
3733
3731
  message: r.message
3734
- }), i.dirty()) : r.kind === "endsWith" ? e.data.endsWith(r.value) || (o = this._getOrReturnCtx(e, o), E(o, {
3732
+ }), i.dirty()) : r.kind === "endsWith" ? e.data.endsWith(r.value) || (o = this._getOrReturnCtx(e, o), x(o, {
3735
3733
  code: N.invalid_string,
3736
3734
  validation: { endsWith: r.value },
3737
3735
  message: r.message
3738
- }), i.dirty()) : r.kind === "datetime" ? pr(r).test(e.data) || (o = this._getOrReturnCtx(e, o), E(o, {
3736
+ }), i.dirty()) : r.kind === "datetime" ? pr(r).test(e.data) || (o = this._getOrReturnCtx(e, o), x(o, {
3739
3737
  code: N.invalid_string,
3740
3738
  validation: "datetime",
3741
3739
  message: r.message
3742
- }), i.dirty()) : r.kind === "date" ? qs.test(e.data) || (o = this._getOrReturnCtx(e, o), E(o, {
3740
+ }), i.dirty()) : r.kind === "date" ? Bs.test(e.data) || (o = this._getOrReturnCtx(e, o), x(o, {
3743
3741
  code: N.invalid_string,
3744
3742
  validation: "date",
3745
3743
  message: r.message
3746
- }), i.dirty()) : r.kind === "time" ? Bs(r).test(e.data) || (o = this._getOrReturnCtx(e, o), E(o, {
3744
+ }), i.dirty()) : r.kind === "time" ? js(r).test(e.data) || (o = this._getOrReturnCtx(e, o), x(o, {
3747
3745
  code: N.invalid_string,
3748
3746
  validation: "time",
3749
3747
  message: r.message
3750
- }), i.dirty()) : r.kind === "duration" ? Cs.test(e.data) || (o = this._getOrReturnCtx(e, o), E(o, {
3748
+ }), i.dirty()) : r.kind === "duration" ? Ds.test(e.data) || (o = this._getOrReturnCtx(e, o), x(o, {
3751
3749
  validation: "duration",
3752
3750
  code: N.invalid_string,
3753
3751
  message: r.message
3754
- }), i.dirty()) : r.kind === "ip" ? js(e.data, r.version) || (o = this._getOrReturnCtx(e, o), E(o, {
3752
+ }), i.dirty()) : r.kind === "ip" ? $s(e.data, r.version) || (o = this._getOrReturnCtx(e, o), x(o, {
3755
3753
  validation: "ip",
3756
3754
  code: N.invalid_string,
3757
3755
  message: r.message
3758
- }), i.dirty()) : r.kind === "jwt" ? $s(e.data, r.alg) || (o = this._getOrReturnCtx(e, o), E(o, {
3756
+ }), i.dirty()) : r.kind === "jwt" ? Vs(e.data, r.alg) || (o = this._getOrReturnCtx(e, o), x(o, {
3759
3757
  validation: "jwt",
3760
3758
  code: N.invalid_string,
3761
3759
  message: r.message
3762
- }), i.dirty()) : r.kind === "cidr" ? Vs(e.data, r.version) || (o = this._getOrReturnCtx(e, o), E(o, {
3760
+ }), i.dirty()) : r.kind === "cidr" ? Zs(e.data, r.version) || (o = this._getOrReturnCtx(e, o), x(o, {
3763
3761
  validation: "cidr",
3764
3762
  code: N.invalid_string,
3765
3763
  message: r.message
3766
- }), i.dirty()) : r.kind === "base64" ? Ps.test(e.data) || (o = this._getOrReturnCtx(e, o), E(o, {
3764
+ }), i.dirty()) : r.kind === "base64" ? Ms.test(e.data) || (o = this._getOrReturnCtx(e, o), x(o, {
3767
3765
  validation: "base64",
3768
3766
  code: N.invalid_string,
3769
3767
  message: r.message
3770
- }), i.dirty()) : r.kind === "base64url" ? Ms.test(e.data) || (o = this._getOrReturnCtx(e, o), E(o, {
3768
+ }), i.dirty()) : r.kind === "base64url" ? qs.test(e.data) || (o = this._getOrReturnCtx(e, o), x(o, {
3771
3769
  validation: "base64url",
3772
3770
  code: N.invalid_string,
3773
3771
  message: r.message
@@ -4002,7 +4000,7 @@ Ke.create = (n) => new Ke({
4002
4000
  coerce: (n == null ? void 0 : n.coerce) ?? !1,
4003
4001
  ...M(n)
4004
4002
  });
4005
- function Zs(n, e) {
4003
+ function Hs(n, e) {
4006
4004
  const t = (n.toString().split(".")[1] || "").length, i = (e.toString().split(".")[1] || "").length, o = t > i ? t : i, r = Number.parseInt(n.toFixed(o).replace(".", "")), l = Number.parseInt(e.toFixed(o).replace(".", ""));
4007
4005
  return r % l / 10 ** o;
4008
4006
  }
@@ -4013,7 +4011,7 @@ class vt extends B {
4013
4011
  _parse(e) {
4014
4012
  if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== O.number) {
4015
4013
  const r = this._getOrReturnCtx(e);
4016
- return E(r, {
4014
+ return x(r, {
4017
4015
  code: N.invalid_type,
4018
4016
  expected: O.number,
4019
4017
  received: r.parsedType
@@ -4022,30 +4020,30 @@ class vt extends B {
4022
4020
  let i;
4023
4021
  const o = new ke();
4024
4022
  for (const r of this._def.checks)
4025
- r.kind === "int" ? H.isInteger(e.data) || (i = this._getOrReturnCtx(e, i), E(i, {
4023
+ r.kind === "int" ? H.isInteger(e.data) || (i = this._getOrReturnCtx(e, i), x(i, {
4026
4024
  code: N.invalid_type,
4027
4025
  expected: "integer",
4028
4026
  received: "float",
4029
4027
  message: r.message
4030
- }), o.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (i = this._getOrReturnCtx(e, i), E(i, {
4028
+ }), o.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (i = this._getOrReturnCtx(e, i), x(i, {
4031
4029
  code: N.too_small,
4032
4030
  minimum: r.value,
4033
4031
  type: "number",
4034
4032
  inclusive: r.inclusive,
4035
4033
  exact: !1,
4036
4034
  message: r.message
4037
- }), o.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (i = this._getOrReturnCtx(e, i), E(i, {
4035
+ }), o.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (i = this._getOrReturnCtx(e, i), x(i, {
4038
4036
  code: N.too_big,
4039
4037
  maximum: r.value,
4040
4038
  type: "number",
4041
4039
  inclusive: r.inclusive,
4042
4040
  exact: !1,
4043
4041
  message: r.message
4044
- }), o.dirty()) : r.kind === "multipleOf" ? Zs(e.data, r.value) !== 0 && (i = this._getOrReturnCtx(e, i), E(i, {
4042
+ }), o.dirty()) : r.kind === "multipleOf" ? Hs(e.data, r.value) !== 0 && (i = this._getOrReturnCtx(e, i), x(i, {
4045
4043
  code: N.not_multiple_of,
4046
4044
  multipleOf: r.value,
4047
4045
  message: r.message
4048
- }), o.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (i = this._getOrReturnCtx(e, i), E(i, {
4046
+ }), o.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (i = this._getOrReturnCtx(e, i), x(i, {
4049
4047
  code: N.not_finite,
4050
4048
  message: r.message
4051
4049
  }), o.dirty()) : H.assertNever(r);
@@ -4194,19 +4192,19 @@ class xt extends B {
4194
4192
  let i;
4195
4193
  const o = new ke();
4196
4194
  for (const r of this._def.checks)
4197
- r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (i = this._getOrReturnCtx(e, i), E(i, {
4195
+ r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (i = this._getOrReturnCtx(e, i), x(i, {
4198
4196
  code: N.too_small,
4199
4197
  type: "bigint",
4200
4198
  minimum: r.value,
4201
4199
  inclusive: r.inclusive,
4202
4200
  message: r.message
4203
- }), o.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (i = this._getOrReturnCtx(e, i), E(i, {
4201
+ }), o.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (i = this._getOrReturnCtx(e, i), x(i, {
4204
4202
  code: N.too_big,
4205
4203
  type: "bigint",
4206
4204
  maximum: r.value,
4207
4205
  inclusive: r.inclusive,
4208
4206
  message: r.message
4209
- }), o.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (i = this._getOrReturnCtx(e, i), E(i, {
4207
+ }), o.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (i = this._getOrReturnCtx(e, i), x(i, {
4210
4208
  code: N.not_multiple_of,
4211
4209
  multipleOf: r.value,
4212
4210
  message: r.message
@@ -4215,7 +4213,7 @@ class xt extends B {
4215
4213
  }
4216
4214
  _getInvalidInput(e) {
4217
4215
  const t = this._getOrReturnCtx(e);
4218
- return E(t, {
4216
+ return x(t, {
4219
4217
  code: N.invalid_type,
4220
4218
  expected: O.bigint,
4221
4219
  received: t.parsedType
@@ -4315,7 +4313,7 @@ class _n extends B {
4315
4313
  _parse(e) {
4316
4314
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== O.boolean) {
4317
4315
  const i = this._getOrReturnCtx(e);
4318
- return E(i, {
4316
+ return x(i, {
4319
4317
  code: N.invalid_type,
4320
4318
  expected: O.boolean,
4321
4319
  received: i.parsedType
@@ -4333,7 +4331,7 @@ class Ft extends B {
4333
4331
  _parse(e) {
4334
4332
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== O.date) {
4335
4333
  const r = this._getOrReturnCtx(e);
4336
- return E(r, {
4334
+ return x(r, {
4337
4335
  code: N.invalid_type,
4338
4336
  expected: O.date,
4339
4337
  received: r.parsedType
@@ -4341,21 +4339,21 @@ class Ft extends B {
4341
4339
  }
4342
4340
  if (Number.isNaN(e.data.getTime())) {
4343
4341
  const r = this._getOrReturnCtx(e);
4344
- return E(r, {
4342
+ return x(r, {
4345
4343
  code: N.invalid_date
4346
4344
  }), R;
4347
4345
  }
4348
4346
  const i = new ke();
4349
4347
  let o;
4350
4348
  for (const r of this._def.checks)
4351
- r.kind === "min" ? e.data.getTime() < r.value && (o = this._getOrReturnCtx(e, o), E(o, {
4349
+ r.kind === "min" ? e.data.getTime() < r.value && (o = this._getOrReturnCtx(e, o), x(o, {
4352
4350
  code: N.too_small,
4353
4351
  message: r.message,
4354
4352
  inclusive: !0,
4355
4353
  exact: !1,
4356
4354
  minimum: r.value,
4357
4355
  type: "date"
4358
- }), i.dirty()) : r.kind === "max" ? e.data.getTime() > r.value && (o = this._getOrReturnCtx(e, o), E(o, {
4356
+ }), i.dirty()) : r.kind === "max" ? e.data.getTime() > r.value && (o = this._getOrReturnCtx(e, o), x(o, {
4359
4357
  code: N.too_big,
4360
4358
  message: r.message,
4361
4359
  inclusive: !0,
@@ -4411,7 +4409,7 @@ class ni extends B {
4411
4409
  _parse(e) {
4412
4410
  if (this._getType(e) !== O.symbol) {
4413
4411
  const i = this._getOrReturnCtx(e);
4414
- return E(i, {
4412
+ return x(i, {
4415
4413
  code: N.invalid_type,
4416
4414
  expected: O.symbol,
4417
4415
  received: i.parsedType
@@ -4428,7 +4426,7 @@ class un extends B {
4428
4426
  _parse(e) {
4429
4427
  if (this._getType(e) !== O.undefined) {
4430
4428
  const i = this._getOrReturnCtx(e);
4431
- return E(i, {
4429
+ return x(i, {
4432
4430
  code: N.invalid_type,
4433
4431
  expected: O.undefined,
4434
4432
  received: i.parsedType
@@ -4445,7 +4443,7 @@ class pn extends B {
4445
4443
  _parse(e) {
4446
4444
  if (this._getType(e) !== O.null) {
4447
4445
  const i = this._getOrReturnCtx(e);
4448
- return E(i, {
4446
+ return x(i, {
4449
4447
  code: N.invalid_type,
4450
4448
  expected: O.null,
4451
4449
  received: i.parsedType
@@ -4485,7 +4483,7 @@ fn.create = (n) => new fn({
4485
4483
  class it extends B {
4486
4484
  _parse(e) {
4487
4485
  const t = this._getOrReturnCtx(e);
4488
- return E(t, {
4486
+ return x(t, {
4489
4487
  code: N.invalid_type,
4490
4488
  expected: O.never,
4491
4489
  received: t.parsedType
@@ -4500,7 +4498,7 @@ class ii extends B {
4500
4498
  _parse(e) {
4501
4499
  if (this._getType(e) !== O.undefined) {
4502
4500
  const i = this._getOrReturnCtx(e);
4503
- return E(i, {
4501
+ return x(i, {
4504
4502
  code: N.invalid_type,
4505
4503
  expected: O.void,
4506
4504
  received: i.parsedType
@@ -4517,14 +4515,14 @@ class Ze extends B {
4517
4515
  _parse(e) {
4518
4516
  const { ctx: t, status: i } = this._processInputParams(e), o = this._def;
4519
4517
  if (t.parsedType !== O.array)
4520
- return E(t, {
4518
+ return x(t, {
4521
4519
  code: N.invalid_type,
4522
4520
  expected: O.array,
4523
4521
  received: t.parsedType
4524
4522
  }), R;
4525
4523
  if (o.exactLength !== null) {
4526
4524
  const l = t.data.length > o.exactLength.value, d = t.data.length < o.exactLength.value;
4527
- (l || d) && (E(t, {
4525
+ (l || d) && (x(t, {
4528
4526
  code: l ? N.too_big : N.too_small,
4529
4527
  minimum: d ? o.exactLength.value : void 0,
4530
4528
  maximum: l ? o.exactLength.value : void 0,
@@ -4534,14 +4532,14 @@ class Ze extends B {
4534
4532
  message: o.exactLength.message
4535
4533
  }), i.dirty());
4536
4534
  }
4537
- if (o.minLength !== null && t.data.length < o.minLength.value && (E(t, {
4535
+ if (o.minLength !== null && t.data.length < o.minLength.value && (x(t, {
4538
4536
  code: N.too_small,
4539
4537
  minimum: o.minLength.value,
4540
4538
  type: "array",
4541
4539
  inclusive: !0,
4542
4540
  exact: !1,
4543
4541
  message: o.minLength.message
4544
- }), i.dirty()), o.maxLength !== null && t.data.length > o.maxLength.value && (E(t, {
4542
+ }), i.dirty()), o.maxLength !== null && t.data.length > o.maxLength.value && (x(t, {
4545
4543
  code: N.too_big,
4546
4544
  maximum: o.maxLength.value,
4547
4545
  type: "array",
@@ -4615,7 +4613,7 @@ class le extends B {
4615
4613
  _parse(e) {
4616
4614
  if (this._getType(e) !== O.object) {
4617
4615
  const f = this._getOrReturnCtx(e);
4618
- return E(f, {
4616
+ return x(f, {
4619
4617
  code: N.invalid_type,
4620
4618
  expected: O.object,
4621
4619
  received: f.parsedType
@@ -4643,7 +4641,7 @@ class le extends B {
4643
4641
  value: { status: "valid", value: o.data[p] }
4644
4642
  });
4645
4643
  else if (f === "strict")
4646
- d.length > 0 && (E(o, {
4644
+ d.length > 0 && (x(o, {
4647
4645
  code: N.unrecognized_keys,
4648
4646
  keys: d
4649
4647
  }), i.dirty());
@@ -4901,7 +4899,7 @@ class Mt extends B {
4901
4899
  if (d.result.status === "dirty")
4902
4900
  return t.common.issues.push(...d.ctx.common.issues), d.result;
4903
4901
  const l = r.map((d) => new Ge(d.ctx.common.issues));
4904
- return E(t, {
4902
+ return x(t, {
4905
4903
  code: N.invalid_union,
4906
4904
  unionErrors: l
4907
4905
  }), R;
@@ -4948,7 +4946,7 @@ class Mt extends B {
4948
4946
  if (r)
4949
4947
  return t.common.issues.push(...r.ctx.common.issues), r.result;
4950
4948
  const d = l.map((u) => new Ge(u));
4951
- return E(t, {
4949
+ return x(t, {
4952
4950
  code: N.invalid_union,
4953
4951
  unionErrors: d
4954
4952
  }), R;
@@ -4968,7 +4966,7 @@ class yn extends B {
4968
4966
  _parse(e) {
4969
4967
  const { ctx: t } = this._processInputParams(e);
4970
4968
  if (t.parsedType !== O.object)
4971
- return E(t, {
4969
+ return x(t, {
4972
4970
  code: N.invalid_type,
4973
4971
  expected: O.object,
4974
4972
  received: t.parsedType
@@ -4982,7 +4980,7 @@ class yn extends B {
4982
4980
  data: t.data,
4983
4981
  path: t.path,
4984
4982
  parent: t
4985
- }) : (E(t, {
4983
+ }) : (x(t, {
4986
4984
  code: N.invalid_union_discriminator,
4987
4985
  options: Array.from(this.optionsMap.keys()),
4988
4986
  path: [i]
@@ -5058,7 +5056,7 @@ class qt extends B {
5058
5056
  if (ei(r) || ei(l))
5059
5057
  return R;
5060
5058
  const d = oi(r.value, l.value);
5061
- return d.valid ? ((ti(r) || ti(l)) && t.dirty(), { status: t.value, value: d.data }) : (E(i, {
5059
+ return d.valid ? ((ti(r) || ti(l)) && t.dirty(), { status: t.value, value: d.data }) : (x(i, {
5062
5060
  code: N.invalid_intersection_types
5063
5061
  }), R);
5064
5062
  };
@@ -5094,20 +5092,20 @@ class lt extends B {
5094
5092
  _parse(e) {
5095
5093
  const { status: t, ctx: i } = this._processInputParams(e);
5096
5094
  if (i.parsedType !== O.array)
5097
- return E(i, {
5095
+ return x(i, {
5098
5096
  code: N.invalid_type,
5099
5097
  expected: O.array,
5100
5098
  received: i.parsedType
5101
5099
  }), R;
5102
5100
  if (i.data.length < this._def.items.length)
5103
- return E(i, {
5101
+ return x(i, {
5104
5102
  code: N.too_small,
5105
5103
  minimum: this._def.items.length,
5106
5104
  inclusive: !0,
5107
5105
  exact: !1,
5108
5106
  type: "array"
5109
5107
  }), R;
5110
- !this._def.rest && i.data.length > this._def.items.length && (E(i, {
5108
+ !this._def.rest && i.data.length > this._def.items.length && (x(i, {
5111
5109
  code: N.too_big,
5112
5110
  maximum: this._def.items.length,
5113
5111
  inclusive: !0,
@@ -5150,7 +5148,7 @@ class Bt extends B {
5150
5148
  _parse(e) {
5151
5149
  const { status: t, ctx: i } = this._processInputParams(e);
5152
5150
  if (i.parsedType !== O.object)
5153
- return E(i, {
5151
+ return x(i, {
5154
5152
  code: N.invalid_type,
5155
5153
  expected: O.object,
5156
5154
  received: i.parsedType
@@ -5191,7 +5189,7 @@ class ai extends B {
5191
5189
  _parse(e) {
5192
5190
  const { status: t, ctx: i } = this._processInputParams(e);
5193
5191
  if (i.parsedType !== O.map)
5194
- return E(i, {
5192
+ return x(i, {
5195
5193
  code: N.invalid_type,
5196
5194
  expected: O.map,
5197
5195
  received: i.parsedType
@@ -5233,20 +5231,20 @@ class kt extends B {
5233
5231
  _parse(e) {
5234
5232
  const { status: t, ctx: i } = this._processInputParams(e);
5235
5233
  if (i.parsedType !== O.set)
5236
- return E(i, {
5234
+ return x(i, {
5237
5235
  code: N.invalid_type,
5238
5236
  expected: O.set,
5239
5237
  received: i.parsedType
5240
5238
  }), R;
5241
5239
  const o = this._def;
5242
- o.minSize !== null && i.data.size < o.minSize.value && (E(i, {
5240
+ o.minSize !== null && i.data.size < o.minSize.value && (x(i, {
5243
5241
  code: N.too_small,
5244
5242
  minimum: o.minSize.value,
5245
5243
  type: "set",
5246
5244
  inclusive: !0,
5247
5245
  exact: !1,
5248
5246
  message: o.minSize.message
5249
- }), t.dirty()), o.maxSize !== null && i.data.size > o.maxSize.value && (E(i, {
5247
+ }), t.dirty()), o.maxSize !== null && i.data.size > o.maxSize.value && (x(i, {
5250
5248
  code: N.too_big,
5251
5249
  maximum: o.maxSize.value,
5252
5250
  type: "set",
@@ -5311,7 +5309,7 @@ class jt extends B {
5311
5309
  _parse(e) {
5312
5310
  if (e.data !== this._def.value) {
5313
5311
  const t = this._getOrReturnCtx(e);
5314
- return E(t, {
5312
+ return x(t, {
5315
5313
  received: t.data,
5316
5314
  code: N.invalid_literal,
5317
5315
  expected: this._def.value
@@ -5339,7 +5337,7 @@ class dt extends B {
5339
5337
  _parse(e) {
5340
5338
  if (typeof e.data != "string") {
5341
5339
  const t = this._getOrReturnCtx(e), i = this._def.values;
5342
- return E(t, {
5340
+ return x(t, {
5343
5341
  expected: H.joinValues(i),
5344
5342
  received: t.parsedType,
5345
5343
  code: N.invalid_type
@@ -5347,7 +5345,7 @@ class dt extends B {
5347
5345
  }
5348
5346
  if (this._cache || (this._cache = new Set(this._def.values)), !this._cache.has(e.data)) {
5349
5347
  const t = this._getOrReturnCtx(e), i = this._def.values;
5350
- return E(t, {
5348
+ return x(t, {
5351
5349
  received: t.data,
5352
5350
  code: N.invalid_enum_value,
5353
5351
  options: i
@@ -5395,7 +5393,7 @@ class $t extends B {
5395
5393
  const t = H.getValidEnumValues(this._def.values), i = this._getOrReturnCtx(e);
5396
5394
  if (i.parsedType !== O.string && i.parsedType !== O.number) {
5397
5395
  const o = H.objectValues(t);
5398
- return E(i, {
5396
+ return x(i, {
5399
5397
  expected: H.joinValues(o),
5400
5398
  received: i.parsedType,
5401
5399
  code: N.invalid_type
@@ -5403,7 +5401,7 @@ class $t extends B {
5403
5401
  }
5404
5402
  if (this._cache || (this._cache = new Set(H.getValidEnumValues(this._def.values))), !this._cache.has(e.data)) {
5405
5403
  const o = H.objectValues(t);
5406
- return E(i, {
5404
+ return x(i, {
5407
5405
  received: i.data,
5408
5406
  code: N.invalid_enum_value,
5409
5407
  options: o
@@ -5427,7 +5425,7 @@ class Vt extends B {
5427
5425
  _parse(e) {
5428
5426
  const { ctx: t } = this._processInputParams(e);
5429
5427
  if (t.parsedType !== O.promise && t.common.async === !1)
5430
- return E(t, {
5428
+ return x(t, {
5431
5429
  code: N.invalid_type,
5432
5430
  expected: O.promise,
5433
5431
  received: t.parsedType
@@ -5454,7 +5452,7 @@ class We extends B {
5454
5452
  _parse(e) {
5455
5453
  const { status: t, ctx: i } = this._processInputParams(e), o = this._def.effect || null, r = {
5456
5454
  addIssue: (l) => {
5457
- E(i, l), l.fatal ? t.abort() : t.dirty();
5455
+ x(i, l), l.fatal ? t.abort() : t.dirty();
5458
5456
  },
5459
5457
  get path() {
5460
5458
  return i.path;
@@ -5629,7 +5627,7 @@ class ri extends B {
5629
5627
  _parse(e) {
5630
5628
  if (this._getType(e) !== O.nan) {
5631
5629
  const i = this._getOrReturnCtx(e);
5632
- return E(i, {
5630
+ return x(i, {
5633
5631
  code: N.invalid_type,
5634
5632
  expected: O.nan,
5635
5633
  received: i.parsedType
@@ -5721,11 +5719,11 @@ it.create;
5721
5719
  const S = Ze.create, _ = le.create, Me = Mt.create, Ot = yn.create;
5722
5720
  qt.create;
5723
5721
  lt.create;
5724
- const P = Bt.create, T = jt.create, x = dt.create, mt = $t.create;
5722
+ const P = Bt.create, T = jt.create, E = dt.create, mt = $t.create;
5725
5723
  Vt.create;
5726
5724
  Je.create;
5727
5725
  ct.create;
5728
- const hr = We.createWithPreprocess, Hs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5726
+ const hr = We.createWithPreprocess, Ks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5729
5727
  __proto__: null,
5730
5728
  DIRTY: bt,
5731
5729
  INVALID: R,
@@ -5776,7 +5774,7 @@ const hr = We.createWithPreprocess, Hs = /* @__PURE__ */ Object.freeze(/* @__PUR
5776
5774
  ZodUnion: Mt,
5777
5775
  ZodUnknown: fn,
5778
5776
  ZodVoid: ii,
5779
- addIssueToContext: E,
5777
+ addIssueToContext: x,
5780
5778
  any: Z,
5781
5779
  array: S,
5782
5780
  boolean: h,
@@ -5784,7 +5782,7 @@ const hr = We.createWithPreprocess, Hs = /* @__PURE__ */ Object.freeze(/* @__PUR
5784
5782
  datetimeRegex: pr,
5785
5783
  defaultErrorMap: cn,
5786
5784
  discriminatedUnion: Ot,
5787
- enum: x,
5785
+ enum: E,
5788
5786
  getErrorMap: dr,
5789
5787
  getParsedType: et,
5790
5788
  isAborted: ei,
@@ -5808,7 +5806,7 @@ const hr = We.createWithPreprocess, Hs = /* @__PURE__ */ Object.freeze(/* @__PUR
5808
5806
  return H;
5809
5807
  }
5810
5808
  }, Symbol.toStringTag, { value: "Module" }));
5811
- bs(Hs);
5809
+ Es(Ks);
5812
5810
  const qe = _({
5813
5811
  created_at: a(),
5814
5812
  updated_at: a()
@@ -5832,13 +5830,13 @@ const qe = _({
5832
5830
  secrets: S(yr).optional()
5833
5831
  });
5834
5832
  vr.partial().extend({
5835
- status: x(["draft", "built"]).optional(),
5833
+ status: E(["draft", "built"]).optional(),
5836
5834
  deployed_at: a().optional()
5837
5835
  });
5838
5836
  vr.extend({
5839
5837
  id: a(),
5840
5838
  tenant_id: a(),
5841
- status: x(["draft", "built"]).default("built"),
5839
+ status: E(["draft", "built"]).default("built"),
5842
5840
  deployed_at: a().optional(),
5843
5841
  // Override secrets to return names only (no values) in responses
5844
5842
  secrets: S(
@@ -5849,7 +5847,7 @@ vr.extend({
5849
5847
  ).optional(),
5850
5848
  ...qe.shape
5851
5849
  });
5852
- const Ks = _({
5850
+ const Js = _({
5853
5851
  action_id: a(),
5854
5852
  code: a().max(1e5),
5855
5853
  runtime: a().max(50).optional(),
@@ -5858,32 +5856,32 @@ const Ks = _({
5858
5856
  supported_triggers: S(gr).optional(),
5859
5857
  deployed: h().default(!0)
5860
5858
  });
5861
- Ks.extend({
5859
+ Js.extend({
5862
5860
  id: a(),
5863
5861
  tenant_id: a(),
5864
5862
  number: k().int(),
5865
5863
  ...qe.shape
5866
5864
  });
5867
- const Js = x([
5865
+ const Gs = E([
5868
5866
  "user_action",
5869
5867
  "admin_action",
5870
5868
  "system",
5871
5869
  "api"
5872
- ]), Gs = _({
5873
- type: x(["user", "admin", "system", "api_key", "client_credentials"]),
5870
+ ]), Qs = _({
5871
+ type: E(["user", "admin", "system", "api_key", "client_credentials"]),
5874
5872
  id: a().optional(),
5875
5873
  email: a().optional(),
5876
5874
  org_id: a().optional(),
5877
5875
  org_name: a().optional(),
5878
5876
  scopes: S(a()).optional(),
5879
5877
  client_id: a().optional()
5880
- }), Qs = _({
5878
+ }), Ws = _({
5881
5879
  type: a(),
5882
5880
  id: a(),
5883
5881
  before: P(Ve()).optional(),
5884
5882
  after: P(Ve()).optional(),
5885
5883
  diff: P(_({ old: Ve(), new: Ve() })).optional()
5886
- }), Ws = _({
5884
+ }), Xs = _({
5887
5885
  method: a(),
5888
5886
  path: a(),
5889
5887
  query: P(a()).optional(),
@@ -5891,61 +5889,61 @@ const Js = x([
5891
5889
  ip: a(),
5892
5890
  user_agent: a().optional(),
5893
5891
  correlation_id: a().optional()
5894
- }), Xs = _({
5892
+ }), Ys = _({
5895
5893
  status_code: k(),
5896
5894
  body: Ve().optional()
5897
- }), Ys = _({
5895
+ }), el = _({
5898
5896
  country_code: a(),
5899
5897
  city_name: a(),
5900
5898
  latitude: a(),
5901
5899
  longitude: a(),
5902
5900
  time_zone: a(),
5903
5901
  continent_code: a()
5904
- }), el = _({
5902
+ }), tl = _({
5905
5903
  name: a(),
5906
5904
  version: a(),
5907
5905
  env: P(a()).optional()
5908
- }), tl = _({
5906
+ }), nl = _({
5909
5907
  tenant_id: a(),
5910
5908
  event_type: a(),
5911
5909
  log_type: a(),
5912
5910
  description: a().optional(),
5913
- category: Js,
5914
- actor: Gs,
5915
- target: Qs,
5916
- request: Ws,
5917
- response: Xs.optional(),
5911
+ category: Gs,
5912
+ actor: Qs,
5913
+ target: Ws,
5914
+ request: Xs,
5915
+ response: Ys.optional(),
5918
5916
  connection: a().optional(),
5919
5917
  strategy: a().optional(),
5920
5918
  strategy_type: a().optional(),
5921
5919
  audience: a().optional(),
5922
5920
  scope: a().optional(),
5923
- location: Ys.optional(),
5924
- auth0_client: el.optional(),
5921
+ location: el.optional(),
5922
+ auth0_client: tl.optional(),
5925
5923
  hostname: a(),
5926
5924
  is_mobile: h().optional(),
5927
5925
  timestamp: a()
5928
5926
  });
5929
- tl.extend({
5927
+ nl.extend({
5930
5928
  id: a()
5931
5929
  });
5932
- x(["AUTH0", "EMAIL", "REDIRECT"]);
5933
- x([
5930
+ E(["AUTH0", "EMAIL", "REDIRECT"]);
5931
+ E([
5934
5932
  "CREATE_USER",
5935
5933
  "GET_USER",
5936
5934
  "UPDATE_USER",
5937
5935
  "SEND_REQUEST",
5938
5936
  "SEND_EMAIL"
5939
5937
  ]);
5940
- x(["VERIFY_EMAIL"]);
5941
- const nl = _({
5938
+ E(["VERIFY_EMAIL"]);
5939
+ const il = _({
5942
5940
  require_mx_record: h().optional(),
5943
5941
  block_aliases: h().optional(),
5944
5942
  block_free_emails: h().optional(),
5945
5943
  block_disposable_emails: h().optional(),
5946
5944
  blocklist: S(a()).optional(),
5947
5945
  allowlist: S(a()).optional()
5948
- }), il = _({
5946
+ }), ol = _({
5949
5947
  id: a(),
5950
5948
  alias: a().max(100).optional(),
5951
5949
  type: T("AUTH0"),
@@ -5957,7 +5955,7 @@ const nl = _({
5957
5955
  user_id: a(),
5958
5956
  changes: P(a(), Z())
5959
5957
  })
5960
- }), ol = _({
5958
+ }), al = _({
5961
5959
  id: a(),
5962
5960
  alias: a().max(100).optional(),
5963
5961
  type: T("EMAIL"),
@@ -5966,9 +5964,9 @@ const nl = _({
5966
5964
  mask_output: h().optional(),
5967
5965
  params: _({
5968
5966
  email: a(),
5969
- rules: nl.optional()
5967
+ rules: il.optional()
5970
5968
  })
5971
- }), al = x(["change-email", "account", "custom"]), rl = _({
5969
+ }), rl = E(["change-email", "account", "custom"]), sl = _({
5972
5970
  id: a(),
5973
5971
  alias: a().max(100).optional(),
5974
5972
  type: T("REDIRECT"),
@@ -5976,27 +5974,27 @@ const nl = _({
5976
5974
  allow_failure: h().optional(),
5977
5975
  mask_output: h().optional(),
5978
5976
  params: _({
5979
- target: al.openapi({
5977
+ target: rl.openapi({
5980
5978
  description: "The predefined target to redirect to, or 'custom' for a custom URL"
5981
5979
  }),
5982
5980
  custom_url: a().optional().openapi({
5983
5981
  description: "Custom URL to redirect to when target is 'custom'"
5984
5982
  })
5985
5983
  })
5986
- }), sl = Me([
5987
- il,
5984
+ }), ll = Me([
5988
5985
  ol,
5989
- rl
5990
- ]), ll = _({
5986
+ al,
5987
+ sl
5988
+ ]), dl = _({
5991
5989
  name: a().min(1).max(150).openapi({
5992
5990
  description: "The name of the flow"
5993
5991
  }),
5994
5992
  // Actions is an array of action steps (Auth0 stores as JSON blob)
5995
- actions: S(sl).optional().default([]).openapi({
5993
+ actions: S(ll).optional().default([]).openapi({
5996
5994
  description: "The list of actions to execute in sequence"
5997
5995
  })
5998
5996
  });
5999
- ll.extend({
5997
+ dl.extend({
6000
5998
  ...qe.shape,
6001
5999
  id: a().openapi({
6002
6000
  description: "Unique identifier for the flow",
@@ -6026,7 +6024,7 @@ _({
6026
6024
  length: k(),
6027
6025
  total: k().optional()
6028
6026
  });
6029
- const dl = _({
6027
+ const cl = _({
6030
6028
  email: a().optional(),
6031
6029
  email_verified: h().optional(),
6032
6030
  name: a().optional(),
@@ -6035,7 +6033,7 @@ const dl = _({
6035
6033
  phone_number: a().optional(),
6036
6034
  phone_verified: h().optional(),
6037
6035
  family_name: a().optional()
6038
- }).catchall(Z()), cl = _({
6036
+ }).catchall(Z()), _l = _({
6039
6037
  connection: a(),
6040
6038
  user_id: a(),
6041
6039
  provider: a(),
@@ -6048,8 +6046,8 @@ const dl = _({
6048
6046
  access_token: a().optional(),
6049
6047
  access_token_secret: a().optional(),
6050
6048
  refresh_token: a().optional(),
6051
- profileData: dl.optional()
6052
- }), _l = _({
6049
+ profileData: cl.optional()
6050
+ }), ul = _({
6053
6051
  formatted: a().optional(),
6054
6052
  // Full mailing address
6055
6053
  street_address: a().optional(),
@@ -6094,8 +6092,8 @@ const dl = _({
6094
6092
  zoneinfo: a().optional(),
6095
6093
  // e.g., "Europe/Paris"
6096
6094
  // OIDC address claim (OIDC Core 5.1.1)
6097
- address: _l
6098
- }), ul = wr.extend({
6095
+ address: ul
6096
+ }), pl = wr.extend({
6099
6097
  email_verified: h().default(!1),
6100
6098
  verify_email: h().optional(),
6101
6099
  last_ip: a().optional(),
@@ -6118,17 +6116,17 @@ const dl = _({
6118
6116
  hash: a(),
6119
6117
  algorithm: a()
6120
6118
  }).optional()
6121
- }), pl = _({
6122
- ...ul.omit({ password: !0 }).shape,
6119
+ }), fl = _({
6120
+ ...pl.omit({ password: !0 }).shape,
6123
6121
  ...qe.shape,
6124
6122
  user_id: a(),
6125
6123
  provider: a(),
6126
6124
  is_social: h(),
6127
6125
  email: a().optional(),
6128
6126
  login_count: k().default(0),
6129
- identities: S(cl).optional()
6127
+ identities: S(_l).optional()
6130
6128
  });
6131
- pl.omit({
6129
+ fl.omit({
6132
6130
  registration_completed_at: !0
6133
6131
  });
6134
6132
  wr.extend({
@@ -6138,13 +6136,13 @@ wr.extend({
6138
6136
  last_login: a().optional(),
6139
6137
  user_id: a()
6140
6138
  }).catchall(Z());
6141
- let fl = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", hl = (n = 21) => {
6139
+ let hl = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", gl = (n = 21) => {
6142
6140
  let e = "", t = crypto.getRandomValues(new Uint8Array(n |= 0));
6143
6141
  for (; n--; )
6144
- e += fl[t[n] & 63];
6142
+ e += hl[t[n] & 63];
6145
6143
  return e;
6146
6144
  };
6147
- const gl = _({
6145
+ const ml = _({
6148
6146
  client_id: a().optional().openapi({
6149
6147
  description: "ID of this client. Generated server-side if omitted (Auth0 behavior)."
6150
6148
  }),
@@ -6157,10 +6155,10 @@ const gl = _({
6157
6155
  global: h().default(!1).openapi({
6158
6156
  description: "Whether this is your global 'All Applications' client representing legacy tenant settings (true) or a regular client (false)."
6159
6157
  }),
6160
- client_secret: a().default(() => hl()).optional().openapi({
6158
+ client_secret: a().default(() => gl()).optional().openapi({
6161
6159
  description: "Client secret (which you must not make public)."
6162
6160
  }),
6163
- app_type: x([
6161
+ app_type: E([
6164
6162
  "native",
6165
6163
  "spa",
6166
6164
  "regular_web",
@@ -6267,7 +6265,7 @@ const gl = _({
6267
6265
  addons: P(Z()).default({}).optional().openapi({
6268
6266
  description: "Addons enabled for this client and their associated configurations."
6269
6267
  }),
6270
- token_endpoint_auth_method: x([
6268
+ token_endpoint_auth_method: E([
6271
6269
  "none",
6272
6270
  "client_secret_post",
6273
6271
  "client_secret_basic",
@@ -6287,7 +6285,7 @@ const gl = _({
6287
6285
  }),
6288
6286
  native_social_login: P(Z()).default({}).optional(),
6289
6287
  refresh_token: _({
6290
- rotation_type: x(["rotating", "non-rotating"]).optional().openapi({
6288
+ rotation_type: E(["rotating", "non-rotating"]).optional().openapi({
6291
6289
  description: "Whether refresh tokens for this client are rotated on every exchange (Auth0 'rotating' behavior) or kept stable (legacy non-rotating). Defaults to 'non-rotating' when unset."
6292
6290
  }),
6293
6291
  leeway: k().int().min(0).max(600).optional().openapi({
@@ -6298,7 +6296,7 @@ const gl = _({
6298
6296
  // without tripping dts-bundle-generator's handling of zod's
6299
6297
  // `objectInputType`. Not yet honored by the engine — added so values
6300
6298
  // round-trip cleanly when migrating tenants from Auth0.
6301
- expiration_type: x(["expiring", "non-expiring"]).optional().openapi({
6299
+ expiration_type: E(["expiring", "non-expiring"]).optional().openapi({
6302
6300
  description: "Auth0-compatible: whether refresh tokens expire."
6303
6301
  }),
6304
6302
  token_lifetime: k().int().min(0).optional().openapi({
@@ -6319,10 +6317,10 @@ const gl = _({
6319
6317
  default_organization: P(Z()).default({}).optional().openapi({
6320
6318
  description: "Defines the default Organization ID and flows"
6321
6319
  }),
6322
- organization_usage: x(["deny", "allow", "require"]).default("deny").optional().openapi({
6320
+ organization_usage: E(["deny", "allow", "require"]).default("deny").optional().openapi({
6323
6321
  description: "Defines how to proceed during an authentication transaction with regards an organization. Can be deny (default), allow or require."
6324
6322
  }),
6325
- organization_require_behavior: x(["no_prompt", "pre_login_prompt", "post_login_prompt"]).default("no_prompt").optional().openapi({
6323
+ organization_require_behavior: E(["no_prompt", "pre_login_prompt", "post_login_prompt"]).default("no_prompt").optional().openapi({
6326
6324
  description: "Defines how to proceed during an authentication transaction when client.organization_usage: 'require'. Can be no_prompt (default), pre_login_prompt or post_login_prompt. post_login_prompt requires oidc_conformant: true."
6327
6325
  }),
6328
6326
  client_authentication_methods: P(Z()).default({}).optional().openapi({
@@ -6337,7 +6335,7 @@ const gl = _({
6337
6335
  signed_request_object: P(Z()).default({}).optional().openapi({
6338
6336
  description: "JWT-secured Authorization Requests (JAR) settings."
6339
6337
  }),
6340
- compliance_level: x([
6338
+ compliance_level: E([
6341
6339
  "none",
6342
6340
  "fapi1_adv_pkj_par",
6343
6341
  "fapi1_adv_mtls_par",
@@ -6353,25 +6351,25 @@ const gl = _({
6353
6351
  owner_user_id: a().optional().openapi({
6354
6352
  description: "User ID of the consenting user when this client was created via IAT-gated Dynamic Client Registration. NULL for clients created via the Management API or open DCR."
6355
6353
  }),
6356
- registration_type: x(["manual", "open_dcr", "iat_dcr"]).optional().openapi({
6354
+ registration_type: E(["manual", "open_dcr", "iat_dcr"]).optional().openapi({
6357
6355
  description: "Provenance of this client. `manual` = Management API; `open_dcr` = RFC 7591 without IAT; `iat_dcr` = RFC 7591 with an Initial Access Token."
6358
6356
  }),
6359
6357
  registration_metadata: P(Z()).default({}).optional().openapi({
6360
6358
  description: "Arbitrary metadata captured at Dynamic Client Registration time that isn't a first-class client field (e.g. integration_type, domain). Also stores `iat_constraints` for clients created via IAT so RFC 7592 PUT can enforce field immutability."
6361
6359
  }),
6362
- user_linking_mode: x(["builtin", "off"]).optional().openapi({
6360
+ user_linking_mode: E(["builtin", "off"]).optional().openapi({
6363
6361
  description: "Per-client override for the built-in email-based user-linking path. `builtin` runs the legacy in-process linking at user creation/email update. `off` disables the legacy path; linking only happens if the tenant has enabled the `account-linking` template hook. When unset, the service-level `userLinkingMode` default applies."
6364
6362
  })
6365
6363
  });
6366
6364
  _({
6367
6365
  created_at: a(),
6368
6366
  updated_at: a(),
6369
- ...gl.shape,
6367
+ ...ml.shape,
6370
6368
  // Insert allows omitting (server-generated to match Auth0). The read schema
6371
6369
  // always has it — the row in storage is non-null.
6372
6370
  client_id: a()
6373
6371
  });
6374
- const ml = _({
6372
+ const yl = _({
6375
6373
  client_id: a().min(1).openapi({
6376
6374
  description: "ID of the client."
6377
6375
  }),
@@ -6381,7 +6379,7 @@ const ml = _({
6381
6379
  scope: S(a()).optional().openapi({
6382
6380
  description: "Scopes allowed for this client grant."
6383
6381
  }),
6384
- organization_usage: x(["deny", "allow", "require"]).optional().openapi({
6382
+ organization_usage: E(["deny", "allow", "require"]).optional().openapi({
6385
6383
  description: "Defines whether organizations can be used with client credentials exchanges for this grant."
6386
6384
  }),
6387
6385
  allow_any_organization: h().optional().openapi({
@@ -6390,22 +6388,22 @@ const ml = _({
6390
6388
  is_system: h().optional().openapi({
6391
6389
  description: "If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly."
6392
6390
  }),
6393
- subject_type: x(["client", "user"]).optional().openapi({
6391
+ subject_type: E(["client", "user"]).optional().openapi({
6394
6392
  description: "The type of application access the client grant allows. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement."
6395
6393
  }),
6396
6394
  authorization_details_types: S(a()).optional().openapi({
6397
6395
  description: "Types of authorization_details allowed for this client grant. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement."
6398
6396
  })
6399
- }), yl = _({
6397
+ }), vl = _({
6400
6398
  id: a().openapi({
6401
6399
  description: "ID of the client grant."
6402
6400
  }),
6403
- ...ml.shape,
6401
+ ...yl.shape,
6404
6402
  created_at: a().optional(),
6405
6403
  updated_at: a().optional()
6406
6404
  });
6407
- S(yl);
6408
- const Nr = x(["iat", "rat"]), vl = _({
6405
+ S(vl);
6406
+ const Nr = E(["iat", "rat"]), wl = _({
6409
6407
  id: a(),
6410
6408
  token_hash: a(),
6411
6409
  type: Nr,
@@ -6419,7 +6417,7 @@ _({
6419
6417
  created_at: a(),
6420
6418
  used_at: a().optional(),
6421
6419
  revoked_at: a().optional(),
6422
- ...vl.shape
6420
+ ...wl.shape
6423
6421
  });
6424
6422
  const Tt = _({
6425
6423
  x: k(),
@@ -6430,7 +6428,7 @@ const wn = _({
6430
6428
  id: a(),
6431
6429
  category: mt(br),
6432
6430
  type: mt(Sr)
6433
- }), wl = wn.extend({
6431
+ }), Nl = wn.extend({
6434
6432
  category: T(
6435
6433
  "BLOCK"
6436
6434
  /* BLOCK */
@@ -6442,7 +6440,7 @@ const wn = _({
6442
6440
  config: _({
6443
6441
  content: a()
6444
6442
  }).passthrough()
6445
- }), Nl = wn.extend({
6443
+ }), Sl = wn.extend({
6446
6444
  category: T(
6447
6445
  "BLOCK"
6448
6446
  /* BLOCK */
@@ -6464,7 +6462,7 @@ const wn = _({
6464
6462
  config: _({
6465
6463
  text: a()
6466
6464
  }).passthrough()
6467
- }), Sl = wn.extend({
6465
+ }), bl = wn.extend({
6468
6466
  category: T(
6469
6467
  "FIELD"
6470
6468
  /* FIELD */
@@ -6478,7 +6476,7 @@ const wn = _({
6478
6476
  config: _({
6479
6477
  text: a()
6480
6478
  }).passthrough()
6481
- }), bl = wn.extend({
6479
+ }), El = wn.extend({
6482
6480
  category: T(
6483
6481
  "FIELD"
6484
6482
  /* FIELD */
@@ -6531,17 +6529,17 @@ const wn = _({
6531
6529
  label: a().optional(),
6532
6530
  placeholder: a().optional()
6533
6531
  }).passthrough()
6534
- }), El = _({
6532
+ }), xl = _({
6535
6533
  id: a(),
6536
6534
  category: a(),
6537
6535
  type: a()
6538
- }).passthrough(), xl = Me([
6539
- wl,
6536
+ }).passthrough(), kl = Me([
6540
6537
  Nl,
6541
6538
  Sl,
6542
6539
  bl,
6543
- El
6544
- ]), kl = _({
6540
+ El,
6541
+ xl
6542
+ ]), Ol = _({
6545
6543
  id: a(),
6546
6544
  type: T(
6547
6545
  "STEP"
@@ -6550,10 +6548,10 @@ const wn = _({
6550
6548
  coordinates: Tt,
6551
6549
  alias: a().optional(),
6552
6550
  config: _({
6553
- components: S(xl),
6551
+ components: S(kl),
6554
6552
  next_node: a()
6555
6553
  }).passthrough()
6556
- }), Ol = _({
6554
+ }), Tl = _({
6557
6555
  id: a(),
6558
6556
  type: T(
6559
6557
  "FLOW"
@@ -6565,7 +6563,7 @@ const wn = _({
6565
6563
  flow_id: a(),
6566
6564
  next_node: a()
6567
6565
  })
6568
- }), Tl = _({
6566
+ }), Al = _({
6569
6567
  id: a(),
6570
6568
  type: T(
6571
6569
  "ACTION"
@@ -6574,10 +6572,10 @@ const wn = _({
6574
6572
  coordinates: Tt,
6575
6573
  alias: a().optional(),
6576
6574
  config: _({
6577
- action_type: x(["REDIRECT"]).openapi({
6575
+ action_type: E(["REDIRECT"]).openapi({
6578
6576
  description: "The type of action to perform"
6579
6577
  }),
6580
- target: x(["change-email", "account", "custom"]).openapi({
6578
+ target: E(["change-email", "account", "custom"]).openapi({
6581
6579
  description: "The predefined target to redirect to"
6582
6580
  }),
6583
6581
  custom_url: a().optional().openapi({
@@ -6587,30 +6585,30 @@ const wn = _({
6587
6585
  description: "The next node to navigate to after action (for non-redirect actions)"
6588
6586
  })
6589
6587
  }).passthrough()
6590
- }), Al = _({
6588
+ }), Il = _({
6591
6589
  id: a(),
6592
6590
  type: a(),
6593
6591
  coordinates: Tt
6594
- }).passthrough(), Il = Me([
6595
- kl,
6592
+ }).passthrough(), Cl = Me([
6596
6593
  Ol,
6597
6594
  Tl,
6598
- Al
6599
- ]), Cl = _({
6595
+ Al,
6596
+ Il
6597
+ ]), Dl = _({
6600
6598
  next_node: a(),
6601
6599
  coordinates: Tt
6602
- }).passthrough(), Dl = _({
6600
+ }).passthrough(), Ll = _({
6603
6601
  resume_flow: h().optional(),
6604
6602
  coordinates: Tt
6605
- }).passthrough(), Ll = _({
6603
+ }).passthrough(), Rl = _({
6606
6604
  id: a(),
6607
6605
  name: a(),
6608
6606
  languages: _({
6609
6607
  primary: a()
6610
6608
  }).passthrough(),
6611
- nodes: S(Il),
6612
- start: Cl,
6613
- ending: Dl,
6609
+ nodes: S(Cl),
6610
+ start: Dl,
6611
+ ending: Ll,
6614
6612
  created_at: a(),
6615
6613
  updated_at: a(),
6616
6614
  links: _({
@@ -6618,13 +6616,13 @@ const wn = _({
6618
6616
  sdk_src: a().optional()
6619
6617
  }).passthrough()
6620
6618
  }).passthrough();
6621
- Ll.omit({
6619
+ Rl.omit({
6622
6620
  id: !0,
6623
6621
  created_at: !0,
6624
6622
  updated_at: !0
6625
6623
  });
6626
- var Er = /* @__PURE__ */ ((n) => (n.TOKEN = "token", n.ID_TOKEN = "id_token", n.TOKEN_ID_TOKEN = "id_token token", n.CODE = "code", n))(Er || {}), xr = /* @__PURE__ */ ((n) => (n.QUERY = "query", n.FRAGMENT = "fragment", n.FORM_POST = "form_post", n.WEB_MESSAGE = "web_message", n.SAML_POST = "saml_post", n))(xr || {}), kr = /* @__PURE__ */ ((n) => (n.S256 = "S256", n.Plain = "plain", n))(kr || {});
6627
- const Rl = _({
6624
+ var Er = /* @__PURE__ */ ((n) => (n.TOKEN = "token", n.ID_TOKEN = "id_token", n.TOKEN_ID_TOKEN = "id_token token", n.CODE = "code", n.CODE_ID_TOKEN = "code id_token", n.CODE_TOKEN = "code token", n.CODE_ID_TOKEN_TOKEN = "code id_token token", n))(Er || {}), xr = /* @__PURE__ */ ((n) => (n.QUERY = "query", n.FRAGMENT = "fragment", n.FORM_POST = "form_post", n.WEB_MESSAGE = "web_message", n.SAML_POST = "saml_post", n))(xr || {}), kr = /* @__PURE__ */ ((n) => (n.S256 = "S256", n.Plain = "plain", n))(kr || {});
6625
+ const Ul = _({
6628
6626
  client_id: a(),
6629
6627
  act_as: a().optional(),
6630
6628
  response_type: mt(Er).optional(),
@@ -6669,9 +6667,13 @@ _({
6669
6667
  powered_by_logo_url: a().optional(),
6670
6668
  font: _({
6671
6669
  url: a()
6672
- }).optional()
6670
+ }).optional(),
6671
+ // AuthHero-specific: default color scheme for the universal login page.
6672
+ // Auth0 has no equivalent. Per-user toggle (ah-dark-mode cookie) still
6673
+ // overrides this at runtime.
6674
+ dark_mode: E(["dark", "light", "auto"]).optional()
6673
6675
  });
6674
- const Ul = x([
6676
+ const zl = E([
6675
6677
  "password_reset",
6676
6678
  "email_verification",
6677
6679
  "otp",
@@ -6679,7 +6681,7 @@ const Ul = x([
6679
6681
  "authorization_code",
6680
6682
  "oauth2_state",
6681
6683
  "ticket"
6682
- ]), zl = _({
6684
+ ]), Fl = _({
6683
6685
  code_id: a().openapi({
6684
6686
  description: "The code that will be used in for instance an email verification flow"
6685
6687
  }),
@@ -6689,14 +6691,14 @@ const Ul = x([
6689
6691
  connection_id: a().optional().openapi({
6690
6692
  description: "The connection that the code is connected to"
6691
6693
  }),
6692
- code_type: Ul,
6694
+ code_type: zl,
6693
6695
  code_verifier: a().optional().openapi({
6694
6696
  description: "The code verifier used in PKCE in outbound flows"
6695
6697
  }),
6696
6698
  code_challenge: a().optional().openapi({
6697
6699
  description: "The code challenge used in PKCE in outbound flows"
6698
6700
  }),
6699
- code_challenge_method: x(["plain", "S256"]).optional().openapi({
6701
+ code_challenge_method: E(["plain", "S256"]).optional().openapi({
6700
6702
  description: "The code challenge method used in PKCE in outbound flows"
6701
6703
  }),
6702
6704
  redirect_uri: a().optional().openapi({
@@ -6716,10 +6718,10 @@ const Ul = x([
6716
6718
  user_id: a().optional()
6717
6719
  });
6718
6720
  _({
6719
- ...zl.shape,
6721
+ ...Fl.shape,
6720
6722
  created_at: a()
6721
6723
  });
6722
- const Fl = _({
6724
+ const Pl = _({
6723
6725
  kid: a().optional(),
6724
6726
  team_id: a().optional(),
6725
6727
  realms: a().optional(),
@@ -6748,7 +6750,7 @@ const Fl = _({
6748
6750
  // the upstream IdP.
6749
6751
  callback_url: a().url().optional(),
6750
6752
  // Password policy options for Username-Password-Authentication connections
6751
- passwordPolicy: x(["none", "low", "fair", "good", "excellent"]).optional(),
6753
+ passwordPolicy: E(["none", "low", "fair", "good", "excellent"]).optional(),
6752
6754
  password_complexity_options: _({
6753
6755
  min_length: k().optional()
6754
6756
  }).optional(),
@@ -6776,7 +6778,7 @@ const Fl = _({
6776
6778
  active: h().optional()
6777
6779
  }).optional(),
6778
6780
  signup: _({
6779
- status: x(["required", "optional", "disabled"]).optional(),
6781
+ status: E(["required", "optional", "disabled"]).optional(),
6780
6782
  verification: _({
6781
6783
  active: h().optional()
6782
6784
  }).optional()
@@ -6786,14 +6788,14 @@ const Fl = _({
6786
6788
  }).optional(),
6787
6789
  unique: h().optional(),
6788
6790
  profile_required: h().optional(),
6789
- verification_method: x(["link", "code"]).optional()
6791
+ verification_method: E(["link", "code"]).optional()
6790
6792
  }).optional(),
6791
6793
  username: _({
6792
6794
  identifier: _({
6793
6795
  active: h().optional()
6794
6796
  }).optional(),
6795
6797
  signup: _({
6796
- status: x(["required", "optional", "disabled"]).optional()
6798
+ status: E(["required", "optional", "disabled"]).optional()
6797
6799
  }).optional(),
6798
6800
  validation: _({
6799
6801
  max_length: k().optional(),
@@ -6810,7 +6812,7 @@ const Fl = _({
6810
6812
  active: h().optional()
6811
6813
  }).optional(),
6812
6814
  signup: _({
6813
- status: x(["required", "optional", "disabled"]).optional()
6815
+ status: E(["required", "optional", "disabled"]).optional()
6814
6816
  }).optional()
6815
6817
  }).optional()
6816
6818
  }).optional(),
@@ -6825,7 +6827,7 @@ const Fl = _({
6825
6827
  }).optional(),
6826
6828
  // Passkey options for Username-Password-Authentication connections
6827
6829
  passkey_options: _({
6828
- challenge_ui: x(["both", "autofill", "button"]).optional(),
6830
+ challenge_ui: E(["both", "autofill", "button"]).optional(),
6829
6831
  local_enrollment_enabled: h().optional(),
6830
6832
  progressive_enrollment_enabled: h().optional()
6831
6833
  }).optional(),
@@ -6838,7 +6840,7 @@ const Fl = _({
6838
6840
  }).optional()
6839
6841
  }).optional(),
6840
6842
  // Controls when root user attributes are updated from external IdP
6841
- set_user_root_attributes: x(["on_each_login", "on_first_login", "never_on_login"]).optional()
6843
+ set_user_root_attributes: E(["on_each_login", "on_first_login", "never_on_login"]).optional()
6842
6844
  });
6843
6845
  function li(n) {
6844
6846
  if (n !== null) {
@@ -6853,14 +6855,14 @@ function li(n) {
6853
6855
  return n;
6854
6856
  }
6855
6857
  }
6856
- const Pl = _({
6858
+ const Ml = _({
6857
6859
  id: a().optional(),
6858
6860
  name: a(),
6859
6861
  display_name: a().optional(),
6860
6862
  strategy: a(),
6861
6863
  options: hr(
6862
6864
  (n) => n === null ? {} : li(n),
6863
- Fl
6865
+ Pl
6864
6866
  ).default({}),
6865
6867
  enabled_clients: S(a()).default([]).optional(),
6866
6868
  response_type: si().optional(),
@@ -6874,14 +6876,14 @@ _({
6874
6876
  id: a(),
6875
6877
  created_at: a().transform((n) => n === null ? "" : n),
6876
6878
  updated_at: a().transform((n) => n === null ? "" : n)
6877
- }).extend(Pl.shape);
6878
- const Ml = _({
6879
+ }).extend(Ml.shape);
6880
+ const ql = _({
6879
6881
  domain: a(),
6880
6882
  custom_domain_id: a().optional(),
6881
- type: x(["auth0_managed_certs", "self_managed_certs"]),
6882
- verification_method: x(["txt"]).optional(),
6883
- tls_policy: x(["recommended"]).optional(),
6884
- custom_client_ip_header: x([
6883
+ type: E(["auth0_managed_certs", "self_managed_certs"]),
6884
+ verification_method: E(["txt"]).optional(),
6885
+ tls_policy: E(["recommended"]).optional(),
6886
+ custom_client_ip_header: E([
6885
6887
  "true-client-ip",
6886
6888
  "cf-connecting-ip",
6887
6889
  "x-forwarded-for",
@@ -6889,7 +6891,7 @@ const Ml = _({
6889
6891
  "null"
6890
6892
  ]).optional(),
6891
6893
  domain_metadata: P(a().max(255)).optional()
6892
- }), ql = Ot("name", [
6894
+ }), Bl = Ot("name", [
6893
6895
  _({
6894
6896
  name: T("txt"),
6895
6897
  record: a(),
@@ -6900,18 +6902,18 @@ const Ml = _({
6900
6902
  http_body: a(),
6901
6903
  http_url: a()
6902
6904
  })
6903
- ]), Bl = _({
6904
- ...Ml.shape,
6905
+ ]), jl = _({
6906
+ ...ql.shape,
6905
6907
  custom_domain_id: a(),
6906
6908
  primary: h(),
6907
- status: x(["disabled", "pending", "pending_verification", "ready"]),
6909
+ status: E(["disabled", "pending", "pending_verification", "ready"]),
6908
6910
  origin_domain_name: a().optional(),
6909
6911
  verification: _({
6910
- methods: S(ql)
6912
+ methods: S(Bl)
6911
6913
  }).optional(),
6912
6914
  tls_policy: a().optional()
6913
6915
  });
6914
- Bl.extend({
6916
+ jl.extend({
6915
6917
  tenant_id: a()
6916
6918
  });
6917
6919
  const Ni = _({
@@ -6920,17 +6922,17 @@ const Ni = _({
6920
6922
  visible: h().optional().default(!0)
6921
6923
  }), _t = Ni.extend({
6922
6924
  category: T("BLOCK").optional()
6923
- }), jl = _t.extend({
6925
+ }), $l = _t.extend({
6924
6926
  type: T("DIVIDER"),
6925
6927
  config: _({
6926
6928
  text: a().optional()
6927
6929
  }).optional()
6928
- }), $l = _t.extend({
6930
+ }), Vl = _t.extend({
6929
6931
  type: T("HTML"),
6930
6932
  config: _({
6931
6933
  content: a().optional()
6932
6934
  }).optional()
6933
- }), Vl = _t.extend({
6935
+ }), Zl = _t.extend({
6934
6936
  type: T("IMAGE"),
6935
6937
  config: _({
6936
6938
  src: a().optional(),
@@ -6938,29 +6940,29 @@ const Ni = _({
6938
6940
  width: k().optional(),
6939
6941
  height: k().optional()
6940
6942
  }).optional()
6941
- }), Zl = _t.extend({
6943
+ }), Hl = _t.extend({
6942
6944
  type: T("JUMP_BUTTON"),
6943
6945
  config: _({
6944
6946
  text: a().optional(),
6945
6947
  target_step: a().optional()
6946
6948
  })
6947
- }), Hl = _t.extend({
6949
+ }), Kl = _t.extend({
6948
6950
  type: T("RESEND_BUTTON"),
6949
6951
  config: _({
6950
6952
  text: a().optional(),
6951
6953
  resend_action: a().optional()
6952
6954
  })
6953
- }), Kl = _t.extend({
6955
+ }), Jl = _t.extend({
6954
6956
  type: T("NEXT_BUTTON"),
6955
6957
  config: _({
6956
6958
  text: a().optional()
6957
6959
  })
6958
- }), Jl = _t.extend({
6960
+ }), Gl = _t.extend({
6959
6961
  type: T("PREVIOUS_BUTTON"),
6960
6962
  config: _({
6961
6963
  text: a().optional()
6962
6964
  })
6963
- }), Gl = _t.extend({
6965
+ }), Ql = _t.extend({
6964
6966
  type: T("RICH_TEXT"),
6965
6967
  config: _({
6966
6968
  content: a().optional()
@@ -6971,17 +6973,17 @@ const Ni = _({
6971
6973
  hint: a().min(1).max(500).optional(),
6972
6974
  required: h().optional(),
6973
6975
  sensitive: h().optional()
6974
- }), Ql = Si.extend({
6976
+ }), Wl = Si.extend({
6975
6977
  type: T("AUTH0_VERIFIABLE_CREDENTIALS"),
6976
6978
  config: _({
6977
6979
  credential_type: a().optional()
6978
6980
  })
6979
- }), Wl = Si.extend({
6981
+ }), Xl = Si.extend({
6980
6982
  type: T("GMAPS_ADDRESS"),
6981
6983
  config: _({
6982
6984
  api_key: a().optional()
6983
6985
  })
6984
- }), Xl = Si.extend({
6986
+ }), Yl = Si.extend({
6985
6987
  type: T("RECAPTCHA"),
6986
6988
  config: _({
6987
6989
  site_key: a().optional()
@@ -6994,17 +6996,17 @@ const Ni = _({
6994
6996
  _({
6995
6997
  id: k().optional(),
6996
6998
  text: a(),
6997
- type: x(["info", "error", "success", "warning"])
6999
+ type: E(["info", "error", "success", "warning"])
6998
7000
  })
6999
7001
  ).optional(),
7000
7002
  required: h().optional(),
7001
7003
  sensitive: h().optional()
7002
- }), Yl = Se.extend({
7004
+ }), ed = Se.extend({
7003
7005
  type: T("BOOLEAN"),
7004
7006
  config: _({
7005
7007
  default_value: h().optional()
7006
7008
  }).optional()
7007
- }), ed = Se.extend({
7009
+ }), td = Se.extend({
7008
7010
  type: T("CARDS"),
7009
7011
  config: _({
7010
7012
  options: S(
@@ -7017,7 +7019,7 @@ const Ni = _({
7017
7019
  ).optional(),
7018
7020
  multi_select: h().optional()
7019
7021
  }).optional()
7020
- }), td = Se.extend({
7022
+ }), nd = Se.extend({
7021
7023
  type: T("CHOICE"),
7022
7024
  config: _({
7023
7025
  options: S(
@@ -7026,11 +7028,11 @@ const Ni = _({
7026
7028
  label: a()
7027
7029
  })
7028
7030
  ).optional(),
7029
- display: x(["radio", "checkbox"]).optional(),
7031
+ display: E(["radio", "checkbox"]).optional(),
7030
7032
  multiple: h().optional(),
7031
7033
  default_value: Me([a(), S(a())]).optional()
7032
7034
  }).optional()
7033
- }), nd = Se.extend({
7035
+ }), id = Se.extend({
7034
7036
  type: T("CUSTOM"),
7035
7037
  config: _({
7036
7038
  component: a().optional(),
@@ -7038,7 +7040,7 @@ const Ni = _({
7038
7040
  schema: P(Z()).optional(),
7039
7041
  code: a().optional()
7040
7042
  })
7041
- }), id = Se.extend({
7043
+ }), od = Se.extend({
7042
7044
  type: T("DATE"),
7043
7045
  config: _({
7044
7046
  format: a().optional(),
@@ -7046,7 +7048,7 @@ const Ni = _({
7046
7048
  max: a().optional(),
7047
7049
  default_value: a().optional()
7048
7050
  }).optional()
7049
- }), od = Se.extend({
7051
+ }), ad = Se.extend({
7050
7052
  type: T("DROPDOWN"),
7051
7053
  config: _({
7052
7054
  options: S(
@@ -7060,26 +7062,26 @@ const Ni = _({
7060
7062
  multiple: h().optional(),
7061
7063
  default_value: Me([a(), S(a())]).optional()
7062
7064
  }).optional()
7063
- }), ad = Se.extend({
7065
+ }), rd = Se.extend({
7064
7066
  type: T("EMAIL"),
7065
7067
  config: _({
7066
7068
  placeholder: a().optional(),
7067
7069
  default_value: a().optional()
7068
7070
  }).optional()
7069
- }), rd = Se.extend({
7071
+ }), sd = Se.extend({
7070
7072
  type: T("FILE"),
7071
7073
  config: _({
7072
7074
  accept: a().optional(),
7073
7075
  max_size: k().optional(),
7074
7076
  multiple: h().optional()
7075
7077
  }).optional()
7076
- }), sd = Se.extend({
7078
+ }), ld = Se.extend({
7077
7079
  type: T("LEGAL"),
7078
7080
  config: _({
7079
7081
  text: a(),
7080
7082
  html: h().optional()
7081
7083
  }).optional()
7082
- }), ld = Se.extend({
7084
+ }), dd = Se.extend({
7083
7085
  type: T("NUMBER"),
7084
7086
  config: _({
7085
7087
  placeholder: a().optional(),
@@ -7088,7 +7090,7 @@ const Ni = _({
7088
7090
  step: k().optional(),
7089
7091
  default_value: a().optional()
7090
7092
  }).optional()
7091
- }), dd = Se.extend({
7093
+ }), cd = Se.extend({
7092
7094
  type: T("PASSWORD"),
7093
7095
  config: _({
7094
7096
  placeholder: a().optional(),
@@ -7097,13 +7099,13 @@ const Ni = _({
7097
7099
  forgot_password_link: a().optional(),
7098
7100
  default_value: a().optional()
7099
7101
  }).optional()
7100
- }), cd = Se.extend({
7102
+ }), _d = Se.extend({
7101
7103
  type: T("PAYMENT"),
7102
7104
  config: _({
7103
7105
  provider: a().optional(),
7104
7106
  currency: a().optional()
7105
7107
  }).optional()
7106
- }), _d = Se.extend({
7108
+ }), ud = Se.extend({
7107
7109
  type: T("SOCIAL"),
7108
7110
  config: _({
7109
7111
  providers: S(a()).optional(),
@@ -7118,7 +7120,7 @@ const Ni = _({
7118
7120
  })
7119
7121
  ).optional()
7120
7122
  }).optional()
7121
- }), ud = Se.extend({
7123
+ }), pd = Se.extend({
7122
7124
  type: T("TEL"),
7123
7125
  config: _({
7124
7126
  placeholder: a().optional(),
@@ -7126,7 +7128,7 @@ const Ni = _({
7126
7128
  default_value: a().optional(),
7127
7129
  allow_email: h().optional()
7128
7130
  }).optional()
7129
- }), pd = Se.extend({
7131
+ }), fd = Se.extend({
7130
7132
  type: T("TEXT"),
7131
7133
  config: _({
7132
7134
  placeholder: a().optional(),
@@ -7134,37 +7136,36 @@ const Ni = _({
7134
7136
  max_length: k().optional(),
7135
7137
  default_value: a().optional()
7136
7138
  }).optional()
7137
- }), fd = Se.extend({
7139
+ }), hd = Se.extend({
7138
7140
  type: T("COUNTRY"),
7139
7141
  config: _({
7140
7142
  placeholder: a().optional(),
7141
7143
  default_value: a().optional()
7142
7144
  }).optional()
7143
- }), hd = Se.extend({
7145
+ }), gd = Se.extend({
7144
7146
  type: T("URL"),
7145
7147
  config: _({
7146
7148
  placeholder: a().optional(),
7147
7149
  default_value: a().optional()
7148
7150
  }).optional()
7149
- }), gd = Ot("type", [
7150
- jl,
7151
+ }), md = Ot("type", [
7151
7152
  $l,
7152
7153
  Vl,
7153
7154
  Zl,
7154
7155
  Hl,
7155
7156
  Kl,
7156
7157
  Jl,
7157
- Gl
7158
- ]), md = Ot("type", [
7159
- Ql,
7160
- Wl,
7161
- Xl
7158
+ Gl,
7159
+ Ql
7162
7160
  ]), yd = Ot("type", [
7163
- Yl,
7161
+ Wl,
7162
+ Xl,
7163
+ Yl
7164
+ ]), vd = Ot("type", [
7164
7165
  ed,
7165
7166
  td,
7166
- fd,
7167
7167
  nd,
7168
+ hd,
7168
7169
  id,
7169
7170
  od,
7170
7171
  ad,
@@ -7176,11 +7177,12 @@ const Ni = _({
7176
7177
  _d,
7177
7178
  ud,
7178
7179
  pd,
7179
- hd
7180
+ fd,
7181
+ gd
7180
7182
  ]), Or = Me([
7181
- gd,
7182
7183
  md,
7183
- yd
7184
+ yd,
7185
+ vd
7184
7186
  ]);
7185
7187
  _({
7186
7188
  id: a(),
@@ -7195,7 +7197,7 @@ _({
7195
7197
  const Jt = _({
7196
7198
  x: k(),
7197
7199
  y: k()
7198
- }), vd = _({
7200
+ }), wd = _({
7199
7201
  id: a(),
7200
7202
  type: T("FLOW"),
7201
7203
  coordinates: Jt,
@@ -7204,7 +7206,7 @@ const Jt = _({
7204
7206
  flow_id: a().max(30),
7205
7207
  next_node: a().optional()
7206
7208
  })
7207
- }), wd = _({
7209
+ }), Nd = _({
7208
7210
  id: a(),
7209
7211
  type: T("ROUTER"),
7210
7212
  coordinates: Jt,
@@ -7220,7 +7222,7 @@ const Jt = _({
7220
7222
  ),
7221
7223
  fallback: a()
7222
7224
  })
7223
- }), Nd = _({
7225
+ }), Sd = _({
7224
7226
  id: a(),
7225
7227
  type: T("STEP"),
7226
7228
  coordinates: Jt,
@@ -7229,11 +7231,11 @@ const Jt = _({
7229
7231
  components: S(Or),
7230
7232
  next_node: a().optional()
7231
7233
  })
7232
- }), Sd = Ot("type", [
7233
- vd,
7234
+ }), bd = Ot("type", [
7234
7235
  wd,
7235
- Nd
7236
- ]), bd = _({
7236
+ Nd,
7237
+ Sd
7238
+ ]), Ed = _({
7237
7239
  name: a().openapi({
7238
7240
  description: "The name of the form"
7239
7241
  }),
@@ -7246,7 +7248,7 @@ const Jt = _({
7246
7248
  default: a().optional()
7247
7249
  }).optional(),
7248
7250
  translations: P(a(), Z()).optional(),
7249
- nodes: S(Sd).optional(),
7251
+ nodes: S(bd).optional(),
7250
7252
  start: _({
7251
7253
  hidden_fields: S(_({ key: a(), value: a() })).optional(),
7252
7254
  next_node: a().optional(),
@@ -7271,14 +7273,14 @@ const Jt = _({
7271
7273
  });
7272
7274
  _({
7273
7275
  ...qe.shape,
7274
- ...bd.shape,
7276
+ ...Ed.shape,
7275
7277
  id: a()
7276
7278
  });
7277
- const Ed = _({
7279
+ const xd = _({
7278
7280
  id: k().optional(),
7279
7281
  text: a(),
7280
- type: x(["info", "error", "success", "warning"])
7281
- }), xd = _({
7282
+ type: E(["info", "error", "success", "warning"])
7283
+ }), kd = _({
7282
7284
  id: a().optional(),
7283
7285
  text: a(),
7284
7286
  href: a(),
@@ -7288,16 +7290,16 @@ _({
7288
7290
  /** Screen identifier for CSS targeting (e.g., 'identifier', 'enter-password', 'signup') */
7289
7291
  name: a().optional(),
7290
7292
  action: a(),
7291
- method: x(["POST", "GET"]),
7293
+ method: E(["POST", "GET"]),
7292
7294
  title: a().optional(),
7293
7295
  description: a().optional(),
7294
7296
  components: S(Or),
7295
- messages: S(Ed).optional(),
7296
- links: S(xd).optional(),
7297
+ messages: S(xd).optional(),
7298
+ links: S(kd).optional(),
7297
7299
  /** Footer HTML content displayed at the very bottom of the widget (e.g., terms and conditions) */
7298
7300
  footer: a().optional()
7299
7301
  });
7300
- const Tr = x([
7302
+ const Tr = E([
7301
7303
  "pre-user-registration",
7302
7304
  "post-user-registration",
7303
7305
  "post-user-login",
@@ -7306,24 +7308,24 @@ const Tr = x([
7306
7308
  "pre-user-deletion",
7307
7309
  "post-user-deletion"
7308
7310
  // Potentially other triggers specific to webhooks in the future
7309
- ]), Ar = x([
7311
+ ]), Ar = E([
7310
7312
  "pre-user-registration",
7311
7313
  "post-user-registration",
7312
7314
  "post-user-login",
7313
7315
  "validate-registration-username",
7314
7316
  "pre-user-deletion",
7315
7317
  "post-user-deletion"
7316
- ]), Ir = x([
7318
+ ]), Ir = E([
7317
7319
  "post-user-login",
7318
7320
  "post-user-registration",
7319
7321
  "post-user-update",
7320
7322
  "credentials-exchange"
7321
- ]), Cr = x([
7323
+ ]), Cr = E([
7322
7324
  "post-user-login",
7323
7325
  "credentials-exchange",
7324
7326
  "pre-user-registration",
7325
7327
  "post-user-registration"
7326
- ]), Dr = x([
7328
+ ]), Dr = E([
7327
7329
  "ensure-username",
7328
7330
  "set-preferred-username",
7329
7331
  "account-linking"
@@ -7344,48 +7346,48 @@ const Tr = x([
7344
7346
  * Everything else is opaque to the runtime. Persisted as JSON.
7345
7347
  */
7346
7348
  metadata: P(Ve()).optional()
7347
- }, kd = _({
7349
+ }, Od = _({
7348
7350
  ...ut,
7349
7351
  trigger_id: Tr,
7350
7352
  url: a()
7351
- }), Od = _({
7353
+ }), Td = _({
7352
7354
  ...ut,
7353
7355
  trigger_id: Ar,
7354
7356
  form_id: a()
7355
- }), Td = _({
7357
+ }), Ad = _({
7356
7358
  ...ut,
7357
7359
  trigger_id: Ir,
7358
7360
  template_id: Dr
7359
- }), Ad = _({
7361
+ }), Id = _({
7360
7362
  ...ut,
7361
7363
  trigger_id: Cr,
7362
7364
  code_id: a()
7363
7365
  });
7364
7366
  Me([
7365
- kd,
7366
7367
  Od,
7367
7368
  Td,
7368
- Ad
7369
+ Ad,
7370
+ Id
7369
7371
  ]);
7370
- const Id = _({
7372
+ const Cd = _({
7371
7373
  ...ut,
7372
7374
  trigger_id: Tr,
7373
7375
  ...qe.shape,
7374
7376
  hook_id: a(),
7375
7377
  url: a()
7376
- }), Cd = _({
7378
+ }), Dd = _({
7377
7379
  ...ut,
7378
7380
  trigger_id: Ar,
7379
7381
  ...qe.shape,
7380
7382
  hook_id: a(),
7381
7383
  form_id: a()
7382
- }), Dd = _({
7384
+ }), Ld = _({
7383
7385
  ...ut,
7384
7386
  trigger_id: Ir,
7385
7387
  ...qe.shape,
7386
7388
  hook_id: a(),
7387
7389
  template_id: Dr
7388
- }), Ld = _({
7390
+ }), Rd = _({
7389
7391
  ...ut,
7390
7392
  trigger_id: Cr,
7391
7393
  ...qe.shape,
@@ -7393,28 +7395,28 @@ const Id = _({
7393
7395
  code_id: a()
7394
7396
  });
7395
7397
  Me([
7396
- Id,
7397
7398
  Cd,
7398
7399
  Dd,
7399
- Ld
7400
+ Ld,
7401
+ Rd
7400
7402
  ]);
7401
- const Rd = _({
7403
+ const Ud = _({
7402
7404
  code: a().max(1e5),
7403
7405
  secrets: P(a()).optional()
7404
7406
  });
7405
- Rd.extend({
7407
+ Ud.extend({
7406
7408
  id: a(),
7407
7409
  tenant_id: a(),
7408
7410
  ...qe.shape
7409
7411
  });
7410
- const Ud = _({
7412
+ const zd = _({
7411
7413
  name: a().optional()
7412
- }), zd = _({
7413
- email: a().optional()
7414
7414
  }), Fd = _({
7415
+ email: a().optional()
7416
+ }), Pd = _({
7415
7417
  organization_id: a().max(50),
7416
- inviter: Ud,
7417
- invitee: zd,
7418
+ inviter: zd,
7419
+ invitee: Fd,
7418
7420
  invitation_url: a().url(),
7419
7421
  client_id: a(),
7420
7422
  connection_id: a().optional(),
@@ -7430,9 +7432,9 @@ _({
7430
7432
  created_at: a().datetime(),
7431
7433
  expires_at: a().datetime(),
7432
7434
  ticket_id: a().optional()
7433
- }).extend(Fd.shape);
7434
- const Pd = _({
7435
- alg: x([
7435
+ }).extend(Pd.shape);
7436
+ const Md = _({
7437
+ alg: E([
7436
7438
  "RS256",
7437
7439
  "RS384",
7438
7440
  "RS512",
@@ -7444,8 +7446,8 @@ const Pd = _({
7444
7446
  "HS512"
7445
7447
  ]),
7446
7448
  kid: a(),
7447
- kty: x(["RSA", "EC", "oct"]),
7448
- use: x(["sig", "enc"]).optional(),
7449
+ kty: E(["RSA", "EC", "oct"]),
7450
+ use: E(["sig", "enc"]).optional(),
7449
7451
  // RSA-specific public-key members (RFC 7518 §6.3.1).
7450
7452
  n: a().optional(),
7451
7453
  e: a().optional(),
@@ -7472,7 +7474,7 @@ const Pd = _({
7472
7474
  });
7473
7475
  });
7474
7476
  _({
7475
- keys: S(Pd)
7477
+ keys: S(Md)
7476
7478
  });
7477
7479
  _({
7478
7480
  issuer: a(),
@@ -7498,20 +7500,20 @@ _({
7498
7500
  token_endpoint_auth_signing_alg_values_supported: S(a())
7499
7501
  });
7500
7502
  var Lr = /* @__PURE__ */ ((n) => (n.PENDING = "pending", n.AUTHENTICATED = "authenticated", n.AWAITING_EMAIL_VERIFICATION = "awaiting_email_verification", n.AWAITING_MFA = "awaiting_mfa", n.AWAITING_HOOK = "awaiting_hook", n.AWAITING_CONTINUATION = "awaiting_continuation", n.COMPLETED = "completed", n.FAILED = "failed", n.EXPIRED = "expired", n))(Lr || {});
7501
- const Md = mt(Lr), qd = _({
7503
+ const qd = mt(Lr), Bd = _({
7502
7504
  strategy: a(),
7503
7505
  strategy_type: a()
7504
- }), Bd = _({
7506
+ }), jd = _({
7505
7507
  csrf_token: a(),
7506
7508
  auth0Client: a().optional(),
7507
- authParams: Rl,
7509
+ authParams: Ul,
7508
7510
  expires_at: a(),
7509
7511
  deleted_at: a().optional(),
7510
7512
  ip: a().optional(),
7511
7513
  useragent: a().optional(),
7512
7514
  session_id: a().optional(),
7513
7515
  authorization_url: a().optional(),
7514
- state: Md.optional().default(
7516
+ state: qd.optional().default(
7515
7517
  "pending"
7516
7518
  /* PENDING */
7517
7519
  ),
@@ -7522,21 +7524,21 @@ const Md = mt(Lr), qd = _({
7522
7524
  // Set once user is authenticated
7523
7525
  auth_connection: a().optional(),
7524
7526
  // The connection used to authenticate (may differ from primary user's connection)
7525
- auth_strategy: qd.optional(),
7527
+ auth_strategy: Bd.optional(),
7526
7528
  authenticated_at: a().optional()
7527
7529
  // ISO timestamp persisted for audit/metadata; not used to reject resumed sessions
7528
7530
  }).openapi({
7529
7531
  description: "This represents a login sesion"
7530
7532
  });
7531
7533
  _({
7532
- ...Bd.shape,
7534
+ ...jd.shape,
7533
7535
  id: a().openapi({
7534
7536
  description: "This is is used as the state in the universal login"
7535
7537
  }),
7536
7538
  created_at: a(),
7537
7539
  updated_at: a()
7538
7540
  });
7539
- const jd = {
7541
+ const $d = {
7540
7542
  // Network & System
7541
7543
  ACLS_SUMMARY: "acls_summary",
7542
7544
  ACTIONS_EXECUTION_FAILED: "actions_execution_failed",
@@ -7710,24 +7712,24 @@ const jd = {
7710
7712
  WARNING_DURING_LOGIN: "w",
7711
7713
  WARNING_SENDING_NOTIFICATION: "wn",
7712
7714
  WARNING_USER_MANAGEMENT: "wum"
7713
- }, $d = a().refine(
7714
- (n) => Object.values(jd).includes(n),
7715
+ }, Vd = a().refine(
7716
+ (n) => Object.values($d).includes(n),
7715
7717
  { message: "Invalid log type" }
7716
- ), Vd = _({
7718
+ ), Zd = _({
7717
7719
  name: a(),
7718
7720
  version: a(),
7719
7721
  env: _({
7720
7722
  node: a().optional()
7721
7723
  }).optional()
7722
- }), Zd = _({
7724
+ }), Hd = _({
7723
7725
  country_code: a().length(2),
7724
7726
  city_name: a(),
7725
7727
  latitude: a(),
7726
7728
  longitude: a(),
7727
7729
  time_zone: a(),
7728
7730
  continent_code: a()
7729
- }), Hd = _({
7730
- type: $d,
7731
+ }), Kd = _({
7732
+ type: Vd,
7731
7733
  date: a(),
7732
7734
  description: a().optional(),
7733
7735
  ip: a().optional(),
@@ -7746,43 +7748,43 @@ const jd = {
7746
7748
  strategy: a().optional(),
7747
7749
  strategy_type: a().optional(),
7748
7750
  hostname: a().optional(),
7749
- auth0_client: Vd.optional(),
7751
+ auth0_client: Zd.optional(),
7750
7752
  log_id: a().optional(),
7751
- location_info: Zd.optional()
7753
+ location_info: Hd.optional()
7752
7754
  });
7753
7755
  _({
7754
- ...Hd.shape,
7756
+ ...Kd.shape,
7755
7757
  log_id: a()
7756
7758
  });
7757
- const Kd = x([
7759
+ const Jd = E([
7758
7760
  "http",
7759
7761
  "eventbridge",
7760
7762
  "eventgrid",
7761
7763
  "splunk",
7762
7764
  "datadog",
7763
7765
  "sumo"
7764
- ]), Rr = x([
7766
+ ]), Rr = E([
7765
7767
  "active",
7766
7768
  "paused",
7767
7769
  "suspended"
7768
- ]), Jd = _({
7770
+ ]), Gd = _({
7769
7771
  type: a(),
7770
7772
  name: a()
7771
- }), Gd = _({
7773
+ }), Qd = _({
7772
7774
  name: a(),
7773
- type: Kd,
7775
+ type: Jd,
7774
7776
  status: Rr.optional(),
7775
7777
  sink: P(a(), Ve()),
7776
- filters: S(Jd).optional(),
7778
+ filters: S(Gd).optional(),
7777
7779
  isPriority: h().optional()
7778
7780
  });
7779
- Gd.extend({
7781
+ Qd.extend({
7780
7782
  id: a(),
7781
7783
  status: Rr,
7782
7784
  created_at: a().optional(),
7783
7785
  updated_at: a().optional()
7784
7786
  });
7785
- const Qd = _({
7787
+ const Wd = _({
7786
7788
  enabled: h().optional(),
7787
7789
  shields: S(a()).optional(),
7788
7790
  admin_notification_frequency: S(a()).optional(),
@@ -7795,13 +7797,13 @@ const Qd = _({
7795
7797
  shields: S(a()).optional()
7796
7798
  }).optional()
7797
7799
  }).optional()
7798
- }), Wd = _({
7800
+ }), Xd = _({
7799
7801
  enabled: h().optional(),
7800
7802
  shields: S(a()).optional(),
7801
7803
  allowlist: S(a()).optional(),
7802
7804
  mode: a().optional(),
7803
7805
  max_attempts: k().optional()
7804
- }), Xd = _({
7806
+ }), Yd = _({
7805
7807
  enabled: h().optional(),
7806
7808
  shields: S(a()).optional(),
7807
7809
  allowlist: S(a()).optional(),
@@ -7815,18 +7817,18 @@ const Qd = _({
7815
7817
  rate: k().optional()
7816
7818
  }).optional()
7817
7819
  }).optional()
7818
- }), Yd = _({
7819
- breached_password_detection: Qd.optional(),
7820
- brute_force_protection: Wd.optional(),
7821
- suspicious_ip_throttling: Xd.optional()
7822
7820
  }), ec = _({
7821
+ breached_password_detection: Wd.optional(),
7822
+ brute_force_protection: Xd.optional(),
7823
+ suspicious_ip_throttling: Yd.optional()
7824
+ }), tc = _({
7823
7825
  id: a().optional(),
7824
7826
  user_id: a(),
7825
7827
  password: a(),
7826
- algorithm: x(["bcrypt", "argon2id"]).default("argon2id"),
7828
+ algorithm: E(["bcrypt", "argon2id"]).default("argon2id"),
7827
7829
  is_current: h().default(!0)
7828
7830
  });
7829
- ec.extend({
7831
+ tc.extend({
7830
7832
  id: a(),
7831
7833
  created_at: a(),
7832
7834
  updated_at: a()
@@ -7838,7 +7840,7 @@ const Ur = _({
7838
7840
  last_user_agent: a().describe("Last user agent of the device from which this user logged in"),
7839
7841
  last_ip: a().describe("Last IP address from which this user logged in"),
7840
7842
  last_asn: a().describe("Last autonomous system number from which this user logged in")
7841
- }), tc = _({
7843
+ }), nc = _({
7842
7844
  id: a(),
7843
7845
  revoked_at: a().optional(),
7844
7846
  used_at: a().optional(),
@@ -7856,7 +7858,7 @@ _({
7856
7858
  updated_at: a(),
7857
7859
  authenticated_at: a(),
7858
7860
  last_interaction_at: a(),
7859
- ...tc.shape
7861
+ ...nc.shape
7860
7862
  });
7861
7863
  _({
7862
7864
  kid: a().openapi({ description: "The key id of the signing key" }),
@@ -7883,11 +7885,11 @@ _({
7883
7885
  connection: a().optional().openapi({
7884
7886
  description: "The connection identifier associated with the key"
7885
7887
  }),
7886
- type: x(["jwt_signing", "saml_encryption"]).openapi({
7888
+ type: E(["jwt_signing", "saml_encryption"]).openapi({
7887
7889
  description: "The type of the signing key"
7888
7890
  })
7889
7891
  });
7890
- const nc = _({
7892
+ const ic = _({
7891
7893
  id: a().optional(),
7892
7894
  // Basic settings
7893
7895
  audience: a(),
@@ -7905,7 +7907,7 @@ const nc = _({
7905
7907
  ephemeral_session_lifetime: k().optional(),
7906
7908
  idle_ephemeral_session_lifetime: k().optional(),
7907
7909
  session_cookie: _({
7908
- mode: x(["persistent", "non-persistent"]).optional()
7910
+ mode: E(["persistent", "non-persistent"]).optional()
7909
7911
  }).optional(),
7910
7912
  // Logout settings
7911
7913
  allowed_logout_urls: S(a()).optional(),
@@ -8002,7 +8004,7 @@ const nc = _({
8002
8004
  }).optional(),
8003
8005
  // Device flow settings
8004
8006
  device_flow: _({
8005
- charset: x(["base20", "digits"]).optional(),
8007
+ charset: E(["base20", "digits"]).optional(),
8006
8008
  mask: a().max(20).optional()
8007
8009
  }).optional(),
8008
8010
  // Default token quota
@@ -8040,11 +8042,11 @@ const nc = _({
8040
8042
  pushed_authorization_requests_supported: h().optional(),
8041
8043
  authorization_response_iss_parameter_supported: h().optional(),
8042
8044
  // Attack-protection config (singleton, exposed via /api/v2/attack-protection)
8043
- attack_protection: Yd.optional(),
8045
+ attack_protection: ec.optional(),
8044
8046
  // Guardian MFA Factors configuration (internal storage, exposed via /guardian API)
8045
8047
  mfa: _({
8046
8048
  // MFA policy: "never" = MFA disabled, "always" = MFA required for all logins
8047
- policy: x(["never", "always"]).default("never").optional(),
8049
+ policy: E(["never", "always"]).default("never").optional(),
8048
8050
  // Factor states
8049
8051
  factors: _({
8050
8052
  sms: h().default(!1),
@@ -8058,7 +8060,7 @@ const nc = _({
8058
8060
  }).optional(),
8059
8061
  // SMS provider configuration
8060
8062
  sms_provider: _({
8061
- provider: x(["twilio", "vonage", "aws_sns", "phone_message_hook"]).optional()
8063
+ provider: E(["twilio", "vonage", "aws_sns", "phone_message_hook"]).optional()
8062
8064
  }).optional(),
8063
8065
  // Twilio-specific configuration
8064
8066
  twilio: _({
@@ -8076,7 +8078,7 @@ const nc = _({
8076
8078
  _({
8077
8079
  created_at: a().nullable().transform((n) => n ?? ""),
8078
8080
  updated_at: a().nullable().transform((n) => n ?? ""),
8079
- ...nc.shape,
8081
+ ...ic.shape,
8080
8082
  id: a()
8081
8083
  });
8082
8084
  _({
@@ -8092,21 +8094,21 @@ _({
8092
8094
  code: a(),
8093
8095
  state: a().optional()
8094
8096
  });
8095
- const ic = _({
8097
+ const oc = _({
8096
8098
  button_border_radius: k(),
8097
8099
  button_border_weight: k(),
8098
- buttons_style: x(["pill", "rounded", "sharp"]),
8100
+ buttons_style: E(["pill", "rounded", "sharp"]),
8099
8101
  input_border_radius: k(),
8100
8102
  input_border_weight: k(),
8101
- inputs_style: x(["pill", "rounded", "sharp"]),
8103
+ inputs_style: E(["pill", "rounded", "sharp"]),
8102
8104
  show_widget_shadow: h(),
8103
8105
  widget_border_weight: k(),
8104
8106
  widget_corner_radius: k()
8105
- }), oc = _({
8107
+ }), ac = _({
8106
8108
  base_focus_color: a(),
8107
8109
  base_hover_color: a(),
8108
8110
  body_text: a(),
8109
- captcha_widget_theme: x(["auto", "dark", "light"]),
8111
+ captcha_widget_theme: E(["auto", "dark", "light"]),
8110
8112
  error: a(),
8111
8113
  header: a(),
8112
8114
  icons: a(),
@@ -8125,20 +8127,20 @@ const ic = _({
8125
8127
  }), wt = _({
8126
8128
  bold: h(),
8127
8129
  size: k()
8128
- }), ac = _({
8130
+ }), rc = _({
8129
8131
  body_text: wt,
8130
8132
  buttons_text: wt,
8131
8133
  font_url: a(),
8132
8134
  input_labels: wt,
8133
8135
  links: wt,
8134
- links_style: x(["normal", "underlined"]),
8136
+ links_style: E(["normal", "underlined"]),
8135
8137
  reference_text_size: k(),
8136
8138
  subtitle: wt,
8137
8139
  title: wt
8138
- }), rc = _({
8140
+ }), sc = _({
8139
8141
  background_color: a(),
8140
8142
  background_image_url: a(),
8141
- page_layout: x(["center", "left", "right"]),
8143
+ page_layout: E(["center", "left", "right"]),
8142
8144
  /**
8143
8145
  * Where the tenant logo renders on the page.
8144
8146
  * - "widget" (default): inside the widget card via the widget's own header.
@@ -8147,26 +8149,26 @@ const ic = _({
8147
8149
  * - "none": no logo on the page or in the widget.
8148
8150
  * Optional for backwards compatibility; absent values mean "widget".
8149
8151
  */
8150
- logo_placement: x(["widget", "chip", "none"]).optional()
8151
- }), sc = _({
8152
- header_text_alignment: x(["center", "left", "right"]),
8152
+ logo_placement: E(["widget", "chip", "none"]).optional()
8153
+ }), lc = _({
8154
+ header_text_alignment: E(["center", "left", "right"]),
8153
8155
  logo_height: k(),
8154
- logo_position: x(["center", "left", "none", "right"]),
8156
+ logo_position: E(["center", "left", "none", "right"]),
8155
8157
  logo_url: a(),
8156
- social_buttons_layout: x(["bottom", "top"])
8157
- }), lc = _({
8158
- borders: ic,
8159
- colors: oc,
8158
+ social_buttons_layout: E(["bottom", "top"])
8159
+ }), dc = _({
8160
+ borders: oc,
8161
+ colors: ac,
8160
8162
  displayName: a(),
8161
- fonts: ac,
8162
- page_background: rc,
8163
- widget: sc
8163
+ fonts: rc,
8164
+ page_background: sc,
8165
+ widget: lc
8164
8166
  });
8165
- lc.extend({
8167
+ dc.extend({
8166
8168
  themeId: a()
8167
8169
  });
8168
8170
  _({
8169
- universal_login_experience: x(["new", "classic"]).default("new"),
8171
+ universal_login_experience: E(["new", "classic"]).default("new"),
8170
8172
  identifier_first: h().default(!0),
8171
8173
  password_first: h().default(!1),
8172
8174
  webauthn_platform_first_factor: h()
@@ -8178,7 +8180,7 @@ _({
8178
8180
  credentials: P(a(), Ve()),
8179
8181
  settings: _({}).optional()
8180
8182
  });
8181
- const dc = x([
8183
+ const cc = E([
8182
8184
  "verify_email",
8183
8185
  "verify_email_by_code",
8184
8186
  "reset_email",
@@ -8193,7 +8195,7 @@ const dc = x([
8193
8195
  "user_invitation"
8194
8196
  ]);
8195
8197
  _({
8196
- template: dc,
8198
+ template: cc,
8197
8199
  body: a(),
8198
8200
  from: a(),
8199
8201
  subject: a(),
@@ -8203,7 +8205,7 @@ _({
8203
8205
  includeEmailInRedirect: h().default(!1),
8204
8206
  enabled: h().default(!0)
8205
8207
  });
8206
- const cc = _({
8208
+ const _c = _({
8207
8209
  // Internal primary key (ULID). Never sent to clients in the new wire format.
8208
8210
  id: a(),
8209
8211
  // Link to the login session
@@ -8244,7 +8246,7 @@ _({
8244
8246
  // When the token was explicitly revoked (null = still active).
8245
8247
  revoked_at: a().optional(),
8246
8248
  // Spread in the rest of the refresh token properties.
8247
- ...cc.shape
8249
+ ..._c.shape
8248
8250
  });
8249
8251
  _({
8250
8252
  to: a(),
@@ -8254,11 +8256,11 @@ _({
8254
8256
  name: a(),
8255
8257
  options: _({})
8256
8258
  });
8257
- const _c = _({
8259
+ const uc = _({
8258
8260
  value: a(),
8259
8261
  description: a().optional()
8260
- }), uc = _({
8261
- token_dialect: x(["access_token", "access_token_authz"]).optional(),
8262
+ }), pc = _({
8263
+ token_dialect: E(["access_token", "access_token_authz"]).optional(),
8262
8264
  enforce_policies: h().optional(),
8263
8265
  allow_skipping_userinfo: h().optional(),
8264
8266
  skip_userinfo: h().optional(),
@@ -8267,11 +8269,11 @@ const _c = _({
8267
8269
  mtls: _({
8268
8270
  bound_access_tokens: h().optional()
8269
8271
  }).optional()
8270
- }), pc = _({
8272
+ }), fc = _({
8271
8273
  id: a().optional(),
8272
8274
  name: a(),
8273
8275
  identifier: a(),
8274
- scopes: S(_c).optional(),
8276
+ scopes: S(uc).optional(),
8275
8277
  signing_alg: a().optional(),
8276
8278
  signing_secret: a().optional(),
8277
8279
  token_lifetime: k().default(86400),
@@ -8279,36 +8281,36 @@ const _c = _({
8279
8281
  skip_consent_for_verifiable_first_party_clients: h().optional(),
8280
8282
  allow_offline_access: h().optional(),
8281
8283
  verificationKey: a().optional(),
8282
- options: uc.optional(),
8284
+ options: pc.optional(),
8283
8285
  is_system: h().optional(),
8284
8286
  metadata: P(Z()).optional()
8285
- }), fc = _({
8286
- ...pc.shape,
8287
+ }), hc = _({
8288
+ ...fc.shape,
8287
8289
  created_at: a().optional(),
8288
8290
  updated_at: a().optional()
8289
8291
  });
8290
- S(fc);
8291
- const hc = _({
8292
+ S(hc);
8293
+ const gc = _({
8292
8294
  role_id: a(),
8293
8295
  resource_server_identifier: a(),
8294
8296
  permission_name: a()
8295
- }), gc = _({
8296
- ...hc.shape,
8297
+ }), mc = _({
8298
+ ...gc.shape,
8297
8299
  created_at: a()
8298
8300
  });
8299
- S(gc);
8300
- const mc = _({
8301
+ S(mc);
8302
+ const yc = _({
8301
8303
  user_id: a(),
8302
8304
  resource_server_identifier: a(),
8303
8305
  permission_name: a(),
8304
8306
  organization_id: a().optional()
8305
- }), yc = _({
8306
- ...mc.shape,
8307
+ }), vc = _({
8308
+ ...yc.shape,
8307
8309
  tenant_id: a(),
8308
8310
  created_at: a().optional()
8309
8311
  });
8310
- S(yc);
8311
- const vc = _({
8312
+ S(vc);
8313
+ const wc = _({
8312
8314
  user_id: a(),
8313
8315
  resource_server_identifier: a(),
8314
8316
  resource_server_name: a(),
@@ -8318,19 +8320,19 @@ const vc = _({
8318
8320
  organization_id: a().optional()
8319
8321
  });
8320
8322
  S(
8321
- vc
8323
+ wc
8322
8324
  );
8323
- const wc = _({
8325
+ const Nc = _({
8324
8326
  user_id: a(),
8325
8327
  role_id: a(),
8326
8328
  organization_id: a().optional()
8327
- }), Nc = _({
8328
- ...wc.shape,
8329
+ }), Sc = _({
8330
+ ...Nc.shape,
8329
8331
  tenant_id: a(),
8330
8332
  created_at: a().optional()
8331
8333
  });
8332
- S(Nc);
8333
- const Sc = _({
8334
+ S(Sc);
8335
+ const bc = _({
8334
8336
  id: a().optional().openapi({
8335
8337
  description: "The unique identifier of the role. If not provided, one will be generated."
8336
8338
  }),
@@ -8344,15 +8346,15 @@ const Sc = _({
8344
8346
  metadata: P(Z()).optional().openapi({
8345
8347
  description: "Metadata associated with the role. Can be used to control sync behavior in multi-tenancy scenarios."
8346
8348
  })
8347
- }), bc = Sc.extend({
8349
+ }), Ec = bc.extend({
8348
8350
  id: a().openapi({
8349
8351
  description: "The unique identifier of the role"
8350
8352
  }),
8351
8353
  created_at: a().optional(),
8352
8354
  updated_at: a().optional()
8353
8355
  });
8354
- S(bc);
8355
- const Ec = _({
8356
+ S(Ec);
8357
+ const xc = _({
8356
8358
  logo_url: a().optional().openapi({
8357
8359
  description: "URL of the organization's logo"
8358
8360
  }),
@@ -8364,7 +8366,7 @@ const Ec = _({
8364
8366
  description: "Page background color in hex format (e.g., #FFFFFF)"
8365
8367
  })
8366
8368
  }).optional()
8367
- }).optional(), xc = _({
8369
+ }).optional(), kc = _({
8368
8370
  connection_id: a().openapi({
8369
8371
  description: "ID of the connection"
8370
8372
  }),
@@ -8377,7 +8379,7 @@ const Ec = _({
8377
8379
  is_signup_enabled: h().default(!0).openapi({
8378
8380
  description: "Whether signup is enabled for this connection"
8379
8381
  })
8380
- }), kc = _({
8382
+ }), Oc = _({
8381
8383
  client_credentials: _({
8382
8384
  enforce: h().default(!1).openapi({
8383
8385
  description: "Whether to enforce token quota limits"
@@ -8389,7 +8391,7 @@ const Ec = _({
8389
8391
  description: "Maximum tokens per hour (0 = unlimited)"
8390
8392
  })
8391
8393
  }).optional()
8392
- }).optional(), Oc = _({
8394
+ }).optional(), Tc = _({
8393
8395
  id: a().optional(),
8394
8396
  name: a().min(1).regex(/^[a-z0-9_-]+$/, {
8395
8397
  message: "Organization name must be lowercase and can only contain letters, numbers, hyphens, and underscores"
@@ -8399,17 +8401,17 @@ const Ec = _({
8399
8401
  display_name: a().optional().openapi({
8400
8402
  description: "The display name of the organization"
8401
8403
  }),
8402
- branding: Ec,
8404
+ branding: xc,
8403
8405
  metadata: P(Z()).default({}).optional().openapi({
8404
8406
  description: "Custom metadata for the organization"
8405
8407
  }),
8406
- enabled_connections: S(xc).default([]).optional().openapi({
8408
+ enabled_connections: S(kc).default([]).optional().openapi({
8407
8409
  description: "List of enabled connections for the organization"
8408
8410
  }),
8409
- token_quota: kc
8411
+ token_quota: Oc
8410
8412
  });
8411
8413
  _({
8412
- ...Oc.shape,
8414
+ ...Tc.shape,
8413
8415
  ...qe.shape,
8414
8416
  id: a(),
8415
8417
  // Override name to be lenient when reading from database (to support existing uppercase names)
@@ -8417,15 +8419,15 @@ _({
8417
8419
  description: "The name of the organization"
8418
8420
  })
8419
8421
  });
8420
- const Tc = _({
8422
+ const Ac = _({
8421
8423
  connection_id: a().openapi({
8422
8424
  description: "ID of the tenant-level connection to enable for the org."
8423
8425
  }),
8424
8426
  assign_membership_on_login: h().optional().default(!1),
8425
8427
  show_as_button: h().optional().default(!0),
8426
8428
  is_signup_enabled: h().optional().default(!0)
8427
- }), Ac = _({
8428
- ...Tc.shape,
8429
+ }), Ic = _({
8430
+ ...Ac.shape,
8429
8431
  // Auth0 includes the embedded connection in GET responses.
8430
8432
  connection: _({
8431
8433
  name: a().optional(),
@@ -8435,9 +8437,9 @@ const Tc = _({
8435
8437
  updated_at: a().optional()
8436
8438
  });
8437
8439
  S(
8438
- Ac
8440
+ Ic
8439
8441
  );
8440
- const Ic = _({
8442
+ const Cc = _({
8441
8443
  user_id: a().openapi({
8442
8444
  description: "ID of the user"
8443
8445
  }),
@@ -8446,7 +8448,7 @@ const Ic = _({
8446
8448
  })
8447
8449
  });
8448
8450
  _({
8449
- ...Ic.shape,
8451
+ ...Cc.shape,
8450
8452
  ...qe.shape,
8451
8453
  id: a()
8452
8454
  });
@@ -8455,7 +8457,7 @@ _({
8455
8457
  idle_session_lifetime: k().default(72),
8456
8458
  session_lifetime: k().default(168),
8457
8459
  session_cookie: _({
8458
- mode: x(["persistent", "non-persistent"]).optional()
8460
+ mode: E(["persistent", "non-persistent"]).optional()
8459
8461
  }).optional(),
8460
8462
  // MFA settings
8461
8463
  enable_client_connections: h().optional(),
@@ -8522,7 +8524,7 @@ _({
8522
8524
  // Guardian MFA Factors configuration (internal storage, exposed via /guardian API)
8523
8525
  mfa: _({
8524
8526
  // MFA policy: "never" = MFA disabled, "always" = MFA required for all logins
8525
- policy: x(["never", "always"]).default("never").optional(),
8527
+ policy: E(["never", "always"]).default("never").optional(),
8526
8528
  // Factor states
8527
8529
  factors: _({
8528
8530
  sms: h().default(!1),
@@ -8536,7 +8538,7 @@ _({
8536
8538
  }).optional(),
8537
8539
  // SMS provider configuration
8538
8540
  sms_provider: _({
8539
- provider: x(["twilio", "vonage", "aws_sns", "phone_message_hook"]).optional()
8541
+ provider: E(["twilio", "vonage", "aws_sns", "phone_message_hook"]).optional()
8540
8542
  }).optional(),
8541
8543
  // Twilio-specific configuration
8542
8544
  twilio: _({
@@ -8581,7 +8583,7 @@ k().openapi({
8581
8583
  description: "Number of active users in the last 30 days",
8582
8584
  example: 1234
8583
8585
  });
8584
- const Cc = x([
8586
+ const Dc = E([
8585
8587
  "login",
8586
8588
  "login-id",
8587
8589
  "login-password",
@@ -8610,7 +8612,7 @@ const Cc = x([
8610
8612
  "custom-form",
8611
8613
  "login-passwordless",
8612
8614
  "mfa-login-options"
8613
- ]), Dc = P(a(), P(a(), a())).openapi({
8615
+ ]), Lc = P(a(), P(a(), a())).openapi({
8614
8616
  type: "object",
8615
8617
  additionalProperties: {
8616
8618
  type: "object",
@@ -8618,11 +8620,11 @@ const Cc = x([
8618
8620
  }
8619
8621
  });
8620
8622
  _({
8621
- prompt: Cc,
8623
+ prompt: Dc,
8622
8624
  language: a(),
8623
- custom_text: Dc
8625
+ custom_text: Lc
8624
8626
  });
8625
- const Lc = x([
8627
+ const Rc = E([
8626
8628
  "phone",
8627
8629
  "totp",
8628
8630
  "email",
@@ -8632,7 +8634,7 @@ const Lc = x([
8632
8634
  "passkey"
8633
8635
  ]), zr = _({
8634
8636
  user_id: a(),
8635
- type: Lc,
8637
+ type: Rc,
8636
8638
  // Phone-specific
8637
8639
  phone_number: a().optional(),
8638
8640
  // TOTP-specific
@@ -8673,13 +8675,13 @@ _({
8673
8675
  created_at: a(),
8674
8676
  updated_at: a()
8675
8677
  }).superRefine(Fr);
8676
- function Rc(n) {
8678
+ function Uc(n) {
8677
8679
  return typeof n == "object" && n !== null && !Array.isArray(n);
8678
8680
  }
8679
- function Uc(n) {
8681
+ function zc(n) {
8680
8682
  if (!n) return;
8681
8683
  const e = JSON.parse(n);
8682
- return Rc(e) ? e : void 0;
8684
+ return Uc(e) ? e : void 0;
8683
8685
  }
8684
8686
  function Un(n) {
8685
8687
  return n == null ? void 0 : new Date(n).toISOString();
@@ -8697,7 +8699,7 @@ function zn(n) {
8697
8699
  type: e,
8698
8700
  client_id: n.client_id ?? void 0,
8699
8701
  sub: n.sub ?? void 0,
8700
- constraints: Uc(n.constraints),
8702
+ constraints: zc(n.constraints),
8701
8703
  single_use: !!n.single_use,
8702
8704
  expires_at: Un(n.expires_at_ts),
8703
8705
  used_at: Un(n.used_at_ts),
@@ -8705,7 +8707,7 @@ function zn(n) {
8705
8707
  created_at: new Date(n.created_at_ts).toISOString()
8706
8708
  };
8707
8709
  }
8708
- function zc(n) {
8710
+ function Fc(n) {
8709
8711
  return {
8710
8712
  async create(e, t) {
8711
8713
  const i = Date.now();
@@ -8799,7 +8801,7 @@ function Fn(n) {
8799
8801
  const { tenant_id: e, ...t } = n;
8800
8802
  return J(t);
8801
8803
  }
8802
- function Fc(n) {
8804
+ function Pc(n) {
8803
8805
  return {
8804
8806
  async create(e, t) {
8805
8807
  const i = {
@@ -8864,7 +8866,7 @@ function Fc(n) {
8864
8866
  }
8865
8867
  };
8866
8868
  }
8867
- function Pc() {
8869
+ function Mc() {
8868
8870
  const { customAlphabet: n } = require("nanoid");
8869
8871
  return `con_${n("0123456789abcdefghijklmnopqrstuvwxyz", 17)()}`;
8870
8872
  }
@@ -8877,12 +8879,12 @@ function Pn(n) {
8877
8879
  is_system: t ? !0 : void 0
8878
8880
  });
8879
8881
  }
8880
- function Mc(n) {
8882
+ function qc(n) {
8881
8883
  return {
8882
8884
  async create(e, t) {
8883
8885
  var r, l;
8884
8886
  const i = (/* @__PURE__ */ new Date()).toISOString(), o = {
8885
- id: t.id || Pc(),
8887
+ id: t.id || Mc(),
8886
8888
  ...t,
8887
8889
  tenant_id: e,
8888
8890
  options: JSON.stringify(t.options || {}),
@@ -8969,7 +8971,7 @@ function en(n) {
8969
8971
  domain_metadata: z(t)
8970
8972
  });
8971
8973
  }
8972
- function qc(n) {
8974
+ function Bc(n) {
8973
8975
  return {
8974
8976
  async create(e, t) {
8975
8977
  const i = (/* @__PURE__ */ new Date()).toISOString(), r = {
@@ -9029,7 +9031,7 @@ function qc(n) {
9029
9031
  }
9030
9032
  };
9031
9033
  }
9032
- function Bc(n) {
9034
+ function jc(n) {
9033
9035
  return {
9034
9036
  async get(e, t, i) {
9035
9037
  const o = await n.select().from(Ne).where(
@@ -9081,7 +9083,7 @@ function Bc(n) {
9081
9083
  }
9082
9084
  };
9083
9085
  }
9084
- function jc(n) {
9086
+ function $c(n) {
9085
9087
  return {
9086
9088
  async create(e, t) {
9087
9089
  const i = (/* @__PURE__ */ new Date()).toISOString();
@@ -9134,7 +9136,7 @@ function Ai(n) {
9134
9136
  urlLifetimeInSeconds: n.url_lifetime_in_seconds ?? void 0
9135
9137
  });
9136
9138
  }
9137
- function $c(n) {
9139
+ function Vc(n) {
9138
9140
  return {
9139
9141
  async get(e, t) {
9140
9142
  const i = await n.select().from(De).where(
@@ -9189,7 +9191,7 @@ function $c(n) {
9189
9191
  }
9190
9192
  };
9191
9193
  }
9192
- function Vc(n) {
9194
+ function Zc(n) {
9193
9195
  return {
9194
9196
  async create(e, t) {
9195
9197
  const i = (/* @__PURE__ */ new Date()).toISOString(), o = `af_${Ie()}`;
@@ -9260,7 +9262,7 @@ function Vc(n) {
9260
9262
  };
9261
9263
  }
9262
9264
  const tn = ["nodes", "start", "ending"];
9263
- function Zc(n) {
9265
+ function Hc(n) {
9264
9266
  return {
9265
9267
  async create(e, t) {
9266
9268
  const i = (/* @__PURE__ */ new Date()).toISOString(), o = Ie(), r = {
@@ -9369,9 +9371,9 @@ function Wt(n, e, t = []) {
9369
9371
  }
9370
9372
  return i;
9371
9373
  }
9372
- const Hc = vs("0123456789abcdefghijklmnopqrstuvwxyz", 17);
9373
- function Kc() {
9374
- return `hc_${Hc()}`;
9374
+ const Kc = ws("0123456789abcdefghijklmnopqrstuvwxyz", 17);
9375
+ function Jc() {
9376
+ return `hc_${Kc()}`;
9375
9377
  }
9376
9378
  function Ii(n) {
9377
9379
  const { created_at_ts: e, updated_at_ts: t, secrets: i, ...o } = n, r = Wt({ created_at_ts: e, updated_at_ts: t }, [
@@ -9384,11 +9386,11 @@ function Ii(n) {
9384
9386
  secrets: i ? JSON.parse(i) : void 0
9385
9387
  };
9386
9388
  }
9387
- function Jc(n) {
9389
+ function Gc(n) {
9388
9390
  return {
9389
9391
  async create(e, t) {
9390
9392
  const i = Date.now(), r = {
9391
- id: Kc(),
9393
+ id: Jc(),
9392
9394
  tenant_id: e,
9393
9395
  code: t.code,
9394
9396
  secrets: t.secrets ? JSON.stringify(t.secrets) : null,
@@ -9412,11 +9414,11 @@ function Jc(n) {
9412
9414
  }
9413
9415
  };
9414
9416
  }
9415
- function Gc() {
9417
+ function Qc() {
9416
9418
  const { customAlphabet: n } = require("nanoid");
9417
9419
  return `h_${n("0123456789abcdefghijklmnopqrstuvwxyz", 17)()}`;
9418
9420
  }
9419
- function Qc(n) {
9421
+ function Wc(n) {
9420
9422
  if (!(typeof n != "string" || !n))
9421
9423
  try {
9422
9424
  const e = JSON.parse(n);
@@ -9434,15 +9436,15 @@ function Mn(n) {
9434
9436
  ...r,
9435
9437
  enabled: !!r.enabled,
9436
9438
  synchronous: !!r.synchronous,
9437
- metadata: Qc(o),
9439
+ metadata: Wc(o),
9438
9440
  ...l
9439
9441
  });
9440
9442
  }
9441
- function Wc(n) {
9443
+ function Xc(n) {
9442
9444
  return {
9443
9445
  async create(e, t) {
9444
9446
  const i = Date.now(), r = {
9445
- hook_id: t.hook_id || Gc(),
9447
+ hook_id: t.hook_id || Qc(),
9446
9448
  tenant_id: e,
9447
9449
  trigger_id: t.trigger_id,
9448
9450
  url: t.url,
@@ -9504,7 +9506,7 @@ function Wc(n) {
9504
9506
  }
9505
9507
  };
9506
9508
  }
9507
- function Xc() {
9509
+ function Yc() {
9508
9510
  const { customAlphabet: n } = require("nanoid");
9509
9511
  return `inv_${n("0123456789abcdefghijklmnopqrstuvwxyz", 17)()}`;
9510
9512
  }
@@ -9521,11 +9523,11 @@ function qn(n) {
9521
9523
  o[r] = z(i[r], r === "roles" ? [] : {});
9522
9524
  return o.send_invitation_email = !!t, J(o);
9523
9525
  }
9524
- function Yc(n) {
9526
+ function e_(n) {
9525
9527
  return {
9526
9528
  async create(e, t) {
9527
9529
  var u, f;
9528
- const i = t.id || Xc(), o = t.ttl_sec || 604800, r = /* @__PURE__ */ new Date(), l = new Date(r.getTime() + o * 1e3).toISOString(), d = {
9530
+ const i = t.id || Yc(), o = t.ttl_sec || 604800, r = /* @__PURE__ */ new Date(), l = new Date(r.getTime() + o * 1e3).toISOString(), d = {
9529
9531
  id: i,
9530
9532
  tenant_id: e,
9531
9533
  organization_id: t.organization_id,
@@ -9589,7 +9591,7 @@ function Yc(n) {
9589
9591
  }
9590
9592
  };
9591
9593
  }
9592
- function e_(n) {
9594
+ function t_(n) {
9593
9595
  return {
9594
9596
  async create(e) {
9595
9597
  await n.insert($e).values({
@@ -9631,7 +9633,7 @@ function e_(n) {
9631
9633
  };
9632
9634
  }
9633
9635
  const _i = "0123456789ABCDEFGHJKMNPQRSTVWXYZ", Bn = _i.length;
9634
- function t_() {
9636
+ function n_() {
9635
9637
  let t = Date.now(), i = "";
9636
9638
  for (let r = 10; r > 0; r--)
9637
9639
  i = _i.charAt(t % Bn) + i, t = Math.floor(t / Bn);
@@ -9664,12 +9666,12 @@ function Ci(n) {
9664
9666
  state_data: z(r)
9665
9667
  });
9666
9668
  }
9667
- function n_(n) {
9669
+ function i_(n) {
9668
9670
  return {
9669
9671
  async create(e, t) {
9670
9672
  var l, d;
9671
9673
  const i = Date.now(), r = {
9672
- id: t_(),
9674
+ id: n_(),
9673
9675
  tenant_id: e,
9674
9676
  session_id: t.session_id,
9675
9677
  csrf_token: t.csrf_token,
@@ -9757,7 +9759,7 @@ function jn(n) {
9757
9759
  continent_code: p
9758
9760
  })), J(b);
9759
9761
  }
9760
- function i_(n) {
9762
+ function o_(n) {
9761
9763
  return {
9762
9764
  async create(e, t) {
9763
9765
  var r, l;
@@ -9829,7 +9831,7 @@ function i_(n) {
9829
9831
  };
9830
9832
  }
9831
9833
  const ui = "0123456789ABCDEFGHJKMNPQRSTVWXYZ", $n = ui.length;
9832
- function o_() {
9834
+ function a_() {
9833
9835
  let t = Date.now(), i = "";
9834
9836
  for (let r = 10; r > 0; r--)
9835
9837
  i = ui.charAt(t % $n) + i, t = Math.floor(t / $n);
@@ -9858,11 +9860,11 @@ function nn(n) {
9858
9860
  updated_at: di(i)
9859
9861
  });
9860
9862
  }
9861
- function a_(n) {
9863
+ function r_(n) {
9862
9864
  return {
9863
9865
  async create(e, t) {
9864
9866
  const i = Date.now(), r = {
9865
- id: t.id || o_(),
9867
+ id: t.id || a_(),
9866
9868
  tenant_id: e,
9867
9869
  user_id: t.user_id,
9868
9870
  type: t.type,
@@ -9933,7 +9935,7 @@ function a_(n) {
9933
9935
  }
9934
9936
  };
9935
9937
  }
9936
- function r_() {
9938
+ function s_() {
9937
9939
  const { customAlphabet: n } = require("nanoid");
9938
9940
  return `org_${n("0123456789abcdefghijklmnopqrstuvwxyz", 17)()}`;
9939
9941
  }
@@ -9954,12 +9956,12 @@ function Vn(n) {
9954
9956
  token_quota: z(r, {})
9955
9957
  });
9956
9958
  }
9957
- function s_(n) {
9959
+ function l_(n) {
9958
9960
  return {
9959
9961
  async create(e, t) {
9960
9962
  var l, d;
9961
9963
  const i = (/* @__PURE__ */ new Date()).toISOString(), r = {
9962
- id: t.id || r_(),
9964
+ id: t.id || s_(),
9963
9965
  tenant_id: e,
9964
9966
  name: t.name,
9965
9967
  display_name: t.display_name,
@@ -10052,7 +10054,7 @@ function Zn(n) {
10052
10054
  is_current: !!t
10053
10055
  };
10054
10056
  }
10055
- function l_(n) {
10057
+ function d_(n) {
10056
10058
  return {
10057
10059
  async create(e, t) {
10058
10060
  const i = (/* @__PURE__ */ new Date()).toISOString(), o = t.id || Ie();
@@ -10112,7 +10114,7 @@ function l_(n) {
10112
10114
  }
10113
10115
  };
10114
10116
  }
10115
- function d_(n) {
10117
+ function c_(n) {
10116
10118
  return {
10117
10119
  async get(e) {
10118
10120
  const t = await n.select().from(Ct).where(c(Ct.tenant_id, e)).get();
@@ -10186,10 +10188,10 @@ function on(n) {
10186
10188
  resource_servers: z(f, [])
10187
10189
  });
10188
10190
  }
10189
- function c_(n, e) {
10191
+ function __(n, e) {
10190
10192
  return Math.max(n ?? 0, e ?? 0);
10191
10193
  }
10192
- function __(n) {
10194
+ function u_(n) {
10193
10195
  return {
10194
10196
  async create(e, t) {
10195
10197
  const i = Date.now(), o = {
@@ -10214,7 +10216,7 @@ function __(n) {
10214
10216
  await n.run(I`BEGIN`);
10215
10217
  try {
10216
10218
  await n.insert(K).values(o);
10217
- const r = c_(
10219
+ const r = __(
10218
10220
  o.expires_at_ts,
10219
10221
  o.idle_expires_at_ts
10220
10222
  );
@@ -10323,7 +10325,7 @@ function __(n) {
10323
10325
  }
10324
10326
  };
10325
10327
  }
10326
- function u_() {
10328
+ function p_() {
10327
10329
  const { customAlphabet: n } = require("nanoid");
10328
10330
  return `api_${n("0123456789abcdefghijklmnopqrstuvwxyz", 17)()}`;
10329
10331
  }
@@ -10364,11 +10366,11 @@ function Hn(n) {
10364
10366
  l[u] !== void 0 && l[u] !== null && (d[u] = !!l[u]);
10365
10367
  return J(d);
10366
10368
  }
10367
- function p_(n) {
10369
+ function f_(n) {
10368
10370
  return {
10369
10371
  async create(e, t) {
10370
10372
  const i = (/* @__PURE__ */ new Date()).toISOString(), r = {
10371
- id: t.id || u_(),
10373
+ id: t.id || p_(),
10372
10374
  tenant_id: e,
10373
10375
  identifier: t.identifier,
10374
10376
  name: t.name,
@@ -10459,7 +10461,7 @@ function p_(n) {
10459
10461
  }
10460
10462
  };
10461
10463
  }
10462
- function f_(n) {
10464
+ function h_(n) {
10463
10465
  return {
10464
10466
  async assign(e, t, i) {
10465
10467
  const o = (/* @__PURE__ */ new Date()).toISOString();
@@ -10524,7 +10526,7 @@ function f_(n) {
10524
10526
  }
10525
10527
  };
10526
10528
  }
10527
- function h_(n) {
10529
+ function g_(n) {
10528
10530
  return {
10529
10531
  async create(e, t, i, o) {
10530
10532
  var r, l;
@@ -10592,7 +10594,7 @@ function Kn(n) {
10592
10594
  metadata: z(i)
10593
10595
  });
10594
10596
  }
10595
- function g_(n) {
10597
+ function m_(n) {
10596
10598
  return {
10597
10599
  async create(e, t) {
10598
10600
  const i = (/* @__PURE__ */ new Date()).toISOString(), r = {
@@ -10648,7 +10650,7 @@ function g_(n) {
10648
10650
  }
10649
10651
  };
10650
10652
  }
10651
- const m_ = ["created_at_ts", "updated_at_ts"], y_ = [
10653
+ const y_ = ["created_at_ts", "updated_at_ts"], v_ = [
10652
10654
  "expires_at_ts",
10653
10655
  "idle_expires_at_ts",
10654
10656
  "authenticated_at_ts",
@@ -10681,8 +10683,8 @@ function Jn(n) {
10681
10683
  used_at_ts: u,
10682
10684
  revoked_at_ts: f
10683
10685
  },
10684
- [...m_],
10685
- [...y_]
10686
+ [...y_],
10687
+ [...v_]
10686
10688
  );
10687
10689
  return J({
10688
10690
  ...m,
@@ -10691,7 +10693,7 @@ function Jn(n) {
10691
10693
  clients: z(v, [])
10692
10694
  });
10693
10695
  }
10694
- function v_(n) {
10696
+ function w_(n) {
10695
10697
  return {
10696
10698
  async create(e, t) {
10697
10699
  const i = Date.now(), o = {
@@ -10796,7 +10798,7 @@ function Ri(n) {
10796
10798
  n[t] !== void 0 && (e[t] = n[t] ? 1 : 0);
10797
10799
  return sr(e);
10798
10800
  }
10799
- function w_(n) {
10801
+ function N_(n) {
10800
10802
  return {
10801
10803
  async create(e) {
10802
10804
  var o, r;
@@ -10862,7 +10864,7 @@ function w_(n) {
10862
10864
  }
10863
10865
  };
10864
10866
  }
10865
- const N_ = [
10867
+ const S_ = [
10866
10868
  "colors",
10867
10869
  "borders",
10868
10870
  "fonts",
@@ -10870,10 +10872,10 @@ const N_ = [
10870
10872
  "widget"
10871
10873
  ];
10872
10874
  function Ui(n) {
10873
- const { tenant_id: e, ...t } = n, i = lr(t, N_);
10875
+ const { tenant_id: e, ...t } = n, i = lr(t, S_);
10874
10876
  return i.borders && (i.borders.show_widget_shadow = !!i.borders.show_widget_shadow), i.fonts && (i.fonts.links_bold = !!i.fonts.links_bold, i.fonts.subtitle_bold = !!i.fonts.subtitle_bold, i.fonts.title_bold = !!i.fonts.title_bold), J(i);
10875
10877
  }
10876
- function S_(n) {
10878
+ function b_(n) {
10877
10879
  return {
10878
10880
  async create(e, t, i) {
10879
10881
  const o = (/* @__PURE__ */ new Date()).toISOString(), r = i || Ie(), d = {
@@ -10904,7 +10906,7 @@ function S_(n) {
10904
10906
  }
10905
10907
  };
10906
10908
  }
10907
- function b_(n) {
10909
+ function E_(n) {
10908
10910
  return {
10909
10911
  async get(e) {
10910
10912
  const t = await n.select({ body: ot.body }).from(ot).where(c(ot.tenant_id, e)).get();
@@ -10968,7 +10970,7 @@ function Gn(n, e = []) {
10968
10970
  identities: [m, ...b]
10969
10971
  });
10970
10972
  }
10971
- function E_(n) {
10973
+ function x_(n) {
10972
10974
  const e = async (t, i) => {
10973
10975
  var d, u;
10974
10976
  const o = (/* @__PURE__ */ new Date()).toISOString(), r = {
@@ -11165,7 +11167,7 @@ function E_(n) {
11165
11167
  }
11166
11168
  };
11167
11169
  }
11168
- function x_(n) {
11170
+ function k_(n) {
11169
11171
  return {
11170
11172
  async create(e, t, i, o) {
11171
11173
  var r, l;
@@ -11220,7 +11222,7 @@ function x_(n) {
11220
11222
  }
11221
11223
  };
11222
11224
  }
11223
- function k_(n) {
11225
+ function O_(n) {
11224
11226
  return {
11225
11227
  async create(e, t) {
11226
11228
  var u, f;
@@ -11350,8 +11352,8 @@ function k_(n) {
11350
11352
  }
11351
11353
  };
11352
11354
  }
11353
- const Fi = ["s", "seacft", "seccft", "sepft", "sertft", "ssa"], O_ = ["pwd_leak", "signup_pwd_leak", "reset_pwd_leak"];
11354
- function T_(n) {
11355
+ const Fi = ["s", "seacft", "seccft", "sepft", "sertft", "ssa"], T_ = ["pwd_leak", "signup_pwd_leak", "reset_pwd_leak"];
11356
+ function A_(n) {
11355
11357
  return {
11356
11358
  async getDaily(e, t) {
11357
11359
  const i = /* @__PURE__ */ new Date(), o = (t == null ? void 0 : t.from) || new Date(i.getTime() - 30 * 24 * 60 * 60 * 1e3).toISOString().split("T")[0], r = (t == null ? void 0 : t.to) || i.toISOString().split("T")[0];
@@ -11365,7 +11367,7 @@ function T_(n) {
11365
11367
  "signups"
11366
11368
  ),
11367
11369
  leaked_passwords: I`SUM(CASE WHEN ${G.type} IN (${I.join(
11368
- O_.map((d) => I`${d}`),
11370
+ T_.map((d) => I`${d}`),
11369
11371
  I`, `
11370
11372
  )}) THEN 1 ELSE 0 END)`.as("leaked_passwords")
11371
11373
  }).from(G).where(
@@ -11408,7 +11410,7 @@ function Pi(n) {
11408
11410
  payload: z(n.payload, {})
11409
11411
  };
11410
11412
  }
11411
- function A_(n) {
11413
+ function I_(n) {
11412
11414
  return {
11413
11415
  async create(e, t) {
11414
11416
  const i = Ie(), o = (/* @__PURE__ */ new Date()).toISOString();
@@ -11550,10 +11552,10 @@ function A_(n) {
11550
11552
  }
11551
11553
  };
11552
11554
  }
11553
- const I_ = 7 * 24 * 60 * 60 * 1e3;
11554
- function C_(n) {
11555
+ const C_ = 7 * 24 * 60 * 60 * 1e3;
11556
+ function D_(n) {
11555
11557
  return async (e) => {
11556
- const t = Date.now() - I_;
11558
+ const t = Date.now() - C_;
11557
11559
  try {
11558
11560
  let i = [
11559
11561
  ze(
@@ -11572,48 +11574,48 @@ function C_(n) {
11572
11574
  }
11573
11575
  };
11574
11576
  }
11575
- function R_(n, e = { useTransactions: !0 }) {
11577
+ function U_(n, e = { useTransactions: !0 }) {
11576
11578
  const t = {
11577
11579
  actions: Qr(),
11578
11580
  actionVersions: Wr(),
11579
- branding: us(n),
11580
- clients: ps(n),
11581
- clientConnections: hs(n),
11582
- clientGrants: ws(n),
11583
- clientRegistrationTokens: zc(n),
11584
- codes: Fc(n),
11585
- connections: Mc(n),
11586
- customDomains: qc(n),
11587
- customText: Bc(n),
11588
- emailProviders: jc(n),
11589
- emailTemplates: $c(n),
11590
- flows: Vc(n),
11591
- forms: Zc(n),
11592
- hookCode: Jc(n),
11593
- hooks: Wc(n),
11594
- invites: Yc(n),
11595
- keys: e_(n),
11596
- loginSessions: n_(n),
11597
- logs: i_(n),
11598
- authenticationMethods: a_(n),
11599
- organizations: s_(n),
11600
- passwords: l_(n),
11601
- promptSettings: d_(n),
11602
- refreshTokens: __(n),
11603
- resourceServers: p_(n),
11604
- rolePermissions: f_(n),
11605
- userPermissions: h_(n),
11606
- roles: g_(n),
11607
- sessions: v_(n),
11608
- sessionCleanup: C_(n),
11609
- tenants: w_(n),
11610
- themes: S_(n),
11611
- universalLoginTemplates: b_(n),
11612
- users: E_(n),
11613
- userRoles: x_(n),
11614
- userOrganizations: k_(n),
11615
- stats: T_(n),
11616
- outbox: A_(n),
11581
+ branding: ps(n),
11582
+ clients: fs(n),
11583
+ clientConnections: gs(n),
11584
+ clientGrants: Ns(n),
11585
+ clientRegistrationTokens: Fc(n),
11586
+ codes: Pc(n),
11587
+ connections: qc(n),
11588
+ customDomains: Bc(n),
11589
+ customText: jc(n),
11590
+ emailProviders: $c(n),
11591
+ emailTemplates: Vc(n),
11592
+ flows: Zc(n),
11593
+ forms: Hc(n),
11594
+ hookCode: Gc(n),
11595
+ hooks: Xc(n),
11596
+ invites: e_(n),
11597
+ keys: t_(n),
11598
+ loginSessions: i_(n),
11599
+ logs: o_(n),
11600
+ authenticationMethods: r_(n),
11601
+ organizations: l_(n),
11602
+ passwords: d_(n),
11603
+ promptSettings: c_(n),
11604
+ refreshTokens: u_(n),
11605
+ resourceServers: f_(n),
11606
+ rolePermissions: h_(n),
11607
+ userPermissions: g_(n),
11608
+ roles: m_(n),
11609
+ sessions: w_(n),
11610
+ sessionCleanup: D_(n),
11611
+ tenants: N_(n),
11612
+ themes: b_(n),
11613
+ universalLoginTemplates: E_(n),
11614
+ users: x_(n),
11615
+ userRoles: k_(n),
11616
+ userOrganizations: O_(n),
11617
+ stats: A_(n),
11618
+ outbox: I_(n),
11617
11619
  async transaction(i) {
11618
11620
  if (e.useTransactions === !1)
11619
11621
  return i(t);
@@ -11629,6 +11631,6 @@ function R_(n, e = { useTransactions: !0 }) {
11629
11631
  return t;
11630
11632
  }
11631
11633
  export {
11632
- R_ as default,
11633
- L_ as sqlite
11634
+ U_ as default,
11635
+ R_ as sqlite
11634
11636
  };