@authhero/kysely-adapter 10.34.0 → 10.36.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.
- package/dist/kysely-adapter.cjs +1 -1
- package/dist/kysely-adapter.d.ts +23 -0
- package/dist/kysely-adapter.mjs +747 -670
- package/package.json +3 -3
package/dist/kysely-adapter.mjs
CHANGED
|
@@ -3,11 +3,11 @@ var ue = (t) => {
|
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
5
|
var Re = (t, e, r) => e in t ? Je(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
6
|
-
var z = (t, e, r) => Re(t, typeof e != "symbol" ? e + "" : e, r),
|
|
7
|
-
var d = (t, e, r) => (
|
|
8
|
-
import { parseUserId as
|
|
6
|
+
var z = (t, e, r) => Re(t, typeof e != "symbol" ? e + "" : e, r), V = (t, e, r) => e.has(t) || ue("Cannot " + r);
|
|
7
|
+
var d = (t, e, r) => (V(t, e, "read from private field"), r ? r.call(t) : e.get(t)), N = (t, e, r) => e.has(t) ? ue("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), L = (t, e, r, a) => (V(t, e, "write to private field"), a ? a.call(t, r) : e.set(t, r), r), m = (t, e, r) => (V(t, e, "access private method"), r);
|
|
8
|
+
import { parseUserId as ae, codeSchema as Ke, connectionSchema as Ue, loginSessionSchema as Be, promptSettingSchema as Qe, formSchema as Q, resourceServerSchema as qe } from "@authhero/adapter-interfaces";
|
|
9
9
|
import "@hono/zod-openapi";
|
|
10
|
-
var
|
|
10
|
+
var Y = class extends Error {
|
|
11
11
|
constructor(e = 500, r) {
|
|
12
12
|
super(r == null ? void 0 : r.message, { cause: r == null ? void 0 : r.cause });
|
|
13
13
|
z(this, "res");
|
|
@@ -39,7 +39,7 @@ function Ve(t) {
|
|
|
39
39
|
try {
|
|
40
40
|
await t.insertInto("users").values(n).execute();
|
|
41
41
|
} catch (s) {
|
|
42
|
-
throw s.code === "SQLITE_CONSTRAINT_UNIQUE" || s.message.includes("AlreadyExists") ? new
|
|
42
|
+
throw s.code === "SQLITE_CONSTRAINT_UNIQUE" || s.message.includes("AlreadyExists") ? new Y(409, { message: "User already exists" }) : new Y(500, { message: `${s.code}, ${s.message}` });
|
|
43
43
|
}
|
|
44
44
|
return {
|
|
45
45
|
...n,
|
|
@@ -50,10 +50,23 @@ function Ve(t) {
|
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function f(t) {
|
|
54
|
+
if (t == null || typeof t != "object")
|
|
55
|
+
return t;
|
|
56
|
+
if (Array.isArray(t))
|
|
57
|
+
return t.map(
|
|
58
|
+
(r) => (
|
|
59
|
+
// Only recurse into objects; leave primitives untouched
|
|
60
|
+
r !== null && typeof r == "object" ? f(r) : r
|
|
61
|
+
)
|
|
62
|
+
);
|
|
54
63
|
const e = { ...t };
|
|
55
|
-
for (const r in e)
|
|
56
|
-
|
|
64
|
+
for (const r in e) {
|
|
65
|
+
const a = e[r];
|
|
66
|
+
a === null ? delete e[r] : a !== null && typeof a == "object" && (Array.isArray(a) ? e[r] = a.map(
|
|
67
|
+
(o) => o !== null && typeof o == "object" ? f(o) : o
|
|
68
|
+
) : e[r] = f(a));
|
|
69
|
+
}
|
|
57
70
|
return e;
|
|
58
71
|
}
|
|
59
72
|
function pe(t) {
|
|
@@ -66,7 +79,7 @@ function pe(t) {
|
|
|
66
79
|
return {
|
|
67
80
|
connection: t.connection,
|
|
68
81
|
provider: t.provider,
|
|
69
|
-
user_id:
|
|
82
|
+
user_id: ae(t.user_id).id,
|
|
70
83
|
isSocial: !!t.is_social,
|
|
71
84
|
profileData: {
|
|
72
85
|
email: t.email,
|
|
@@ -94,13 +107,13 @@ function We(t) {
|
|
|
94
107
|
{
|
|
95
108
|
connection: a.connection,
|
|
96
109
|
provider: a.provider,
|
|
97
|
-
user_id:
|
|
110
|
+
user_id: ae(a.user_id).id,
|
|
98
111
|
isSocial: !!a.is_social
|
|
99
112
|
},
|
|
100
113
|
...o.map(pe)
|
|
101
114
|
]
|
|
102
115
|
};
|
|
103
|
-
return
|
|
116
|
+
return f(l);
|
|
104
117
|
};
|
|
105
118
|
}
|
|
106
119
|
function C(t, e, r, a) {
|
|
@@ -167,7 +180,7 @@ function Ge(t) {
|
|
|
167
180
|
const h = l.filter(
|
|
168
181
|
(g) => g.linked_to === u.user_id
|
|
169
182
|
);
|
|
170
|
-
return
|
|
183
|
+
return f({
|
|
171
184
|
...u,
|
|
172
185
|
email_verified: u.email_verified === 1,
|
|
173
186
|
is_social: u.is_social === 1,
|
|
@@ -177,7 +190,7 @@ function Ge(t) {
|
|
|
177
190
|
{
|
|
178
191
|
connection: u.connection,
|
|
179
192
|
provider: u.provider,
|
|
180
|
-
user_id:
|
|
193
|
+
user_id: ae(u.user_id).id,
|
|
181
194
|
isSocial: !!u.is_social
|
|
182
195
|
},
|
|
183
196
|
...h.map(pe)
|
|
@@ -221,7 +234,7 @@ function ge(t, e) {
|
|
|
221
234
|
}
|
|
222
235
|
return r;
|
|
223
236
|
}
|
|
224
|
-
function
|
|
237
|
+
function Ye(t) {
|
|
225
238
|
return async (e, r, a) => {
|
|
226
239
|
const o = A({
|
|
227
240
|
...a,
|
|
@@ -232,7 +245,7 @@ function Xe(t) {
|
|
|
232
245
|
return (await t.updateTable("users").set(o).where("users.tenant_id", "=", e).where("users.user_id", "=", r).execute()).length === 1;
|
|
233
246
|
};
|
|
234
247
|
}
|
|
235
|
-
function
|
|
248
|
+
function Xe(t) {
|
|
236
249
|
return async (e, r, a, o) => {
|
|
237
250
|
const n = { linked_to: null };
|
|
238
251
|
return (await t.updateTable("users").set(n).where("users.tenant_id", "=", e).where("users.user_id", "=", `${a}|${o}`).where("users.linked_to", "=", `${r}`).execute()).length === 1;
|
|
@@ -244,9 +257,9 @@ function Ze(t) {
|
|
|
244
257
|
remove: He(t),
|
|
245
258
|
get: We(t),
|
|
246
259
|
list: Ge(t),
|
|
247
|
-
update:
|
|
260
|
+
update: Ye(t),
|
|
248
261
|
// TODO - think about this more when other issues fixed
|
|
249
|
-
unlink:
|
|
262
|
+
unlink: Xe(t)
|
|
250
263
|
};
|
|
251
264
|
}
|
|
252
265
|
const et = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
@@ -270,7 +283,7 @@ function tt(t) {
|
|
|
270
283
|
function rt(t) {
|
|
271
284
|
return async (e) => {
|
|
272
285
|
const r = await t.selectFrom("tenants").where("tenants.id", "=", e).selectAll().executeTakeFirst();
|
|
273
|
-
return r ?
|
|
286
|
+
return r ? f(r) : null;
|
|
274
287
|
};
|
|
275
288
|
}
|
|
276
289
|
function at(t) {
|
|
@@ -292,7 +305,7 @@ function at(t) {
|
|
|
292
305
|
};
|
|
293
306
|
const { count: n } = await r.select((l) => l.fn.countAll().as("count")).executeTakeFirstOrThrow(), s = v(n);
|
|
294
307
|
return {
|
|
295
|
-
tenants: o.map(
|
|
308
|
+
tenants: o.map(f),
|
|
296
309
|
start: (e.page - 1) * e.per_page,
|
|
297
310
|
limit: e.per_page,
|
|
298
311
|
length: s
|
|
@@ -536,7 +549,7 @@ function Ct(t) {
|
|
|
536
549
|
return {
|
|
537
550
|
codes: n.map((c) => {
|
|
538
551
|
const { tenant_id: _, ...u } = c;
|
|
539
|
-
return Ke.parse(
|
|
552
|
+
return Ke.parse(f(u));
|
|
540
553
|
}),
|
|
541
554
|
start: r.page * r.per_page,
|
|
542
555
|
limit: r.per_page,
|
|
@@ -564,7 +577,7 @@ function Tt(t) {
|
|
|
564
577
|
let o = t.selectFrom("codes").where("codes.code_id", "=", r).where("codes.code_type", "=", a);
|
|
565
578
|
e.length && (o = o.where("codes.tenant_id", "=", e));
|
|
566
579
|
const n = await o.selectAll().executeTakeFirst();
|
|
567
|
-
return n ?
|
|
580
|
+
return n ? f(n) : null;
|
|
568
581
|
};
|
|
569
582
|
}
|
|
570
583
|
function St(t) {
|
|
@@ -617,7 +630,7 @@ function $t(t) {
|
|
|
617
630
|
function It(t) {
|
|
618
631
|
return async (e, r) => {
|
|
619
632
|
const a = await t.selectFrom("applications").where("applications.tenant_id", "=", e).where("applications.id", "=", r).selectAll().executeTakeFirst();
|
|
620
|
-
return a ?
|
|
633
|
+
return a ? f({
|
|
621
634
|
...a,
|
|
622
635
|
disable_sign_ups: !!a.disable_sign_ups,
|
|
623
636
|
addons: JSON.parse(a.addons),
|
|
@@ -681,7 +694,7 @@ function Mt(t) {
|
|
|
681
694
|
let a = t.selectFrom("connections").where("connections.tenant_id", "=", e);
|
|
682
695
|
r.q && (a = C(t, a, r.q, ["user_id", "ip"]));
|
|
683
696
|
const s = (await a.offset(r.page * r.per_page).limit(r.per_page).selectAll().execute()).map(
|
|
684
|
-
(c) =>
|
|
697
|
+
(c) => f({
|
|
685
698
|
...c,
|
|
686
699
|
options: JSON.parse(c.options)
|
|
687
700
|
})
|
|
@@ -700,7 +713,7 @@ function At(t) {
|
|
|
700
713
|
function zt(t) {
|
|
701
714
|
return async (e, r) => {
|
|
702
715
|
const a = await t.selectFrom("connections").where("connections.tenant_id", "=", e).where("connections.id", "=", r).selectAll().executeTakeFirst();
|
|
703
|
-
return a ?
|
|
716
|
+
return a ? f({
|
|
704
717
|
...a,
|
|
705
718
|
options: JSON.parse(a.options)
|
|
706
719
|
}) : null;
|
|
@@ -735,13 +748,13 @@ function Jt(t) {
|
|
|
735
748
|
return null;
|
|
736
749
|
const a = await t.selectFrom("tenants").selectAll().where("id", "=", r.tenant_id).executeTakeFirst();
|
|
737
750
|
if (!a)
|
|
738
|
-
throw new
|
|
751
|
+
throw new Y(404, { message: "Tenant not found" });
|
|
739
752
|
const o = await t.selectFrom("connections").where("tenant_id", "=", r.tenant_id).selectAll().execute();
|
|
740
753
|
return {
|
|
741
754
|
...r,
|
|
742
755
|
connections: o.map(
|
|
743
756
|
(s) => Ue.parse(
|
|
744
|
-
|
|
757
|
+
f({
|
|
745
758
|
...s,
|
|
746
759
|
options: s.options ? JSON.parse(s.options) : {}
|
|
747
760
|
})
|
|
@@ -753,7 +766,7 @@ function Jt(t) {
|
|
|
753
766
|
web_origins: r.web_origins ? JSON.parse(r.web_origins) : [],
|
|
754
767
|
allowed_logout_urls: r.allowed_logout_urls ? JSON.parse(r.allowed_logout_urls) : [],
|
|
755
768
|
allowed_clients: r.allowed_clients ? JSON.parse(r.allowed_clients) : [],
|
|
756
|
-
tenant:
|
|
769
|
+
tenant: f(a),
|
|
757
770
|
// this is really an integer in the database
|
|
758
771
|
disable_sign_ups: !!r.disable_sign_ups
|
|
759
772
|
};
|
|
@@ -837,7 +850,7 @@ function Ht(t) {
|
|
|
837
850
|
} : null;
|
|
838
851
|
};
|
|
839
852
|
}
|
|
840
|
-
function
|
|
853
|
+
function Yt(t) {
|
|
841
854
|
return {
|
|
842
855
|
create: Qt(t),
|
|
843
856
|
get: Wt(t),
|
|
@@ -847,7 +860,7 @@ function Xt(t) {
|
|
|
847
860
|
update: Gt(t)
|
|
848
861
|
};
|
|
849
862
|
}
|
|
850
|
-
function
|
|
863
|
+
function Xt(t) {
|
|
851
864
|
return async (e) => {
|
|
852
865
|
const [r] = await t.selectFrom("branding").where("branding.tenant_id", "=", e).selectAll().execute();
|
|
853
866
|
if (!r)
|
|
@@ -862,7 +875,7 @@ function Yt(t) {
|
|
|
862
875
|
font_url: _,
|
|
863
876
|
...u
|
|
864
877
|
} = r;
|
|
865
|
-
return
|
|
878
|
+
return f({
|
|
866
879
|
...u,
|
|
867
880
|
colors: {
|
|
868
881
|
primary: o,
|
|
@@ -879,7 +892,7 @@ function Yt(t) {
|
|
|
879
892
|
}
|
|
880
893
|
function Zt(t) {
|
|
881
894
|
return async (e, r) => {
|
|
882
|
-
var s, l, c, _, u, h, g, I, D, O,
|
|
895
|
+
var s, l, c, _, u, h, g, I, D, O, U, ne, oe, se, ie, le, ce, de;
|
|
883
896
|
const { colors: a, font: o, ...n } = r;
|
|
884
897
|
try {
|
|
885
898
|
await t.insertInto("branding").values({
|
|
@@ -896,7 +909,7 @@ function Zt(t) {
|
|
|
896
909
|
await t.updateTable("branding").set({
|
|
897
910
|
...n,
|
|
898
911
|
colors_primary: a == null ? void 0 : a.primary,
|
|
899
|
-
colors_page_background_type: (
|
|
912
|
+
colors_page_background_type: (U = (O = r.colors) == null ? void 0 : O.page_background) == null ? void 0 : U.type,
|
|
900
913
|
colors_page_background_start: (oe = (ne = r.colors) == null ? void 0 : ne.page_background) == null ? void 0 : oe.start,
|
|
901
914
|
colors_page_background_end: (ie = (se = r.colors) == null ? void 0 : se.page_background) == null ? void 0 : ie.end,
|
|
902
915
|
colors_page_background_angle_dev: (ce = (le = r.colors) == null ? void 0 : le.page_background) == null ? void 0 : ce.angle_deg,
|
|
@@ -907,7 +920,7 @@ function Zt(t) {
|
|
|
907
920
|
}
|
|
908
921
|
function er(t) {
|
|
909
922
|
return {
|
|
910
|
-
get:
|
|
923
|
+
get: Xt(t),
|
|
911
924
|
set: Zt(t)
|
|
912
925
|
};
|
|
913
926
|
}
|
|
@@ -923,7 +936,7 @@ function tr(t) {
|
|
|
923
936
|
return {
|
|
924
937
|
hooks: n.map((c) => {
|
|
925
938
|
const { tenant_id: _, enabled: u, synchronous: h, ...g } = c;
|
|
926
|
-
return
|
|
939
|
+
return f({
|
|
927
940
|
...g,
|
|
928
941
|
enabled: !!u,
|
|
929
942
|
synchronous: !!h
|
|
@@ -938,7 +951,7 @@ function tr(t) {
|
|
|
938
951
|
function rr(t) {
|
|
939
952
|
return async (e, r) => {
|
|
940
953
|
const a = await t.selectFrom("hooks").where("hooks.tenant_id", "=", e).where("hooks.hook_id", "=", r).selectAll().executeTakeFirst();
|
|
941
|
-
return a ?
|
|
954
|
+
return a ? f({
|
|
942
955
|
...a,
|
|
943
956
|
enabled: !!a.enabled,
|
|
944
957
|
synchronous: !!a.synchronous
|
|
@@ -1016,7 +1029,7 @@ function cr(t) {
|
|
|
1016
1029
|
fonts_subtitle_bold: !!a.fonts_subtitle_bold,
|
|
1017
1030
|
fonts_title_bold: !!a.fonts_title_bold
|
|
1018
1031
|
};
|
|
1019
|
-
return
|
|
1032
|
+
return f(
|
|
1020
1033
|
ge(o, [
|
|
1021
1034
|
"widget",
|
|
1022
1035
|
"colors",
|
|
@@ -1049,7 +1062,7 @@ function mr(t) {
|
|
|
1049
1062
|
const a = await t.selectFrom("login_sessions").where("login_sessions.id", "=", r).selectAll().executeTakeFirst();
|
|
1050
1063
|
return a ? Be.parse(
|
|
1051
1064
|
ge(
|
|
1052
|
-
|
|
1065
|
+
f({
|
|
1053
1066
|
...a,
|
|
1054
1067
|
login_completed: !!a.login_completed
|
|
1055
1068
|
}),
|
|
@@ -1096,7 +1109,7 @@ function pr(t) {
|
|
|
1096
1109
|
function gr(t) {
|
|
1097
1110
|
return async (e) => {
|
|
1098
1111
|
const [r] = await t.selectFrom("prompt_settings").where("prompt_settings.tenant_id", "=", e).selectAll().execute();
|
|
1099
|
-
return
|
|
1112
|
+
return f({
|
|
1100
1113
|
identifier_first: !!(r != null && r.identifier_first),
|
|
1101
1114
|
password_first: !!(r != null && r.password_first),
|
|
1102
1115
|
webauthn_platform_first_factor: !!(r != null && r.webauthn_platform_first_factor),
|
|
@@ -1105,7 +1118,7 @@ function gr(t) {
|
|
|
1105
1118
|
};
|
|
1106
1119
|
}
|
|
1107
1120
|
function he(t) {
|
|
1108
|
-
return
|
|
1121
|
+
return f({
|
|
1109
1122
|
...t,
|
|
1110
1123
|
webauthn_platform_first_factor: t.webauthn_platform_first_factor ? !!t.webauthn_platform_first_factor : void 0,
|
|
1111
1124
|
identifier_first: t.identifier_first ? !!t.identifier_first : void 0,
|
|
@@ -1144,7 +1157,7 @@ function vr(t) {
|
|
|
1144
1157
|
enabled: s,
|
|
1145
1158
|
...l
|
|
1146
1159
|
} = r;
|
|
1147
|
-
return
|
|
1160
|
+
return f({
|
|
1148
1161
|
...l,
|
|
1149
1162
|
credentials: JSON.parse(o),
|
|
1150
1163
|
settings: JSON.parse(n),
|
|
@@ -1296,7 +1309,7 @@ function Ir(t) {
|
|
|
1296
1309
|
}
|
|
1297
1310
|
function Dr(t) {
|
|
1298
1311
|
return async (e, r) => {
|
|
1299
|
-
const a =
|
|
1312
|
+
const a = Q.parse({
|
|
1300
1313
|
id: b(),
|
|
1301
1314
|
...r,
|
|
1302
1315
|
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -1309,7 +1322,7 @@ function Dr(t) {
|
|
|
1309
1322
|
start: JSON.stringify(a.start || {}),
|
|
1310
1323
|
ending: JSON.stringify(a.ending || {}),
|
|
1311
1324
|
tenant_id: e
|
|
1312
|
-
}).execute(),
|
|
1325
|
+
}).execute(), Q.parse(a);
|
|
1313
1326
|
};
|
|
1314
1327
|
}
|
|
1315
1328
|
function Pr(t) {
|
|
@@ -1337,7 +1350,7 @@ function Pr(t) {
|
|
|
1337
1350
|
_.ending = JSON.parse(_.ending);
|
|
1338
1351
|
} catch {
|
|
1339
1352
|
}
|
|
1340
|
-
return
|
|
1353
|
+
return Q.parse(f(_));
|
|
1341
1354
|
}), { count: l } = await a.select((c) => c.fn.countAll().as("count")).executeTakeFirstOrThrow();
|
|
1342
1355
|
return {
|
|
1343
1356
|
forms: s,
|
|
@@ -1373,7 +1386,7 @@ function Fr(t) {
|
|
|
1373
1386
|
o.ending = JSON.parse(o.ending);
|
|
1374
1387
|
} catch {
|
|
1375
1388
|
}
|
|
1376
|
-
return
|
|
1389
|
+
return Q.parse(f(o));
|
|
1377
1390
|
};
|
|
1378
1391
|
}
|
|
1379
1392
|
function Mr(t) {
|
|
@@ -1421,7 +1434,7 @@ function zr(t) {
|
|
|
1421
1434
|
created_at: a,
|
|
1422
1435
|
updated_at: a
|
|
1423
1436
|
};
|
|
1424
|
-
return await t.insertInto("resource_servers").values(g).execute(), n;
|
|
1437
|
+
return await t.insertInto("resource_servers").values(g).execute(), f(n);
|
|
1425
1438
|
};
|
|
1426
1439
|
}
|
|
1427
1440
|
function Lr(t) {
|
|
@@ -1435,8 +1448,7 @@ function Lr(t) {
|
|
|
1435
1448
|
skip_consent_for_verifiable_first_party_clients: c,
|
|
1436
1449
|
allow_offline_access: _,
|
|
1437
1450
|
...u
|
|
1438
|
-
} = o
|
|
1439
|
-
return {
|
|
1451
|
+
} = o, h = {
|
|
1440
1452
|
...u,
|
|
1441
1453
|
scopes: s ? JSON.parse(s) : [],
|
|
1442
1454
|
options: l ? JSON.parse(l) : {},
|
|
@@ -1445,6 +1457,7 @@ function Lr(t) {
|
|
|
1445
1457
|
// Convert verification_key back to verificationKey for API
|
|
1446
1458
|
verificationKey: n
|
|
1447
1459
|
};
|
|
1460
|
+
return f(h);
|
|
1448
1461
|
};
|
|
1449
1462
|
}
|
|
1450
1463
|
function Er(t) {
|
|
@@ -1469,8 +1482,7 @@ function Er(t) {
|
|
|
1469
1482
|
skip_consent_for_verifiable_first_party_clients: I,
|
|
1470
1483
|
allow_offline_access: D,
|
|
1471
1484
|
...O
|
|
1472
|
-
} = _
|
|
1473
|
-
return {
|
|
1485
|
+
} = _, U = {
|
|
1474
1486
|
...O,
|
|
1475
1487
|
scopes: h ? JSON.parse(h) : [],
|
|
1476
1488
|
options: g ? JSON.parse(g) : {},
|
|
@@ -1479,6 +1491,7 @@ function Er(t) {
|
|
|
1479
1491
|
// Convert verification_key back to verificationKey for API
|
|
1480
1492
|
verificationKey: u
|
|
1481
1493
|
};
|
|
1494
|
+
return f(U);
|
|
1482
1495
|
}), { count: l } = await a.select((c) => c.fn.countAll().as("count")).executeTakeFirstOrThrow();
|
|
1483
1496
|
return {
|
|
1484
1497
|
resource_servers: s,
|
|
@@ -1632,7 +1645,7 @@ function Hr(t) {
|
|
|
1632
1645
|
}
|
|
1633
1646
|
};
|
|
1634
1647
|
}
|
|
1635
|
-
function
|
|
1648
|
+
function Yr(t) {
|
|
1636
1649
|
return async (e, r, a = { page: 0, per_page: 50, include_totals: !1 }) => (await t.selectFrom("role_permissions").leftJoin(
|
|
1637
1650
|
"resource_servers",
|
|
1638
1651
|
(s) => s.onRef(
|
|
@@ -1661,11 +1674,11 @@ function Xr(t) {
|
|
|
1661
1674
|
created_at: s.created_at
|
|
1662
1675
|
}));
|
|
1663
1676
|
}
|
|
1664
|
-
function
|
|
1677
|
+
function Xr(t) {
|
|
1665
1678
|
return {
|
|
1666
1679
|
assign: Gr(t),
|
|
1667
1680
|
remove: Hr(t),
|
|
1668
|
-
list:
|
|
1681
|
+
list: Yr(t)
|
|
1669
1682
|
};
|
|
1670
1683
|
}
|
|
1671
1684
|
function Zr(t) {
|
|
@@ -1748,12 +1761,59 @@ function ra(t) {
|
|
|
1748
1761
|
};
|
|
1749
1762
|
}
|
|
1750
1763
|
function aa(t) {
|
|
1764
|
+
return async (e, r) => await t.selectFrom("user_roles as ur").innerJoin(
|
|
1765
|
+
"roles as r",
|
|
1766
|
+
(o) => o.onRef("ur.role_id", "=", "r.id").onRef("ur.tenant_id", "=", "r.tenant_id")
|
|
1767
|
+
).select([
|
|
1768
|
+
"r.id",
|
|
1769
|
+
"r.name",
|
|
1770
|
+
"r.description",
|
|
1771
|
+
"r.created_at",
|
|
1772
|
+
"r.updated_at"
|
|
1773
|
+
]).where("ur.tenant_id", "=", e).where("ur.user_id", "=", r).execute();
|
|
1774
|
+
}
|
|
1775
|
+
function na(t) {
|
|
1776
|
+
return async (e, r, a) => {
|
|
1777
|
+
if (a.length === 0) return !0;
|
|
1778
|
+
const o = (/* @__PURE__ */ new Date()).toISOString();
|
|
1779
|
+
try {
|
|
1780
|
+
for (const n of a)
|
|
1781
|
+
try {
|
|
1782
|
+
await t.insertInto("user_roles").values({ tenant_id: e, user_id: r, role_id: n, created_at: o }).execute();
|
|
1783
|
+
} catch (s) {
|
|
1784
|
+
if (s.code === "SQLITE_CONSTRAINT_PRIMARYKEY" || s.code === "SQLITE_CONSTRAINT_UNIQUE")
|
|
1785
|
+
continue;
|
|
1786
|
+
throw s;
|
|
1787
|
+
}
|
|
1788
|
+
return !0;
|
|
1789
|
+
} catch (n) {
|
|
1790
|
+
return console.error("Error assigning user roles:", n), !1;
|
|
1791
|
+
}
|
|
1792
|
+
};
|
|
1793
|
+
}
|
|
1794
|
+
function oa(t) {
|
|
1795
|
+
return async (e, r, a) => {
|
|
1796
|
+
try {
|
|
1797
|
+
return a.length && await t.deleteFrom("user_roles").where("tenant_id", "=", e).where("user_id", "=", r).where((o) => o("role_id", "in", a)).execute(), !0;
|
|
1798
|
+
} catch (o) {
|
|
1799
|
+
return console.error("Error removing user roles:", o), !1;
|
|
1800
|
+
}
|
|
1801
|
+
};
|
|
1802
|
+
}
|
|
1803
|
+
function sa(t) {
|
|
1804
|
+
return {
|
|
1805
|
+
list: aa(t),
|
|
1806
|
+
assign: na(t),
|
|
1807
|
+
remove: oa(t)
|
|
1808
|
+
};
|
|
1809
|
+
}
|
|
1810
|
+
function ia(t) {
|
|
1751
1811
|
return t[t.length - 1];
|
|
1752
1812
|
}
|
|
1753
1813
|
function y(t) {
|
|
1754
1814
|
return Object.freeze(t);
|
|
1755
1815
|
}
|
|
1756
|
-
const
|
|
1816
|
+
const B = y({
|
|
1757
1817
|
is(t) {
|
|
1758
1818
|
return t.kind === "IdentifierNode";
|
|
1759
1819
|
},
|
|
@@ -1770,17 +1830,17 @@ const U = y({
|
|
|
1770
1830
|
create(t) {
|
|
1771
1831
|
return y({
|
|
1772
1832
|
kind: "SchemableIdentifierNode",
|
|
1773
|
-
identifier:
|
|
1833
|
+
identifier: B.create(t)
|
|
1774
1834
|
});
|
|
1775
1835
|
},
|
|
1776
1836
|
createWithSchema(t, e) {
|
|
1777
1837
|
return y({
|
|
1778
1838
|
kind: "SchemableIdentifierNode",
|
|
1779
|
-
schema:
|
|
1780
|
-
identifier:
|
|
1839
|
+
schema: B.create(t),
|
|
1840
|
+
identifier: B.create(e)
|
|
1781
1841
|
});
|
|
1782
1842
|
}
|
|
1783
|
-
}),
|
|
1843
|
+
}), la = y({
|
|
1784
1844
|
is(t) {
|
|
1785
1845
|
return t.kind === "AliasNode";
|
|
1786
1846
|
},
|
|
@@ -1791,7 +1851,7 @@ const U = y({
|
|
|
1791
1851
|
alias: e
|
|
1792
1852
|
});
|
|
1793
1853
|
}
|
|
1794
|
-
}),
|
|
1854
|
+
}), W = y({
|
|
1795
1855
|
is(t) {
|
|
1796
1856
|
return t.kind === "TableNode";
|
|
1797
1857
|
},
|
|
@@ -1808,11 +1868,11 @@ const U = y({
|
|
|
1808
1868
|
});
|
|
1809
1869
|
}
|
|
1810
1870
|
});
|
|
1811
|
-
var
|
|
1812
|
-
class
|
|
1871
|
+
var q;
|
|
1872
|
+
class ca {
|
|
1813
1873
|
constructor() {
|
|
1814
1874
|
z(this, "nodeStack", []);
|
|
1815
|
-
N(this,
|
|
1875
|
+
N(this, q, y({
|
|
1816
1876
|
AliasNode: this.transformAlias.bind(this),
|
|
1817
1877
|
ColumnNode: this.transformColumn.bind(this),
|
|
1818
1878
|
IdentifierNode: this.transformIdentifier.bind(this),
|
|
@@ -1916,7 +1976,7 @@ class oa {
|
|
|
1916
1976
|
return this.nodeStack.pop(), y(r);
|
|
1917
1977
|
}
|
|
1918
1978
|
transformNodeImpl(e) {
|
|
1919
|
-
return d(this,
|
|
1979
|
+
return d(this, q)[e.kind](e);
|
|
1920
1980
|
}
|
|
1921
1981
|
transformNodeList(e) {
|
|
1922
1982
|
return e && y(e.map((r) => this.transformNode(r)));
|
|
@@ -2642,8 +2702,8 @@ class oa {
|
|
|
2642
2702
|
return e;
|
|
2643
2703
|
}
|
|
2644
2704
|
}
|
|
2645
|
-
|
|
2646
|
-
const
|
|
2705
|
+
q = new WeakMap();
|
|
2706
|
+
const da = y({
|
|
2647
2707
|
AlterTableNode: !0,
|
|
2648
2708
|
CreateIndexNode: !0,
|
|
2649
2709
|
CreateSchemaNode: !0,
|
|
@@ -2662,8 +2722,8 @@ const sa = y({
|
|
|
2662
2722
|
UpdateQueryNode: !0,
|
|
2663
2723
|
MergeQueryNode: !0
|
|
2664
2724
|
});
|
|
2665
|
-
var M, k, $, w, ye, ve, Ne, P,
|
|
2666
|
-
class
|
|
2725
|
+
var M, k, $, w, ye, ve, Ne, P, Z, Ce;
|
|
2726
|
+
class ua extends ca {
|
|
2667
2727
|
constructor(r) {
|
|
2668
2728
|
super();
|
|
2669
2729
|
N(this, w);
|
|
@@ -2692,22 +2752,22 @@ class ia extends oa {
|
|
|
2692
2752
|
const a = super.transformSchemableIdentifier(r);
|
|
2693
2753
|
return a.schema || !d(this, k).has(r.identifier.name) ? a : {
|
|
2694
2754
|
...a,
|
|
2695
|
-
schema:
|
|
2755
|
+
schema: B.create(d(this, M))
|
|
2696
2756
|
};
|
|
2697
2757
|
}
|
|
2698
2758
|
transformReferences(r) {
|
|
2699
2759
|
const a = super.transformReferences(r);
|
|
2700
2760
|
return a.table.table.schema ? a : {
|
|
2701
2761
|
...a,
|
|
2702
|
-
table:
|
|
2762
|
+
table: W.createWithSchema(d(this, M), a.table.table.identifier.name)
|
|
2703
2763
|
};
|
|
2704
2764
|
}
|
|
2705
2765
|
}
|
|
2706
2766
|
M = new WeakMap(), k = new WeakMap(), $ = new WeakMap(), w = new WeakSet(), ye = function(r) {
|
|
2707
|
-
return r.kind in
|
|
2767
|
+
return r.kind in da;
|
|
2708
2768
|
}, ve = function(r) {
|
|
2709
2769
|
const a = /* @__PURE__ */ new Set();
|
|
2710
|
-
if ("name" in r && r.name && X.is(r.name) && m(this, w,
|
|
2770
|
+
if ("name" in r && r.name && X.is(r.name) && m(this, w, Z).call(this, r.name, a), "from" in r && r.from)
|
|
2711
2771
|
for (const o of r.from.froms)
|
|
2712
2772
|
m(this, w, P).call(this, o, a);
|
|
2713
2773
|
if ("into" in r && r.into && m(this, w, P).call(this, r.into, a), "table" in r && r.table && m(this, w, P).call(this, r.table, a), "joins" in r && r.joins)
|
|
@@ -2718,9 +2778,9 @@ M = new WeakMap(), k = new WeakMap(), $ = new WeakMap(), w = new WeakSet(), ye =
|
|
|
2718
2778
|
const a = /* @__PURE__ */ new Set();
|
|
2719
2779
|
return "with" in r && r.with && m(this, w, Ce).call(this, r.with, a), a;
|
|
2720
2780
|
}, P = function(r, a) {
|
|
2721
|
-
const o =
|
|
2722
|
-
o && m(this, w,
|
|
2723
|
-
},
|
|
2781
|
+
const o = W.is(r) ? r : la.is(r) && W.is(r.node) ? r.node : null;
|
|
2782
|
+
o && m(this, w, Z).call(this, o.table, a);
|
|
2783
|
+
}, Z = function(r, a) {
|
|
2724
2784
|
const o = r.identifier.name;
|
|
2725
2785
|
!d(this, k).has(o) && !d(this, $).has(o) && a.add(o);
|
|
2726
2786
|
}, Ce = function(r, a) {
|
|
@@ -2730,10 +2790,10 @@ M = new WeakMap(), k = new WeakMap(), $ = new WeakMap(), w = new WeakSet(), ye =
|
|
|
2730
2790
|
}
|
|
2731
2791
|
};
|
|
2732
2792
|
var R;
|
|
2733
|
-
class
|
|
2793
|
+
class ma {
|
|
2734
2794
|
constructor(e) {
|
|
2735
2795
|
N(this, R);
|
|
2736
|
-
L(this, R, new
|
|
2796
|
+
L(this, R, new ua(e));
|
|
2737
2797
|
}
|
|
2738
2798
|
transformQuery(e) {
|
|
2739
2799
|
return d(this, R).transformNode(e.node);
|
|
@@ -2743,7 +2803,7 @@ class la {
|
|
|
2743
2803
|
}
|
|
2744
2804
|
}
|
|
2745
2805
|
R = new WeakMap();
|
|
2746
|
-
class
|
|
2806
|
+
class _a {
|
|
2747
2807
|
transformQuery(e) {
|
|
2748
2808
|
return e.node;
|
|
2749
2809
|
}
|
|
@@ -2751,13 +2811,13 @@ class ca {
|
|
|
2751
2811
|
return e.result;
|
|
2752
2812
|
}
|
|
2753
2813
|
}
|
|
2754
|
-
const
|
|
2755
|
-
var
|
|
2814
|
+
const ha = "kysely_migration", fe = "kysely_migration_lock", fa = !1, G = "migration_lock", pa = y({ __noMigrations__: !0 });
|
|
2815
|
+
var p, i, E, x, T, j, xe, S, Te, Se, Oe, ke, $e, ee, F, te, Ie, De, Pe, re, je, Fe, Me, Ae, ze, J;
|
|
2756
2816
|
class be {
|
|
2757
2817
|
constructor(e) {
|
|
2758
2818
|
N(this, i);
|
|
2759
|
-
N(this,
|
|
2760
|
-
L(this,
|
|
2819
|
+
N(this, p);
|
|
2820
|
+
L(this, p, y(e));
|
|
2761
2821
|
}
|
|
2762
2822
|
/**
|
|
2763
2823
|
* Returns a {@link MigrationInfo} object for each migration.
|
|
@@ -2765,8 +2825,8 @@ class be {
|
|
|
2765
2825
|
* The returned array is sorted by migration name.
|
|
2766
2826
|
*/
|
|
2767
2827
|
async getMigrations() {
|
|
2768
|
-
const e = await m(this, i, F).call(this, d(this, i, T)) ? await d(this,
|
|
2769
|
-
return (await m(this, i,
|
|
2828
|
+
const e = await m(this, i, F).call(this, d(this, i, T)) ? await d(this, p).db.withPlugin(d(this, i, S)).selectFrom(d(this, i, T)).select(["name", "timestamp"]).execute() : [];
|
|
2829
|
+
return (await m(this, i, re).call(this)).map(({ name: a, ...o }) => {
|
|
2770
2830
|
const n = e.find((s) => s.name === a);
|
|
2771
2831
|
return {
|
|
2772
2832
|
name: a,
|
|
@@ -2850,7 +2910,7 @@ class be {
|
|
|
2850
2910
|
*/
|
|
2851
2911
|
async migrateTo(e) {
|
|
2852
2912
|
return m(this, i, E).call(this, ({ migrations: r, executedMigrations: a, pendingMigrations: o }) => {
|
|
2853
|
-
if (e ===
|
|
2913
|
+
if (e === pa)
|
|
2854
2914
|
return { direction: "Down", step: 1 / 0 };
|
|
2855
2915
|
if (!r.find((l) => l.name === e))
|
|
2856
2916
|
throw new Error(`migration "${e}" doesn't exist`);
|
|
@@ -2900,36 +2960,36 @@ class be {
|
|
|
2900
2960
|
return m(this, i, E).call(this, () => ({ direction: "Down", step: 1 }));
|
|
2901
2961
|
}
|
|
2902
2962
|
}
|
|
2903
|
-
|
|
2963
|
+
p = new WeakMap(), i = new WeakSet(), E = async function(e) {
|
|
2904
2964
|
try {
|
|
2905
2965
|
return await m(this, i, Te).call(this), await m(this, i, Ie).call(this, e);
|
|
2906
2966
|
} catch (r) {
|
|
2907
|
-
return r instanceof
|
|
2967
|
+
return r instanceof H ? r.resultSet : { error: r };
|
|
2908
2968
|
}
|
|
2909
2969
|
}, x = function() {
|
|
2910
|
-
return d(this,
|
|
2970
|
+
return d(this, p).migrationTableSchema;
|
|
2911
2971
|
}, T = function() {
|
|
2912
|
-
return d(this,
|
|
2972
|
+
return d(this, p).migrationTableName ?? ha;
|
|
2913
2973
|
}, j = function() {
|
|
2914
|
-
return d(this,
|
|
2974
|
+
return d(this, p).migrationLockTableName ?? fe;
|
|
2915
2975
|
}, xe = function() {
|
|
2916
|
-
return d(this,
|
|
2976
|
+
return d(this, p).allowUnorderedMigrations ?? fa;
|
|
2917
2977
|
}, S = function() {
|
|
2918
|
-
return d(this, i, x) ? new
|
|
2978
|
+
return d(this, i, x) ? new ma(d(this, i, x)) : new _a();
|
|
2919
2979
|
}, Te = async function() {
|
|
2920
2980
|
await m(this, i, Se).call(this), await m(this, i, Oe).call(this), await m(this, i, ke).call(this), await m(this, i, $e).call(this);
|
|
2921
2981
|
}, Se = async function() {
|
|
2922
|
-
if (d(this, i, x) && !await m(this, i,
|
|
2982
|
+
if (d(this, i, x) && !await m(this, i, ee).call(this))
|
|
2923
2983
|
try {
|
|
2924
|
-
await m(this, i, J).call(this, d(this,
|
|
2984
|
+
await m(this, i, J).call(this, d(this, p).db.schema.createSchema(d(this, i, x)));
|
|
2925
2985
|
} catch (e) {
|
|
2926
|
-
if (!await m(this, i,
|
|
2986
|
+
if (!await m(this, i, ee).call(this))
|
|
2927
2987
|
throw e;
|
|
2928
2988
|
}
|
|
2929
2989
|
}, Oe = async function() {
|
|
2930
2990
|
if (!await m(this, i, F).call(this, d(this, i, T)))
|
|
2931
2991
|
try {
|
|
2932
|
-
d(this, i, x) && await m(this, i, J).call(this, d(this,
|
|
2992
|
+
d(this, i, x) && await m(this, i, J).call(this, d(this, p).db.schema.createSchema(d(this, i, x))), await m(this, i, J).call(this, d(this, p).db.schema.withPlugin(d(this, i, S)).createTable(d(this, i, T)).addColumn("name", "varchar(255)", (e) => e.notNull().primaryKey()).addColumn("timestamp", "varchar(255)", (e) => e.notNull()));
|
|
2933
2993
|
} catch (e) {
|
|
2934
2994
|
if (!await m(this, i, F).call(this, d(this, i, T)))
|
|
2935
2995
|
throw e;
|
|
@@ -2937,33 +2997,33 @@ f = new WeakMap(), i = new WeakSet(), E = async function(e) {
|
|
|
2937
2997
|
}, ke = async function() {
|
|
2938
2998
|
if (!await m(this, i, F).call(this, d(this, i, j)))
|
|
2939
2999
|
try {
|
|
2940
|
-
await m(this, i, J).call(this, d(this,
|
|
3000
|
+
await m(this, i, J).call(this, d(this, p).db.schema.withPlugin(d(this, i, S)).createTable(d(this, i, j)).addColumn("id", "varchar(255)", (e) => e.notNull().primaryKey()).addColumn("is_locked", "integer", (e) => e.notNull().defaultTo(0)));
|
|
2941
3001
|
} catch (e) {
|
|
2942
3002
|
if (!await m(this, i, F).call(this, d(this, i, j)))
|
|
2943
3003
|
throw e;
|
|
2944
3004
|
}
|
|
2945
3005
|
}, $e = async function() {
|
|
2946
|
-
if (!await m(this, i,
|
|
3006
|
+
if (!await m(this, i, te).call(this))
|
|
2947
3007
|
try {
|
|
2948
|
-
await d(this,
|
|
3008
|
+
await d(this, p).db.withPlugin(d(this, i, S)).insertInto(d(this, i, j)).values({ id: G, is_locked: 0 }).execute();
|
|
2949
3009
|
} catch (e) {
|
|
2950
|
-
if (!await m(this, i,
|
|
3010
|
+
if (!await m(this, i, te).call(this))
|
|
2951
3011
|
throw e;
|
|
2952
3012
|
}
|
|
2953
|
-
},
|
|
2954
|
-
return (await d(this,
|
|
3013
|
+
}, ee = async function() {
|
|
3014
|
+
return (await d(this, p).db.introspection.getSchemas()).some((r) => r.name === d(this, i, x));
|
|
2955
3015
|
}, F = async function(e) {
|
|
2956
3016
|
const r = d(this, i, x);
|
|
2957
|
-
return (await d(this,
|
|
3017
|
+
return (await d(this, p).db.introspection.getTables({
|
|
2958
3018
|
withInternalKyselyTables: !0
|
|
2959
3019
|
})).some((o) => o.name === e && (!r || o.schema === r));
|
|
2960
|
-
},
|
|
2961
|
-
return !!await d(this,
|
|
3020
|
+
}, te = async function() {
|
|
3021
|
+
return !!await d(this, p).db.withPlugin(d(this, i, S)).selectFrom(d(this, i, j)).where("id", "=", G).select("id").executeTakeFirst();
|
|
2962
3022
|
}, Ie = async function(e) {
|
|
2963
|
-
const r = d(this,
|
|
2964
|
-
lockTable: d(this,
|
|
2965
|
-
lockRowId:
|
|
2966
|
-
lockTableSchema: d(this,
|
|
3023
|
+
const r = d(this, p).db.getExecutor().adapter, a = y({
|
|
3024
|
+
lockTable: d(this, p).migrationLockTableName ?? fe,
|
|
3025
|
+
lockRowId: G,
|
|
3026
|
+
lockTableSchema: d(this, p).migrationTableSchema
|
|
2967
3027
|
}), o = async (n) => {
|
|
2968
3028
|
try {
|
|
2969
3029
|
await r.acquireMigrationLock(n, a);
|
|
@@ -2976,21 +3036,21 @@ f = new WeakMap(), i = new WeakSet(), E = async function(e) {
|
|
|
2976
3036
|
await r.releaseMigrationLock(n, a);
|
|
2977
3037
|
}
|
|
2978
3038
|
};
|
|
2979
|
-
return r.supportsTransactionalDdl ? d(this,
|
|
3039
|
+
return r.supportsTransactionalDdl ? d(this, p).db.transaction().execute(o) : d(this, p).db.connection().execute(o);
|
|
2980
3040
|
}, De = async function(e) {
|
|
2981
|
-
const r = await m(this, i,
|
|
3041
|
+
const r = await m(this, i, re).call(this), a = await m(this, i, je).call(this, e);
|
|
2982
3042
|
m(this, i, Fe).call(this, r, a), d(this, i, xe) || m(this, i, Me).call(this, r, a);
|
|
2983
3043
|
const o = m(this, i, Pe).call(this, r, a);
|
|
2984
3044
|
return y({
|
|
2985
3045
|
migrations: r,
|
|
2986
3046
|
executedMigrations: a,
|
|
2987
|
-
lastMigration:
|
|
3047
|
+
lastMigration: ia(a),
|
|
2988
3048
|
pendingMigrations: o
|
|
2989
3049
|
});
|
|
2990
3050
|
}, Pe = function(e, r) {
|
|
2991
3051
|
return e.filter((a) => !r.includes(a.name));
|
|
2992
|
-
},
|
|
2993
|
-
const e = await d(this,
|
|
3052
|
+
}, re = async function() {
|
|
3053
|
+
const e = await d(this, p).provider.getMigrations();
|
|
2994
3054
|
return Object.keys(e).sort().map((r) => ({
|
|
2995
3055
|
...e[r],
|
|
2996
3056
|
name: r
|
|
@@ -3024,7 +3084,7 @@ f = new WeakMap(), i = new WeakSet(), E = async function(e) {
|
|
|
3024
3084
|
migrationName: l.name,
|
|
3025
3085
|
direction: "Down",
|
|
3026
3086
|
status: "Error"
|
|
3027
|
-
}, new
|
|
3087
|
+
}, new H({
|
|
3028
3088
|
error: c,
|
|
3029
3089
|
results: n
|
|
3030
3090
|
});
|
|
@@ -3053,7 +3113,7 @@ f = new WeakMap(), i = new WeakSet(), E = async function(e) {
|
|
|
3053
3113
|
migrationName: l.name,
|
|
3054
3114
|
direction: "Up",
|
|
3055
3115
|
status: "Error"
|
|
3056
|
-
}, new
|
|
3116
|
+
}, new H({
|
|
3057
3117
|
error: c,
|
|
3058
3118
|
results: n
|
|
3059
3119
|
});
|
|
@@ -3061,10 +3121,10 @@ f = new WeakMap(), i = new WeakSet(), E = async function(e) {
|
|
|
3061
3121
|
}
|
|
3062
3122
|
return { results: n };
|
|
3063
3123
|
}, J = async function(e) {
|
|
3064
|
-
d(this,
|
|
3124
|
+
d(this, p).db.getExecutor().adapter.supportsCreateIfNotExists && (e = e.ifNotExists()), await e.execute();
|
|
3065
3125
|
};
|
|
3066
3126
|
var K;
|
|
3067
|
-
class
|
|
3127
|
+
class H extends Error {
|
|
3068
3128
|
constructor(r) {
|
|
3069
3129
|
super();
|
|
3070
3130
|
N(this, K);
|
|
@@ -3084,7 +3144,7 @@ class Le {
|
|
|
3084
3144
|
return this.migrations;
|
|
3085
3145
|
}
|
|
3086
3146
|
}
|
|
3087
|
-
async function
|
|
3147
|
+
async function ga(t) {
|
|
3088
3148
|
await t.schema.createTable("tenants").addColumn("id", "varchar(255)", (e) => e.primaryKey()).addColumn("name", "varchar(255)").addColumn("audience", "varchar(255)").addColumn("sender_email", "varchar(255)").addColumn("sender_name", "varchar(255)").addColumn("language", "varchar(255)").addColumn("logo", "varchar(255)").addColumn("primary_color", "varchar(255)").addColumn("secondary_color", "varchar(255)").addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("updated_at", "varchar(255)", (e) => e.notNull()).execute(), await t.schema.createTable("users").addColumn("user_id", "varchar(255)", (e) => e.notNull()).addColumn(
|
|
3089
3149
|
"tenant_id",
|
|
3090
3150
|
"varchar(255)",
|
|
@@ -3156,35 +3216,35 @@ async function _a(t) {
|
|
|
3156
3216
|
(e) => e.references("tenants.id").onDelete("cascade").notNull()
|
|
3157
3217
|
).addColumn("domain", "varchar(255)", (e) => e.notNull()).addColumn("email_service", "varchar(255)").addColumn("email_api_key", "varchar(255)").addColumn("dkim_private_key", "varchar(2048)").addColumn("dkim_public_key", "varchar(2048)").addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("updated_at", "varchar(255)", (e) => e.notNull()).execute();
|
|
3158
3218
|
}
|
|
3159
|
-
async function
|
|
3219
|
+
async function wa(t) {
|
|
3160
3220
|
await t.schema.dropTable("domains").execute(), await t.schema.dropTable("members").execute(), await t.schema.dropTable("users").execute(), await t.schema.dropTable("connections").execute(), await t.schema.dropTable("applications").execute(), await t.schema.dropTable("migrations").execute(), await t.schema.dropTable("tenants").execute();
|
|
3161
3221
|
}
|
|
3162
|
-
const
|
|
3222
|
+
const ya = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3163
3223
|
__proto__: null,
|
|
3164
|
-
down:
|
|
3165
|
-
up:
|
|
3224
|
+
down: wa,
|
|
3225
|
+
up: ga
|
|
3166
3226
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3167
|
-
async function
|
|
3227
|
+
async function va(t) {
|
|
3168
3228
|
await t.schema.alterTable("tenants").addColumn("support_url", "varchar(255)").execute();
|
|
3169
3229
|
}
|
|
3170
|
-
async function
|
|
3230
|
+
async function Na(t) {
|
|
3171
3231
|
await t.schema.alterTable("tenants").dropColumn("support_url").execute();
|
|
3172
3232
|
}
|
|
3173
|
-
const
|
|
3233
|
+
const Ca = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3174
3234
|
__proto__: null,
|
|
3175
|
-
down:
|
|
3176
|
-
up:
|
|
3235
|
+
down: Na,
|
|
3236
|
+
up: va
|
|
3177
3237
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3178
|
-
async function
|
|
3238
|
+
async function ba(t) {
|
|
3179
3239
|
}
|
|
3180
|
-
async function
|
|
3240
|
+
async function xa(t) {
|
|
3181
3241
|
}
|
|
3182
|
-
const
|
|
3242
|
+
const Ta = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3183
3243
|
__proto__: null,
|
|
3184
|
-
down:
|
|
3185
|
-
up:
|
|
3244
|
+
down: xa,
|
|
3245
|
+
up: ba
|
|
3186
3246
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3187
|
-
async function
|
|
3247
|
+
async function Sa(t) {
|
|
3188
3248
|
await t.schema.createTable("logs").addColumn("id", "varchar(255)", (e) => e.notNull().primaryKey()).addColumn("category", "varchar(255)", (e) => e.notNull()).addColumn("tenant_id", "varchar(64)").addColumn("user_id", "varchar(64)").addForeignKeyConstraint(
|
|
3189
3249
|
"tenant_id_constraint",
|
|
3190
3250
|
["tenant_id"],
|
|
@@ -3193,24 +3253,24 @@ async function Ca(t) {
|
|
|
3193
3253
|
(e) => e.onDelete("cascade")
|
|
3194
3254
|
).addColumn("ip", "varchar(255)").addColumn("type", "varchar(8)", (e) => e.notNull()).addColumn("date", "varchar(25)", (e) => e.notNull()).addColumn("client_id", "varchar(255)").addColumn("client_name", "varchar(255)").addColumn("user_agent", "varchar(255)").addColumn("description", "varchar(255)").addColumn("details", "varchar(2048)").execute();
|
|
3195
3255
|
}
|
|
3196
|
-
async function
|
|
3256
|
+
async function Oa(t) {
|
|
3197
3257
|
await t.schema.dropTable("logs").execute();
|
|
3198
3258
|
}
|
|
3199
|
-
const
|
|
3259
|
+
const ka = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3200
3260
|
__proto__: null,
|
|
3201
|
-
down:
|
|
3202
|
-
up:
|
|
3261
|
+
down: Oa,
|
|
3262
|
+
up: Sa
|
|
3203
3263
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3204
|
-
async function
|
|
3264
|
+
async function $a(t) {
|
|
3205
3265
|
}
|
|
3206
|
-
async function
|
|
3266
|
+
async function Ia(t) {
|
|
3207
3267
|
}
|
|
3208
|
-
const
|
|
3268
|
+
const Da = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3209
3269
|
__proto__: null,
|
|
3210
|
-
down:
|
|
3211
|
-
up:
|
|
3270
|
+
down: Ia,
|
|
3271
|
+
up: $a
|
|
3212
3272
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3213
|
-
async function
|
|
3273
|
+
async function Pa(t) {
|
|
3214
3274
|
await t.schema.createTable("sessions").addColumn("id", "varchar(21)", (e) => e.primaryKey()).addColumn("tenant_id", "varchar(255)").addColumn("user_id", "varchar(255)").addForeignKeyConstraint(
|
|
3215
3275
|
"user_id_constraint",
|
|
3216
3276
|
["user_id", "tenant_id"],
|
|
@@ -3235,15 +3295,15 @@ async function ka(t) {
|
|
|
3235
3295
|
(e) => e.references("applications.id").onDelete("cascade").notNull()
|
|
3236
3296
|
).addColumn("code", "varchar(255)", (e) => e.notNull()).addColumn("email", "varchar(255)", (e) => e.notNull()).addColumn("user_id", "varchar(255)").addColumn("send", "varchar(255)").addColumn("nonce", "varchar(255)").addColumn("state", "varchar(1024)").addColumn("scope", "varchar(1024)").addColumn("response_type", "varchar(256)").addColumn("response_mode", "varchar(256)").addColumn("redirect_uri", "varchar(1024)").addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("expires_at", "varchar(255)", (e) => e.notNull()).addColumn("used_at", "varchar(255)").execute(), await t.schema.createIndex("otps_email_index").on("otps").column("email").execute(), await t.schema.createIndex("otps_expires_at_index").on("otps").column("expires_at").execute();
|
|
3237
3297
|
}
|
|
3238
|
-
async function
|
|
3298
|
+
async function ja(t) {
|
|
3239
3299
|
await t.schema.dropTable("sessions").execute(), await t.schema.dropTable("tickets").execute(), await t.schema.dropTable("otps").execute();
|
|
3240
3300
|
}
|
|
3241
|
-
const
|
|
3301
|
+
const Fa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3242
3302
|
__proto__: null,
|
|
3243
|
-
down:
|
|
3244
|
-
up:
|
|
3303
|
+
down: ja,
|
|
3304
|
+
up: Pa
|
|
3245
3305
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3246
|
-
async function
|
|
3306
|
+
async function Ma(t) {
|
|
3247
3307
|
await t.schema.createTable("passwords").addColumn("tenant_id", "varchar(255)").addColumn("user_id", "varchar(255)").addPrimaryKeyConstraint("passwords_pkey", ["user_id", "tenant_id"]).addForeignKeyConstraint(
|
|
3248
3308
|
"user_id_constraint",
|
|
3249
3309
|
["user_id", "tenant_id"],
|
|
@@ -3258,24 +3318,24 @@ async function Da(t) {
|
|
|
3258
3318
|
(e) => e.onDelete("cascade")
|
|
3259
3319
|
).addColumn("type", "varchar(255)", (e) => e.notNull()).addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("expires_at", "varchar(255)", (e) => e.notNull()).addColumn("used_at", "varchar(255)").execute(), await t.schema.createIndex("codes_expires_at_index").on("codes").column("expires_at").execute();
|
|
3260
3320
|
}
|
|
3261
|
-
async function
|
|
3321
|
+
async function Aa(t) {
|
|
3262
3322
|
await t.schema.dropTable("passwords").execute(), await t.schema.dropTable("codes").execute();
|
|
3263
3323
|
}
|
|
3264
|
-
const
|
|
3324
|
+
const za = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3265
3325
|
__proto__: null,
|
|
3266
|
-
down:
|
|
3267
|
-
up:
|
|
3326
|
+
down: Aa,
|
|
3327
|
+
up: Ma
|
|
3268
3328
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3269
|
-
async function
|
|
3329
|
+
async function La(t) {
|
|
3270
3330
|
}
|
|
3271
|
-
async function
|
|
3331
|
+
async function Ea(t) {
|
|
3272
3332
|
}
|
|
3273
|
-
const
|
|
3333
|
+
const Ja = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3274
3334
|
__proto__: null,
|
|
3275
|
-
down:
|
|
3276
|
-
up:
|
|
3335
|
+
down: Ea,
|
|
3336
|
+
up: La
|
|
3277
3337
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3278
|
-
async function
|
|
3338
|
+
async function Ra(t) {
|
|
3279
3339
|
await t.schema.alterTable("passwords").addColumn(
|
|
3280
3340
|
"password",
|
|
3281
3341
|
"varchar(255)",
|
|
@@ -3283,288 +3343,288 @@ async function za(t) {
|
|
|
3283
3343
|
(e) => e.notNull()
|
|
3284
3344
|
).execute();
|
|
3285
3345
|
}
|
|
3286
|
-
async function
|
|
3346
|
+
async function Ka(t) {
|
|
3287
3347
|
await t.schema.alterTable("passwords").dropColumn("password").execute();
|
|
3288
3348
|
}
|
|
3289
|
-
const
|
|
3349
|
+
const Ua = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3290
3350
|
__proto__: null,
|
|
3291
|
-
down:
|
|
3292
|
-
up:
|
|
3351
|
+
down: Ka,
|
|
3352
|
+
up: Ra
|
|
3293
3353
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3294
|
-
async function
|
|
3354
|
+
async function Ba(t) {
|
|
3295
3355
|
}
|
|
3296
|
-
async function
|
|
3356
|
+
async function Qa(t) {
|
|
3297
3357
|
}
|
|
3298
|
-
const
|
|
3358
|
+
const qa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3299
3359
|
__proto__: null,
|
|
3300
|
-
down:
|
|
3301
|
-
up:
|
|
3360
|
+
down: Qa,
|
|
3361
|
+
up: Ba
|
|
3302
3362
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3303
|
-
async function
|
|
3363
|
+
async function Va(t) {
|
|
3304
3364
|
}
|
|
3305
|
-
async function
|
|
3365
|
+
async function Wa(t) {
|
|
3306
3366
|
}
|
|
3307
|
-
const
|
|
3367
|
+
const Ga = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3308
3368
|
__proto__: null,
|
|
3309
|
-
down:
|
|
3310
|
-
up:
|
|
3369
|
+
down: Wa,
|
|
3370
|
+
up: Va
|
|
3311
3371
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3312
|
-
async function
|
|
3372
|
+
async function Ha(t) {
|
|
3313
3373
|
}
|
|
3314
|
-
async function
|
|
3374
|
+
async function Ya(t) {
|
|
3315
3375
|
}
|
|
3316
|
-
const
|
|
3376
|
+
const Xa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3317
3377
|
__proto__: null,
|
|
3318
|
-
down:
|
|
3319
|
-
up:
|
|
3378
|
+
down: Ya,
|
|
3379
|
+
up: Ha
|
|
3320
3380
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3321
|
-
async function
|
|
3381
|
+
async function Za(t) {
|
|
3322
3382
|
await t.schema.createIndex("users_email_index").on("users").column("email").execute();
|
|
3323
3383
|
}
|
|
3324
|
-
async function
|
|
3384
|
+
async function en(t) {
|
|
3325
3385
|
await t.schema.dropIndex("users_email_index").execute();
|
|
3326
3386
|
}
|
|
3327
|
-
const
|
|
3387
|
+
const tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3328
3388
|
__proto__: null,
|
|
3329
|
-
down:
|
|
3330
|
-
up:
|
|
3389
|
+
down: en,
|
|
3390
|
+
up: Za
|
|
3331
3391
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3332
|
-
async function
|
|
3392
|
+
async function rn(t) {
|
|
3333
3393
|
await t.schema.alterTable("users").addColumn("profileData", "varchar(2048)").execute();
|
|
3334
3394
|
}
|
|
3335
|
-
async function
|
|
3395
|
+
async function an(t) {
|
|
3336
3396
|
await t.schema.alterTable("users").dropColumn("profileData").execute();
|
|
3337
3397
|
}
|
|
3338
|
-
const
|
|
3398
|
+
const nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3339
3399
|
__proto__: null,
|
|
3340
|
-
down:
|
|
3341
|
-
up:
|
|
3400
|
+
down: an,
|
|
3401
|
+
up: rn
|
|
3342
3402
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3343
|
-
async function
|
|
3403
|
+
async function on(t) {
|
|
3344
3404
|
await t.schema.createIndex("users_linked_to_index").on("users").column("linked_to").execute();
|
|
3345
3405
|
}
|
|
3346
|
-
async function
|
|
3406
|
+
async function sn(t) {
|
|
3347
3407
|
await t.schema.dropIndex("users_linked_to_index");
|
|
3348
3408
|
}
|
|
3349
|
-
const
|
|
3409
|
+
const ln = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3350
3410
|
__proto__: null,
|
|
3351
|
-
down:
|
|
3352
|
-
up:
|
|
3411
|
+
down: sn,
|
|
3412
|
+
up: on
|
|
3353
3413
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3354
|
-
async function
|
|
3414
|
+
async function cn(t) {
|
|
3355
3415
|
await t.schema.alterTable("users").addColumn("locale", "varchar(255)").execute();
|
|
3356
3416
|
}
|
|
3357
|
-
async function
|
|
3417
|
+
async function dn(t) {
|
|
3358
3418
|
await t.schema.alterTable("users").dropColumn("locale").execute();
|
|
3359
3419
|
}
|
|
3360
|
-
const
|
|
3420
|
+
const un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3361
3421
|
__proto__: null,
|
|
3362
|
-
down:
|
|
3363
|
-
up:
|
|
3422
|
+
down: dn,
|
|
3423
|
+
up: cn
|
|
3364
3424
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3365
|
-
async function
|
|
3425
|
+
async function mn(t) {
|
|
3366
3426
|
await t.schema.createTable("keys").addColumn("kid", "varchar(255)", (e) => e.primaryKey()).addColumn(
|
|
3367
3427
|
"tenant_id",
|
|
3368
3428
|
"varchar(255)",
|
|
3369
3429
|
(e) => e.references("tenants.id").onDelete("cascade")
|
|
3370
3430
|
).addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("revoked_at", "varchar(255)").addColumn("cert", "varchar(2048)").addColumn("pkcs7", "varchar(2048)").addColumn("fingerprint", "varchar(256)").addColumn("thumbprint", "varchar(256)").addColumn("current_since", "varchar(256)").addColumn("current_until", "varchar(256)").execute();
|
|
3371
3431
|
}
|
|
3372
|
-
async function
|
|
3432
|
+
async function _n(t) {
|
|
3373
3433
|
await t.schema.dropTable("keys").execute();
|
|
3374
3434
|
}
|
|
3375
|
-
const
|
|
3435
|
+
const hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3376
3436
|
__proto__: null,
|
|
3377
|
-
down:
|
|
3378
|
-
up:
|
|
3437
|
+
down: _n,
|
|
3438
|
+
up: mn
|
|
3379
3439
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3380
|
-
async function
|
|
3440
|
+
async function fn(t) {
|
|
3381
3441
|
}
|
|
3382
|
-
async function
|
|
3442
|
+
async function pn(t) {
|
|
3383
3443
|
}
|
|
3384
|
-
const
|
|
3444
|
+
const gn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3385
3445
|
__proto__: null,
|
|
3386
|
-
down:
|
|
3387
|
-
up:
|
|
3446
|
+
down: pn,
|
|
3447
|
+
up: fn
|
|
3388
3448
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3389
|
-
async function
|
|
3449
|
+
async function wn(t) {
|
|
3390
3450
|
}
|
|
3391
|
-
async function
|
|
3451
|
+
async function yn(t) {
|
|
3392
3452
|
}
|
|
3393
|
-
const
|
|
3453
|
+
const vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3394
3454
|
__proto__: null,
|
|
3395
|
-
down:
|
|
3396
|
-
up:
|
|
3455
|
+
down: yn,
|
|
3456
|
+
up: wn
|
|
3397
3457
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3398
|
-
async function
|
|
3458
|
+
async function Nn(t) {
|
|
3399
3459
|
await t.schema.alterTable("otps").addColumn("audience", "varchar(255)").execute();
|
|
3400
3460
|
}
|
|
3401
|
-
async function
|
|
3461
|
+
async function Cn(t) {
|
|
3402
3462
|
await t.schema.alterTable("otps").dropColumn("audience").execute();
|
|
3403
3463
|
}
|
|
3404
|
-
const
|
|
3464
|
+
const bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3405
3465
|
__proto__: null,
|
|
3406
|
-
down:
|
|
3407
|
-
up:
|
|
3466
|
+
down: Cn,
|
|
3467
|
+
up: Nn
|
|
3408
3468
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3409
|
-
async function
|
|
3469
|
+
async function xn(t) {
|
|
3410
3470
|
}
|
|
3411
|
-
async function
|
|
3471
|
+
async function Tn(t) {
|
|
3412
3472
|
}
|
|
3413
|
-
const
|
|
3473
|
+
const Sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3414
3474
|
__proto__: null,
|
|
3415
|
-
down:
|
|
3416
|
-
up:
|
|
3475
|
+
down: Tn,
|
|
3476
|
+
up: xn
|
|
3417
3477
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3418
|
-
async function
|
|
3478
|
+
async function On(t) {
|
|
3419
3479
|
await t.schema.alterTable("logs").dropColumn("category").execute();
|
|
3420
3480
|
}
|
|
3421
|
-
async function
|
|
3481
|
+
async function kn(t) {
|
|
3422
3482
|
await t.schema.alterTable("logs").addColumn("category", "varchar(255)", (e) => e.notNull()).execute();
|
|
3423
3483
|
}
|
|
3424
|
-
const
|
|
3484
|
+
const $n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3425
3485
|
__proto__: null,
|
|
3426
|
-
down:
|
|
3427
|
-
up:
|
|
3486
|
+
down: kn,
|
|
3487
|
+
up: On
|
|
3428
3488
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3429
|
-
async function
|
|
3489
|
+
async function In(t) {
|
|
3430
3490
|
await t.schema.alterTable("users").dropColumn("tags").execute();
|
|
3431
3491
|
}
|
|
3432
|
-
async function
|
|
3492
|
+
async function Dn(t) {
|
|
3433
3493
|
await t.schema.alterTable("users").addColumn("tags", "varchar(255)").execute();
|
|
3434
3494
|
}
|
|
3435
|
-
const
|
|
3495
|
+
const Pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3436
3496
|
__proto__: null,
|
|
3437
|
-
down:
|
|
3438
|
-
up:
|
|
3497
|
+
down: Dn,
|
|
3498
|
+
up: In
|
|
3439
3499
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3440
|
-
async function
|
|
3500
|
+
async function jn(t) {
|
|
3441
3501
|
await t.schema.createIndex("logs_user_id").on("logs").column("user_id").execute(), await t.schema.createIndex("logs_tenant_id").on("logs").column("tenant_id").execute(), await t.schema.createIndex("logs_date").on("logs").column("date").execute();
|
|
3442
3502
|
}
|
|
3443
|
-
async function
|
|
3503
|
+
async function Fn(t) {
|
|
3444
3504
|
await t.schema.dropIndex("logs_user_id"), await t.schema.dropIndex("logs_tenant_id"), await t.schema.dropIndex("logs_date");
|
|
3445
3505
|
}
|
|
3446
|
-
const
|
|
3506
|
+
const Mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3447
3507
|
__proto__: null,
|
|
3448
|
-
down:
|
|
3449
|
-
up:
|
|
3508
|
+
down: Fn,
|
|
3509
|
+
up: jn
|
|
3450
3510
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3451
|
-
async function
|
|
3511
|
+
async function An(t) {
|
|
3452
3512
|
await t.schema.alterTable("logs").dropColumn("details").execute(), await t.schema.alterTable("logs").addColumn("details", "varchar(8192)").execute();
|
|
3453
3513
|
}
|
|
3454
|
-
async function
|
|
3514
|
+
async function zn(t) {
|
|
3455
3515
|
await t.schema.alterTable("logs").dropColumn("details").execute(), await t.schema.alterTable("logs").addColumn("details", "varchar(2048)").execute();
|
|
3456
3516
|
}
|
|
3457
|
-
const
|
|
3517
|
+
const Ln = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3458
3518
|
__proto__: null,
|
|
3459
|
-
down:
|
|
3460
|
-
up:
|
|
3519
|
+
down: zn,
|
|
3520
|
+
up: An
|
|
3461
3521
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3462
|
-
async function
|
|
3522
|
+
async function En(t) {
|
|
3463
3523
|
await t.schema.alterTable("logs").addColumn("user_name", "varchar(255)").execute(), await t.schema.alterTable("logs").addColumn("auth0_client", "varchar(255)").execute(), await t.schema.alterTable("logs").addColumn("isMobile", "boolean").execute(), await t.schema.alterTable("logs").addColumn("connection", "varchar(255)").execute(), await t.schema.alterTable("logs").addColumn("connection_id", "varchar(255)").execute(), await t.schema.alterTable("logs").addColumn("audience", "varchar(255)").execute(), await t.schema.alterTable("logs").addColumn("scope", "varchar(255)").execute(), await t.schema.alterTable("logs").addColumn("strategy", "varchar(255)").execute(), await t.schema.alterTable("logs").addColumn("strategy_type", "varchar(255)").execute(), await t.schema.alterTable("logs").addColumn("hostname", "varchar(255)").execute(), await t.schema.alterTable("logs").addColumn("session_connection", "varchar(255)").execute();
|
|
3464
3524
|
}
|
|
3465
|
-
async function
|
|
3525
|
+
async function Jn(t) {
|
|
3466
3526
|
await t.schema.alterTable("logs").dropColumn("user_name").execute(), await t.schema.alterTable("logs").dropColumn("auth0_client").execute(), await t.schema.alterTable("logs").dropColumn("isMobile").execute(), await t.schema.alterTable("logs").dropColumn("connection").execute(), await t.schema.alterTable("logs").dropColumn("connection_id").execute(), await t.schema.alterTable("logs").dropColumn("audience").execute(), await t.schema.alterTable("logs").dropColumn("scope").execute(), await t.schema.alterTable("logs").dropColumn("strategy").execute(), await t.schema.alterTable("logs").dropColumn("strategy_type").execute(), await t.schema.alterTable("logs").dropColumn("hostname").execute(), await t.schema.alterTable("logs").dropColumn("session_connection").execute();
|
|
3467
3527
|
}
|
|
3468
|
-
const
|
|
3528
|
+
const Rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3469
3529
|
__proto__: null,
|
|
3470
|
-
down:
|
|
3471
|
-
up:
|
|
3530
|
+
down: Jn,
|
|
3531
|
+
up: En
|
|
3472
3532
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3473
|
-
async function
|
|
3533
|
+
async function Kn(t) {
|
|
3474
3534
|
await t.schema.createIndex("users_name_index").on("users").column("name").execute();
|
|
3475
3535
|
}
|
|
3476
|
-
async function
|
|
3536
|
+
async function Un(t) {
|
|
3477
3537
|
await t.schema.dropIndex("users_name_index").execute();
|
|
3478
3538
|
}
|
|
3479
|
-
const
|
|
3539
|
+
const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3480
3540
|
__proto__: null,
|
|
3481
|
-
down:
|
|
3482
|
-
up:
|
|
3541
|
+
down: Un,
|
|
3542
|
+
up: Kn
|
|
3483
3543
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3484
|
-
async function
|
|
3544
|
+
async function Qn(t) {
|
|
3485
3545
|
}
|
|
3486
|
-
async function
|
|
3546
|
+
async function qn(t) {
|
|
3487
3547
|
await t.schema.alterTable("users").dropConstraint("unique_email_provider").execute();
|
|
3488
3548
|
}
|
|
3489
|
-
const
|
|
3549
|
+
const Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3490
3550
|
__proto__: null,
|
|
3491
|
-
down:
|
|
3492
|
-
up:
|
|
3551
|
+
down: qn,
|
|
3552
|
+
up: Qn
|
|
3493
3553
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3494
|
-
async function
|
|
3554
|
+
async function Wn(t) {
|
|
3495
3555
|
await t.schema.alterTable("otps").dropColumn("state").execute(), await t.schema.alterTable("otps").addColumn("state", "varchar(8192)").execute();
|
|
3496
3556
|
}
|
|
3497
|
-
async function
|
|
3557
|
+
async function Gn(t) {
|
|
3498
3558
|
await t.schema.alterTable("otps").dropColumn("state").execute(), await t.schema.alterTable("otps").addColumn("state", "varchar(1024)").execute();
|
|
3499
3559
|
}
|
|
3500
|
-
const
|
|
3560
|
+
const Hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3501
3561
|
__proto__: null,
|
|
3502
|
-
down:
|
|
3503
|
-
up:
|
|
3562
|
+
down: Gn,
|
|
3563
|
+
up: Wn
|
|
3504
3564
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3505
|
-
async function
|
|
3565
|
+
async function Yn(t) {
|
|
3506
3566
|
await t.schema.alterTable("tickets").dropColumn("state").execute(), await t.schema.alterTable("tickets").addColumn("state", "varchar(8192)").execute();
|
|
3507
3567
|
}
|
|
3508
|
-
async function
|
|
3568
|
+
async function Xn(t) {
|
|
3509
3569
|
await t.schema.alterTable("tickets").dropColumn("state").execute(), await t.schema.alterTable("tickets").addColumn("state", "varchar(1024)").execute();
|
|
3510
3570
|
}
|
|
3511
|
-
const
|
|
3571
|
+
const Zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3512
3572
|
__proto__: null,
|
|
3513
|
-
down:
|
|
3514
|
-
up:
|
|
3573
|
+
down: Xn,
|
|
3574
|
+
up: Yn
|
|
3515
3575
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3516
|
-
async function
|
|
3576
|
+
async function eo(t) {
|
|
3517
3577
|
await t.schema.createTable("branding").addColumn(
|
|
3518
3578
|
"tenant_id",
|
|
3519
3579
|
"varchar(255)",
|
|
3520
3580
|
(e) => e.references("tenants.id").onDelete("cascade").notNull().primaryKey()
|
|
3521
3581
|
).addColumn("logo_url", "varchar(512)").addColumn("favicon_url", "varchar(512)").addColumn("font_url", "varchar(512)").addColumn("colors_primary", "varchar(8)").addColumn("colors_page_background_type", "varchar(32)").addColumn("colors_page_background_start", "varchar(8)").addColumn("colors_page_background_end", "varchar(8)").addColumn("colors_page_background_angle_dev", "integer").execute();
|
|
3522
3582
|
}
|
|
3523
|
-
async function
|
|
3583
|
+
async function to(t) {
|
|
3524
3584
|
await t.schema.dropTable("branding").execute();
|
|
3525
3585
|
}
|
|
3526
|
-
const
|
|
3586
|
+
const ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3527
3587
|
__proto__: null,
|
|
3528
|
-
down:
|
|
3529
|
-
up:
|
|
3588
|
+
down: to,
|
|
3589
|
+
up: eo
|
|
3530
3590
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3531
|
-
async function
|
|
3591
|
+
async function ao(t) {
|
|
3532
3592
|
}
|
|
3533
|
-
async function
|
|
3593
|
+
async function no(t) {
|
|
3534
3594
|
}
|
|
3535
|
-
const
|
|
3595
|
+
const oo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3536
3596
|
__proto__: null,
|
|
3537
|
-
down:
|
|
3538
|
-
up:
|
|
3597
|
+
down: no,
|
|
3598
|
+
up: ao
|
|
3539
3599
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3540
|
-
async function
|
|
3600
|
+
async function so(t) {
|
|
3541
3601
|
}
|
|
3542
|
-
async function
|
|
3602
|
+
async function io(t) {
|
|
3543
3603
|
}
|
|
3544
|
-
const
|
|
3604
|
+
const lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3545
3605
|
__proto__: null,
|
|
3546
|
-
down:
|
|
3547
|
-
up:
|
|
3606
|
+
down: io,
|
|
3607
|
+
up: so
|
|
3548
3608
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3549
|
-
async function
|
|
3609
|
+
async function co(t) {
|
|
3550
3610
|
}
|
|
3551
|
-
async function
|
|
3611
|
+
async function uo(t) {
|
|
3552
3612
|
}
|
|
3553
|
-
const
|
|
3613
|
+
const mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3554
3614
|
__proto__: null,
|
|
3555
|
-
down:
|
|
3556
|
-
up:
|
|
3615
|
+
down: uo,
|
|
3616
|
+
up: co
|
|
3557
3617
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3558
|
-
async function
|
|
3618
|
+
async function _o(t) {
|
|
3559
3619
|
}
|
|
3560
|
-
async function
|
|
3620
|
+
async function ho(t) {
|
|
3561
3621
|
}
|
|
3562
|
-
const
|
|
3622
|
+
const fo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3563
3623
|
__proto__: null,
|
|
3564
|
-
down:
|
|
3565
|
-
up:
|
|
3624
|
+
down: ho,
|
|
3625
|
+
up: _o
|
|
3566
3626
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3567
|
-
async function
|
|
3627
|
+
async function po(t) {
|
|
3568
3628
|
await t.schema.createTable("authentication_codes").addColumn(
|
|
3569
3629
|
"tenant_id",
|
|
3570
3630
|
"varchar(255)",
|
|
@@ -3575,55 +3635,55 @@ async function mo(t) {
|
|
|
3575
3635
|
(e) => e.references("applications.id").onDelete("cascade").notNull()
|
|
3576
3636
|
).addColumn("user_id", "varchar(255)", (e) => e.notNull()).addColumn("nonce", "varchar(255)").addColumn("state", "varchar(8192)").addColumn("scope", "varchar(1024)").addColumn("response_type", "varchar(256)").addColumn("response_mode", "varchar(256)").addColumn("redirect_uri", "varchar(1024)").addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("expires_at", "varchar(255)", (e) => e.notNull()).addColumn("used_at", "varchar(255)").execute();
|
|
3577
3637
|
}
|
|
3578
|
-
async function
|
|
3638
|
+
async function go(t) {
|
|
3579
3639
|
await t.schema.dropTable("authentication_codes").execute();
|
|
3580
3640
|
}
|
|
3581
|
-
const
|
|
3641
|
+
const wo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3582
3642
|
__proto__: null,
|
|
3583
|
-
down:
|
|
3584
|
-
up:
|
|
3643
|
+
down: go,
|
|
3644
|
+
up: po
|
|
3585
3645
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3586
|
-
async function
|
|
3646
|
+
async function yo(t) {
|
|
3587
3647
|
}
|
|
3588
|
-
async function
|
|
3648
|
+
async function vo(t) {
|
|
3589
3649
|
}
|
|
3590
|
-
const
|
|
3650
|
+
const No = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3591
3651
|
__proto__: null,
|
|
3592
|
-
down:
|
|
3593
|
-
up:
|
|
3652
|
+
down: vo,
|
|
3653
|
+
up: yo
|
|
3594
3654
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3595
|
-
async function
|
|
3655
|
+
async function Co(t) {
|
|
3596
3656
|
await t.schema.alterTable("otps").addColumn("ip", "varchar(64)").execute();
|
|
3597
3657
|
}
|
|
3598
|
-
async function
|
|
3658
|
+
async function bo(t) {
|
|
3599
3659
|
await t.schema.alterTable("otps").dropColumn("ip").execute();
|
|
3600
3660
|
}
|
|
3601
|
-
const
|
|
3661
|
+
const xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3602
3662
|
__proto__: null,
|
|
3603
|
-
down:
|
|
3604
|
-
up:
|
|
3663
|
+
down: bo,
|
|
3664
|
+
up: Co
|
|
3605
3665
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3606
|
-
async function
|
|
3666
|
+
async function To(t) {
|
|
3607
3667
|
await t.schema.alterTable("logs").dropColumn("user_agent").execute(), await t.schema.alterTable("logs").addColumn("user_agent", "varchar(1024)").execute();
|
|
3608
3668
|
}
|
|
3609
|
-
async function
|
|
3669
|
+
async function So(t) {
|
|
3610
3670
|
await t.schema.alterTable("logs").dropColumn("user_agent").execute(), await t.schema.alterTable("logs").addColumn("user_agent", "varchar(255)").execute();
|
|
3611
3671
|
}
|
|
3612
|
-
const
|
|
3672
|
+
const Oo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3613
3673
|
__proto__: null,
|
|
3614
|
-
down:
|
|
3615
|
-
up:
|
|
3674
|
+
down: So,
|
|
3675
|
+
up: To
|
|
3616
3676
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3617
|
-
async function
|
|
3677
|
+
async function ko(t) {
|
|
3618
3678
|
}
|
|
3619
|
-
async function
|
|
3679
|
+
async function $o(t) {
|
|
3620
3680
|
}
|
|
3621
|
-
const
|
|
3681
|
+
const Io = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3622
3682
|
__proto__: null,
|
|
3623
|
-
down:
|
|
3624
|
-
up:
|
|
3683
|
+
down: $o,
|
|
3684
|
+
up: ko
|
|
3625
3685
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3626
|
-
async function
|
|
3686
|
+
async function Do(t) {
|
|
3627
3687
|
await t.schema.createTable("hooks").addColumn("hook_id", "varchar(255)", (e) => e.notNull().primaryKey()).addColumn(
|
|
3628
3688
|
"tenant_id",
|
|
3629
3689
|
"varchar(255)",
|
|
@@ -3634,33 +3694,33 @@ async function Oo(t) {
|
|
|
3634
3694
|
(e) => e.defaultTo(!1).notNull()
|
|
3635
3695
|
).addColumn("priority", "integer").execute();
|
|
3636
3696
|
}
|
|
3637
|
-
async function
|
|
3697
|
+
async function Po(t) {
|
|
3638
3698
|
await t.schema.dropTable("hooks").execute();
|
|
3639
3699
|
}
|
|
3640
|
-
const
|
|
3700
|
+
const jo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3641
3701
|
__proto__: null,
|
|
3642
|
-
down:
|
|
3643
|
-
up:
|
|
3702
|
+
down: Po,
|
|
3703
|
+
up: Do
|
|
3644
3704
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3645
|
-
async function
|
|
3705
|
+
async function Fo(t) {
|
|
3646
3706
|
}
|
|
3647
|
-
async function
|
|
3707
|
+
async function Mo(t) {
|
|
3648
3708
|
}
|
|
3649
|
-
const
|
|
3709
|
+
const Ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3650
3710
|
__proto__: null,
|
|
3651
|
-
down:
|
|
3652
|
-
up:
|
|
3711
|
+
down: Mo,
|
|
3712
|
+
up: Fo
|
|
3653
3713
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3654
|
-
async function
|
|
3714
|
+
async function zo(t) {
|
|
3655
3715
|
}
|
|
3656
|
-
async function
|
|
3716
|
+
async function Lo(t) {
|
|
3657
3717
|
}
|
|
3658
|
-
const
|
|
3718
|
+
const Eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3659
3719
|
__proto__: null,
|
|
3660
|
-
down:
|
|
3661
|
-
up:
|
|
3720
|
+
down: Lo,
|
|
3721
|
+
up: zo
|
|
3662
3722
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3663
|
-
async function
|
|
3723
|
+
async function Jo(t) {
|
|
3664
3724
|
await t.schema.createTable("logins").addColumn("login_id", "varchar(255)", (e) => e.primaryKey()).addColumn(
|
|
3665
3725
|
"tenant_id",
|
|
3666
3726
|
"varchar(255)",
|
|
@@ -3677,7 +3737,7 @@ async function Ao(t) {
|
|
|
3677
3737
|
(e) => e.onDelete("cascade")
|
|
3678
3738
|
).addColumn("code_type", "varchar(255)", (e) => e.notNull()).addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("expires_at", "varchar(255)", (e) => e.notNull()).addColumn("used_at", "varchar(255)").execute();
|
|
3679
3739
|
}
|
|
3680
|
-
async function
|
|
3740
|
+
async function Ro(t) {
|
|
3681
3741
|
await t.schema.dropTable("logins").execute(), await t.schema.alterTable("passwords").dropColumn("algorithm").execute(), await t.schema.dropTable("codes").execute(), await t.schema.createTable("codes").addColumn("id", "varchar(255)", (e) => e.primaryKey()).addColumn("code", "varchar(255)", (e) => e.notNull()).addColumn("user_id", "varchar(255)").addColumn("tenant_id", "varchar(255)").addForeignKeyConstraint(
|
|
3682
3742
|
"codes_user_id_tenant_id_constraint",
|
|
3683
3743
|
["user_id", "tenant_id"],
|
|
@@ -3686,90 +3746,90 @@ async function zo(t) {
|
|
|
3686
3746
|
(e) => e.onDelete("cascade")
|
|
3687
3747
|
).addColumn("type", "varchar(255)", (e) => e.notNull()).addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("expires_at", "varchar(255)", (e) => e.notNull()).addColumn("used_at", "varchar(255)").execute();
|
|
3688
3748
|
}
|
|
3689
|
-
const
|
|
3749
|
+
const Ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3690
3750
|
__proto__: null,
|
|
3691
|
-
down:
|
|
3692
|
-
up:
|
|
3751
|
+
down: Ro,
|
|
3752
|
+
up: Jo
|
|
3693
3753
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3694
|
-
async function
|
|
3754
|
+
async function Uo(t) {
|
|
3695
3755
|
}
|
|
3696
|
-
async function
|
|
3756
|
+
async function Bo(t) {
|
|
3697
3757
|
}
|
|
3698
|
-
const
|
|
3758
|
+
const Qo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3699
3759
|
__proto__: null,
|
|
3700
|
-
down:
|
|
3701
|
-
up:
|
|
3760
|
+
down: Bo,
|
|
3761
|
+
up: Uo
|
|
3702
3762
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3703
|
-
async function
|
|
3763
|
+
async function qo(t) {
|
|
3704
3764
|
await t.schema.alterTable("logins").addColumn("auth0Client", "varchar(256)").execute();
|
|
3705
3765
|
}
|
|
3706
|
-
async function
|
|
3766
|
+
async function Vo(t) {
|
|
3707
3767
|
await t.schema.alterTable("logins").dropColumn("auth0Client").execute();
|
|
3708
3768
|
}
|
|
3709
|
-
const
|
|
3769
|
+
const Wo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3710
3770
|
__proto__: null,
|
|
3711
|
-
down:
|
|
3712
|
-
up:
|
|
3771
|
+
down: Vo,
|
|
3772
|
+
up: qo
|
|
3713
3773
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3714
|
-
async function
|
|
3774
|
+
async function Go(t) {
|
|
3715
3775
|
await t.schema.alterTable("logins").dropColumn("authParams_state").execute(), await t.schema.alterTable("logins").addColumn("authParams_state", "varchar(8192)").execute();
|
|
3716
3776
|
}
|
|
3717
|
-
async function
|
|
3777
|
+
async function Ho(t) {
|
|
3718
3778
|
await t.schema.alterTable("logins").dropColumn("authParams_state").execute(), await t.schema.alterTable("logins").addColumn("authParams_state", "varchar(511)").execute();
|
|
3719
3779
|
}
|
|
3720
|
-
const
|
|
3780
|
+
const Yo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3721
3781
|
__proto__: null,
|
|
3722
|
-
down:
|
|
3723
|
-
up:
|
|
3782
|
+
down: Ho,
|
|
3783
|
+
up: Go
|
|
3724
3784
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3725
|
-
async function
|
|
3785
|
+
async function Xo(t) {
|
|
3726
3786
|
}
|
|
3727
|
-
async function
|
|
3787
|
+
async function Zo(t) {
|
|
3728
3788
|
}
|
|
3729
|
-
const
|
|
3789
|
+
const es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3730
3790
|
__proto__: null,
|
|
3731
|
-
down:
|
|
3732
|
-
up:
|
|
3791
|
+
down: Zo,
|
|
3792
|
+
up: Xo
|
|
3733
3793
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3734
|
-
async function
|
|
3794
|
+
async function ts(t) {
|
|
3735
3795
|
}
|
|
3736
|
-
async function
|
|
3796
|
+
async function rs(t) {
|
|
3737
3797
|
}
|
|
3738
|
-
const
|
|
3798
|
+
const as = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3739
3799
|
__proto__: null,
|
|
3740
|
-
down:
|
|
3741
|
-
up:
|
|
3800
|
+
down: rs,
|
|
3801
|
+
up: ts
|
|
3742
3802
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3743
|
-
async function
|
|
3803
|
+
async function ns(t) {
|
|
3744
3804
|
await t.schema.alterTable("logins").addColumn("authParams_nonce", "varchar(255)").execute();
|
|
3745
3805
|
}
|
|
3746
|
-
async function
|
|
3806
|
+
async function os(t) {
|
|
3747
3807
|
await t.schema.alterTable("logins").dropColumn("nonce").execute();
|
|
3748
3808
|
}
|
|
3749
|
-
const
|
|
3809
|
+
const ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3750
3810
|
__proto__: null,
|
|
3751
|
-
down:
|
|
3752
|
-
up:
|
|
3811
|
+
down: os,
|
|
3812
|
+
up: ns
|
|
3753
3813
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3754
|
-
async function
|
|
3814
|
+
async function is(t) {
|
|
3755
3815
|
}
|
|
3756
|
-
async function
|
|
3816
|
+
async function ls(t) {
|
|
3757
3817
|
}
|
|
3758
|
-
const
|
|
3818
|
+
const cs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3759
3819
|
__proto__: null,
|
|
3760
|
-
down:
|
|
3761
|
-
up:
|
|
3820
|
+
down: ls,
|
|
3821
|
+
up: is
|
|
3762
3822
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3763
|
-
async function
|
|
3823
|
+
async function ds(t) {
|
|
3764
3824
|
}
|
|
3765
|
-
async function
|
|
3825
|
+
async function us(t) {
|
|
3766
3826
|
}
|
|
3767
|
-
const
|
|
3827
|
+
const ms = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3768
3828
|
__proto__: null,
|
|
3769
|
-
down:
|
|
3770
|
-
up:
|
|
3829
|
+
down: us,
|
|
3830
|
+
up: ds
|
|
3771
3831
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3772
|
-
async function
|
|
3832
|
+
async function _s(t) {
|
|
3773
3833
|
await t.schema.dropTable("codes").execute(), await t.schema.createTable("codes").addColumn("code_id", "varchar(255)", (e) => e.notNull()).addColumn(
|
|
3774
3834
|
"tenant_id",
|
|
3775
3835
|
"varchar(255)",
|
|
@@ -3785,7 +3845,7 @@ async function cs(t) {
|
|
|
3785
3845
|
"code_type"
|
|
3786
3846
|
]).execute();
|
|
3787
3847
|
}
|
|
3788
|
-
async function
|
|
3848
|
+
async function hs(t) {
|
|
3789
3849
|
await t.schema.dropTable("codes").execute(), await t.schema.createTable("codes").addColumn("code_id", "varchar(255)", (e) => e.primaryKey()).addColumn(
|
|
3790
3850
|
"tenant_id",
|
|
3791
3851
|
"varchar(255)",
|
|
@@ -3798,15 +3858,15 @@ async function ds(t) {
|
|
|
3798
3858
|
(e) => e.onDelete("cascade")
|
|
3799
3859
|
).addColumn("code_type", "varchar(255)", (e) => e.notNull()).addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("expires_at", "varchar(255)", (e) => e.notNull()).addColumn("used_at", "varchar(255)").execute();
|
|
3800
3860
|
}
|
|
3801
|
-
const
|
|
3861
|
+
const fs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3802
3862
|
__proto__: null,
|
|
3803
|
-
down:
|
|
3804
|
-
up:
|
|
3863
|
+
down: hs,
|
|
3864
|
+
up: _s
|
|
3805
3865
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3806
|
-
async function
|
|
3866
|
+
async function ps(t) {
|
|
3807
3867
|
await t.schema.dropTable("otps").execute(), await t.schema.dropTable("authentication_codes").execute();
|
|
3808
3868
|
}
|
|
3809
|
-
async function
|
|
3869
|
+
async function gs(t) {
|
|
3810
3870
|
await t.schema.alterTable("keys").addColumn("private_key", "varchar(2048)").addColumn("public_key", "varchar(2048)").execute(), await t.schema.createTable("otps").addColumn(
|
|
3811
3871
|
"tenant_id",
|
|
3812
3872
|
"varchar(255)",
|
|
@@ -3825,32 +3885,32 @@ async function _s(t) {
|
|
|
3825
3885
|
(e) => e.references("applications.id").onDelete("cascade").notNull()
|
|
3826
3886
|
).addColumn("user_id", "varchar(255)", (e) => e.notNull()).addColumn("nonce", "varchar(255)").addColumn("state", "varchar(8192)").addColumn("scope", "varchar(1024)").addColumn("response_type", "varchar(256)").addColumn("response_mode", "varchar(256)").addColumn("redirect_uri", "varchar(1024)").addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("expires_at", "varchar(255)", (e) => e.notNull()).addColumn("used_at", "varchar(255)").execute();
|
|
3827
3887
|
}
|
|
3828
|
-
const
|
|
3888
|
+
const ws = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3829
3889
|
__proto__: null,
|
|
3830
|
-
down:
|
|
3831
|
-
up:
|
|
3890
|
+
down: gs,
|
|
3891
|
+
up: ps
|
|
3832
3892
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3833
|
-
async function
|
|
3893
|
+
async function ys(t) {
|
|
3834
3894
|
await t.schema.createIndex("IDX_logs_tenant_date_type_user").on("logs").columns(["tenant_id", "date", "type", "user_id"]).execute();
|
|
3835
3895
|
}
|
|
3836
|
-
async function
|
|
3896
|
+
async function vs(t) {
|
|
3837
3897
|
await t.schema.dropIndex("IDX_logs_tenant_date_type_user").on("logs").execute();
|
|
3838
3898
|
}
|
|
3839
|
-
const
|
|
3899
|
+
const Ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3840
3900
|
__proto__: null,
|
|
3841
|
-
down:
|
|
3842
|
-
up:
|
|
3901
|
+
down: vs,
|
|
3902
|
+
up: ys
|
|
3843
3903
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3844
|
-
async function
|
|
3904
|
+
async function Cs(t) {
|
|
3845
3905
|
}
|
|
3846
|
-
async function
|
|
3906
|
+
async function bs(t) {
|
|
3847
3907
|
}
|
|
3848
|
-
const
|
|
3908
|
+
const xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3849
3909
|
__proto__: null,
|
|
3850
|
-
down:
|
|
3851
|
-
up:
|
|
3910
|
+
down: bs,
|
|
3911
|
+
up: Cs
|
|
3852
3912
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3853
|
-
async function
|
|
3913
|
+
async function Ts(t) {
|
|
3854
3914
|
await t.schema.createTable("prompt_settings").addColumn("tenant_id", "varchar(64)", (e) => e.primaryKey()).addColumn(
|
|
3855
3915
|
"universal_login_experience",
|
|
3856
3916
|
"varchar(16)",
|
|
@@ -3869,95 +3929,95 @@ async function Ns(t) {
|
|
|
3869
3929
|
(e) => e.defaultTo(!1).notNull()
|
|
3870
3930
|
).execute();
|
|
3871
3931
|
}
|
|
3872
|
-
async function
|
|
3932
|
+
async function Ss(t) {
|
|
3873
3933
|
await t.schema.dropTable("prompt_settings").execute();
|
|
3874
3934
|
}
|
|
3875
|
-
const
|
|
3935
|
+
const Os = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3876
3936
|
__proto__: null,
|
|
3877
|
-
down:
|
|
3878
|
-
up:
|
|
3937
|
+
down: Ss,
|
|
3938
|
+
up: Ts
|
|
3879
3939
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3880
|
-
async function
|
|
3940
|
+
async function ks(t) {
|
|
3881
3941
|
}
|
|
3882
|
-
async function
|
|
3942
|
+
async function $s(t) {
|
|
3883
3943
|
}
|
|
3884
|
-
const
|
|
3944
|
+
const Is = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3885
3945
|
__proto__: null,
|
|
3886
|
-
down:
|
|
3887
|
-
up:
|
|
3946
|
+
down: $s,
|
|
3947
|
+
up: ks
|
|
3888
3948
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3889
|
-
async function
|
|
3949
|
+
async function Ds(t) {
|
|
3890
3950
|
}
|
|
3891
|
-
async function
|
|
3951
|
+
async function Ps(t) {
|
|
3892
3952
|
}
|
|
3893
|
-
const
|
|
3953
|
+
const js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3894
3954
|
__proto__: null,
|
|
3895
|
-
down:
|
|
3896
|
-
up:
|
|
3955
|
+
down: Ps,
|
|
3956
|
+
up: Ds
|
|
3897
3957
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3898
|
-
async function
|
|
3958
|
+
async function Fs(t) {
|
|
3899
3959
|
}
|
|
3900
|
-
async function
|
|
3960
|
+
async function Ms(t) {
|
|
3901
3961
|
}
|
|
3902
|
-
const
|
|
3962
|
+
const As = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3903
3963
|
__proto__: null,
|
|
3904
|
-
down:
|
|
3905
|
-
up:
|
|
3964
|
+
down: Ms,
|
|
3965
|
+
up: Fs
|
|
3906
3966
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3907
|
-
async function
|
|
3967
|
+
async function zs(t) {
|
|
3908
3968
|
await t.schema.alterTable("logins").addColumn("authParams_ui_locales", "varchar(32)").execute();
|
|
3909
3969
|
}
|
|
3910
|
-
async function
|
|
3970
|
+
async function Ls(t) {
|
|
3911
3971
|
await t.schema.alterTable("logins").dropColumn("authParams_ui_locales").execute();
|
|
3912
3972
|
}
|
|
3913
|
-
const
|
|
3973
|
+
const Es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3914
3974
|
__proto__: null,
|
|
3915
|
-
down:
|
|
3916
|
-
up:
|
|
3975
|
+
down: Ls,
|
|
3976
|
+
up: zs
|
|
3917
3977
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3918
|
-
async function
|
|
3978
|
+
async function Js(t) {
|
|
3919
3979
|
await t.schema.alterTable("logins").addColumn("authParams_prompt", "varchar(16)").execute();
|
|
3920
3980
|
}
|
|
3921
|
-
async function
|
|
3981
|
+
async function Rs(t) {
|
|
3922
3982
|
await t.schema.alterTable("logins").dropColumn("authParams_prompt").execute();
|
|
3923
3983
|
}
|
|
3924
|
-
const
|
|
3984
|
+
const Ks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3925
3985
|
__proto__: null,
|
|
3926
|
-
down:
|
|
3927
|
-
up:
|
|
3986
|
+
down: Rs,
|
|
3987
|
+
up: Js
|
|
3928
3988
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3929
|
-
async function
|
|
3989
|
+
async function Us(t) {
|
|
3930
3990
|
}
|
|
3931
|
-
async function
|
|
3991
|
+
async function Bs(t) {
|
|
3932
3992
|
}
|
|
3933
|
-
const
|
|
3993
|
+
const Qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3934
3994
|
__proto__: null,
|
|
3935
|
-
down:
|
|
3936
|
-
up:
|
|
3995
|
+
down: Bs,
|
|
3996
|
+
up: Us
|
|
3937
3997
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3938
|
-
async function
|
|
3998
|
+
async function qs(t) {
|
|
3939
3999
|
await t.schema.alterTable("logins").addColumn("authParams_act_as", "varchar(255)").execute();
|
|
3940
4000
|
}
|
|
3941
|
-
async function
|
|
4001
|
+
async function Vs(t) {
|
|
3942
4002
|
await t.schema.alterTable("logins").dropColumn("authParam_act_as").execute();
|
|
3943
4003
|
}
|
|
3944
|
-
const
|
|
4004
|
+
const Ws = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3945
4005
|
__proto__: null,
|
|
3946
|
-
down:
|
|
3947
|
-
up:
|
|
4006
|
+
down: Vs,
|
|
4007
|
+
up: qs
|
|
3948
4008
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3949
|
-
async function
|
|
4009
|
+
async function Gs(t) {
|
|
3950
4010
|
await t.schema.alterTable("codes").addColumn("code_verifier", "varchar(128)").execute();
|
|
3951
4011
|
}
|
|
3952
|
-
async function
|
|
4012
|
+
async function Hs(t) {
|
|
3953
4013
|
await t.schema.alterTable("codes").dropColumn("code_verifier").execute();
|
|
3954
4014
|
}
|
|
3955
|
-
const
|
|
4015
|
+
const Ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3956
4016
|
__proto__: null,
|
|
3957
|
-
down:
|
|
3958
|
-
up:
|
|
4017
|
+
down: Hs,
|
|
4018
|
+
up: Gs
|
|
3959
4019
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3960
|
-
async function
|
|
4020
|
+
async function Xs(t) {
|
|
3961
4021
|
await t.schema.createTable("email_providers").addColumn("tenant_id", "varchar(255)", (e) => e.primaryKey()).addColumn("name", "varchar(255)", (e) => e.notNull()).addColumn("enabled", "boolean", (e) => e.notNull()).addColumn("default_from_address", "varchar(255)").addColumn(
|
|
3962
4022
|
"credentials",
|
|
3963
4023
|
"varchar(2048)",
|
|
@@ -3968,18 +4028,18 @@ async function Ws(t) {
|
|
|
3968
4028
|
(e) => e.notNull().defaultTo("{}")
|
|
3969
4029
|
).addColumn("created_at", "varchar(29)", (e) => e.notNull()).addColumn("updated_at", "varchar(29)", (e) => e.notNull()).execute();
|
|
3970
4030
|
}
|
|
3971
|
-
async function
|
|
4031
|
+
async function Zs(t) {
|
|
3972
4032
|
await t.schema.dropTable("email_providers").execute();
|
|
3973
4033
|
}
|
|
3974
|
-
const
|
|
4034
|
+
const ei = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3975
4035
|
__proto__: null,
|
|
3976
|
-
down:
|
|
3977
|
-
up:
|
|
4036
|
+
down: Zs,
|
|
4037
|
+
up: Xs
|
|
3978
4038
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3979
|
-
async function
|
|
4039
|
+
async function ti(t) {
|
|
3980
4040
|
await t.schema.dropTable("tickets").execute();
|
|
3981
4041
|
}
|
|
3982
|
-
async function
|
|
4042
|
+
async function ri(t) {
|
|
3983
4043
|
await t.schema.createTable("tickets").addColumn(
|
|
3984
4044
|
"tenant_id",
|
|
3985
4045
|
"varchar(255)",
|
|
@@ -3990,22 +4050,22 @@ async function Ys(t) {
|
|
|
3990
4050
|
(e) => e.references("applications.id").onDelete("cascade").notNull()
|
|
3991
4051
|
).addColumn("email", "varchar(255)", (e) => e.notNull()).addColumn("nonce", "varchar(255)").addColumn("state", "varchar(1024)").addColumn("scope", "varchar(1024)").addColumn("response_type", "varchar(256)").addColumn("response_mode", "varchar(256)").addColumn("redirect_uri", "varchar(1024)").addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("expires_at", "varchar(255)", (e) => e.notNull()).addColumn("used_at", "varchar(255)").execute();
|
|
3992
4052
|
}
|
|
3993
|
-
const
|
|
4053
|
+
const ai = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3994
4054
|
__proto__: null,
|
|
3995
|
-
down:
|
|
3996
|
-
up:
|
|
4055
|
+
down: ri,
|
|
4056
|
+
up: ti
|
|
3997
4057
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3998
|
-
async function
|
|
4058
|
+
async function ni(t) {
|
|
3999
4059
|
}
|
|
4000
|
-
async function
|
|
4060
|
+
async function oi(t) {
|
|
4001
4061
|
await t.schema.alterTable("logins").dropColumn("ip").dropColumn("useragent").execute();
|
|
4002
4062
|
}
|
|
4003
|
-
const
|
|
4063
|
+
const si = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4004
4064
|
__proto__: null,
|
|
4005
|
-
down:
|
|
4006
|
-
up:
|
|
4065
|
+
down: oi,
|
|
4066
|
+
up: ni
|
|
4007
4067
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4008
|
-
async function
|
|
4068
|
+
async function ii(t) {
|
|
4009
4069
|
await t.schema.createTable("refresh_tokens").addColumn("id", "varchar(21)", (e) => e.primaryKey()).addColumn(
|
|
4010
4070
|
"client_id",
|
|
4011
4071
|
"varchar(21)",
|
|
@@ -4018,27 +4078,27 @@ async function ai(t) {
|
|
|
4018
4078
|
(e) => e.onDelete("cascade")
|
|
4019
4079
|
).addColumn("created_at", "varchar(35)", (e) => e.notNull()).addColumn("expires_at", "varchar(35)").addColumn("idle_expires_at", "varchar(35)").addColumn("last_exchanged_at", "varchar(35)").addColumn("device", "varchar(2048)", (e) => e.notNull()).addColumn("resource_servers", "varchar(2048)", (e) => e.notNull()).addColumn("rotating", "boolean", (e) => e.notNull()).execute();
|
|
4020
4080
|
}
|
|
4021
|
-
async function
|
|
4081
|
+
async function li(t) {
|
|
4022
4082
|
await t.schema.dropTable("refresh_tokens").execute();
|
|
4023
4083
|
}
|
|
4024
|
-
const
|
|
4084
|
+
const ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4025
4085
|
__proto__: null,
|
|
4026
|
-
down:
|
|
4027
|
-
up:
|
|
4086
|
+
down: li,
|
|
4087
|
+
up: ii
|
|
4028
4088
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4029
|
-
async function
|
|
4089
|
+
async function di(t) {
|
|
4030
4090
|
}
|
|
4031
|
-
async function
|
|
4091
|
+
async function ui(t) {
|
|
4032
4092
|
}
|
|
4033
|
-
const
|
|
4093
|
+
const mi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4034
4094
|
__proto__: null,
|
|
4035
|
-
down:
|
|
4036
|
-
up:
|
|
4095
|
+
down: ui,
|
|
4096
|
+
up: di
|
|
4037
4097
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4038
|
-
async function
|
|
4098
|
+
async function _i(t) {
|
|
4039
4099
|
await t.schema.dropTable("sessions").execute(), await t.schema.dropTable("refresh_tokens").execute();
|
|
4040
4100
|
}
|
|
4041
|
-
async function
|
|
4101
|
+
async function hi(t) {
|
|
4042
4102
|
await t.schema.createTable("sessions").addColumn("id", "varchar(21)", (e) => e.primaryKey()).addColumn("tenant_id", "varchar(255)").addColumn("user_id", "varchar(255)").addForeignKeyConstraint(
|
|
4043
4103
|
"sessions_user_id_constraint",
|
|
4044
4104
|
["user_id", "tenant_id"],
|
|
@@ -4057,12 +4117,12 @@ async function di(t) {
|
|
|
4057
4117
|
(e) => e.onDelete("cascade")
|
|
4058
4118
|
).addColumn("created_at", "varchar(35)", (e) => e.notNull()).addColumn("expires_at", "varchar(35)").addColumn("idle_expires_at", "varchar(35)").addColumn("last_exchanged_at", "varchar(35)").addColumn("device", "varchar(2048)", (e) => e.notNull()).addColumn("resource_servers", "varchar(2048)", (e) => e.notNull()).addColumn("rotating", "boolean", (e) => e.notNull()).execute();
|
|
4059
4119
|
}
|
|
4060
|
-
const
|
|
4120
|
+
const fi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4061
4121
|
__proto__: null,
|
|
4062
|
-
down:
|
|
4063
|
-
up:
|
|
4122
|
+
down: hi,
|
|
4123
|
+
up: _i
|
|
4064
4124
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4065
|
-
async function
|
|
4125
|
+
async function pi(t) {
|
|
4066
4126
|
await t.schema.createTable("sessions_2").addColumn("id", "varchar(21)", (e) => e.primaryKey()).addColumn("tenant_id", "varchar(255)").addColumn("user_id", "varchar(255)").addForeignKeyConstraint(
|
|
4067
4127
|
"sessions_2_user_id_constraint",
|
|
4068
4128
|
["user_id", "tenant_id"],
|
|
@@ -4081,15 +4141,15 @@ async function mi(t) {
|
|
|
4081
4141
|
(e) => e.onDelete("cascade")
|
|
4082
4142
|
).addColumn("created_at", "varchar(35)", (e) => e.notNull()).addColumn("expires_at", "varchar(35)").addColumn("idle_expires_at", "varchar(35)").addColumn("last_exchanged_at", "varchar(35)").addColumn("device", "varchar(2048)", (e) => e.notNull()).addColumn("resource_servers", "varchar(2048)", (e) => e.notNull()).addColumn("rotating", "boolean", (e) => e.notNull()).execute();
|
|
4083
4143
|
}
|
|
4084
|
-
async function
|
|
4144
|
+
async function gi(t) {
|
|
4085
4145
|
await t.schema.dropTable("sessions_2").execute(), await t.schema.dropTable("refresh_tokens_2").execute();
|
|
4086
4146
|
}
|
|
4087
|
-
const
|
|
4147
|
+
const wi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4088
4148
|
__proto__: null,
|
|
4089
|
-
down:
|
|
4090
|
-
up:
|
|
4149
|
+
down: gi,
|
|
4150
|
+
up: pi
|
|
4091
4151
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4092
|
-
async function
|
|
4152
|
+
async function yi(t) {
|
|
4093
4153
|
await t.schema.createTable("custom_domains").addColumn(
|
|
4094
4154
|
"custom_domain_id",
|
|
4095
4155
|
"varchar(21)",
|
|
@@ -4100,49 +4160,49 @@ async function fi(t) {
|
|
|
4100
4160
|
(e) => e.references("tenants.id").onDelete("cascade").notNull()
|
|
4101
4161
|
).addColumn("domain", "varchar(255)", (e) => e.notNull()).addColumn("primary", "boolean", (e) => e.notNull()).addColumn("status", "varchar(50)", (e) => e.notNull()).addColumn("type", "varchar(50)", (e) => e.notNull()).addColumn("origin_domain_name", "varchar(255)").addColumn("verification", "varchar(2048)").addColumn("custom_client_ip_header", "varchar(50)").addColumn("tls_policy", "varchar(50)").addColumn("domain_metadata", "varchar(2048)").addColumn("created_at", "varchar(35)", (e) => e.notNull()).addColumn("updated_at", "varchar(35)", (e) => e.notNull()).execute(), await t.schema.dropTable("domains").execute();
|
|
4102
4162
|
}
|
|
4103
|
-
async function
|
|
4163
|
+
async function vi(t) {
|
|
4104
4164
|
await t.schema.dropTable("custom_domains").execute(), await t.schema.createTable("domains").addColumn("id", "varchar(255)", (e) => e.notNull().primaryKey()).addColumn(
|
|
4105
4165
|
"tenant_id",
|
|
4106
4166
|
"varchar(255)",
|
|
4107
4167
|
(e) => e.references("tenants.id").onDelete("cascade").notNull()
|
|
4108
4168
|
).addColumn("domain", "varchar(255)", (e) => e.notNull()).addColumn("email_service", "varchar(255)").addColumn("email_api_key", "varchar(255)").addColumn("dkim_private_key", "varchar(2048)").addColumn("dkim_public_key", "varchar(2048)").addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("updated_at", "varchar(255)", (e) => e.notNull()).execute();
|
|
4109
4169
|
}
|
|
4110
|
-
const
|
|
4170
|
+
const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4111
4171
|
__proto__: null,
|
|
4112
|
-
down:
|
|
4113
|
-
up:
|
|
4172
|
+
down: vi,
|
|
4173
|
+
up: yi
|
|
4114
4174
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4115
|
-
async function
|
|
4175
|
+
async function Ci(t) {
|
|
4116
4176
|
}
|
|
4117
|
-
async function
|
|
4177
|
+
async function bi(t) {
|
|
4118
4178
|
await t.schema.alterTable("logins").dropColumn("authParams_organization").dropColumn("authorization_url").execute();
|
|
4119
4179
|
}
|
|
4120
|
-
const
|
|
4180
|
+
const xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4121
4181
|
__proto__: null,
|
|
4122
|
-
down:
|
|
4123
|
-
up:
|
|
4182
|
+
down: bi,
|
|
4183
|
+
up: Ci
|
|
4124
4184
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4125
|
-
async function
|
|
4185
|
+
async function Ti(t) {
|
|
4126
4186
|
await t.schema.alterTable("logins").dropColumn("authorization_url").execute(), await t.schema.alterTable("logins").addColumn("authorization_url", "varchar(2048)").execute();
|
|
4127
4187
|
}
|
|
4128
|
-
async function
|
|
4188
|
+
async function Si(t) {
|
|
4129
4189
|
await t.schema.alterTable("logins").dropColumn("authorization_url").execute(), await t.schema.alterTable("logins").addColumn("authorization_url", "varchar(1024)").execute();
|
|
4130
4190
|
}
|
|
4131
|
-
const
|
|
4191
|
+
const Oi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4132
4192
|
__proto__: null,
|
|
4133
|
-
down:
|
|
4134
|
-
up:
|
|
4193
|
+
down: Si,
|
|
4194
|
+
up: Ti
|
|
4135
4195
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4136
|
-
async function
|
|
4196
|
+
async function ki(t) {
|
|
4137
4197
|
}
|
|
4138
|
-
async function
|
|
4198
|
+
async function $i(t) {
|
|
4139
4199
|
}
|
|
4140
|
-
const
|
|
4200
|
+
const Ii = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4141
4201
|
__proto__: null,
|
|
4142
|
-
down:
|
|
4143
|
-
up:
|
|
4202
|
+
down: $i,
|
|
4203
|
+
up: ki
|
|
4144
4204
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4145
|
-
async function
|
|
4205
|
+
async function Di(t) {
|
|
4146
4206
|
await t.schema.createTable("sessions").addColumn("id", "varchar(21)", (e) => e.primaryKey()).addColumn("tenant_id", "varchar(255)").addColumn("user_id", "varchar(255)").addForeignKeyConstraint(
|
|
4147
4207
|
"sessions_user_id_constraint",
|
|
4148
4208
|
["user_id", "tenant_id"],
|
|
@@ -4169,25 +4229,25 @@ async function Oi(t) {
|
|
|
4169
4229
|
(e) => e.onDelete("cascade")
|
|
4170
4230
|
).addColumn("created_at", "varchar(35)", (e) => e.notNull()).addColumn("expires_at", "varchar(35)").addColumn("idle_expires_at", "varchar(35)").addColumn("last_exchanged_at", "varchar(35)").addColumn("device", "varchar(2048)", (e) => e.notNull()).addColumn("resource_servers", "varchar(2048)", (e) => e.notNull()).addColumn("rotating", "boolean", (e) => e.notNull()).execute();
|
|
4171
4231
|
}
|
|
4172
|
-
async function
|
|
4232
|
+
async function Pi(t) {
|
|
4173
4233
|
await t.schema.dropTable("sessions").execute(), await t.schema.dropTable("login_sessions").execute(), await t.schema.dropTable("refresh_tokens").execute();
|
|
4174
4234
|
}
|
|
4175
|
-
const
|
|
4235
|
+
const ji = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4176
4236
|
__proto__: null,
|
|
4177
|
-
down:
|
|
4178
|
-
up:
|
|
4237
|
+
down: Pi,
|
|
4238
|
+
up: Di
|
|
4179
4239
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4180
|
-
async function
|
|
4240
|
+
async function Fi(t) {
|
|
4181
4241
|
await t.schema.dropTable("logins").execute(), await t.schema.dropTable("sessions_2").execute(), await t.schema.dropTable("refresh_tokens_2").execute();
|
|
4182
4242
|
}
|
|
4183
|
-
async function
|
|
4243
|
+
async function Mi(t) {
|
|
4184
4244
|
}
|
|
4185
|
-
const
|
|
4245
|
+
const Ai = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4186
4246
|
__proto__: null,
|
|
4187
|
-
down:
|
|
4188
|
-
up:
|
|
4247
|
+
down: Mi,
|
|
4248
|
+
up: Fi
|
|
4189
4249
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4190
|
-
async function
|
|
4250
|
+
async function zi(t) {
|
|
4191
4251
|
await t.schema.dropTable("custom_domains").execute(), await t.schema.createTable("custom_domains").addColumn(
|
|
4192
4252
|
"custom_domain_id",
|
|
4193
4253
|
"varchar(256)",
|
|
@@ -4198,120 +4258,120 @@ async function ji(t) {
|
|
|
4198
4258
|
(e) => e.references("tenants.id").onDelete("cascade").notNull()
|
|
4199
4259
|
).addColumn("domain", "varchar(255)", (e) => e.notNull()).addColumn("primary", "boolean", (e) => e.notNull()).addColumn("status", "varchar(50)", (e) => e.notNull()).addColumn("type", "varchar(50)", (e) => e.notNull()).addColumn("origin_domain_name", "varchar(255)").addColumn("verification", "varchar(2048)").addColumn("custom_client_ip_header", "varchar(50)").addColumn("tls_policy", "varchar(50)").addColumn("domain_metadata", "varchar(2048)").addColumn("created_at", "varchar(35)", (e) => e.notNull()).addColumn("updated_at", "varchar(35)", (e) => e.notNull()).execute();
|
|
4200
4260
|
}
|
|
4201
|
-
async function
|
|
4261
|
+
async function Li(t) {
|
|
4202
4262
|
}
|
|
4203
|
-
const
|
|
4263
|
+
const Ei = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4204
4264
|
__proto__: null,
|
|
4205
|
-
down:
|
|
4206
|
-
up:
|
|
4265
|
+
down: Li,
|
|
4266
|
+
up: zi
|
|
4207
4267
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4208
|
-
async function
|
|
4268
|
+
async function Ji(t) {
|
|
4209
4269
|
}
|
|
4210
|
-
async function
|
|
4270
|
+
async function Ri(t) {
|
|
4211
4271
|
await t.schema.alterTable("users").dropColumn("phone_number").dropColumn("phone_verified").dropColumn("username").execute();
|
|
4212
4272
|
}
|
|
4213
|
-
const
|
|
4273
|
+
const Ki = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4214
4274
|
__proto__: null,
|
|
4215
|
-
down:
|
|
4216
|
-
up:
|
|
4275
|
+
down: Ri,
|
|
4276
|
+
up: Ji
|
|
4217
4277
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4218
|
-
async function
|
|
4278
|
+
async function Ui(t) {
|
|
4219
4279
|
await t.schema.createTable("forms").addColumn("id", "varchar(255)", (e) => e.primaryKey()).addColumn("name", "varchar(255)", (e) => e.notNull()).addColumn("tenant_id", "varchar(255)", (e) => e.notNull()).addColumn("messages", "varchar(255)").addColumn("languages", "varchar(255)").addColumn("translations", "varchar(4096)").addColumn("nodes", "varchar(4096)").addColumn("start", "varchar(255)").addColumn("ending", "varchar(255)").addColumn("style", "varchar(1042)").addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("updated_at", "varchar(255)", (e) => e.notNull()).execute(), await t.schema.createIndex("forms_tenant_id_idx").on("forms").column("tenant_id").execute();
|
|
4220
4280
|
}
|
|
4221
|
-
async function
|
|
4281
|
+
async function Bi(t) {
|
|
4222
4282
|
await t.schema.dropTable("forms").execute();
|
|
4223
4283
|
}
|
|
4224
|
-
const
|
|
4284
|
+
const Qi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4225
4285
|
__proto__: null,
|
|
4226
|
-
down:
|
|
4227
|
-
up:
|
|
4286
|
+
down: Bi,
|
|
4287
|
+
up: Ui
|
|
4228
4288
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4229
|
-
async function
|
|
4289
|
+
async function qi(t) {
|
|
4230
4290
|
await t.schema.alterTable("hooks").addColumn("form_id", "text").execute(), await t.schema.alterTable("hooks").addColumn("url_tmp", "varchar(512)").execute(), await t.updateTable("hooks").set((e) => ({ url_tmp: e.ref("url") })).execute(), await t.schema.alterTable("hooks").dropColumn("url").execute(), await t.schema.alterTable("hooks").renameColumn("url_tmp", "url").execute();
|
|
4231
4291
|
}
|
|
4232
|
-
async function
|
|
4292
|
+
async function Vi(t) {
|
|
4233
4293
|
await t.schema.dropTable("hooks").ifExists().execute(), await t.schema.createTable("hooks").addColumn("hook_id", "text", (e) => e.primaryKey()).addColumn("tenant_id", "text", (e) => e.notNull()).addColumn("trigger_id", "text", (e) => e.notNull()).addColumn("enabled", "integer", (e) => e.notNull().defaultTo(0)).addColumn("url", "varchar(512)", (e) => e.notNull()).addColumn("synchronous", "integer", (e) => e.notNull().defaultTo(0)).addColumn("priority", "integer").addColumn("created_at", "text", (e) => e.notNull()).addColumn("updated_at", "text", (e) => e.notNull()).execute();
|
|
4234
4294
|
}
|
|
4235
|
-
const
|
|
4295
|
+
const Wi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4236
4296
|
__proto__: null,
|
|
4237
|
-
down:
|
|
4238
|
-
up:
|
|
4297
|
+
down: Vi,
|
|
4298
|
+
up: qi
|
|
4239
4299
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4240
|
-
async function
|
|
4300
|
+
async function Gi(t) {
|
|
4241
4301
|
await t.schema.alterTable("login_sessions").addColumn(
|
|
4242
4302
|
"login_completed",
|
|
4243
4303
|
"boolean",
|
|
4244
4304
|
(e) => e.notNull().defaultTo(0)
|
|
4245
4305
|
).execute();
|
|
4246
4306
|
}
|
|
4247
|
-
async function
|
|
4307
|
+
async function Hi(t) {
|
|
4248
4308
|
await t.schema.alterTable("login_sessions").dropColumn("login_completed").execute();
|
|
4249
4309
|
}
|
|
4250
|
-
const
|
|
4310
|
+
const Yi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4251
4311
|
__proto__: null,
|
|
4252
|
-
down:
|
|
4253
|
-
up:
|
|
4312
|
+
down: Hi,
|
|
4313
|
+
up: Gi
|
|
4254
4314
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4255
|
-
async function
|
|
4315
|
+
async function Xi(t) {
|
|
4256
4316
|
await t.schema.alterTable("sessions").addColumn(
|
|
4257
4317
|
"login_session_id",
|
|
4258
4318
|
"varchar(21)",
|
|
4259
4319
|
(e) => e.references("login_sessions.id").onDelete("set null")
|
|
4260
4320
|
).execute();
|
|
4261
4321
|
}
|
|
4262
|
-
async function
|
|
4322
|
+
async function Zi(t) {
|
|
4263
4323
|
await t.schema.alterTable("sessions").dropColumn("login_session_id").execute();
|
|
4264
4324
|
}
|
|
4265
|
-
const
|
|
4325
|
+
const el = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4266
4326
|
__proto__: null,
|
|
4267
|
-
down:
|
|
4268
|
-
up:
|
|
4327
|
+
down: Zi,
|
|
4328
|
+
up: Xi
|
|
4269
4329
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4270
|
-
async function
|
|
4330
|
+
async function tl(t) {
|
|
4271
4331
|
await t.schema.createIndex("IDX_sessions_login_session_id").on("sessions").column("login_session_id").execute();
|
|
4272
4332
|
}
|
|
4273
|
-
async function
|
|
4333
|
+
async function rl(t) {
|
|
4274
4334
|
await t.schema.dropIndex("IDX_sessions_login_session_id").on("sessions").execute();
|
|
4275
4335
|
}
|
|
4276
|
-
const
|
|
4336
|
+
const al = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4277
4337
|
__proto__: null,
|
|
4278
|
-
down:
|
|
4279
|
-
up:
|
|
4338
|
+
down: rl,
|
|
4339
|
+
up: tl
|
|
4280
4340
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4281
|
-
async function
|
|
4341
|
+
async function nl(t) {
|
|
4282
4342
|
await t.schema.alterTable("codes").addColumn("code_challenge", "varchar(128)").execute(), await t.schema.alterTable("codes").addColumn("code_challenge_method", "varchar(5)").execute();
|
|
4283
4343
|
}
|
|
4284
|
-
async function
|
|
4344
|
+
async function ol(t) {
|
|
4285
4345
|
await t.schema.alterTable("codes").dropColumn("code_challenge").execute(), await t.schema.alterTable("codes").dropColumn("code_challenge_method").execute();
|
|
4286
4346
|
}
|
|
4287
|
-
const
|
|
4347
|
+
const sl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4288
4348
|
__proto__: null,
|
|
4289
|
-
down:
|
|
4290
|
-
up:
|
|
4349
|
+
down: ol,
|
|
4350
|
+
up: nl
|
|
4291
4351
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4292
|
-
async function
|
|
4352
|
+
async function il(t) {
|
|
4293
4353
|
await t.schema.alterTable("codes").addColumn("redirect_uri", "varchar(1024)").execute();
|
|
4294
4354
|
}
|
|
4295
|
-
async function
|
|
4355
|
+
async function ll(t) {
|
|
4296
4356
|
await t.schema.alterTable("codes").dropColumn("redirect_uri").execute();
|
|
4297
4357
|
}
|
|
4298
|
-
const
|
|
4358
|
+
const cl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4299
4359
|
__proto__: null,
|
|
4300
|
-
down:
|
|
4301
|
-
up:
|
|
4360
|
+
down: ll,
|
|
4361
|
+
up: il
|
|
4302
4362
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4303
|
-
async function
|
|
4363
|
+
async function dl(t) {
|
|
4304
4364
|
await t.schema.alterTable("codes").addColumn("nonce", "varchar(1024)").execute(), await t.schema.alterTable("codes").addColumn("state", "varchar(2048)").execute();
|
|
4305
4365
|
}
|
|
4306
|
-
async function
|
|
4366
|
+
async function ul(t) {
|
|
4307
4367
|
await t.schema.alterTable("codes").dropColumn("nonce").execute(), await t.schema.alterTable("codes").dropColumn("state").execute();
|
|
4308
4368
|
}
|
|
4309
|
-
const
|
|
4369
|
+
const ml = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4310
4370
|
__proto__: null,
|
|
4311
|
-
down:
|
|
4312
|
-
up:
|
|
4371
|
+
down: ul,
|
|
4372
|
+
up: dl
|
|
4313
4373
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4314
|
-
async function
|
|
4374
|
+
async function _l(t) {
|
|
4315
4375
|
await t.schema.createTable("themes").addColumn(
|
|
4316
4376
|
"tenant_id",
|
|
4317
4377
|
"varchar(255)",
|
|
@@ -4386,26 +4446,26 @@ async function cl(t) {
|
|
|
4386
4446
|
(e) => e.notNull()
|
|
4387
4447
|
).addColumn("created_at", "varchar(35)", (e) => e.notNull()).addColumn("updated_at", "varchar(35)", (e) => e.notNull()).addPrimaryKeyConstraint("themes_pkey", ["tenant_id", "themeId"]).execute(), await t.schema.createIndex("themes_tenant_id_idx").on("themes").column("tenant_id").execute();
|
|
4388
4448
|
}
|
|
4389
|
-
async function
|
|
4449
|
+
async function hl(t) {
|
|
4390
4450
|
await t.schema.dropTable("themes").execute();
|
|
4391
4451
|
}
|
|
4392
|
-
const
|
|
4452
|
+
const fl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4393
4453
|
__proto__: null,
|
|
4394
|
-
down:
|
|
4395
|
-
up:
|
|
4454
|
+
down: hl,
|
|
4455
|
+
up: _l
|
|
4396
4456
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4397
|
-
async function
|
|
4457
|
+
async function pl(t) {
|
|
4398
4458
|
await t.schema.createTable("resource_servers").addColumn("id", "varchar(21)", (e) => e.notNull()).addColumn("tenant_id", "varchar(191)", (e) => e.notNull()).addColumn("identifier", "varchar(191)", (e) => e.notNull()).addColumn("name", "varchar(255)", (e) => e.notNull()).addColumn("scopes", "varchar(4096)").addColumn("signing_alg", "varchar(64)").addColumn("signing_secret", "varchar(2048)").addColumn("token_lifetime", "integer").addColumn("token_lifetime_for_web", "integer").addColumn("skip_consent_for_verifiable_first_party_clients", "integer").addColumn("allow_offline_access", "integer").addColumn("verification_key", "varchar(4096)").addColumn("options", "varchar(4096)").addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("updated_at", "varchar(255)", (e) => e.notNull()).addPrimaryKeyConstraint("resource_servers_pk", ["tenant_id", "id"]).execute(), await t.schema.createIndex("resource_servers_tenant_identifier_uq").on("resource_servers").columns(["tenant_id", "identifier"]).unique().execute(), await t.schema.createTable("roles").addColumn("id", "varchar(21)", (e) => e.notNull()).addColumn("tenant_id", "varchar(191)", (e) => e.notNull()).addColumn("name", "varchar(50)", (e) => e.notNull()).addColumn("description", "varchar(255)").addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("updated_at", "varchar(255)", (e) => e.notNull()).addPrimaryKeyConstraint("roles_pk", ["tenant_id", "id"]).execute(), await t.schema.createIndex("roles_tenant_name_uq").on("roles").columns(["tenant_id", "name"]).unique().execute();
|
|
4399
4459
|
}
|
|
4400
|
-
async function
|
|
4460
|
+
async function gl(t) {
|
|
4401
4461
|
await t.schema.dropTable("roles").execute(), await t.schema.dropTable("resource_servers").execute();
|
|
4402
4462
|
}
|
|
4403
|
-
const
|
|
4463
|
+
const wl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4404
4464
|
__proto__: null,
|
|
4405
|
-
down:
|
|
4406
|
-
up:
|
|
4465
|
+
down: gl,
|
|
4466
|
+
up: pl
|
|
4407
4467
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4408
|
-
async function
|
|
4468
|
+
async function yl(t) {
|
|
4409
4469
|
await t.schema.createTable("role_permissions").addColumn("tenant_id", "varchar(191)", (e) => e.notNull()).addColumn("role_id", "varchar(21)", (e) => e.notNull()).addColumn(
|
|
4410
4470
|
"resource_server_identifier",
|
|
4411
4471
|
"varchar(191)",
|
|
@@ -4426,107 +4486,123 @@ async function fl(t) {
|
|
|
4426
4486
|
"permission_name"
|
|
4427
4487
|
]).execute(), await t.schema.createIndex("user_permissions_user_fk").on("user_permissions").columns(["tenant_id", "user_id"]).execute(), await t.schema.createIndex("user_permissions_permission_fk").on("user_permissions").columns(["tenant_id", "resource_server_identifier", "permission_name"]).execute();
|
|
4428
4488
|
}
|
|
4429
|
-
async function
|
|
4489
|
+
async function vl(t) {
|
|
4430
4490
|
await t.schema.dropTable("user_permissions").execute(), await t.schema.dropTable("role_permissions").execute();
|
|
4431
4491
|
}
|
|
4432
|
-
const
|
|
4492
|
+
const Nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4433
4493
|
__proto__: null,
|
|
4434
|
-
down:
|
|
4435
|
-
up:
|
|
4494
|
+
down: vl,
|
|
4495
|
+
up: yl
|
|
4496
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
4497
|
+
async function Cl(t) {
|
|
4498
|
+
await t.schema.createTable("user_roles").addColumn("tenant_id", "varchar(191)", (e) => e.notNull()).addColumn("user_id", "varchar(191)", (e) => e.notNull()).addColumn("role_id", "varchar(21)", (e) => e.notNull()).addColumn("created_at", "varchar(255)", (e) => e.notNull()).addPrimaryKeyConstraint("user_roles_pk", [
|
|
4499
|
+
"tenant_id",
|
|
4500
|
+
"user_id",
|
|
4501
|
+
"role_id"
|
|
4502
|
+
]).execute(), await t.schema.createIndex("user_roles_user_fk").on("user_roles").columns(["tenant_id", "user_id"]).execute(), await t.schema.createIndex("user_roles_role_fk").on("user_roles").columns(["tenant_id", "role_id"]).execute();
|
|
4503
|
+
}
|
|
4504
|
+
async function bl(t) {
|
|
4505
|
+
await t.schema.dropTable("user_roles").execute();
|
|
4506
|
+
}
|
|
4507
|
+
const xl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4508
|
+
__proto__: null,
|
|
4509
|
+
down: bl,
|
|
4510
|
+
up: Cl
|
|
4436
4511
|
}, Symbol.toStringTag, { value: "Module" })), Ee = {
|
|
4437
|
-
m1_init:
|
|
4438
|
-
m2_magicLink:
|
|
4439
|
-
m3_updateAt:
|
|
4440
|
-
m4_logTable:
|
|
4441
|
-
m5_userProfile:
|
|
4442
|
-
m6_sessions:
|
|
4443
|
-
m7_passwords:
|
|
4444
|
-
m8_logsTableNewFields:
|
|
4445
|
-
m9_passwordTableNewField:
|
|
4446
|
-
n01_codesTable:
|
|
4447
|
-
n11_universalLoginSession:
|
|
4448
|
-
n12_userFields:
|
|
4449
|
-
n13_userEmailIndex:
|
|
4450
|
-
n14_profileDataField:
|
|
4451
|
-
n15_userEmailIndex:
|
|
4452
|
-
n16_userLocale:
|
|
4453
|
-
n17_signingKeys:
|
|
4454
|
-
n18_logsFields:
|
|
4455
|
-
n19_connectionsUserinfo:
|
|
4456
|
-
n20_missingFields:
|
|
4457
|
-
n21_sessionDeletedAt:
|
|
4458
|
-
n22_dropLogsFields:
|
|
4459
|
-
n23_dropUsersFields:
|
|
4460
|
-
n24_logsIndexes:
|
|
4461
|
-
n25_logDescMaxLength:
|
|
4462
|
-
n26_logsTableExtraFields:
|
|
4463
|
-
n27_usersTableNameIndex:
|
|
4464
|
-
n28_usersEmailConstrain:
|
|
4465
|
-
n29_increaseOtpStateLength:
|
|
4466
|
-
n30_increaseTicketStateLength:
|
|
4467
|
-
n31_branding:
|
|
4468
|
-
n32_indexesAndNotNull:
|
|
4469
|
-
n33_vendorIdInUniversalLoginSession:
|
|
4470
|
-
n34_auth0ClientInUniversalLoginSession:
|
|
4471
|
-
n35_increaseUniversalSessionStateLength:
|
|
4472
|
-
n36_authenticationCodes:
|
|
4473
|
-
n37_disableSignUps:
|
|
4474
|
-
n38_otpIpAddress:
|
|
4475
|
-
n39_increaseUserAgentLength:
|
|
4476
|
-
n40_userId:
|
|
4477
|
-
n41_hooks:
|
|
4478
|
-
n42_userIdIndexes:
|
|
4479
|
-
n43_userIdIndexes:
|
|
4480
|
-
n44_codes:
|
|
4481
|
-
n45_hookProperties:
|
|
4482
|
-
n46_loginAuth0Client:
|
|
4483
|
-
n47_loginAuth0Client:
|
|
4484
|
-
n48_saml:
|
|
4485
|
-
n49_removeFields:
|
|
4486
|
-
n50_authParamsNonce:
|
|
4487
|
-
n51_connectionid:
|
|
4488
|
-
n52_cert:
|
|
4489
|
-
n53_codes_primary_key:
|
|
4490
|
-
n54_cleanup_tables:
|
|
4491
|
-
n55_logs_index:
|
|
4492
|
-
n56_application_fields:
|
|
4493
|
-
n57_prompt_settings:
|
|
4494
|
-
n58_connection_client_id:
|
|
4495
|
-
n59_connection_options:
|
|
4496
|
-
n60_users_metadata:
|
|
4497
|
-
n61_userLocales:
|
|
4498
|
-
n62_prompt:
|
|
4499
|
-
n63_connection_cleanup:
|
|
4500
|
-
n64_act_as:
|
|
4501
|
-
n65_code_verifier:
|
|
4502
|
-
n66_email_providers:
|
|
4503
|
-
n67_drop_tickets:
|
|
4504
|
-
n68_login_useragents:
|
|
4505
|
-
n70_refresh_tokens:
|
|
4506
|
-
n71_session_new_fields:
|
|
4507
|
-
n72_session_primary_key:
|
|
4508
|
-
n73_drop_sessions:
|
|
4509
|
-
n74_custom_domains:
|
|
4510
|
-
n75_organizations:
|
|
4511
|
-
n76_authorization_url_length:
|
|
4512
|
-
n77_drop_sessions:
|
|
4513
|
-
n78_login_sessions:
|
|
4514
|
-
n79_drop_sessions_2:
|
|
4515
|
-
n80_recreate_custom_domains:
|
|
4516
|
-
n81_phone:
|
|
4517
|
-
n82_forms:
|
|
4518
|
-
n83_addFormsIdToHooks:
|
|
4519
|
-
n84_login_completed:
|
|
4520
|
-
n85_add_login_session_id_to_sessions:
|
|
4521
|
-
n86_index_sessions_login_session_id:
|
|
4522
|
-
n87_code_challenge:
|
|
4523
|
-
n88_add_redirect_uri_to_codes:
|
|
4524
|
-
n89_add_nonce_and_state_to_codes:
|
|
4525
|
-
n90_themes:
|
|
4526
|
-
n91_resource_servers_rules_permissions:
|
|
4527
|
-
n92_role_permissions:
|
|
4512
|
+
m1_init: ya,
|
|
4513
|
+
m2_magicLink: Ca,
|
|
4514
|
+
m3_updateAt: Ta,
|
|
4515
|
+
m4_logTable: ka,
|
|
4516
|
+
m5_userProfile: Da,
|
|
4517
|
+
m6_sessions: Fa,
|
|
4518
|
+
m7_passwords: za,
|
|
4519
|
+
m8_logsTableNewFields: Ja,
|
|
4520
|
+
m9_passwordTableNewField: Ua,
|
|
4521
|
+
n01_codesTable: qa,
|
|
4522
|
+
n11_universalLoginSession: Ga,
|
|
4523
|
+
n12_userFields: Xa,
|
|
4524
|
+
n13_userEmailIndex: tn,
|
|
4525
|
+
n14_profileDataField: nn,
|
|
4526
|
+
n15_userEmailIndex: ln,
|
|
4527
|
+
n16_userLocale: un,
|
|
4528
|
+
n17_signingKeys: hn,
|
|
4529
|
+
n18_logsFields: gn,
|
|
4530
|
+
n19_connectionsUserinfo: vn,
|
|
4531
|
+
n20_missingFields: bn,
|
|
4532
|
+
n21_sessionDeletedAt: Sn,
|
|
4533
|
+
n22_dropLogsFields: $n,
|
|
4534
|
+
n23_dropUsersFields: Pn,
|
|
4535
|
+
n24_logsIndexes: Mn,
|
|
4536
|
+
n25_logDescMaxLength: Ln,
|
|
4537
|
+
n26_logsTableExtraFields: Rn,
|
|
4538
|
+
n27_usersTableNameIndex: Bn,
|
|
4539
|
+
n28_usersEmailConstrain: Vn,
|
|
4540
|
+
n29_increaseOtpStateLength: Hn,
|
|
4541
|
+
n30_increaseTicketStateLength: Zn,
|
|
4542
|
+
n31_branding: ro,
|
|
4543
|
+
n32_indexesAndNotNull: oo,
|
|
4544
|
+
n33_vendorIdInUniversalLoginSession: lo,
|
|
4545
|
+
n34_auth0ClientInUniversalLoginSession: mo,
|
|
4546
|
+
n35_increaseUniversalSessionStateLength: fo,
|
|
4547
|
+
n36_authenticationCodes: wo,
|
|
4548
|
+
n37_disableSignUps: No,
|
|
4549
|
+
n38_otpIpAddress: xo,
|
|
4550
|
+
n39_increaseUserAgentLength: Oo,
|
|
4551
|
+
n40_userId: Io,
|
|
4552
|
+
n41_hooks: jo,
|
|
4553
|
+
n42_userIdIndexes: Ao,
|
|
4554
|
+
n43_userIdIndexes: Eo,
|
|
4555
|
+
n44_codes: Ko,
|
|
4556
|
+
n45_hookProperties: Qo,
|
|
4557
|
+
n46_loginAuth0Client: Wo,
|
|
4558
|
+
n47_loginAuth0Client: Yo,
|
|
4559
|
+
n48_saml: es,
|
|
4560
|
+
n49_removeFields: as,
|
|
4561
|
+
n50_authParamsNonce: ss,
|
|
4562
|
+
n51_connectionid: cs,
|
|
4563
|
+
n52_cert: ms,
|
|
4564
|
+
n53_codes_primary_key: fs,
|
|
4565
|
+
n54_cleanup_tables: ws,
|
|
4566
|
+
n55_logs_index: Ns,
|
|
4567
|
+
n56_application_fields: xs,
|
|
4568
|
+
n57_prompt_settings: Os,
|
|
4569
|
+
n58_connection_client_id: Is,
|
|
4570
|
+
n59_connection_options: js,
|
|
4571
|
+
n60_users_metadata: As,
|
|
4572
|
+
n61_userLocales: Es,
|
|
4573
|
+
n62_prompt: Ks,
|
|
4574
|
+
n63_connection_cleanup: Qs,
|
|
4575
|
+
n64_act_as: Ws,
|
|
4576
|
+
n65_code_verifier: Ys,
|
|
4577
|
+
n66_email_providers: ei,
|
|
4578
|
+
n67_drop_tickets: ai,
|
|
4579
|
+
n68_login_useragents: si,
|
|
4580
|
+
n70_refresh_tokens: ci,
|
|
4581
|
+
n71_session_new_fields: mi,
|
|
4582
|
+
n72_session_primary_key: fi,
|
|
4583
|
+
n73_drop_sessions: wi,
|
|
4584
|
+
n74_custom_domains: Ni,
|
|
4585
|
+
n75_organizations: xi,
|
|
4586
|
+
n76_authorization_url_length: Oi,
|
|
4587
|
+
n77_drop_sessions: Ii,
|
|
4588
|
+
n78_login_sessions: ji,
|
|
4589
|
+
n79_drop_sessions_2: Ai,
|
|
4590
|
+
n80_recreate_custom_domains: Ei,
|
|
4591
|
+
n81_phone: Ki,
|
|
4592
|
+
n82_forms: Qi,
|
|
4593
|
+
n83_addFormsIdToHooks: Wi,
|
|
4594
|
+
n84_login_completed: Yi,
|
|
4595
|
+
n85_add_login_session_id_to_sessions: el,
|
|
4596
|
+
n86_index_sessions_login_session_id: al,
|
|
4597
|
+
n87_code_challenge: sl,
|
|
4598
|
+
n88_add_redirect_uri_to_codes: cl,
|
|
4599
|
+
n89_add_nonce_and_state_to_codes: ml,
|
|
4600
|
+
n90_themes: fl,
|
|
4601
|
+
n91_resource_servers_rules_permissions: wl,
|
|
4602
|
+
n92_role_permissions: Nl,
|
|
4603
|
+
n93_add_permissions_to_roles: xl
|
|
4528
4604
|
};
|
|
4529
|
-
async function
|
|
4605
|
+
async function $l(t, e = !1) {
|
|
4530
4606
|
e && console.log("migrating...");
|
|
4531
4607
|
const r = new Le(Ee), a = new be({
|
|
4532
4608
|
db: t,
|
|
@@ -4539,7 +4615,7 @@ async function Cl(t, e = !1) {
|
|
|
4539
4615
|
}), o)
|
|
4540
4616
|
throw console.error("failed to migrate"), console.error(o), o;
|
|
4541
4617
|
}
|
|
4542
|
-
async function
|
|
4618
|
+
async function Il(t) {
|
|
4543
4619
|
console.log("migrating...");
|
|
4544
4620
|
const e = new Le(Ee), r = new be({
|
|
4545
4621
|
db: t,
|
|
@@ -4550,7 +4626,7 @@ async function bl(t) {
|
|
|
4550
4626
|
}), a)
|
|
4551
4627
|
throw console.error("failed to migrate"), console.error(a), a;
|
|
4552
4628
|
}
|
|
4553
|
-
function
|
|
4629
|
+
function Dl(t) {
|
|
4554
4630
|
return {
|
|
4555
4631
|
applications: jt(t),
|
|
4556
4632
|
branding: er(t),
|
|
@@ -4559,7 +4635,7 @@ function xl(t) {
|
|
|
4559
4635
|
codes: Ot(t),
|
|
4560
4636
|
connections: Et(t),
|
|
4561
4637
|
emailProviders: br(t),
|
|
4562
|
-
customDomains:
|
|
4638
|
+
customDomains: Yt(t),
|
|
4563
4639
|
forms: Ar(t),
|
|
4564
4640
|
hooks: sr(t),
|
|
4565
4641
|
keys: Bt(t),
|
|
@@ -4569,8 +4645,9 @@ function xl(t) {
|
|
|
4569
4645
|
promptSettings: yr(t),
|
|
4570
4646
|
refreshTokens: $r(t),
|
|
4571
4647
|
resourceServers: Kr(t),
|
|
4572
|
-
rolePermissions:
|
|
4648
|
+
rolePermissions: Xr(t),
|
|
4573
4649
|
userPermissions: ra(t),
|
|
4650
|
+
userRoles: sa(t),
|
|
4574
4651
|
roles: Wr(t),
|
|
4575
4652
|
sessions: gt(t),
|
|
4576
4653
|
tenants: st(t),
|
|
@@ -4579,7 +4656,7 @@ function xl(t) {
|
|
|
4579
4656
|
};
|
|
4580
4657
|
}
|
|
4581
4658
|
export {
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4659
|
+
Dl as default,
|
|
4660
|
+
Il as migrateDown,
|
|
4661
|
+
$l as migrateToLatest
|
|
4585
4662
|
};
|