@authhero/kysely-adapter 0.9.5 → 0.9.6
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 +23 -3
- package/dist/kysely-adapter.iife.js +1 -1
- package/dist/kysely-adapter.mjs +447 -438
- package/package.json +1 -1
package/dist/kysely-adapter.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var Ht = (n, e, t) =>
|
|
1
|
+
var Hn = Object.defineProperty;
|
|
2
|
+
var Qn = (n, e, t) => e in n ? Hn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var Ht = (n, e, t) => Qn(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
var Gt = 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 Gt = class extends Error {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
function
|
|
20
|
+
function Yn(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 Gn(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 Yn(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 Xn(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 es(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, j;
|
|
74
|
-
const A = typeof r == "string" ? a : r, U = A ?? {}, { param: ie } = U, $e =
|
|
74
|
+
const A = typeof r == "string" ? a : r, U = A ?? {}, { param: ie } = U, $e = Gn(U, ["param"]), oe = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof r == "string" ? { refId: r } : void 0), ce = Object.assign(Object.assign(Object.assign({}, (c = this._def.openapi) === null || c === void 0 ? void 0 : c.metadata), $e), !((u = (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata) === null || u === void 0) && u.param || ie ? {
|
|
75
75
|
param: Object.assign(Object.assign({}, (j = (l = this._def.openapi) === null || l === void 0 ? void 0 : l.metadata) === null || j === void 0 ? void 0 : j.param), ie)
|
|
76
76
|
} : void 0), de = new this.constructor(Object.assign(Object.assign({}, this._def), { openapi: Object.assign(Object.assign({}, Object.keys(oe).length > 0 ? { _internal: oe } : void 0), Object.keys(ce).length > 0 ? { metadata: ce } : void 0) }));
|
|
77
|
-
if (
|
|
77
|
+
if (Xn(this, "ZodObject")) {
|
|
78
78
|
const Pe = this.extend;
|
|
79
79
|
de.extend = function(...De) {
|
|
80
80
|
var K, H, Q, ue, xe, Te;
|
|
@@ -212,7 +212,7 @@ const _ = N.arrayToEnum([
|
|
|
212
212
|
"invalid_intersection_types",
|
|
213
213
|
"not_multiple_of",
|
|
214
214
|
"not_finite"
|
|
215
|
-
]),
|
|
215
|
+
]), ts = (n) => JSON.stringify(n, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
216
216
|
class L extends Error {
|
|
217
217
|
constructor(e) {
|
|
218
218
|
super(), this.issues = [], this.addIssue = (s) => {
|
|
@@ -329,12 +329,12 @@ const Be = (n, e) => {
|
|
|
329
329
|
}
|
|
330
330
|
return { message: t };
|
|
331
331
|
};
|
|
332
|
-
let
|
|
333
|
-
function
|
|
334
|
-
|
|
332
|
+
let bn = Be;
|
|
333
|
+
function ns(n) {
|
|
334
|
+
bn = n;
|
|
335
335
|
}
|
|
336
336
|
function Et() {
|
|
337
|
-
return
|
|
337
|
+
return bn;
|
|
338
338
|
}
|
|
339
339
|
const At = (n) => {
|
|
340
340
|
const { data: e, path: t, errorMaps: s, issueData: r } = n, a = [...t, ...r.path || []], o = {
|
|
@@ -356,7 +356,7 @@ const At = (n) => {
|
|
|
356
356
|
path: a,
|
|
357
357
|
message: c
|
|
358
358
|
};
|
|
359
|
-
},
|
|
359
|
+
}, ss = [];
|
|
360
360
|
function f(n, e) {
|
|
361
361
|
const t = Et(), s = At({
|
|
362
362
|
issueData: e,
|
|
@@ -420,7 +420,7 @@ function $t(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
|
}
|
|
@@ -647,23 +647,23 @@ class S {
|
|
|
647
647
|
return this.safeParse(null).success;
|
|
648
648
|
}
|
|
649
649
|
}
|
|
650
|
-
const
|
|
650
|
+
const rs = /^c[^\s-]{8,}$/i, as = /^[0-9a-z]+$/, is = /^[0-9A-HJKMNP-TV-Z]{26}$/, os = /^[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, cs = /^[a-z0-9_-]{21}$/i, 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)?)??$/, us = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, ls = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
651
651
|
let Qt;
|
|
652
|
-
const
|
|
653
|
-
function
|
|
652
|
+
const ps = /^(?:(?: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])$/, hs = /^(([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})))$/, fs = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, xn = "((\\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])))", ms = new RegExp(`^${xn}$`);
|
|
653
|
+
function Tn(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 _s(n) {
|
|
658
|
+
return new RegExp(`^${Tn(n)}$`);
|
|
659
659
|
}
|
|
660
|
-
function
|
|
661
|
-
let e = `${
|
|
660
|
+
function On(n) {
|
|
661
|
+
let e = `${xn}T${Tn(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 gs(n, e) {
|
|
666
|
+
return !!((e === "v4" || !e) && ps.test(n) || (e === "v6" || !e) && hs.test(n));
|
|
667
667
|
}
|
|
668
668
|
class F extends S {
|
|
669
669
|
_parse(e) {
|
|
@@ -714,43 +714,43 @@ class F extends S {
|
|
|
714
714
|
message: r.message
|
|
715
715
|
}), t.dirty());
|
|
716
716
|
} else if (r.kind === "email")
|
|
717
|
-
|
|
717
|
+
us.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
|
-
Qt || (Qt = new RegExp(
|
|
723
|
+
Qt || (Qt = new RegExp(ls, "u")), Qt.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
|
+
os.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
|
+
cs.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
|
+
rs.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
|
+
as.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
|
+
is.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 S {
|
|
|
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" ? On(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" ? ms.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" ? _s(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" ? ds.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" ? gs(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" ? fs.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
|
...T(n)
|
|
1024
1024
|
});
|
|
1025
1025
|
};
|
|
1026
|
-
function
|
|
1026
|
+
function ys(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 fe extends S {
|
|
|
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" ? ys(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 I extends S {
|
|
|
1881
1881
|
});
|
|
1882
1882
|
}
|
|
1883
1883
|
keyof() {
|
|
1884
|
-
return
|
|
1884
|
+
return Sn(N.objectKeys(this.shape));
|
|
1885
1885
|
}
|
|
1886
1886
|
}
|
|
1887
1887
|
I.create = (n, e) => new I({
|
|
@@ -2444,7 +2444,7 @@ lt.create = (n, e) => new lt({
|
|
|
2444
2444
|
typeName: w.ZodLiteral,
|
|
2445
2445
|
...T(e)
|
|
2446
2446
|
});
|
|
2447
|
-
function
|
|
2447
|
+
function Sn(n, e) {
|
|
2448
2448
|
return new _e({
|
|
2449
2449
|
values: n,
|
|
2450
2450
|
typeName: w.ZodEnum,
|
|
@@ -2464,7 +2464,7 @@ class _e extends S {
|
|
|
2464
2464
|
code: p.invalid_type
|
|
2465
2465
|
}), x;
|
|
2466
2466
|
}
|
|
2467
|
-
if ($t(this, Ge) ||
|
|
2467
|
+
if ($t(this, Ge) || kn(this, Ge, new Set(this._def.values)), !$t(this, Ge).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 _e extends S {
|
|
|
2509
2509
|
}
|
|
2510
2510
|
}
|
|
2511
2511
|
Ge = /* @__PURE__ */ new WeakMap();
|
|
2512
|
-
_e.create =
|
|
2512
|
+
_e.create = Sn;
|
|
2513
2513
|
class pt extends S {
|
|
2514
2514
|
constructor() {
|
|
2515
2515
|
super(...arguments), Xe.set(this, void 0);
|
|
@@ -2524,7 +2524,7 @@ class pt extends S {
|
|
|
2524
2524
|
code: p.invalid_type
|
|
2525
2525
|
}), x;
|
|
2526
2526
|
}
|
|
2527
|
-
if ($t(this, Xe) ||
|
|
2527
|
+
if ($t(this, Xe) || kn(this, Xe, new Set(N.getValidEnumValues(this._def.values))), !$t(this, Xe).has(e.data)) {
|
|
2528
2528
|
const r = N.objectValues(t);
|
|
2529
2529
|
return f(s, {
|
|
2530
2530
|
received: s.data,
|
|
@@ -2763,7 +2763,7 @@ Lt.create = (n) => new Lt({
|
|
|
2763
2763
|
typeName: w.ZodNaN,
|
|
2764
2764
|
...T(n)
|
|
2765
2765
|
});
|
|
2766
|
-
const
|
|
2766
|
+
const vs = Symbol("zod_brand");
|
|
2767
2767
|
class cn extends S {
|
|
2768
2768
|
_parse(e) {
|
|
2769
2769
|
const { ctx: t } = this._processInputParams(e), s = t.data;
|
|
@@ -2831,7 +2831,7 @@ mt.create = (n, e) => new mt({
|
|
|
2831
2831
|
typeName: w.ZodReadonly,
|
|
2832
2832
|
...T(e)
|
|
2833
2833
|
});
|
|
2834
|
-
function
|
|
2834
|
+
function Zn(n, e = {}, t) {
|
|
2835
2835
|
return n ? We.create().superRefine((s, r) => {
|
|
2836
2836
|
var a, o;
|
|
2837
2837
|
if (!n(s)) {
|
|
@@ -2840,16 +2840,16 @@ function Sn(n, e = {}, t) {
|
|
|
2840
2840
|
}
|
|
2841
2841
|
}) : We.create();
|
|
2842
2842
|
}
|
|
2843
|
-
const
|
|
2843
|
+
const ws = {
|
|
2844
2844
|
object: I.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 bs = (n, e = {
|
|
2851
2851
|
message: `Input not instance of ${n.name}`
|
|
2852
|
-
}) =>
|
|
2852
|
+
}) => Zn((t) => t instanceof n, e), jn = F.create, Nn = fe.create, ks = Lt.create, xs = me.create, Cn = rt.create, Ts = je.create, Os = Pt.create, Ss = at.create, Zs = it.create, js = We.create, Ns = Se.create, Cs = re.create, Is = Dt.create, Es = B.create, As = I.create, Rs = I.strictCreate, $s = ot.create, Ps = Jt.create, Ds = ct.create, Ms = ee.create, Ls = dt.create, Vs = Mt.create, Us = Ne.create, Fs = Fe.create, zs = ut.create, Bs = lt.create, Ws = _e.create, qs = pt.create, Js = qe.create, mn = q.create, Ks = Y.create, Hs = ge.create, Qs = q.createWithPreprocess, Ys = Ct.create, Gs = () => jn().optional(), Xs = () => Nn().optional(), er = () => Cn().optional(), tr = {
|
|
2853
2853
|
string: (n) => F.create({ ...n, coerce: !0 }),
|
|
2854
2854
|
number: (n) => fe.create({ ...n, coerce: !0 }),
|
|
2855
2855
|
boolean: (n) => rt.create({
|
|
@@ -2858,14 +2858,14 @@ const ws = (n, e = {
|
|
|
2858
2858
|
}),
|
|
2859
2859
|
bigint: (n) => me.create({ ...n, coerce: !0 }),
|
|
2860
2860
|
date: (n) => je.create({ ...n, coerce: !0 })
|
|
2861
|
-
},
|
|
2861
|
+
}, nr = x;
|
|
2862
2862
|
var i = /* @__PURE__ */ Object.freeze({
|
|
2863
2863
|
__proto__: null,
|
|
2864
2864
|
defaultErrorMap: Be,
|
|
2865
|
-
setErrorMap:
|
|
2865
|
+
setErrorMap: ns,
|
|
2866
2866
|
getErrorMap: Et,
|
|
2867
2867
|
makeIssue: At,
|
|
2868
|
-
EMPTY_PATH:
|
|
2868
|
+
EMPTY_PATH: ss,
|
|
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: pe,
|
|
2886
2886
|
ZodType: S,
|
|
2887
|
-
datetimeRegex:
|
|
2887
|
+
datetimeRegex: On,
|
|
2888
2888
|
ZodString: F,
|
|
2889
2889
|
ZodNumber: fe,
|
|
2890
2890
|
ZodBigInt: me,
|
|
@@ -2919,63 +2919,63 @@ var i = /* @__PURE__ */ Object.freeze({
|
|
|
2919
2919
|
ZodDefault: ht,
|
|
2920
2920
|
ZodCatch: ft,
|
|
2921
2921
|
ZodNaN: Lt,
|
|
2922
|
-
BRAND:
|
|
2922
|
+
BRAND: vs,
|
|
2923
2923
|
ZodBranded: cn,
|
|
2924
2924
|
ZodPipeline: Ct,
|
|
2925
2925
|
ZodReadonly: mt,
|
|
2926
|
-
custom:
|
|
2926
|
+
custom: Zn,
|
|
2927
2927
|
Schema: S,
|
|
2928
2928
|
ZodSchema: S,
|
|
2929
|
-
late:
|
|
2929
|
+
late: ws,
|
|
2930
2930
|
get ZodFirstPartyTypeKind() {
|
|
2931
2931
|
return w;
|
|
2932
2932
|
},
|
|
2933
|
-
coerce:
|
|
2934
|
-
any:
|
|
2935
|
-
array:
|
|
2936
|
-
bigint:
|
|
2937
|
-
boolean:
|
|
2938
|
-
date:
|
|
2939
|
-
discriminatedUnion:
|
|
2933
|
+
coerce: tr,
|
|
2934
|
+
any: js,
|
|
2935
|
+
array: Es,
|
|
2936
|
+
bigint: xs,
|
|
2937
|
+
boolean: Cn,
|
|
2938
|
+
date: Ts,
|
|
2939
|
+
discriminatedUnion: Ps,
|
|
2940
2940
|
effect: mn,
|
|
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:
|
|
2941
|
+
enum: Ws,
|
|
2942
|
+
function: Fs,
|
|
2943
|
+
instanceof: bs,
|
|
2944
|
+
intersection: Ds,
|
|
2945
|
+
lazy: zs,
|
|
2946
|
+
literal: Bs,
|
|
2947
|
+
map: Vs,
|
|
2948
|
+
nan: ks,
|
|
2949
|
+
nativeEnum: qs,
|
|
2950
|
+
never: Cs,
|
|
2951
|
+
null: Zs,
|
|
2952
|
+
nullable: Hs,
|
|
2953
|
+
number: Nn,
|
|
2954
|
+
object: As,
|
|
2955
|
+
oboolean: er,
|
|
2956
|
+
onumber: Xs,
|
|
2957
|
+
optional: Ks,
|
|
2958
|
+
ostring: Gs,
|
|
2959
|
+
pipeline: Ys,
|
|
2960
|
+
preprocess: Qs,
|
|
2961
|
+
promise: Js,
|
|
2962
|
+
record: Ls,
|
|
2963
|
+
set: Us,
|
|
2964
|
+
strictObject: Rs,
|
|
2965
|
+
string: jn,
|
|
2966
|
+
symbol: Os,
|
|
2967
2967
|
transformer: mn,
|
|
2968
|
-
tuple:
|
|
2969
|
-
undefined:
|
|
2970
|
-
union:
|
|
2971
|
-
unknown:
|
|
2972
|
-
void:
|
|
2973
|
-
NEVER:
|
|
2968
|
+
tuple: Ms,
|
|
2969
|
+
undefined: Ss,
|
|
2970
|
+
union: $s,
|
|
2971
|
+
unknown: Ns,
|
|
2972
|
+
void: Is,
|
|
2973
|
+
NEVER: nr,
|
|
2974
2974
|
ZodIssueCode: p,
|
|
2975
|
-
quotelessJson:
|
|
2975
|
+
quotelessJson: ts,
|
|
2976
2976
|
ZodError: L
|
|
2977
2977
|
});
|
|
2978
|
-
|
|
2978
|
+
es(i);
|
|
2979
2979
|
i.object({
|
|
2980
2980
|
start: i.number(),
|
|
2981
2981
|
limit: i.number(),
|
|
@@ -2984,7 +2984,7 @@ i.object({
|
|
|
2984
2984
|
const dn = i.object({
|
|
2985
2985
|
created_at: i.string(),
|
|
2986
2986
|
updated_at: i.string()
|
|
2987
|
-
}),
|
|
2987
|
+
}), sr = 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 dn = 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()), rr = i.object({
|
|
2997
2997
|
connection: i.string(),
|
|
2998
2998
|
user_id: i.string(),
|
|
2999
2999
|
provider: i.string(),
|
|
@@ -3001,8 +3001,8 @@ const dn = 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: sr.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 dn = i.object({
|
|
|
3014
3014
|
linked_to: i.string().optional(),
|
|
3015
3015
|
profileData: i.string().optional(),
|
|
3016
3016
|
user_id: i.string().optional()
|
|
3017
|
-
}),
|
|
3017
|
+
}), ar = 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 dn = i.object({
|
|
|
3023
3023
|
provider: i.string().default("email"),
|
|
3024
3024
|
connection: i.string().default("email")
|
|
3025
3025
|
});
|
|
3026
|
-
|
|
3026
|
+
ar.extend(dn.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(rr).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,14 +3039,14 @@ Cn.extend({
|
|
|
3039
3039
|
last_login: i.string().optional(),
|
|
3040
3040
|
user_id: i.string()
|
|
3041
3041
|
}).catchall(i.any());
|
|
3042
|
-
const
|
|
3043
|
-
let
|
|
3042
|
+
const ir = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
3043
|
+
let or = (n = 21) => {
|
|
3044
3044
|
let e = "", t = crypto.getRandomValues(new Uint8Array(n));
|
|
3045
3045
|
for (; n--; )
|
|
3046
|
-
e +=
|
|
3046
|
+
e += ir[t[n] & 63];
|
|
3047
3047
|
return e;
|
|
3048
3048
|
};
|
|
3049
|
-
const
|
|
3049
|
+
const cr = i.object({
|
|
3050
3050
|
audience: i.string().optional(),
|
|
3051
3051
|
recipient: i.string().optional(),
|
|
3052
3052
|
createUpnClaim: i.boolean().optional(),
|
|
@@ -3063,7 +3063,7 @@ const or = i.object({
|
|
|
3063
3063
|
nameIdentifierProbes: i.array(i.string()).optional(),
|
|
3064
3064
|
authnContextClassRef: i.string().optional(),
|
|
3065
3065
|
mappings: i.record(i.string()).optional()
|
|
3066
|
-
}),
|
|
3066
|
+
}), dr = i.object({
|
|
3067
3067
|
id: i.string(),
|
|
3068
3068
|
name: i.string(),
|
|
3069
3069
|
callbacks: i.array(i.string()).default([]).optional().openapi({
|
|
@@ -3082,34 +3082,34 @@ const or = i.object({
|
|
|
3082
3082
|
description: "Ids of clients that will be allowed to perform delegation requests. Clients that will be allowed to make delegation request. By default, all your clients will be allowed. This field allows you to specify specific clients"
|
|
3083
3083
|
}),
|
|
3084
3084
|
addons: i.object({
|
|
3085
|
-
samlp:
|
|
3085
|
+
samlp: cr.optional()
|
|
3086
3086
|
}).default({}).optional().openapi({
|
|
3087
3087
|
description: "Addons associated with the client. The key is the addon's package name and the value is an object with the configuration for the addon."
|
|
3088
3088
|
}),
|
|
3089
3089
|
email_validation: i.enum(["enabled", "disabled", "enforced"]).default("enforced").optional().openapi({
|
|
3090
3090
|
description: "Defines if it possible to sign in with an unverified email and if verification emails will be sent. This is not available in auth0"
|
|
3091
3091
|
}),
|
|
3092
|
-
client_secret: i.string().default(() =>
|
|
3092
|
+
client_secret: i.string().default(() => or()).optional(),
|
|
3093
3093
|
disable_sign_ups: i.boolean().optional().default(!1).openapi({
|
|
3094
3094
|
description: "Prevents users from signing up using the hosted login page. This is not available in auth0"
|
|
3095
3095
|
})
|
|
3096
|
-
}),
|
|
3096
|
+
}), ur = i.object({
|
|
3097
3097
|
created_at: i.string().transform((n) => n === null ? "" : n),
|
|
3098
3098
|
updated_at: i.string().transform((n) => n === null ? "" : n),
|
|
3099
|
-
...
|
|
3099
|
+
...dr.shape
|
|
3100
3100
|
});
|
|
3101
|
-
var
|
|
3102
|
-
const
|
|
3101
|
+
var En = /* @__PURE__ */ ((n) => (n.TOKEN = "token", n.TOKEN_ID_TOKEN = "token id_token", n.CODE = "code", n))(En || {}), An = /* @__PURE__ */ ((n) => (n.QUERY = "query", n.FRAGMENT = "fragment", n.FORM_POST = "form_post", n.WEB_MESSAGE = "web_message", n.SAML_POST = "saml_post", n))(An || {}), Rn = /* @__PURE__ */ ((n) => (n.S265 = "S256", n.plain = "plain", n))(Rn || {});
|
|
3102
|
+
const lr = i.object({
|
|
3103
3103
|
client_id: i.string(),
|
|
3104
3104
|
vendor_id: i.string().optional(),
|
|
3105
|
-
response_type: i.nativeEnum(
|
|
3106
|
-
response_mode: i.nativeEnum(
|
|
3105
|
+
response_type: i.nativeEnum(En).optional(),
|
|
3106
|
+
response_mode: i.nativeEnum(An).optional(),
|
|
3107
3107
|
redirect_uri: i.string().optional(),
|
|
3108
3108
|
audience: i.string().optional(),
|
|
3109
3109
|
state: i.string().optional(),
|
|
3110
3110
|
nonce: i.string().optional(),
|
|
3111
3111
|
scope: i.string().optional(),
|
|
3112
|
-
code_challenge_method: i.nativeEnum(
|
|
3112
|
+
code_challenge_method: i.nativeEnum(Rn).optional(),
|
|
3113
3113
|
code_challenge: i.string().optional(),
|
|
3114
3114
|
username: i.string().optional()
|
|
3115
3115
|
});
|
|
@@ -3129,7 +3129,7 @@ i.object({
|
|
|
3129
3129
|
url: i.string()
|
|
3130
3130
|
}).optional()
|
|
3131
3131
|
});
|
|
3132
|
-
const
|
|
3132
|
+
const pr = i.object({
|
|
3133
3133
|
id: i.string().optional(),
|
|
3134
3134
|
name: i.string(),
|
|
3135
3135
|
strategy: i.enum([
|
|
@@ -3166,11 +3166,11 @@ const lr = i.object({
|
|
|
3166
3166
|
token_exchange_basic_auth: i.boolean().optional(),
|
|
3167
3167
|
userinfo_endpoint: i.string().optional(),
|
|
3168
3168
|
scope: i.string().optional()
|
|
3169
|
-
}),
|
|
3169
|
+
}), $n = i.object({
|
|
3170
3170
|
id: i.string(),
|
|
3171
3171
|
created_at: i.string().transform((n) => n === null ? "" : n),
|
|
3172
3172
|
updated_at: i.string().transform((n) => n === null ? "" : n)
|
|
3173
|
-
}).extend(
|
|
3173
|
+
}).extend(pr.shape), hr = i.object({
|
|
3174
3174
|
name: i.string(),
|
|
3175
3175
|
audience: i.string(),
|
|
3176
3176
|
sender_email: i.string().email(),
|
|
@@ -3180,11 +3180,11 @@ const lr = i.object({
|
|
|
3180
3180
|
primary_color: i.string().optional(),
|
|
3181
3181
|
secondary_color: i.string().optional(),
|
|
3182
3182
|
language: i.string().optional()
|
|
3183
|
-
}),
|
|
3183
|
+
}), fr = i.object({
|
|
3184
3184
|
created_at: i.string().transform((n) => n === null ? "" : n),
|
|
3185
3185
|
updated_at: i.string().transform((n) => n === null ? "" : n),
|
|
3186
3186
|
id: i.string(),
|
|
3187
|
-
...
|
|
3187
|
+
...hr.shape
|
|
3188
3188
|
});
|
|
3189
3189
|
i.object({
|
|
3190
3190
|
logoUrl: i.string(),
|
|
@@ -3204,7 +3204,7 @@ i.object({
|
|
|
3204
3204
|
siteUrl: i.string().nullable(),
|
|
3205
3205
|
manageSubscriptionsUrl: i.string().optional()
|
|
3206
3206
|
});
|
|
3207
|
-
const
|
|
3207
|
+
const mr = i.object({
|
|
3208
3208
|
domain: i.string(),
|
|
3209
3209
|
dkim_private_key: i.string().optional(),
|
|
3210
3210
|
dkim_public_key: i.string().optional(),
|
|
@@ -3212,19 +3212,19 @@ const fr = i.object({
|
|
|
3212
3212
|
email_service: i.union([i.literal("mailgun"), i.literal("mailchannels")]).optional()
|
|
3213
3213
|
});
|
|
3214
3214
|
i.object({
|
|
3215
|
-
...
|
|
3216
|
-
domains: i.array(
|
|
3217
|
-
tenant:
|
|
3218
|
-
connections: i.array(
|
|
3215
|
+
...ur.shape,
|
|
3216
|
+
domains: i.array(mr),
|
|
3217
|
+
tenant: fr,
|
|
3218
|
+
connections: i.array($n)
|
|
3219
3219
|
});
|
|
3220
|
-
const
|
|
3220
|
+
const _r = i.enum([
|
|
3221
3221
|
"password_reset",
|
|
3222
3222
|
"email_verification",
|
|
3223
3223
|
"otp",
|
|
3224
3224
|
"authorization_code",
|
|
3225
3225
|
"oauth2_state",
|
|
3226
3226
|
"ticket"
|
|
3227
|
-
]),
|
|
3227
|
+
]), gr = i.object({
|
|
3228
3228
|
code_id: i.string().openapi({
|
|
3229
3229
|
description: "The code that will be used in for instance an email verification flow"
|
|
3230
3230
|
}),
|
|
@@ -3234,14 +3234,14 @@ const mr = i.enum([
|
|
|
3234
3234
|
connection_id: i.string().optional().openapi({
|
|
3235
3235
|
description: "The connection that the code is connected to"
|
|
3236
3236
|
}),
|
|
3237
|
-
code_type:
|
|
3237
|
+
code_type: _r,
|
|
3238
3238
|
expires_at: i.string(),
|
|
3239
3239
|
used_at: i.string().optional(),
|
|
3240
3240
|
user_id: i.string().optional()
|
|
3241
|
-
}), gr = i.object({
|
|
3242
|
-
..._r.shape,
|
|
3243
|
-
created_at: i.string()
|
|
3244
3241
|
}), yr = i.object({
|
|
3242
|
+
...gr.shape,
|
|
3243
|
+
created_at: i.string()
|
|
3244
|
+
}), vr = i.object({
|
|
3245
3245
|
domain: i.string(),
|
|
3246
3246
|
dkim_private_key: i.string().optional(),
|
|
3247
3247
|
dkim_public_key: i.string().optional(),
|
|
@@ -3249,10 +3249,10 @@ const mr = i.enum([
|
|
|
3249
3249
|
email_service: i.enum(["mailgun", "mailchannels"])
|
|
3250
3250
|
});
|
|
3251
3251
|
dn.extend({
|
|
3252
|
-
...
|
|
3252
|
+
...vr.shape,
|
|
3253
3253
|
id: i.string()
|
|
3254
3254
|
});
|
|
3255
|
-
const
|
|
3255
|
+
const wr = i.object({
|
|
3256
3256
|
trigger_id: i.enum([
|
|
3257
3257
|
"pre-user-signup",
|
|
3258
3258
|
"post-user-registration",
|
|
@@ -3264,11 +3264,11 @@ const vr = i.object({
|
|
|
3264
3264
|
synchronous: i.boolean().default(!1),
|
|
3265
3265
|
priority: i.number().optional()
|
|
3266
3266
|
});
|
|
3267
|
-
|
|
3267
|
+
wr.extend({
|
|
3268
3268
|
...dn.shape,
|
|
3269
3269
|
hook_id: i.string()
|
|
3270
3270
|
});
|
|
3271
|
-
const
|
|
3271
|
+
const br = i.object({
|
|
3272
3272
|
alg: i.enum([
|
|
3273
3273
|
"RS256",
|
|
3274
3274
|
"RS384",
|
|
@@ -3289,7 +3289,7 @@ const wr = i.object({
|
|
|
3289
3289
|
use: i.enum(["sig", "enc"]).optional()
|
|
3290
3290
|
});
|
|
3291
3291
|
i.object({
|
|
3292
|
-
keys: i.array(
|
|
3292
|
+
keys: i.array(br)
|
|
3293
3293
|
});
|
|
3294
3294
|
i.object({
|
|
3295
3295
|
issuer: i.string(),
|
|
@@ -3313,22 +3313,22 @@ i.object({
|
|
|
3313
3313
|
request_parameter_supported: i.boolean(),
|
|
3314
3314
|
token_endpoint_auth_signing_alg_values_supported: i.array(i.string())
|
|
3315
3315
|
});
|
|
3316
|
-
const
|
|
3316
|
+
const kr = i.object({
|
|
3317
3317
|
auth0Client: i.string().optional(),
|
|
3318
|
-
authParams:
|
|
3318
|
+
authParams: lr,
|
|
3319
3319
|
expires_at: i.string(),
|
|
3320
3320
|
deleted_at: i.string().optional(),
|
|
3321
3321
|
ip: i.string().optional()
|
|
3322
3322
|
}).openapi({
|
|
3323
3323
|
description: "This represents a login sesion"
|
|
3324
|
-
}),
|
|
3325
|
-
...
|
|
3324
|
+
}), xr = i.object({
|
|
3325
|
+
...kr.shape,
|
|
3326
3326
|
login_id: i.string().openapi({
|
|
3327
3327
|
description: "This is is used as the state in the universal login"
|
|
3328
3328
|
}),
|
|
3329
3329
|
created_at: i.string(),
|
|
3330
3330
|
updated_at: i.string()
|
|
3331
|
-
}),
|
|
3331
|
+
}), Tr = i.enum([
|
|
3332
3332
|
"cls",
|
|
3333
3333
|
// CODE_LINK_SENT
|
|
3334
3334
|
"fsa",
|
|
@@ -3377,7 +3377,7 @@ const br = i.object({
|
|
|
3377
3377
|
// SUCCESS_VERIFICATION_EMAIL
|
|
3378
3378
|
"svr"
|
|
3379
3379
|
// SUCCESS_VERIFICATION_EMAIL_REQUEST
|
|
3380
|
-
]),
|
|
3380
|
+
]), Or = i.object({
|
|
3381
3381
|
name: i.string(),
|
|
3382
3382
|
version: i.string(),
|
|
3383
3383
|
env: i.object({
|
|
@@ -3385,7 +3385,7 @@ const br = i.object({
|
|
|
3385
3385
|
}).optional()
|
|
3386
3386
|
});
|
|
3387
3387
|
i.object({
|
|
3388
|
-
type:
|
|
3388
|
+
type: Tr,
|
|
3389
3389
|
date: i.string(),
|
|
3390
3390
|
description: i.string().optional(),
|
|
3391
3391
|
log_id: i.string().optional(),
|
|
@@ -3406,19 +3406,19 @@ i.object({
|
|
|
3406
3406
|
strategy: i.string().optional(),
|
|
3407
3407
|
strategy_type: i.string().optional(),
|
|
3408
3408
|
hostname: i.string().optional(),
|
|
3409
|
-
auth0_client:
|
|
3409
|
+
auth0_client: Or.optional()
|
|
3410
3410
|
});
|
|
3411
|
-
const
|
|
3411
|
+
const Sr = i.object({
|
|
3412
3412
|
user_id: i.string(),
|
|
3413
3413
|
password: i.string(),
|
|
3414
3414
|
algorithm: i.enum(["bcrypt", "argon2id"]).default("argon2id")
|
|
3415
3415
|
});
|
|
3416
3416
|
i.object({
|
|
3417
|
-
...
|
|
3417
|
+
...Sr.shape,
|
|
3418
3418
|
created_at: i.string(),
|
|
3419
3419
|
updated_at: i.string()
|
|
3420
3420
|
});
|
|
3421
|
-
const
|
|
3421
|
+
const Zr = i.object({
|
|
3422
3422
|
session_id: i.string(),
|
|
3423
3423
|
client_id: i.string(),
|
|
3424
3424
|
expires_at: i.string(),
|
|
@@ -3428,7 +3428,7 @@ const Sr = i.object({
|
|
|
3428
3428
|
});
|
|
3429
3429
|
i.object({
|
|
3430
3430
|
created_at: i.string(),
|
|
3431
|
-
...
|
|
3431
|
+
...Zr.shape
|
|
3432
3432
|
});
|
|
3433
3433
|
i.object({
|
|
3434
3434
|
kid: i.string().openapi({ description: "The key id of the signing key" }),
|
|
@@ -3450,8 +3450,8 @@ i.object({
|
|
|
3450
3450
|
revoked: i.boolean().optional().openapi({ description: "True if the key is revoked" }),
|
|
3451
3451
|
revoked_at: i.string().optional().openapi({ description: "The date and time when the key was revoked" })
|
|
3452
3452
|
});
|
|
3453
|
-
var
|
|
3454
|
-
const un = i.nativeEnum(
|
|
3453
|
+
var Pn = /* @__PURE__ */ ((n) => (n.RefreshToken = "refresh_token", n.AuthorizationCode = "authorization_code", n.ClientCredential = "client_credentials", n.Passwordless = "passwordless", n.Password = "password", n))(Pn || {});
|
|
3454
|
+
const un = i.nativeEnum(Pn);
|
|
3455
3455
|
i.object({
|
|
3456
3456
|
grant_type: un.refine(
|
|
3457
3457
|
(n) => n === "authorization_code"
|
|
@@ -3494,7 +3494,7 @@ i.object({
|
|
|
3494
3494
|
code: i.string(),
|
|
3495
3495
|
state: i.string().optional()
|
|
3496
3496
|
});
|
|
3497
|
-
const
|
|
3497
|
+
const jr = i.object({
|
|
3498
3498
|
button_border_radius: i.number(),
|
|
3499
3499
|
button_border_weight: i.number(),
|
|
3500
3500
|
buttons_style: i.enum(["pill"]),
|
|
@@ -3504,7 +3504,7 @@ const Zr = i.object({
|
|
|
3504
3504
|
show_widget_shadow: i.boolean(),
|
|
3505
3505
|
widget_border_weight: i.number(),
|
|
3506
3506
|
widget_corner_radius: i.number()
|
|
3507
|
-
}),
|
|
3507
|
+
}), Nr = i.object({
|
|
3508
3508
|
base_focus_color: i.string(),
|
|
3509
3509
|
base_hover_color: i.string(),
|
|
3510
3510
|
body_text: i.string(),
|
|
@@ -3527,7 +3527,7 @@ const Zr = i.object({
|
|
|
3527
3527
|
}), Me = i.object({
|
|
3528
3528
|
bold: i.boolean(),
|
|
3529
3529
|
size: i.number()
|
|
3530
|
-
}),
|
|
3530
|
+
}), Cr = i.object({
|
|
3531
3531
|
body_text: Me,
|
|
3532
3532
|
buttons_text: Me,
|
|
3533
3533
|
font_url: i.string(),
|
|
@@ -3537,28 +3537,28 @@ const Zr = i.object({
|
|
|
3537
3537
|
reference_text_size: i.number(),
|
|
3538
3538
|
subtitle: Me,
|
|
3539
3539
|
title: Me
|
|
3540
|
-
}),
|
|
3540
|
+
}), Ir = i.object({
|
|
3541
3541
|
background_color: i.string(),
|
|
3542
3542
|
background_image_url: i.string(),
|
|
3543
3543
|
page_layout: i.enum(["center"])
|
|
3544
|
-
}),
|
|
3544
|
+
}), Er = i.object({
|
|
3545
3545
|
header_text_alignment: i.enum(["center"]),
|
|
3546
3546
|
logo_height: i.number(),
|
|
3547
3547
|
logo_position: i.enum(["center"]),
|
|
3548
3548
|
logo_url: i.string(),
|
|
3549
3549
|
social_buttons_layout: i.enum(["bottom"])
|
|
3550
|
-
}),
|
|
3551
|
-
borders:
|
|
3552
|
-
colors:
|
|
3550
|
+
}), Ar = i.object({
|
|
3551
|
+
borders: jr,
|
|
3552
|
+
colors: Nr,
|
|
3553
3553
|
displayName: i.string(),
|
|
3554
|
-
fonts:
|
|
3555
|
-
page_background:
|
|
3556
|
-
widget:
|
|
3554
|
+
fonts: Cr,
|
|
3555
|
+
page_background: Ir,
|
|
3556
|
+
widget: Er
|
|
3557
3557
|
});
|
|
3558
|
-
|
|
3558
|
+
Ar.extend({
|
|
3559
3559
|
themeId: i.string()
|
|
3560
3560
|
});
|
|
3561
|
-
const
|
|
3561
|
+
const Rr = i.object({
|
|
3562
3562
|
universal_login_experience: i.enum(["new", "classic"]).default("new"),
|
|
3563
3563
|
identifier_first: i.boolean().default(!0),
|
|
3564
3564
|
password_first: i.boolean().default(!1),
|
|
@@ -3570,7 +3570,7 @@ function ln(n) {
|
|
|
3570
3570
|
throw new Error(`Invalid user_id: ${n}`);
|
|
3571
3571
|
return { connection: e, id: t };
|
|
3572
3572
|
}
|
|
3573
|
-
function
|
|
3573
|
+
function Dn(n) {
|
|
3574
3574
|
let e = {};
|
|
3575
3575
|
try {
|
|
3576
3576
|
e = JSON.parse(n.profileData || "{}");
|
|
@@ -3589,7 +3589,7 @@ function Pn(n) {
|
|
|
3589
3589
|
}
|
|
3590
3590
|
};
|
|
3591
3591
|
}
|
|
3592
|
-
function
|
|
3592
|
+
function $r(n) {
|
|
3593
3593
|
return async (e, t) => {
|
|
3594
3594
|
const [s, r] = await Promise.all([
|
|
3595
3595
|
n.selectFrom("users").where("users.tenant_id", "=", e).where("users.user_id", "=", t).selectAll().executeTakeFirst(),
|
|
@@ -3609,7 +3609,7 @@ function Rr(n) {
|
|
|
3609
3609
|
user_id: ln(s.user_id).id,
|
|
3610
3610
|
isSocial: !!s.is_social
|
|
3611
3611
|
},
|
|
3612
|
-
...r.map(
|
|
3612
|
+
...r.map(Dn)
|
|
3613
3613
|
]
|
|
3614
3614
|
};
|
|
3615
3615
|
return R(c);
|
|
@@ -3655,7 +3655,7 @@ function Ee(n, e, t, s) {
|
|
|
3655
3655
|
function ke(n) {
|
|
3656
3656
|
return typeof n == "string" ? parseInt(n, 10) : typeof n == "bigint" ? Number(n) : n;
|
|
3657
3657
|
}
|
|
3658
|
-
function
|
|
3658
|
+
function Pr(n) {
|
|
3659
3659
|
return async (e, t) => {
|
|
3660
3660
|
let s = n.selectFrom("users").where("users.tenant_id", "=", e);
|
|
3661
3661
|
if (t.q && (s = Ee(n, s, t.q, ["email", "name"])), t.sort && t.sort.sort_by) {
|
|
@@ -3677,7 +3677,7 @@ function $r(n) {
|
|
|
3677
3677
|
user_id: ln(l.user_id).id,
|
|
3678
3678
|
isSocial: !!l.is_social
|
|
3679
3679
|
},
|
|
3680
|
-
...j.map(
|
|
3680
|
+
...j.map(Dn)
|
|
3681
3681
|
]
|
|
3682
3682
|
});
|
|
3683
3683
|
}), { count: u } = await s.select((l) => l.fn.countAll().as("count")).executeTakeFirstOrThrow();
|
|
@@ -3689,48 +3689,48 @@ function $r(n) {
|
|
|
3689
3689
|
};
|
|
3690
3690
|
};
|
|
3691
3691
|
}
|
|
3692
|
-
function
|
|
3692
|
+
function Dr(n) {
|
|
3693
3693
|
return async (e, t) => (await n.deleteFrom("users").where("users.tenant_id", "=", e).where("users.linked_to", "=", t).execute(), (await n.deleteFrom("users").where("users.tenant_id", "=", e).where("users.user_id", "=", t).execute()).length === 1);
|
|
3694
3694
|
}
|
|
3695
|
-
function
|
|
3695
|
+
function Mr(n) {
|
|
3696
3696
|
if (n.email_verified !== void 0)
|
|
3697
3697
|
return n.email_verified ? 1 : 0;
|
|
3698
3698
|
}
|
|
3699
|
-
function
|
|
3699
|
+
function Lr(n) {
|
|
3700
3700
|
return async (e, t, s) => {
|
|
3701
3701
|
const r = {
|
|
3702
3702
|
...s,
|
|
3703
|
-
email_verified:
|
|
3703
|
+
email_verified: Mr(s),
|
|
3704
3704
|
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
3705
3705
|
};
|
|
3706
3706
|
return (await n.updateTable("users").set(r).where("users.tenant_id", "=", e).where("users.user_id", "=", t).execute()).length === 1;
|
|
3707
3707
|
};
|
|
3708
3708
|
}
|
|
3709
|
-
function
|
|
3709
|
+
function Vr(n) {
|
|
3710
3710
|
return async (e, t, s, r) => {
|
|
3711
3711
|
const a = { linked_to: null };
|
|
3712
3712
|
return (await n.updateTable("users").set(a).where("users.tenant_id", "=", e).where("users.user_id", "=", `${s}|${r}`).where("users.linked_to", "=", `${t}`).execute()).length === 1;
|
|
3713
3713
|
};
|
|
3714
3714
|
}
|
|
3715
|
-
function
|
|
3715
|
+
function Ur(n) {
|
|
3716
3716
|
return {
|
|
3717
|
-
create:
|
|
3718
|
-
remove:
|
|
3719
|
-
get:
|
|
3720
|
-
list:
|
|
3721
|
-
update:
|
|
3717
|
+
create: Yn(n),
|
|
3718
|
+
remove: Dr(n),
|
|
3719
|
+
get: $r(n),
|
|
3720
|
+
list: Pr(n),
|
|
3721
|
+
update: Lr(n),
|
|
3722
3722
|
// TODO - think about this more when other issues fixed
|
|
3723
|
-
unlink:
|
|
3723
|
+
unlink: Vr(n)
|
|
3724
3724
|
};
|
|
3725
3725
|
}
|
|
3726
|
-
const
|
|
3726
|
+
const Fr = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
3727
3727
|
let Ae = (n = 21) => {
|
|
3728
3728
|
let e = "", t = crypto.getRandomValues(new Uint8Array(n));
|
|
3729
3729
|
for (; n--; )
|
|
3730
|
-
e +=
|
|
3730
|
+
e += Fr[t[n] & 63];
|
|
3731
3731
|
return e;
|
|
3732
3732
|
};
|
|
3733
|
-
function
|
|
3733
|
+
function zr(n) {
|
|
3734
3734
|
return async (e) => {
|
|
3735
3735
|
const t = {
|
|
3736
3736
|
id: e.id || Ae(),
|
|
@@ -3741,13 +3741,13 @@ function Fr(n) {
|
|
|
3741
3741
|
return await n.insertInto("tenants").values(t).execute(), t;
|
|
3742
3742
|
};
|
|
3743
3743
|
}
|
|
3744
|
-
function
|
|
3744
|
+
function Br(n) {
|
|
3745
3745
|
return async (e) => {
|
|
3746
3746
|
const t = await n.selectFrom("tenants").where("tenants.id", "=", e).selectAll().executeTakeFirst();
|
|
3747
3747
|
return t ? R(t) : null;
|
|
3748
3748
|
};
|
|
3749
3749
|
}
|
|
3750
|
-
function
|
|
3750
|
+
function Wr(n) {
|
|
3751
3751
|
return async (e) => {
|
|
3752
3752
|
let t = n.selectFrom("tenants");
|
|
3753
3753
|
if (e.sort && e.sort.sort_by) {
|
|
@@ -3769,7 +3769,7 @@ function Br(n) {
|
|
|
3769
3769
|
};
|
|
3770
3770
|
};
|
|
3771
3771
|
}
|
|
3772
|
-
function
|
|
3772
|
+
function qr(n) {
|
|
3773
3773
|
return async (e, t) => {
|
|
3774
3774
|
const s = {
|
|
3775
3775
|
...t,
|
|
@@ -3779,29 +3779,29 @@ function Wr(n) {
|
|
|
3779
3779
|
await n.updateTable("tenants").set(s).where("id", "=", e).execute();
|
|
3780
3780
|
};
|
|
3781
3781
|
}
|
|
3782
|
-
function
|
|
3782
|
+
function Jr(n) {
|
|
3783
3783
|
return async (e) => (await n.deleteFrom("tenants").where("tenants.id", "=", e).execute()).length === 1;
|
|
3784
3784
|
}
|
|
3785
|
-
function
|
|
3785
|
+
function Kr(n) {
|
|
3786
3786
|
return {
|
|
3787
|
-
create:
|
|
3788
|
-
get:
|
|
3789
|
-
list:
|
|
3790
|
-
update:
|
|
3791
|
-
remove:
|
|
3787
|
+
create: zr(n),
|
|
3788
|
+
get: Br(n),
|
|
3789
|
+
list: Wr(n),
|
|
3790
|
+
update: qr(n),
|
|
3791
|
+
remove: Jr(n)
|
|
3792
3792
|
};
|
|
3793
3793
|
}
|
|
3794
3794
|
function _n(n) {
|
|
3795
3795
|
return n ? JSON.stringify(n) : void 0;
|
|
3796
3796
|
}
|
|
3797
|
-
const
|
|
3798
|
-
function
|
|
3797
|
+
const Hr = 1024;
|
|
3798
|
+
function Qr(n) {
|
|
3799
3799
|
return async (e, t) => {
|
|
3800
3800
|
var r, a, o;
|
|
3801
3801
|
const s = {
|
|
3802
3802
|
id: Ae(),
|
|
3803
3803
|
...t,
|
|
3804
|
-
user_agent: t.user_agent.slice(0,
|
|
3804
|
+
user_agent: t.user_agent.slice(0, Hr)
|
|
3805
3805
|
};
|
|
3806
3806
|
return await n.insertInto("logs").values({
|
|
3807
3807
|
...s,
|
|
@@ -3824,7 +3824,7 @@ function gn(n) {
|
|
|
3824
3824
|
return n;
|
|
3825
3825
|
}
|
|
3826
3826
|
}
|
|
3827
|
-
function
|
|
3827
|
+
function Mn(n) {
|
|
3828
3828
|
return {
|
|
3829
3829
|
...n,
|
|
3830
3830
|
client_id: n.client_id,
|
|
@@ -3837,7 +3837,7 @@ function Dn(n) {
|
|
|
3837
3837
|
_id: n.id
|
|
3838
3838
|
};
|
|
3839
3839
|
}
|
|
3840
|
-
function
|
|
3840
|
+
function Yr(n) {
|
|
3841
3841
|
return async (e, t) => {
|
|
3842
3842
|
let s = n.selectFrom("logs").where("logs.tenant_id", "=", e);
|
|
3843
3843
|
t.q && (s = Ee(n, s, t.q, ["user_id", "ip"]));
|
|
@@ -3852,30 +3852,30 @@ function Qr(n) {
|
|
|
3852
3852
|
r = r.offset(t.page * t.per_page).limit(t.per_page);
|
|
3853
3853
|
const a = await r.selectAll().execute(), { count: o } = await s.select((c) => c.fn.countAll().as("count")).executeTakeFirstOrThrow();
|
|
3854
3854
|
return {
|
|
3855
|
-
logs: a.map(
|
|
3855
|
+
logs: a.map(Mn),
|
|
3856
3856
|
start: t.page * t.per_page,
|
|
3857
3857
|
limit: t.per_page,
|
|
3858
3858
|
length: ke(o)
|
|
3859
3859
|
};
|
|
3860
3860
|
};
|
|
3861
3861
|
}
|
|
3862
|
-
function
|
|
3862
|
+
function Gr(n) {
|
|
3863
3863
|
return async (e, t) => {
|
|
3864
3864
|
const s = await n.selectFrom("logs").where("logs.tenant_id", "=", e).where("logs.id", "=", t).selectAll().executeTakeFirst();
|
|
3865
|
-
return s ?
|
|
3865
|
+
return s ? Mn(s) : null;
|
|
3866
3866
|
};
|
|
3867
3867
|
}
|
|
3868
|
-
function
|
|
3868
|
+
function Xr(n) {
|
|
3869
3869
|
return {
|
|
3870
|
-
create:
|
|
3871
|
-
list:
|
|
3872
|
-
get:
|
|
3870
|
+
create: Qr(n),
|
|
3871
|
+
list: Yr(n),
|
|
3872
|
+
get: Gr(n)
|
|
3873
3873
|
};
|
|
3874
3874
|
}
|
|
3875
|
-
function
|
|
3875
|
+
function ea(n) {
|
|
3876
3876
|
return async (e, t) => await n.selectFrom("sessions").where("sessions.tenant_id", "=", e).where("sessions.session_id", "=", t).where("sessions.deleted_at", "is", null).selectAll().executeTakeFirst() ?? null;
|
|
3877
3877
|
}
|
|
3878
|
-
function
|
|
3878
|
+
function ta(n) {
|
|
3879
3879
|
return async (e, t) => {
|
|
3880
3880
|
const s = {
|
|
3881
3881
|
...t,
|
|
@@ -3885,13 +3885,13 @@ function ea(n) {
|
|
|
3885
3885
|
return await n.insertInto("sessions").values({ ...s, tenant_id: e }).execute(), { ...t, ...s };
|
|
3886
3886
|
};
|
|
3887
3887
|
}
|
|
3888
|
-
function
|
|
3888
|
+
function na(n) {
|
|
3889
3889
|
return async (e, t) => !!(await n.updateTable("sessions").set({ deleted_at: (/* @__PURE__ */ new Date()).toISOString() }).where("tenant_id", "=", e).where("sessions.session_id", "=", t).where("sessions.deleted_at", "is", null).execute()).length;
|
|
3890
3890
|
}
|
|
3891
|
-
function
|
|
3891
|
+
function sa(n) {
|
|
3892
3892
|
return async (e, t, s) => !!(await n.updateTable("sessions").set(s).where("tenant_id", "=", e).where("sessions.session_id", "=", t).where("sessions.deleted_at", "is", null).execute()).length;
|
|
3893
3893
|
}
|
|
3894
|
-
function
|
|
3894
|
+
function ra(n) {
|
|
3895
3895
|
return async (e, t) => {
|
|
3896
3896
|
let s = n.selectFrom("sessions").where("sessions.tenant_id", "=", e);
|
|
3897
3897
|
t.q && (s = Ee(n, s, t.q, ["user_id", "session_id"]));
|
|
@@ -3913,16 +3913,16 @@ function sa(n) {
|
|
|
3913
3913
|
};
|
|
3914
3914
|
};
|
|
3915
3915
|
}
|
|
3916
|
-
function
|
|
3916
|
+
function aa(n) {
|
|
3917
3917
|
return {
|
|
3918
|
-
create:
|
|
3919
|
-
get:
|
|
3920
|
-
list:
|
|
3921
|
-
remove:
|
|
3922
|
-
update:
|
|
3918
|
+
create: ta(n),
|
|
3919
|
+
get: ea(n),
|
|
3920
|
+
list: ra(n),
|
|
3921
|
+
remove: na(n),
|
|
3922
|
+
update: sa(n)
|
|
3923
3923
|
};
|
|
3924
3924
|
}
|
|
3925
|
-
function
|
|
3925
|
+
function ia(n) {
|
|
3926
3926
|
return async (e, t) => {
|
|
3927
3927
|
const s = await n.selectFrom("tickets").where("tickets.tenant_id", "=", e).where("tickets.id", "=", t).where("tickets.used_at", "is", null).selectAll().executeTakeFirst();
|
|
3928
3928
|
if (!s)
|
|
@@ -3952,7 +3952,7 @@ function aa(n) {
|
|
|
3952
3952
|
};
|
|
3953
3953
|
};
|
|
3954
3954
|
}
|
|
3955
|
-
function
|
|
3955
|
+
function oa(n) {
|
|
3956
3956
|
return async (e) => {
|
|
3957
3957
|
const { authParams: t, ...s } = e, r = {
|
|
3958
3958
|
...s,
|
|
@@ -3964,27 +3964,27 @@ function ia(n) {
|
|
|
3964
3964
|
await n.insertInto("tickets").values(r).execute();
|
|
3965
3965
|
};
|
|
3966
3966
|
}
|
|
3967
|
-
function
|
|
3967
|
+
function ca(n) {
|
|
3968
3968
|
return async (e, t) => {
|
|
3969
3969
|
await n.updateTable("tickets").set({
|
|
3970
3970
|
used_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
3971
3971
|
}).where("tickets.tenant_id", "=", e).where("tickets.id", "=", t).execute();
|
|
3972
3972
|
};
|
|
3973
3973
|
}
|
|
3974
|
-
function
|
|
3974
|
+
function da(n) {
|
|
3975
3975
|
return {
|
|
3976
|
-
create:
|
|
3977
|
-
get:
|
|
3978
|
-
remove:
|
|
3976
|
+
create: oa(n),
|
|
3977
|
+
get: ia(n),
|
|
3978
|
+
remove: ca(n)
|
|
3979
3979
|
};
|
|
3980
3980
|
}
|
|
3981
|
-
function
|
|
3981
|
+
function ua(n) {
|
|
3982
3982
|
return async (e, t) => {
|
|
3983
3983
|
const s = await n.selectFrom("passwords").where("passwords.tenant_id", "=", e).where("passwords.user_id", "=", t).selectAll().executeTakeFirstOrThrow(), { tenant_id: r, ...a } = s;
|
|
3984
3984
|
return a;
|
|
3985
3985
|
};
|
|
3986
3986
|
}
|
|
3987
|
-
function
|
|
3987
|
+
function la(n) {
|
|
3988
3988
|
return async (e, t) => {
|
|
3989
3989
|
const s = {
|
|
3990
3990
|
...t,
|
|
@@ -3997,20 +3997,20 @@ function ua(n) {
|
|
|
3997
3997
|
}).execute(), s;
|
|
3998
3998
|
};
|
|
3999
3999
|
}
|
|
4000
|
-
function
|
|
4000
|
+
function pa(n) {
|
|
4001
4001
|
return async (e, t) => (await n.updateTable("passwords").set({
|
|
4002
4002
|
password: t.password,
|
|
4003
4003
|
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
4004
4004
|
}).where("tenant_id", "=", e).where("user_id", "=", t.user_id).execute()).length === 1;
|
|
4005
4005
|
}
|
|
4006
|
-
function
|
|
4006
|
+
function ha(n) {
|
|
4007
4007
|
return {
|
|
4008
|
-
create:
|
|
4009
|
-
update:
|
|
4010
|
-
get:
|
|
4008
|
+
create: la(n),
|
|
4009
|
+
update: pa(n),
|
|
4010
|
+
get: ua(n)
|
|
4011
4011
|
};
|
|
4012
4012
|
}
|
|
4013
|
-
function
|
|
4013
|
+
function fa(n) {
|
|
4014
4014
|
return async (e, t) => {
|
|
4015
4015
|
let s = n.selectFrom("codes").where("codes.tenant_id", "=", e);
|
|
4016
4016
|
t.q && (s = Ee(n, s, t.q, ["code", "login_id"]));
|
|
@@ -4018,7 +4018,7 @@ function ha(n) {
|
|
|
4018
4018
|
return {
|
|
4019
4019
|
codes: a.map((d) => {
|
|
4020
4020
|
const { tenant_id: u, ...l } = d;
|
|
4021
|
-
return
|
|
4021
|
+
return yr.parse(R(l));
|
|
4022
4022
|
}),
|
|
4023
4023
|
start: t.page * t.per_page,
|
|
4024
4024
|
limit: t.per_page,
|
|
@@ -4026,7 +4026,7 @@ function ha(n) {
|
|
|
4026
4026
|
};
|
|
4027
4027
|
};
|
|
4028
4028
|
}
|
|
4029
|
-
function
|
|
4029
|
+
function ma(n) {
|
|
4030
4030
|
return async (e, t) => {
|
|
4031
4031
|
const s = {
|
|
4032
4032
|
...t,
|
|
@@ -4038,10 +4038,10 @@ function fa(n) {
|
|
|
4038
4038
|
}).execute(), s;
|
|
4039
4039
|
};
|
|
4040
4040
|
}
|
|
4041
|
-
function
|
|
4041
|
+
function _a(n) {
|
|
4042
4042
|
return async (e, t) => (await n.deleteFrom("codes").where("codes.tenant_id", "=", e).where("codes.code_id", "=", t).executeTakeFirst()).numDeletedRows > 0;
|
|
4043
4043
|
}
|
|
4044
|
-
function
|
|
4044
|
+
function ga(n) {
|
|
4045
4045
|
return async (e, t, s) => {
|
|
4046
4046
|
let r = n.selectFrom("codes").where("codes.code_id", "=", t).where("codes.code_type", "=", s).where("codes.expires_at", ">", (/* @__PURE__ */ new Date()).toISOString());
|
|
4047
4047
|
e.length && (r = r.where("codes.tenant_id", "=", e));
|
|
@@ -4049,15 +4049,15 @@ function _a(n) {
|
|
|
4049
4049
|
return a ? R(a) : null;
|
|
4050
4050
|
};
|
|
4051
4051
|
}
|
|
4052
|
-
function
|
|
4052
|
+
function ya(n) {
|
|
4053
4053
|
return {
|
|
4054
|
-
create:
|
|
4055
|
-
list:
|
|
4056
|
-
remove:
|
|
4057
|
-
get:
|
|
4054
|
+
create: ma(n),
|
|
4055
|
+
list: fa(n),
|
|
4056
|
+
remove: _a(n),
|
|
4057
|
+
get: ga(n)
|
|
4058
4058
|
};
|
|
4059
4059
|
}
|
|
4060
|
-
function
|
|
4060
|
+
function va(n) {
|
|
4061
4061
|
return async (e, t) => {
|
|
4062
4062
|
const s = {
|
|
4063
4063
|
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -4076,7 +4076,7 @@ function ya(n) {
|
|
|
4076
4076
|
}).execute(), s;
|
|
4077
4077
|
};
|
|
4078
4078
|
}
|
|
4079
|
-
function
|
|
4079
|
+
function wa(n) {
|
|
4080
4080
|
return async (e) => ({
|
|
4081
4081
|
applications: (await n.selectFrom("applications").where("applications.tenant_id", "=", e).selectAll().execute()).map((a) => ({
|
|
4082
4082
|
...a,
|
|
@@ -4089,7 +4089,7 @@ function va(n) {
|
|
|
4089
4089
|
}))
|
|
4090
4090
|
});
|
|
4091
4091
|
}
|
|
4092
|
-
function
|
|
4092
|
+
function ba(n) {
|
|
4093
4093
|
return async (e, t) => {
|
|
4094
4094
|
const s = await n.selectFrom("applications").where("applications.tenant_id", "=", e).where("applications.id", "=", t).selectAll().executeTakeFirst();
|
|
4095
4095
|
return s ? R({
|
|
@@ -4103,10 +4103,10 @@ function wa(n) {
|
|
|
4103
4103
|
}) : null;
|
|
4104
4104
|
};
|
|
4105
4105
|
}
|
|
4106
|
-
function
|
|
4106
|
+
function ka(n) {
|
|
4107
4107
|
return async (e, t) => (await n.deleteFrom("applications").where("applications.tenant_id", "=", e).where("applications.id", "=", t).executeTakeFirst()).numDeletedRows > 0;
|
|
4108
4108
|
}
|
|
4109
|
-
function
|
|
4109
|
+
function xa(n) {
|
|
4110
4110
|
return async (e, t, s) => {
|
|
4111
4111
|
const r = {
|
|
4112
4112
|
...s,
|
|
@@ -4121,16 +4121,16 @@ function ka(n) {
|
|
|
4121
4121
|
return await n.updateTable("applications").set(r).where("applications.id", "=", t).where("applications.tenant_id", "=", e).execute(), !0;
|
|
4122
4122
|
};
|
|
4123
4123
|
}
|
|
4124
|
-
function
|
|
4124
|
+
function Ta(n) {
|
|
4125
4125
|
return {
|
|
4126
|
-
create:
|
|
4127
|
-
list:
|
|
4128
|
-
get:
|
|
4129
|
-
remove:
|
|
4130
|
-
update:
|
|
4126
|
+
create: va(n),
|
|
4127
|
+
list: wa(n),
|
|
4128
|
+
get: ba(n),
|
|
4129
|
+
remove: ka(n),
|
|
4130
|
+
update: xa(n)
|
|
4131
4131
|
};
|
|
4132
4132
|
}
|
|
4133
|
-
function
|
|
4133
|
+
function Oa(n, e) {
|
|
4134
4134
|
var t = {};
|
|
4135
4135
|
for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && e.indexOf(s) < 0 && (t[s] = n[s]);
|
|
4136
4136
|
if (n != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -4138,7 +4138,7 @@ function Ta(n, e) {
|
|
|
4138
4138
|
e.indexOf(s[r]) < 0 && Object.prototype.propertyIsEnumerable.call(n, s[r]) && (t[s[r]] = n[s[r]]);
|
|
4139
4139
|
return t;
|
|
4140
4140
|
}
|
|
4141
|
-
function
|
|
4141
|
+
function Sa(n, e) {
|
|
4142
4142
|
var t;
|
|
4143
4143
|
return ((t = n == null ? void 0 : n._def) === null || t === void 0 ? void 0 : t.typeName) === e;
|
|
4144
4144
|
}
|
|
@@ -4149,15 +4149,15 @@ function Ye(n, e) {
|
|
|
4149
4149
|
return r._def.openapi = this._def.openapi, r;
|
|
4150
4150
|
};
|
|
4151
4151
|
}
|
|
4152
|
-
function
|
|
4152
|
+
function Za(n) {
|
|
4153
4153
|
if (typeof n.ZodType.prototype.openapi < "u")
|
|
4154
4154
|
return;
|
|
4155
4155
|
n.ZodType.prototype.openapi = function(r, a) {
|
|
4156
4156
|
var o, c, d, u, l, j;
|
|
4157
|
-
const A = typeof r == "string" ? a : r, U = A ?? {}, { param: ie } = U, $e =
|
|
4157
|
+
const A = typeof r == "string" ? a : r, U = A ?? {}, { param: ie } = U, $e = Oa(U, ["param"]), oe = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof r == "string" ? { refId: r } : void 0), ce = Object.assign(Object.assign(Object.assign({}, (c = this._def.openapi) === null || c === void 0 ? void 0 : c.metadata), $e), !((u = (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata) === null || u === void 0) && u.param || ie ? {
|
|
4158
4158
|
param: Object.assign(Object.assign({}, (j = (l = this._def.openapi) === null || l === void 0 ? void 0 : l.metadata) === null || j === void 0 ? void 0 : j.param), ie)
|
|
4159
4159
|
} : void 0), de = new this.constructor(Object.assign(Object.assign({}, this._def), { openapi: Object.assign(Object.assign({}, Object.keys(oe).length > 0 ? { _internal: oe } : void 0), Object.keys(ce).length > 0 ? { metadata: ce } : void 0) }));
|
|
4160
|
-
if (
|
|
4160
|
+
if (Sa(this, "ZodObject")) {
|
|
4161
4161
|
const Pe = this.extend;
|
|
4162
4162
|
de.extend = function(...De) {
|
|
4163
4163
|
var K, H, Q, ue, xe, Te;
|
|
@@ -4295,7 +4295,7 @@ const g = C.arrayToEnum([
|
|
|
4295
4295
|
"invalid_intersection_types",
|
|
4296
4296
|
"not_multiple_of",
|
|
4297
4297
|
"not_finite"
|
|
4298
|
-
]),
|
|
4298
|
+
]), ja = (n) => JSON.stringify(n, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
4299
4299
|
class V extends Error {
|
|
4300
4300
|
constructor(e) {
|
|
4301
4301
|
super(), this.issues = [], this.addIssue = (s) => {
|
|
@@ -4412,12 +4412,12 @@ const Je = (n, e) => {
|
|
|
4412
4412
|
}
|
|
4413
4413
|
return { message: t };
|
|
4414
4414
|
};
|
|
4415
|
-
let
|
|
4416
|
-
function
|
|
4417
|
-
|
|
4415
|
+
let Ln = Je;
|
|
4416
|
+
function Na(n) {
|
|
4417
|
+
Ln = n;
|
|
4418
4418
|
}
|
|
4419
4419
|
function Vt() {
|
|
4420
|
-
return
|
|
4420
|
+
return Ln;
|
|
4421
4421
|
}
|
|
4422
4422
|
const Ut = (n) => {
|
|
4423
4423
|
const { data: e, path: t, errorMaps: s, issueData: r } = n, a = [...t, ...r.path || []], o = {
|
|
@@ -4439,7 +4439,7 @@ const Ut = (n) => {
|
|
|
4439
4439
|
path: a,
|
|
4440
4440
|
message: c
|
|
4441
4441
|
};
|
|
4442
|
-
},
|
|
4442
|
+
}, Ca = [];
|
|
4443
4443
|
function m(n, e) {
|
|
4444
4444
|
const t = Vt(), s = Ut({
|
|
4445
4445
|
issueData: e,
|
|
@@ -4503,7 +4503,7 @@ function Ft(n, e, t, s) {
|
|
|
4503
4503
|
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");
|
|
4504
4504
|
return e.get(n);
|
|
4505
4505
|
}
|
|
4506
|
-
function
|
|
4506
|
+
function Vn(n, e, t, s, r) {
|
|
4507
4507
|
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");
|
|
4508
4508
|
return e.set(n, t), t;
|
|
4509
4509
|
}
|
|
@@ -4730,23 +4730,23 @@ class Z {
|
|
|
4730
4730
|
return this.safeParse(null).success;
|
|
4731
4731
|
}
|
|
4732
4732
|
}
|
|
4733
|
-
const
|
|
4733
|
+
const Ia = /^c[^\s-]{8,}$/i, Ea = /^[0-9a-z]+$/, Aa = /^[0-9A-HJKMNP-TV-Z]{26}$/, Ra = /^[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, $a = /^[a-z0-9_-]{21}$/i, Pa = /^[-+]?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)?)??$/, Da = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Ma = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
4734
4734
|
let Yt;
|
|
4735
|
-
const
|
|
4736
|
-
function
|
|
4735
|
+
const La = /^(?:(?: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])$/, Va = /^(([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})))$/, Ua = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Un = "((\\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])))", Fa = new RegExp(`^${Un}$`);
|
|
4736
|
+
function Fn(n) {
|
|
4737
4737
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
4738
4738
|
return n.precision ? e = `${e}\\.\\d{${n.precision}}` : n.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
4739
4739
|
}
|
|
4740
|
-
function
|
|
4741
|
-
return new RegExp(`^${
|
|
4740
|
+
function za(n) {
|
|
4741
|
+
return new RegExp(`^${Fn(n)}$`);
|
|
4742
4742
|
}
|
|
4743
|
-
function
|
|
4744
|
-
let e = `${
|
|
4743
|
+
function zn(n) {
|
|
4744
|
+
let e = `${Un}T${Fn(n)}`;
|
|
4745
4745
|
const t = [];
|
|
4746
4746
|
return t.push(n.local ? "Z?" : "Z"), n.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
|
|
4747
4747
|
}
|
|
4748
|
-
function
|
|
4749
|
-
return !!((e === "v4" || !e) &&
|
|
4748
|
+
function Ba(n, e) {
|
|
4749
|
+
return !!((e === "v4" || !e) && La.test(n) || (e === "v6" || !e) && Va.test(n));
|
|
4750
4750
|
}
|
|
4751
4751
|
class z extends Z {
|
|
4752
4752
|
_parse(e) {
|
|
@@ -4797,43 +4797,43 @@ class z extends Z {
|
|
|
4797
4797
|
message: a.message
|
|
4798
4798
|
}), s.dirty());
|
|
4799
4799
|
} else if (a.kind === "email")
|
|
4800
|
-
|
|
4800
|
+
Da.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4801
4801
|
validation: "email",
|
|
4802
4802
|
code: h.invalid_string,
|
|
4803
4803
|
message: a.message
|
|
4804
4804
|
}), s.dirty());
|
|
4805
4805
|
else if (a.kind === "emoji")
|
|
4806
|
-
Yt || (Yt = new RegExp(
|
|
4806
|
+
Yt || (Yt = new RegExp(Ma, "u")), Yt.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4807
4807
|
validation: "emoji",
|
|
4808
4808
|
code: h.invalid_string,
|
|
4809
4809
|
message: a.message
|
|
4810
4810
|
}), s.dirty());
|
|
4811
4811
|
else if (a.kind === "uuid")
|
|
4812
|
-
|
|
4812
|
+
Ra.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4813
4813
|
validation: "uuid",
|
|
4814
4814
|
code: h.invalid_string,
|
|
4815
4815
|
message: a.message
|
|
4816
4816
|
}), s.dirty());
|
|
4817
4817
|
else if (a.kind === "nanoid")
|
|
4818
|
-
|
|
4818
|
+
$a.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4819
4819
|
validation: "nanoid",
|
|
4820
4820
|
code: h.invalid_string,
|
|
4821
4821
|
message: a.message
|
|
4822
4822
|
}), s.dirty());
|
|
4823
4823
|
else if (a.kind === "cuid")
|
|
4824
|
-
|
|
4824
|
+
Ia.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4825
4825
|
validation: "cuid",
|
|
4826
4826
|
code: h.invalid_string,
|
|
4827
4827
|
message: a.message
|
|
4828
4828
|
}), s.dirty());
|
|
4829
4829
|
else if (a.kind === "cuid2")
|
|
4830
|
-
|
|
4830
|
+
Ea.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4831
4831
|
validation: "cuid2",
|
|
4832
4832
|
code: h.invalid_string,
|
|
4833
4833
|
message: a.message
|
|
4834
4834
|
}), s.dirty());
|
|
4835
4835
|
else if (a.kind === "ulid")
|
|
4836
|
-
|
|
4836
|
+
Aa.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4837
4837
|
validation: "ulid",
|
|
4838
4838
|
code: h.invalid_string,
|
|
4839
4839
|
message: a.message
|
|
@@ -4864,27 +4864,27 @@ class z extends Z {
|
|
|
4864
4864
|
code: h.invalid_string,
|
|
4865
4865
|
validation: { endsWith: a.value },
|
|
4866
4866
|
message: a.message
|
|
4867
|
-
}), s.dirty()) : a.kind === "datetime" ?
|
|
4867
|
+
}), s.dirty()) : a.kind === "datetime" ? zn(a).test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4868
4868
|
code: h.invalid_string,
|
|
4869
4869
|
validation: "datetime",
|
|
4870
4870
|
message: a.message
|
|
4871
|
-
}), s.dirty()) : a.kind === "date" ?
|
|
4871
|
+
}), s.dirty()) : a.kind === "date" ? Fa.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4872
4872
|
code: h.invalid_string,
|
|
4873
4873
|
validation: "date",
|
|
4874
4874
|
message: a.message
|
|
4875
|
-
}), s.dirty()) : a.kind === "time" ?
|
|
4875
|
+
}), s.dirty()) : a.kind === "time" ? za(a).test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4876
4876
|
code: h.invalid_string,
|
|
4877
4877
|
validation: "time",
|
|
4878
4878
|
message: a.message
|
|
4879
|
-
}), s.dirty()) : a.kind === "duration" ?
|
|
4879
|
+
}), s.dirty()) : a.kind === "duration" ? Pa.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4880
4880
|
validation: "duration",
|
|
4881
4881
|
code: h.invalid_string,
|
|
4882
4882
|
message: a.message
|
|
4883
|
-
}), s.dirty()) : a.kind === "ip" ?
|
|
4883
|
+
}), s.dirty()) : a.kind === "ip" ? Ba(e.data, a.version) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4884
4884
|
validation: "ip",
|
|
4885
4885
|
code: h.invalid_string,
|
|
4886
4886
|
message: a.message
|
|
4887
|
-
}), s.dirty()) : a.kind === "base64" ?
|
|
4887
|
+
}), s.dirty()) : a.kind === "base64" ? Ua.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4888
4888
|
validation: "base64",
|
|
4889
4889
|
code: h.invalid_string,
|
|
4890
4890
|
message: a.message
|
|
@@ -5106,7 +5106,7 @@ z.create = (n) => {
|
|
|
5106
5106
|
...O(n)
|
|
5107
5107
|
});
|
|
5108
5108
|
};
|
|
5109
|
-
function
|
|
5109
|
+
function Wa(n, e) {
|
|
5110
5110
|
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(".", ""));
|
|
5111
5111
|
return a % o / Math.pow(10, r);
|
|
5112
5112
|
}
|
|
@@ -5145,7 +5145,7 @@ class ye extends Z {
|
|
|
5145
5145
|
inclusive: a.inclusive,
|
|
5146
5146
|
exact: !1,
|
|
5147
5147
|
message: a.message
|
|
5148
|
-
}), r.dirty()) : a.kind === "multipleOf" ?
|
|
5148
|
+
}), r.dirty()) : a.kind === "multipleOf" ? Wa(e.data, a.value) !== 0 && (s = this._getOrReturnCtx(e, s), m(s, {
|
|
5149
5149
|
code: h.not_multiple_of,
|
|
5150
5150
|
multipleOf: a.value,
|
|
5151
5151
|
message: a.message
|
|
@@ -5964,7 +5964,7 @@ class E extends Z {
|
|
|
5964
5964
|
});
|
|
5965
5965
|
}
|
|
5966
5966
|
keyof() {
|
|
5967
|
-
return
|
|
5967
|
+
return Bn(C.objectKeys(this.shape));
|
|
5968
5968
|
}
|
|
5969
5969
|
}
|
|
5970
5970
|
E.create = (n, e) => new E({
|
|
@@ -6527,7 +6527,7 @@ Ot.create = (n, e) => new Ot({
|
|
|
6527
6527
|
typeName: b.ZodLiteral,
|
|
6528
6528
|
...O(e)
|
|
6529
6529
|
});
|
|
6530
|
-
function
|
|
6530
|
+
function Bn(n, e) {
|
|
6531
6531
|
return new we({
|
|
6532
6532
|
values: n,
|
|
6533
6533
|
typeName: b.ZodEnum,
|
|
@@ -6547,7 +6547,7 @@ class we extends Z {
|
|
|
6547
6547
|
code: h.invalid_type
|
|
6548
6548
|
}), k;
|
|
6549
6549
|
}
|
|
6550
|
-
if (Ft(this, et) ||
|
|
6550
|
+
if (Ft(this, et) || Vn(this, et, new Set(this._def.values)), !Ft(this, et).has(e.data)) {
|
|
6551
6551
|
const t = this._getOrReturnCtx(e), s = this._def.values;
|
|
6552
6552
|
return m(t, {
|
|
6553
6553
|
received: t.data,
|
|
@@ -6592,7 +6592,7 @@ class we extends Z {
|
|
|
6592
6592
|
}
|
|
6593
6593
|
}
|
|
6594
6594
|
et = /* @__PURE__ */ new WeakMap();
|
|
6595
|
-
we.create =
|
|
6595
|
+
we.create = Bn;
|
|
6596
6596
|
class St extends Z {
|
|
6597
6597
|
constructor() {
|
|
6598
6598
|
super(...arguments), tt.set(this, void 0);
|
|
@@ -6607,7 +6607,7 @@ class St extends Z {
|
|
|
6607
6607
|
code: h.invalid_type
|
|
6608
6608
|
}), k;
|
|
6609
6609
|
}
|
|
6610
|
-
if (Ft(this, tt) ||
|
|
6610
|
+
if (Ft(this, tt) || Vn(this, tt, new Set(C.getValidEnumValues(this._def.values))), !Ft(this, tt).has(e.data)) {
|
|
6611
6611
|
const r = C.objectValues(t);
|
|
6612
6612
|
return m(s, {
|
|
6613
6613
|
received: s.data,
|
|
@@ -6846,7 +6846,7 @@ qt.create = (n) => new qt({
|
|
|
6846
6846
|
typeName: b.ZodNaN,
|
|
6847
6847
|
...O(n)
|
|
6848
6848
|
});
|
|
6849
|
-
const
|
|
6849
|
+
const qa = Symbol("zod_brand");
|
|
6850
6850
|
class pn extends Z {
|
|
6851
6851
|
_parse(e) {
|
|
6852
6852
|
const { ctx: t } = this._processInputParams(e), s = t.data;
|
|
@@ -6914,7 +6914,7 @@ Nt.create = (n, e) => new Nt({
|
|
|
6914
6914
|
typeName: b.ZodReadonly,
|
|
6915
6915
|
...O(e)
|
|
6916
6916
|
});
|
|
6917
|
-
function
|
|
6917
|
+
function Wn(n, e = {}, t) {
|
|
6918
6918
|
return n ? Ke.create().superRefine((s, r) => {
|
|
6919
6919
|
var a, o;
|
|
6920
6920
|
if (!n(s)) {
|
|
@@ -6923,16 +6923,16 @@ function Bn(n, e = {}, t) {
|
|
|
6923
6923
|
}
|
|
6924
6924
|
}) : Ke.create();
|
|
6925
6925
|
}
|
|
6926
|
-
const
|
|
6926
|
+
const Ja = {
|
|
6927
6927
|
object: E.lazycreate
|
|
6928
6928
|
};
|
|
6929
6929
|
var b;
|
|
6930
6930
|
(function(n) {
|
|
6931
6931
|
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";
|
|
6932
6932
|
})(b || (b = {}));
|
|
6933
|
-
const
|
|
6933
|
+
const Ka = (n, e = {
|
|
6934
6934
|
message: `Input not instance of ${n.name}`
|
|
6935
|
-
}) =>
|
|
6935
|
+
}) => Wn((t) => t instanceof n, e), qn = z.create, Jn = ye.create, Ha = qt.create, Qa = ve.create, Kn = yt.create, Ya = Ce.create, Ga = zt.create, Xa = vt.create, ei = wt.create, ti = Ke.create, ni = Ze.create, si = ae.create, ri = Bt.create, ai = W.create, ii = E.create, oi = E.strictCreate, ci = bt.create, di = Kt.create, ui = kt.create, li = ne.create, pi = xt.create, hi = Wt.create, fi = Ie.create, mi = ze.create, _i = Tt.create, gi = Ot.create, yi = we.create, vi = St.create, wi = He.create, vn = J.create, bi = G.create, ki = be.create, xi = J.createWithPreprocess, Ti = It.create, Oi = () => qn().optional(), Si = () => Jn().optional(), Zi = () => Kn().optional(), ji = {
|
|
6936
6936
|
string: (n) => z.create({ ...n, coerce: !0 }),
|
|
6937
6937
|
number: (n) => ye.create({ ...n, coerce: !0 }),
|
|
6938
6938
|
boolean: (n) => yt.create({
|
|
@@ -6941,14 +6941,14 @@ const Ja = (n, e = {
|
|
|
6941
6941
|
}),
|
|
6942
6942
|
bigint: (n) => ve.create({ ...n, coerce: !0 }),
|
|
6943
6943
|
date: (n) => Ce.create({ ...n, coerce: !0 })
|
|
6944
|
-
},
|
|
6945
|
-
var
|
|
6944
|
+
}, Ni = k;
|
|
6945
|
+
var Ci = /* @__PURE__ */ Object.freeze({
|
|
6946
6946
|
__proto__: null,
|
|
6947
6947
|
defaultErrorMap: Je,
|
|
6948
|
-
setErrorMap:
|
|
6948
|
+
setErrorMap: Na,
|
|
6949
6949
|
getErrorMap: Vt,
|
|
6950
6950
|
makeIssue: Ut,
|
|
6951
|
-
EMPTY_PATH:
|
|
6951
|
+
EMPTY_PATH: Ca,
|
|
6952
6952
|
addIssueToContext: m,
|
|
6953
6953
|
ParseStatus: P,
|
|
6954
6954
|
INVALID: k,
|
|
@@ -6967,7 +6967,7 @@ var Ni = /* @__PURE__ */ Object.freeze({
|
|
|
6967
6967
|
ZodParsedType: g,
|
|
6968
6968
|
getParsedType: he,
|
|
6969
6969
|
ZodType: Z,
|
|
6970
|
-
datetimeRegex:
|
|
6970
|
+
datetimeRegex: zn,
|
|
6971
6971
|
ZodString: z,
|
|
6972
6972
|
ZodNumber: ye,
|
|
6973
6973
|
ZodBigInt: ve,
|
|
@@ -7002,63 +7002,63 @@ var Ni = /* @__PURE__ */ Object.freeze({
|
|
|
7002
7002
|
ZodDefault: Zt,
|
|
7003
7003
|
ZodCatch: jt,
|
|
7004
7004
|
ZodNaN: qt,
|
|
7005
|
-
BRAND:
|
|
7005
|
+
BRAND: qa,
|
|
7006
7006
|
ZodBranded: pn,
|
|
7007
7007
|
ZodPipeline: It,
|
|
7008
7008
|
ZodReadonly: Nt,
|
|
7009
|
-
custom:
|
|
7009
|
+
custom: Wn,
|
|
7010
7010
|
Schema: Z,
|
|
7011
7011
|
ZodSchema: Z,
|
|
7012
|
-
late:
|
|
7012
|
+
late: Ja,
|
|
7013
7013
|
get ZodFirstPartyTypeKind() {
|
|
7014
7014
|
return b;
|
|
7015
7015
|
},
|
|
7016
|
-
coerce:
|
|
7017
|
-
any:
|
|
7018
|
-
array:
|
|
7019
|
-
bigint:
|
|
7020
|
-
boolean:
|
|
7021
|
-
date:
|
|
7022
|
-
discriminatedUnion:
|
|
7016
|
+
coerce: ji,
|
|
7017
|
+
any: ti,
|
|
7018
|
+
array: ai,
|
|
7019
|
+
bigint: Qa,
|
|
7020
|
+
boolean: Kn,
|
|
7021
|
+
date: Ya,
|
|
7022
|
+
discriminatedUnion: di,
|
|
7023
7023
|
effect: vn,
|
|
7024
|
-
enum:
|
|
7025
|
-
function:
|
|
7026
|
-
instanceof:
|
|
7027
|
-
intersection:
|
|
7028
|
-
lazy:
|
|
7029
|
-
literal:
|
|
7030
|
-
map:
|
|
7031
|
-
nan:
|
|
7032
|
-
nativeEnum:
|
|
7033
|
-
never:
|
|
7034
|
-
null:
|
|
7035
|
-
nullable:
|
|
7036
|
-
number:
|
|
7037
|
-
object:
|
|
7038
|
-
oboolean:
|
|
7039
|
-
onumber:
|
|
7040
|
-
optional:
|
|
7041
|
-
ostring:
|
|
7042
|
-
pipeline:
|
|
7043
|
-
preprocess:
|
|
7044
|
-
promise:
|
|
7045
|
-
record:
|
|
7046
|
-
set:
|
|
7047
|
-
strictObject:
|
|
7048
|
-
string:
|
|
7049
|
-
symbol:
|
|
7024
|
+
enum: yi,
|
|
7025
|
+
function: mi,
|
|
7026
|
+
instanceof: Ka,
|
|
7027
|
+
intersection: ui,
|
|
7028
|
+
lazy: _i,
|
|
7029
|
+
literal: gi,
|
|
7030
|
+
map: hi,
|
|
7031
|
+
nan: Ha,
|
|
7032
|
+
nativeEnum: vi,
|
|
7033
|
+
never: si,
|
|
7034
|
+
null: ei,
|
|
7035
|
+
nullable: ki,
|
|
7036
|
+
number: Jn,
|
|
7037
|
+
object: ii,
|
|
7038
|
+
oboolean: Zi,
|
|
7039
|
+
onumber: Si,
|
|
7040
|
+
optional: bi,
|
|
7041
|
+
ostring: Oi,
|
|
7042
|
+
pipeline: Ti,
|
|
7043
|
+
preprocess: xi,
|
|
7044
|
+
promise: wi,
|
|
7045
|
+
record: pi,
|
|
7046
|
+
set: fi,
|
|
7047
|
+
strictObject: oi,
|
|
7048
|
+
string: qn,
|
|
7049
|
+
symbol: Ga,
|
|
7050
7050
|
transformer: vn,
|
|
7051
|
-
tuple:
|
|
7052
|
-
undefined:
|
|
7053
|
-
union:
|
|
7054
|
-
unknown:
|
|
7055
|
-
void:
|
|
7056
|
-
NEVER:
|
|
7051
|
+
tuple: li,
|
|
7052
|
+
undefined: Xa,
|
|
7053
|
+
union: ci,
|
|
7054
|
+
unknown: ni,
|
|
7055
|
+
void: ri,
|
|
7056
|
+
NEVER: Ni,
|
|
7057
7057
|
ZodIssueCode: h,
|
|
7058
|
-
quotelessJson:
|
|
7058
|
+
quotelessJson: ja,
|
|
7059
7059
|
ZodError: V
|
|
7060
7060
|
});
|
|
7061
|
-
|
|
7061
|
+
Za(Ci);
|
|
7062
7062
|
function Re(n, e = "", t = {}) {
|
|
7063
7063
|
for (let s in n)
|
|
7064
7064
|
if (Object.prototype.hasOwnProperty.call(n, s)) {
|
|
@@ -7085,7 +7085,7 @@ function hn(n, e) {
|
|
|
7085
7085
|
}
|
|
7086
7086
|
return t;
|
|
7087
7087
|
}
|
|
7088
|
-
function
|
|
7088
|
+
function Ii(n) {
|
|
7089
7089
|
return async (e, t) => {
|
|
7090
7090
|
const s = {
|
|
7091
7091
|
id: Ae(),
|
|
@@ -7096,7 +7096,7 @@ function Ci(n) {
|
|
|
7096
7096
|
return await n.insertInto("connections").values({ ...Re(s), tenant_id: e }).execute(), s;
|
|
7097
7097
|
};
|
|
7098
7098
|
}
|
|
7099
|
-
function
|
|
7099
|
+
function Ei(n) {
|
|
7100
7100
|
return async (e, t) => {
|
|
7101
7101
|
let s = n.selectFrom("connections").where("connections.tenant_id", "=", e);
|
|
7102
7102
|
t.q && (s = Ee(n, s, t.q, ["user_id", "ip"]));
|
|
@@ -7111,16 +7111,16 @@ function Ii(n) {
|
|
|
7111
7111
|
};
|
|
7112
7112
|
};
|
|
7113
7113
|
}
|
|
7114
|
-
function
|
|
7114
|
+
function Ai(n) {
|
|
7115
7115
|
return async (e, t) => (await n.deleteFrom("connections").where("connections.tenant_id", "=", e).where("connections.id", "=", t).executeTakeFirst()).numDeletedRows > 0;
|
|
7116
7116
|
}
|
|
7117
|
-
function
|
|
7117
|
+
function Ri(n) {
|
|
7118
7118
|
return async (e, t) => {
|
|
7119
7119
|
const s = await n.selectFrom("connections").where("connections.tenant_id", "=", e).where("connections.id", "=", t).selectAll().executeTakeFirst();
|
|
7120
7120
|
return s ? R(hn(s, ["options"])) : null;
|
|
7121
7121
|
};
|
|
7122
7122
|
}
|
|
7123
|
-
function
|
|
7123
|
+
function $i(n) {
|
|
7124
7124
|
return async (e, t, s) => {
|
|
7125
7125
|
const r = {
|
|
7126
7126
|
...s,
|
|
@@ -7129,16 +7129,16 @@ function Ri(n) {
|
|
|
7129
7129
|
return await n.updateTable("connections").set(Re(r)).where("connections.id", "=", t).where("connections.tenant_id", "=", e).execute(), !0;
|
|
7130
7130
|
};
|
|
7131
7131
|
}
|
|
7132
|
-
function
|
|
7132
|
+
function Pi(n) {
|
|
7133
7133
|
return {
|
|
7134
|
-
create:
|
|
7135
|
-
get:
|
|
7136
|
-
list:
|
|
7137
|
-
remove:
|
|
7138
|
-
update:
|
|
7134
|
+
create: Ii(n),
|
|
7135
|
+
get: Ri(n),
|
|
7136
|
+
list: Ei(n),
|
|
7137
|
+
remove: Ai(n),
|
|
7138
|
+
update: $i(n)
|
|
7139
7139
|
};
|
|
7140
7140
|
}
|
|
7141
|
-
function
|
|
7141
|
+
function Di(n) {
|
|
7142
7142
|
return {
|
|
7143
7143
|
get: async (e) => {
|
|
7144
7144
|
const t = await n.selectFrom("applications").selectAll().where("id", "=", e).executeTakeFirst();
|
|
@@ -7151,7 +7151,7 @@ function Pi(n) {
|
|
|
7151
7151
|
return {
|
|
7152
7152
|
...t,
|
|
7153
7153
|
connections: r.map(
|
|
7154
|
-
(c) =>
|
|
7154
|
+
(c) => $n.parse(R(c))
|
|
7155
7155
|
),
|
|
7156
7156
|
domains: a,
|
|
7157
7157
|
addons: t.addons ? JSON.parse(t.addons) : {},
|
|
@@ -7166,25 +7166,25 @@ function Pi(n) {
|
|
|
7166
7166
|
}
|
|
7167
7167
|
};
|
|
7168
7168
|
}
|
|
7169
|
-
function
|
|
7169
|
+
function Mi(n) {
|
|
7170
7170
|
return async () => await n.selectFrom("keys").where("revoked_at", "is", null).selectAll().execute();
|
|
7171
7171
|
}
|
|
7172
|
-
function
|
|
7172
|
+
function Li(n) {
|
|
7173
7173
|
return async (e) => {
|
|
7174
7174
|
await n.insertInto("keys").values({ ...e, created_at: (/* @__PURE__ */ new Date()).toDateString() }).execute();
|
|
7175
7175
|
};
|
|
7176
7176
|
}
|
|
7177
|
-
function
|
|
7177
|
+
function Vi(n) {
|
|
7178
7178
|
return async (e, t) => !!(await n.updateTable("keys").set(t).where("kid", "=", e).execute()).length;
|
|
7179
7179
|
}
|
|
7180
|
-
function
|
|
7180
|
+
function Ui(n) {
|
|
7181
7181
|
return {
|
|
7182
|
-
create:
|
|
7183
|
-
list:
|
|
7184
|
-
update:
|
|
7182
|
+
create: Li(n),
|
|
7183
|
+
list: Mi(n),
|
|
7184
|
+
update: Vi(n)
|
|
7185
7185
|
};
|
|
7186
7186
|
}
|
|
7187
|
-
function
|
|
7187
|
+
function Fi(n) {
|
|
7188
7188
|
return async (e, t) => {
|
|
7189
7189
|
const s = {
|
|
7190
7190
|
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -7196,7 +7196,7 @@ function Ui(n) {
|
|
|
7196
7196
|
return await n.insertInto("domains").values(s).execute(), s;
|
|
7197
7197
|
};
|
|
7198
7198
|
}
|
|
7199
|
-
function
|
|
7199
|
+
function zi(n) {
|
|
7200
7200
|
return async (e, t) => {
|
|
7201
7201
|
let s = n.selectFrom("domains").where("domains.tenant_id", "=", e);
|
|
7202
7202
|
t.q && (s = Ee(n, s, t.q, ["user_id", "ip"]));
|
|
@@ -7209,13 +7209,13 @@ function Fi(n) {
|
|
|
7209
7209
|
};
|
|
7210
7210
|
};
|
|
7211
7211
|
}
|
|
7212
|
-
function
|
|
7212
|
+
function Bi(n) {
|
|
7213
7213
|
return {
|
|
7214
|
-
create:
|
|
7215
|
-
list:
|
|
7214
|
+
create: Fi(n),
|
|
7215
|
+
list: zi(n)
|
|
7216
7216
|
};
|
|
7217
7217
|
}
|
|
7218
|
-
function
|
|
7218
|
+
function Wi(n) {
|
|
7219
7219
|
return async (e) => {
|
|
7220
7220
|
const [t] = await n.selectFrom("branding").where("branding.tenant_id", "=", e).selectAll().execute();
|
|
7221
7221
|
if (!t)
|
|
@@ -7245,7 +7245,7 @@ function Bi(n) {
|
|
|
7245
7245
|
});
|
|
7246
7246
|
};
|
|
7247
7247
|
}
|
|
7248
|
-
function
|
|
7248
|
+
function qi(n) {
|
|
7249
7249
|
return async (e, t) => {
|
|
7250
7250
|
var o, c, d, u, l, j, A, U, ie, $e, oe, ce, de, Pe, De, K, H, Q;
|
|
7251
7251
|
const { colors: s, font: r, ...a } = t;
|
|
@@ -7273,13 +7273,13 @@ function Wi(n) {
|
|
|
7273
7273
|
}
|
|
7274
7274
|
};
|
|
7275
7275
|
}
|
|
7276
|
-
function
|
|
7276
|
+
function Ji(n) {
|
|
7277
7277
|
return {
|
|
7278
|
-
get:
|
|
7279
|
-
set:
|
|
7278
|
+
get: Wi(n),
|
|
7279
|
+
set: qi(n)
|
|
7280
7280
|
};
|
|
7281
7281
|
}
|
|
7282
|
-
function
|
|
7282
|
+
function Ki(n) {
|
|
7283
7283
|
return async (e, t) => {
|
|
7284
7284
|
let s = n.selectFrom("hooks").where("hooks.tenant_id", "=", e);
|
|
7285
7285
|
t.q && (s = Ee(n, s, t.q, ["url"]));
|
|
@@ -7299,16 +7299,16 @@ function Ji(n) {
|
|
|
7299
7299
|
};
|
|
7300
7300
|
};
|
|
7301
7301
|
}
|
|
7302
|
-
function
|
|
7302
|
+
function Hi(n) {
|
|
7303
7303
|
return async (e, t) => {
|
|
7304
7304
|
const s = await n.selectFrom("hooks").where("hooks.tenant_id", "=", e).where("hooks.hook_id", "=", t).selectAll().executeTakeFirst();
|
|
7305
7305
|
return s ? (s.enabled = !!s.enabled, s.synchronous = !!s.synchronous, R(s)) : null;
|
|
7306
7306
|
};
|
|
7307
7307
|
}
|
|
7308
|
-
function
|
|
7308
|
+
function Qi(n) {
|
|
7309
7309
|
return async (e, t) => (await n.deleteFrom("hooks").where("hooks.tenant_id", "=", e).where("hooks.hook_id", "=", t).executeTakeFirst()).numDeletedRows > 0;
|
|
7310
7310
|
}
|
|
7311
|
-
function
|
|
7311
|
+
function Yi(n) {
|
|
7312
7312
|
return async (e, t) => {
|
|
7313
7313
|
const s = {
|
|
7314
7314
|
hook_id: Ae(),
|
|
@@ -7322,7 +7322,7 @@ function Qi(n) {
|
|
|
7322
7322
|
}).execute(), s;
|
|
7323
7323
|
};
|
|
7324
7324
|
}
|
|
7325
|
-
function
|
|
7325
|
+
function Gi(n) {
|
|
7326
7326
|
return async (e, t, s) => {
|
|
7327
7327
|
const r = {
|
|
7328
7328
|
...s,
|
|
@@ -7331,16 +7331,16 @@ function Yi(n) {
|
|
|
7331
7331
|
return await n.updateTable("hooks").set(r).where("hooks.hook_id", "=", t).where("hooks.tenant_id", "=", e).execute(), !0;
|
|
7332
7332
|
};
|
|
7333
7333
|
}
|
|
7334
|
-
function
|
|
7334
|
+
function Xi(n) {
|
|
7335
7335
|
return {
|
|
7336
|
-
create:
|
|
7337
|
-
get:
|
|
7338
|
-
list:
|
|
7339
|
-
update:
|
|
7340
|
-
remove:
|
|
7336
|
+
create: Yi(n),
|
|
7337
|
+
get: Hi(n),
|
|
7338
|
+
list: Ki(n),
|
|
7339
|
+
update: Gi(n),
|
|
7340
|
+
remove: Qi(n)
|
|
7341
7341
|
};
|
|
7342
7342
|
}
|
|
7343
|
-
function
|
|
7343
|
+
function eo(n) {
|
|
7344
7344
|
return async (e, t) => {
|
|
7345
7345
|
const s = {
|
|
7346
7346
|
themeId: Ae(),
|
|
@@ -7351,16 +7351,16 @@ function Xi(n) {
|
|
|
7351
7351
|
return await n.insertInto("themes").values({ ...Re(s), tenant_id: e }).execute(), s;
|
|
7352
7352
|
};
|
|
7353
7353
|
}
|
|
7354
|
-
function
|
|
7354
|
+
function to(n) {
|
|
7355
7355
|
return async (e, t) => (await n.deleteFrom("themes").where("themes.tenant_id", "=", e).where("themes.theme_id", "=", t).executeTakeFirst()).numDeletedRows > 0;
|
|
7356
7356
|
}
|
|
7357
|
-
function
|
|
7357
|
+
function no(n) {
|
|
7358
7358
|
return async (e, t) => {
|
|
7359
7359
|
const s = await n.selectFrom("themes").where("themes.tenant_id", "=", e).where("themes.theme_id", "=", t).selectAll().executeTakeFirst();
|
|
7360
7360
|
return s ? R(s) : null;
|
|
7361
7361
|
};
|
|
7362
7362
|
}
|
|
7363
|
-
function
|
|
7363
|
+
function so(n) {
|
|
7364
7364
|
return async (e, t, s) => {
|
|
7365
7365
|
const r = Re({
|
|
7366
7366
|
...s,
|
|
@@ -7369,23 +7369,23 @@ function no(n) {
|
|
|
7369
7369
|
return await n.updateTable("themes").set(r).where("themes.id", "=", t).where("themes.tenant_id", "=", e).execute(), !0;
|
|
7370
7370
|
};
|
|
7371
7371
|
}
|
|
7372
|
-
function
|
|
7372
|
+
function ro(n) {
|
|
7373
7373
|
return {
|
|
7374
|
-
create:
|
|
7375
|
-
get:
|
|
7376
|
-
remove:
|
|
7377
|
-
update:
|
|
7374
|
+
create: eo(n),
|
|
7375
|
+
get: no(n),
|
|
7376
|
+
remove: to(n),
|
|
7377
|
+
update: so(n)
|
|
7378
7378
|
};
|
|
7379
7379
|
}
|
|
7380
|
-
function
|
|
7380
|
+
function ao(n) {
|
|
7381
7381
|
return async (e, t) => {
|
|
7382
7382
|
const s = (/* @__PURE__ */ new Date()).toISOString(), r = await n.selectFrom("logins").where("logins.expires_at", ">", s).where("logins.login_id", "=", t).selectAll().executeTakeFirst();
|
|
7383
|
-
return r ?
|
|
7383
|
+
return r ? xr.parse(
|
|
7384
7384
|
hn(R(r), ["authParams"])
|
|
7385
7385
|
) : null;
|
|
7386
7386
|
};
|
|
7387
7387
|
}
|
|
7388
|
-
function
|
|
7388
|
+
function io(n) {
|
|
7389
7389
|
return async (e, t) => {
|
|
7390
7390
|
const s = {
|
|
7391
7391
|
login_id: Ae(),
|
|
@@ -7396,21 +7396,21 @@ function ao(n) {
|
|
|
7396
7396
|
return await n.insertInto("logins").values({ ...Re(s), tenant_id: e }).execute(), s;
|
|
7397
7397
|
};
|
|
7398
7398
|
}
|
|
7399
|
-
function
|
|
7399
|
+
function oo(n) {
|
|
7400
7400
|
return async (e, t, s) => (await n.updateTable("logins").set(Re(s)).where("logins.login_id", "=", t).where("logins.tenant_id", "=", e).execute()).length === 1;
|
|
7401
7401
|
}
|
|
7402
|
-
function
|
|
7402
|
+
function co(n) {
|
|
7403
7403
|
return async (e, t) => (await n.deleteFrom("logins").where("logins.tenant_id", "=", e).where("logins.login_id", "=", t).execute()).length > 0;
|
|
7404
7404
|
}
|
|
7405
|
-
function
|
|
7405
|
+
function uo(n) {
|
|
7406
7406
|
return {
|
|
7407
|
-
create:
|
|
7408
|
-
get:
|
|
7409
|
-
update:
|
|
7410
|
-
remove:
|
|
7407
|
+
create: io(n),
|
|
7408
|
+
get: ao(n),
|
|
7409
|
+
update: oo(n),
|
|
7410
|
+
remove: co(n)
|
|
7411
7411
|
};
|
|
7412
7412
|
}
|
|
7413
|
-
function
|
|
7413
|
+
function lo(n) {
|
|
7414
7414
|
return async (e) => {
|
|
7415
7415
|
const [t] = await n.selectFrom("prompt_settings").where("prompt_settings.tenant_id", "=", e).selectAll().execute();
|
|
7416
7416
|
return R({
|
|
@@ -7421,46 +7421,55 @@ function uo(n) {
|
|
|
7421
7421
|
});
|
|
7422
7422
|
};
|
|
7423
7423
|
}
|
|
7424
|
-
function
|
|
7424
|
+
function wn(n) {
|
|
7425
|
+
return R({
|
|
7426
|
+
...n,
|
|
7427
|
+
webauthn_platform_first_factor: n.webauthn_platform_first_factor ? !!n.webauthn_platform_first_factor : void 0,
|
|
7428
|
+
identifier_first: n.identifier_first ? !!n.identifier_first : void 0,
|
|
7429
|
+
password_first: n.password_first ? !!n.password_first : void 0,
|
|
7430
|
+
universal_login_experience: n.universal_login_experience
|
|
7431
|
+
});
|
|
7432
|
+
}
|
|
7433
|
+
function po(n) {
|
|
7425
7434
|
return async (e, t) => {
|
|
7426
7435
|
try {
|
|
7427
|
-
const s =
|
|
7436
|
+
const s = Rr.parse(t);
|
|
7428
7437
|
await n.insertInto("prompt_settings").values({
|
|
7429
|
-
...s,
|
|
7438
|
+
...wn(s),
|
|
7430
7439
|
tenant_id: e
|
|
7431
7440
|
}).execute();
|
|
7432
7441
|
} catch {
|
|
7433
|
-
await n.updateTable("prompt_settings").set(t).where("tenant_id", "=", e).execute();
|
|
7442
|
+
await n.updateTable("prompt_settings").set(wn(t)).where("tenant_id", "=", e).execute();
|
|
7434
7443
|
}
|
|
7435
7444
|
};
|
|
7436
7445
|
}
|
|
7437
|
-
function
|
|
7446
|
+
function ho(n) {
|
|
7438
7447
|
return {
|
|
7439
|
-
get:
|
|
7440
|
-
set:
|
|
7448
|
+
get: lo(n),
|
|
7449
|
+
set: po(n)
|
|
7441
7450
|
};
|
|
7442
7451
|
}
|
|
7443
|
-
function
|
|
7452
|
+
function mo(n) {
|
|
7444
7453
|
return {
|
|
7445
|
-
applications:
|
|
7446
|
-
branding:
|
|
7447
|
-
clients:
|
|
7448
|
-
codes:
|
|
7449
|
-
connections:
|
|
7450
|
-
domains:
|
|
7451
|
-
hooks:
|
|
7452
|
-
keys:
|
|
7453
|
-
logins:
|
|
7454
|
-
logs:
|
|
7455
|
-
passwords:
|
|
7456
|
-
promptSettings:
|
|
7457
|
-
users:
|
|
7458
|
-
sessions:
|
|
7459
|
-
tenants:
|
|
7460
|
-
themes:
|
|
7461
|
-
tickets:
|
|
7454
|
+
applications: Ta(n),
|
|
7455
|
+
branding: Ji(n),
|
|
7456
|
+
clients: Di(n),
|
|
7457
|
+
codes: ya(n),
|
|
7458
|
+
connections: Pi(n),
|
|
7459
|
+
domains: Bi(n),
|
|
7460
|
+
hooks: Xi(n),
|
|
7461
|
+
keys: Ui(n),
|
|
7462
|
+
logins: uo(n),
|
|
7463
|
+
logs: Xr(n),
|
|
7464
|
+
passwords: ha(n),
|
|
7465
|
+
promptSettings: ho(n),
|
|
7466
|
+
users: Ur(n),
|
|
7467
|
+
sessions: aa(n),
|
|
7468
|
+
tenants: Kr(n),
|
|
7469
|
+
themes: ro(n),
|
|
7470
|
+
tickets: da(n)
|
|
7462
7471
|
};
|
|
7463
7472
|
}
|
|
7464
7473
|
export {
|
|
7465
|
-
|
|
7474
|
+
mo as default
|
|
7466
7475
|
};
|