@authhero/adapter-interfaces 0.11.7 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function ct(t, e) {
|
|
2
2
|
var n = {};
|
|
3
3
|
for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && e.indexOf(s) < 0 && (n[s] = t[s]);
|
|
4
4
|
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -6,7 +6,7 @@ function dt(t, e) {
|
|
|
6
6
|
e.indexOf(s[a]) < 0 && Object.prototype.propertyIsEnumerable.call(t, s[a]) && (n[s[a]] = t[s[a]]);
|
|
7
7
|
return n;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function dt(t, e) {
|
|
10
10
|
var n;
|
|
11
11
|
return ((n = t == null ? void 0 : t._def) === null || n === void 0 ? void 0 : n.typeName) === e;
|
|
12
12
|
}
|
|
@@ -17,28 +17,28 @@ function J(t, e) {
|
|
|
17
17
|
return a._def.openapi = this._def.openapi, a;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function lt(t) {
|
|
21
21
|
if (typeof t.ZodType.prototype.openapi < "u")
|
|
22
22
|
return;
|
|
23
23
|
t.ZodType.prototype.openapi = function(a, i) {
|
|
24
24
|
var o, c, u, l, m, x;
|
|
25
|
-
const z = typeof a == "string" ? i : a, B = z ?? {}, { param:
|
|
26
|
-
param: Object.assign(Object.assign({}, (x = (m = this._def.openapi) === null || m === void 0 ? void 0 : m.metadata) === null || x === void 0 ? void 0 : x.param),
|
|
27
|
-
} : void 0),
|
|
28
|
-
if (
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
var Se, Te,
|
|
32
|
-
const
|
|
33
|
-
return
|
|
25
|
+
const z = typeof a == "string" ? i : a, B = z ?? {}, { param: Ue } = B, at = ct(B, ["param"]), $e = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof a == "string" ? { refId: a } : void 0), Ve = Object.assign(Object.assign(Object.assign({}, (c = this._def.openapi) === null || c === void 0 ? void 0 : c.metadata), at), !((l = (u = this._def.openapi) === null || u === void 0 ? void 0 : u.metadata) === null || l === void 0) && l.param || Ue ? {
|
|
26
|
+
param: Object.assign(Object.assign({}, (x = (m = this._def.openapi) === null || m === void 0 ? void 0 : m.metadata) === null || x === void 0 ? void 0 : x.param), Ue)
|
|
27
|
+
} : void 0), Le = new this.constructor(Object.assign(Object.assign({}, this._def), { openapi: Object.assign(Object.assign({}, Object.keys($e).length > 0 ? { _internal: $e } : void 0), Object.keys(Ve).length > 0 ? { metadata: Ve } : void 0) }));
|
|
28
|
+
if (dt(this, "ZodObject")) {
|
|
29
|
+
const it = this.extend;
|
|
30
|
+
Le.extend = function(...ot) {
|
|
31
|
+
var we, Se, Te, Ee, Ce, Oe;
|
|
32
|
+
const je = it.apply(this, ot);
|
|
33
|
+
return je._def.openapi = {
|
|
34
34
|
_internal: {
|
|
35
|
-
extendedFrom: !((
|
|
35
|
+
extendedFrom: !((Se = (we = this._def.openapi) === null || we === void 0 ? void 0 : we._internal) === null || Se === void 0) && Se.refId ? { refId: (Ee = (Te = this._def.openapi) === null || Te === void 0 ? void 0 : Te._internal) === null || Ee === void 0 ? void 0 : Ee.refId, schema: this } : (Ce = this._def.openapi) === null || Ce === void 0 ? void 0 : Ce._internal.extendedFrom
|
|
36
36
|
},
|
|
37
|
-
metadata: (
|
|
38
|
-
},
|
|
37
|
+
metadata: (Oe = je._def.openapi) === null || Oe === void 0 ? void 0 : Oe.metadata
|
|
38
|
+
}, je;
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
return
|
|
41
|
+
return Le;
|
|
42
42
|
}, J(t, "optional"), J(t, "nullable"), J(t, "default"), J(t, "transform"), J(t, "refine");
|
|
43
43
|
const e = t.ZodObject.prototype.deepPartial;
|
|
44
44
|
t.ZodObject.prototype.deepPartial = function() {
|
|
@@ -96,14 +96,14 @@ var b;
|
|
|
96
96
|
}
|
|
97
97
|
t.joinValues = s, t.jsonStringifyReplacer = (a, i) => typeof i == "bigint" ? i.toString() : i;
|
|
98
98
|
})(b || (b = {}));
|
|
99
|
-
var
|
|
99
|
+
var Ne;
|
|
100
100
|
(function(t) {
|
|
101
101
|
t.mergeShapes = (e, n) => ({
|
|
102
102
|
...e,
|
|
103
103
|
...n
|
|
104
104
|
// second overwrites first
|
|
105
105
|
});
|
|
106
|
-
})(
|
|
106
|
+
})(Ne || (Ne = {}));
|
|
107
107
|
const h = b.arrayToEnum([
|
|
108
108
|
"string",
|
|
109
109
|
"nan",
|
|
@@ -163,7 +163,7 @@ const h = b.arrayToEnum([
|
|
|
163
163
|
"invalid_intersection_types",
|
|
164
164
|
"not_multiple_of",
|
|
165
165
|
"not_finite"
|
|
166
|
-
]),
|
|
166
|
+
]), ut = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
167
167
|
class T extends Error {
|
|
168
168
|
constructor(e) {
|
|
169
169
|
super(), this.issues = [], this.addIssue = (s) => {
|
|
@@ -280,12 +280,12 @@ const F = (t, e) => {
|
|
|
280
280
|
}
|
|
281
281
|
return { message: n };
|
|
282
282
|
};
|
|
283
|
-
let
|
|
284
|
-
function
|
|
285
|
-
|
|
283
|
+
let We = F;
|
|
284
|
+
function pt(t) {
|
|
285
|
+
We = t;
|
|
286
286
|
}
|
|
287
287
|
function me() {
|
|
288
|
-
return
|
|
288
|
+
return We;
|
|
289
289
|
}
|
|
290
290
|
const _e = (t) => {
|
|
291
291
|
const { data: e, path: n, errorMaps: s, issueData: a } = t, i = [...n, ...a.path || []], o = {
|
|
@@ -307,7 +307,7 @@ const _e = (t) => {
|
|
|
307
307
|
path: i,
|
|
308
308
|
message: c
|
|
309
309
|
};
|
|
310
|
-
},
|
|
310
|
+
}, ht = [];
|
|
311
311
|
function p(t, e) {
|
|
312
312
|
const n = me(), s = _e({
|
|
313
313
|
issueData: e,
|
|
@@ -366,12 +366,12 @@ class w {
|
|
|
366
366
|
}
|
|
367
367
|
const g = Object.freeze({
|
|
368
368
|
status: "aborted"
|
|
369
|
-
}), H = (t) => ({ status: "dirty", value: t }), S = (t) => ({ status: "valid", value: t }),
|
|
369
|
+
}), H = (t) => ({ status: "dirty", value: t }), S = (t) => ({ status: "valid", value: t }), Ze = (t) => t.status === "aborted", Re = (t) => t.status === "dirty", ee = (t) => t.status === "valid", te = (t) => typeof Promise < "u" && t instanceof Promise;
|
|
370
370
|
function ge(t, e, n, s) {
|
|
371
371
|
if (typeof e == "function" ? t !== e || !s : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
372
372
|
return e.get(t);
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function Ge(t, e, n, s, a) {
|
|
375
375
|
if (typeof e == "function" ? t !== e || !a : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
376
376
|
return e.set(t, n), n;
|
|
377
377
|
}
|
|
@@ -388,7 +388,7 @@ class I {
|
|
|
388
388
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
|
-
const
|
|
391
|
+
const ze = (t, e) => {
|
|
392
392
|
if (ee(e))
|
|
393
393
|
return { success: !0, data: e.value };
|
|
394
394
|
if (!t.common.issues.length)
|
|
@@ -478,7 +478,7 @@ class v {
|
|
|
478
478
|
data: e,
|
|
479
479
|
parsedType: A(e)
|
|
480
480
|
}, i = this._parseSync({ data: e, path: a.path, parent: a });
|
|
481
|
-
return
|
|
481
|
+
return ze(a, i);
|
|
482
482
|
}
|
|
483
483
|
async parseAsync(e, n) {
|
|
484
484
|
const s = await this.safeParseAsync(e, n);
|
|
@@ -499,7 +499,7 @@ class v {
|
|
|
499
499
|
data: e,
|
|
500
500
|
parsedType: A(e)
|
|
501
501
|
}, a = this._parse({ data: e, path: s.path, parent: s }), i = await (te(a) ? a : Promise.resolve(a));
|
|
502
|
-
return
|
|
502
|
+
return ze(s, i);
|
|
503
503
|
}
|
|
504
504
|
refine(e, n) {
|
|
505
505
|
const s = (a) => typeof n == "string" || typeof n > "u" ? { message: n } : typeof n == "function" ? n(a) : n;
|
|
@@ -534,7 +534,7 @@ class v {
|
|
|
534
534
|
return this.nullable().optional();
|
|
535
535
|
}
|
|
536
536
|
array() {
|
|
537
|
-
return
|
|
537
|
+
return C.create(this, this._def);
|
|
538
538
|
}
|
|
539
539
|
promise() {
|
|
540
540
|
return K.create(this, this._def);
|
|
@@ -563,7 +563,7 @@ class v {
|
|
|
563
563
|
});
|
|
564
564
|
}
|
|
565
565
|
brand() {
|
|
566
|
-
return new
|
|
566
|
+
return new Pe({
|
|
567
567
|
typeName: _.ZodBranded,
|
|
568
568
|
type: this,
|
|
569
569
|
...y(this._def)
|
|
@@ -598,25 +598,25 @@ class v {
|
|
|
598
598
|
return this.safeParse(null).success;
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
|
-
const
|
|
602
|
-
let
|
|
603
|
-
const
|
|
604
|
-
function
|
|
601
|
+
const ft = /^c[^\s-]{8,}$/i, mt = /^[0-9a-z]+$/, _t = /^[0-9A-HJKMNP-TV-Z]{26}$/, gt = /^[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, yt = /^[a-z0-9_-]{21}$/i, vt = /^[-+]?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)?)??$/, bt = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, kt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
602
|
+
let Ie;
|
|
603
|
+
const xt = /^(?:(?: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])$/, wt = /^(([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})))$/, St = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, He = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Tt = new RegExp(`^${He}$`);
|
|
604
|
+
function qe(t) {
|
|
605
605
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
606
606
|
return t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
607
607
|
}
|
|
608
608
|
function Et(t) {
|
|
609
|
-
return new RegExp(`^${
|
|
609
|
+
return new RegExp(`^${qe(t)}$`);
|
|
610
610
|
}
|
|
611
|
-
function
|
|
612
|
-
let e = `${
|
|
611
|
+
function Fe(t) {
|
|
612
|
+
let e = `${He}T${qe(t)}`;
|
|
613
613
|
const n = [];
|
|
614
614
|
return n.push(t.local ? "Z?" : "Z"), t.offset && n.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${n.join("|")})`, new RegExp(`^${e}$`);
|
|
615
615
|
}
|
|
616
|
-
function
|
|
617
|
-
return !!((e === "v4" || !e) &&
|
|
616
|
+
function Ct(t, e) {
|
|
617
|
+
return !!((e === "v4" || !e) && xt.test(t) || (e === "v6" || !e) && wt.test(t));
|
|
618
618
|
}
|
|
619
|
-
class
|
|
619
|
+
class E extends v {
|
|
620
620
|
_parse(e) {
|
|
621
621
|
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== h.string) {
|
|
622
622
|
const i = this._getOrReturnCtx(e);
|
|
@@ -665,43 +665,43 @@ class C extends v {
|
|
|
665
665
|
message: i.message
|
|
666
666
|
}), s.dirty());
|
|
667
667
|
} else if (i.kind === "email")
|
|
668
|
-
|
|
668
|
+
bt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
|
|
669
669
|
validation: "email",
|
|
670
670
|
code: d.invalid_string,
|
|
671
671
|
message: i.message
|
|
672
672
|
}), s.dirty());
|
|
673
673
|
else if (i.kind === "emoji")
|
|
674
|
-
|
|
674
|
+
Ie || (Ie = new RegExp(kt, "u")), Ie.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
|
|
675
675
|
validation: "emoji",
|
|
676
676
|
code: d.invalid_string,
|
|
677
677
|
message: i.message
|
|
678
678
|
}), s.dirty());
|
|
679
679
|
else if (i.kind === "uuid")
|
|
680
|
-
|
|
680
|
+
gt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
|
|
681
681
|
validation: "uuid",
|
|
682
682
|
code: d.invalid_string,
|
|
683
683
|
message: i.message
|
|
684
684
|
}), s.dirty());
|
|
685
685
|
else if (i.kind === "nanoid")
|
|
686
|
-
|
|
686
|
+
yt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
|
|
687
687
|
validation: "nanoid",
|
|
688
688
|
code: d.invalid_string,
|
|
689
689
|
message: i.message
|
|
690
690
|
}), s.dirty());
|
|
691
691
|
else if (i.kind === "cuid")
|
|
692
|
-
|
|
692
|
+
ft.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
|
|
693
693
|
validation: "cuid",
|
|
694
694
|
code: d.invalid_string,
|
|
695
695
|
message: i.message
|
|
696
696
|
}), s.dirty());
|
|
697
697
|
else if (i.kind === "cuid2")
|
|
698
|
-
|
|
698
|
+
mt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
|
|
699
699
|
validation: "cuid2",
|
|
700
700
|
code: d.invalid_string,
|
|
701
701
|
message: i.message
|
|
702
702
|
}), s.dirty());
|
|
703
703
|
else if (i.kind === "ulid")
|
|
704
|
-
|
|
704
|
+
_t.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
|
|
705
705
|
validation: "ulid",
|
|
706
706
|
code: d.invalid_string,
|
|
707
707
|
message: i.message
|
|
@@ -732,11 +732,11 @@ class C extends v {
|
|
|
732
732
|
code: d.invalid_string,
|
|
733
733
|
validation: { endsWith: i.value },
|
|
734
734
|
message: i.message
|
|
735
|
-
}), s.dirty()) : i.kind === "datetime" ?
|
|
735
|
+
}), s.dirty()) : i.kind === "datetime" ? Fe(i).test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
|
|
736
736
|
code: d.invalid_string,
|
|
737
737
|
validation: "datetime",
|
|
738
738
|
message: i.message
|
|
739
|
-
}), s.dirty()) : i.kind === "date" ?
|
|
739
|
+
}), s.dirty()) : i.kind === "date" ? Tt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
|
|
740
740
|
code: d.invalid_string,
|
|
741
741
|
validation: "date",
|
|
742
742
|
message: i.message
|
|
@@ -744,15 +744,15 @@ class C extends v {
|
|
|
744
744
|
code: d.invalid_string,
|
|
745
745
|
validation: "time",
|
|
746
746
|
message: i.message
|
|
747
|
-
}), s.dirty()) : i.kind === "duration" ?
|
|
747
|
+
}), s.dirty()) : i.kind === "duration" ? vt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
|
|
748
748
|
validation: "duration",
|
|
749
749
|
code: d.invalid_string,
|
|
750
750
|
message: i.message
|
|
751
|
-
}), s.dirty()) : i.kind === "ip" ?
|
|
751
|
+
}), s.dirty()) : i.kind === "ip" ? Ct(e.data, i.version) || (a = this._getOrReturnCtx(e, a), p(a, {
|
|
752
752
|
validation: "ip",
|
|
753
753
|
code: d.invalid_string,
|
|
754
754
|
message: i.message
|
|
755
|
-
}), s.dirty()) : i.kind === "base64" ?
|
|
755
|
+
}), s.dirty()) : i.kind === "base64" ? St.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
|
|
756
756
|
validation: "base64",
|
|
757
757
|
code: d.invalid_string,
|
|
758
758
|
message: i.message
|
|
@@ -767,7 +767,7 @@ class C extends v {
|
|
|
767
767
|
});
|
|
768
768
|
}
|
|
769
769
|
_addCheck(e) {
|
|
770
|
-
return new
|
|
770
|
+
return new E({
|
|
771
771
|
...this._def,
|
|
772
772
|
checks: [...this._def.checks, e]
|
|
773
773
|
});
|
|
@@ -893,19 +893,19 @@ class C extends v {
|
|
|
893
893
|
return this.min(1, f.errToObj(e));
|
|
894
894
|
}
|
|
895
895
|
trim() {
|
|
896
|
-
return new
|
|
896
|
+
return new E({
|
|
897
897
|
...this._def,
|
|
898
898
|
checks: [...this._def.checks, { kind: "trim" }]
|
|
899
899
|
});
|
|
900
900
|
}
|
|
901
901
|
toLowerCase() {
|
|
902
|
-
return new
|
|
902
|
+
return new E({
|
|
903
903
|
...this._def,
|
|
904
904
|
checks: [...this._def.checks, { kind: "toLowerCase" }]
|
|
905
905
|
});
|
|
906
906
|
}
|
|
907
907
|
toUpperCase() {
|
|
908
|
-
return new
|
|
908
|
+
return new E({
|
|
909
909
|
...this._def,
|
|
910
910
|
checks: [...this._def.checks, { kind: "toUpperCase" }]
|
|
911
911
|
});
|
|
@@ -965,16 +965,16 @@ class C extends v {
|
|
|
965
965
|
return e;
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
|
-
|
|
968
|
+
E.create = (t) => {
|
|
969
969
|
var e;
|
|
970
|
-
return new
|
|
970
|
+
return new E({
|
|
971
971
|
checks: [],
|
|
972
972
|
typeName: _.ZodString,
|
|
973
973
|
coerce: (e = t == null ? void 0 : t.coerce) !== null && e !== void 0 ? e : !1,
|
|
974
974
|
...y(t)
|
|
975
975
|
});
|
|
976
976
|
};
|
|
977
|
-
function
|
|
977
|
+
function Ot(t, e) {
|
|
978
978
|
const n = (t.toString().split(".")[1] || "").length, s = (e.toString().split(".")[1] || "").length, a = n > s ? n : s, i = parseInt(t.toFixed(a).replace(".", "")), o = parseInt(e.toFixed(a).replace(".", ""));
|
|
979
979
|
return i % o / Math.pow(10, a);
|
|
980
980
|
}
|
|
@@ -1013,7 +1013,7 @@ class P extends v {
|
|
|
1013
1013
|
inclusive: i.inclusive,
|
|
1014
1014
|
exact: !1,
|
|
1015
1015
|
message: i.message
|
|
1016
|
-
}), a.dirty()) : i.kind === "multipleOf" ?
|
|
1016
|
+
}), a.dirty()) : i.kind === "multipleOf" ? Ot(e.data, i.value) !== 0 && (s = this._getOrReturnCtx(e, s), p(s, {
|
|
1017
1017
|
code: d.not_multiple_of,
|
|
1018
1018
|
multipleOf: i.value,
|
|
1019
1019
|
message: i.message
|
|
@@ -1480,7 +1480,7 @@ ve.create = (t) => new ve({
|
|
|
1480
1480
|
typeName: _.ZodVoid,
|
|
1481
1481
|
...y(t)
|
|
1482
1482
|
});
|
|
1483
|
-
class
|
|
1483
|
+
class C extends v {
|
|
1484
1484
|
_parse(e) {
|
|
1485
1485
|
const { ctx: n, status: s } = this._processInputParams(e), a = this._def;
|
|
1486
1486
|
if (n.parsedType !== h.array)
|
|
@@ -1524,19 +1524,19 @@ class E extends v {
|
|
|
1524
1524
|
return this._def.type;
|
|
1525
1525
|
}
|
|
1526
1526
|
min(e, n) {
|
|
1527
|
-
return new
|
|
1527
|
+
return new C({
|
|
1528
1528
|
...this._def,
|
|
1529
1529
|
minLength: { value: e, message: f.toString(n) }
|
|
1530
1530
|
});
|
|
1531
1531
|
}
|
|
1532
1532
|
max(e, n) {
|
|
1533
|
-
return new
|
|
1533
|
+
return new C({
|
|
1534
1534
|
...this._def,
|
|
1535
1535
|
maxLength: { value: e, message: f.toString(n) }
|
|
1536
1536
|
});
|
|
1537
1537
|
}
|
|
1538
1538
|
length(e, n) {
|
|
1539
|
-
return new
|
|
1539
|
+
return new C({
|
|
1540
1540
|
...this._def,
|
|
1541
1541
|
exactLength: { value: e, message: f.toString(n) }
|
|
1542
1542
|
});
|
|
@@ -1545,7 +1545,7 @@ class E extends v {
|
|
|
1545
1545
|
return this.min(1, e);
|
|
1546
1546
|
}
|
|
1547
1547
|
}
|
|
1548
|
-
|
|
1548
|
+
C.create = (t, e) => new C({
|
|
1549
1549
|
type: t,
|
|
1550
1550
|
minLength: null,
|
|
1551
1551
|
maxLength: null,
|
|
@@ -1564,7 +1564,7 @@ function G(t) {
|
|
|
1564
1564
|
...t._def,
|
|
1565
1565
|
shape: () => e
|
|
1566
1566
|
});
|
|
1567
|
-
} else return t instanceof
|
|
1567
|
+
} else return t instanceof C ? new C({
|
|
1568
1568
|
...t._def,
|
|
1569
1569
|
type: G(t.element)
|
|
1570
1570
|
}) : t instanceof j ? j.create(G(t.unwrap())) : t instanceof U ? U.create(G(t.unwrap())) : t instanceof N ? N.create(t.items.map((e) => G(e))) : t;
|
|
@@ -1832,7 +1832,7 @@ class k extends v {
|
|
|
1832
1832
|
});
|
|
1833
1833
|
}
|
|
1834
1834
|
keyof() {
|
|
1835
|
-
return
|
|
1835
|
+
return Ye(b.objectKeys(this.shape));
|
|
1836
1836
|
}
|
|
1837
1837
|
}
|
|
1838
1838
|
k.create = (t, e) => new k({
|
|
@@ -1929,7 +1929,7 @@ ae.create = (t, e) => new ae({
|
|
|
1929
1929
|
typeName: _.ZodUnion,
|
|
1930
1930
|
...y(e)
|
|
1931
1931
|
});
|
|
1932
|
-
const Z = (t) => t instanceof ce ? Z(t.schema) : t instanceof O ? Z(t.innerType()) : t instanceof de ? [t.value] : t instanceof D ? t.options : t instanceof le ? b.objectValues(t.enum) : t instanceof ue ? Z(t._def.innerType) : t instanceof re ? [void 0] : t instanceof se ? [null] : t instanceof j ? [void 0, ...Z(t.unwrap())] : t instanceof U ? [null, ...Z(t.unwrap())] : t instanceof
|
|
1932
|
+
const Z = (t) => t instanceof ce ? Z(t.schema) : t instanceof O ? Z(t.innerType()) : t instanceof de ? [t.value] : t instanceof D ? t.options : t instanceof le ? b.objectValues(t.enum) : t instanceof ue ? Z(t._def.innerType) : t instanceof re ? [void 0] : t instanceof se ? [null] : t instanceof j ? [void 0, ...Z(t.unwrap())] : t instanceof U ? [null, ...Z(t.unwrap())] : t instanceof Pe || t instanceof he ? Z(t.unwrap()) : t instanceof pe ? Z(t._def.innerType) : [];
|
|
1933
1933
|
class xe extends v {
|
|
1934
1934
|
_parse(e) {
|
|
1935
1935
|
const { ctx: n } = this._processInputParams(e);
|
|
@@ -1992,14 +1992,14 @@ class xe extends v {
|
|
|
1992
1992
|
});
|
|
1993
1993
|
}
|
|
1994
1994
|
}
|
|
1995
|
-
function
|
|
1995
|
+
function Ae(t, e) {
|
|
1996
1996
|
const n = A(t), s = A(e);
|
|
1997
1997
|
if (t === e)
|
|
1998
1998
|
return { valid: !0, data: t };
|
|
1999
1999
|
if (n === h.object && s === h.object) {
|
|
2000
2000
|
const a = b.objectKeys(e), i = b.objectKeys(t).filter((c) => a.indexOf(c) !== -1), o = { ...t, ...e };
|
|
2001
2001
|
for (const c of i) {
|
|
2002
|
-
const u =
|
|
2002
|
+
const u = Ae(t[c], e[c]);
|
|
2003
2003
|
if (!u.valid)
|
|
2004
2004
|
return { valid: !1 };
|
|
2005
2005
|
o[c] = u.data;
|
|
@@ -2010,7 +2010,7 @@ function Pe(t, e) {
|
|
|
2010
2010
|
return { valid: !1 };
|
|
2011
2011
|
const a = [];
|
|
2012
2012
|
for (let i = 0; i < t.length; i++) {
|
|
2013
|
-
const o = t[i], c = e[i], u =
|
|
2013
|
+
const o = t[i], c = e[i], u = Ae(o, c);
|
|
2014
2014
|
if (!u.valid)
|
|
2015
2015
|
return { valid: !1 };
|
|
2016
2016
|
a.push(u.data);
|
|
@@ -2021,10 +2021,10 @@ function Pe(t, e) {
|
|
|
2021
2021
|
class ie extends v {
|
|
2022
2022
|
_parse(e) {
|
|
2023
2023
|
const { status: n, ctx: s } = this._processInputParams(e), a = (i, o) => {
|
|
2024
|
-
if (
|
|
2024
|
+
if (Ze(i) || Ze(o))
|
|
2025
2025
|
return g;
|
|
2026
|
-
const c =
|
|
2027
|
-
return c.valid ? ((
|
|
2026
|
+
const c = Ae(i.value, o.value);
|
|
2027
|
+
return c.valid ? ((Re(i) || Re(o)) && n.dirty(), { status: n.value, value: c.data }) : (p(s, {
|
|
2028
2028
|
code: d.invalid_intersection_types
|
|
2029
2029
|
}), g);
|
|
2030
2030
|
};
|
|
@@ -2140,7 +2140,7 @@ class oe extends v {
|
|
|
2140
2140
|
typeName: _.ZodRecord,
|
|
2141
2141
|
...y(s)
|
|
2142
2142
|
}) : new oe({
|
|
2143
|
-
keyType:
|
|
2143
|
+
keyType: E.create(),
|
|
2144
2144
|
valueType: e,
|
|
2145
2145
|
typeName: _.ZodRecord,
|
|
2146
2146
|
...y(n)
|
|
@@ -2395,7 +2395,7 @@ de.create = (t, e) => new de({
|
|
|
2395
2395
|
typeName: _.ZodLiteral,
|
|
2396
2396
|
...y(e)
|
|
2397
2397
|
});
|
|
2398
|
-
function
|
|
2398
|
+
function Ye(t, e) {
|
|
2399
2399
|
return new D({
|
|
2400
2400
|
values: t,
|
|
2401
2401
|
typeName: _.ZodEnum,
|
|
@@ -2415,7 +2415,7 @@ class D extends v {
|
|
|
2415
2415
|
code: d.invalid_type
|
|
2416
2416
|
}), g;
|
|
2417
2417
|
}
|
|
2418
|
-
if (ge(this, Q) ||
|
|
2418
|
+
if (ge(this, Q) || Ge(this, Q, new Set(this._def.values)), !ge(this, Q).has(e.data)) {
|
|
2419
2419
|
const n = this._getOrReturnCtx(e), s = this._def.values;
|
|
2420
2420
|
return p(n, {
|
|
2421
2421
|
received: n.data,
|
|
@@ -2460,7 +2460,7 @@ class D extends v {
|
|
|
2460
2460
|
}
|
|
2461
2461
|
}
|
|
2462
2462
|
Q = /* @__PURE__ */ new WeakMap();
|
|
2463
|
-
D.create =
|
|
2463
|
+
D.create = Ye;
|
|
2464
2464
|
class le extends v {
|
|
2465
2465
|
constructor() {
|
|
2466
2466
|
super(...arguments), X.set(this, void 0);
|
|
@@ -2475,7 +2475,7 @@ class le extends v {
|
|
|
2475
2475
|
code: d.invalid_type
|
|
2476
2476
|
}), g;
|
|
2477
2477
|
}
|
|
2478
|
-
if (ge(this, X) ||
|
|
2478
|
+
if (ge(this, X) || Ge(this, X, new Set(b.getValidEnumValues(this._def.values))), !ge(this, X).has(e.data)) {
|
|
2479
2479
|
const a = b.objectValues(n);
|
|
2480
2480
|
return p(s, {
|
|
2481
2481
|
received: s.data,
|
|
@@ -2714,8 +2714,8 @@ ke.create = (t) => new ke({
|
|
|
2714
2714
|
typeName: _.ZodNaN,
|
|
2715
2715
|
...y(t)
|
|
2716
2716
|
});
|
|
2717
|
-
const
|
|
2718
|
-
class
|
|
2717
|
+
const jt = Symbol("zod_brand");
|
|
2718
|
+
class Pe extends v {
|
|
2719
2719
|
_parse(e) {
|
|
2720
2720
|
const { ctx: n } = this._processInputParams(e), s = n.data;
|
|
2721
2721
|
return this._def.type._parse({
|
|
@@ -2782,7 +2782,7 @@ he.create = (t, e) => new he({
|
|
|
2782
2782
|
typeName: _.ZodReadonly,
|
|
2783
2783
|
...y(e)
|
|
2784
2784
|
});
|
|
2785
|
-
function
|
|
2785
|
+
function Ke(t, e = {}, n) {
|
|
2786
2786
|
return t ? Y.create().superRefine((s, a) => {
|
|
2787
2787
|
var i, o;
|
|
2788
2788
|
if (!t(s)) {
|
|
@@ -2791,17 +2791,17 @@ function Je(t, e = {}, n) {
|
|
|
2791
2791
|
}
|
|
2792
2792
|
}) : Y.create();
|
|
2793
2793
|
}
|
|
2794
|
-
const
|
|
2794
|
+
const It = {
|
|
2795
2795
|
object: k.lazycreate
|
|
2796
2796
|
};
|
|
2797
2797
|
var _;
|
|
2798
2798
|
(function(t) {
|
|
2799
2799
|
t.ZodString = "ZodString", t.ZodNumber = "ZodNumber", t.ZodNaN = "ZodNaN", t.ZodBigInt = "ZodBigInt", t.ZodBoolean = "ZodBoolean", t.ZodDate = "ZodDate", t.ZodSymbol = "ZodSymbol", t.ZodUndefined = "ZodUndefined", t.ZodNull = "ZodNull", t.ZodAny = "ZodAny", t.ZodUnknown = "ZodUnknown", t.ZodNever = "ZodNever", t.ZodVoid = "ZodVoid", t.ZodArray = "ZodArray", t.ZodObject = "ZodObject", t.ZodUnion = "ZodUnion", t.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", t.ZodIntersection = "ZodIntersection", t.ZodTuple = "ZodTuple", t.ZodRecord = "ZodRecord", t.ZodMap = "ZodMap", t.ZodSet = "ZodSet", t.ZodFunction = "ZodFunction", t.ZodLazy = "ZodLazy", t.ZodLiteral = "ZodLiteral", t.ZodEnum = "ZodEnum", t.ZodEffects = "ZodEffects", t.ZodNativeEnum = "ZodNativeEnum", t.ZodOptional = "ZodOptional", t.ZodNullable = "ZodNullable", t.ZodDefault = "ZodDefault", t.ZodCatch = "ZodCatch", t.ZodPromise = "ZodPromise", t.ZodBranded = "ZodBranded", t.ZodPipeline = "ZodPipeline", t.ZodReadonly = "ZodReadonly";
|
|
2800
2800
|
})(_ || (_ = {}));
|
|
2801
|
-
const
|
|
2801
|
+
const Nt = (t, e = {
|
|
2802
2802
|
message: `Input not instance of ${t.name}`
|
|
2803
|
-
}) =>
|
|
2804
|
-
string: (t) =>
|
|
2803
|
+
}) => Ke((n) => n instanceof t, e), Je = E.create, Qe = P.create, Zt = ke.create, Rt = M.create, Xe = ne.create, At = V.create, Pt = ye.create, Mt = re.create, Dt = se.create, Ut = Y.create, $t = $.create, Vt = R.create, Lt = ve.create, zt = C.create, Bt = k.create, Wt = k.strictCreate, Gt = ae.create, Ht = xe.create, qt = ie.create, Ft = N.create, Yt = oe.create, Kt = be.create, Jt = L.create, Qt = q.create, Xt = ce.create, en = de.create, tn = D.create, nn = le.create, rn = K.create, Be = O.create, sn = j.create, an = U.create, on = O.createWithPreprocess, cn = fe.create, dn = () => Je().optional(), ln = () => Qe().optional(), un = () => Xe().optional(), pn = {
|
|
2804
|
+
string: (t) => E.create({ ...t, coerce: !0 }),
|
|
2805
2805
|
number: (t) => P.create({ ...t, coerce: !0 }),
|
|
2806
2806
|
boolean: (t) => ne.create({
|
|
2807
2807
|
...t,
|
|
@@ -2809,34 +2809,34 @@ const Zt = (t, e = {
|
|
|
2809
2809
|
}),
|
|
2810
2810
|
bigint: (t) => M.create({ ...t, coerce: !0 }),
|
|
2811
2811
|
date: (t) => V.create({ ...t, coerce: !0 })
|
|
2812
|
-
},
|
|
2812
|
+
}, hn = g;
|
|
2813
2813
|
var r = /* @__PURE__ */ Object.freeze({
|
|
2814
2814
|
__proto__: null,
|
|
2815
2815
|
defaultErrorMap: F,
|
|
2816
|
-
setErrorMap:
|
|
2816
|
+
setErrorMap: pt,
|
|
2817
2817
|
getErrorMap: me,
|
|
2818
2818
|
makeIssue: _e,
|
|
2819
|
-
EMPTY_PATH:
|
|
2819
|
+
EMPTY_PATH: ht,
|
|
2820
2820
|
addIssueToContext: p,
|
|
2821
2821
|
ParseStatus: w,
|
|
2822
2822
|
INVALID: g,
|
|
2823
2823
|
DIRTY: H,
|
|
2824
2824
|
OK: S,
|
|
2825
|
-
isAborted:
|
|
2826
|
-
isDirty:
|
|
2825
|
+
isAborted: Ze,
|
|
2826
|
+
isDirty: Re,
|
|
2827
2827
|
isValid: ee,
|
|
2828
2828
|
isAsync: te,
|
|
2829
2829
|
get util() {
|
|
2830
2830
|
return b;
|
|
2831
2831
|
},
|
|
2832
2832
|
get objectUtil() {
|
|
2833
|
-
return
|
|
2833
|
+
return Ne;
|
|
2834
2834
|
},
|
|
2835
2835
|
ZodParsedType: h,
|
|
2836
2836
|
getParsedType: A,
|
|
2837
2837
|
ZodType: v,
|
|
2838
|
-
datetimeRegex:
|
|
2839
|
-
ZodString:
|
|
2838
|
+
datetimeRegex: Fe,
|
|
2839
|
+
ZodString: E,
|
|
2840
2840
|
ZodNumber: P,
|
|
2841
2841
|
ZodBigInt: M,
|
|
2842
2842
|
ZodBoolean: ne,
|
|
@@ -2848,7 +2848,7 @@ var r = /* @__PURE__ */ Object.freeze({
|
|
|
2848
2848
|
ZodUnknown: $,
|
|
2849
2849
|
ZodNever: R,
|
|
2850
2850
|
ZodVoid: ve,
|
|
2851
|
-
ZodArray:
|
|
2851
|
+
ZodArray: C,
|
|
2852
2852
|
ZodObject: k,
|
|
2853
2853
|
ZodUnion: ae,
|
|
2854
2854
|
ZodDiscriminatedUnion: xe,
|
|
@@ -2870,71 +2870,71 @@ var r = /* @__PURE__ */ Object.freeze({
|
|
|
2870
2870
|
ZodDefault: ue,
|
|
2871
2871
|
ZodCatch: pe,
|
|
2872
2872
|
ZodNaN: ke,
|
|
2873
|
-
BRAND:
|
|
2874
|
-
ZodBranded:
|
|
2873
|
+
BRAND: jt,
|
|
2874
|
+
ZodBranded: Pe,
|
|
2875
2875
|
ZodPipeline: fe,
|
|
2876
2876
|
ZodReadonly: he,
|
|
2877
|
-
custom:
|
|
2877
|
+
custom: Ke,
|
|
2878
2878
|
Schema: v,
|
|
2879
2879
|
ZodSchema: v,
|
|
2880
|
-
late:
|
|
2880
|
+
late: It,
|
|
2881
2881
|
get ZodFirstPartyTypeKind() {
|
|
2882
2882
|
return _;
|
|
2883
2883
|
},
|
|
2884
|
-
coerce:
|
|
2885
|
-
any:
|
|
2886
|
-
array:
|
|
2887
|
-
bigint:
|
|
2888
|
-
boolean:
|
|
2889
|
-
date:
|
|
2890
|
-
discriminatedUnion:
|
|
2891
|
-
effect:
|
|
2892
|
-
enum:
|
|
2893
|
-
function:
|
|
2894
|
-
instanceof:
|
|
2895
|
-
intersection:
|
|
2896
|
-
lazy:
|
|
2897
|
-
literal:
|
|
2898
|
-
map:
|
|
2899
|
-
nan:
|
|
2900
|
-
nativeEnum:
|
|
2901
|
-
never:
|
|
2902
|
-
null:
|
|
2903
|
-
nullable:
|
|
2904
|
-
number:
|
|
2905
|
-
object:
|
|
2906
|
-
oboolean:
|
|
2907
|
-
onumber:
|
|
2908
|
-
optional:
|
|
2909
|
-
ostring:
|
|
2910
|
-
pipeline:
|
|
2911
|
-
preprocess:
|
|
2912
|
-
promise:
|
|
2913
|
-
record:
|
|
2914
|
-
set:
|
|
2915
|
-
strictObject:
|
|
2916
|
-
string:
|
|
2917
|
-
symbol:
|
|
2918
|
-
transformer:
|
|
2919
|
-
tuple:
|
|
2920
|
-
undefined:
|
|
2921
|
-
union:
|
|
2922
|
-
unknown:
|
|
2923
|
-
void:
|
|
2924
|
-
NEVER:
|
|
2884
|
+
coerce: pn,
|
|
2885
|
+
any: Ut,
|
|
2886
|
+
array: zt,
|
|
2887
|
+
bigint: Rt,
|
|
2888
|
+
boolean: Xe,
|
|
2889
|
+
date: At,
|
|
2890
|
+
discriminatedUnion: Ht,
|
|
2891
|
+
effect: Be,
|
|
2892
|
+
enum: tn,
|
|
2893
|
+
function: Qt,
|
|
2894
|
+
instanceof: Nt,
|
|
2895
|
+
intersection: qt,
|
|
2896
|
+
lazy: Xt,
|
|
2897
|
+
literal: en,
|
|
2898
|
+
map: Kt,
|
|
2899
|
+
nan: Zt,
|
|
2900
|
+
nativeEnum: nn,
|
|
2901
|
+
never: Vt,
|
|
2902
|
+
null: Dt,
|
|
2903
|
+
nullable: an,
|
|
2904
|
+
number: Qe,
|
|
2905
|
+
object: Bt,
|
|
2906
|
+
oboolean: un,
|
|
2907
|
+
onumber: ln,
|
|
2908
|
+
optional: sn,
|
|
2909
|
+
ostring: dn,
|
|
2910
|
+
pipeline: cn,
|
|
2911
|
+
preprocess: on,
|
|
2912
|
+
promise: rn,
|
|
2913
|
+
record: Yt,
|
|
2914
|
+
set: Jt,
|
|
2915
|
+
strictObject: Wt,
|
|
2916
|
+
string: Je,
|
|
2917
|
+
symbol: Pt,
|
|
2918
|
+
transformer: Be,
|
|
2919
|
+
tuple: Ft,
|
|
2920
|
+
undefined: Mt,
|
|
2921
|
+
union: Gt,
|
|
2922
|
+
unknown: $t,
|
|
2923
|
+
void: Lt,
|
|
2924
|
+
NEVER: hn,
|
|
2925
2925
|
ZodIssueCode: d,
|
|
2926
|
-
quotelessJson:
|
|
2926
|
+
quotelessJson: ut,
|
|
2927
2927
|
ZodError: T
|
|
2928
2928
|
});
|
|
2929
|
-
|
|
2930
|
-
const
|
|
2929
|
+
lt(r);
|
|
2930
|
+
const Wn = r.object({
|
|
2931
2931
|
start: r.number(),
|
|
2932
2932
|
limit: r.number(),
|
|
2933
2933
|
length: r.number()
|
|
2934
|
-
}),
|
|
2934
|
+
}), Me = r.object({
|
|
2935
2935
|
created_at: r.string(),
|
|
2936
2936
|
updated_at: r.string()
|
|
2937
|
-
}),
|
|
2937
|
+
}), fn = r.object({
|
|
2938
2938
|
email: r.string().optional(),
|
|
2939
2939
|
email_verified: r.boolean().optional(),
|
|
2940
2940
|
name: r.string().optional(),
|
|
@@ -2943,7 +2943,7 @@ const qn = r.object({
|
|
|
2943
2943
|
phone_number: r.string().optional(),
|
|
2944
2944
|
phone_verified: r.boolean().optional(),
|
|
2945
2945
|
family_name: r.string().optional()
|
|
2946
|
-
}).catchall(r.any()),
|
|
2946
|
+
}).catchall(r.any()), mn = r.object({
|
|
2947
2947
|
connection: r.string(),
|
|
2948
2948
|
user_id: r.string(),
|
|
2949
2949
|
provider: r.string(),
|
|
@@ -2951,8 +2951,8 @@ const qn = r.object({
|
|
|
2951
2951
|
access_token: r.string().optional(),
|
|
2952
2952
|
access_token_secret: r.string().optional(),
|
|
2953
2953
|
refresh_token: r.string().optional(),
|
|
2954
|
-
profileData:
|
|
2955
|
-
}),
|
|
2954
|
+
profileData: fn.optional()
|
|
2955
|
+
}), et = r.object({
|
|
2956
2956
|
email: r.string().optional(),
|
|
2957
2957
|
username: r.string().optional(),
|
|
2958
2958
|
given_name: r.string().optional(),
|
|
@@ -2964,7 +2964,7 @@ const qn = r.object({
|
|
|
2964
2964
|
linked_to: r.string().optional(),
|
|
2965
2965
|
profileData: r.string().optional(),
|
|
2966
2966
|
user_id: r.string().optional()
|
|
2967
|
-
}),
|
|
2967
|
+
}), _n = et.extend({
|
|
2968
2968
|
email_verified: r.boolean().default(!1),
|
|
2969
2969
|
verify_email: r.boolean().optional(),
|
|
2970
2970
|
last_ip: r.string().optional(),
|
|
@@ -2972,21 +2972,21 @@ const qn = r.object({
|
|
|
2972
2972
|
user_id: r.string().optional(),
|
|
2973
2973
|
provider: r.string().default("email"),
|
|
2974
2974
|
connection: r.string().default("email")
|
|
2975
|
-
}),
|
|
2975
|
+
}), gn = _n.extend(Me.shape).extend({
|
|
2976
2976
|
user_id: r.string(),
|
|
2977
2977
|
// TODO: this not might be correct if you use the username
|
|
2978
2978
|
email: r.string(),
|
|
2979
2979
|
is_social: r.boolean(),
|
|
2980
2980
|
login_count: r.number(),
|
|
2981
|
-
identities: r.array(
|
|
2982
|
-
}),
|
|
2981
|
+
identities: r.array(mn).optional()
|
|
2982
|
+
}), Gn = gn, Hn = et.extend({
|
|
2983
2983
|
email: r.string(),
|
|
2984
2984
|
login_count: r.number(),
|
|
2985
2985
|
multifactor: r.array(r.string()).optional(),
|
|
2986
2986
|
last_ip: r.string().optional(),
|
|
2987
2987
|
last_login: r.string().optional(),
|
|
2988
2988
|
user_id: r.string()
|
|
2989
|
-
}).catchall(r.any()),
|
|
2989
|
+
}).catchall(r.any()), yn = r.object({
|
|
2990
2990
|
audience: r.string().optional(),
|
|
2991
2991
|
recipient: r.string().optional(),
|
|
2992
2992
|
createUpnClaim: r.boolean().optional(),
|
|
@@ -3003,7 +3003,7 @@ const qn = r.object({
|
|
|
3003
3003
|
nameIdentifierProbes: r.array(r.string()).optional(),
|
|
3004
3004
|
authnContextClassRef: r.string().optional(),
|
|
3005
3005
|
mappings: r.record(r.string()).optional()
|
|
3006
|
-
}),
|
|
3006
|
+
}), vn = r.object({
|
|
3007
3007
|
id: r.string(),
|
|
3008
3008
|
name: r.string(),
|
|
3009
3009
|
callbacks: r.array(r.string()).openapi({
|
|
@@ -3019,7 +3019,7 @@ const qn = r.object({
|
|
|
3019
3019
|
description: "Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains."
|
|
3020
3020
|
}),
|
|
3021
3021
|
addons: r.object({
|
|
3022
|
-
samlp:
|
|
3022
|
+
samlp: yn.optional()
|
|
3023
3023
|
}).optional().openapi({
|
|
3024
3024
|
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."
|
|
3025
3025
|
}),
|
|
@@ -3030,26 +3030,26 @@ const qn = r.object({
|
|
|
3030
3030
|
disable_sign_ups: r.boolean().default(!1).openapi({
|
|
3031
3031
|
description: "Prevents users from signing up using the hosted login page. This is not available in auth0"
|
|
3032
3032
|
})
|
|
3033
|
-
}),
|
|
3033
|
+
}), bn = r.object({
|
|
3034
3034
|
created_at: r.string().transform((t) => t === null ? "" : t),
|
|
3035
3035
|
updated_at: r.string().transform((t) => t === null ? "" : t),
|
|
3036
|
-
...
|
|
3036
|
+
...vn.shape
|
|
3037
3037
|
});
|
|
3038
|
-
var
|
|
3039
|
-
const
|
|
3038
|
+
var tt = /* @__PURE__ */ ((t) => (t.TOKEN = "token", t.TOKEN_ID_TOKEN = "token id_token", t.CODE = "code", t))(tt || {}), nt = /* @__PURE__ */ ((t) => (t.QUERY = "query", t.FRAGMENT = "fragment", t.FORM_POST = "form_post", t.WEB_MESSAGE = "web_message", t.SAML_POST = "saml_post", t))(nt || {}), rt = /* @__PURE__ */ ((t) => (t.S265 = "S256", t.plain = "plain", t))(rt || {});
|
|
3039
|
+
const kn = r.object({
|
|
3040
3040
|
client_id: r.string(),
|
|
3041
3041
|
vendor_id: r.string().optional(),
|
|
3042
|
-
response_type: r.nativeEnum(
|
|
3043
|
-
response_mode: r.nativeEnum(
|
|
3042
|
+
response_type: r.nativeEnum(tt).optional(),
|
|
3043
|
+
response_mode: r.nativeEnum(nt).optional(),
|
|
3044
3044
|
redirect_uri: r.string().optional(),
|
|
3045
3045
|
audience: r.string().optional(),
|
|
3046
3046
|
state: r.string().optional(),
|
|
3047
3047
|
nonce: r.string().optional(),
|
|
3048
3048
|
scope: r.string().optional(),
|
|
3049
|
-
code_challenge_method: r.nativeEnum(
|
|
3049
|
+
code_challenge_method: r.nativeEnum(rt).optional(),
|
|
3050
3050
|
code_challenge: r.string().optional(),
|
|
3051
3051
|
username: r.string().optional()
|
|
3052
|
-
}),
|
|
3052
|
+
}), qn = r.object({
|
|
3053
3053
|
colors: r.object({
|
|
3054
3054
|
primary: r.string(),
|
|
3055
3055
|
page_background: r.object({
|
|
@@ -3098,7 +3098,7 @@ const we = r.object({
|
|
|
3098
3098
|
updated_at: r.string().transform((t) => t === null ? "" : t),
|
|
3099
3099
|
id: r.string(),
|
|
3100
3100
|
...Sn.shape
|
|
3101
|
-
}),
|
|
3101
|
+
}), Fn = r.object({
|
|
3102
3102
|
logoUrl: r.string(),
|
|
3103
3103
|
loginBackgroundImage: r.string().nullish(),
|
|
3104
3104
|
style: r.object({
|
|
@@ -3115,7 +3115,7 @@ const we = r.object({
|
|
|
3115
3115
|
checkoutHideSocial: r.boolean().optional(),
|
|
3116
3116
|
siteUrl: r.string().nullable(),
|
|
3117
3117
|
manageSubscriptionsUrl: r.string().optional()
|
|
3118
|
-
}),
|
|
3118
|
+
}), En = r.object({
|
|
3119
3119
|
domain: r.string(),
|
|
3120
3120
|
dkim_private_key: r.string().optional(),
|
|
3121
3121
|
dkim_public_key: r.string().optional(),
|
|
@@ -3123,12 +3123,12 @@ const we = r.object({
|
|
|
3123
3123
|
email_service: r.union([r.literal("mailgun"), r.literal("mailchannels")]).optional()
|
|
3124
3124
|
});
|
|
3125
3125
|
r.object({
|
|
3126
|
-
...
|
|
3127
|
-
domains: r.array(
|
|
3126
|
+
...bn.shape,
|
|
3127
|
+
domains: r.array(En),
|
|
3128
3128
|
tenant: Tn,
|
|
3129
3129
|
connections: r.array(wn)
|
|
3130
3130
|
});
|
|
3131
|
-
const
|
|
3131
|
+
const Cn = r.enum([
|
|
3132
3132
|
"password_reset",
|
|
3133
3133
|
"email_verification",
|
|
3134
3134
|
"otp",
|
|
@@ -3145,11 +3145,11 @@ const En = r.enum([
|
|
|
3145
3145
|
connection_id: r.string().optional().openapi({
|
|
3146
3146
|
description: "The connection that the code is connected to"
|
|
3147
3147
|
}),
|
|
3148
|
-
code_type:
|
|
3148
|
+
code_type: Cn,
|
|
3149
3149
|
expires_at: r.string(),
|
|
3150
3150
|
used_at: r.string().optional(),
|
|
3151
3151
|
user_id: r.string().optional()
|
|
3152
|
-
}),
|
|
3152
|
+
}), Yn = r.object({
|
|
3153
3153
|
...On.shape,
|
|
3154
3154
|
created_at: r.string()
|
|
3155
3155
|
}), jn = r.object({
|
|
@@ -3158,7 +3158,7 @@ const En = r.enum([
|
|
|
3158
3158
|
dkim_public_key: r.string().optional(),
|
|
3159
3159
|
email_api_key: r.string().optional(),
|
|
3160
3160
|
email_service: r.enum(["mailgun", "mailchannels"])
|
|
3161
|
-
}),
|
|
3161
|
+
}), Kn = Me.extend({
|
|
3162
3162
|
...jn.shape,
|
|
3163
3163
|
id: r.string()
|
|
3164
3164
|
}), In = r.object({
|
|
@@ -3172,8 +3172,8 @@ const En = r.enum([
|
|
|
3172
3172
|
hook_id: r.string().optional(),
|
|
3173
3173
|
synchronous: r.boolean().default(!1),
|
|
3174
3174
|
priority: r.number().optional()
|
|
3175
|
-
}),
|
|
3176
|
-
...
|
|
3175
|
+
}), Jn = In.extend({
|
|
3176
|
+
...Me.shape,
|
|
3177
3177
|
hook_id: r.string()
|
|
3178
3178
|
}), Nn = r.object({
|
|
3179
3179
|
alg: r.string(),
|
|
@@ -3182,9 +3182,9 @@ const En = r.enum([
|
|
|
3182
3182
|
kty: r.string(),
|
|
3183
3183
|
n: r.string(),
|
|
3184
3184
|
use: r.string().optional()
|
|
3185
|
-
}),
|
|
3185
|
+
}), Qn = r.object({
|
|
3186
3186
|
keys: r.array(Nn)
|
|
3187
|
-
}),
|
|
3187
|
+
}), Xn = r.object({
|
|
3188
3188
|
issuer: r.string(),
|
|
3189
3189
|
authorization_endpoint: r.string(),
|
|
3190
3190
|
token_endpoint: r.string(),
|
|
@@ -3207,13 +3207,13 @@ const En = r.enum([
|
|
|
3207
3207
|
token_endpoint_auth_signing_alg_values_supported: r.array(r.string())
|
|
3208
3208
|
}), Zn = r.object({
|
|
3209
3209
|
auth0Client: r.string().optional(),
|
|
3210
|
-
authParams:
|
|
3210
|
+
authParams: kn,
|
|
3211
3211
|
expires_at: r.string(),
|
|
3212
3212
|
deleted_at: r.string().optional(),
|
|
3213
3213
|
ip: r.string().optional()
|
|
3214
3214
|
}).openapi({
|
|
3215
3215
|
description: "This represents a login sesion"
|
|
3216
|
-
}),
|
|
3216
|
+
}), er = r.object({
|
|
3217
3217
|
...Zn.shape,
|
|
3218
3218
|
login_id: r.string().openapi({
|
|
3219
3219
|
description: "This is is used as the state in the universal login"
|
|
@@ -3277,7 +3277,7 @@ const An = r.enum([
|
|
|
3277
3277
|
env: r.object({
|
|
3278
3278
|
node: r.string().optional()
|
|
3279
3279
|
}).optional()
|
|
3280
|
-
}),
|
|
3280
|
+
}), tr = r.object({
|
|
3281
3281
|
type: An,
|
|
3282
3282
|
date: r.string(),
|
|
3283
3283
|
description: r.string().optional(),
|
|
@@ -3304,7 +3304,7 @@ const An = r.enum([
|
|
|
3304
3304
|
user_id: r.string(),
|
|
3305
3305
|
password: r.string(),
|
|
3306
3306
|
algorithm: r.enum(["bcrypt", "argon2id"]).default("argon2id")
|
|
3307
|
-
}),
|
|
3307
|
+
}), nr = r.object({
|
|
3308
3308
|
...Mn.shape,
|
|
3309
3309
|
created_at: r.string(),
|
|
3310
3310
|
updated_at: r.string()
|
|
@@ -3315,16 +3315,16 @@ const An = r.enum([
|
|
|
3315
3315
|
used_at: r.string(),
|
|
3316
3316
|
deleted_at: r.string().optional(),
|
|
3317
3317
|
user_id: r.string()
|
|
3318
|
-
}),
|
|
3318
|
+
}), rr = r.object({
|
|
3319
3319
|
created_at: r.string(),
|
|
3320
3320
|
...Dn.shape
|
|
3321
|
-
}),
|
|
3322
|
-
private_key: r.string(),
|
|
3323
|
-
public_key: r.string(),
|
|
3321
|
+
}), sr = r.object({
|
|
3322
|
+
private_key: r.string().optional(),
|
|
3323
|
+
public_key: r.string().optional(),
|
|
3324
3324
|
kid: r.string(),
|
|
3325
|
-
created_at: r.string(),
|
|
3325
|
+
created_at: r.string().optional(),
|
|
3326
3326
|
revoked_at: r.string().optional()
|
|
3327
|
-
}),
|
|
3327
|
+
}), ar = r.object({
|
|
3328
3328
|
kid: r.string().openapi({ description: "The key id of the signing key" }),
|
|
3329
3329
|
cert: r.string().openapi({ description: "The public certificate of the signing key" }),
|
|
3330
3330
|
fingerprint: r.string().openapi({ description: "The cert fingerprint" }),
|
|
@@ -3344,17 +3344,17 @@ const An = r.enum([
|
|
|
3344
3344
|
revoked: r.boolean().optional().openapi({ description: "True if the key is revoked" }),
|
|
3345
3345
|
revoked_at: r.string().optional().openapi({ description: "The date and time when the key was revoked" })
|
|
3346
3346
|
});
|
|
3347
|
-
var
|
|
3348
|
-
const
|
|
3349
|
-
grant_type:
|
|
3347
|
+
var st = /* @__PURE__ */ ((t) => (t.RefreshToken = "refresh_token", t.AuthorizationCode = "authorization_code", t.ClientCredential = "client_credentials", t.Passwordless = "passwordless", t.Password = "password", t))(st || {});
|
|
3348
|
+
const De = r.nativeEnum(st), ir = r.object({
|
|
3349
|
+
grant_type: De.refine(
|
|
3350
3350
|
(t) => t === "authorization_code"
|
|
3351
3351
|
/* AuthorizationCode */
|
|
3352
3352
|
),
|
|
3353
3353
|
code: r.string(),
|
|
3354
3354
|
client_secret: r.string(),
|
|
3355
3355
|
client_id: r.string()
|
|
3356
|
-
}),
|
|
3357
|
-
grant_type:
|
|
3356
|
+
}), or = r.object({
|
|
3357
|
+
grant_type: De.refine(
|
|
3358
3358
|
(t) => t === "authorization_code"
|
|
3359
3359
|
/* AuthorizationCode */
|
|
3360
3360
|
),
|
|
@@ -3362,8 +3362,8 @@ const Ue = r.nativeEnum(at), dr = r.object({
|
|
|
3362
3362
|
code_verifier: r.string(),
|
|
3363
3363
|
client_id: r.string().optional(),
|
|
3364
3364
|
redirect_uri: r.string()
|
|
3365
|
-
}),
|
|
3366
|
-
grant_type:
|
|
3365
|
+
}), cr = r.object({
|
|
3366
|
+
grant_type: De.refine(
|
|
3367
3367
|
(t) => t === "client_credentials"
|
|
3368
3368
|
/* ClientCredential */
|
|
3369
3369
|
),
|
|
@@ -3445,42 +3445,10 @@ const Un = r.object({
|
|
|
3445
3445
|
fonts: Vn,
|
|
3446
3446
|
page_background: Ln,
|
|
3447
3447
|
widget: zn
|
|
3448
|
-
}),
|
|
3448
|
+
}), dr = Bn.extend({
|
|
3449
3449
|
themeId: r.string()
|
|
3450
|
-
}), Wn = r.object({
|
|
3451
|
-
id: r.string(),
|
|
3452
|
-
expires_at: r.string(),
|
|
3453
|
-
auth0Client: r.string().optional(),
|
|
3454
|
-
authParams: we
|
|
3455
|
-
}), hr = r.object({
|
|
3456
|
-
...Wn.shape,
|
|
3457
|
-
created_at: r.string(),
|
|
3458
|
-
updated_at: r.string()
|
|
3459
|
-
}), Gn = r.object({
|
|
3460
|
-
id: r.string(),
|
|
3461
|
-
email: r.string(),
|
|
3462
|
-
code: r.string(),
|
|
3463
|
-
ip: r.string().optional(),
|
|
3464
|
-
send: r.enum(["code", "link"]),
|
|
3465
|
-
authParams: we,
|
|
3466
|
-
expires_at: r.string(),
|
|
3467
|
-
used_at: r.string().optional(),
|
|
3468
|
-
user_id: r.string().optional()
|
|
3469
|
-
}), fr = r.object({
|
|
3470
|
-
created_at: r.string(),
|
|
3471
|
-
...Gn.shape
|
|
3472
|
-
}), Hn = r.object({
|
|
3473
|
-
authParams: we,
|
|
3474
|
-
code: r.string(),
|
|
3475
|
-
user_id: r.string(),
|
|
3476
|
-
created_at: r.string(),
|
|
3477
|
-
expires_at: r.string(),
|
|
3478
|
-
used_at: r.string().optional()
|
|
3479
|
-
}), mr = r.object({
|
|
3480
|
-
...Hn.shape,
|
|
3481
|
-
created_at: r.string()
|
|
3482
3450
|
});
|
|
3483
|
-
function
|
|
3451
|
+
function lr(t) {
|
|
3484
3452
|
const [e, n] = t.split("|");
|
|
3485
3453
|
if (!e || !n)
|
|
3486
3454
|
throw new Error(`Invalid user_id: ${t}`);
|
|
@@ -3488,64 +3456,58 @@ function _r(t) {
|
|
|
3488
3456
|
}
|
|
3489
3457
|
export {
|
|
3490
3458
|
Pn as Auth0Client,
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3459
|
+
nt as AuthorizationResponseMode,
|
|
3460
|
+
tt as AuthorizationResponseType,
|
|
3461
|
+
rt as CodeChallengeMethod,
|
|
3462
|
+
st as GrantType,
|
|
3495
3463
|
Rn as LogTypes,
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
dr as authorizationCodeGrantTypeParamsSchema,
|
|
3503
|
-
tt as baseUserSchema,
|
|
3464
|
+
vn as applicationInsertSchema,
|
|
3465
|
+
bn as applicationSchema,
|
|
3466
|
+
Gn as auth0UserResponseSchema,
|
|
3467
|
+
kn as authParamsSchema,
|
|
3468
|
+
ir as authorizationCodeGrantTypeParamsSchema,
|
|
3469
|
+
et as baseUserSchema,
|
|
3504
3470
|
Un as bordersSchema,
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3471
|
+
qn as brandingSchema,
|
|
3472
|
+
sr as certificateSchema,
|
|
3473
|
+
cr as clientCredentialGrantTypeParamsSchema,
|
|
3508
3474
|
On as codeInsertSchema,
|
|
3509
|
-
|
|
3510
|
-
|
|
3475
|
+
Yn as codeSchema,
|
|
3476
|
+
Cn as codeTypeSchema,
|
|
3511
3477
|
$n as colorsSchema,
|
|
3512
3478
|
xn as connectionInsertSchema,
|
|
3513
3479
|
wn as connectionSchema,
|
|
3514
3480
|
jn as domainInsertSchema,
|
|
3515
|
-
|
|
3481
|
+
Kn as domainSchema,
|
|
3516
3482
|
W as fontDetailsSchema,
|
|
3517
3483
|
Vn as fontsSchema,
|
|
3518
3484
|
In as hookInsertSchema,
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3485
|
+
Jn as hookSchema,
|
|
3486
|
+
mn as identitySchema,
|
|
3487
|
+
Qn as jwksKeySchema,
|
|
3522
3488
|
Nn as jwksSchema,
|
|
3523
|
-
|
|
3489
|
+
tr as logSchema,
|
|
3524
3490
|
Zn as loginInsertSchema,
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
Gn as otpInsertSchema,
|
|
3528
|
-
fr as otpSchema,
|
|
3491
|
+
er as loginSchema,
|
|
3492
|
+
Xn as openIDConfigurationSchema,
|
|
3529
3493
|
Ln as pageBackgroundSchema,
|
|
3530
|
-
|
|
3494
|
+
lr as parseUserId,
|
|
3531
3495
|
Mn as passwordInsertSchema,
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3496
|
+
nr as passwordSchema,
|
|
3497
|
+
or as pkceAuthorizationCodeGrantTypeParamsSchema,
|
|
3498
|
+
fn as profileDataSchema,
|
|
3499
|
+
yn as samlpAddon,
|
|
3536
3500
|
Dn as sessionInsertSchema,
|
|
3537
|
-
|
|
3538
|
-
|
|
3501
|
+
rr as sessionSchema,
|
|
3502
|
+
ar as signingKeySchema,
|
|
3539
3503
|
Sn as tenantInsertSchema,
|
|
3540
3504
|
Tn as tenantSchema,
|
|
3541
3505
|
Bn as themeInsertSchema,
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
gn as
|
|
3547
|
-
|
|
3548
|
-
yn as userSchema,
|
|
3549
|
-
Jn as vendorSettingsSchema,
|
|
3506
|
+
dr as themeSchema,
|
|
3507
|
+
Wn as totalsSchema,
|
|
3508
|
+
_n as userInsertSchema,
|
|
3509
|
+
Hn as userResponseSchema,
|
|
3510
|
+
gn as userSchema,
|
|
3511
|
+
Fn as vendorSettingsSchema,
|
|
3550
3512
|
zn as widgetSchema
|
|
3551
3513
|
};
|