@authhero/kysely-adapter 0.9.5 → 0.9.7
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 +26 -6
- package/dist/kysely-adapter.iife.js +1 -1
- package/dist/kysely-adapter.mjs +454 -441
- package/package.json +2 -2
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,21 +4049,21 @@ 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(),
|
|
4064
4064
|
updated_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4065
4065
|
...t
|
|
4066
|
-
}, r = JSON.stringify(t.allowed_origins), a = JSON.stringify(t.callbacks), o = JSON.stringify(t.web_origins), c = JSON.stringify(t.allowed_logout_urls);
|
|
4066
|
+
}, r = JSON.stringify(t.allowed_origins), a = JSON.stringify(t.callbacks), o = JSON.stringify(t.web_origins), c = JSON.stringify(t.allowed_logout_urls), d = JSON.stringify(t.allowed_clients);
|
|
4067
4067
|
return await n.insertInto("applications").values({
|
|
4068
4068
|
...s,
|
|
4069
4069
|
tenant_id: e,
|
|
@@ -4072,11 +4072,12 @@ function ya(n) {
|
|
|
4072
4072
|
callbacks: a,
|
|
4073
4073
|
allowed_origins: r,
|
|
4074
4074
|
web_origins: o,
|
|
4075
|
-
allowed_logout_urls: c
|
|
4075
|
+
allowed_logout_urls: c,
|
|
4076
|
+
allowed_clients: d
|
|
4076
4077
|
}).execute(), s;
|
|
4077
4078
|
};
|
|
4078
4079
|
}
|
|
4079
|
-
function
|
|
4080
|
+
function wa(n) {
|
|
4080
4081
|
return async (e) => ({
|
|
4081
4082
|
applications: (await n.selectFrom("applications").where("applications.tenant_id", "=", e).selectAll().execute()).map((a) => ({
|
|
4082
4083
|
...a,
|
|
@@ -4085,11 +4086,12 @@ function va(n) {
|
|
|
4085
4086
|
callbacks: a.callbacks ? JSON.parse(a.callbacks) : [],
|
|
4086
4087
|
allowed_origins: a.allowed_origins ? JSON.parse(a.allowed_origins) : [],
|
|
4087
4088
|
web_origins: a.web_origins ? JSON.parse(a.web_origins) : [],
|
|
4088
|
-
allowed_logout_urls: a.allowed_logout_urls ? JSON.parse(a.allowed_logout_urls) : []
|
|
4089
|
+
allowed_logout_urls: a.allowed_logout_urls ? JSON.parse(a.allowed_logout_urls) : [],
|
|
4090
|
+
allowed_clients: a.allowed_logout_urls ? JSON.parse(a.allowed_logout_urls) : []
|
|
4089
4091
|
}))
|
|
4090
4092
|
});
|
|
4091
4093
|
}
|
|
4092
|
-
function
|
|
4094
|
+
function ba(n) {
|
|
4093
4095
|
return async (e, t) => {
|
|
4094
4096
|
const s = await n.selectFrom("applications").where("applications.tenant_id", "=", e).where("applications.id", "=", t).selectAll().executeTakeFirst();
|
|
4095
4097
|
return s ? R({
|
|
@@ -4103,10 +4105,10 @@ function wa(n) {
|
|
|
4103
4105
|
}) : null;
|
|
4104
4106
|
};
|
|
4105
4107
|
}
|
|
4106
|
-
function
|
|
4108
|
+
function ka(n) {
|
|
4107
4109
|
return async (e, t) => (await n.deleteFrom("applications").where("applications.tenant_id", "=", e).where("applications.id", "=", t).executeTakeFirst()).numDeletedRows > 0;
|
|
4108
4110
|
}
|
|
4109
|
-
function
|
|
4111
|
+
function xa(n) {
|
|
4110
4112
|
return async (e, t, s) => {
|
|
4111
4113
|
const r = {
|
|
4112
4114
|
...s,
|
|
@@ -4115,22 +4117,23 @@ function ka(n) {
|
|
|
4115
4117
|
callbacks: s.callbacks ? JSON.stringify(s.callbacks) : void 0,
|
|
4116
4118
|
web_origins: s.web_origins ? JSON.stringify(s.web_origins) : void 0,
|
|
4117
4119
|
allowed_logout_urls: s.allowed_logout_urls ? JSON.stringify(s.allowed_logout_urls) : void 0,
|
|
4120
|
+
allowed_clients: s.allowed_clients ? JSON.stringify(s.allowed_clients) : void 0,
|
|
4118
4121
|
addons: s.addons ? JSON.stringify(s.addons) : "{}",
|
|
4119
4122
|
disable_sign_ups: s.disable_sign_ups ? 1 : 0
|
|
4120
4123
|
};
|
|
4121
4124
|
return await n.updateTable("applications").set(r).where("applications.id", "=", t).where("applications.tenant_id", "=", e).execute(), !0;
|
|
4122
4125
|
};
|
|
4123
4126
|
}
|
|
4124
|
-
function
|
|
4127
|
+
function Ta(n) {
|
|
4125
4128
|
return {
|
|
4126
|
-
create:
|
|
4127
|
-
list:
|
|
4128
|
-
get:
|
|
4129
|
-
remove:
|
|
4130
|
-
update:
|
|
4129
|
+
create: va(n),
|
|
4130
|
+
list: wa(n),
|
|
4131
|
+
get: ba(n),
|
|
4132
|
+
remove: ka(n),
|
|
4133
|
+
update: xa(n)
|
|
4131
4134
|
};
|
|
4132
4135
|
}
|
|
4133
|
-
function
|
|
4136
|
+
function Oa(n, e) {
|
|
4134
4137
|
var t = {};
|
|
4135
4138
|
for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && e.indexOf(s) < 0 && (t[s] = n[s]);
|
|
4136
4139
|
if (n != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -4138,7 +4141,7 @@ function Ta(n, e) {
|
|
|
4138
4141
|
e.indexOf(s[r]) < 0 && Object.prototype.propertyIsEnumerable.call(n, s[r]) && (t[s[r]] = n[s[r]]);
|
|
4139
4142
|
return t;
|
|
4140
4143
|
}
|
|
4141
|
-
function
|
|
4144
|
+
function Sa(n, e) {
|
|
4142
4145
|
var t;
|
|
4143
4146
|
return ((t = n == null ? void 0 : n._def) === null || t === void 0 ? void 0 : t.typeName) === e;
|
|
4144
4147
|
}
|
|
@@ -4149,15 +4152,15 @@ function Ye(n, e) {
|
|
|
4149
4152
|
return r._def.openapi = this._def.openapi, r;
|
|
4150
4153
|
};
|
|
4151
4154
|
}
|
|
4152
|
-
function
|
|
4155
|
+
function Za(n) {
|
|
4153
4156
|
if (typeof n.ZodType.prototype.openapi < "u")
|
|
4154
4157
|
return;
|
|
4155
4158
|
n.ZodType.prototype.openapi = function(r, a) {
|
|
4156
4159
|
var o, c, d, u, l, j;
|
|
4157
|
-
const A = typeof r == "string" ? a : r, U = A ?? {}, { param: ie } = U, $e =
|
|
4160
|
+
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
4161
|
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
4162
|
} : 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 (
|
|
4163
|
+
if (Sa(this, "ZodObject")) {
|
|
4161
4164
|
const Pe = this.extend;
|
|
4162
4165
|
de.extend = function(...De) {
|
|
4163
4166
|
var K, H, Q, ue, xe, Te;
|
|
@@ -4295,7 +4298,7 @@ const g = C.arrayToEnum([
|
|
|
4295
4298
|
"invalid_intersection_types",
|
|
4296
4299
|
"not_multiple_of",
|
|
4297
4300
|
"not_finite"
|
|
4298
|
-
]),
|
|
4301
|
+
]), ja = (n) => JSON.stringify(n, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
4299
4302
|
class V extends Error {
|
|
4300
4303
|
constructor(e) {
|
|
4301
4304
|
super(), this.issues = [], this.addIssue = (s) => {
|
|
@@ -4412,12 +4415,12 @@ const Je = (n, e) => {
|
|
|
4412
4415
|
}
|
|
4413
4416
|
return { message: t };
|
|
4414
4417
|
};
|
|
4415
|
-
let
|
|
4416
|
-
function
|
|
4417
|
-
|
|
4418
|
+
let Ln = Je;
|
|
4419
|
+
function Na(n) {
|
|
4420
|
+
Ln = n;
|
|
4418
4421
|
}
|
|
4419
4422
|
function Vt() {
|
|
4420
|
-
return
|
|
4423
|
+
return Ln;
|
|
4421
4424
|
}
|
|
4422
4425
|
const Ut = (n) => {
|
|
4423
4426
|
const { data: e, path: t, errorMaps: s, issueData: r } = n, a = [...t, ...r.path || []], o = {
|
|
@@ -4439,7 +4442,7 @@ const Ut = (n) => {
|
|
|
4439
4442
|
path: a,
|
|
4440
4443
|
message: c
|
|
4441
4444
|
};
|
|
4442
|
-
},
|
|
4445
|
+
}, Ca = [];
|
|
4443
4446
|
function m(n, e) {
|
|
4444
4447
|
const t = Vt(), s = Ut({
|
|
4445
4448
|
issueData: e,
|
|
@@ -4503,7 +4506,7 @@ function Ft(n, e, t, s) {
|
|
|
4503
4506
|
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
4507
|
return e.get(n);
|
|
4505
4508
|
}
|
|
4506
|
-
function
|
|
4509
|
+
function Vn(n, e, t, s, r) {
|
|
4507
4510
|
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
4511
|
return e.set(n, t), t;
|
|
4509
4512
|
}
|
|
@@ -4730,23 +4733,23 @@ class Z {
|
|
|
4730
4733
|
return this.safeParse(null).success;
|
|
4731
4734
|
}
|
|
4732
4735
|
}
|
|
4733
|
-
const
|
|
4736
|
+
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
4737
|
let Yt;
|
|
4735
|
-
const
|
|
4736
|
-
function
|
|
4738
|
+
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}$`);
|
|
4739
|
+
function Fn(n) {
|
|
4737
4740
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
4738
4741
|
return n.precision ? e = `${e}\\.\\d{${n.precision}}` : n.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
4739
4742
|
}
|
|
4740
|
-
function
|
|
4741
|
-
return new RegExp(`^${
|
|
4743
|
+
function za(n) {
|
|
4744
|
+
return new RegExp(`^${Fn(n)}$`);
|
|
4742
4745
|
}
|
|
4743
|
-
function
|
|
4744
|
-
let e = `${
|
|
4746
|
+
function zn(n) {
|
|
4747
|
+
let e = `${Un}T${Fn(n)}`;
|
|
4745
4748
|
const t = [];
|
|
4746
4749
|
return t.push(n.local ? "Z?" : "Z"), n.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
|
|
4747
4750
|
}
|
|
4748
|
-
function
|
|
4749
|
-
return !!((e === "v4" || !e) &&
|
|
4751
|
+
function Ba(n, e) {
|
|
4752
|
+
return !!((e === "v4" || !e) && La.test(n) || (e === "v6" || !e) && Va.test(n));
|
|
4750
4753
|
}
|
|
4751
4754
|
class z extends Z {
|
|
4752
4755
|
_parse(e) {
|
|
@@ -4797,43 +4800,43 @@ class z extends Z {
|
|
|
4797
4800
|
message: a.message
|
|
4798
4801
|
}), s.dirty());
|
|
4799
4802
|
} else if (a.kind === "email")
|
|
4800
|
-
|
|
4803
|
+
Da.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4801
4804
|
validation: "email",
|
|
4802
4805
|
code: h.invalid_string,
|
|
4803
4806
|
message: a.message
|
|
4804
4807
|
}), s.dirty());
|
|
4805
4808
|
else if (a.kind === "emoji")
|
|
4806
|
-
Yt || (Yt = new RegExp(
|
|
4809
|
+
Yt || (Yt = new RegExp(Ma, "u")), Yt.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4807
4810
|
validation: "emoji",
|
|
4808
4811
|
code: h.invalid_string,
|
|
4809
4812
|
message: a.message
|
|
4810
4813
|
}), s.dirty());
|
|
4811
4814
|
else if (a.kind === "uuid")
|
|
4812
|
-
|
|
4815
|
+
Ra.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4813
4816
|
validation: "uuid",
|
|
4814
4817
|
code: h.invalid_string,
|
|
4815
4818
|
message: a.message
|
|
4816
4819
|
}), s.dirty());
|
|
4817
4820
|
else if (a.kind === "nanoid")
|
|
4818
|
-
|
|
4821
|
+
$a.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4819
4822
|
validation: "nanoid",
|
|
4820
4823
|
code: h.invalid_string,
|
|
4821
4824
|
message: a.message
|
|
4822
4825
|
}), s.dirty());
|
|
4823
4826
|
else if (a.kind === "cuid")
|
|
4824
|
-
|
|
4827
|
+
Ia.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4825
4828
|
validation: "cuid",
|
|
4826
4829
|
code: h.invalid_string,
|
|
4827
4830
|
message: a.message
|
|
4828
4831
|
}), s.dirty());
|
|
4829
4832
|
else if (a.kind === "cuid2")
|
|
4830
|
-
|
|
4833
|
+
Ea.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4831
4834
|
validation: "cuid2",
|
|
4832
4835
|
code: h.invalid_string,
|
|
4833
4836
|
message: a.message
|
|
4834
4837
|
}), s.dirty());
|
|
4835
4838
|
else if (a.kind === "ulid")
|
|
4836
|
-
|
|
4839
|
+
Aa.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4837
4840
|
validation: "ulid",
|
|
4838
4841
|
code: h.invalid_string,
|
|
4839
4842
|
message: a.message
|
|
@@ -4864,27 +4867,27 @@ class z extends Z {
|
|
|
4864
4867
|
code: h.invalid_string,
|
|
4865
4868
|
validation: { endsWith: a.value },
|
|
4866
4869
|
message: a.message
|
|
4867
|
-
}), s.dirty()) : a.kind === "datetime" ?
|
|
4870
|
+
}), s.dirty()) : a.kind === "datetime" ? zn(a).test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4868
4871
|
code: h.invalid_string,
|
|
4869
4872
|
validation: "datetime",
|
|
4870
4873
|
message: a.message
|
|
4871
|
-
}), s.dirty()) : a.kind === "date" ?
|
|
4874
|
+
}), s.dirty()) : a.kind === "date" ? Fa.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4872
4875
|
code: h.invalid_string,
|
|
4873
4876
|
validation: "date",
|
|
4874
4877
|
message: a.message
|
|
4875
|
-
}), s.dirty()) : a.kind === "time" ?
|
|
4878
|
+
}), s.dirty()) : a.kind === "time" ? za(a).test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4876
4879
|
code: h.invalid_string,
|
|
4877
4880
|
validation: "time",
|
|
4878
4881
|
message: a.message
|
|
4879
|
-
}), s.dirty()) : a.kind === "duration" ?
|
|
4882
|
+
}), s.dirty()) : a.kind === "duration" ? Pa.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4880
4883
|
validation: "duration",
|
|
4881
4884
|
code: h.invalid_string,
|
|
4882
4885
|
message: a.message
|
|
4883
|
-
}), s.dirty()) : a.kind === "ip" ?
|
|
4886
|
+
}), s.dirty()) : a.kind === "ip" ? Ba(e.data, a.version) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4884
4887
|
validation: "ip",
|
|
4885
4888
|
code: h.invalid_string,
|
|
4886
4889
|
message: a.message
|
|
4887
|
-
}), s.dirty()) : a.kind === "base64" ?
|
|
4890
|
+
}), s.dirty()) : a.kind === "base64" ? Ua.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
4888
4891
|
validation: "base64",
|
|
4889
4892
|
code: h.invalid_string,
|
|
4890
4893
|
message: a.message
|
|
@@ -5106,7 +5109,7 @@ z.create = (n) => {
|
|
|
5106
5109
|
...O(n)
|
|
5107
5110
|
});
|
|
5108
5111
|
};
|
|
5109
|
-
function
|
|
5112
|
+
function Wa(n, e) {
|
|
5110
5113
|
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
5114
|
return a % o / Math.pow(10, r);
|
|
5112
5115
|
}
|
|
@@ -5145,7 +5148,7 @@ class ye extends Z {
|
|
|
5145
5148
|
inclusive: a.inclusive,
|
|
5146
5149
|
exact: !1,
|
|
5147
5150
|
message: a.message
|
|
5148
|
-
}), r.dirty()) : a.kind === "multipleOf" ?
|
|
5151
|
+
}), r.dirty()) : a.kind === "multipleOf" ? Wa(e.data, a.value) !== 0 && (s = this._getOrReturnCtx(e, s), m(s, {
|
|
5149
5152
|
code: h.not_multiple_of,
|
|
5150
5153
|
multipleOf: a.value,
|
|
5151
5154
|
message: a.message
|
|
@@ -5964,7 +5967,7 @@ class E extends Z {
|
|
|
5964
5967
|
});
|
|
5965
5968
|
}
|
|
5966
5969
|
keyof() {
|
|
5967
|
-
return
|
|
5970
|
+
return Bn(C.objectKeys(this.shape));
|
|
5968
5971
|
}
|
|
5969
5972
|
}
|
|
5970
5973
|
E.create = (n, e) => new E({
|
|
@@ -6527,7 +6530,7 @@ Ot.create = (n, e) => new Ot({
|
|
|
6527
6530
|
typeName: b.ZodLiteral,
|
|
6528
6531
|
...O(e)
|
|
6529
6532
|
});
|
|
6530
|
-
function
|
|
6533
|
+
function Bn(n, e) {
|
|
6531
6534
|
return new we({
|
|
6532
6535
|
values: n,
|
|
6533
6536
|
typeName: b.ZodEnum,
|
|
@@ -6547,7 +6550,7 @@ class we extends Z {
|
|
|
6547
6550
|
code: h.invalid_type
|
|
6548
6551
|
}), k;
|
|
6549
6552
|
}
|
|
6550
|
-
if (Ft(this, et) ||
|
|
6553
|
+
if (Ft(this, et) || Vn(this, et, new Set(this._def.values)), !Ft(this, et).has(e.data)) {
|
|
6551
6554
|
const t = this._getOrReturnCtx(e), s = this._def.values;
|
|
6552
6555
|
return m(t, {
|
|
6553
6556
|
received: t.data,
|
|
@@ -6592,7 +6595,7 @@ class we extends Z {
|
|
|
6592
6595
|
}
|
|
6593
6596
|
}
|
|
6594
6597
|
et = /* @__PURE__ */ new WeakMap();
|
|
6595
|
-
we.create =
|
|
6598
|
+
we.create = Bn;
|
|
6596
6599
|
class St extends Z {
|
|
6597
6600
|
constructor() {
|
|
6598
6601
|
super(...arguments), tt.set(this, void 0);
|
|
@@ -6607,7 +6610,7 @@ class St extends Z {
|
|
|
6607
6610
|
code: h.invalid_type
|
|
6608
6611
|
}), k;
|
|
6609
6612
|
}
|
|
6610
|
-
if (Ft(this, tt) ||
|
|
6613
|
+
if (Ft(this, tt) || Vn(this, tt, new Set(C.getValidEnumValues(this._def.values))), !Ft(this, tt).has(e.data)) {
|
|
6611
6614
|
const r = C.objectValues(t);
|
|
6612
6615
|
return m(s, {
|
|
6613
6616
|
received: s.data,
|
|
@@ -6846,7 +6849,7 @@ qt.create = (n) => new qt({
|
|
|
6846
6849
|
typeName: b.ZodNaN,
|
|
6847
6850
|
...O(n)
|
|
6848
6851
|
});
|
|
6849
|
-
const
|
|
6852
|
+
const qa = Symbol("zod_brand");
|
|
6850
6853
|
class pn extends Z {
|
|
6851
6854
|
_parse(e) {
|
|
6852
6855
|
const { ctx: t } = this._processInputParams(e), s = t.data;
|
|
@@ -6914,7 +6917,7 @@ Nt.create = (n, e) => new Nt({
|
|
|
6914
6917
|
typeName: b.ZodReadonly,
|
|
6915
6918
|
...O(e)
|
|
6916
6919
|
});
|
|
6917
|
-
function
|
|
6920
|
+
function Wn(n, e = {}, t) {
|
|
6918
6921
|
return n ? Ke.create().superRefine((s, r) => {
|
|
6919
6922
|
var a, o;
|
|
6920
6923
|
if (!n(s)) {
|
|
@@ -6923,16 +6926,16 @@ function Bn(n, e = {}, t) {
|
|
|
6923
6926
|
}
|
|
6924
6927
|
}) : Ke.create();
|
|
6925
6928
|
}
|
|
6926
|
-
const
|
|
6929
|
+
const Ja = {
|
|
6927
6930
|
object: E.lazycreate
|
|
6928
6931
|
};
|
|
6929
6932
|
var b;
|
|
6930
6933
|
(function(n) {
|
|
6931
6934
|
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
6935
|
})(b || (b = {}));
|
|
6933
|
-
const
|
|
6936
|
+
const Ka = (n, e = {
|
|
6934
6937
|
message: `Input not instance of ${n.name}`
|
|
6935
|
-
}) =>
|
|
6938
|
+
}) => 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
6939
|
string: (n) => z.create({ ...n, coerce: !0 }),
|
|
6937
6940
|
number: (n) => ye.create({ ...n, coerce: !0 }),
|
|
6938
6941
|
boolean: (n) => yt.create({
|
|
@@ -6941,14 +6944,14 @@ const Ja = (n, e = {
|
|
|
6941
6944
|
}),
|
|
6942
6945
|
bigint: (n) => ve.create({ ...n, coerce: !0 }),
|
|
6943
6946
|
date: (n) => Ce.create({ ...n, coerce: !0 })
|
|
6944
|
-
},
|
|
6945
|
-
var
|
|
6947
|
+
}, Ni = k;
|
|
6948
|
+
var Ci = /* @__PURE__ */ Object.freeze({
|
|
6946
6949
|
__proto__: null,
|
|
6947
6950
|
defaultErrorMap: Je,
|
|
6948
|
-
setErrorMap:
|
|
6951
|
+
setErrorMap: Na,
|
|
6949
6952
|
getErrorMap: Vt,
|
|
6950
6953
|
makeIssue: Ut,
|
|
6951
|
-
EMPTY_PATH:
|
|
6954
|
+
EMPTY_PATH: Ca,
|
|
6952
6955
|
addIssueToContext: m,
|
|
6953
6956
|
ParseStatus: P,
|
|
6954
6957
|
INVALID: k,
|
|
@@ -6967,7 +6970,7 @@ var Ni = /* @__PURE__ */ Object.freeze({
|
|
|
6967
6970
|
ZodParsedType: g,
|
|
6968
6971
|
getParsedType: he,
|
|
6969
6972
|
ZodType: Z,
|
|
6970
|
-
datetimeRegex:
|
|
6973
|
+
datetimeRegex: zn,
|
|
6971
6974
|
ZodString: z,
|
|
6972
6975
|
ZodNumber: ye,
|
|
6973
6976
|
ZodBigInt: ve,
|
|
@@ -7002,63 +7005,63 @@ var Ni = /* @__PURE__ */ Object.freeze({
|
|
|
7002
7005
|
ZodDefault: Zt,
|
|
7003
7006
|
ZodCatch: jt,
|
|
7004
7007
|
ZodNaN: qt,
|
|
7005
|
-
BRAND:
|
|
7008
|
+
BRAND: qa,
|
|
7006
7009
|
ZodBranded: pn,
|
|
7007
7010
|
ZodPipeline: It,
|
|
7008
7011
|
ZodReadonly: Nt,
|
|
7009
|
-
custom:
|
|
7012
|
+
custom: Wn,
|
|
7010
7013
|
Schema: Z,
|
|
7011
7014
|
ZodSchema: Z,
|
|
7012
|
-
late:
|
|
7015
|
+
late: Ja,
|
|
7013
7016
|
get ZodFirstPartyTypeKind() {
|
|
7014
7017
|
return b;
|
|
7015
7018
|
},
|
|
7016
|
-
coerce:
|
|
7017
|
-
any:
|
|
7018
|
-
array:
|
|
7019
|
-
bigint:
|
|
7020
|
-
boolean:
|
|
7021
|
-
date:
|
|
7022
|
-
discriminatedUnion:
|
|
7019
|
+
coerce: ji,
|
|
7020
|
+
any: ti,
|
|
7021
|
+
array: ai,
|
|
7022
|
+
bigint: Qa,
|
|
7023
|
+
boolean: Kn,
|
|
7024
|
+
date: Ya,
|
|
7025
|
+
discriminatedUnion: di,
|
|
7023
7026
|
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:
|
|
7027
|
+
enum: yi,
|
|
7028
|
+
function: mi,
|
|
7029
|
+
instanceof: Ka,
|
|
7030
|
+
intersection: ui,
|
|
7031
|
+
lazy: _i,
|
|
7032
|
+
literal: gi,
|
|
7033
|
+
map: hi,
|
|
7034
|
+
nan: Ha,
|
|
7035
|
+
nativeEnum: vi,
|
|
7036
|
+
never: si,
|
|
7037
|
+
null: ei,
|
|
7038
|
+
nullable: ki,
|
|
7039
|
+
number: Jn,
|
|
7040
|
+
object: ii,
|
|
7041
|
+
oboolean: Zi,
|
|
7042
|
+
onumber: Si,
|
|
7043
|
+
optional: bi,
|
|
7044
|
+
ostring: Oi,
|
|
7045
|
+
pipeline: Ti,
|
|
7046
|
+
preprocess: xi,
|
|
7047
|
+
promise: wi,
|
|
7048
|
+
record: pi,
|
|
7049
|
+
set: fi,
|
|
7050
|
+
strictObject: oi,
|
|
7051
|
+
string: qn,
|
|
7052
|
+
symbol: Ga,
|
|
7050
7053
|
transformer: vn,
|
|
7051
|
-
tuple:
|
|
7052
|
-
undefined:
|
|
7053
|
-
union:
|
|
7054
|
-
unknown:
|
|
7055
|
-
void:
|
|
7056
|
-
NEVER:
|
|
7054
|
+
tuple: li,
|
|
7055
|
+
undefined: Xa,
|
|
7056
|
+
union: ci,
|
|
7057
|
+
unknown: ni,
|
|
7058
|
+
void: ri,
|
|
7059
|
+
NEVER: Ni,
|
|
7057
7060
|
ZodIssueCode: h,
|
|
7058
|
-
quotelessJson:
|
|
7061
|
+
quotelessJson: ja,
|
|
7059
7062
|
ZodError: V
|
|
7060
7063
|
});
|
|
7061
|
-
|
|
7064
|
+
Za(Ci);
|
|
7062
7065
|
function Re(n, e = "", t = {}) {
|
|
7063
7066
|
for (let s in n)
|
|
7064
7067
|
if (Object.prototype.hasOwnProperty.call(n, s)) {
|
|
@@ -7085,7 +7088,7 @@ function hn(n, e) {
|
|
|
7085
7088
|
}
|
|
7086
7089
|
return t;
|
|
7087
7090
|
}
|
|
7088
|
-
function
|
|
7091
|
+
function Ii(n) {
|
|
7089
7092
|
return async (e, t) => {
|
|
7090
7093
|
const s = {
|
|
7091
7094
|
id: Ae(),
|
|
@@ -7096,7 +7099,7 @@ function Ci(n) {
|
|
|
7096
7099
|
return await n.insertInto("connections").values({ ...Re(s), tenant_id: e }).execute(), s;
|
|
7097
7100
|
};
|
|
7098
7101
|
}
|
|
7099
|
-
function
|
|
7102
|
+
function Ei(n) {
|
|
7100
7103
|
return async (e, t) => {
|
|
7101
7104
|
let s = n.selectFrom("connections").where("connections.tenant_id", "=", e);
|
|
7102
7105
|
t.q && (s = Ee(n, s, t.q, ["user_id", "ip"]));
|
|
@@ -7111,16 +7114,16 @@ function Ii(n) {
|
|
|
7111
7114
|
};
|
|
7112
7115
|
};
|
|
7113
7116
|
}
|
|
7114
|
-
function
|
|
7117
|
+
function Ai(n) {
|
|
7115
7118
|
return async (e, t) => (await n.deleteFrom("connections").where("connections.tenant_id", "=", e).where("connections.id", "=", t).executeTakeFirst()).numDeletedRows > 0;
|
|
7116
7119
|
}
|
|
7117
|
-
function
|
|
7120
|
+
function Ri(n) {
|
|
7118
7121
|
return async (e, t) => {
|
|
7119
7122
|
const s = await n.selectFrom("connections").where("connections.tenant_id", "=", e).where("connections.id", "=", t).selectAll().executeTakeFirst();
|
|
7120
7123
|
return s ? R(hn(s, ["options"])) : null;
|
|
7121
7124
|
};
|
|
7122
7125
|
}
|
|
7123
|
-
function
|
|
7126
|
+
function $i(n) {
|
|
7124
7127
|
return async (e, t, s) => {
|
|
7125
7128
|
const r = {
|
|
7126
7129
|
...s,
|
|
@@ -7129,16 +7132,16 @@ function Ri(n) {
|
|
|
7129
7132
|
return await n.updateTable("connections").set(Re(r)).where("connections.id", "=", t).where("connections.tenant_id", "=", e).execute(), !0;
|
|
7130
7133
|
};
|
|
7131
7134
|
}
|
|
7132
|
-
function
|
|
7135
|
+
function Pi(n) {
|
|
7133
7136
|
return {
|
|
7134
|
-
create:
|
|
7135
|
-
get:
|
|
7136
|
-
list:
|
|
7137
|
-
remove:
|
|
7138
|
-
update:
|
|
7137
|
+
create: Ii(n),
|
|
7138
|
+
get: Ri(n),
|
|
7139
|
+
list: Ei(n),
|
|
7140
|
+
remove: Ai(n),
|
|
7141
|
+
update: $i(n)
|
|
7139
7142
|
};
|
|
7140
7143
|
}
|
|
7141
|
-
function
|
|
7144
|
+
function Di(n) {
|
|
7142
7145
|
return {
|
|
7143
7146
|
get: async (e) => {
|
|
7144
7147
|
const t = await n.selectFrom("applications").selectAll().where("id", "=", e).executeTakeFirst();
|
|
@@ -7151,7 +7154,7 @@ function Pi(n) {
|
|
|
7151
7154
|
return {
|
|
7152
7155
|
...t,
|
|
7153
7156
|
connections: r.map(
|
|
7154
|
-
(c) =>
|
|
7157
|
+
(c) => $n.parse(R(c))
|
|
7155
7158
|
),
|
|
7156
7159
|
domains: a,
|
|
7157
7160
|
addons: t.addons ? JSON.parse(t.addons) : {},
|
|
@@ -7159,6 +7162,7 @@ function Pi(n) {
|
|
|
7159
7162
|
allowed_origins: t.allowed_origins ? JSON.parse(t.allowed_origins) : [],
|
|
7160
7163
|
web_origins: t.web_origins ? JSON.parse(t.web_origins) : [],
|
|
7161
7164
|
allowed_logout_urls: t.allowed_logout_urls ? JSON.parse(t.allowed_logout_urls) : [],
|
|
7165
|
+
allowed_clients: t.allowed_clients ? JSON.parse(t.allowed_clients) : [],
|
|
7162
7166
|
tenant: R(s),
|
|
7163
7167
|
// this is really an integer in the database
|
|
7164
7168
|
disable_sign_ups: !!t.disable_sign_ups
|
|
@@ -7166,25 +7170,25 @@ function Pi(n) {
|
|
|
7166
7170
|
}
|
|
7167
7171
|
};
|
|
7168
7172
|
}
|
|
7169
|
-
function
|
|
7173
|
+
function Mi(n) {
|
|
7170
7174
|
return async () => await n.selectFrom("keys").where("revoked_at", "is", null).selectAll().execute();
|
|
7171
7175
|
}
|
|
7172
|
-
function
|
|
7176
|
+
function Li(n) {
|
|
7173
7177
|
return async (e) => {
|
|
7174
7178
|
await n.insertInto("keys").values({ ...e, created_at: (/* @__PURE__ */ new Date()).toDateString() }).execute();
|
|
7175
7179
|
};
|
|
7176
7180
|
}
|
|
7177
|
-
function
|
|
7181
|
+
function Vi(n) {
|
|
7178
7182
|
return async (e, t) => !!(await n.updateTable("keys").set(t).where("kid", "=", e).execute()).length;
|
|
7179
7183
|
}
|
|
7180
|
-
function
|
|
7184
|
+
function Ui(n) {
|
|
7181
7185
|
return {
|
|
7182
|
-
create:
|
|
7183
|
-
list:
|
|
7184
|
-
update:
|
|
7186
|
+
create: Li(n),
|
|
7187
|
+
list: Mi(n),
|
|
7188
|
+
update: Vi(n)
|
|
7185
7189
|
};
|
|
7186
7190
|
}
|
|
7187
|
-
function
|
|
7191
|
+
function Fi(n) {
|
|
7188
7192
|
return async (e, t) => {
|
|
7189
7193
|
const s = {
|
|
7190
7194
|
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -7196,7 +7200,7 @@ function Ui(n) {
|
|
|
7196
7200
|
return await n.insertInto("domains").values(s).execute(), s;
|
|
7197
7201
|
};
|
|
7198
7202
|
}
|
|
7199
|
-
function
|
|
7203
|
+
function zi(n) {
|
|
7200
7204
|
return async (e, t) => {
|
|
7201
7205
|
let s = n.selectFrom("domains").where("domains.tenant_id", "=", e);
|
|
7202
7206
|
t.q && (s = Ee(n, s, t.q, ["user_id", "ip"]));
|
|
@@ -7209,13 +7213,13 @@ function Fi(n) {
|
|
|
7209
7213
|
};
|
|
7210
7214
|
};
|
|
7211
7215
|
}
|
|
7212
|
-
function
|
|
7216
|
+
function Bi(n) {
|
|
7213
7217
|
return {
|
|
7214
|
-
create:
|
|
7215
|
-
list:
|
|
7218
|
+
create: Fi(n),
|
|
7219
|
+
list: zi(n)
|
|
7216
7220
|
};
|
|
7217
7221
|
}
|
|
7218
|
-
function
|
|
7222
|
+
function Wi(n) {
|
|
7219
7223
|
return async (e) => {
|
|
7220
7224
|
const [t] = await n.selectFrom("branding").where("branding.tenant_id", "=", e).selectAll().execute();
|
|
7221
7225
|
if (!t)
|
|
@@ -7245,7 +7249,7 @@ function Bi(n) {
|
|
|
7245
7249
|
});
|
|
7246
7250
|
};
|
|
7247
7251
|
}
|
|
7248
|
-
function
|
|
7252
|
+
function qi(n) {
|
|
7249
7253
|
return async (e, t) => {
|
|
7250
7254
|
var o, c, d, u, l, j, A, U, ie, $e, oe, ce, de, Pe, De, K, H, Q;
|
|
7251
7255
|
const { colors: s, font: r, ...a } = t;
|
|
@@ -7273,13 +7277,13 @@ function Wi(n) {
|
|
|
7273
7277
|
}
|
|
7274
7278
|
};
|
|
7275
7279
|
}
|
|
7276
|
-
function
|
|
7280
|
+
function Ji(n) {
|
|
7277
7281
|
return {
|
|
7278
|
-
get:
|
|
7279
|
-
set:
|
|
7282
|
+
get: Wi(n),
|
|
7283
|
+
set: qi(n)
|
|
7280
7284
|
};
|
|
7281
7285
|
}
|
|
7282
|
-
function
|
|
7286
|
+
function Ki(n) {
|
|
7283
7287
|
return async (e, t) => {
|
|
7284
7288
|
let s = n.selectFrom("hooks").where("hooks.tenant_id", "=", e);
|
|
7285
7289
|
t.q && (s = Ee(n, s, t.q, ["url"]));
|
|
@@ -7299,16 +7303,16 @@ function Ji(n) {
|
|
|
7299
7303
|
};
|
|
7300
7304
|
};
|
|
7301
7305
|
}
|
|
7302
|
-
function
|
|
7306
|
+
function Hi(n) {
|
|
7303
7307
|
return async (e, t) => {
|
|
7304
7308
|
const s = await n.selectFrom("hooks").where("hooks.tenant_id", "=", e).where("hooks.hook_id", "=", t).selectAll().executeTakeFirst();
|
|
7305
7309
|
return s ? (s.enabled = !!s.enabled, s.synchronous = !!s.synchronous, R(s)) : null;
|
|
7306
7310
|
};
|
|
7307
7311
|
}
|
|
7308
|
-
function
|
|
7312
|
+
function Qi(n) {
|
|
7309
7313
|
return async (e, t) => (await n.deleteFrom("hooks").where("hooks.tenant_id", "=", e).where("hooks.hook_id", "=", t).executeTakeFirst()).numDeletedRows > 0;
|
|
7310
7314
|
}
|
|
7311
|
-
function
|
|
7315
|
+
function Yi(n) {
|
|
7312
7316
|
return async (e, t) => {
|
|
7313
7317
|
const s = {
|
|
7314
7318
|
hook_id: Ae(),
|
|
@@ -7322,7 +7326,7 @@ function Qi(n) {
|
|
|
7322
7326
|
}).execute(), s;
|
|
7323
7327
|
};
|
|
7324
7328
|
}
|
|
7325
|
-
function
|
|
7329
|
+
function Gi(n) {
|
|
7326
7330
|
return async (e, t, s) => {
|
|
7327
7331
|
const r = {
|
|
7328
7332
|
...s,
|
|
@@ -7331,16 +7335,16 @@ function Yi(n) {
|
|
|
7331
7335
|
return await n.updateTable("hooks").set(r).where("hooks.hook_id", "=", t).where("hooks.tenant_id", "=", e).execute(), !0;
|
|
7332
7336
|
};
|
|
7333
7337
|
}
|
|
7334
|
-
function
|
|
7338
|
+
function Xi(n) {
|
|
7335
7339
|
return {
|
|
7336
|
-
create:
|
|
7337
|
-
get:
|
|
7338
|
-
list:
|
|
7339
|
-
update:
|
|
7340
|
-
remove:
|
|
7340
|
+
create: Yi(n),
|
|
7341
|
+
get: Hi(n),
|
|
7342
|
+
list: Ki(n),
|
|
7343
|
+
update: Gi(n),
|
|
7344
|
+
remove: Qi(n)
|
|
7341
7345
|
};
|
|
7342
7346
|
}
|
|
7343
|
-
function
|
|
7347
|
+
function eo(n) {
|
|
7344
7348
|
return async (e, t) => {
|
|
7345
7349
|
const s = {
|
|
7346
7350
|
themeId: Ae(),
|
|
@@ -7351,16 +7355,16 @@ function Xi(n) {
|
|
|
7351
7355
|
return await n.insertInto("themes").values({ ...Re(s), tenant_id: e }).execute(), s;
|
|
7352
7356
|
};
|
|
7353
7357
|
}
|
|
7354
|
-
function
|
|
7358
|
+
function to(n) {
|
|
7355
7359
|
return async (e, t) => (await n.deleteFrom("themes").where("themes.tenant_id", "=", e).where("themes.theme_id", "=", t).executeTakeFirst()).numDeletedRows > 0;
|
|
7356
7360
|
}
|
|
7357
|
-
function
|
|
7361
|
+
function no(n) {
|
|
7358
7362
|
return async (e, t) => {
|
|
7359
7363
|
const s = await n.selectFrom("themes").where("themes.tenant_id", "=", e).where("themes.theme_id", "=", t).selectAll().executeTakeFirst();
|
|
7360
7364
|
return s ? R(s) : null;
|
|
7361
7365
|
};
|
|
7362
7366
|
}
|
|
7363
|
-
function
|
|
7367
|
+
function so(n) {
|
|
7364
7368
|
return async (e, t, s) => {
|
|
7365
7369
|
const r = Re({
|
|
7366
7370
|
...s,
|
|
@@ -7369,23 +7373,23 @@ function no(n) {
|
|
|
7369
7373
|
return await n.updateTable("themes").set(r).where("themes.id", "=", t).where("themes.tenant_id", "=", e).execute(), !0;
|
|
7370
7374
|
};
|
|
7371
7375
|
}
|
|
7372
|
-
function
|
|
7376
|
+
function ro(n) {
|
|
7373
7377
|
return {
|
|
7374
|
-
create:
|
|
7375
|
-
get:
|
|
7376
|
-
remove:
|
|
7377
|
-
update:
|
|
7378
|
+
create: eo(n),
|
|
7379
|
+
get: no(n),
|
|
7380
|
+
remove: to(n),
|
|
7381
|
+
update: so(n)
|
|
7378
7382
|
};
|
|
7379
7383
|
}
|
|
7380
|
-
function
|
|
7384
|
+
function ao(n) {
|
|
7381
7385
|
return async (e, t) => {
|
|
7382
7386
|
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 ?
|
|
7387
|
+
return r ? xr.parse(
|
|
7384
7388
|
hn(R(r), ["authParams"])
|
|
7385
7389
|
) : null;
|
|
7386
7390
|
};
|
|
7387
7391
|
}
|
|
7388
|
-
function
|
|
7392
|
+
function io(n) {
|
|
7389
7393
|
return async (e, t) => {
|
|
7390
7394
|
const s = {
|
|
7391
7395
|
login_id: Ae(),
|
|
@@ -7396,21 +7400,21 @@ function ao(n) {
|
|
|
7396
7400
|
return await n.insertInto("logins").values({ ...Re(s), tenant_id: e }).execute(), s;
|
|
7397
7401
|
};
|
|
7398
7402
|
}
|
|
7399
|
-
function
|
|
7403
|
+
function oo(n) {
|
|
7400
7404
|
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
7405
|
}
|
|
7402
|
-
function
|
|
7406
|
+
function co(n) {
|
|
7403
7407
|
return async (e, t) => (await n.deleteFrom("logins").where("logins.tenant_id", "=", e).where("logins.login_id", "=", t).execute()).length > 0;
|
|
7404
7408
|
}
|
|
7405
|
-
function
|
|
7409
|
+
function uo(n) {
|
|
7406
7410
|
return {
|
|
7407
|
-
create:
|
|
7408
|
-
get:
|
|
7409
|
-
update:
|
|
7410
|
-
remove:
|
|
7411
|
+
create: io(n),
|
|
7412
|
+
get: ao(n),
|
|
7413
|
+
update: oo(n),
|
|
7414
|
+
remove: co(n)
|
|
7411
7415
|
};
|
|
7412
7416
|
}
|
|
7413
|
-
function
|
|
7417
|
+
function lo(n) {
|
|
7414
7418
|
return async (e) => {
|
|
7415
7419
|
const [t] = await n.selectFrom("prompt_settings").where("prompt_settings.tenant_id", "=", e).selectAll().execute();
|
|
7416
7420
|
return R({
|
|
@@ -7421,46 +7425,55 @@ function uo(n) {
|
|
|
7421
7425
|
});
|
|
7422
7426
|
};
|
|
7423
7427
|
}
|
|
7424
|
-
function
|
|
7428
|
+
function wn(n) {
|
|
7429
|
+
return R({
|
|
7430
|
+
...n,
|
|
7431
|
+
webauthn_platform_first_factor: n.webauthn_platform_first_factor ? !!n.webauthn_platform_first_factor : void 0,
|
|
7432
|
+
identifier_first: n.identifier_first ? !!n.identifier_first : void 0,
|
|
7433
|
+
password_first: n.password_first ? !!n.password_first : void 0,
|
|
7434
|
+
universal_login_experience: n.universal_login_experience
|
|
7435
|
+
});
|
|
7436
|
+
}
|
|
7437
|
+
function po(n) {
|
|
7425
7438
|
return async (e, t) => {
|
|
7426
7439
|
try {
|
|
7427
|
-
const s =
|
|
7440
|
+
const s = Rr.parse(t);
|
|
7428
7441
|
await n.insertInto("prompt_settings").values({
|
|
7429
|
-
...s,
|
|
7442
|
+
...wn(s),
|
|
7430
7443
|
tenant_id: e
|
|
7431
7444
|
}).execute();
|
|
7432
7445
|
} catch {
|
|
7433
|
-
await n.updateTable("prompt_settings").set(t).where("tenant_id", "=", e).execute();
|
|
7446
|
+
await n.updateTable("prompt_settings").set(wn(t)).where("tenant_id", "=", e).execute();
|
|
7434
7447
|
}
|
|
7435
7448
|
};
|
|
7436
7449
|
}
|
|
7437
|
-
function
|
|
7450
|
+
function ho(n) {
|
|
7438
7451
|
return {
|
|
7439
|
-
get:
|
|
7440
|
-
set:
|
|
7452
|
+
get: lo(n),
|
|
7453
|
+
set: po(n)
|
|
7441
7454
|
};
|
|
7442
7455
|
}
|
|
7443
|
-
function
|
|
7456
|
+
function mo(n) {
|
|
7444
7457
|
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:
|
|
7458
|
+
applications: Ta(n),
|
|
7459
|
+
branding: Ji(n),
|
|
7460
|
+
clients: Di(n),
|
|
7461
|
+
codes: ya(n),
|
|
7462
|
+
connections: Pi(n),
|
|
7463
|
+
domains: Bi(n),
|
|
7464
|
+
hooks: Xi(n),
|
|
7465
|
+
keys: Ui(n),
|
|
7466
|
+
logins: uo(n),
|
|
7467
|
+
logs: Xr(n),
|
|
7468
|
+
passwords: ha(n),
|
|
7469
|
+
promptSettings: ho(n),
|
|
7470
|
+
users: Ur(n),
|
|
7471
|
+
sessions: aa(n),
|
|
7472
|
+
tenants: Kr(n),
|
|
7473
|
+
themes: ro(n),
|
|
7474
|
+
tickets: da(n)
|
|
7462
7475
|
};
|
|
7463
7476
|
}
|
|
7464
7477
|
export {
|
|
7465
|
-
|
|
7478
|
+
mo as default
|
|
7466
7479
|
};
|