@authhero/adapter-interfaces 0.9.0 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,14 +28,14 @@ function ht(t) {
28
28
  if (pt(this, "ZodObject")) {
29
29
  const dt = this.extend;
30
30
  ze.extend = function(...lt) {
31
- var we, Se, Te, Oe, je, Ee;
32
- const Ce = dt.apply(this, lt);
33
- return Ce._def.openapi = {
31
+ var Se, Te, je, Oe, Ee, Ce;
32
+ const Ze = dt.apply(this, lt);
33
+ return Ze._def.openapi = {
34
34
  _internal: {
35
- extendedFrom: !((Se = (we = this._def.openapi) === null || we === void 0 ? void 0 : we._internal) === null || Se === void 0) && Se.refId ? { refId: (Oe = (Te = this._def.openapi) === null || Te === void 0 ? void 0 : Te._internal) === null || Oe === void 0 ? void 0 : Oe.refId, schema: this } : (je = this._def.openapi) === null || je === void 0 ? void 0 : je._internal.extendedFrom
35
+ extendedFrom: !((Te = (Se = this._def.openapi) === null || Se === void 0 ? void 0 : Se._internal) === null || Te === void 0) && Te.refId ? { refId: (Oe = (je = this._def.openapi) === null || je === void 0 ? void 0 : je._internal) === null || Oe === void 0 ? void 0 : Oe.refId, schema: this } : (Ee = this._def.openapi) === null || Ee === void 0 ? void 0 : Ee._internal.extendedFrom
36
36
  },
37
- metadata: (Ee = Ce._def.openapi) === null || Ee === void 0 ? void 0 : Ee.metadata
38
- }, Ce;
37
+ metadata: (Ce = Ze._def.openapi) === null || Ce === void 0 ? void 0 : Ce.metadata
38
+ }, Ze;
39
39
  };
40
40
  }
41
41
  return ze;
@@ -96,14 +96,14 @@ var b;
96
96
  }
97
97
  t.joinValues = s, t.jsonStringifyReplacer = (a, i) => typeof i == "bigint" ? i.toString() : i;
98
98
  })(b || (b = {}));
99
- var Ne;
99
+ var Ie;
100
100
  (function(t) {
101
101
  t.mergeShapes = (e, n) => ({
102
102
  ...e,
103
103
  ...n
104
104
  // second overwrites first
105
105
  });
106
- })(Ne || (Ne = {}));
106
+ })(Ie || (Ie = {}));
107
107
  const h = b.arrayToEnum([
108
108
  "string",
109
109
  "nan",
@@ -366,7 +366,7 @@ class w {
366
366
  }
367
367
  const g = Object.freeze({
368
368
  status: "aborted"
369
- }), G = (t) => ({ status: "dirty", value: t }), S = (t) => ({ status: "valid", value: t }), Ie = (t) => t.status === "aborted", Re = (t) => t.status === "dirty", ee = (t) => t.status === "valid", te = (t) => typeof Promise < "u" && t instanceof Promise;
369
+ }), G = (t) => ({ status: "dirty", value: t }), S = (t) => ({ status: "valid", value: t }), Re = (t) => t.status === "aborted", Ae = (t) => t.status === "dirty", ee = (t) => t.status === "valid", te = (t) => typeof Promise < "u" && t instanceof Promise;
370
370
  function ge(t, e, n, s) {
371
371
  if (typeof e == "function" ? t !== e || !s : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
372
372
  return e.get(t);
@@ -534,7 +534,7 @@ class v {
534
534
  return this.nullable().optional();
535
535
  }
536
536
  array() {
537
- return j.create(this, this._def);
537
+ return O.create(this, this._def);
538
538
  }
539
539
  promise() {
540
540
  return J.create(this, this._def);
@@ -563,7 +563,7 @@ class v {
563
563
  });
564
564
  }
565
565
  brand() {
566
- return new Pe({
566
+ return new Me({
567
567
  typeName: _.ZodBranded,
568
568
  type: this,
569
569
  ...y(this._def)
@@ -599,8 +599,8 @@ class v {
599
599
  }
600
600
  }
601
601
  const gt = /^c[^\s-]{8,}$/i, yt = /^[0-9a-z]+$/, vt = /^[0-9A-HJKMNP-TV-Z]{26}$/, bt = /^[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, kt = /^[a-z0-9_-]{21}$/i, xt = /^[-+]?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)?)??$/, wt = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, St = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
602
- let Ze;
603
- const Tt = /^(?:(?: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])$/, Ot = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, jt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, He = "((\\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])))", Et = new RegExp(`^${He}$`);
602
+ let Ne;
603
+ const Tt = /^(?:(?: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])$/, jt = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, Ot = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, He = "((\\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])))", Et = new RegExp(`^${He}$`);
604
604
  function Ke(t) {
605
605
  let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
606
606
  return t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`), e;
@@ -614,9 +614,9 @@ function Ye(t) {
614
614
  return n.push(t.local ? "Z?" : "Z"), t.offset && n.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${n.join("|")})`, new RegExp(`^${e}$`);
615
615
  }
616
616
  function Zt(t, e) {
617
- return !!((e === "v4" || !e) && Tt.test(t) || (e === "v6" || !e) && Ot.test(t));
617
+ return !!((e === "v4" || !e) && Tt.test(t) || (e === "v6" || !e) && jt.test(t));
618
618
  }
619
- class O extends v {
619
+ class j extends v {
620
620
  _parse(e) {
621
621
  if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== h.string) {
622
622
  const i = this._getOrReturnCtx(e);
@@ -671,7 +671,7 @@ class O extends v {
671
671
  message: i.message
672
672
  }), s.dirty());
673
673
  else if (i.kind === "emoji")
674
- Ze || (Ze = new RegExp(St, "u")), Ze.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
674
+ Ne || (Ne = new RegExp(St, "u")), Ne.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
675
675
  validation: "emoji",
676
676
  code: d.invalid_string,
677
677
  message: i.message
@@ -752,7 +752,7 @@ class O extends v {
752
752
  validation: "ip",
753
753
  code: d.invalid_string,
754
754
  message: i.message
755
- }), s.dirty()) : i.kind === "base64" ? jt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
755
+ }), s.dirty()) : i.kind === "base64" ? Ot.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
756
756
  validation: "base64",
757
757
  code: d.invalid_string,
758
758
  message: i.message
@@ -767,7 +767,7 @@ class O extends v {
767
767
  });
768
768
  }
769
769
  _addCheck(e) {
770
- return new O({
770
+ return new j({
771
771
  ...this._def,
772
772
  checks: [...this._def.checks, e]
773
773
  });
@@ -893,19 +893,19 @@ class O extends v {
893
893
  return this.min(1, f.errToObj(e));
894
894
  }
895
895
  trim() {
896
- return new O({
896
+ return new j({
897
897
  ...this._def,
898
898
  checks: [...this._def.checks, { kind: "trim" }]
899
899
  });
900
900
  }
901
901
  toLowerCase() {
902
- return new O({
902
+ return new j({
903
903
  ...this._def,
904
904
  checks: [...this._def.checks, { kind: "toLowerCase" }]
905
905
  });
906
906
  }
907
907
  toUpperCase() {
908
- return new O({
908
+ return new j({
909
909
  ...this._def,
910
910
  checks: [...this._def.checks, { kind: "toUpperCase" }]
911
911
  });
@@ -965,9 +965,9 @@ class O extends v {
965
965
  return e;
966
966
  }
967
967
  }
968
- O.create = (t) => {
968
+ j.create = (t) => {
969
969
  var e;
970
- return new O({
970
+ return new j({
971
971
  checks: [],
972
972
  typeName: _.ZodString,
973
973
  coerce: (e = t == null ? void 0 : t.coerce) !== null && e !== void 0 ? e : !1,
@@ -1480,7 +1480,7 @@ ve.create = (t) => new ve({
1480
1480
  typeName: _.ZodVoid,
1481
1481
  ...y(t)
1482
1482
  });
1483
- class j extends v {
1483
+ class O extends v {
1484
1484
  _parse(e) {
1485
1485
  const { ctx: n, status: s } = this._processInputParams(e), a = this._def;
1486
1486
  if (n.parsedType !== h.array)
@@ -1524,19 +1524,19 @@ class j extends v {
1524
1524
  return this._def.type;
1525
1525
  }
1526
1526
  min(e, n) {
1527
- return new j({
1527
+ return new O({
1528
1528
  ...this._def,
1529
1529
  minLength: { value: e, message: f.toString(n) }
1530
1530
  });
1531
1531
  }
1532
1532
  max(e, n) {
1533
- return new j({
1533
+ return new O({
1534
1534
  ...this._def,
1535
1535
  maxLength: { value: e, message: f.toString(n) }
1536
1536
  });
1537
1537
  }
1538
1538
  length(e, n) {
1539
- return new j({
1539
+ return new O({
1540
1540
  ...this._def,
1541
1541
  exactLength: { value: e, message: f.toString(n) }
1542
1542
  });
@@ -1545,7 +1545,7 @@ class j extends v {
1545
1545
  return this.min(1, e);
1546
1546
  }
1547
1547
  }
1548
- j.create = (t, e) => new j({
1548
+ O.create = (t, e) => new O({
1549
1549
  type: t,
1550
1550
  minLength: null,
1551
1551
  maxLength: null,
@@ -1564,7 +1564,7 @@ function q(t) {
1564
1564
  ...t._def,
1565
1565
  shape: () => e
1566
1566
  });
1567
- } else return t instanceof j ? new j({
1567
+ } else return t instanceof O ? new O({
1568
1568
  ...t._def,
1569
1569
  type: q(t.element)
1570
1570
  }) : t instanceof C ? C.create(q(t.unwrap())) : t instanceof D ? D.create(q(t.unwrap())) : t instanceof N ? N.create(t.items.map((e) => q(e))) : t;
@@ -1929,7 +1929,7 @@ ae.create = (t, e) => new ae({
1929
1929
  typeName: _.ZodUnion,
1930
1930
  ...y(e)
1931
1931
  });
1932
- const I = (t) => t instanceof ce ? I(t.schema) : t instanceof E ? I(t.innerType()) : t instanceof de ? [t.value] : t instanceof $ ? t.options : t instanceof le ? b.objectValues(t.enum) : t instanceof ue ? I(t._def.innerType) : t instanceof re ? [void 0] : t instanceof se ? [null] : t instanceof C ? [void 0, ...I(t.unwrap())] : t instanceof D ? [null, ...I(t.unwrap())] : t instanceof Pe || t instanceof he ? I(t.unwrap()) : t instanceof pe ? I(t._def.innerType) : [];
1932
+ const I = (t) => t instanceof ce ? I(t.schema) : t instanceof E ? I(t.innerType()) : t instanceof de ? [t.value] : t instanceof $ ? t.options : t instanceof le ? b.objectValues(t.enum) : t instanceof ue ? I(t._def.innerType) : t instanceof re ? [void 0] : t instanceof se ? [null] : t instanceof C ? [void 0, ...I(t.unwrap())] : t instanceof D ? [null, ...I(t.unwrap())] : t instanceof Me || t instanceof he ? I(t.unwrap()) : t instanceof pe ? I(t._def.innerType) : [];
1933
1933
  class xe extends v {
1934
1934
  _parse(e) {
1935
1935
  const { ctx: n } = this._processInputParams(e);
@@ -1992,14 +1992,14 @@ class xe extends v {
1992
1992
  });
1993
1993
  }
1994
1994
  }
1995
- function Ae(t, e) {
1995
+ function Pe(t, e) {
1996
1996
  const n = A(t), s = A(e);
1997
1997
  if (t === e)
1998
1998
  return { valid: !0, data: t };
1999
1999
  if (n === h.object && s === h.object) {
2000
2000
  const a = b.objectKeys(e), i = b.objectKeys(t).filter((c) => a.indexOf(c) !== -1), o = { ...t, ...e };
2001
2001
  for (const c of i) {
2002
- const u = Ae(t[c], e[c]);
2002
+ const u = Pe(t[c], e[c]);
2003
2003
  if (!u.valid)
2004
2004
  return { valid: !1 };
2005
2005
  o[c] = u.data;
@@ -2010,7 +2010,7 @@ function Ae(t, e) {
2010
2010
  return { valid: !1 };
2011
2011
  const a = [];
2012
2012
  for (let i = 0; i < t.length; i++) {
2013
- const o = t[i], c = e[i], u = Ae(o, c);
2013
+ const o = t[i], c = e[i], u = Pe(o, c);
2014
2014
  if (!u.valid)
2015
2015
  return { valid: !1 };
2016
2016
  a.push(u.data);
@@ -2021,10 +2021,10 @@ function Ae(t, e) {
2021
2021
  class ie extends v {
2022
2022
  _parse(e) {
2023
2023
  const { status: n, ctx: s } = this._processInputParams(e), a = (i, o) => {
2024
- if (Ie(i) || Ie(o))
2024
+ if (Re(i) || Re(o))
2025
2025
  return g;
2026
- const c = Ae(i.value, o.value);
2027
- return c.valid ? ((Re(i) || Re(o)) && n.dirty(), { status: n.value, value: c.data }) : (p(s, {
2026
+ const c = Pe(i.value, o.value);
2027
+ return c.valid ? ((Ae(i) || Ae(o)) && n.dirty(), { status: n.value, value: c.data }) : (p(s, {
2028
2028
  code: d.invalid_intersection_types
2029
2029
  }), g);
2030
2030
  };
@@ -2140,7 +2140,7 @@ class oe extends v {
2140
2140
  typeName: _.ZodRecord,
2141
2141
  ...y(s)
2142
2142
  }) : new oe({
2143
- keyType: O.create(),
2143
+ keyType: j.create(),
2144
2144
  valueType: e,
2145
2145
  typeName: _.ZodRecord,
2146
2146
  ...y(n)
@@ -2715,7 +2715,7 @@ ke.create = (t) => new ke({
2715
2715
  ...y(t)
2716
2716
  });
2717
2717
  const It = Symbol("zod_brand");
2718
- class Pe extends v {
2718
+ class Me extends v {
2719
2719
  _parse(e) {
2720
2720
  const { ctx: n } = this._processInputParams(e), s = n.data;
2721
2721
  return this._def.type._parse({
@@ -2800,8 +2800,8 @@ var _;
2800
2800
  })(_ || (_ = {}));
2801
2801
  const At = (t, e = {
2802
2802
  message: `Input not instance of ${t.name}`
2803
- }) => Fe((n) => n instanceof t, e), Xe = O.create, Qe = P.create, Pt = ke.create, Mt = M.create, et = ne.create, $t = V.create, Dt = ye.create, Ut = re.create, Vt = se.create, Lt = Y.create, zt = U.create, Bt = R.create, Wt = ve.create, qt = j.create, Gt = k.create, Ht = k.strictCreate, Kt = ae.create, Yt = xe.create, Jt = ie.create, Ft = N.create, Xt = oe.create, Qt = be.create, en = L.create, tn = H.create, nn = ce.create, rn = de.create, sn = $.create, an = le.create, on = J.create, We = E.create, cn = C.create, dn = D.create, ln = E.createWithPreprocess, un = fe.create, pn = () => Xe().optional(), hn = () => Qe().optional(), fn = () => et().optional(), mn = {
2804
- string: (t) => O.create({ ...t, coerce: !0 }),
2803
+ }) => Fe((n) => n instanceof t, e), Xe = j.create, Qe = P.create, Pt = ke.create, Mt = M.create, et = ne.create, $t = V.create, Dt = ye.create, Ut = re.create, Vt = se.create, Lt = Y.create, zt = U.create, Bt = R.create, Wt = ve.create, qt = O.create, Gt = k.create, Ht = k.strictCreate, Kt = ae.create, Yt = xe.create, Jt = ie.create, Ft = N.create, Xt = oe.create, Qt = be.create, en = L.create, tn = H.create, nn = ce.create, rn = de.create, sn = $.create, an = le.create, on = J.create, We = E.create, cn = C.create, dn = D.create, ln = E.createWithPreprocess, un = fe.create, pn = () => Xe().optional(), hn = () => Qe().optional(), fn = () => et().optional(), mn = {
2804
+ string: (t) => j.create({ ...t, coerce: !0 }),
2805
2805
  number: (t) => P.create({ ...t, coerce: !0 }),
2806
2806
  boolean: (t) => ne.create({
2807
2807
  ...t,
@@ -2822,21 +2822,21 @@ var r = /* @__PURE__ */ Object.freeze({
2822
2822
  INVALID: g,
2823
2823
  DIRTY: G,
2824
2824
  OK: S,
2825
- isAborted: Ie,
2826
- isDirty: Re,
2825
+ isAborted: Re,
2826
+ isDirty: Ae,
2827
2827
  isValid: ee,
2828
2828
  isAsync: te,
2829
2829
  get util() {
2830
2830
  return b;
2831
2831
  },
2832
2832
  get objectUtil() {
2833
- return Ne;
2833
+ return Ie;
2834
2834
  },
2835
2835
  ZodParsedType: h,
2836
2836
  getParsedType: A,
2837
2837
  ZodType: v,
2838
2838
  datetimeRegex: Ye,
2839
- ZodString: O,
2839
+ ZodString: j,
2840
2840
  ZodNumber: P,
2841
2841
  ZodBigInt: M,
2842
2842
  ZodBoolean: ne,
@@ -2848,7 +2848,7 @@ var r = /* @__PURE__ */ Object.freeze({
2848
2848
  ZodUnknown: U,
2849
2849
  ZodNever: R,
2850
2850
  ZodVoid: ve,
2851
- ZodArray: j,
2851
+ ZodArray: O,
2852
2852
  ZodObject: k,
2853
2853
  ZodUnion: ae,
2854
2854
  ZodDiscriminatedUnion: xe,
@@ -2871,7 +2871,7 @@ var r = /* @__PURE__ */ Object.freeze({
2871
2871
  ZodCatch: pe,
2872
2872
  ZodNaN: ke,
2873
2873
  BRAND: It,
2874
- ZodBranded: Pe,
2874
+ ZodBranded: Me,
2875
2875
  ZodPipeline: fe,
2876
2876
  ZodReadonly: he,
2877
2877
  custom: Fe,
@@ -2927,11 +2927,11 @@ var r = /* @__PURE__ */ Object.freeze({
2927
2927
  ZodError: T
2928
2928
  });
2929
2929
  ht(r);
2930
- const zn = r.object({
2930
+ const Wn = r.object({
2931
2931
  start: r.number(),
2932
2932
  limit: r.number(),
2933
2933
  length: r.number()
2934
- }), Me = r.object({
2934
+ }), $e = r.object({
2935
2935
  created_at: r.string(),
2936
2936
  updated_at: r.string()
2937
2937
  }), gn = r.object({
@@ -2972,14 +2972,14 @@ const zn = r.object({
2972
2972
  user_id: r.string().optional(),
2973
2973
  provider: r.string().default("email"),
2974
2974
  connection: r.string().default("email")
2975
- }), bn = vn.extend(Me.shape).extend({
2975
+ }), bn = vn.extend($e.shape).extend({
2976
2976
  user_id: r.string(),
2977
2977
  // TODO: this not might be correct if you use the username
2978
2978
  email: r.string(),
2979
2979
  is_social: r.boolean(),
2980
2980
  login_count: r.number(),
2981
2981
  identities: r.array(yn).optional()
2982
- }), Bn = bn, Wn = tt.extend({
2982
+ }), qn = bn, Gn = tt.extend({
2983
2983
  email: r.string(),
2984
2984
  login_count: r.number(),
2985
2985
  multifactor: r.array(r.string()).optional(),
@@ -2995,12 +2995,12 @@ const zn = r.object({
2995
2995
  email_validation: r.enum(["enabled", "disabled", "enforced"]).default("enforced"),
2996
2996
  client_secret: r.string().default(""),
2997
2997
  disable_sign_ups: r.boolean().default(!1)
2998
- }), qn = r.object({
2998
+ }), Hn = r.object({
2999
2999
  created_at: r.string().transform((t) => t === null ? "" : t),
3000
3000
  updated_at: r.string().transform((t) => t === null ? "" : t)
3001
3001
  }).extend(kn.shape);
3002
3002
  var nt = /* @__PURE__ */ ((t) => (t.TOKEN = "token", t.TOKEN_ID_TOKEN = "token id_token", t.CODE = "code", t))(nt || {}), rt = /* @__PURE__ */ ((t) => (t.QUERY = "query", t.FRAGMENT = "fragment", t.FORM_POST = "form_post", t.WEB_MESSAGE = "web_message", t))(rt || {}), st = /* @__PURE__ */ ((t) => (t.S265 = "S256", t.plain = "plain", t))(st || {});
3003
- const $e = r.object({
3003
+ const we = r.object({
3004
3004
  client_id: r.string(),
3005
3005
  vendor_id: r.string().optional(),
3006
3006
  response_type: r.nativeEnum(nt).optional(),
@@ -3013,17 +3013,7 @@ const $e = r.object({
3013
3013
  code_challenge_method: r.nativeEnum(st).optional(),
3014
3014
  code_challenge: r.string().optional(),
3015
3015
  username: r.string().optional()
3016
- }), xn = r.object({
3017
- authParams: $e,
3018
- code: r.string(),
3019
- user_id: r.string(),
3020
- created_at: r.string(),
3021
- expires_at: r.string(),
3022
- used_at: r.string().optional()
3023
- }), Gn = r.object({
3024
- ...xn.shape,
3025
- created_at: r.string()
3026
- }), Hn = r.object({
3016
+ }), Kn = r.object({
3027
3017
  colors: r.object({
3028
3018
  primary: r.string(),
3029
3019
  page_background: r.object({
@@ -3038,7 +3028,7 @@ const $e = r.object({
3038
3028
  font: r.object({
3039
3029
  url: r.string()
3040
3030
  }).optional()
3041
- }), wn = r.object({
3031
+ }), xn = r.object({
3042
3032
  id: r.string().optional(),
3043
3033
  name: r.string(),
3044
3034
  client_id: r.string().optional(),
@@ -3057,7 +3047,7 @@ const $e = r.object({
3057
3047
  id: r.string(),
3058
3048
  created_at: r.string().transform((t) => t === null ? "" : t),
3059
3049
  updated_at: r.string().transform((t) => t === null ? "" : t)
3060
- }).extend(wn.shape), Sn = r.object({
3050
+ }).extend(xn.shape), wn = r.object({
3061
3051
  domain: r.string(),
3062
3052
  dkim_private_key: r.string().optional(),
3063
3053
  dkim_public_key: r.string().optional(),
@@ -3066,7 +3056,7 @@ const $e = r.object({
3066
3056
  }), it = r.object({
3067
3057
  id: r.string(),
3068
3058
  name: r.string(),
3069
- domains: r.array(Sn),
3059
+ domains: r.array(wn),
3070
3060
  allowed_callback_urls: r.array(r.string()),
3071
3061
  allowed_logout_urls: r.array(r.string()),
3072
3062
  allowed_web_origins: r.array(r.string()),
@@ -3089,37 +3079,55 @@ const $e = r.object({
3089
3079
  support_url: r.string().optional(),
3090
3080
  language: r.string().length(2).optional()
3091
3081
  })
3092
- }), Kn = it.extend({
3093
- connections: r.array(at)
3094
3082
  }), Yn = it.extend({
3083
+ connections: r.array(at)
3084
+ }), Jn = it.extend({
3095
3085
  connections: r.array(at.partial())
3086
+ }), Sn = r.enum([
3087
+ "password_reset",
3088
+ "email_verification",
3089
+ "otp",
3090
+ "oauth2",
3091
+ "oauth2_state",
3092
+ "ticket"
3093
+ ]), Fn = r.object({
3094
+ code_id: r.string().openapi({
3095
+ description: "The code that will be used in for instance an email verification flow"
3096
+ }),
3097
+ login_id: r.string().openapi({
3098
+ description: "The id of the login session that the code is connected to"
3099
+ }),
3100
+ code_type: Sn,
3101
+ created_at: r.string(),
3102
+ expires_at: r.string(),
3103
+ used_at: r.string().optional()
3096
3104
  }), Tn = r.object({
3097
3105
  domain: r.string(),
3098
3106
  dkim_private_key: r.string().optional(),
3099
3107
  dkim_public_key: r.string().optional(),
3100
3108
  email_api_key: r.string().optional(),
3101
3109
  email_service: r.enum(["mailgun", "mailchannels"])
3102
- }), Jn = Me.extend({
3110
+ }), Xn = $e.extend({
3103
3111
  ...Tn.shape,
3104
3112
  id: r.string()
3105
- }), On = r.object({
3113
+ }), jn = r.object({
3106
3114
  trigger_id: r.enum(["post-user-registration", "post-user-login"]),
3107
3115
  enabled: r.boolean().default(!1),
3108
3116
  url: r.string(),
3109
3117
  hook_id: r.string().optional()
3110
- }), Fn = On.extend({
3111
- ...Me.shape,
3118
+ }), Qn = jn.extend({
3119
+ ...$e.shape,
3112
3120
  hook_id: r.string()
3113
- }), jn = r.object({
3121
+ }), On = r.object({
3114
3122
  alg: r.string(),
3115
3123
  e: r.string(),
3116
3124
  kid: r.string(),
3117
3125
  kty: r.string(),
3118
3126
  n: r.string(),
3119
3127
  use: r.string().optional()
3120
- }), Xn = r.object({
3121
- keys: r.array(jn)
3122
- }), Qn = r.object({
3128
+ }), er = r.object({
3129
+ keys: r.array(On)
3130
+ }), tr = r.object({
3123
3131
  issuer: r.string(),
3124
3132
  authorization_endpoint: r.string(),
3125
3133
  token_endpoint: r.string(),
@@ -3140,9 +3148,24 @@ const $e = r.object({
3140
3148
  request_uri_parameter_supported: r.boolean(),
3141
3149
  request_parameter_supported: r.boolean(),
3142
3150
  token_endpoint_auth_signing_alg_values_supported: r.array(r.string())
3151
+ }), En = r.object({
3152
+ login_id: r.string().openapi({
3153
+ description: "This is is used as the state in the universal login"
3154
+ }),
3155
+ auth0Client: r.string().optional(),
3156
+ authParams: we,
3157
+ expires_at: r.string(),
3158
+ deleted_at: r.string(),
3159
+ ip: r.string().optional()
3160
+ }).openapi({
3161
+ description: "This represents a login sesion"
3162
+ }), nr = r.object({
3163
+ ...En.shape,
3164
+ created_at: r.string(),
3165
+ updated_at: r.string()
3143
3166
  });
3144
- var En = /* @__PURE__ */ ((t) => (t.SUCCESS_API_OPERATION = "sapi", t.SUCCESS_SILENT_AUTH = "ssa", t.FAILED_SILENT_AUTH = "fsa", t.SUCCESS_SIGNUP = "ss", t.FAILED_SIGNUP = "fs", t.SUCCESS_LOGIN = "s", t.FAILED_LOGIN = "f", t.FAILED_LOGIN_INCORRECT_PASSWORD = "fp", t.SUCCESS_LOGOUT = "slo", t.SUCCESS_CROSS_ORIGIN_AUTHENTICATION = "scoa", t.FAILED_CROSS_ORIGIN_AUTHENTICATION = "fcoa", t.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN = "seacft", t.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN = "serft", t.CODE_LINK_SENT = "cls", t.NOT_IMPLEMENTED_1 = "seccft", t))(En || {});
3145
- const Cn = r.enum([
3167
+ var Cn = /* @__PURE__ */ ((t) => (t.SUCCESS_API_OPERATION = "sapi", t.SUCCESS_SILENT_AUTH = "ssa", t.FAILED_SILENT_AUTH = "fsa", t.SUCCESS_SIGNUP = "ss", t.FAILED_SIGNUP = "fs", t.SUCCESS_LOGIN = "s", t.FAILED_LOGIN = "f", t.FAILED_LOGIN_INCORRECT_PASSWORD = "fp", t.SUCCESS_LOGOUT = "slo", t.SUCCESS_CROSS_ORIGIN_AUTHENTICATION = "scoa", t.FAILED_CROSS_ORIGIN_AUTHENTICATION = "fcoa", t.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN = "seacft", t.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN = "serft", t.CODE_LINK_SENT = "cls", t.NOT_IMPLEMENTED_1 = "seccft", t))(Cn || {});
3168
+ const Zn = r.enum([
3146
3169
  "sapi",
3147
3170
  // SUCCESS_API_OPERATION
3148
3171
  "ssa",
@@ -3174,14 +3197,14 @@ const Cn = r.enum([
3174
3197
  "seacft",
3175
3198
  // SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN
3176
3199
  "serft"
3177
- ]), Zn = r.object({
3200
+ ]), Nn = r.object({
3178
3201
  name: r.string(),
3179
3202
  version: r.string(),
3180
3203
  env: r.object({
3181
3204
  node: r.string().optional()
3182
3205
  }).optional()
3183
- }), er = r.object({
3184
- type: Cn,
3206
+ }), rr = r.object({
3207
+ type: Zn,
3185
3208
  date: r.string(),
3186
3209
  description: r.string().optional(),
3187
3210
  log_id: r.string().optional(),
@@ -3202,24 +3225,12 @@ const Cn = r.enum([
3202
3225
  strategy: r.string().optional(),
3203
3226
  strategy_type: r.string().optional(),
3204
3227
  hostname: r.string().optional(),
3205
- auth0_client: Zn.optional()
3206
- }), Nn = r.object({
3207
- id: r.string(),
3208
- email: r.string(),
3209
- code: r.string(),
3210
- ip: r.string().optional(),
3211
- send: r.enum(["code", "link"]),
3212
- authParams: $e,
3213
- expires_at: r.string(),
3214
- used_at: r.string().optional(),
3215
- user_id: r.string().optional()
3216
- }), tr = r.object({
3217
- created_at: r.string(),
3218
- ...Nn.shape
3228
+ auth0_client: Nn.optional()
3219
3229
  }), In = r.object({
3220
3230
  user_id: r.string(),
3221
- password: r.string()
3222
- }), nr = r.object({
3231
+ password: r.string(),
3232
+ algorithm: r.enum(["bcrypt", "argon2id"]).default("argon2id")
3233
+ }), sr = r.object({
3223
3234
  ...In.shape,
3224
3235
  created_at: r.string(),
3225
3236
  updated_at: r.string()
@@ -3230,16 +3241,16 @@ const Cn = r.enum([
3230
3241
  used_at: r.string(),
3231
3242
  deleted_at: r.string().optional(),
3232
3243
  user_id: r.string()
3233
- }), rr = r.object({
3244
+ }), ar = r.object({
3234
3245
  created_at: r.string(),
3235
3246
  ...Rn.shape
3236
- }), sr = r.object({
3247
+ }), ir = r.object({
3237
3248
  private_key: r.string(),
3238
3249
  public_key: r.string(),
3239
3250
  kid: r.string(),
3240
3251
  created_at: r.string(),
3241
3252
  revoked_at: r.string().optional()
3242
- }), ar = r.object({
3253
+ }), or = r.object({
3243
3254
  kid: r.string().openapi({ description: "The key id of the signing key" }),
3244
3255
  cert: r.string().openapi({ description: "The public certificate of the signing key" }),
3245
3256
  fingerprint: r.string().openapi({ description: "The cert fingerprint" }),
@@ -3268,10 +3279,10 @@ const Cn = r.enum([
3268
3279
  primary_color: r.string().optional(),
3269
3280
  secondary_color: r.string().optional(),
3270
3281
  language: r.string().optional()
3271
- }), ir = An.extend({
3282
+ }), cr = An.extend({
3272
3283
  created_at: r.string().transform((t) => t === null ? "" : t),
3273
3284
  updated_at: r.string().transform((t) => t === null ? "" : t)
3274
- }), or = r.object({
3285
+ }), dr = r.object({
3275
3286
  logoUrl: r.string(),
3276
3287
  loginBackgroundImage: r.string().nullish(),
3277
3288
  style: r.object({
@@ -3290,7 +3301,7 @@ const Cn = r.enum([
3290
3301
  manageSubscriptionsUrl: r.string().optional()
3291
3302
  });
3292
3303
  var ot = /* @__PURE__ */ ((t) => (t.RefreshToken = "refresh_token", t.AuthorizationCode = "authorization_code", t.ClientCredential = "client_credentials", t.Passwordless = "passwordless", t.Password = "password", t))(ot || {});
3293
- const De = r.nativeEnum(ot), cr = r.object({
3304
+ const De = r.nativeEnum(ot), lr = r.object({
3294
3305
  grant_type: De.refine(
3295
3306
  (t) => t === "authorization_code"
3296
3307
  /* AuthorizationCode */
@@ -3298,7 +3309,7 @@ const De = r.nativeEnum(ot), cr = r.object({
3298
3309
  code: r.string(),
3299
3310
  client_secret: r.string(),
3300
3311
  client_id: r.string()
3301
- }), dr = r.object({
3312
+ }), ur = r.object({
3302
3313
  grant_type: De.refine(
3303
3314
  (t) => t === "authorization_code"
3304
3315
  /* AuthorizationCode */
@@ -3307,7 +3318,7 @@ const De = r.nativeEnum(ot), cr = r.object({
3307
3318
  code_verifier: r.string(),
3308
3319
  client_id: r.string().optional(),
3309
3320
  redirect_uri: r.string()
3310
- }), lr = r.object({
3321
+ }), pr = r.object({
3311
3322
  grant_type: De.refine(
3312
3323
  (t) => t === "client_credentials"
3313
3324
  /* ClientCredential */
@@ -3331,15 +3342,6 @@ r.object({
3331
3342
  state: r.string().optional()
3332
3343
  });
3333
3344
  const Pn = r.object({
3334
- id: r.string(),
3335
- expires_at: r.string(),
3336
- auth0Client: r.string().optional(),
3337
- authParams: $e
3338
- }), ur = r.object({
3339
- ...Pn.shape,
3340
- created_at: r.string(),
3341
- updated_at: r.string()
3342
- }), Mn = r.object({
3343
3345
  button_border_radius: r.number(),
3344
3346
  button_border_weight: r.number(),
3345
3347
  buttons_style: r.enum(["pill"]),
@@ -3349,7 +3351,7 @@ const Pn = r.object({
3349
3351
  show_widget_shadow: r.boolean(),
3350
3352
  widget_border_weight: r.number(),
3351
3353
  widget_corner_radius: r.number()
3352
- }), $n = r.object({
3354
+ }), Mn = r.object({
3353
3355
  base_focus_color: r.string(),
3354
3356
  base_hover_color: r.string(),
3355
3357
  body_text: r.string(),
@@ -3372,7 +3374,7 @@ const Pn = r.object({
3372
3374
  }), W = r.object({
3373
3375
  bold: r.boolean(),
3374
3376
  size: r.number()
3375
- }), Dn = r.object({
3377
+ }), $n = r.object({
3376
3378
  body_text: W,
3377
3379
  buttons_text: W,
3378
3380
  font_url: r.string(),
@@ -3382,88 +3384,124 @@ const Pn = r.object({
3382
3384
  reference_text_size: r.number(),
3383
3385
  subtitle: W,
3384
3386
  title: W
3385
- }), Un = r.object({
3387
+ }), Dn = r.object({
3386
3388
  background_color: r.string(),
3387
3389
  background_image_url: r.string(),
3388
3390
  page_layout: r.enum(["center"])
3389
- }), Vn = r.object({
3391
+ }), Un = r.object({
3390
3392
  header_text_alignment: r.enum(["center"]),
3391
3393
  logo_height: r.number(),
3392
3394
  logo_position: r.enum(["center"]),
3393
3395
  logo_url: r.string(),
3394
3396
  social_buttons_layout: r.enum(["bottom"])
3395
- }), Ln = r.object({
3396
- borders: Mn,
3397
- colors: $n,
3397
+ }), Vn = r.object({
3398
+ borders: Pn,
3399
+ colors: Mn,
3398
3400
  displayName: r.string(),
3399
- fonts: Dn,
3400
- page_background: Un,
3401
- widget: Vn
3402
- }), pr = Ln.extend({
3401
+ fonts: $n,
3402
+ page_background: Dn,
3403
+ widget: Un
3404
+ }), hr = Vn.extend({
3403
3405
  themeId: r.string()
3406
+ }), Ln = r.object({
3407
+ id: r.string(),
3408
+ expires_at: r.string(),
3409
+ auth0Client: r.string().optional(),
3410
+ authParams: we
3411
+ }), fr = r.object({
3412
+ ...Ln.shape,
3413
+ created_at: r.string(),
3414
+ updated_at: r.string()
3415
+ }), zn = r.object({
3416
+ id: r.string(),
3417
+ email: r.string(),
3418
+ code: r.string(),
3419
+ ip: r.string().optional(),
3420
+ send: r.enum(["code", "link"]),
3421
+ authParams: we,
3422
+ expires_at: r.string(),
3423
+ used_at: r.string().optional(),
3424
+ user_id: r.string().optional()
3425
+ }), mr = r.object({
3426
+ created_at: r.string(),
3427
+ ...zn.shape
3428
+ }), Bn = r.object({
3429
+ authParams: we,
3430
+ code: r.string(),
3431
+ user_id: r.string(),
3432
+ created_at: r.string(),
3433
+ expires_at: r.string(),
3434
+ used_at: r.string().optional()
3435
+ }), _r = r.object({
3436
+ ...Bn.shape,
3437
+ created_at: r.string()
3404
3438
  });
3405
- function hr(t) {
3439
+ function gr(t) {
3406
3440
  const [e, n] = t.split("|");
3407
3441
  if (!e || !n)
3408
3442
  throw new Error(`Invalid user_id: ${t}`);
3409
3443
  return { connection: e, id: n };
3410
3444
  }
3411
3445
  export {
3412
- Zn as Auth0Client,
3446
+ Nn as Auth0Client,
3413
3447
  rt as AuthorizationResponseMode,
3414
3448
  nt as AuthorizationResponseType,
3415
- Kn as ClientSchema,
3449
+ Yn as ClientSchema,
3416
3450
  st as CodeChallengeMethod,
3417
3451
  ot as GrantType,
3418
- En as LogTypes,
3419
- Yn as PartialClientSchema,
3452
+ Cn as LogTypes,
3453
+ Jn as PartialClientSchema,
3420
3454
  kn as applicationInsertSchema,
3421
- qn as applicationSchema,
3422
- Bn as auth0UserResponseSchema,
3423
- $e as authParamsSchema,
3424
- xn as authenticationCodeInsertSchema,
3425
- Gn as authenticationCodeSchema,
3426
- cr as authorizationCodeGrantTypeParamsSchema,
3455
+ Hn as applicationSchema,
3456
+ qn as auth0UserResponseSchema,
3457
+ we as authParamsSchema,
3458
+ Bn as authenticationCodeInsertSchema,
3459
+ _r as authenticationCodeSchema,
3460
+ lr as authorizationCodeGrantTypeParamsSchema,
3427
3461
  tt as baseUserSchema,
3428
- Mn as bordersSchema,
3429
- Hn as brandingSchema,
3430
- sr as certificateSchema,
3431
- lr as clientCredentialGrantTypeParamsSchema,
3432
- $n as colorsSchema,
3433
- wn as connectionInsertSchema,
3462
+ Pn as bordersSchema,
3463
+ Kn as brandingSchema,
3464
+ ir as certificateSchema,
3465
+ pr as clientCredentialGrantTypeParamsSchema,
3466
+ Fn as codeSchema,
3467
+ Sn as codeTypeSchema,
3468
+ Mn as colorsSchema,
3469
+ xn as connectionInsertSchema,
3434
3470
  at as connectionSchema,
3435
3471
  Tn as domainInsertSchema,
3436
- Jn as domainSchema,
3472
+ Xn as domainSchema,
3437
3473
  W as fontDetailsSchema,
3438
- Dn as fontsSchema,
3439
- On as hookInsertSchema,
3440
- Fn as hookSchema,
3474
+ $n as fontsSchema,
3475
+ jn as hookInsertSchema,
3476
+ Qn as hookSchema,
3441
3477
  yn as identitySchema,
3442
- Xn as jwksKeySchema,
3443
- jn as jwksSchema,
3444
- er as logSchema,
3445
- Qn as openIDConfigurationSchema,
3446
- Nn as otpInsertSchema,
3447
- tr as otpSchema,
3448
- Un as pageBackgroundSchema,
3449
- hr as parseUserId,
3478
+ er as jwksKeySchema,
3479
+ On as jwksSchema,
3480
+ rr as logSchema,
3481
+ En as loginInsertSchema,
3482
+ nr as loginSchema,
3483
+ tr as openIDConfigurationSchema,
3484
+ zn as otpInsertSchema,
3485
+ mr as otpSchema,
3486
+ Dn as pageBackgroundSchema,
3487
+ gr as parseUserId,
3450
3488
  In as passwordInsertSchema,
3451
- nr as passwordSchema,
3452
- dr as pkceAuthorizationCodeGrantTypeParamsSchema,
3489
+ sr as passwordSchema,
3490
+ ur as pkceAuthorizationCodeGrantTypeParamsSchema,
3453
3491
  gn as profileDataSchema,
3454
3492
  Rn as sessionInsertSchema,
3455
- rr as sessionSchema,
3456
- ar as signingKeySchema,
3493
+ ar as sessionSchema,
3494
+ or as signingKeySchema,
3457
3495
  An as tenantInsertSchema,
3458
- ir as tenantSchema,
3459
- Ln as themeInsertSchema,
3460
- pr as themeSchema,
3461
- zn as totalsSchema,
3462
- Pn as universalLoginSessionInsertSchema,
3463
- ur as universalLoginSessionSchema,
3496
+ cr as tenantSchema,
3497
+ Vn as themeInsertSchema,
3498
+ hr as themeSchema,
3499
+ Wn as totalsSchema,
3500
+ Ln as universalLoginSessionInsertSchema,
3501
+ fr as universalLoginSessionSchema,
3464
3502
  vn as userInsertSchema,
3465
- Wn as userResponseSchema,
3503
+ Gn as userResponseSchema,
3466
3504
  bn as userSchema,
3467
- or as vendorSettingsSchema,
3468
- Vn as widgetSchema
3505
+ dr as vendorSettingsSchema,
3506
+ Un as widgetSchema
3469
3507
  };