@authhero/kysely-adapter 0.7.4 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kysely-adapter.cjs +1 -1
- package/dist/kysely-adapter.d.ts +100 -85
- package/dist/kysely-adapter.iife.js +1 -1
- package/dist/kysely-adapter.mjs +240 -252
- package/package.json +2 -2
package/dist/kysely-adapter.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var Yt = (n, e, t) =>
|
|
1
|
+
var Kn = Object.defineProperty;
|
|
2
|
+
var Qn = (n, e, t) => e in n ? Kn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var Yt = (n, e, t) => Qn(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
var Et = class extends Error {
|
|
5
5
|
constructor(e = 500, t) {
|
|
6
6
|
super(t == null ? void 0 : t.message, { cause: t == null ? void 0 : t.cause });
|
|
@@ -17,7 +17,7 @@ var Et = class extends Error {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
function
|
|
20
|
+
function Hn(n) {
|
|
21
21
|
return async (e, t) => {
|
|
22
22
|
const { identities: s, ...r } = t, a = {
|
|
23
23
|
...r,
|
|
@@ -47,7 +47,7 @@ function R(n) {
|
|
|
47
47
|
e[t] === null ? delete e[t] : typeof e[t] == "object" && (Array.isArray(e[t]) ? e[t] = e[t].map(R) : e[t] = R(e[t]));
|
|
48
48
|
return e;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function Yn(n, e) {
|
|
51
51
|
var t = {};
|
|
52
52
|
for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && e.indexOf(s) < 0 && (t[s] = n[s]);
|
|
53
53
|
if (n != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -55,7 +55,7 @@ function Gn(n, e) {
|
|
|
55
55
|
e.indexOf(s[r]) < 0 && Object.prototype.propertyIsEnumerable.call(n, s[r]) && (t[s[r]] = n[s[r]]);
|
|
56
56
|
return t;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function Gn(n, e) {
|
|
59
59
|
var t;
|
|
60
60
|
return ((t = n == null ? void 0 : n._def) === null || t === void 0 ? void 0 : t.typeName) === e;
|
|
61
61
|
}
|
|
@@ -66,15 +66,15 @@ function Qe(n, e) {
|
|
|
66
66
|
return r._def.openapi = this._def.openapi, r;
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function Xn(n) {
|
|
70
70
|
if (typeof n.ZodType.prototype.openapi < "u")
|
|
71
71
|
return;
|
|
72
72
|
n.ZodType.prototype.openapi = function(r, a) {
|
|
73
73
|
var o, c, d, u, l, T;
|
|
74
|
-
const C = typeof r == "string" ? a : r, L = C ?? {}, { param: K } = L, re =
|
|
74
|
+
const C = typeof r == "string" ? a : r, L = C ?? {}, { param: K } = L, re = Yn(L, ["param"]), ce = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof r == "string" ? { refId: r } : void 0), de = Object.assign(Object.assign(Object.assign({}, (c = this._def.openapi) === null || c === void 0 ? void 0 : c.metadata), re), !((u = (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata) === null || u === void 0) && u.param || K ? {
|
|
75
75
|
param: Object.assign(Object.assign({}, (T = (l = this._def.openapi) === null || l === void 0 ? void 0 : l.metadata) === null || T === void 0 ? void 0 : T.param), K)
|
|
76
76
|
} : void 0), ue = new this.constructor(Object.assign(Object.assign({}, this._def), { openapi: Object.assign(Object.assign({}, Object.keys(ce).length > 0 ? { _internal: ce } : void 0), Object.keys(de).length > 0 ? { metadata: de } : void 0) }));
|
|
77
|
-
if (
|
|
77
|
+
if (Gn(this, "ZodObject")) {
|
|
78
78
|
const $e = this.extend;
|
|
79
79
|
ue.extend = function(...Pe) {
|
|
80
80
|
var Q, H, Y, le, Te, Oe;
|
|
@@ -212,7 +212,7 @@ const _ = N.arrayToEnum([
|
|
|
212
212
|
"invalid_intersection_types",
|
|
213
213
|
"not_multiple_of",
|
|
214
214
|
"not_finite"
|
|
215
|
-
]),
|
|
215
|
+
]), es = (n) => JSON.stringify(n, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
216
216
|
class V extends Error {
|
|
217
217
|
constructor(e) {
|
|
218
218
|
super(), this.issues = [], this.addIssue = (s) => {
|
|
@@ -329,12 +329,12 @@ const ze = (n, e) => {
|
|
|
329
329
|
}
|
|
330
330
|
return { message: t };
|
|
331
331
|
};
|
|
332
|
-
let
|
|
333
|
-
function
|
|
334
|
-
|
|
332
|
+
let wn = ze;
|
|
333
|
+
function ts(n) {
|
|
334
|
+
wn = n;
|
|
335
335
|
}
|
|
336
336
|
function At() {
|
|
337
|
-
return
|
|
337
|
+
return wn;
|
|
338
338
|
}
|
|
339
339
|
const Rt = (n) => {
|
|
340
340
|
const { data: e, path: t, errorMaps: s, issueData: r } = n, a = [...t, ...r.path || []], o = {
|
|
@@ -356,7 +356,7 @@ const Rt = (n) => {
|
|
|
356
356
|
path: a,
|
|
357
357
|
message: c
|
|
358
358
|
};
|
|
359
|
-
},
|
|
359
|
+
}, ns = [];
|
|
360
360
|
function f(n, e) {
|
|
361
361
|
const t = At(), s = Rt({
|
|
362
362
|
issueData: e,
|
|
@@ -420,7 +420,7 @@ function Pt(n, e, t, s) {
|
|
|
420
420
|
if (typeof e == "function" ? n !== e || !s : !e.has(n)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
421
421
|
return e.get(n);
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function kn(n, e, t, s, r) {
|
|
424
424
|
if (typeof e == "function" ? n !== e || !r : !e.has(n)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
425
425
|
return e.set(n, t), t;
|
|
426
426
|
}
|
|
@@ -437,7 +437,7 @@ class ee {
|
|
|
437
437
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
const
|
|
440
|
+
const fn = (n, e) => {
|
|
441
441
|
if (tt(e))
|
|
442
442
|
return { success: !0, data: e.value };
|
|
443
443
|
if (!n.common.issues.length)
|
|
@@ -527,7 +527,7 @@ class Z {
|
|
|
527
527
|
data: e,
|
|
528
528
|
parsedType: he(e)
|
|
529
529
|
}, a = this._parseSync({ data: e, path: r.path, parent: r });
|
|
530
|
-
return
|
|
530
|
+
return fn(r, a);
|
|
531
531
|
}
|
|
532
532
|
async parseAsync(e, t) {
|
|
533
533
|
const s = await this.safeParseAsync(e, t);
|
|
@@ -548,7 +548,7 @@ class Z {
|
|
|
548
548
|
data: e,
|
|
549
549
|
parsedType: he(e)
|
|
550
550
|
}, r = this._parse({ data: e, path: s.path, parent: s }), a = await (nt(r) ? r : Promise.resolve(r));
|
|
551
|
-
return
|
|
551
|
+
return fn(s, a);
|
|
552
552
|
}
|
|
553
553
|
refine(e, t) {
|
|
554
554
|
const s = (r) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(r) : t;
|
|
@@ -647,23 +647,23 @@ class Z {
|
|
|
647
647
|
return this.safeParse(null).success;
|
|
648
648
|
}
|
|
649
649
|
}
|
|
650
|
-
const
|
|
650
|
+
const ss = /^c[^\s-]{8,}$/i, rs = /^[0-9a-z]+$/, as = /^[0-9A-HJKMNP-TV-Z]{26}$/, is = /^[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, os = /^[a-z0-9_-]{21}$/i, 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, us = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
651
651
|
let Gt;
|
|
652
|
-
const
|
|
653
|
-
function
|
|
652
|
+
const ls = /^(?:(?: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])$/, ps = /^(([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})))$/, hs = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, bn = "((\\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])))", fs = new RegExp(`^${bn}$`);
|
|
653
|
+
function xn(n) {
|
|
654
654
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
655
655
|
return n.precision ? e = `${e}\\.\\d{${n.precision}}` : n.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
656
656
|
}
|
|
657
|
-
function
|
|
658
|
-
return new RegExp(`^${
|
|
657
|
+
function ms(n) {
|
|
658
|
+
return new RegExp(`^${xn(n)}$`);
|
|
659
659
|
}
|
|
660
|
-
function
|
|
661
|
-
let e = `${
|
|
660
|
+
function Tn(n) {
|
|
661
|
+
let e = `${bn}T${xn(n)}`;
|
|
662
662
|
const t = [];
|
|
663
663
|
return t.push(n.local ? "Z?" : "Z"), n.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
|
|
664
664
|
}
|
|
665
|
-
function
|
|
666
|
-
return !!((e === "v4" || !e) &&
|
|
665
|
+
function _s(n, e) {
|
|
666
|
+
return !!((e === "v4" || !e) && ls.test(n) || (e === "v6" || !e) && ps.test(n));
|
|
667
667
|
}
|
|
668
668
|
class F extends Z {
|
|
669
669
|
_parse(e) {
|
|
@@ -714,43 +714,43 @@ class F extends Z {
|
|
|
714
714
|
message: r.message
|
|
715
715
|
}), t.dirty());
|
|
716
716
|
} else if (r.kind === "email")
|
|
717
|
-
|
|
717
|
+
ds.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
718
718
|
validation: "email",
|
|
719
719
|
code: p.invalid_string,
|
|
720
720
|
message: r.message
|
|
721
721
|
}), t.dirty());
|
|
722
722
|
else if (r.kind === "emoji")
|
|
723
|
-
Gt || (Gt = new RegExp(
|
|
723
|
+
Gt || (Gt = new RegExp(us, "u")), Gt.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
724
724
|
validation: "emoji",
|
|
725
725
|
code: p.invalid_string,
|
|
726
726
|
message: r.message
|
|
727
727
|
}), t.dirty());
|
|
728
728
|
else if (r.kind === "uuid")
|
|
729
|
-
|
|
729
|
+
is.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
730
730
|
validation: "uuid",
|
|
731
731
|
code: p.invalid_string,
|
|
732
732
|
message: r.message
|
|
733
733
|
}), t.dirty());
|
|
734
734
|
else if (r.kind === "nanoid")
|
|
735
|
-
|
|
735
|
+
os.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
736
736
|
validation: "nanoid",
|
|
737
737
|
code: p.invalid_string,
|
|
738
738
|
message: r.message
|
|
739
739
|
}), t.dirty());
|
|
740
740
|
else if (r.kind === "cuid")
|
|
741
|
-
|
|
741
|
+
ss.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
742
742
|
validation: "cuid",
|
|
743
743
|
code: p.invalid_string,
|
|
744
744
|
message: r.message
|
|
745
745
|
}), t.dirty());
|
|
746
746
|
else if (r.kind === "cuid2")
|
|
747
|
-
|
|
747
|
+
rs.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
748
748
|
validation: "cuid2",
|
|
749
749
|
code: p.invalid_string,
|
|
750
750
|
message: r.message
|
|
751
751
|
}), t.dirty());
|
|
752
752
|
else if (r.kind === "ulid")
|
|
753
|
-
|
|
753
|
+
as.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
754
754
|
validation: "ulid",
|
|
755
755
|
code: p.invalid_string,
|
|
756
756
|
message: r.message
|
|
@@ -781,27 +781,27 @@ class F extends Z {
|
|
|
781
781
|
code: p.invalid_string,
|
|
782
782
|
validation: { endsWith: r.value },
|
|
783
783
|
message: r.message
|
|
784
|
-
}), t.dirty()) : r.kind === "datetime" ?
|
|
784
|
+
}), t.dirty()) : r.kind === "datetime" ? Tn(r).test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
785
785
|
code: p.invalid_string,
|
|
786
786
|
validation: "datetime",
|
|
787
787
|
message: r.message
|
|
788
|
-
}), t.dirty()) : r.kind === "date" ?
|
|
788
|
+
}), t.dirty()) : r.kind === "date" ? fs.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
789
789
|
code: p.invalid_string,
|
|
790
790
|
validation: "date",
|
|
791
791
|
message: r.message
|
|
792
|
-
}), t.dirty()) : r.kind === "time" ?
|
|
792
|
+
}), t.dirty()) : r.kind === "time" ? ms(r).test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
793
793
|
code: p.invalid_string,
|
|
794
794
|
validation: "time",
|
|
795
795
|
message: r.message
|
|
796
|
-
}), t.dirty()) : r.kind === "duration" ?
|
|
796
|
+
}), t.dirty()) : r.kind === "duration" ? cs.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
797
797
|
validation: "duration",
|
|
798
798
|
code: p.invalid_string,
|
|
799
799
|
message: r.message
|
|
800
|
-
}), t.dirty()) : r.kind === "ip" ?
|
|
800
|
+
}), t.dirty()) : r.kind === "ip" ? _s(e.data, r.version) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
801
801
|
validation: "ip",
|
|
802
802
|
code: p.invalid_string,
|
|
803
803
|
message: r.message
|
|
804
|
-
}), t.dirty()) : r.kind === "base64" ?
|
|
804
|
+
}), t.dirty()) : r.kind === "base64" ? hs.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
805
805
|
validation: "base64",
|
|
806
806
|
code: p.invalid_string,
|
|
807
807
|
message: r.message
|
|
@@ -1023,7 +1023,7 @@ F.create = (n) => {
|
|
|
1023
1023
|
...O(n)
|
|
1024
1024
|
});
|
|
1025
1025
|
};
|
|
1026
|
-
function
|
|
1026
|
+
function gs(n, e) {
|
|
1027
1027
|
const t = (n.toString().split(".")[1] || "").length, s = (e.toString().split(".")[1] || "").length, r = t > s ? t : s, a = parseInt(n.toFixed(r).replace(".", "")), o = parseInt(e.toFixed(r).replace(".", ""));
|
|
1028
1028
|
return a % o / Math.pow(10, r);
|
|
1029
1029
|
}
|
|
@@ -1062,7 +1062,7 @@ class me extends Z {
|
|
|
1062
1062
|
inclusive: r.inclusive,
|
|
1063
1063
|
exact: !1,
|
|
1064
1064
|
message: r.message
|
|
1065
|
-
}), s.dirty()) : r.kind === "multipleOf" ?
|
|
1065
|
+
}), s.dirty()) : r.kind === "multipleOf" ? gs(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), f(t, {
|
|
1066
1066
|
code: p.not_multiple_of,
|
|
1067
1067
|
multipleOf: r.value,
|
|
1068
1068
|
message: r.message
|
|
@@ -1881,7 +1881,7 @@ class E extends Z {
|
|
|
1881
1881
|
});
|
|
1882
1882
|
}
|
|
1883
1883
|
keyof() {
|
|
1884
|
-
return
|
|
1884
|
+
return On(N.objectKeys(this.shape));
|
|
1885
1885
|
}
|
|
1886
1886
|
}
|
|
1887
1887
|
E.create = (n, e) => new E({
|
|
@@ -2444,7 +2444,7 @@ ut.create = (n, e) => new ut({
|
|
|
2444
2444
|
typeName: w.ZodLiteral,
|
|
2445
2445
|
...O(e)
|
|
2446
2446
|
});
|
|
2447
|
-
function
|
|
2447
|
+
function On(n, e) {
|
|
2448
2448
|
return new ge({
|
|
2449
2449
|
values: n,
|
|
2450
2450
|
typeName: w.ZodEnum,
|
|
@@ -2464,7 +2464,7 @@ class ge extends Z {
|
|
|
2464
2464
|
code: p.invalid_type
|
|
2465
2465
|
}), x;
|
|
2466
2466
|
}
|
|
2467
|
-
if (Pt(this, Ye) ||
|
|
2467
|
+
if (Pt(this, Ye) || kn(this, Ye, new Set(this._def.values)), !Pt(this, Ye).has(e.data)) {
|
|
2468
2468
|
const t = this._getOrReturnCtx(e), s = this._def.values;
|
|
2469
2469
|
return f(t, {
|
|
2470
2470
|
received: t.data,
|
|
@@ -2509,7 +2509,7 @@ class ge extends Z {
|
|
|
2509
2509
|
}
|
|
2510
2510
|
}
|
|
2511
2511
|
Ye = /* @__PURE__ */ new WeakMap();
|
|
2512
|
-
ge.create =
|
|
2512
|
+
ge.create = On;
|
|
2513
2513
|
class lt extends Z {
|
|
2514
2514
|
constructor() {
|
|
2515
2515
|
super(...arguments), Ge.set(this, void 0);
|
|
@@ -2524,7 +2524,7 @@ class lt extends Z {
|
|
|
2524
2524
|
code: p.invalid_type
|
|
2525
2525
|
}), x;
|
|
2526
2526
|
}
|
|
2527
|
-
if (Pt(this, Ge) ||
|
|
2527
|
+
if (Pt(this, Ge) || kn(this, Ge, new Set(N.getValidEnumValues(this._def.values))), !Pt(this, Ge).has(e.data)) {
|
|
2528
2528
|
const r = N.objectValues(t);
|
|
2529
2529
|
return f(s, {
|
|
2530
2530
|
received: s.data,
|
|
@@ -2763,7 +2763,7 @@ Vt.create = (n) => new Vt({
|
|
|
2763
2763
|
typeName: w.ZodNaN,
|
|
2764
2764
|
...O(n)
|
|
2765
2765
|
});
|
|
2766
|
-
const
|
|
2766
|
+
const ys = Symbol("zod_brand");
|
|
2767
2767
|
class dn extends Z {
|
|
2768
2768
|
_parse(e) {
|
|
2769
2769
|
const { ctx: t } = this._processInputParams(e), s = t.data;
|
|
@@ -2831,7 +2831,7 @@ ft.create = (n, e) => new ft({
|
|
|
2831
2831
|
typeName: w.ZodReadonly,
|
|
2832
2832
|
...O(e)
|
|
2833
2833
|
});
|
|
2834
|
-
function
|
|
2834
|
+
function Sn(n, e = {}, t) {
|
|
2835
2835
|
return n ? Be.create().superRefine((s, r) => {
|
|
2836
2836
|
var a, o;
|
|
2837
2837
|
if (!n(s)) {
|
|
@@ -2840,16 +2840,16 @@ function Zn(n, e = {}, t) {
|
|
|
2840
2840
|
}
|
|
2841
2841
|
}) : Be.create();
|
|
2842
2842
|
}
|
|
2843
|
-
const
|
|
2843
|
+
const vs = {
|
|
2844
2844
|
object: E.lazycreate
|
|
2845
2845
|
};
|
|
2846
2846
|
var w;
|
|
2847
2847
|
(function(n) {
|
|
2848
2848
|
n.ZodString = "ZodString", n.ZodNumber = "ZodNumber", n.ZodNaN = "ZodNaN", n.ZodBigInt = "ZodBigInt", n.ZodBoolean = "ZodBoolean", n.ZodDate = "ZodDate", n.ZodSymbol = "ZodSymbol", n.ZodUndefined = "ZodUndefined", n.ZodNull = "ZodNull", n.ZodAny = "ZodAny", n.ZodUnknown = "ZodUnknown", n.ZodNever = "ZodNever", n.ZodVoid = "ZodVoid", n.ZodArray = "ZodArray", n.ZodObject = "ZodObject", n.ZodUnion = "ZodUnion", n.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", n.ZodIntersection = "ZodIntersection", n.ZodTuple = "ZodTuple", n.ZodRecord = "ZodRecord", n.ZodMap = "ZodMap", n.ZodSet = "ZodSet", n.ZodFunction = "ZodFunction", n.ZodLazy = "ZodLazy", n.ZodLiteral = "ZodLiteral", n.ZodEnum = "ZodEnum", n.ZodEffects = "ZodEffects", n.ZodNativeEnum = "ZodNativeEnum", n.ZodOptional = "ZodOptional", n.ZodNullable = "ZodNullable", n.ZodDefault = "ZodDefault", n.ZodCatch = "ZodCatch", n.ZodPromise = "ZodPromise", n.ZodBranded = "ZodBranded", n.ZodPipeline = "ZodPipeline", n.ZodReadonly = "ZodReadonly";
|
|
2849
2849
|
})(w || (w = {}));
|
|
2850
|
-
const
|
|
2850
|
+
const ws = (n, e = {
|
|
2851
2851
|
message: `Input not instance of ${n.name}`
|
|
2852
|
-
}) =>
|
|
2852
|
+
}) => Sn((t) => t instanceof n, e), Zn = F.create, jn = me.create, ks = Vt.create, bs = _e.create, Nn = st.create, xs = Ne.create, Ts = Dt.create, Os = rt.create, Ss = at.create, Zs = Be.create, js = Ze.create, Ns = ie.create, Is = Mt.create, Cs = B.create, Es = E.create, As = E.strictCreate, Rs = it.create, $s = Kt.create, Ps = ot.create, Ds = te.create, Ms = ct.create, Ls = Lt.create, Vs = Ie.create, Us = Ue.create, Fs = dt.create, zs = ut.create, Bs = ge.create, Ws = lt.create, qs = We.create, mn = q.create, Js = G.create, Ks = ye.create, Qs = q.createWithPreprocess, Hs = Nt.create, Ys = () => Zn().optional(), Gs = () => jn().optional(), Xs = () => Nn().optional(), er = {
|
|
2853
2853
|
string: (n) => F.create({ ...n, coerce: !0 }),
|
|
2854
2854
|
number: (n) => me.create({ ...n, coerce: !0 }),
|
|
2855
2855
|
boolean: (n) => st.create({
|
|
@@ -2858,14 +2858,14 @@ const ks = (n, e = {
|
|
|
2858
2858
|
}),
|
|
2859
2859
|
bigint: (n) => _e.create({ ...n, coerce: !0 }),
|
|
2860
2860
|
date: (n) => Ne.create({ ...n, coerce: !0 })
|
|
2861
|
-
},
|
|
2861
|
+
}, tr = x;
|
|
2862
2862
|
var i = /* @__PURE__ */ Object.freeze({
|
|
2863
2863
|
__proto__: null,
|
|
2864
2864
|
defaultErrorMap: ze,
|
|
2865
|
-
setErrorMap:
|
|
2865
|
+
setErrorMap: ts,
|
|
2866
2866
|
getErrorMap: At,
|
|
2867
2867
|
makeIssue: Rt,
|
|
2868
|
-
EMPTY_PATH:
|
|
2868
|
+
EMPTY_PATH: ns,
|
|
2869
2869
|
addIssueToContext: f,
|
|
2870
2870
|
ParseStatus: $,
|
|
2871
2871
|
INVALID: x,
|
|
@@ -2884,7 +2884,7 @@ var i = /* @__PURE__ */ Object.freeze({
|
|
|
2884
2884
|
ZodParsedType: _,
|
|
2885
2885
|
getParsedType: he,
|
|
2886
2886
|
ZodType: Z,
|
|
2887
|
-
datetimeRegex:
|
|
2887
|
+
datetimeRegex: Tn,
|
|
2888
2888
|
ZodString: F,
|
|
2889
2889
|
ZodNumber: me,
|
|
2890
2890
|
ZodBigInt: _e,
|
|
@@ -2919,63 +2919,63 @@ var i = /* @__PURE__ */ Object.freeze({
|
|
|
2919
2919
|
ZodDefault: pt,
|
|
2920
2920
|
ZodCatch: ht,
|
|
2921
2921
|
ZodNaN: Vt,
|
|
2922
|
-
BRAND:
|
|
2922
|
+
BRAND: ys,
|
|
2923
2923
|
ZodBranded: dn,
|
|
2924
2924
|
ZodPipeline: Nt,
|
|
2925
2925
|
ZodReadonly: ft,
|
|
2926
|
-
custom:
|
|
2926
|
+
custom: Sn,
|
|
2927
2927
|
Schema: Z,
|
|
2928
2928
|
ZodSchema: Z,
|
|
2929
|
-
late:
|
|
2929
|
+
late: vs,
|
|
2930
2930
|
get ZodFirstPartyTypeKind() {
|
|
2931
2931
|
return w;
|
|
2932
2932
|
},
|
|
2933
|
-
coerce:
|
|
2934
|
-
any:
|
|
2935
|
-
array:
|
|
2936
|
-
bigint:
|
|
2937
|
-
boolean:
|
|
2938
|
-
date:
|
|
2939
|
-
discriminatedUnion:
|
|
2940
|
-
effect:
|
|
2941
|
-
enum:
|
|
2942
|
-
function:
|
|
2943
|
-
instanceof:
|
|
2944
|
-
intersection:
|
|
2945
|
-
lazy:
|
|
2946
|
-
literal:
|
|
2947
|
-
map:
|
|
2948
|
-
nan:
|
|
2949
|
-
nativeEnum:
|
|
2950
|
-
never:
|
|
2951
|
-
null:
|
|
2952
|
-
nullable:
|
|
2953
|
-
number:
|
|
2954
|
-
object:
|
|
2955
|
-
oboolean:
|
|
2956
|
-
onumber:
|
|
2957
|
-
optional:
|
|
2958
|
-
ostring:
|
|
2959
|
-
pipeline:
|
|
2960
|
-
preprocess:
|
|
2961
|
-
promise:
|
|
2962
|
-
record:
|
|
2963
|
-
set:
|
|
2964
|
-
strictObject:
|
|
2965
|
-
string:
|
|
2966
|
-
symbol:
|
|
2967
|
-
transformer:
|
|
2968
|
-
tuple:
|
|
2969
|
-
undefined:
|
|
2970
|
-
union:
|
|
2971
|
-
unknown:
|
|
2972
|
-
void:
|
|
2973
|
-
NEVER:
|
|
2933
|
+
coerce: er,
|
|
2934
|
+
any: Zs,
|
|
2935
|
+
array: Cs,
|
|
2936
|
+
bigint: bs,
|
|
2937
|
+
boolean: Nn,
|
|
2938
|
+
date: xs,
|
|
2939
|
+
discriminatedUnion: $s,
|
|
2940
|
+
effect: mn,
|
|
2941
|
+
enum: Bs,
|
|
2942
|
+
function: Us,
|
|
2943
|
+
instanceof: ws,
|
|
2944
|
+
intersection: Ps,
|
|
2945
|
+
lazy: Fs,
|
|
2946
|
+
literal: zs,
|
|
2947
|
+
map: Ls,
|
|
2948
|
+
nan: ks,
|
|
2949
|
+
nativeEnum: Ws,
|
|
2950
|
+
never: Ns,
|
|
2951
|
+
null: Ss,
|
|
2952
|
+
nullable: Ks,
|
|
2953
|
+
number: jn,
|
|
2954
|
+
object: Es,
|
|
2955
|
+
oboolean: Xs,
|
|
2956
|
+
onumber: Gs,
|
|
2957
|
+
optional: Js,
|
|
2958
|
+
ostring: Ys,
|
|
2959
|
+
pipeline: Hs,
|
|
2960
|
+
preprocess: Qs,
|
|
2961
|
+
promise: qs,
|
|
2962
|
+
record: Ms,
|
|
2963
|
+
set: Vs,
|
|
2964
|
+
strictObject: As,
|
|
2965
|
+
string: Zn,
|
|
2966
|
+
symbol: Ts,
|
|
2967
|
+
transformer: mn,
|
|
2968
|
+
tuple: Ds,
|
|
2969
|
+
undefined: Os,
|
|
2970
|
+
union: Rs,
|
|
2971
|
+
unknown: js,
|
|
2972
|
+
void: Is,
|
|
2973
|
+
NEVER: tr,
|
|
2974
2974
|
ZodIssueCode: p,
|
|
2975
|
-
quotelessJson:
|
|
2975
|
+
quotelessJson: es,
|
|
2976
2976
|
ZodError: V
|
|
2977
2977
|
});
|
|
2978
|
-
|
|
2978
|
+
Xn(i);
|
|
2979
2979
|
i.object({
|
|
2980
2980
|
start: i.number(),
|
|
2981
2981
|
limit: i.number(),
|
|
@@ -2984,7 +2984,7 @@ i.object({
|
|
|
2984
2984
|
const un = i.object({
|
|
2985
2985
|
created_at: i.string(),
|
|
2986
2986
|
updated_at: i.string()
|
|
2987
|
-
}),
|
|
2987
|
+
}), nr = i.object({
|
|
2988
2988
|
email: i.string().optional(),
|
|
2989
2989
|
email_verified: i.boolean().optional(),
|
|
2990
2990
|
name: i.string().optional(),
|
|
@@ -2993,7 +2993,7 @@ const un = i.object({
|
|
|
2993
2993
|
phone_number: i.string().optional(),
|
|
2994
2994
|
phone_verified: i.boolean().optional(),
|
|
2995
2995
|
family_name: i.string().optional()
|
|
2996
|
-
}).catchall(i.any()),
|
|
2996
|
+
}).catchall(i.any()), sr = i.object({
|
|
2997
2997
|
connection: i.string(),
|
|
2998
2998
|
user_id: i.string(),
|
|
2999
2999
|
provider: i.string(),
|
|
@@ -3001,8 +3001,8 @@ const un = i.object({
|
|
|
3001
3001
|
access_token: i.string().optional(),
|
|
3002
3002
|
access_token_secret: i.string().optional(),
|
|
3003
3003
|
refresh_token: i.string().optional(),
|
|
3004
|
-
profileData:
|
|
3005
|
-
}),
|
|
3004
|
+
profileData: nr.optional()
|
|
3005
|
+
}), In = i.object({
|
|
3006
3006
|
email: i.string().optional(),
|
|
3007
3007
|
username: i.string().optional(),
|
|
3008
3008
|
given_name: i.string().optional(),
|
|
@@ -3014,7 +3014,7 @@ const un = i.object({
|
|
|
3014
3014
|
linked_to: i.string().optional(),
|
|
3015
3015
|
profileData: i.string().optional(),
|
|
3016
3016
|
user_id: i.string().optional()
|
|
3017
|
-
}),
|
|
3017
|
+
}), rr = In.extend({
|
|
3018
3018
|
email_verified: i.boolean().default(!1),
|
|
3019
3019
|
verify_email: i.boolean().optional(),
|
|
3020
3020
|
last_ip: i.string().optional(),
|
|
@@ -3023,15 +3023,15 @@ const un = i.object({
|
|
|
3023
3023
|
provider: i.string().default("email"),
|
|
3024
3024
|
connection: i.string().default("email")
|
|
3025
3025
|
});
|
|
3026
|
-
|
|
3026
|
+
rr.extend(un.shape).extend({
|
|
3027
3027
|
user_id: i.string(),
|
|
3028
3028
|
// TODO: this not might be correct if you use the username
|
|
3029
3029
|
email: i.string(),
|
|
3030
3030
|
is_social: i.boolean(),
|
|
3031
3031
|
login_count: i.number(),
|
|
3032
|
-
identities: i.array(
|
|
3032
|
+
identities: i.array(sr).optional()
|
|
3033
3033
|
});
|
|
3034
|
-
|
|
3034
|
+
In.extend({
|
|
3035
3035
|
email: i.string(),
|
|
3036
3036
|
login_count: i.number(),
|
|
3037
3037
|
multifactor: i.array(i.string()).optional(),
|
|
@@ -3039,7 +3039,7 @@ Cn.extend({
|
|
|
3039
3039
|
last_login: i.string().optional(),
|
|
3040
3040
|
user_id: i.string()
|
|
3041
3041
|
}).catchall(i.any());
|
|
3042
|
-
const
|
|
3042
|
+
const ar = i.object({
|
|
3043
3043
|
id: i.string(),
|
|
3044
3044
|
name: i.string(),
|
|
3045
3045
|
callbacks: i.array(i.string()).openapi({
|
|
@@ -3064,22 +3064,23 @@ const ir = i.object({
|
|
|
3064
3064
|
disable_sign_ups: i.boolean().default(!1).openapi({
|
|
3065
3065
|
description: "Prevents users from signing up using the hosted login page. This is not available in auth0"
|
|
3066
3066
|
})
|
|
3067
|
-
}),
|
|
3067
|
+
}), ir = i.object({
|
|
3068
3068
|
created_at: i.string().transform((n) => n === null ? "" : n),
|
|
3069
|
-
updated_at: i.string().transform((n) => n === null ? "" : n)
|
|
3070
|
-
|
|
3071
|
-
|
|
3069
|
+
updated_at: i.string().transform((n) => n === null ? "" : n),
|
|
3070
|
+
...ar.shape
|
|
3071
|
+
});
|
|
3072
|
+
var Cn = /* @__PURE__ */ ((n) => (n.TOKEN = "token", n.TOKEN_ID_TOKEN = "token id_token", n.CODE = "code", n))(Cn || {}), En = /* @__PURE__ */ ((n) => (n.QUERY = "query", n.FRAGMENT = "fragment", n.FORM_POST = "form_post", n.WEB_MESSAGE = "web_message", n.SAML_POST = "saml_post", n))(En || {}), An = /* @__PURE__ */ ((n) => (n.S265 = "S256", n.plain = "plain", n))(An || {});
|
|
3072
3073
|
const Qt = i.object({
|
|
3073
3074
|
client_id: i.string(),
|
|
3074
3075
|
vendor_id: i.string().optional(),
|
|
3075
|
-
response_type: i.nativeEnum(
|
|
3076
|
-
response_mode: i.nativeEnum(
|
|
3076
|
+
response_type: i.nativeEnum(Cn).optional(),
|
|
3077
|
+
response_mode: i.nativeEnum(En).optional(),
|
|
3077
3078
|
redirect_uri: i.string().optional(),
|
|
3078
3079
|
audience: i.string().optional(),
|
|
3079
3080
|
state: i.string().optional(),
|
|
3080
3081
|
nonce: i.string().optional(),
|
|
3081
3082
|
scope: i.string().optional(),
|
|
3082
|
-
code_challenge_method: i.nativeEnum(
|
|
3083
|
+
code_challenge_method: i.nativeEnum(An).optional(),
|
|
3083
3084
|
code_challenge: i.string().optional(),
|
|
3084
3085
|
username: i.string().optional()
|
|
3085
3086
|
});
|
|
@@ -3099,7 +3100,7 @@ i.object({
|
|
|
3099
3100
|
url: i.string()
|
|
3100
3101
|
}).optional()
|
|
3101
3102
|
});
|
|
3102
|
-
const
|
|
3103
|
+
const or = i.object({
|
|
3103
3104
|
id: i.string().optional(),
|
|
3104
3105
|
name: i.string(),
|
|
3105
3106
|
client_id: i.string().optional(),
|
|
@@ -3114,58 +3115,78 @@ const cr = i.object({
|
|
|
3114
3115
|
token_exchange_basic_auth: i.boolean().optional(),
|
|
3115
3116
|
userinfo_endpoint: i.string().optional(),
|
|
3116
3117
|
scope: i.string().optional()
|
|
3117
|
-
}),
|
|
3118
|
+
}), Rn = i.object({
|
|
3118
3119
|
id: i.string(),
|
|
3119
3120
|
created_at: i.string().transform((n) => n === null ? "" : n),
|
|
3120
3121
|
updated_at: i.string().transform((n) => n === null ? "" : n)
|
|
3121
|
-
}).extend(
|
|
3122
|
+
}).extend(or.shape), cr = i.object({
|
|
3123
|
+
name: i.string(),
|
|
3124
|
+
audience: i.string(),
|
|
3125
|
+
sender_email: i.string().email(),
|
|
3126
|
+
sender_name: i.string(),
|
|
3127
|
+
support_url: i.string().url().optional(),
|
|
3128
|
+
logo: i.string().url().optional(),
|
|
3129
|
+
primary_color: i.string().optional(),
|
|
3130
|
+
secondary_color: i.string().optional(),
|
|
3131
|
+
language: i.string().optional()
|
|
3132
|
+
}), dr = i.object({
|
|
3133
|
+
created_at: i.string().transform((n) => n === null ? "" : n),
|
|
3134
|
+
updated_at: i.string().transform((n) => n === null ? "" : n),
|
|
3135
|
+
id: i.string(),
|
|
3136
|
+
...cr.shape
|
|
3137
|
+
});
|
|
3138
|
+
i.object({
|
|
3139
|
+
logoUrl: i.string(),
|
|
3140
|
+
loginBackgroundImage: i.string().nullish(),
|
|
3141
|
+
style: i.object({
|
|
3142
|
+
primaryColor: i.string(),
|
|
3143
|
+
buttonTextColor: i.string(),
|
|
3144
|
+
primaryHoverColor: i.string()
|
|
3145
|
+
}),
|
|
3146
|
+
supportEmail: i.string().nullable(),
|
|
3147
|
+
supportUrl: i.string().nullable(),
|
|
3148
|
+
name: i.string(),
|
|
3149
|
+
showGreyishBackground: i.boolean().optional(),
|
|
3150
|
+
termsAndConditionsUrl: i.string().nullable(),
|
|
3151
|
+
companyName: i.string().optional(),
|
|
3152
|
+
checkoutHideSocial: i.boolean().optional(),
|
|
3153
|
+
siteUrl: i.string().nullable(),
|
|
3154
|
+
manageSubscriptionsUrl: i.string().optional()
|
|
3155
|
+
});
|
|
3156
|
+
const ur = i.object({
|
|
3122
3157
|
domain: i.string(),
|
|
3123
3158
|
dkim_private_key: i.string().optional(),
|
|
3124
3159
|
dkim_public_key: i.string().optional(),
|
|
3125
3160
|
email_api_key: i.string().optional(),
|
|
3126
3161
|
email_service: i.union([i.literal("mailgun"), i.literal("mailchannels")]).optional()
|
|
3127
|
-
}), $n = i.object({
|
|
3128
|
-
...or.shape,
|
|
3129
|
-
domains: i.array(dr),
|
|
3130
|
-
tenant: i.object({
|
|
3131
|
-
name: i.string(),
|
|
3132
|
-
audience: i.string().optional(),
|
|
3133
|
-
logo: i.string().optional(),
|
|
3134
|
-
primary_color: i.string().optional(),
|
|
3135
|
-
secondary_color: i.string().optional(),
|
|
3136
|
-
sender_email: i.string(),
|
|
3137
|
-
sender_name: i.string(),
|
|
3138
|
-
support_url: i.string().optional(),
|
|
3139
|
-
language: i.string().length(2).optional()
|
|
3140
|
-
})
|
|
3141
|
-
});
|
|
3142
|
-
$n.extend({
|
|
3143
|
-
connections: i.array(ln)
|
|
3144
3162
|
});
|
|
3145
|
-
|
|
3146
|
-
|
|
3163
|
+
i.object({
|
|
3164
|
+
...ir.shape,
|
|
3165
|
+
domains: i.array(ur),
|
|
3166
|
+
tenant: dr,
|
|
3167
|
+
connections: i.array(Rn)
|
|
3147
3168
|
});
|
|
3148
|
-
const
|
|
3169
|
+
const lr = i.enum([
|
|
3149
3170
|
"password_reset",
|
|
3150
3171
|
"email_verification",
|
|
3151
3172
|
"otp",
|
|
3152
3173
|
"oauth2",
|
|
3153
3174
|
"oauth2_state",
|
|
3154
3175
|
"ticket"
|
|
3155
|
-
]),
|
|
3176
|
+
]), pr = i.object({
|
|
3156
3177
|
code_id: i.string().openapi({
|
|
3157
3178
|
description: "The code that will be used in for instance an email verification flow"
|
|
3158
3179
|
}),
|
|
3159
3180
|
login_id: i.string().openapi({
|
|
3160
3181
|
description: "The id of the login session that the code is connected to"
|
|
3161
3182
|
}),
|
|
3162
|
-
code_type:
|
|
3183
|
+
code_type: lr,
|
|
3163
3184
|
expires_at: i.string(),
|
|
3164
3185
|
used_at: i.string().optional()
|
|
3165
|
-
}), pr = i.object({
|
|
3166
|
-
...lr.shape,
|
|
3167
|
-
created_at: i.string()
|
|
3168
3186
|
}), hr = i.object({
|
|
3187
|
+
...pr.shape,
|
|
3188
|
+
created_at: i.string()
|
|
3189
|
+
}), fr = i.object({
|
|
3169
3190
|
domain: i.string(),
|
|
3170
3191
|
dkim_private_key: i.string().optional(),
|
|
3171
3192
|
dkim_public_key: i.string().optional(),
|
|
@@ -3173,10 +3194,10 @@ const ur = i.enum([
|
|
|
3173
3194
|
email_service: i.enum(["mailgun", "mailchannels"])
|
|
3174
3195
|
});
|
|
3175
3196
|
un.extend({
|
|
3176
|
-
...
|
|
3197
|
+
...fr.shape,
|
|
3177
3198
|
id: i.string()
|
|
3178
3199
|
});
|
|
3179
|
-
const
|
|
3200
|
+
const mr = i.object({
|
|
3180
3201
|
trigger_id: i.enum([
|
|
3181
3202
|
"pre-user-signup",
|
|
3182
3203
|
"post-user-registration",
|
|
@@ -3188,11 +3209,11 @@ const fr = i.object({
|
|
|
3188
3209
|
synchronous: i.boolean().default(!1),
|
|
3189
3210
|
priority: i.number().optional()
|
|
3190
3211
|
});
|
|
3191
|
-
|
|
3212
|
+
mr.extend({
|
|
3192
3213
|
...un.shape,
|
|
3193
3214
|
hook_id: i.string()
|
|
3194
3215
|
});
|
|
3195
|
-
const
|
|
3216
|
+
const _r = i.object({
|
|
3196
3217
|
alg: i.string(),
|
|
3197
3218
|
e: i.string(),
|
|
3198
3219
|
kid: i.string(),
|
|
@@ -3201,7 +3222,7 @@ const mr = i.object({
|
|
|
3201
3222
|
use: i.string().optional()
|
|
3202
3223
|
});
|
|
3203
3224
|
i.object({
|
|
3204
|
-
keys: i.array(
|
|
3225
|
+
keys: i.array(_r)
|
|
3205
3226
|
});
|
|
3206
3227
|
i.object({
|
|
3207
3228
|
issuer: i.string(),
|
|
@@ -3225,7 +3246,7 @@ i.object({
|
|
|
3225
3246
|
request_parameter_supported: i.boolean(),
|
|
3226
3247
|
token_endpoint_auth_signing_alg_values_supported: i.array(i.string())
|
|
3227
3248
|
});
|
|
3228
|
-
const
|
|
3249
|
+
const gr = i.object({
|
|
3229
3250
|
auth0Client: i.string().optional(),
|
|
3230
3251
|
authParams: Qt,
|
|
3231
3252
|
expires_at: i.string(),
|
|
@@ -3233,14 +3254,14 @@ const _r = i.object({
|
|
|
3233
3254
|
ip: i.string().optional()
|
|
3234
3255
|
}).openapi({
|
|
3235
3256
|
description: "This represents a login sesion"
|
|
3236
|
-
}),
|
|
3237
|
-
...
|
|
3257
|
+
}), yr = i.object({
|
|
3258
|
+
...gr.shape,
|
|
3238
3259
|
login_id: i.string().openapi({
|
|
3239
3260
|
description: "This is is used as the state in the universal login"
|
|
3240
3261
|
}),
|
|
3241
3262
|
created_at: i.string(),
|
|
3242
3263
|
updated_at: i.string()
|
|
3243
|
-
}),
|
|
3264
|
+
}), vr = i.enum([
|
|
3244
3265
|
"cls",
|
|
3245
3266
|
// CODE_LINK_SENT
|
|
3246
3267
|
"fsa",
|
|
@@ -3289,7 +3310,7 @@ const _r = i.object({
|
|
|
3289
3310
|
// SUCCESS_VERIFICATION_EMAIL
|
|
3290
3311
|
"svr"
|
|
3291
3312
|
// SUCCESS_VERIFICATION_EMAIL_REQUEST
|
|
3292
|
-
]),
|
|
3313
|
+
]), wr = i.object({
|
|
3293
3314
|
name: i.string(),
|
|
3294
3315
|
version: i.string(),
|
|
3295
3316
|
env: i.object({
|
|
@@ -3297,7 +3318,7 @@ const _r = i.object({
|
|
|
3297
3318
|
}).optional()
|
|
3298
3319
|
});
|
|
3299
3320
|
i.object({
|
|
3300
|
-
type:
|
|
3321
|
+
type: vr,
|
|
3301
3322
|
date: i.string(),
|
|
3302
3323
|
description: i.string().optional(),
|
|
3303
3324
|
log_id: i.string().optional(),
|
|
@@ -3318,19 +3339,19 @@ i.object({
|
|
|
3318
3339
|
strategy: i.string().optional(),
|
|
3319
3340
|
strategy_type: i.string().optional(),
|
|
3320
3341
|
hostname: i.string().optional(),
|
|
3321
|
-
auth0_client:
|
|
3342
|
+
auth0_client: wr.optional()
|
|
3322
3343
|
});
|
|
3323
|
-
const
|
|
3344
|
+
const kr = i.object({
|
|
3324
3345
|
user_id: i.string(),
|
|
3325
3346
|
password: i.string(),
|
|
3326
3347
|
algorithm: i.enum(["bcrypt", "argon2id"]).default("argon2id")
|
|
3327
3348
|
});
|
|
3328
3349
|
i.object({
|
|
3329
|
-
...
|
|
3350
|
+
...kr.shape,
|
|
3330
3351
|
created_at: i.string(),
|
|
3331
3352
|
updated_at: i.string()
|
|
3332
3353
|
});
|
|
3333
|
-
const
|
|
3354
|
+
const br = i.object({
|
|
3334
3355
|
session_id: i.string(),
|
|
3335
3356
|
client_id: i.string(),
|
|
3336
3357
|
expires_at: i.string(),
|
|
@@ -3340,7 +3361,7 @@ const kr = i.object({
|
|
|
3340
3361
|
});
|
|
3341
3362
|
i.object({
|
|
3342
3363
|
created_at: i.string(),
|
|
3343
|
-
...
|
|
3364
|
+
...br.shape
|
|
3344
3365
|
});
|
|
3345
3366
|
i.object({
|
|
3346
3367
|
private_key: i.string(),
|
|
@@ -3369,43 +3390,10 @@ i.object({
|
|
|
3369
3390
|
revoked: i.boolean().optional().openapi({ description: "True if the key is revoked" }),
|
|
3370
3391
|
revoked_at: i.string().optional().openapi({ description: "The date and time when the key was revoked" })
|
|
3371
3392
|
});
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
audience: i.string(),
|
|
3375
|
-
sender_email: i.string().email(),
|
|
3376
|
-
sender_name: i.string(),
|
|
3377
|
-
support_url: i.string().url().optional(),
|
|
3378
|
-
logo: i.string().url().optional(),
|
|
3379
|
-
primary_color: i.string().optional(),
|
|
3380
|
-
secondary_color: i.string().optional(),
|
|
3381
|
-
language: i.string().optional()
|
|
3382
|
-
});
|
|
3383
|
-
br.extend({
|
|
3384
|
-
created_at: i.string().transform((n) => n === null ? "" : n),
|
|
3385
|
-
updated_at: i.string().transform((n) => n === null ? "" : n)
|
|
3386
|
-
});
|
|
3393
|
+
var $n = /* @__PURE__ */ ((n) => (n.RefreshToken = "refresh_token", n.AuthorizationCode = "authorization_code", n.ClientCredential = "client_credentials", n.Passwordless = "passwordless", n.Password = "password", n))($n || {});
|
|
3394
|
+
const ln = i.nativeEnum($n);
|
|
3387
3395
|
i.object({
|
|
3388
|
-
|
|
3389
|
-
loginBackgroundImage: i.string().nullish(),
|
|
3390
|
-
style: i.object({
|
|
3391
|
-
primaryColor: i.string(),
|
|
3392
|
-
buttonTextColor: i.string(),
|
|
3393
|
-
primaryHoverColor: i.string()
|
|
3394
|
-
}),
|
|
3395
|
-
supportEmail: i.string().nullable(),
|
|
3396
|
-
supportUrl: i.string().nullable(),
|
|
3397
|
-
name: i.string(),
|
|
3398
|
-
showGreyishBackground: i.boolean().optional(),
|
|
3399
|
-
termsAndConditionsUrl: i.string().nullable(),
|
|
3400
|
-
companyName: i.string().optional(),
|
|
3401
|
-
checkoutHideSocial: i.boolean().optional(),
|
|
3402
|
-
siteUrl: i.string().nullable(),
|
|
3403
|
-
manageSubscriptionsUrl: i.string().optional()
|
|
3404
|
-
});
|
|
3405
|
-
var Pn = /* @__PURE__ */ ((n) => (n.RefreshToken = "refresh_token", n.AuthorizationCode = "authorization_code", n.ClientCredential = "client_credentials", n.Passwordless = "passwordless", n.Password = "password", n))(Pn || {});
|
|
3406
|
-
const pn = i.nativeEnum(Pn);
|
|
3407
|
-
i.object({
|
|
3408
|
-
grant_type: pn.refine(
|
|
3396
|
+
grant_type: ln.refine(
|
|
3409
3397
|
(n) => n === "authorization_code"
|
|
3410
3398
|
/* AuthorizationCode */
|
|
3411
3399
|
),
|
|
@@ -3414,7 +3402,7 @@ i.object({
|
|
|
3414
3402
|
client_id: i.string()
|
|
3415
3403
|
});
|
|
3416
3404
|
i.object({
|
|
3417
|
-
grant_type:
|
|
3405
|
+
grant_type: ln.refine(
|
|
3418
3406
|
(n) => n === "authorization_code"
|
|
3419
3407
|
/* AuthorizationCode */
|
|
3420
3408
|
),
|
|
@@ -3424,7 +3412,7 @@ i.object({
|
|
|
3424
3412
|
redirect_uri: i.string()
|
|
3425
3413
|
});
|
|
3426
3414
|
i.object({
|
|
3427
|
-
grant_type:
|
|
3415
|
+
grant_type: ln.refine(
|
|
3428
3416
|
(n) => n === "client_credentials"
|
|
3429
3417
|
/* ClientCredential */
|
|
3430
3418
|
),
|
|
@@ -3548,13 +3536,13 @@ i.object({
|
|
|
3548
3536
|
...Cr.shape,
|
|
3549
3537
|
created_at: i.string()
|
|
3550
3538
|
});
|
|
3551
|
-
function
|
|
3539
|
+
function pn(n) {
|
|
3552
3540
|
const [e, t] = n.split("|");
|
|
3553
3541
|
if (!e || !t)
|
|
3554
3542
|
throw new Error(`Invalid user_id: ${n}`);
|
|
3555
3543
|
return { connection: e, id: t };
|
|
3556
3544
|
}
|
|
3557
|
-
function
|
|
3545
|
+
function Pn(n) {
|
|
3558
3546
|
let e = {};
|
|
3559
3547
|
try {
|
|
3560
3548
|
e = JSON.parse(n.profileData || "{}");
|
|
@@ -3564,7 +3552,7 @@ function Dn(n) {
|
|
|
3564
3552
|
return {
|
|
3565
3553
|
connection: n.connection,
|
|
3566
3554
|
provider: n.provider,
|
|
3567
|
-
user_id:
|
|
3555
|
+
user_id: pn(n.user_id).id,
|
|
3568
3556
|
isSocial: !!n.is_social,
|
|
3569
3557
|
profileData: {
|
|
3570
3558
|
email: n.email,
|
|
@@ -3590,10 +3578,10 @@ function Er(n) {
|
|
|
3590
3578
|
{
|
|
3591
3579
|
connection: s.connection,
|
|
3592
3580
|
provider: s.provider,
|
|
3593
|
-
user_id:
|
|
3581
|
+
user_id: pn(s.user_id).id,
|
|
3594
3582
|
isSocial: !!s.is_social
|
|
3595
3583
|
},
|
|
3596
|
-
...r.map(
|
|
3584
|
+
...r.map(Pn)
|
|
3597
3585
|
]
|
|
3598
3586
|
};
|
|
3599
3587
|
return R(c);
|
|
@@ -3658,10 +3646,10 @@ function Ar(n) {
|
|
|
3658
3646
|
{
|
|
3659
3647
|
connection: l.connection,
|
|
3660
3648
|
provider: l.provider,
|
|
3661
|
-
user_id:
|
|
3649
|
+
user_id: pn(l.user_id).id,
|
|
3662
3650
|
isSocial: !!l.is_social
|
|
3663
3651
|
},
|
|
3664
|
-
...T.map(
|
|
3652
|
+
...T.map(Pn)
|
|
3665
3653
|
]
|
|
3666
3654
|
});
|
|
3667
3655
|
}), { count: u } = await s.select((l) => l.fn.countAll().as("count")).executeTakeFirstOrThrow();
|
|
@@ -3698,7 +3686,7 @@ function Dr(n) {
|
|
|
3698
3686
|
}
|
|
3699
3687
|
function Mr(n) {
|
|
3700
3688
|
return {
|
|
3701
|
-
create:
|
|
3689
|
+
create: Hn(n),
|
|
3702
3690
|
remove: Rr(n),
|
|
3703
3691
|
get: Er(n),
|
|
3704
3692
|
list: Ar(n),
|
|
@@ -3775,7 +3763,7 @@ function Wr(n) {
|
|
|
3775
3763
|
remove: Br(n)
|
|
3776
3764
|
};
|
|
3777
3765
|
}
|
|
3778
|
-
function
|
|
3766
|
+
function _n(n) {
|
|
3779
3767
|
return n ? JSON.stringify(n) : void 0;
|
|
3780
3768
|
}
|
|
3781
3769
|
const qr = 1024;
|
|
@@ -3794,12 +3782,12 @@ function Jr(n) {
|
|
|
3794
3782
|
isMobile: t.isMobile ? 1 : 0,
|
|
3795
3783
|
tenant_id: e,
|
|
3796
3784
|
scope: (a = t.scope) == null ? void 0 : a.join(","),
|
|
3797
|
-
auth0_client:
|
|
3798
|
-
details: (o =
|
|
3785
|
+
auth0_client: _n(t.auth0_client),
|
|
3786
|
+
details: (o = _n(t.details)) == null ? void 0 : o.substring(0, 8192)
|
|
3799
3787
|
}).execute(), s;
|
|
3800
3788
|
};
|
|
3801
3789
|
}
|
|
3802
|
-
function
|
|
3790
|
+
function gn(n) {
|
|
3803
3791
|
if (!n)
|
|
3804
3792
|
return "";
|
|
3805
3793
|
try {
|
|
@@ -3808,13 +3796,13 @@ function yn(n) {
|
|
|
3808
3796
|
return n;
|
|
3809
3797
|
}
|
|
3810
3798
|
}
|
|
3811
|
-
function
|
|
3799
|
+
function Dn(n) {
|
|
3812
3800
|
return {
|
|
3813
3801
|
...n,
|
|
3814
3802
|
client_id: n.client_id,
|
|
3815
3803
|
client_name: "",
|
|
3816
|
-
auth0_client:
|
|
3817
|
-
details:
|
|
3804
|
+
auth0_client: gn(n.auth0_client),
|
|
3805
|
+
details: gn(n.details),
|
|
3818
3806
|
isMobile: !!n.isMobile,
|
|
3819
3807
|
scope: n.scope ? n.scope.split(",") : void 0,
|
|
3820
3808
|
log_id: n.id,
|
|
@@ -3836,7 +3824,7 @@ function Kr(n) {
|
|
|
3836
3824
|
r = r.offset(t.page * t.per_page).limit(t.per_page);
|
|
3837
3825
|
const a = await r.selectAll().execute(), { count: o } = await s.select((c) => c.fn.countAll().as("count")).executeTakeFirstOrThrow();
|
|
3838
3826
|
return {
|
|
3839
|
-
logs: a.map(
|
|
3827
|
+
logs: a.map(Dn),
|
|
3840
3828
|
start: t.page * t.per_page,
|
|
3841
3829
|
limit: t.per_page,
|
|
3842
3830
|
length: xe(o)
|
|
@@ -3846,7 +3834,7 @@ function Kr(n) {
|
|
|
3846
3834
|
function Qr(n) {
|
|
3847
3835
|
return async (e, t) => {
|
|
3848
3836
|
const s = await n.selectFrom("logs").where("logs.tenant_id", "=", e).where("logs.id", "=", t).selectAll().executeTakeFirst();
|
|
3849
|
-
return s ?
|
|
3837
|
+
return s ? Dn(s) : null;
|
|
3850
3838
|
};
|
|
3851
3839
|
}
|
|
3852
3840
|
function Hr(n) {
|
|
@@ -4058,7 +4046,7 @@ function ma(n) {
|
|
|
4058
4046
|
return {
|
|
4059
4047
|
codes: a.map((d) => {
|
|
4060
4048
|
const { tenant_id: u, ...l } = d;
|
|
4061
|
-
return
|
|
4049
|
+
return hr.parse(R(l));
|
|
4062
4050
|
}),
|
|
4063
4051
|
start: t.page * t.per_page,
|
|
4064
4052
|
limit: t.per_page,
|
|
@@ -4292,7 +4280,7 @@ function Pa(n) {
|
|
|
4292
4280
|
return {
|
|
4293
4281
|
...t,
|
|
4294
4282
|
connections: r.map(
|
|
4295
|
-
(c) =>
|
|
4283
|
+
(c) => Rn.parse(R(c))
|
|
4296
4284
|
),
|
|
4297
4285
|
domains: a,
|
|
4298
4286
|
addons: t.addons ? JSON.parse(t.addons) : {},
|
|
@@ -4808,12 +4796,12 @@ const qe = (n, e) => {
|
|
|
4808
4796
|
}
|
|
4809
4797
|
return { message: t };
|
|
4810
4798
|
};
|
|
4811
|
-
let
|
|
4799
|
+
let Mn = qe;
|
|
4812
4800
|
function ii(n) {
|
|
4813
|
-
|
|
4801
|
+
Mn = n;
|
|
4814
4802
|
}
|
|
4815
4803
|
function Ut() {
|
|
4816
|
-
return
|
|
4804
|
+
return Mn;
|
|
4817
4805
|
}
|
|
4818
4806
|
const Ft = (n) => {
|
|
4819
4807
|
const { data: e, path: t, errorMaps: s, issueData: r } = n, a = [...t, ...r.path || []], o = {
|
|
@@ -4899,7 +4887,7 @@ function zt(n, e, t, s) {
|
|
|
4899
4887
|
if (typeof e == "function" ? n !== e || !s : !e.has(n)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4900
4888
|
return e.get(n);
|
|
4901
4889
|
}
|
|
4902
|
-
function
|
|
4890
|
+
function Ln(n, e, t, s, r) {
|
|
4903
4891
|
if (typeof e == "function" ? n !== e || !r : !e.has(n)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
4904
4892
|
return e.set(n, t), t;
|
|
4905
4893
|
}
|
|
@@ -4916,7 +4904,7 @@ class ne {
|
|
|
4916
4904
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
4917
4905
|
}
|
|
4918
4906
|
}
|
|
4919
|
-
const
|
|
4907
|
+
const yn = (n, e) => {
|
|
4920
4908
|
if (mt(e))
|
|
4921
4909
|
return { success: !0, data: e.value };
|
|
4922
4910
|
if (!n.common.issues.length)
|
|
@@ -5006,7 +4994,7 @@ class j {
|
|
|
5006
4994
|
data: e,
|
|
5007
4995
|
parsedType: fe(e)
|
|
5008
4996
|
}, a = this._parseSync({ data: e, path: r.path, parent: r });
|
|
5009
|
-
return
|
|
4997
|
+
return yn(r, a);
|
|
5010
4998
|
}
|
|
5011
4999
|
async parseAsync(e, t) {
|
|
5012
5000
|
const s = await this.safeParseAsync(e, t);
|
|
@@ -5027,7 +5015,7 @@ class j {
|
|
|
5027
5015
|
data: e,
|
|
5028
5016
|
parsedType: fe(e)
|
|
5029
5017
|
}, r = this._parse({ data: e, path: s.path, parent: s }), a = await (_t(r) ? r : Promise.resolve(r));
|
|
5030
|
-
return
|
|
5018
|
+
return yn(s, a);
|
|
5031
5019
|
}
|
|
5032
5020
|
refine(e, t) {
|
|
5033
5021
|
const s = (r) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(r) : t;
|
|
@@ -5091,7 +5079,7 @@ class j {
|
|
|
5091
5079
|
});
|
|
5092
5080
|
}
|
|
5093
5081
|
brand() {
|
|
5094
|
-
return new
|
|
5082
|
+
return new hn({
|
|
5095
5083
|
typeName: k.ZodBranded,
|
|
5096
5084
|
type: this,
|
|
5097
5085
|
...S(this._def)
|
|
@@ -5128,16 +5116,16 @@ class j {
|
|
|
5128
5116
|
}
|
|
5129
5117
|
const ci = /^c[^\s-]{8,}$/i, di = /^[0-9a-z]+$/, ui = /^[0-9A-HJKMNP-TV-Z]{26}$/, li = /^[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, pi = /^[a-z0-9_-]{21}$/i, hi = /^[-+]?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)?)??$/, fi = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, mi = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
5130
5118
|
let Xt;
|
|
5131
|
-
const _i = /^(?:(?: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])$/, gi = /^(([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})))$/, yi = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,
|
|
5132
|
-
function
|
|
5119
|
+
const _i = /^(?:(?: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])$/, gi = /^(([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})))$/, yi = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Vn = "((\\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])))", vi = new RegExp(`^${Vn}$`);
|
|
5120
|
+
function Un(n) {
|
|
5133
5121
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
5134
5122
|
return n.precision ? e = `${e}\\.\\d{${n.precision}}` : n.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
5135
5123
|
}
|
|
5136
5124
|
function wi(n) {
|
|
5137
|
-
return new RegExp(`^${
|
|
5125
|
+
return new RegExp(`^${Un(n)}$`);
|
|
5138
5126
|
}
|
|
5139
|
-
function
|
|
5140
|
-
let e = `${
|
|
5127
|
+
function Fn(n) {
|
|
5128
|
+
let e = `${Vn}T${Un(n)}`;
|
|
5141
5129
|
const t = [];
|
|
5142
5130
|
return t.push(n.local ? "Z?" : "Z"), n.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
|
|
5143
5131
|
}
|
|
@@ -5260,7 +5248,7 @@ class z extends j {
|
|
|
5260
5248
|
code: h.invalid_string,
|
|
5261
5249
|
validation: { endsWith: a.value },
|
|
5262
5250
|
message: a.message
|
|
5263
|
-
}), s.dirty()) : a.kind === "datetime" ?
|
|
5251
|
+
}), s.dirty()) : a.kind === "datetime" ? Fn(a).test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
5264
5252
|
code: h.invalid_string,
|
|
5265
5253
|
validation: "datetime",
|
|
5266
5254
|
message: a.message
|
|
@@ -6360,7 +6348,7 @@ class A extends j {
|
|
|
6360
6348
|
});
|
|
6361
6349
|
}
|
|
6362
6350
|
keyof() {
|
|
6363
|
-
return
|
|
6351
|
+
return zn(I.objectKeys(this.shape));
|
|
6364
6352
|
}
|
|
6365
6353
|
}
|
|
6366
6354
|
A.create = (n, e) => new A({
|
|
@@ -6457,7 +6445,7 @@ wt.create = (n, e) => new wt({
|
|
|
6457
6445
|
typeName: k.ZodUnion,
|
|
6458
6446
|
...S(e)
|
|
6459
6447
|
});
|
|
6460
|
-
const ae = (n) => n instanceof xt ? ae(n.schema) : n instanceof J ? ae(n.innerType()) : n instanceof Tt ? [n.value] : n instanceof ke ? n.options : n instanceof Ot ? I.objectValues(n.enum) : n instanceof St ? ae(n._def.innerType) : n instanceof yt ? [void 0] : n instanceof vt ? [null] : n instanceof X ? [void 0, ...ae(n.unwrap())] : n instanceof be ? [null, ...ae(n.unwrap())] : n instanceof
|
|
6448
|
+
const ae = (n) => n instanceof xt ? ae(n.schema) : n instanceof J ? ae(n.innerType()) : n instanceof Tt ? [n.value] : n instanceof ke ? n.options : n instanceof Ot ? I.objectValues(n.enum) : n instanceof St ? ae(n._def.innerType) : n instanceof yt ? [void 0] : n instanceof vt ? [null] : n instanceof X ? [void 0, ...ae(n.unwrap())] : n instanceof be ? [null, ...ae(n.unwrap())] : n instanceof hn || n instanceof jt ? ae(n.unwrap()) : n instanceof Zt ? ae(n._def.innerType) : [];
|
|
6461
6449
|
class Ht extends j {
|
|
6462
6450
|
_parse(e) {
|
|
6463
6451
|
const { ctx: t } = this._processInputParams(e);
|
|
@@ -6923,7 +6911,7 @@ Tt.create = (n, e) => new Tt({
|
|
|
6923
6911
|
typeName: k.ZodLiteral,
|
|
6924
6912
|
...S(e)
|
|
6925
6913
|
});
|
|
6926
|
-
function
|
|
6914
|
+
function zn(n, e) {
|
|
6927
6915
|
return new ke({
|
|
6928
6916
|
values: n,
|
|
6929
6917
|
typeName: k.ZodEnum,
|
|
@@ -6943,7 +6931,7 @@ class ke extends j {
|
|
|
6943
6931
|
code: h.invalid_type
|
|
6944
6932
|
}), b;
|
|
6945
6933
|
}
|
|
6946
|
-
if (zt(this, Xe) ||
|
|
6934
|
+
if (zt(this, Xe) || Ln(this, Xe, new Set(this._def.values)), !zt(this, Xe).has(e.data)) {
|
|
6947
6935
|
const t = this._getOrReturnCtx(e), s = this._def.values;
|
|
6948
6936
|
return m(t, {
|
|
6949
6937
|
received: t.data,
|
|
@@ -6988,7 +6976,7 @@ class ke extends j {
|
|
|
6988
6976
|
}
|
|
6989
6977
|
}
|
|
6990
6978
|
Xe = /* @__PURE__ */ new WeakMap();
|
|
6991
|
-
ke.create =
|
|
6979
|
+
ke.create = zn;
|
|
6992
6980
|
class Ot extends j {
|
|
6993
6981
|
constructor() {
|
|
6994
6982
|
super(...arguments), et.set(this, void 0);
|
|
@@ -7003,7 +6991,7 @@ class Ot extends j {
|
|
|
7003
6991
|
code: h.invalid_type
|
|
7004
6992
|
}), b;
|
|
7005
6993
|
}
|
|
7006
|
-
if (zt(this, et) ||
|
|
6994
|
+
if (zt(this, et) || Ln(this, et, new Set(I.getValidEnumValues(this._def.values))), !zt(this, et).has(e.data)) {
|
|
7007
6995
|
const r = I.objectValues(t);
|
|
7008
6996
|
return m(s, {
|
|
7009
6997
|
received: s.data,
|
|
@@ -7243,7 +7231,7 @@ Jt.create = (n) => new Jt({
|
|
|
7243
7231
|
...S(n)
|
|
7244
7232
|
});
|
|
7245
7233
|
const xi = Symbol("zod_brand");
|
|
7246
|
-
class
|
|
7234
|
+
class hn extends j {
|
|
7247
7235
|
_parse(e) {
|
|
7248
7236
|
const { ctx: t } = this._processInputParams(e), s = t.data;
|
|
7249
7237
|
return this._def.type._parse({
|
|
@@ -7310,7 +7298,7 @@ jt.create = (n, e) => new jt({
|
|
|
7310
7298
|
typeName: k.ZodReadonly,
|
|
7311
7299
|
...S(e)
|
|
7312
7300
|
});
|
|
7313
|
-
function
|
|
7301
|
+
function Bn(n, e = {}, t) {
|
|
7314
7302
|
return n ? Je.create().superRefine((s, r) => {
|
|
7315
7303
|
var a, o;
|
|
7316
7304
|
if (!n(s)) {
|
|
@@ -7328,7 +7316,7 @@ var k;
|
|
|
7328
7316
|
})(k || (k = {}));
|
|
7329
7317
|
const Oi = (n, e = {
|
|
7330
7318
|
message: `Input not instance of ${n.name}`
|
|
7331
|
-
}) =>
|
|
7319
|
+
}) => Bn((t) => t instanceof n, e), Wn = z.create, qn = ve.create, Si = Jt.create, Zi = we.create, Jn = gt.create, ji = Ce.create, Ni = Bt.create, Ii = yt.create, Ci = vt.create, Ei = Je.create, Ai = je.create, Ri = oe.create, $i = Wt.create, Pi = W.create, Di = A.create, Mi = A.strictCreate, Li = wt.create, Vi = Ht.create, Ui = kt.create, Fi = se.create, zi = bt.create, Bi = qt.create, Wi = Ee.create, qi = Fe.create, Ji = xt.create, Ki = Tt.create, Qi = ke.create, Hi = Ot.create, Yi = Ke.create, vn = J.create, Gi = X.create, Xi = be.create, eo = J.createWithPreprocess, to = It.create, no = () => Wn().optional(), so = () => qn().optional(), ro = () => Jn().optional(), ao = {
|
|
7332
7320
|
string: (n) => z.create({ ...n, coerce: !0 }),
|
|
7333
7321
|
number: (n) => ve.create({ ...n, coerce: !0 }),
|
|
7334
7322
|
boolean: (n) => gt.create({
|
|
@@ -7363,7 +7351,7 @@ var oo = /* @__PURE__ */ Object.freeze({
|
|
|
7363
7351
|
ZodParsedType: g,
|
|
7364
7352
|
getParsedType: fe,
|
|
7365
7353
|
ZodType: j,
|
|
7366
|
-
datetimeRegex:
|
|
7354
|
+
datetimeRegex: Fn,
|
|
7367
7355
|
ZodString: z,
|
|
7368
7356
|
ZodNumber: ve,
|
|
7369
7357
|
ZodBigInt: we,
|
|
@@ -7399,10 +7387,10 @@ var oo = /* @__PURE__ */ Object.freeze({
|
|
|
7399
7387
|
ZodCatch: Zt,
|
|
7400
7388
|
ZodNaN: Jt,
|
|
7401
7389
|
BRAND: xi,
|
|
7402
|
-
ZodBranded:
|
|
7390
|
+
ZodBranded: hn,
|
|
7403
7391
|
ZodPipeline: It,
|
|
7404
7392
|
ZodReadonly: jt,
|
|
7405
|
-
custom:
|
|
7393
|
+
custom: Bn,
|
|
7406
7394
|
Schema: j,
|
|
7407
7395
|
ZodSchema: j,
|
|
7408
7396
|
late: Ti,
|
|
@@ -7413,10 +7401,10 @@ var oo = /* @__PURE__ */ Object.freeze({
|
|
|
7413
7401
|
any: Ei,
|
|
7414
7402
|
array: Pi,
|
|
7415
7403
|
bigint: Zi,
|
|
7416
|
-
boolean:
|
|
7404
|
+
boolean: Jn,
|
|
7417
7405
|
date: ji,
|
|
7418
7406
|
discriminatedUnion: Vi,
|
|
7419
|
-
effect:
|
|
7407
|
+
effect: vn,
|
|
7420
7408
|
enum: Qi,
|
|
7421
7409
|
function: qi,
|
|
7422
7410
|
instanceof: Oi,
|
|
@@ -7429,7 +7417,7 @@ var oo = /* @__PURE__ */ Object.freeze({
|
|
|
7429
7417
|
never: Ri,
|
|
7430
7418
|
null: Ci,
|
|
7431
7419
|
nullable: Xi,
|
|
7432
|
-
number:
|
|
7420
|
+
number: qn,
|
|
7433
7421
|
object: Di,
|
|
7434
7422
|
oboolean: ro,
|
|
7435
7423
|
onumber: so,
|
|
@@ -7441,9 +7429,9 @@ var oo = /* @__PURE__ */ Object.freeze({
|
|
|
7441
7429
|
record: zi,
|
|
7442
7430
|
set: Wi,
|
|
7443
7431
|
strictObject: Mi,
|
|
7444
|
-
string:
|
|
7432
|
+
string: Wn,
|
|
7445
7433
|
symbol: Ni,
|
|
7446
|
-
transformer:
|
|
7434
|
+
transformer: vn,
|
|
7447
7435
|
tuple: Fi,
|
|
7448
7436
|
undefined: Ii,
|
|
7449
7437
|
union: Li,
|
|
@@ -7521,7 +7509,7 @@ function fo(n) {
|
|
|
7521
7509
|
function mo(n) {
|
|
7522
7510
|
return async (e, t) => {
|
|
7523
7511
|
const s = (/* @__PURE__ */ new Date()).toISOString(), r = await n.selectFrom("logins").where("logins.expires_at", ">", s).where("logins.login_id", "=", t).selectAll().executeTakeFirst();
|
|
7524
|
-
return r ?
|
|
7512
|
+
return r ? yr.parse(
|
|
7525
7513
|
co(R(r), ["authParams"])
|
|
7526
7514
|
) : null;
|
|
7527
7515
|
};
|