@authhero/kysely-adapter 10.120.0 → 10.121.1
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 +12 -12
- package/dist/kysely-adapter.d.ts +134 -6
- package/dist/kysely-adapter.mjs +1195 -1108
- package/package.json +2 -2
package/dist/kysely-adapter.mjs
CHANGED
|
@@ -2,7 +2,7 @@ var Oe = Object.defineProperty;
|
|
|
2
2
|
var ke = (e, t, a) => t in e ? Oe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
|
|
3
3
|
var K = (e, t, a) => ke(e, typeof t != "symbol" ? t + "" : t, a);
|
|
4
4
|
import { nanoid as k, customAlphabet as $e } from "nanoid";
|
|
5
|
-
import { parseUserId as Ee, flowSchema as
|
|
5
|
+
import { parseUserId as Ee, flowSchema as B, codeSchema as Ie, loginSessionSchema as ze, LoginSessionState as ie, promptSettingSchema as Pe, formSchema as q, resourceServerSchema as De } from "@authhero/adapter-interfaces";
|
|
6
6
|
import "@hono/zod-openapi";
|
|
7
7
|
import { sql as h, Migrator as ce } from "kysely";
|
|
8
8
|
var R = class extends Error {
|
|
@@ -64,7 +64,7 @@ function Ae(e) {
|
|
|
64
64
|
};
|
|
65
65
|
e.isTransaction ? await d(e) : await e.transaction().execute(d);
|
|
66
66
|
} catch (d) {
|
|
67
|
-
throw d.code === "SQLITE_CONSTRAINT_UNIQUE" || d.message.includes("AlreadyExists") ? new R(409, { message: "User already exists" }) : new R(500, { message: `${d.code}, ${d.message}` });
|
|
67
|
+
throw d.code === "SQLITE_CONSTRAINT_UNIQUE" || d.code === "ER_DUP_ENTRY" || d.message.includes("AlreadyExists") ? new R(409, { message: "User already exists" }) : new R(500, { message: `${d.code}, ${d.message}` });
|
|
68
68
|
}
|
|
69
69
|
return {
|
|
70
70
|
...i,
|
|
@@ -104,7 +104,7 @@ const je = [
|
|
|
104
104
|
"phone_verified",
|
|
105
105
|
"username"
|
|
106
106
|
];
|
|
107
|
-
function
|
|
107
|
+
function U(e, t = !1) {
|
|
108
108
|
const a = {
|
|
109
109
|
connection: e.connection,
|
|
110
110
|
provider: e.provider,
|
|
@@ -146,8 +146,8 @@ function Fe(e) {
|
|
|
146
146
|
user_metadata: JSON.parse(n.user_metadata),
|
|
147
147
|
address: n.address ? JSON.parse(n.address) : void 0,
|
|
148
148
|
identities: [
|
|
149
|
-
|
|
150
|
-
...o.map((d) =>
|
|
149
|
+
U(n, !0),
|
|
150
|
+
...o.map((d) => U(d))
|
|
151
151
|
]
|
|
152
152
|
};
|
|
153
153
|
return w(i);
|
|
@@ -246,8 +246,8 @@ function Re(e) {
|
|
|
246
246
|
user_metadata: JSON.parse(f.user_metadata),
|
|
247
247
|
address: f.address ? JSON.parse(f.address) : void 0,
|
|
248
248
|
identities: [
|
|
249
|
-
|
|
250
|
-
...g.map((y) =>
|
|
249
|
+
U(f, !0),
|
|
250
|
+
...g.map((y) => U(y))
|
|
251
251
|
]
|
|
252
252
|
});
|
|
253
253
|
});
|
|
@@ -337,7 +337,7 @@ function Ke(e) {
|
|
|
337
337
|
}
|
|
338
338
|
function qe(e) {
|
|
339
339
|
return async (t, a) => {
|
|
340
|
-
const n = (/* @__PURE__ */ new Date()).toISOString(), o =
|
|
340
|
+
const n = (/* @__PURE__ */ new Date()).toISOString(), o = B.parse({
|
|
341
341
|
id: `af_${k()}`,
|
|
342
342
|
...a,
|
|
343
343
|
actions: a.actions || [],
|
|
@@ -352,7 +352,7 @@ function qe(e) {
|
|
|
352
352
|
}).execute(), o;
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function D(e, t) {
|
|
356
356
|
if (!e)
|
|
357
357
|
return t;
|
|
358
358
|
try {
|
|
@@ -363,24 +363,24 @@ function P(e, t) {
|
|
|
363
363
|
}
|
|
364
364
|
function de(e, t, a = { ...e }) {
|
|
365
365
|
for (const n in t)
|
|
366
|
-
n in e && (a[n] =
|
|
366
|
+
n in e && (a[n] = D(
|
|
367
367
|
e[n],
|
|
368
368
|
t[n]
|
|
369
369
|
));
|
|
370
370
|
return a;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function Ue(e) {
|
|
373
373
|
return async (t, a) => {
|
|
374
374
|
const n = await e.selectFrom("flows").selectAll().where("flows.id", "=", a).where("tenant_id", "=", t).executeTakeFirst();
|
|
375
375
|
if (!n) return null;
|
|
376
376
|
const o = {
|
|
377
377
|
...n,
|
|
378
|
-
actions:
|
|
378
|
+
actions: D(n.actions, [])
|
|
379
379
|
};
|
|
380
|
-
return
|
|
380
|
+
return B.parse(w(o));
|
|
381
381
|
};
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function Be(e) {
|
|
384
384
|
return async (t, a = {}) => {
|
|
385
385
|
const { page: n = 0, per_page: o = 50, include_totals: r = !1, q: s } = a;
|
|
386
386
|
let i = e.selectFrom("flows").where("tenant_id", "=", t);
|
|
@@ -388,9 +388,9 @@ function Ue(e) {
|
|
|
388
388
|
const c = (await i.offset(n * o).limit(o).selectAll().execute()).map((m) => {
|
|
389
389
|
const _ = {
|
|
390
390
|
...m,
|
|
391
|
-
actions:
|
|
391
|
+
actions: D(m.actions, [])
|
|
392
392
|
};
|
|
393
|
-
return
|
|
393
|
+
return B.parse(w(_));
|
|
394
394
|
});
|
|
395
395
|
if (!r)
|
|
396
396
|
return {
|
|
@@ -418,28 +418,28 @@ function Qe(e) {
|
|
|
418
418
|
const { numUpdatedRows: r } = await e.updateTable("flows").set(o).where("id", "=", a).where("tenant_id", "=", t).executeTakeFirst();
|
|
419
419
|
if (r === 0n) return null;
|
|
420
420
|
const s = await e.selectFrom("flows").selectAll().where("id", "=", a).where("tenant_id", "=", t).executeTakeFirst();
|
|
421
|
-
return s ?
|
|
421
|
+
return s ? B.parse({
|
|
422
422
|
...s,
|
|
423
423
|
actions: s.actions ? JSON.parse(s.actions) : []
|
|
424
424
|
}) : null;
|
|
425
425
|
};
|
|
426
426
|
}
|
|
427
|
-
function
|
|
427
|
+
function Ye(e) {
|
|
428
428
|
return async (t, a) => {
|
|
429
429
|
var o;
|
|
430
430
|
return (((o = (await e.deleteFrom("flows").where("id", "=", a).where("tenant_id", "=", t).execute())[0]) == null ? void 0 : o.numDeletedRows) ?? 0n) > 0n;
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function He(e) {
|
|
434
434
|
return {
|
|
435
435
|
create: qe(e),
|
|
436
|
-
get:
|
|
437
|
-
list:
|
|
436
|
+
get: Ue(e),
|
|
437
|
+
list: Be(e),
|
|
438
438
|
update: Qe(e),
|
|
439
|
-
remove:
|
|
439
|
+
remove: Ye(e)
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
|
-
function
|
|
442
|
+
function L(e, t, a = { ...e }) {
|
|
443
443
|
for (const n of t)
|
|
444
444
|
e[n] !== void 0 && (a[n] = JSON.stringify(e[n]));
|
|
445
445
|
return a;
|
|
@@ -464,7 +464,7 @@ function _e(e) {
|
|
|
464
464
|
}
|
|
465
465
|
function me(e) {
|
|
466
466
|
const t = { ...e };
|
|
467
|
-
return
|
|
467
|
+
return L(
|
|
468
468
|
e,
|
|
469
469
|
[
|
|
470
470
|
"session_cookie",
|
|
@@ -498,7 +498,7 @@ function Ge(e) {
|
|
|
498
498
|
try {
|
|
499
499
|
await e.insertInto("tenants").values(n).execute();
|
|
500
500
|
} catch (s) {
|
|
501
|
-
throw (o = s == null ? void 0 : s.message) != null && o.includes("UNIQUE constraint failed") || (r = s == null ? void 0 : s.message) != null && r.includes("duplicate key") || (s == null ? void 0 : s.code) === "SQLITE_CONSTRAINT" || (s == null ? void 0 : s.code) === "23505" ? new R(409, {
|
|
501
|
+
throw (o = s == null ? void 0 : s.message) != null && o.includes("UNIQUE constraint failed") || (r = s == null ? void 0 : s.message) != null && r.includes("duplicate key") || (s == null ? void 0 : s.code) === "SQLITE_CONSTRAINT" || (s == null ? void 0 : s.code) === "ER_DUP_ENTRY" || (s == null ? void 0 : s.code) === "23505" ? new R(409, {
|
|
502
502
|
message: `Tenant with ID '${a.id}' already exists`
|
|
503
503
|
}) : s;
|
|
504
504
|
}
|
|
@@ -677,7 +677,7 @@ function pe(e) {
|
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function A(e, t = (/* @__PURE__ */ new Date(0)).toISOString()) {
|
|
681
681
|
return pe(e) ?? t;
|
|
682
682
|
}
|
|
683
683
|
function v(e) {
|
|
@@ -689,11 +689,11 @@ function v(e) {
|
|
|
689
689
|
function W() {
|
|
690
690
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
691
691
|
}
|
|
692
|
-
function
|
|
692
|
+
function z(e, t, a = []) {
|
|
693
693
|
const n = {};
|
|
694
694
|
for (const o of t) {
|
|
695
695
|
const r = o.replace(/_ts$/, "");
|
|
696
|
-
n[r] =
|
|
696
|
+
n[r] = A(e[o]);
|
|
697
697
|
}
|
|
698
698
|
for (const o of a) {
|
|
699
699
|
const r = o.replace(/_ts$/, "");
|
|
@@ -719,7 +719,7 @@ function it(e) {
|
|
|
719
719
|
used_at_ts: _,
|
|
720
720
|
revoked_at_ts: p,
|
|
721
721
|
...f
|
|
722
|
-
} = n, g =
|
|
722
|
+
} = n, g = z(
|
|
723
723
|
{
|
|
724
724
|
created_at_ts: i,
|
|
725
725
|
updated_at_ts: d,
|
|
@@ -815,18 +815,18 @@ function ut(e) {
|
|
|
815
815
|
expires_at_ts: $,
|
|
816
816
|
idle_expires_at_ts: I,
|
|
817
817
|
authenticated_at_ts: E,
|
|
818
|
-
last_interaction_at_ts:
|
|
818
|
+
last_interaction_at_ts: P,
|
|
819
819
|
used_at_ts: X,
|
|
820
820
|
revoked_at_ts: Ne,
|
|
821
821
|
...be
|
|
822
|
-
} = p, Se =
|
|
822
|
+
} = p, Se = z(
|
|
823
823
|
{
|
|
824
824
|
created_at_ts: b,
|
|
825
825
|
updated_at_ts: C,
|
|
826
826
|
expires_at_ts: $,
|
|
827
827
|
idle_expires_at_ts: I,
|
|
828
828
|
authenticated_at_ts: E,
|
|
829
|
-
last_interaction_at_ts:
|
|
829
|
+
last_interaction_at_ts: P,
|
|
830
830
|
used_at_ts: X,
|
|
831
831
|
revoked_at_ts: Ne
|
|
832
832
|
},
|
|
@@ -995,31 +995,35 @@ const bt = 17, St = {
|
|
|
995
995
|
connection: "con_",
|
|
996
996
|
action: "act_",
|
|
997
997
|
hook: "h_",
|
|
998
|
+
hook_code: "hc_",
|
|
998
999
|
rule: "rul_",
|
|
999
1000
|
resource_server: "api_",
|
|
1000
1001
|
guardian_factor: "gfa_",
|
|
1001
1002
|
invite: "inv_"
|
|
1002
1003
|
};
|
|
1003
|
-
function
|
|
1004
|
+
function J(e) {
|
|
1004
1005
|
const n = $e("0123456789abcdefghijklmnopqrstuvwxyz", bt)();
|
|
1005
1006
|
return `${St[e]}${n}`;
|
|
1006
1007
|
}
|
|
1007
1008
|
function Ot() {
|
|
1008
|
-
return
|
|
1009
|
+
return J("organization");
|
|
1009
1010
|
}
|
|
1010
1011
|
function kt() {
|
|
1011
|
-
return
|
|
1012
|
+
return J("connection");
|
|
1012
1013
|
}
|
|
1013
1014
|
function $t() {
|
|
1014
|
-
return
|
|
1015
|
+
return J("hook");
|
|
1015
1016
|
}
|
|
1016
1017
|
function Et() {
|
|
1017
|
-
return
|
|
1018
|
+
return J("resource_server");
|
|
1018
1019
|
}
|
|
1019
1020
|
function It() {
|
|
1020
|
-
return
|
|
1021
|
+
return J("hook_code");
|
|
1021
1022
|
}
|
|
1022
|
-
function zt(
|
|
1023
|
+
function zt() {
|
|
1024
|
+
return J("invite");
|
|
1025
|
+
}
|
|
1026
|
+
function Pt(e) {
|
|
1023
1027
|
return async (t, a) => {
|
|
1024
1028
|
const { is_system: n, ...o } = a, r = {
|
|
1025
1029
|
id: o.id || kt(),
|
|
@@ -1045,15 +1049,15 @@ function G(e) {
|
|
|
1045
1049
|
options: JSON.parse(e.options)
|
|
1046
1050
|
});
|
|
1047
1051
|
}
|
|
1048
|
-
function
|
|
1052
|
+
function Dt(e) {
|
|
1049
1053
|
return e.map(G);
|
|
1050
1054
|
}
|
|
1051
|
-
function
|
|
1055
|
+
function At(e) {
|
|
1052
1056
|
return async (t, a = {}) => {
|
|
1053
1057
|
const { page: n = 0, per_page: o = 50, include_totals: r = !1, q: s } = a;
|
|
1054
1058
|
let i = e.selectFrom("connections").where("connections.tenant_id", "=", t);
|
|
1055
1059
|
s && (i = S(e, i, s, ["user_id", "ip"]));
|
|
1056
|
-
const u = await i.offset(n * o).limit(o).selectAll().execute(), c =
|
|
1060
|
+
const u = await i.offset(n * o).limit(o).selectAll().execute(), c = Dt(u);
|
|
1057
1061
|
if (!r)
|
|
1058
1062
|
return {
|
|
1059
1063
|
connections: c,
|
|
@@ -1070,16 +1074,16 @@ function Dt(e) {
|
|
|
1070
1074
|
};
|
|
1071
1075
|
};
|
|
1072
1076
|
}
|
|
1073
|
-
function
|
|
1077
|
+
function jt(e) {
|
|
1074
1078
|
return async (t, a) => (await e.deleteFrom("connections").where("connections.tenant_id", "=", t).where("connections.id", "=", a).executeTakeFirst()).numDeletedRows > 0;
|
|
1075
1079
|
}
|
|
1076
|
-
function
|
|
1080
|
+
function Ft(e) {
|
|
1077
1081
|
return async (t, a) => {
|
|
1078
1082
|
const n = await e.selectFrom("connections").where("connections.tenant_id", "=", t).where("connections.id", "=", a).selectAll().executeTakeFirst();
|
|
1079
1083
|
return n ? G(n) : null;
|
|
1080
1084
|
};
|
|
1081
1085
|
}
|
|
1082
|
-
function
|
|
1086
|
+
function Rt(e) {
|
|
1083
1087
|
return async (t, a, n) => {
|
|
1084
1088
|
const { is_system: o, ...r } = n, s = {
|
|
1085
1089
|
...r,
|
|
@@ -1092,16 +1096,16 @@ function Ft(e) {
|
|
|
1092
1096
|
}).where("connections.id", "=", a).where("connections.tenant_id", "=", t).execute(), !0;
|
|
1093
1097
|
};
|
|
1094
1098
|
}
|
|
1095
|
-
function
|
|
1099
|
+
function Mt(e) {
|
|
1096
1100
|
return {
|
|
1097
|
-
create:
|
|
1098
|
-
get:
|
|
1099
|
-
list:
|
|
1100
|
-
remove:
|
|
1101
|
-
update:
|
|
1101
|
+
create: Pt(e),
|
|
1102
|
+
get: Ft(e),
|
|
1103
|
+
list: At(e),
|
|
1104
|
+
remove: jt(e),
|
|
1105
|
+
update: Rt(e)
|
|
1102
1106
|
};
|
|
1103
1107
|
}
|
|
1104
|
-
function
|
|
1108
|
+
function Jt(e) {
|
|
1105
1109
|
return async (t, a) => {
|
|
1106
1110
|
const n = {
|
|
1107
1111
|
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -1165,7 +1169,7 @@ function Mt(e) {
|
|
|
1165
1169
|
}), await e.insertInto("clients").values(o).execute(), n;
|
|
1166
1170
|
};
|
|
1167
1171
|
}
|
|
1168
|
-
function
|
|
1172
|
+
function Lt(e) {
|
|
1169
1173
|
return async (t, a) => {
|
|
1170
1174
|
const n = await e.selectFrom("clients").where("clients.tenant_id", "=", t).where("clients.client_id", "=", a).selectAll().executeTakeFirst();
|
|
1171
1175
|
if (!n)
|
|
@@ -1212,7 +1216,7 @@ function Jt(e) {
|
|
|
1212
1216
|
});
|
|
1213
1217
|
};
|
|
1214
1218
|
}
|
|
1215
|
-
function
|
|
1219
|
+
function Kt(e) {
|
|
1216
1220
|
return async (t) => {
|
|
1217
1221
|
const a = await e.selectFrom("clients").where("clients.client_id", "=", t).selectAll().executeTakeFirst();
|
|
1218
1222
|
return a ? w({
|
|
@@ -1256,7 +1260,7 @@ function Lt(e) {
|
|
|
1256
1260
|
}) : null;
|
|
1257
1261
|
};
|
|
1258
1262
|
}
|
|
1259
|
-
function
|
|
1263
|
+
function qt(e) {
|
|
1260
1264
|
return async (t, a) => {
|
|
1261
1265
|
let n = e.selectFrom("clients").where("clients.tenant_id", "=", t);
|
|
1262
1266
|
if (a != null && a.q && (n = n.where(
|
|
@@ -1341,7 +1345,7 @@ function Kt(e) {
|
|
|
1341
1345
|
};
|
|
1342
1346
|
};
|
|
1343
1347
|
}
|
|
1344
|
-
function
|
|
1348
|
+
function Ut(e) {
|
|
1345
1349
|
return async (t, a) => (await e.deleteFrom("clients").where("clients.tenant_id", "=", t).where("clients.client_id", "=", a).executeTakeFirst()).numDeletedRows > 0;
|
|
1346
1350
|
}
|
|
1347
1351
|
function Bt(e) {
|
|
@@ -1365,7 +1369,7 @@ function Bt(e) {
|
|
|
1365
1369
|
"require_proof_of_possession"
|
|
1366
1370
|
],
|
|
1367
1371
|
o
|
|
1368
|
-
),
|
|
1372
|
+
), L(
|
|
1369
1373
|
n,
|
|
1370
1374
|
[
|
|
1371
1375
|
"callbacks",
|
|
@@ -1395,17 +1399,17 @@ function Bt(e) {
|
|
|
1395
1399
|
), (await e.updateTable("clients").set(o).where("clients.tenant_id", "=", t).where("clients.client_id", "=", a).executeTakeFirst()).numUpdatedRows > 0;
|
|
1396
1400
|
};
|
|
1397
1401
|
}
|
|
1398
|
-
function
|
|
1402
|
+
function Qt(e) {
|
|
1399
1403
|
return {
|
|
1400
|
-
create:
|
|
1401
|
-
get:
|
|
1402
|
-
getByClientId:
|
|
1403
|
-
list:
|
|
1404
|
-
remove:
|
|
1404
|
+
create: Jt(e),
|
|
1405
|
+
get: Lt(e),
|
|
1406
|
+
getByClientId: Kt(e),
|
|
1407
|
+
list: qt(e),
|
|
1408
|
+
remove: Ut(e),
|
|
1405
1409
|
update: Bt(e)
|
|
1406
1410
|
};
|
|
1407
1411
|
}
|
|
1408
|
-
function
|
|
1412
|
+
function Yt(e) {
|
|
1409
1413
|
return async (t, a) => {
|
|
1410
1414
|
const n = await e.selectFrom("clients").where("clients.tenant_id", "=", t).where("clients.client_id", "=", a).select("connections").executeTakeFirst();
|
|
1411
1415
|
if (!n)
|
|
@@ -1425,7 +1429,7 @@ function Ht(e) {
|
|
|
1425
1429
|
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
1426
1430
|
}).where("clients.tenant_id", "=", t).where("clients.client_id", "=", a).executeTakeFirst()).numUpdatedRows > 0;
|
|
1427
1431
|
}
|
|
1428
|
-
function
|
|
1432
|
+
function Wt(e) {
|
|
1429
1433
|
return async (t, a) => {
|
|
1430
1434
|
const n = await e.selectFrom("clients").where("clients.tenant_id", "=", t).select(["client_id", "connections"]).execute(), o = [];
|
|
1431
1435
|
for (const r of n)
|
|
@@ -1433,7 +1437,7 @@ function Yt(e) {
|
|
|
1433
1437
|
return o;
|
|
1434
1438
|
};
|
|
1435
1439
|
}
|
|
1436
|
-
function
|
|
1440
|
+
function Gt(e) {
|
|
1437
1441
|
return async (t, a, n) => {
|
|
1438
1442
|
const o = await e.selectFrom("clients").where("clients.tenant_id", "=", t).where("clients.client_id", "=", n).select("connections").executeTakeFirst();
|
|
1439
1443
|
if (!o)
|
|
@@ -1445,7 +1449,7 @@ function Wt(e) {
|
|
|
1445
1449
|
}).where("clients.tenant_id", "=", t).where("clients.client_id", "=", n).executeTakeFirst()).numUpdatedRows > 0);
|
|
1446
1450
|
};
|
|
1447
1451
|
}
|
|
1448
|
-
function
|
|
1452
|
+
function Vt(e) {
|
|
1449
1453
|
return async (t, a, n) => {
|
|
1450
1454
|
const o = await e.selectFrom("clients").where("clients.tenant_id", "=", t).where("clients.client_id", "=", n).select("connections").executeTakeFirst();
|
|
1451
1455
|
if (!o)
|
|
@@ -1459,16 +1463,16 @@ function Gt(e) {
|
|
|
1459
1463
|
}).where("clients.tenant_id", "=", t).where("clients.client_id", "=", n).executeTakeFirst()).numUpdatedRows > 0 : !0;
|
|
1460
1464
|
};
|
|
1461
1465
|
}
|
|
1462
|
-
function
|
|
1466
|
+
function Xt(e) {
|
|
1463
1467
|
return {
|
|
1464
|
-
listByClient:
|
|
1468
|
+
listByClient: Yt(e),
|
|
1465
1469
|
updateByClient: Ht(e),
|
|
1466
|
-
listByConnection:
|
|
1467
|
-
addClientToConnection:
|
|
1468
|
-
removeClientFromConnection:
|
|
1470
|
+
listByConnection: Wt(e),
|
|
1471
|
+
addClientToConnection: Gt(e),
|
|
1472
|
+
removeClientFromConnection: Vt(e)
|
|
1469
1473
|
};
|
|
1470
1474
|
}
|
|
1471
|
-
function
|
|
1475
|
+
function Zt(e) {
|
|
1472
1476
|
return async (t, a) => {
|
|
1473
1477
|
const n = (/* @__PURE__ */ new Date()).toISOString(), o = k(), { scope: r, authorization_details_types: s, ...i } = a, d = {
|
|
1474
1478
|
id: o,
|
|
@@ -1496,7 +1500,7 @@ function Xt(e) {
|
|
|
1496
1500
|
});
|
|
1497
1501
|
};
|
|
1498
1502
|
}
|
|
1499
|
-
function
|
|
1503
|
+
function ea(e) {
|
|
1500
1504
|
return async (t, a) => {
|
|
1501
1505
|
const n = await e.selectFrom("client_grants").selectAll().where("client_grants.tenant_id", "=", t).where("client_grants.id", "=", a).executeTakeFirst();
|
|
1502
1506
|
if (!n)
|
|
@@ -1518,7 +1522,7 @@ function Zt(e) {
|
|
|
1518
1522
|
return w(o);
|
|
1519
1523
|
};
|
|
1520
1524
|
}
|
|
1521
|
-
function
|
|
1525
|
+
function ta(e) {
|
|
1522
1526
|
return async (t, a = {}) => {
|
|
1523
1527
|
const { page: n = 0, per_page: o = 50, include_totals: r = !1, q: s, sort: i } = a;
|
|
1524
1528
|
let d = e.selectFrom("client_grants").where("client_grants.tenant_id", "=", t);
|
|
@@ -1527,8 +1531,8 @@ function ea(e) {
|
|
|
1527
1531
|
if (g && !b && y) {
|
|
1528
1532
|
const C = !!g[1], $ = g[2], { ref: I } = e.dynamic, E = I(`client_grants.${$}`);
|
|
1529
1533
|
if ($ === "allow_any_organization") {
|
|
1530
|
-
const
|
|
1531
|
-
C ? d = d.where(E, "!=",
|
|
1534
|
+
const P = y === "true" ? 1 : 0;
|
|
1535
|
+
C ? d = d.where(E, "!=", P) : d = d.where(E, "=", P);
|
|
1532
1536
|
} else
|
|
1533
1537
|
C ? d = d.where(E, "!=", y) : d = d.where(E, "=", y);
|
|
1534
1538
|
} else
|
|
@@ -1574,10 +1578,10 @@ function ea(e) {
|
|
|
1574
1578
|
};
|
|
1575
1579
|
};
|
|
1576
1580
|
}
|
|
1577
|
-
function
|
|
1581
|
+
function aa(e) {
|
|
1578
1582
|
return async (t, a) => ((await e.deleteFrom("client_grants").where("client_grants.tenant_id", "=", t).where("client_grants.id", "=", a).executeTakeFirst()).numDeletedRows ?? 0n) > 0n;
|
|
1579
1583
|
}
|
|
1580
|
-
function
|
|
1584
|
+
function na(e) {
|
|
1581
1585
|
return async (t, a, n) => {
|
|
1582
1586
|
const o = (/* @__PURE__ */ new Date()).toISOString(), { scope: r, authorization_details_types: s, ...i } = n, d = {
|
|
1583
1587
|
...i,
|
|
@@ -1588,16 +1592,16 @@ function aa(e) {
|
|
|
1588
1592
|
)), i.allow_any_organization !== void 0 && (d.allow_any_organization = i.allow_any_organization ? 1 : 0), i.is_system !== void 0 && (d.is_system = i.is_system ? 1 : 0), ((await e.updateTable("client_grants").set(d).where("client_grants.tenant_id", "=", t).where("client_grants.id", "=", a).executeTakeFirst()).numUpdatedRows ?? 0n) > 0n;
|
|
1589
1593
|
};
|
|
1590
1594
|
}
|
|
1591
|
-
function
|
|
1595
|
+
function oa(e) {
|
|
1592
1596
|
return {
|
|
1593
|
-
create:
|
|
1594
|
-
get:
|
|
1595
|
-
list:
|
|
1596
|
-
remove:
|
|
1597
|
-
update:
|
|
1597
|
+
create: Zt(e),
|
|
1598
|
+
get: ea(e),
|
|
1599
|
+
list: ta(e),
|
|
1600
|
+
remove: aa(e),
|
|
1601
|
+
update: na(e)
|
|
1598
1602
|
};
|
|
1599
1603
|
}
|
|
1600
|
-
function
|
|
1604
|
+
function ra(e) {
|
|
1601
1605
|
return async (t = {}) => {
|
|
1602
1606
|
const {
|
|
1603
1607
|
page: a = 0,
|
|
@@ -1639,22 +1643,22 @@ function oa(e) {
|
|
|
1639
1643
|
};
|
|
1640
1644
|
};
|
|
1641
1645
|
}
|
|
1642
|
-
function
|
|
1646
|
+
function sa(e) {
|
|
1643
1647
|
return async (t) => {
|
|
1644
1648
|
await e.insertInto("keys").values({ ...t, created_at: (/* @__PURE__ */ new Date()).toDateString() }).execute();
|
|
1645
1649
|
};
|
|
1646
1650
|
}
|
|
1647
|
-
function
|
|
1651
|
+
function ia(e) {
|
|
1648
1652
|
return async (t, a) => !!(await e.updateTable("keys").set(a).where("kid", "=", t).execute()).length;
|
|
1649
1653
|
}
|
|
1650
|
-
function
|
|
1654
|
+
function ca(e) {
|
|
1651
1655
|
return {
|
|
1652
|
-
create:
|
|
1653
|
-
list:
|
|
1654
|
-
update:
|
|
1656
|
+
create: sa(e),
|
|
1657
|
+
list: ra(e),
|
|
1658
|
+
update: ia(e)
|
|
1655
1659
|
};
|
|
1656
1660
|
}
|
|
1657
|
-
function
|
|
1661
|
+
function la(e) {
|
|
1658
1662
|
return async (t, a) => {
|
|
1659
1663
|
const n = {
|
|
1660
1664
|
custom_domain_id: a.custom_domain_id || k(),
|
|
@@ -1672,37 +1676,37 @@ function ca(e) {
|
|
|
1672
1676
|
}).execute(), n;
|
|
1673
1677
|
};
|
|
1674
1678
|
}
|
|
1675
|
-
function
|
|
1679
|
+
function da(e) {
|
|
1676
1680
|
return async (t) => (await e.selectFrom("custom_domains").where("custom_domains.tenant_id", "=", t).selectAll().execute()).map((n) => ({
|
|
1677
1681
|
...n,
|
|
1678
1682
|
primary: n.primary === 1,
|
|
1679
|
-
domain_metadata:
|
|
1683
|
+
domain_metadata: D(
|
|
1680
1684
|
n.domain_metadata,
|
|
1681
1685
|
void 0
|
|
1682
1686
|
)
|
|
1683
1687
|
}));
|
|
1684
1688
|
}
|
|
1685
|
-
function
|
|
1689
|
+
function ua(e) {
|
|
1686
1690
|
return async (t, a) => (await e.deleteFrom("custom_domains").where("custom_domains.tenant_id", "=", t).where("custom_domains.custom_domain_id", "=", a).execute()).length > 0;
|
|
1687
1691
|
}
|
|
1688
|
-
function
|
|
1692
|
+
function _a(e) {
|
|
1689
1693
|
return async (t, a) => {
|
|
1690
1694
|
const n = await e.selectFrom("custom_domains").where("custom_domains.tenant_id", "=", t).where("custom_domains.custom_domain_id", "=", a).selectAll().executeTakeFirst();
|
|
1691
1695
|
return n ? {
|
|
1692
1696
|
...n,
|
|
1693
1697
|
primary: n.primary === 1,
|
|
1694
|
-
domain_metadata:
|
|
1698
|
+
domain_metadata: D(
|
|
1695
1699
|
n.domain_metadata,
|
|
1696
1700
|
void 0
|
|
1697
1701
|
),
|
|
1698
|
-
verification:
|
|
1702
|
+
verification: D(
|
|
1699
1703
|
n.verification,
|
|
1700
1704
|
void 0
|
|
1701
1705
|
)
|
|
1702
1706
|
} : null;
|
|
1703
1707
|
};
|
|
1704
1708
|
}
|
|
1705
|
-
function
|
|
1709
|
+
function ma(e) {
|
|
1706
1710
|
return async (t, a, n) => {
|
|
1707
1711
|
const { verification: o, domain_metadata: r, primary: s, ...i } = n, d = {
|
|
1708
1712
|
...i,
|
|
@@ -1718,30 +1722,30 @@ function _a(e) {
|
|
|
1718
1722
|
return (await e.updateTable("custom_domains").set(d).where("custom_domains.tenant_id", "=", t).where("custom_domains.custom_domain_id", "=", a).execute()).length > 0;
|
|
1719
1723
|
};
|
|
1720
1724
|
}
|
|
1721
|
-
function
|
|
1725
|
+
function ha(e) {
|
|
1722
1726
|
return async (t) => {
|
|
1723
1727
|
const a = await e.selectFrom("custom_domains").where("custom_domains.domain", "=", t).selectAll().executeTakeFirst();
|
|
1724
1728
|
return a ? {
|
|
1725
1729
|
...a,
|
|
1726
1730
|
primary: a.primary === 1,
|
|
1727
|
-
domain_metadata:
|
|
1731
|
+
domain_metadata: D(
|
|
1728
1732
|
a.domain_metadata,
|
|
1729
1733
|
void 0
|
|
1730
1734
|
)
|
|
1731
1735
|
} : null;
|
|
1732
1736
|
};
|
|
1733
1737
|
}
|
|
1734
|
-
function
|
|
1738
|
+
function pa(e) {
|
|
1735
1739
|
return {
|
|
1736
|
-
create:
|
|
1737
|
-
get:
|
|
1738
|
-
getByDomain:
|
|
1739
|
-
list:
|
|
1740
|
-
remove:
|
|
1741
|
-
update:
|
|
1740
|
+
create: la(e),
|
|
1741
|
+
get: _a(e),
|
|
1742
|
+
getByDomain: ha(e),
|
|
1743
|
+
list: da(e),
|
|
1744
|
+
remove: ua(e),
|
|
1745
|
+
update: ma(e)
|
|
1742
1746
|
};
|
|
1743
1747
|
}
|
|
1744
|
-
function
|
|
1748
|
+
function fa(e) {
|
|
1745
1749
|
return async (t) => {
|
|
1746
1750
|
const [a] = await e.selectFrom("branding").where("branding.tenant_id", "=", t).selectAll().execute();
|
|
1747
1751
|
if (!a)
|
|
@@ -1771,9 +1775,9 @@ function pa(e) {
|
|
|
1771
1775
|
});
|
|
1772
1776
|
};
|
|
1773
1777
|
}
|
|
1774
|
-
function
|
|
1778
|
+
function ga(e) {
|
|
1775
1779
|
return async (t, a) => {
|
|
1776
|
-
var s, i, d, u, c, l, m, _, p, f, g, y, b, C, $, I, E,
|
|
1780
|
+
var s, i, d, u, c, l, m, _, p, f, g, y, b, C, $, I, E, P;
|
|
1777
1781
|
const { colors: n, font: o, ...r } = a;
|
|
1778
1782
|
try {
|
|
1779
1783
|
await e.insertInto("branding").values({
|
|
@@ -1794,18 +1798,18 @@ function fa(e) {
|
|
|
1794
1798
|
colors_page_background_start: (b = (y = a.colors) == null ? void 0 : y.page_background) == null ? void 0 : b.start,
|
|
1795
1799
|
colors_page_background_end: ($ = (C = a.colors) == null ? void 0 : C.page_background) == null ? void 0 : $.end,
|
|
1796
1800
|
colors_page_background_angle_dev: (E = (I = a.colors) == null ? void 0 : I.page_background) == null ? void 0 : E.angle_deg,
|
|
1797
|
-
font_url: (
|
|
1801
|
+
font_url: (P = a.font) == null ? void 0 : P.url
|
|
1798
1802
|
}).where("tenant_id", "=", t).execute();
|
|
1799
1803
|
}
|
|
1800
1804
|
};
|
|
1801
1805
|
}
|
|
1802
|
-
function
|
|
1806
|
+
function wa(e) {
|
|
1803
1807
|
return {
|
|
1804
|
-
get:
|
|
1805
|
-
set:
|
|
1808
|
+
get: fa(e),
|
|
1809
|
+
set: ga(e)
|
|
1806
1810
|
};
|
|
1807
1811
|
}
|
|
1808
|
-
function
|
|
1812
|
+
function ya(e) {
|
|
1809
1813
|
return async (t) => {
|
|
1810
1814
|
const a = await e.selectFrom("universal_login_templates").select(["body"]).where("tenant_id", "=", t).executeTakeFirst();
|
|
1811
1815
|
return a ? {
|
|
@@ -1813,7 +1817,7 @@ function wa(e) {
|
|
|
1813
1817
|
} : null;
|
|
1814
1818
|
};
|
|
1815
1819
|
}
|
|
1816
|
-
function
|
|
1820
|
+
function va(e) {
|
|
1817
1821
|
return async (t, a) => {
|
|
1818
1822
|
const n = Date.now();
|
|
1819
1823
|
try {
|
|
@@ -1831,23 +1835,28 @@ function ya(e) {
|
|
|
1831
1835
|
}
|
|
1832
1836
|
};
|
|
1833
1837
|
}
|
|
1834
|
-
function
|
|
1838
|
+
function Ca(e) {
|
|
1835
1839
|
return async (t) => {
|
|
1836
1840
|
await e.deleteFrom("universal_login_templates").where("tenant_id", "=", t).execute();
|
|
1837
1841
|
};
|
|
1838
1842
|
}
|
|
1839
|
-
function
|
|
1843
|
+
function xa(e) {
|
|
1840
1844
|
return {
|
|
1841
|
-
get:
|
|
1842
|
-
set:
|
|
1843
|
-
delete:
|
|
1845
|
+
get: ya(e),
|
|
1846
|
+
set: va(e),
|
|
1847
|
+
delete: Ca(e)
|
|
1844
1848
|
};
|
|
1845
1849
|
}
|
|
1846
|
-
function
|
|
1850
|
+
function Ta(e) {
|
|
1847
1851
|
return async (t, a = {}) => {
|
|
1848
1852
|
const { page: n = 0, per_page: o = 50, include_totals: r = !1, q: s } = a;
|
|
1849
1853
|
let i = e.selectFrom("hooks").where("hooks.tenant_id", "=", t);
|
|
1850
|
-
s && (i = S(e, i, s, [
|
|
1854
|
+
s && (i = S(e, i, s, [
|
|
1855
|
+
"url",
|
|
1856
|
+
"form_id",
|
|
1857
|
+
"template_id",
|
|
1858
|
+
"code_id"
|
|
1859
|
+
]));
|
|
1851
1860
|
const c = (await i.offset(n * o).limit(o).selectAll().execute()).map((m) => {
|
|
1852
1861
|
const {
|
|
1853
1862
|
tenant_id: _,
|
|
@@ -1856,7 +1865,7 @@ function xa(e) {
|
|
|
1856
1865
|
created_at_ts: g,
|
|
1857
1866
|
updated_at_ts: y,
|
|
1858
1867
|
...b
|
|
1859
|
-
} = m, C =
|
|
1868
|
+
} = m, C = z({ created_at_ts: g, updated_at_ts: y }, [
|
|
1860
1869
|
"created_at_ts",
|
|
1861
1870
|
"updated_at_ts"
|
|
1862
1871
|
]);
|
|
@@ -1883,7 +1892,7 @@ function xa(e) {
|
|
|
1883
1892
|
};
|
|
1884
1893
|
};
|
|
1885
1894
|
}
|
|
1886
|
-
function
|
|
1895
|
+
function Na(e) {
|
|
1887
1896
|
return async (t, a) => {
|
|
1888
1897
|
const n = await e.selectFrom("hooks").where("hooks.tenant_id", "=", t).where("hooks.hook_id", "=", a).selectAll().executeTakeFirst();
|
|
1889
1898
|
if (!n)
|
|
@@ -1893,7 +1902,7 @@ function Ta(e) {
|
|
|
1893
1902
|
created_at_ts: r,
|
|
1894
1903
|
updated_at_ts: s,
|
|
1895
1904
|
...i
|
|
1896
|
-
} = n, d =
|
|
1905
|
+
} = n, d = z({ created_at_ts: r, updated_at_ts: s }, [
|
|
1897
1906
|
"created_at_ts",
|
|
1898
1907
|
"updated_at_ts"
|
|
1899
1908
|
]);
|
|
@@ -1905,10 +1914,10 @@ function Ta(e) {
|
|
|
1905
1914
|
});
|
|
1906
1915
|
};
|
|
1907
1916
|
}
|
|
1908
|
-
function
|
|
1917
|
+
function ba(e) {
|
|
1909
1918
|
return async (t, a) => (await e.deleteFrom("hooks").where("hooks.tenant_id", "=", t).where("hooks.hook_id", "=", a).executeTakeFirst()).numDeletedRows > 0;
|
|
1910
1919
|
}
|
|
1911
|
-
function
|
|
1920
|
+
function Sa(e) {
|
|
1912
1921
|
return async (t, a) => {
|
|
1913
1922
|
const n = Date.now(), o = a.hook_id || $t(), { hook_id: r, enabled: s, synchronous: i, ...d } = a;
|
|
1914
1923
|
return await e.insertInto("hooks").values({
|
|
@@ -1929,7 +1938,7 @@ function ba(e) {
|
|
|
1929
1938
|
};
|
|
1930
1939
|
};
|
|
1931
1940
|
}
|
|
1932
|
-
function
|
|
1941
|
+
function Oa(e) {
|
|
1933
1942
|
return async (t, a, n) => {
|
|
1934
1943
|
const { hook_id: o, ...r } = n, s = {
|
|
1935
1944
|
...r,
|
|
@@ -1940,16 +1949,78 @@ function Sa(e) {
|
|
|
1940
1949
|
return await e.updateTable("hooks").set(s).where("hooks.hook_id", "=", a).where("hooks.tenant_id", "=", t).execute(), !0;
|
|
1941
1950
|
};
|
|
1942
1951
|
}
|
|
1943
|
-
function
|
|
1952
|
+
function ka(e) {
|
|
1944
1953
|
return {
|
|
1945
|
-
create:
|
|
1946
|
-
get:
|
|
1947
|
-
list:
|
|
1948
|
-
update:
|
|
1949
|
-
remove:
|
|
1954
|
+
create: Sa(e),
|
|
1955
|
+
get: Na(e),
|
|
1956
|
+
list: Ta(e),
|
|
1957
|
+
update: Oa(e),
|
|
1958
|
+
remove: ba(e)
|
|
1950
1959
|
};
|
|
1951
1960
|
}
|
|
1952
|
-
function
|
|
1961
|
+
function $a(e) {
|
|
1962
|
+
return async (t, a) => {
|
|
1963
|
+
const n = Date.now(), o = It();
|
|
1964
|
+
return await e.insertInto("hook_code").values({
|
|
1965
|
+
id: o,
|
|
1966
|
+
tenant_id: t,
|
|
1967
|
+
code: a.code,
|
|
1968
|
+
secrets: a.secrets ? JSON.stringify(a.secrets) : null,
|
|
1969
|
+
created_at_ts: n,
|
|
1970
|
+
updated_at_ts: n
|
|
1971
|
+
}).execute(), {
|
|
1972
|
+
id: o,
|
|
1973
|
+
tenant_id: t,
|
|
1974
|
+
code: a.code,
|
|
1975
|
+
secrets: a.secrets,
|
|
1976
|
+
created_at: new Date(n).toISOString(),
|
|
1977
|
+
updated_at: new Date(n).toISOString()
|
|
1978
|
+
};
|
|
1979
|
+
};
|
|
1980
|
+
}
|
|
1981
|
+
function Ea(e) {
|
|
1982
|
+
return async (t, a) => {
|
|
1983
|
+
const n = await e.selectFrom("hook_code").where("hook_code.tenant_id", "=", t).where("hook_code.id", "=", a).selectAll().executeTakeFirst();
|
|
1984
|
+
if (!n)
|
|
1985
|
+
return null;
|
|
1986
|
+
const { created_at_ts: o, updated_at_ts: r, secrets: s, ...i } = n, d = z({ created_at_ts: o, updated_at_ts: r }, [
|
|
1987
|
+
"created_at_ts",
|
|
1988
|
+
"updated_at_ts"
|
|
1989
|
+
]);
|
|
1990
|
+
return {
|
|
1991
|
+
...i,
|
|
1992
|
+
...d,
|
|
1993
|
+
secrets: s ? (() => {
|
|
1994
|
+
try {
|
|
1995
|
+
return JSON.parse(s);
|
|
1996
|
+
} catch {
|
|
1997
|
+
console.warn(`Failed to parse secrets for hook_code ${a}`);
|
|
1998
|
+
return;
|
|
1999
|
+
}
|
|
2000
|
+
})() : void 0
|
|
2001
|
+
};
|
|
2002
|
+
};
|
|
2003
|
+
}
|
|
2004
|
+
function Ia(e) {
|
|
2005
|
+
return async (t, a, n) => {
|
|
2006
|
+
const o = {
|
|
2007
|
+
updated_at_ts: Date.now()
|
|
2008
|
+
};
|
|
2009
|
+
return n.code !== void 0 && (o.code = n.code), n.secrets !== void 0 && (o.secrets = JSON.stringify(n.secrets)), (await e.updateTable("hook_code").set(o).where("hook_code.id", "=", a).where("hook_code.tenant_id", "=", t).executeTakeFirst()).numUpdatedRows > 0;
|
|
2010
|
+
};
|
|
2011
|
+
}
|
|
2012
|
+
function za(e) {
|
|
2013
|
+
return async (t, a) => (await e.deleteFrom("hook_code").where("hook_code.tenant_id", "=", t).where("hook_code.id", "=", a).executeTakeFirst()).numDeletedRows > 0;
|
|
2014
|
+
}
|
|
2015
|
+
function Pa(e) {
|
|
2016
|
+
return {
|
|
2017
|
+
create: $a(e),
|
|
2018
|
+
get: Ea(e),
|
|
2019
|
+
update: Ia(e),
|
|
2020
|
+
remove: za(e)
|
|
2021
|
+
};
|
|
2022
|
+
}
|
|
2023
|
+
function Da(e) {
|
|
1953
2024
|
return async (t, a, n) => {
|
|
1954
2025
|
const o = {
|
|
1955
2026
|
themeId: n || k(),
|
|
@@ -1963,10 +2034,10 @@ function ka(e) {
|
|
|
1963
2034
|
return await e.insertInto("themes").values(M(r)).execute(), o;
|
|
1964
2035
|
};
|
|
1965
2036
|
}
|
|
1966
|
-
function
|
|
2037
|
+
function Aa(e) {
|
|
1967
2038
|
return async (t, a) => (await e.deleteFrom("themes").where("themes.tenant_id", "=", t).where("themes.themeId", "=", a).executeTakeFirst()).numDeletedRows > 0;
|
|
1968
2039
|
}
|
|
1969
|
-
function
|
|
2040
|
+
function ja(e) {
|
|
1970
2041
|
return async (t, a) => {
|
|
1971
2042
|
const n = await e.selectFrom("themes").where("themes.tenant_id", "=", t).where("themes.themeId", "=", a).selectAll().executeTakeFirst();
|
|
1972
2043
|
if (!n)
|
|
@@ -1992,7 +2063,7 @@ function Ea(e) {
|
|
|
1992
2063
|
);
|
|
1993
2064
|
};
|
|
1994
2065
|
}
|
|
1995
|
-
function
|
|
2066
|
+
function Fa(e) {
|
|
1996
2067
|
return async (t, a, n) => {
|
|
1997
2068
|
const { themeId: o, ...r } = n, s = M({
|
|
1998
2069
|
...r,
|
|
@@ -2001,19 +2072,19 @@ function Ia(e) {
|
|
|
2001
2072
|
return await e.updateTable("themes").set(s).where("themes.themeId", "=", a).where("themes.tenant_id", "=", t).execute(), !0;
|
|
2002
2073
|
};
|
|
2003
2074
|
}
|
|
2004
|
-
function
|
|
2075
|
+
function Ra(e) {
|
|
2005
2076
|
return {
|
|
2006
|
-
create:
|
|
2007
|
-
get:
|
|
2008
|
-
remove:
|
|
2009
|
-
update:
|
|
2077
|
+
create: Da(e),
|
|
2078
|
+
get: ja(e),
|
|
2079
|
+
remove: Aa(e),
|
|
2080
|
+
update: Fa(e)
|
|
2010
2081
|
};
|
|
2011
2082
|
}
|
|
2012
|
-
function
|
|
2083
|
+
function Ma(e) {
|
|
2013
2084
|
return async (t, a) => {
|
|
2014
2085
|
const n = await e.selectFrom("login_sessions").where("login_sessions.id", "=", a).selectAll().executeTakeFirst();
|
|
2015
2086
|
if (!n) return null;
|
|
2016
|
-
const { created_at_ts: o, updated_at_ts: r, expires_at_ts: s, ...i } = n, d =
|
|
2087
|
+
const { created_at_ts: o, updated_at_ts: r, expires_at_ts: s, ...i } = n, d = z(
|
|
2017
2088
|
{ created_at_ts: o, updated_at_ts: r, expires_at_ts: s },
|
|
2018
2089
|
["created_at_ts", "updated_at_ts", "expires_at_ts"]
|
|
2019
2090
|
);
|
|
@@ -2031,25 +2102,25 @@ function Pa(e) {
|
|
|
2031
2102
|
);
|
|
2032
2103
|
};
|
|
2033
2104
|
}
|
|
2034
|
-
const V = "0123456789ABCDEFGHJKMNPQRSTVWXYZ",
|
|
2035
|
-
function
|
|
2105
|
+
const V = "0123456789ABCDEFGHJKMNPQRSTVWXYZ", H = V.length, Ja = 10, te = 16;
|
|
2106
|
+
function La(e) {
|
|
2036
2107
|
let t = "";
|
|
2037
|
-
for (let a =
|
|
2038
|
-
t = V.charAt(e %
|
|
2108
|
+
for (let a = Ja; a > 0; a--)
|
|
2109
|
+
t = V.charAt(e % H) + t, e = Math.floor(e / H);
|
|
2039
2110
|
return t;
|
|
2040
2111
|
}
|
|
2041
|
-
function
|
|
2112
|
+
function Ka() {
|
|
2042
2113
|
const e = new Uint8Array(te);
|
|
2043
2114
|
crypto.getRandomValues(e);
|
|
2044
2115
|
let t = "";
|
|
2045
2116
|
for (let a = 0; a < te; a++)
|
|
2046
|
-
t += V.charAt(e[a] %
|
|
2117
|
+
t += V.charAt(e[a] % H);
|
|
2047
2118
|
return t;
|
|
2048
2119
|
}
|
|
2049
2120
|
function fe() {
|
|
2050
|
-
return
|
|
2121
|
+
return La(Date.now()) + Ka();
|
|
2051
2122
|
}
|
|
2052
|
-
function
|
|
2123
|
+
function qa(e) {
|
|
2053
2124
|
return async (t, a) => {
|
|
2054
2125
|
var i;
|
|
2055
2126
|
const n = W(), o = {
|
|
@@ -2072,7 +2143,7 @@ function Fa(e) {
|
|
|
2072
2143
|
}).execute(), o;
|
|
2073
2144
|
};
|
|
2074
2145
|
}
|
|
2075
|
-
function
|
|
2146
|
+
function Ua(e) {
|
|
2076
2147
|
return async (t, a, n) => {
|
|
2077
2148
|
const { created_at: o, updated_at: r, expires_at: s, ...i } = n, d = M(i);
|
|
2078
2149
|
return delete d.created_at_ts, delete d.updated_at_ts, delete d.expires_at_ts, delete d.id, delete d.tenant_id, (await e.updateTable("login_sessions").set({
|
|
@@ -2084,18 +2155,18 @@ function Ra(e) {
|
|
|
2084
2155
|
}).where("login_sessions.id", "=", a).where("login_sessions.tenant_id", "=", t).execute()).length === 1;
|
|
2085
2156
|
};
|
|
2086
2157
|
}
|
|
2087
|
-
function
|
|
2158
|
+
function Ba(e) {
|
|
2088
2159
|
return async (t, a) => (await e.deleteFrom("login_sessions").where("login_sessions.tenant_id", "=", t).where("login_sessions.id", "=", a).execute()).length > 0;
|
|
2089
2160
|
}
|
|
2090
|
-
function
|
|
2161
|
+
function Qa(e) {
|
|
2091
2162
|
return {
|
|
2092
|
-
create:
|
|
2093
|
-
get:
|
|
2094
|
-
update:
|
|
2095
|
-
remove:
|
|
2163
|
+
create: qa(e),
|
|
2164
|
+
get: Ma(e),
|
|
2165
|
+
update: Ua(e),
|
|
2166
|
+
remove: Ba(e)
|
|
2096
2167
|
};
|
|
2097
2168
|
}
|
|
2098
|
-
function
|
|
2169
|
+
function Ya(e) {
|
|
2099
2170
|
return async (t) => {
|
|
2100
2171
|
const [a] = await e.selectFrom("prompt_settings").where("prompt_settings.tenant_id", "=", t).selectAll().execute();
|
|
2101
2172
|
return w({
|
|
@@ -2115,7 +2186,7 @@ function ae(e) {
|
|
|
2115
2186
|
universal_login_experience: e.universal_login_experience
|
|
2116
2187
|
});
|
|
2117
2188
|
}
|
|
2118
|
-
function
|
|
2189
|
+
function Ha(e) {
|
|
2119
2190
|
return async (t, a) => {
|
|
2120
2191
|
try {
|
|
2121
2192
|
const n = Pe.parse(a);
|
|
@@ -2128,13 +2199,13 @@ function Ka(e) {
|
|
|
2128
2199
|
}
|
|
2129
2200
|
};
|
|
2130
2201
|
}
|
|
2131
|
-
function
|
|
2202
|
+
function Wa(e) {
|
|
2132
2203
|
return {
|
|
2133
|
-
get:
|
|
2134
|
-
set:
|
|
2204
|
+
get: Ya(e),
|
|
2205
|
+
set: Ha(e)
|
|
2135
2206
|
};
|
|
2136
2207
|
}
|
|
2137
|
-
function
|
|
2208
|
+
function Ga(e) {
|
|
2138
2209
|
return async (t) => {
|
|
2139
2210
|
const [a] = await e.selectFrom("email_providers").where("email_providers.tenant_id", "=", t).selectAll().execute();
|
|
2140
2211
|
if (!a)
|
|
@@ -2154,7 +2225,7 @@ function Ba(e) {
|
|
|
2154
2225
|
});
|
|
2155
2226
|
};
|
|
2156
2227
|
}
|
|
2157
|
-
function
|
|
2228
|
+
function Va(e) {
|
|
2158
2229
|
return async (t, a) => {
|
|
2159
2230
|
const { credentials: n, settings: o, enabled: r, ...s } = a;
|
|
2160
2231
|
await e.updateTable("email_providers").set({
|
|
@@ -2165,7 +2236,7 @@ function Ua(e) {
|
|
|
2165
2236
|
}).where("tenant_id", "=", t).execute();
|
|
2166
2237
|
};
|
|
2167
2238
|
}
|
|
2168
|
-
function
|
|
2239
|
+
function Xa(e) {
|
|
2169
2240
|
return async (t, a) => {
|
|
2170
2241
|
const { credentials: n, settings: o, enabled: r, ...s } = a;
|
|
2171
2242
|
await e.insertInto("email_providers").values({
|
|
@@ -2179,20 +2250,20 @@ function Qa(e) {
|
|
|
2179
2250
|
}).execute();
|
|
2180
2251
|
};
|
|
2181
2252
|
}
|
|
2182
|
-
function
|
|
2253
|
+
function Za(e) {
|
|
2183
2254
|
return async (t) => {
|
|
2184
2255
|
await e.deleteFrom("email_providers").where("tenant_id", "=", t).execute();
|
|
2185
2256
|
};
|
|
2186
2257
|
}
|
|
2187
|
-
function
|
|
2258
|
+
function en(e) {
|
|
2188
2259
|
return {
|
|
2189
|
-
get:
|
|
2190
|
-
create:
|
|
2191
|
-
update:
|
|
2192
|
-
remove:
|
|
2260
|
+
get: Ga(e),
|
|
2261
|
+
create: Xa(e),
|
|
2262
|
+
update: Va(e),
|
|
2263
|
+
remove: Za(e)
|
|
2193
2264
|
};
|
|
2194
2265
|
}
|
|
2195
|
-
function
|
|
2266
|
+
function tn(e) {
|
|
2196
2267
|
return async (t, a) => {
|
|
2197
2268
|
const n = await e.selectFrom("refresh_tokens").where("refresh_tokens.tenant_id", "=", t).where("refresh_tokens.id", "=", a).selectAll().executeTakeFirst();
|
|
2198
2269
|
if (!n)
|
|
@@ -2204,7 +2275,7 @@ function Wa(e) {
|
|
|
2204
2275
|
idle_expires_at_ts: i,
|
|
2205
2276
|
last_exchanged_at_ts: d,
|
|
2206
2277
|
...u
|
|
2207
|
-
} = n, c =
|
|
2278
|
+
} = n, c = z(
|
|
2208
2279
|
{
|
|
2209
2280
|
created_at_ts: r,
|
|
2210
2281
|
expires_at_ts: s,
|
|
@@ -2223,7 +2294,7 @@ function Wa(e) {
|
|
|
2223
2294
|
};
|
|
2224
2295
|
};
|
|
2225
2296
|
}
|
|
2226
|
-
function
|
|
2297
|
+
function an(e) {
|
|
2227
2298
|
return async (t, a) => {
|
|
2228
2299
|
const n = W(), o = {
|
|
2229
2300
|
...a,
|
|
@@ -2250,10 +2321,10 @@ function Ga(e) {
|
|
|
2250
2321
|
}).execute(), { ...a, ...o };
|
|
2251
2322
|
};
|
|
2252
2323
|
}
|
|
2253
|
-
function
|
|
2324
|
+
function nn(e) {
|
|
2254
2325
|
return async (t, a) => !!(await e.deleteFrom("refresh_tokens").where("tenant_id", "=", t).where("refresh_tokens.id", "=", a).execute()).length;
|
|
2255
2326
|
}
|
|
2256
|
-
function
|
|
2327
|
+
function on(e) {
|
|
2257
2328
|
return async (t, a, n) => {
|
|
2258
2329
|
const {
|
|
2259
2330
|
created_at: o,
|
|
@@ -2278,7 +2349,7 @@ function Xa(e) {
|
|
|
2278
2349
|
return !!(await e.updateTable("refresh_tokens").set(m).where("tenant_id", "=", t).where("refresh_tokens.id", "=", a).execute()).length;
|
|
2279
2350
|
};
|
|
2280
2351
|
}
|
|
2281
|
-
function
|
|
2352
|
+
function rn(e) {
|
|
2282
2353
|
return async (t, a = {}) => {
|
|
2283
2354
|
const { page: n = 0, per_page: o = 50, include_totals: r = !1, sort: s, q: i } = a;
|
|
2284
2355
|
let d = e.selectFrom("refresh_tokens").where("refresh_tokens.tenant_id", "=", t);
|
|
@@ -2297,7 +2368,7 @@ function Za(e) {
|
|
|
2297
2368
|
idle_expires_at_ts: b,
|
|
2298
2369
|
last_exchanged_at_ts: C,
|
|
2299
2370
|
...$
|
|
2300
|
-
} = p, I =
|
|
2371
|
+
} = p, I = z(
|
|
2301
2372
|
{
|
|
2302
2373
|
created_at_ts: g,
|
|
2303
2374
|
expires_at_ts: y,
|
|
@@ -2331,20 +2402,20 @@ function Za(e) {
|
|
|
2331
2402
|
};
|
|
2332
2403
|
};
|
|
2333
2404
|
}
|
|
2334
|
-
function
|
|
2405
|
+
function sn(e) {
|
|
2335
2406
|
return {
|
|
2336
|
-
create:
|
|
2337
|
-
get:
|
|
2338
|
-
list:
|
|
2339
|
-
remove:
|
|
2340
|
-
update:
|
|
2407
|
+
create: an(e),
|
|
2408
|
+
get: tn(e),
|
|
2409
|
+
list: rn(e),
|
|
2410
|
+
remove: nn(e),
|
|
2411
|
+
update: on(e)
|
|
2341
2412
|
};
|
|
2342
2413
|
}
|
|
2343
|
-
const
|
|
2344
|
-
function
|
|
2414
|
+
const cn = 7 * 24 * 60 * 60 * 1e3;
|
|
2415
|
+
function ln(e) {
|
|
2345
2416
|
return async (t) => {
|
|
2346
2417
|
var i, d, u;
|
|
2347
|
-
const { tenant_id: a, user_id: n } = t || {}, r = Date.now() -
|
|
2418
|
+
const { tenant_id: a, user_id: n } = t || {}, r = Date.now() - cn, s = 1e3;
|
|
2348
2419
|
try {
|
|
2349
2420
|
let c = 0;
|
|
2350
2421
|
for (; ; ) {
|
|
@@ -2401,7 +2472,7 @@ function an(e) {
|
|
|
2401
2472
|
}
|
|
2402
2473
|
};
|
|
2403
2474
|
}
|
|
2404
|
-
function
|
|
2475
|
+
function dn(e) {
|
|
2405
2476
|
return async (t, a) => {
|
|
2406
2477
|
const n = q.parse({
|
|
2407
2478
|
id: k(),
|
|
@@ -2419,7 +2490,7 @@ function nn(e) {
|
|
|
2419
2490
|
}).execute(), q.parse(n);
|
|
2420
2491
|
};
|
|
2421
2492
|
}
|
|
2422
|
-
function
|
|
2493
|
+
function un(e) {
|
|
2423
2494
|
return async (t, a = {}) => {
|
|
2424
2495
|
const { page: n = 0, per_page: o = 50, include_totals: r = !1, q: s } = a;
|
|
2425
2496
|
let i = e.selectFrom("forms").where("tenant_id", "=", t);
|
|
@@ -2459,13 +2530,13 @@ function on(e) {
|
|
|
2459
2530
|
};
|
|
2460
2531
|
};
|
|
2461
2532
|
}
|
|
2462
|
-
function
|
|
2533
|
+
function _n(e) {
|
|
2463
2534
|
return async (t, a) => {
|
|
2464
2535
|
const { numDeletedRows: n } = await e.deleteFrom("forms").where("id", "=", a).where("tenant_id", "=", t).executeTakeFirst();
|
|
2465
2536
|
return n > 0;
|
|
2466
2537
|
};
|
|
2467
2538
|
}
|
|
2468
|
-
function
|
|
2539
|
+
function mn(e) {
|
|
2469
2540
|
return async (t, a) => {
|
|
2470
2541
|
const n = await e.selectFrom("forms").selectAll().where("forms.id", "=", a).where("tenant_id", "=", t).executeTakeFirst();
|
|
2471
2542
|
if (!n) return null;
|
|
@@ -2488,27 +2559,27 @@ function sn(e) {
|
|
|
2488
2559
|
return q.parse(w(o));
|
|
2489
2560
|
};
|
|
2490
2561
|
}
|
|
2491
|
-
function
|
|
2562
|
+
function hn(e) {
|
|
2492
2563
|
return async (t, a, n) => {
|
|
2493
2564
|
const o = {
|
|
2494
2565
|
...n,
|
|
2495
2566
|
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
2496
2567
|
};
|
|
2497
|
-
|
|
2568
|
+
L(n, ["nodes", "start", "ending"], o);
|
|
2498
2569
|
const { numUpdatedRows: r } = await e.updateTable("forms").set(o).where("id", "=", a).where("tenant_id", "=", t).executeTakeFirst();
|
|
2499
2570
|
return r > 0;
|
|
2500
2571
|
};
|
|
2501
2572
|
}
|
|
2502
|
-
function
|
|
2573
|
+
function pn(e) {
|
|
2503
2574
|
return {
|
|
2504
|
-
create:
|
|
2505
|
-
get:
|
|
2506
|
-
list:
|
|
2507
|
-
remove:
|
|
2508
|
-
update:
|
|
2575
|
+
create: dn(e),
|
|
2576
|
+
get: mn(e),
|
|
2577
|
+
list: un(e),
|
|
2578
|
+
remove: _n(e),
|
|
2579
|
+
update: hn(e)
|
|
2509
2580
|
};
|
|
2510
2581
|
}
|
|
2511
|
-
function
|
|
2582
|
+
function fn(e) {
|
|
2512
2583
|
return async (t, a) => {
|
|
2513
2584
|
const n = (/* @__PURE__ */ new Date()).toISOString(), o = {
|
|
2514
2585
|
id: Et(),
|
|
@@ -2540,7 +2611,7 @@ function dn(e) {
|
|
|
2540
2611
|
return await e.insertInto("resource_servers").values(p).execute(), w(r);
|
|
2541
2612
|
};
|
|
2542
2613
|
}
|
|
2543
|
-
function
|
|
2614
|
+
function gn(e) {
|
|
2544
2615
|
return async (t, a) => {
|
|
2545
2616
|
const n = await e.selectFrom("resource_servers").selectAll().where("tenant_id", "=", t).where("id", "=", a).executeTakeFirst();
|
|
2546
2617
|
if (!n) return null;
|
|
@@ -2567,7 +2638,7 @@ function un(e) {
|
|
|
2567
2638
|
return w(_);
|
|
2568
2639
|
};
|
|
2569
2640
|
}
|
|
2570
|
-
function
|
|
2641
|
+
function wn(e) {
|
|
2571
2642
|
return async (t, a = {}) => {
|
|
2572
2643
|
const { page: n = 0, per_page: o = 50, include_totals: r = !1, q: s } = a;
|
|
2573
2644
|
let i = e.selectFrom("resource_servers").where("resource_servers.tenant_id", "=", t);
|
|
@@ -2621,13 +2692,13 @@ function _n(e) {
|
|
|
2621
2692
|
};
|
|
2622
2693
|
};
|
|
2623
2694
|
}
|
|
2624
|
-
function
|
|
2695
|
+
function yn(e) {
|
|
2625
2696
|
return async (t, a) => {
|
|
2626
2697
|
const n = await e.deleteFrom("resource_servers").where("tenant_id", "=", t).where("id", "=", a).executeTakeFirst();
|
|
2627
2698
|
return Number(n.numDeletedRows) > 0;
|
|
2628
2699
|
};
|
|
2629
2700
|
}
|
|
2630
|
-
function
|
|
2701
|
+
function vn(e) {
|
|
2631
2702
|
return async (t, a, n) => {
|
|
2632
2703
|
const {
|
|
2633
2704
|
verificationKey: o,
|
|
@@ -2651,16 +2722,16 @@ function hn(e) {
|
|
|
2651
2722
|
return Number(_.numUpdatedRows) > 0;
|
|
2652
2723
|
};
|
|
2653
2724
|
}
|
|
2654
|
-
function
|
|
2725
|
+
function Cn(e) {
|
|
2655
2726
|
return {
|
|
2656
|
-
create:
|
|
2657
|
-
get:
|
|
2658
|
-
list:
|
|
2659
|
-
remove:
|
|
2660
|
-
update:
|
|
2727
|
+
create: fn(e),
|
|
2728
|
+
get: gn(e),
|
|
2729
|
+
list: wn(e),
|
|
2730
|
+
remove: yn(e),
|
|
2731
|
+
update: vn(e)
|
|
2661
2732
|
};
|
|
2662
2733
|
}
|
|
2663
|
-
function
|
|
2734
|
+
function xn(e) {
|
|
2664
2735
|
return async (t, a) => {
|
|
2665
2736
|
const n = (/* @__PURE__ */ new Date()).toISOString(), o = a.id || k(), { is_system: r, id: s, metadata: i, ...d } = a, u = {
|
|
2666
2737
|
id: o,
|
|
@@ -2681,7 +2752,7 @@ function fn(e) {
|
|
|
2681
2752
|
};
|
|
2682
2753
|
};
|
|
2683
2754
|
}
|
|
2684
|
-
function
|
|
2755
|
+
function Tn(e) {
|
|
2685
2756
|
return async (t, a) => {
|
|
2686
2757
|
const n = await e.selectFrom("roles").selectAll().where("roles.tenant_id", "=", t).where("roles.id", "=", a).executeTakeFirst();
|
|
2687
2758
|
if (!n) return null;
|
|
@@ -2693,7 +2764,7 @@ function gn(e) {
|
|
|
2693
2764
|
};
|
|
2694
2765
|
};
|
|
2695
2766
|
}
|
|
2696
|
-
function
|
|
2767
|
+
function Nn(e) {
|
|
2697
2768
|
return async (t, a) => {
|
|
2698
2769
|
let n = e.selectFrom("roles").where("roles.tenant_id", "=", t);
|
|
2699
2770
|
const { page: o = 0, per_page: r = 50, include_totals: s = !1 } = a;
|
|
@@ -2722,7 +2793,7 @@ function wn(e) {
|
|
|
2722
2793
|
};
|
|
2723
2794
|
};
|
|
2724
2795
|
}
|
|
2725
|
-
function
|
|
2796
|
+
function bn(e) {
|
|
2726
2797
|
return async (t, a, n) => {
|
|
2727
2798
|
const { is_system: o, metadata: r, ...s } = n, i = {
|
|
2728
2799
|
...s,
|
|
@@ -2733,22 +2804,22 @@ function yn(e) {
|
|
|
2733
2804
|
return Number(d.numUpdatedRows) > 0;
|
|
2734
2805
|
};
|
|
2735
2806
|
}
|
|
2736
|
-
function
|
|
2807
|
+
function Sn(e) {
|
|
2737
2808
|
return async (t, a) => {
|
|
2738
2809
|
const n = await e.deleteFrom("roles").where("tenant_id", "=", t).where("id", "=", a).executeTakeFirst();
|
|
2739
2810
|
return Number(n.numDeletedRows) > 0;
|
|
2740
2811
|
};
|
|
2741
2812
|
}
|
|
2742
|
-
function
|
|
2813
|
+
function On(e) {
|
|
2743
2814
|
return {
|
|
2744
|
-
create:
|
|
2745
|
-
get:
|
|
2746
|
-
list:
|
|
2747
|
-
update:
|
|
2748
|
-
remove:
|
|
2815
|
+
create: xn(e),
|
|
2816
|
+
get: Tn(e),
|
|
2817
|
+
list: Nn(e),
|
|
2818
|
+
update: bn(e),
|
|
2819
|
+
remove: Sn(e)
|
|
2749
2820
|
};
|
|
2750
2821
|
}
|
|
2751
|
-
function
|
|
2822
|
+
function kn(e) {
|
|
2752
2823
|
return async (t, a, n) => {
|
|
2753
2824
|
if (n.length === 0) return !0;
|
|
2754
2825
|
const o = (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -2768,7 +2839,7 @@ function xn(e) {
|
|
|
2768
2839
|
try {
|
|
2769
2840
|
await e.insertInto("role_permissions").values(s).execute();
|
|
2770
2841
|
} catch (i) {
|
|
2771
|
-
if (i.code === "SQLITE_CONSTRAINT_PRIMARYKEY" || i.code === "SQLITE_CONSTRAINT_UNIQUE")
|
|
2842
|
+
if (i.code === "SQLITE_CONSTRAINT_PRIMARYKEY" || i.code === "SQLITE_CONSTRAINT_UNIQUE" || i.code === "ER_DUP_ENTRY")
|
|
2772
2843
|
continue;
|
|
2773
2844
|
throw i;
|
|
2774
2845
|
}
|
|
@@ -2779,7 +2850,7 @@ function xn(e) {
|
|
|
2779
2850
|
}
|
|
2780
2851
|
};
|
|
2781
2852
|
}
|
|
2782
|
-
function
|
|
2853
|
+
function $n(e) {
|
|
2783
2854
|
return async (t, a, n) => {
|
|
2784
2855
|
if (n.length === 0) return !0;
|
|
2785
2856
|
try {
|
|
@@ -2797,7 +2868,7 @@ function Tn(e) {
|
|
|
2797
2868
|
}
|
|
2798
2869
|
};
|
|
2799
2870
|
}
|
|
2800
|
-
function
|
|
2871
|
+
function En(e) {
|
|
2801
2872
|
return async (t, a, n = {}) => {
|
|
2802
2873
|
const { page: o = 0, per_page: r = 50, include_totals: s = !1 } = n;
|
|
2803
2874
|
let i = e.selectFrom("role_permissions").leftJoin(
|
|
@@ -2831,14 +2902,14 @@ function Nn(e) {
|
|
|
2831
2902
|
return s && await i.select((l) => l.fn.countAll().as("count")).executeTakeFirstOrThrow(), c;
|
|
2832
2903
|
};
|
|
2833
2904
|
}
|
|
2834
|
-
function
|
|
2905
|
+
function In(e) {
|
|
2835
2906
|
return {
|
|
2836
|
-
assign:
|
|
2837
|
-
remove:
|
|
2838
|
-
list:
|
|
2907
|
+
assign: kn(e),
|
|
2908
|
+
remove: $n(e),
|
|
2909
|
+
list: En(e)
|
|
2839
2910
|
};
|
|
2840
2911
|
}
|
|
2841
|
-
function
|
|
2912
|
+
function zn(e) {
|
|
2842
2913
|
return async (t, a, n, o) => {
|
|
2843
2914
|
const r = (/* @__PURE__ */ new Date()).toISOString();
|
|
2844
2915
|
try {
|
|
@@ -2852,11 +2923,11 @@ function Sn(e) {
|
|
|
2852
2923
|
};
|
|
2853
2924
|
return await e.insertInto("user_permissions").values(s).execute(), !0;
|
|
2854
2925
|
} catch (s) {
|
|
2855
|
-
return s.code === "SQLITE_CONSTRAINT_PRIMARYKEY" || s.code === "SQLITE_CONSTRAINT_UNIQUE" || s.code === "SQLITE_CONSTRAINT" || s.message && s.message.includes("UNIQUE constraint failed") || s.message && s.message.includes("PRIMARY KEY constraint failed") ? !0 : (console.error("Error creating user permission:", s), !1);
|
|
2926
|
+
return s.code === "SQLITE_CONSTRAINT_PRIMARYKEY" || s.code === "SQLITE_CONSTRAINT_UNIQUE" || s.code === "SQLITE_CONSTRAINT" || s.code === "ER_DUP_ENTRY" || s.message && s.message.includes("UNIQUE constraint failed") || s.message && s.message.includes("PRIMARY KEY constraint failed") ? !0 : (console.error("Error creating user permission:", s), !1);
|
|
2856
2927
|
}
|
|
2857
2928
|
};
|
|
2858
2929
|
}
|
|
2859
|
-
function
|
|
2930
|
+
function Pn(e) {
|
|
2860
2931
|
return async (t, a, n, o) => {
|
|
2861
2932
|
try {
|
|
2862
2933
|
let r = e.deleteFrom("user_permissions").where("tenant_id", "=", t).where("user_id", "=", a).where(
|
|
@@ -2870,7 +2941,7 @@ function On(e) {
|
|
|
2870
2941
|
}
|
|
2871
2942
|
};
|
|
2872
2943
|
}
|
|
2873
|
-
function
|
|
2944
|
+
function Dn(e) {
|
|
2874
2945
|
return async (t, a, n, o) => {
|
|
2875
2946
|
let r = e.selectFrom("user_permissions").leftJoin(
|
|
2876
2947
|
"resource_servers",
|
|
@@ -2908,22 +2979,22 @@ function kn(e) {
|
|
|
2908
2979
|
}));
|
|
2909
2980
|
};
|
|
2910
2981
|
}
|
|
2911
|
-
function
|
|
2982
|
+
function An(e) {
|
|
2912
2983
|
return {
|
|
2913
|
-
create:
|
|
2914
|
-
remove:
|
|
2915
|
-
list:
|
|
2984
|
+
create: zn(e),
|
|
2985
|
+
remove: Pn(e),
|
|
2986
|
+
list: Dn(e)
|
|
2916
2987
|
};
|
|
2917
2988
|
}
|
|
2918
|
-
function
|
|
2919
|
-
const t =
|
|
2989
|
+
function jn(e) {
|
|
2990
|
+
const t = An(e);
|
|
2920
2991
|
return {
|
|
2921
2992
|
create: (a, n, o, r) => t.create(a, n, o, r),
|
|
2922
2993
|
remove: (a, n, o, r) => t.remove(a, n, o, r),
|
|
2923
2994
|
list: (a, n, o, r) => t.list(a, n, o, r)
|
|
2924
2995
|
};
|
|
2925
2996
|
}
|
|
2926
|
-
function
|
|
2997
|
+
function Fn(e) {
|
|
2927
2998
|
return async (t, a, n, o) => {
|
|
2928
2999
|
let r = e.selectFrom("user_roles as ur").innerJoin(
|
|
2929
3000
|
"roles as r",
|
|
@@ -2938,7 +3009,7 @@ function In(e) {
|
|
|
2938
3009
|
return o !== void 0 && (r = r.where("ur.organization_id", "=", o)), await r.execute();
|
|
2939
3010
|
};
|
|
2940
3011
|
}
|
|
2941
|
-
function
|
|
3012
|
+
function Rn(e) {
|
|
2942
3013
|
return async (t, a, n, o) => {
|
|
2943
3014
|
const r = (/* @__PURE__ */ new Date()).toISOString();
|
|
2944
3015
|
try {
|
|
@@ -2950,11 +3021,11 @@ function zn(e) {
|
|
|
2950
3021
|
created_at: r
|
|
2951
3022
|
}).execute(), !0;
|
|
2952
3023
|
} catch (s) {
|
|
2953
|
-
return s.code === "SQLITE_CONSTRAINT_PRIMARYKEY" || s.code === "SQLITE_CONSTRAINT_UNIQUE" || s.code === "SQLITE_CONSTRAINT" || s.message && s.message.includes("UNIQUE constraint failed") || s.message && s.message.includes("PRIMARY KEY constraint failed") ? !0 : (console.error("Error creating user role:", s), !1);
|
|
3024
|
+
return s.code === "SQLITE_CONSTRAINT_PRIMARYKEY" || s.code === "SQLITE_CONSTRAINT_UNIQUE" || s.code === "SQLITE_CONSTRAINT" || s.code === "ER_DUP_ENTRY" || s.message && s.message.includes("UNIQUE constraint failed") || s.message && s.message.includes("PRIMARY KEY constraint failed") ? !0 : (console.error("Error creating user role:", s), !1);
|
|
2954
3025
|
}
|
|
2955
3026
|
};
|
|
2956
3027
|
}
|
|
2957
|
-
function
|
|
3028
|
+
function Mn(e) {
|
|
2958
3029
|
return async (t, a, n, o) => {
|
|
2959
3030
|
try {
|
|
2960
3031
|
let r = e.deleteFrom("user_roles").where("tenant_id", "=", t).where("user_id", "=", a).where("role_id", "=", n);
|
|
@@ -2964,22 +3035,22 @@ function Pn(e) {
|
|
|
2964
3035
|
}
|
|
2965
3036
|
};
|
|
2966
3037
|
}
|
|
2967
|
-
function
|
|
3038
|
+
function Jn(e) {
|
|
2968
3039
|
return {
|
|
2969
|
-
list:
|
|
2970
|
-
create:
|
|
2971
|
-
remove:
|
|
3040
|
+
list: Fn(e),
|
|
3041
|
+
create: Rn(e),
|
|
3042
|
+
remove: Mn(e)
|
|
2972
3043
|
};
|
|
2973
3044
|
}
|
|
2974
|
-
function
|
|
2975
|
-
const t =
|
|
3045
|
+
function Ln(e) {
|
|
3046
|
+
const t = Jn(e);
|
|
2976
3047
|
return {
|
|
2977
3048
|
list: (a, n, o, r) => t.list(a, n, o, r),
|
|
2978
3049
|
create: (a, n, o, r) => t.create(a, n, o, r),
|
|
2979
3050
|
remove: (a, n, o, r) => t.remove(a, n, o, r)
|
|
2980
3051
|
};
|
|
2981
3052
|
}
|
|
2982
|
-
function
|
|
3053
|
+
function Kn(e) {
|
|
2983
3054
|
return async (t, a) => {
|
|
2984
3055
|
const n = {
|
|
2985
3056
|
...a,
|
|
@@ -2997,7 +3068,7 @@ function jn(e) {
|
|
|
2997
3068
|
try {
|
|
2998
3069
|
await e.insertInto("organizations").values(n).execute();
|
|
2999
3070
|
} catch (o) {
|
|
3000
|
-
throw o.code === "SQLITE_CONSTRAINT_UNIQUE" || o.message.includes("AlreadyExists") ? new R(409, {
|
|
3071
|
+
throw o.code === "SQLITE_CONSTRAINT_UNIQUE" || o.code === "ER_DUP_ENTRY" || o.message.includes("AlreadyExists") ? new R(409, {
|
|
3001
3072
|
message: "Organization already exists"
|
|
3002
3073
|
}) : o;
|
|
3003
3074
|
}
|
|
@@ -3009,7 +3080,7 @@ function jn(e) {
|
|
|
3009
3080
|
};
|
|
3010
3081
|
};
|
|
3011
3082
|
}
|
|
3012
|
-
function
|
|
3083
|
+
function qn(e) {
|
|
3013
3084
|
return async (t, a) => {
|
|
3014
3085
|
let n = await e.selectFrom("organizations").selectAll().where("tenant_id", "=", t).where("id", "=", a).executeTakeFirst();
|
|
3015
3086
|
return n || (n = await e.selectFrom("organizations").selectAll().where("tenant_id", "=", t).where("name", "=", a).executeTakeFirst()), n ? w({
|
|
@@ -3021,7 +3092,7 @@ function Fn(e) {
|
|
|
3021
3092
|
}) : null;
|
|
3022
3093
|
};
|
|
3023
3094
|
}
|
|
3024
|
-
function
|
|
3095
|
+
function Un(e) {
|
|
3025
3096
|
return async (t, a) => {
|
|
3026
3097
|
let n = e.selectFrom("organizations").selectAll().where("tenant_id", "=", t);
|
|
3027
3098
|
if (a != null && a.q && (n = n.where(
|
|
@@ -3074,32 +3145,32 @@ function Rn(e) {
|
|
|
3074
3145
|
};
|
|
3075
3146
|
};
|
|
3076
3147
|
}
|
|
3077
|
-
function
|
|
3148
|
+
function Bn(e) {
|
|
3078
3149
|
return async (t, a) => (await e.deleteFrom("organizations").where("tenant_id", "=", t).where("id", "=", a).execute()).length > 0;
|
|
3079
3150
|
}
|
|
3080
|
-
function
|
|
3151
|
+
function Qn(e) {
|
|
3081
3152
|
return async (t, a, n) => {
|
|
3082
3153
|
const { branding: o, metadata: r, enabled_connections: s, token_quota: i, ...d } = n, u = {
|
|
3083
3154
|
...d,
|
|
3084
3155
|
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
3085
3156
|
};
|
|
3086
|
-
return
|
|
3157
|
+
return L(
|
|
3087
3158
|
n,
|
|
3088
3159
|
["branding", "metadata", "enabled_connections", "token_quota"],
|
|
3089
3160
|
u
|
|
3090
3161
|
), (await e.updateTable("organizations").set(u).where("tenant_id", "=", t).where("id", "=", a).execute()).length > 0;
|
|
3091
3162
|
};
|
|
3092
3163
|
}
|
|
3093
|
-
function
|
|
3164
|
+
function Yn(e) {
|
|
3094
3165
|
return {
|
|
3095
|
-
create:
|
|
3096
|
-
get:
|
|
3097
|
-
list:
|
|
3098
|
-
remove:
|
|
3099
|
-
update:
|
|
3166
|
+
create: Kn(e),
|
|
3167
|
+
get: qn(e),
|
|
3168
|
+
list: Un(e),
|
|
3169
|
+
remove: Bn(e),
|
|
3170
|
+
update: Qn(e)
|
|
3100
3171
|
};
|
|
3101
3172
|
}
|
|
3102
|
-
function
|
|
3173
|
+
function Hn(e) {
|
|
3103
3174
|
return async (t, a) => {
|
|
3104
3175
|
const n = {
|
|
3105
3176
|
id: k(),
|
|
@@ -3121,7 +3192,7 @@ function Kn(e) {
|
|
|
3121
3192
|
};
|
|
3122
3193
|
};
|
|
3123
3194
|
}
|
|
3124
|
-
function
|
|
3195
|
+
function Wn(e) {
|
|
3125
3196
|
return async (t, a) => {
|
|
3126
3197
|
const n = await e.selectFrom("user_organizations").selectAll().where("id", "=", a).where("tenant_id", "=", t).executeTakeFirst();
|
|
3127
3198
|
return n ? {
|
|
@@ -3133,7 +3204,7 @@ function qn(e) {
|
|
|
3133
3204
|
} : null;
|
|
3134
3205
|
};
|
|
3135
3206
|
}
|
|
3136
|
-
function
|
|
3207
|
+
function Gn(e) {
|
|
3137
3208
|
return async (t, a) => {
|
|
3138
3209
|
const n = (a == null ? void 0 : a.page) || 0, o = (a == null ? void 0 : a.per_page) || 50, r = n * o;
|
|
3139
3210
|
let s = e.selectFrom("user_organizations").selectAll().where("tenant_id", "=", t);
|
|
@@ -3173,7 +3244,7 @@ function Bn(e) {
|
|
|
3173
3244
|
};
|
|
3174
3245
|
};
|
|
3175
3246
|
}
|
|
3176
|
-
function
|
|
3247
|
+
function Vn(e) {
|
|
3177
3248
|
return async (t, a, n) => {
|
|
3178
3249
|
const o = (n == null ? void 0 : n.page) || 0, r = (n == null ? void 0 : n.per_page) || 50, s = o * r;
|
|
3179
3250
|
let i = e.selectFrom("user_organizations").innerJoin(
|
|
@@ -3216,10 +3287,10 @@ function Un(e) {
|
|
|
3216
3287
|
};
|
|
3217
3288
|
};
|
|
3218
3289
|
}
|
|
3219
|
-
function
|
|
3290
|
+
function Xn(e) {
|
|
3220
3291
|
return async (t, a) => (await e.deleteFrom("user_organizations").where("id", "=", a).where("tenant_id", "=", t).execute()).length > 0;
|
|
3221
3292
|
}
|
|
3222
|
-
function
|
|
3293
|
+
function Zn(e) {
|
|
3223
3294
|
return async (t, a, n) => {
|
|
3224
3295
|
const o = {
|
|
3225
3296
|
...n,
|
|
@@ -3228,20 +3299,20 @@ function Hn(e) {
|
|
|
3228
3299
|
return (await e.updateTable("user_organizations").set(o).where("id", "=", a).where("tenant_id", "=", t).execute()).length > 0;
|
|
3229
3300
|
};
|
|
3230
3301
|
}
|
|
3231
|
-
function
|
|
3302
|
+
function eo(e) {
|
|
3232
3303
|
return {
|
|
3233
3304
|
// CRUD operations
|
|
3234
|
-
create:
|
|
3235
|
-
get:
|
|
3236
|
-
list:
|
|
3237
|
-
listUserOrganizations:
|
|
3238
|
-
remove:
|
|
3239
|
-
update:
|
|
3305
|
+
create: Hn(e),
|
|
3306
|
+
get: Wn(e),
|
|
3307
|
+
list: Gn(e),
|
|
3308
|
+
listUserOrganizations: Vn(e),
|
|
3309
|
+
remove: Xn(e),
|
|
3310
|
+
update: Zn(e)
|
|
3240
3311
|
};
|
|
3241
3312
|
}
|
|
3242
|
-
function
|
|
3313
|
+
function to(e) {
|
|
3243
3314
|
return async (t, a) => {
|
|
3244
|
-
const n =
|
|
3315
|
+
const n = zt(), o = (/* @__PURE__ */ new Date()).toISOString(), r = a.ttl_sec || 604800, s = new Date(Date.now() + r * 1e3).toISOString(), i = L(
|
|
3245
3316
|
{
|
|
3246
3317
|
id: n,
|
|
3247
3318
|
tenant_id: t,
|
|
@@ -3265,7 +3336,7 @@ function Wn(e) {
|
|
|
3265
3336
|
try {
|
|
3266
3337
|
await e.insertInto("invites").values(i).execute();
|
|
3267
3338
|
} catch (d) {
|
|
3268
|
-
throw d.code === "SQLITE_CONSTRAINT_UNIQUE" || d.message.includes("AlreadyExists") ? new R(409, {
|
|
3339
|
+
throw d.code === "SQLITE_CONSTRAINT_UNIQUE" || d.code === "ER_DUP_ENTRY" || d.message.includes("AlreadyExists") ? new R(409, {
|
|
3269
3340
|
message: "Invite already exists"
|
|
3270
3341
|
}) : d;
|
|
3271
3342
|
}
|
|
@@ -3288,7 +3359,7 @@ function Wn(e) {
|
|
|
3288
3359
|
};
|
|
3289
3360
|
};
|
|
3290
3361
|
}
|
|
3291
|
-
function
|
|
3362
|
+
function ao(e) {
|
|
3292
3363
|
return async (t, a) => {
|
|
3293
3364
|
const n = await e.selectFrom("invites").selectAll().where("tenant_id", "=", t).where("id", "=", a).executeTakeFirst();
|
|
3294
3365
|
if (!n)
|
|
@@ -3306,7 +3377,7 @@ function Gn(e) {
|
|
|
3306
3377
|
});
|
|
3307
3378
|
};
|
|
3308
3379
|
}
|
|
3309
|
-
function
|
|
3380
|
+
function no(e) {
|
|
3310
3381
|
return async (t, a) => {
|
|
3311
3382
|
let n = e.selectFrom("invites").selectAll().where("tenant_id", "=", t).orderBy("created_at", "desc");
|
|
3312
3383
|
if (a != null && a.per_page && (n = n.limit(a.per_page)), a != null && a.page) {
|
|
@@ -3334,10 +3405,10 @@ function Vn(e) {
|
|
|
3334
3405
|
};
|
|
3335
3406
|
};
|
|
3336
3407
|
}
|
|
3337
|
-
function
|
|
3408
|
+
function oo(e) {
|
|
3338
3409
|
return async (t, a) => (await e.deleteFrom("invites").where("tenant_id", "=", t).where("id", "=", a).executeTakeFirst()).numDeletedRows > 0n;
|
|
3339
3410
|
}
|
|
3340
|
-
function
|
|
3411
|
+
function ro(e) {
|
|
3341
3412
|
return async (t, a, n) => {
|
|
3342
3413
|
const o = {};
|
|
3343
3414
|
return n.inviter !== void 0 && (o.inviter = JSON.stringify(n.inviter)), n.invitee !== void 0 && (o.invitee = JSON.stringify(n.invitee)), n.client_id !== void 0 && (o.client_id = n.client_id), n.connection_id !== void 0 && (o.connection_id = n.connection_id), n.app_metadata !== void 0 && (o.app_metadata = JSON.stringify(n.app_metadata)), n.user_metadata !== void 0 && (o.user_metadata = JSON.stringify(n.user_metadata)), n.roles !== void 0 && (o.roles = JSON.stringify(n.roles)), n.ttl_sec !== void 0 && (o.ttl_sec = n.ttl_sec, o.expires_at = new Date(
|
|
@@ -3345,13 +3416,13 @@ function Zn(e) {
|
|
|
3345
3416
|
).toISOString()), n.send_invitation_email !== void 0 && (o.send_invitation_email = n.send_invitation_email ? 1 : 0), Object.keys(o).length === 0 ? !0 : (await e.updateTable("invites").set(o).where("tenant_id", "=", t).where("id", "=", a).executeTakeFirst()).numUpdatedRows > 0n;
|
|
3346
3417
|
};
|
|
3347
3418
|
}
|
|
3348
|
-
function
|
|
3419
|
+
function so(e) {
|
|
3349
3420
|
return {
|
|
3350
|
-
create:
|
|
3351
|
-
get:
|
|
3352
|
-
list:
|
|
3353
|
-
remove:
|
|
3354
|
-
update:
|
|
3421
|
+
create: to(e),
|
|
3422
|
+
get: ao(e),
|
|
3423
|
+
list: no(e),
|
|
3424
|
+
remove: oo(e),
|
|
3425
|
+
update: ro(e)
|
|
3355
3426
|
};
|
|
3356
3427
|
}
|
|
3357
3428
|
const ne = [
|
|
@@ -3367,7 +3438,7 @@ const ne = [
|
|
|
3367
3438
|
// SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN
|
|
3368
3439
|
"ssa"
|
|
3369
3440
|
// SUCCESS_SILENT_AUTH
|
|
3370
|
-
],
|
|
3441
|
+
], io = [
|
|
3371
3442
|
"pwd_leak",
|
|
3372
3443
|
"signup_pwd_leak",
|
|
3373
3444
|
"reset_pwd_leak"
|
|
@@ -3378,7 +3449,7 @@ function oe(e) {
|
|
|
3378
3449
|
function re(e) {
|
|
3379
3450
|
return e.toISOString().split("T")[0];
|
|
3380
3451
|
}
|
|
3381
|
-
function
|
|
3452
|
+
function co(e) {
|
|
3382
3453
|
return {
|
|
3383
3454
|
async getDaily(t, a = {}) {
|
|
3384
3455
|
const { from: n, to: o } = a, r = /* @__PURE__ */ new Date(), s = new Date(r);
|
|
@@ -3391,7 +3462,7 @@ function ao(e) {
|
|
|
3391
3462
|
).as("logins"),
|
|
3392
3463
|
l.fn.sum(l.case().when("type", "=", "ss").then(1).else(0).end()).as("signups"),
|
|
3393
3464
|
l.fn.sum(
|
|
3394
|
-
l.case().when("type", "in",
|
|
3465
|
+
l.case().when("type", "in", io).then(1).else(0).end()
|
|
3395
3466
|
).as("leaked_passwords"),
|
|
3396
3467
|
l.fn.min("date").as("first_event"),
|
|
3397
3468
|
l.fn.max("date").as("last_event")
|
|
@@ -3410,7 +3481,7 @@ function ao(e) {
|
|
|
3410
3481
|
}
|
|
3411
3482
|
};
|
|
3412
3483
|
}
|
|
3413
|
-
function
|
|
3484
|
+
function lo(e) {
|
|
3414
3485
|
return {
|
|
3415
3486
|
async get(t, a, n) {
|
|
3416
3487
|
const o = await e.selectFrom("custom_text").selectAll().where("tenant_id", "=", t).where("prompt", "=", a).where("language", "=", n).executeTakeFirst();
|
|
@@ -3447,7 +3518,7 @@ function no(e) {
|
|
|
3447
3518
|
}
|
|
3448
3519
|
};
|
|
3449
3520
|
}
|
|
3450
|
-
function
|
|
3521
|
+
function uo(e) {
|
|
3451
3522
|
return async (t, a) => {
|
|
3452
3523
|
const n = Date.now(), o = fe();
|
|
3453
3524
|
return await e.insertInto("authentication_methods").values({
|
|
@@ -3500,12 +3571,12 @@ function ge(e) {
|
|
|
3500
3571
|
transports: n.transports ? JSON.parse(n.transports) : void 0,
|
|
3501
3572
|
friendly_name: n.friendly_name ?? void 0,
|
|
3502
3573
|
confirmed: n.confirmed === 1,
|
|
3503
|
-
created_at:
|
|
3504
|
-
updated_at:
|
|
3574
|
+
created_at: A(n.created_at_ts),
|
|
3575
|
+
updated_at: A(n.updated_at_ts)
|
|
3505
3576
|
} : null;
|
|
3506
3577
|
};
|
|
3507
3578
|
}
|
|
3508
|
-
function
|
|
3579
|
+
function _o(e) {
|
|
3509
3580
|
return async (t, a) => {
|
|
3510
3581
|
const n = await e.selectFrom("authentication_methods").where("authentication_methods.tenant_id", "=", t).where("authentication_methods.credential_id", "=", a).selectAll().executeTakeFirst();
|
|
3511
3582
|
return n ? {
|
|
@@ -3521,12 +3592,12 @@ function ro(e) {
|
|
|
3521
3592
|
transports: n.transports ? JSON.parse(n.transports) : void 0,
|
|
3522
3593
|
friendly_name: n.friendly_name ?? void 0,
|
|
3523
3594
|
confirmed: n.confirmed === 1,
|
|
3524
|
-
created_at:
|
|
3525
|
-
updated_at:
|
|
3595
|
+
created_at: A(n.created_at_ts),
|
|
3596
|
+
updated_at: A(n.updated_at_ts)
|
|
3526
3597
|
} : null;
|
|
3527
3598
|
};
|
|
3528
3599
|
}
|
|
3529
|
-
function
|
|
3600
|
+
function mo(e) {
|
|
3530
3601
|
return async (t, a) => (await e.selectFrom("authentication_methods").where("authentication_methods.tenant_id", "=", t).where("authentication_methods.user_id", "=", a).selectAll().execute()).map((o) => ({
|
|
3531
3602
|
id: o.id,
|
|
3532
3603
|
user_id: o.user_id,
|
|
@@ -3540,11 +3611,11 @@ function so(e) {
|
|
|
3540
3611
|
transports: o.transports ? JSON.parse(o.transports) : void 0,
|
|
3541
3612
|
friendly_name: o.friendly_name ?? void 0,
|
|
3542
3613
|
confirmed: o.confirmed === 1,
|
|
3543
|
-
created_at:
|
|
3544
|
-
updated_at:
|
|
3614
|
+
created_at: A(o.created_at_ts),
|
|
3615
|
+
updated_at: A(o.updated_at_ts)
|
|
3545
3616
|
}));
|
|
3546
3617
|
}
|
|
3547
|
-
function
|
|
3618
|
+
function ho(e) {
|
|
3548
3619
|
return async (t, a, n) => {
|
|
3549
3620
|
const r = {
|
|
3550
3621
|
updated_at_ts: Date.now()
|
|
@@ -3556,20 +3627,20 @@ function io(e) {
|
|
|
3556
3627
|
return s;
|
|
3557
3628
|
};
|
|
3558
3629
|
}
|
|
3559
|
-
function
|
|
3630
|
+
function po(e) {
|
|
3560
3631
|
return async (t, a) => (await e.deleteFrom("authentication_methods").where("authentication_methods.tenant_id", "=", t).where("authentication_methods.id", "=", a).executeTakeFirst()).numDeletedRows > 0;
|
|
3561
3632
|
}
|
|
3562
|
-
function
|
|
3633
|
+
function fo(e) {
|
|
3563
3634
|
return {
|
|
3564
|
-
create:
|
|
3635
|
+
create: uo(e),
|
|
3565
3636
|
get: ge(e),
|
|
3566
|
-
getByCredentialId:
|
|
3567
|
-
list:
|
|
3568
|
-
update:
|
|
3569
|
-
remove:
|
|
3637
|
+
getByCredentialId: _o(e),
|
|
3638
|
+
list: mo(e),
|
|
3639
|
+
update: ho(e),
|
|
3640
|
+
remove: po(e)
|
|
3570
3641
|
};
|
|
3571
3642
|
}
|
|
3572
|
-
function
|
|
3643
|
+
function go(e) {
|
|
3573
3644
|
return async (t, a) => {
|
|
3574
3645
|
const n = k();
|
|
3575
3646
|
return await e.insertInto("outbox_events").values({
|
|
@@ -3588,7 +3659,7 @@ function uo(e) {
|
|
|
3588
3659
|
}).execute(), n;
|
|
3589
3660
|
};
|
|
3590
3661
|
}
|
|
3591
|
-
function
|
|
3662
|
+
function wo(e) {
|
|
3592
3663
|
return async (t) => t.length === 0 ? [] : (await e.selectFrom("outbox_events").selectAll().where("id", "in", t).execute()).map((n) => ({
|
|
3593
3664
|
...JSON.parse(n.payload),
|
|
3594
3665
|
id: n.id,
|
|
@@ -3599,7 +3670,7 @@ function _o(e) {
|
|
|
3599
3670
|
error: n.error
|
|
3600
3671
|
}));
|
|
3601
3672
|
}
|
|
3602
|
-
function
|
|
3673
|
+
function yo(e) {
|
|
3603
3674
|
return async (t) => {
|
|
3604
3675
|
const a = (/* @__PURE__ */ new Date()).toISOString();
|
|
3605
3676
|
return (await e.selectFrom("outbox_events").selectAll().where("processed_at", "is", null).where(
|
|
@@ -3623,7 +3694,7 @@ function mo(e) {
|
|
|
3623
3694
|
}));
|
|
3624
3695
|
};
|
|
3625
3696
|
}
|
|
3626
|
-
function
|
|
3697
|
+
function vo(e) {
|
|
3627
3698
|
return async (t, a, n) => {
|
|
3628
3699
|
if (t.length === 0) return [];
|
|
3629
3700
|
const o = (/* @__PURE__ */ new Date()).toISOString(), r = new Date(Date.now() + n).toISOString();
|
|
@@ -3638,14 +3709,14 @@ function ho(e) {
|
|
|
3638
3709
|
).execute(), (await e.selectFrom("outbox_events").select("id").where("id", "in", t).where("claimed_by", "=", a).where("claim_expires_at", "=", r).execute()).map((i) => i.id);
|
|
3639
3710
|
};
|
|
3640
3711
|
}
|
|
3641
|
-
function
|
|
3712
|
+
function Co(e) {
|
|
3642
3713
|
return async (t) => {
|
|
3643
3714
|
if (t.length === 0) return;
|
|
3644
3715
|
const a = (/* @__PURE__ */ new Date()).toISOString();
|
|
3645
3716
|
await e.updateTable("outbox_events").set({ processed_at: a }).where("id", "in", t).execute();
|
|
3646
3717
|
};
|
|
3647
3718
|
}
|
|
3648
|
-
function
|
|
3719
|
+
function xo(e) {
|
|
3649
3720
|
return async (t, a, n) => {
|
|
3650
3721
|
await e.updateTable("outbox_events").set({
|
|
3651
3722
|
error: a,
|
|
@@ -3656,21 +3727,21 @@ function fo(e) {
|
|
|
3656
3727
|
}).where("id", "=", t).execute();
|
|
3657
3728
|
};
|
|
3658
3729
|
}
|
|
3659
|
-
function
|
|
3730
|
+
function To(e) {
|
|
3660
3731
|
return async (t) => {
|
|
3661
3732
|
const a = await e.deleteFrom("outbox_events").where("processed_at", "is not", null).where("processed_at", "<", t).executeTakeFirst();
|
|
3662
3733
|
return Number(a.numDeletedRows);
|
|
3663
3734
|
};
|
|
3664
3735
|
}
|
|
3665
|
-
function
|
|
3736
|
+
function No(e) {
|
|
3666
3737
|
return {
|
|
3667
|
-
create:
|
|
3668
|
-
getByIds:
|
|
3669
|
-
getUnprocessed:
|
|
3670
|
-
claimEvents:
|
|
3671
|
-
markProcessed:
|
|
3672
|
-
markRetry:
|
|
3673
|
-
cleanup:
|
|
3738
|
+
create: go(e),
|
|
3739
|
+
getByIds: wo(e),
|
|
3740
|
+
getUnprocessed: yo(e),
|
|
3741
|
+
claimEvents: vo(e),
|
|
3742
|
+
markProcessed: Co(e),
|
|
3743
|
+
markRetry: xo(e),
|
|
3744
|
+
cleanup: To(e)
|
|
3674
3745
|
};
|
|
3675
3746
|
}
|
|
3676
3747
|
class we {
|
|
@@ -3682,7 +3753,7 @@ class we {
|
|
|
3682
3753
|
return this.migrations;
|
|
3683
3754
|
}
|
|
3684
3755
|
}
|
|
3685
|
-
async function
|
|
3756
|
+
async function bo(e) {
|
|
3686
3757
|
await e.schema.createTable("tenants").addColumn("id", "varchar(255)", (t) => t.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)", (t) => t.notNull()).addColumn("updated_at", "varchar(255)", (t) => t.notNull()).execute(), await e.schema.createTable("users").addColumn("user_id", "varchar(255)", (t) => t.notNull()).addColumn(
|
|
3687
3758
|
"tenant_id",
|
|
3688
3759
|
"varchar(255)",
|
|
@@ -3754,35 +3825,35 @@ async function yo(e) {
|
|
|
3754
3825
|
(t) => t.references("tenants.id").onDelete("cascade").notNull()
|
|
3755
3826
|
).addColumn("domain", "varchar(255)", (t) => t.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)", (t) => t.notNull()).addColumn("updated_at", "varchar(255)", (t) => t.notNull()).execute();
|
|
3756
3827
|
}
|
|
3757
|
-
async function
|
|
3828
|
+
async function So(e) {
|
|
3758
3829
|
await e.schema.dropTable("domains").execute(), await e.schema.dropTable("members").execute(), await e.schema.dropTable("users").execute(), await e.schema.dropTable("connections").execute(), await e.schema.dropTable("applications").execute(), await e.schema.dropTable("migrations").execute(), await e.schema.dropTable("tenants").execute();
|
|
3759
3830
|
}
|
|
3760
|
-
const
|
|
3831
|
+
const Oo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3761
3832
|
__proto__: null,
|
|
3762
|
-
down:
|
|
3763
|
-
up:
|
|
3833
|
+
down: So,
|
|
3834
|
+
up: bo
|
|
3764
3835
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3765
|
-
async function
|
|
3836
|
+
async function ko(e) {
|
|
3766
3837
|
await e.schema.alterTable("tenants").addColumn("support_url", "varchar(255)").execute();
|
|
3767
3838
|
}
|
|
3768
|
-
async function
|
|
3839
|
+
async function $o(e) {
|
|
3769
3840
|
await e.schema.alterTable("tenants").dropColumn("support_url").execute();
|
|
3770
3841
|
}
|
|
3771
|
-
const
|
|
3842
|
+
const Eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3772
3843
|
__proto__: null,
|
|
3773
|
-
down:
|
|
3774
|
-
up:
|
|
3844
|
+
down: $o,
|
|
3845
|
+
up: ko
|
|
3775
3846
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3776
|
-
async function
|
|
3847
|
+
async function Io(e) {
|
|
3777
3848
|
}
|
|
3778
|
-
async function
|
|
3849
|
+
async function zo(e) {
|
|
3779
3850
|
}
|
|
3780
|
-
const
|
|
3851
|
+
const Po = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3781
3852
|
__proto__: null,
|
|
3782
|
-
down:
|
|
3783
|
-
up:
|
|
3853
|
+
down: zo,
|
|
3854
|
+
up: Io
|
|
3784
3855
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3785
|
-
async function
|
|
3856
|
+
async function Do(e) {
|
|
3786
3857
|
await e.schema.createTable("logs").addColumn("id", "varchar(255)", (t) => t.notNull().primaryKey()).addColumn("category", "varchar(255)", (t) => t.notNull()).addColumn("tenant_id", "varchar(64)").addColumn("user_id", "varchar(64)").addForeignKeyConstraint(
|
|
3787
3858
|
"tenant_id_constraint",
|
|
3788
3859
|
["tenant_id"],
|
|
@@ -3791,24 +3862,24 @@ async function ko(e) {
|
|
|
3791
3862
|
(t) => t.onDelete("cascade")
|
|
3792
3863
|
).addColumn("ip", "varchar(255)").addColumn("type", "varchar(8)", (t) => t.notNull()).addColumn("date", "varchar(25)", (t) => t.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();
|
|
3793
3864
|
}
|
|
3794
|
-
async function
|
|
3865
|
+
async function Ao(e) {
|
|
3795
3866
|
await e.schema.dropTable("logs").execute();
|
|
3796
3867
|
}
|
|
3797
|
-
const
|
|
3868
|
+
const jo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3798
3869
|
__proto__: null,
|
|
3799
|
-
down:
|
|
3800
|
-
up:
|
|
3870
|
+
down: Ao,
|
|
3871
|
+
up: Do
|
|
3801
3872
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3802
|
-
async function
|
|
3873
|
+
async function Fo(e) {
|
|
3803
3874
|
}
|
|
3804
|
-
async function
|
|
3875
|
+
async function Ro(e) {
|
|
3805
3876
|
}
|
|
3806
|
-
const
|
|
3877
|
+
const Mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3807
3878
|
__proto__: null,
|
|
3808
|
-
down:
|
|
3809
|
-
up:
|
|
3879
|
+
down: Ro,
|
|
3880
|
+
up: Fo
|
|
3810
3881
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3811
|
-
async function
|
|
3882
|
+
async function Jo(e) {
|
|
3812
3883
|
await e.schema.createTable("sessions").addColumn("id", "varchar(21)", (t) => t.primaryKey()).addColumn("tenant_id", "varchar(255)").addColumn("user_id", "varchar(255)").addForeignKeyConstraint(
|
|
3813
3884
|
"user_id_constraint",
|
|
3814
3885
|
["user_id", "tenant_id"],
|
|
@@ -3833,15 +3904,15 @@ async function Do(e) {
|
|
|
3833
3904
|
(t) => t.references("applications.id").onDelete("cascade").notNull()
|
|
3834
3905
|
).addColumn("code", "varchar(255)", (t) => t.notNull()).addColumn("email", "varchar(255)", (t) => t.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)", (t) => t.notNull()).addColumn("expires_at", "varchar(255)", (t) => t.notNull()).addColumn("used_at", "varchar(255)").execute(), await e.schema.createIndex("otps_email_index").on("otps").column("email").execute(), await e.schema.createIndex("otps_expires_at_index").on("otps").column("expires_at").execute();
|
|
3835
3906
|
}
|
|
3836
|
-
async function
|
|
3907
|
+
async function Lo(e) {
|
|
3837
3908
|
await e.schema.dropTable("sessions").execute(), await e.schema.dropTable("tickets").execute(), await e.schema.dropTable("otps").execute();
|
|
3838
3909
|
}
|
|
3839
|
-
const
|
|
3910
|
+
const Ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3840
3911
|
__proto__: null,
|
|
3841
|
-
down:
|
|
3842
|
-
up:
|
|
3912
|
+
down: Lo,
|
|
3913
|
+
up: Jo
|
|
3843
3914
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3844
|
-
async function
|
|
3915
|
+
async function qo(e) {
|
|
3845
3916
|
await e.schema.createTable("passwords").addColumn("tenant_id", "varchar(255)").addColumn("user_id", "varchar(255)").addPrimaryKeyConstraint("passwords_pkey", ["user_id", "tenant_id"]).addForeignKeyConstraint(
|
|
3846
3917
|
"user_id_constraint",
|
|
3847
3918
|
["user_id", "tenant_id"],
|
|
@@ -3856,24 +3927,24 @@ async function Fo(e) {
|
|
|
3856
3927
|
(t) => t.onDelete("cascade")
|
|
3857
3928
|
).addColumn("type", "varchar(255)", (t) => t.notNull()).addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("expires_at", "varchar(255)", (t) => t.notNull()).addColumn("used_at", "varchar(255)").execute(), await e.schema.createIndex("codes_expires_at_index").on("codes").column("expires_at").execute();
|
|
3858
3929
|
}
|
|
3859
|
-
async function
|
|
3930
|
+
async function Uo(e) {
|
|
3860
3931
|
await e.schema.dropTable("passwords").execute(), await e.schema.dropTable("codes").execute();
|
|
3861
3932
|
}
|
|
3862
|
-
const
|
|
3933
|
+
const Bo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3863
3934
|
__proto__: null,
|
|
3864
|
-
down:
|
|
3865
|
-
up:
|
|
3935
|
+
down: Uo,
|
|
3936
|
+
up: qo
|
|
3866
3937
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3867
|
-
async function
|
|
3938
|
+
async function Qo(e) {
|
|
3868
3939
|
}
|
|
3869
|
-
async function
|
|
3940
|
+
async function Yo(e) {
|
|
3870
3941
|
}
|
|
3871
|
-
const
|
|
3942
|
+
const Ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3872
3943
|
__proto__: null,
|
|
3873
|
-
down:
|
|
3874
|
-
up:
|
|
3944
|
+
down: Yo,
|
|
3945
|
+
up: Qo
|
|
3875
3946
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3876
|
-
async function
|
|
3947
|
+
async function Wo(e) {
|
|
3877
3948
|
await e.schema.alterTable("passwords").addColumn(
|
|
3878
3949
|
"password",
|
|
3879
3950
|
"varchar(255)",
|
|
@@ -3881,26 +3952,8 @@ async function qo(e) {
|
|
|
3881
3952
|
(t) => t.notNull()
|
|
3882
3953
|
).execute();
|
|
3883
3954
|
}
|
|
3884
|
-
async function Bo(e) {
|
|
3885
|
-
await e.schema.alterTable("passwords").dropColumn("password").execute();
|
|
3886
|
-
}
|
|
3887
|
-
const Uo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3888
|
-
__proto__: null,
|
|
3889
|
-
down: Bo,
|
|
3890
|
-
up: qo
|
|
3891
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
3892
|
-
async function Qo(e) {
|
|
3893
|
-
}
|
|
3894
|
-
async function Ho(e) {
|
|
3895
|
-
}
|
|
3896
|
-
const Yo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3897
|
-
__proto__: null,
|
|
3898
|
-
down: Ho,
|
|
3899
|
-
up: Qo
|
|
3900
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
3901
|
-
async function Wo(e) {
|
|
3902
|
-
}
|
|
3903
3955
|
async function Go(e) {
|
|
3956
|
+
await e.schema.alterTable("passwords").dropColumn("password").execute();
|
|
3904
3957
|
}
|
|
3905
3958
|
const Vo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3906
3959
|
__proto__: null,
|
|
@@ -3917,10 +3970,8 @@ const er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3917
3970
|
up: Xo
|
|
3918
3971
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3919
3972
|
async function tr(e) {
|
|
3920
|
-
await e.schema.createIndex("users_email_index").on("users").column("email").execute();
|
|
3921
3973
|
}
|
|
3922
3974
|
async function ar(e) {
|
|
3923
|
-
await e.schema.dropIndex("users_email_index").execute();
|
|
3924
3975
|
}
|
|
3925
3976
|
const nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3926
3977
|
__proto__: null,
|
|
@@ -3928,10 +3979,8 @@ const nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3928
3979
|
up: tr
|
|
3929
3980
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3930
3981
|
async function or(e) {
|
|
3931
|
-
await e.schema.alterTable("users").addColumn("profileData", "varchar(2048)").execute();
|
|
3932
3982
|
}
|
|
3933
3983
|
async function rr(e) {
|
|
3934
|
-
await e.schema.alterTable("users").dropColumn("profileData").execute();
|
|
3935
3984
|
}
|
|
3936
3985
|
const sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3937
3986
|
__proto__: null,
|
|
@@ -3939,10 +3988,10 @@ const sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3939
3988
|
up: or
|
|
3940
3989
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3941
3990
|
async function ir(e) {
|
|
3942
|
-
await e.schema.createIndex("
|
|
3991
|
+
await e.schema.createIndex("users_email_index").on("users").column("email").execute();
|
|
3943
3992
|
}
|
|
3944
3993
|
async function cr(e) {
|
|
3945
|
-
await e.schema.dropIndex("
|
|
3994
|
+
await e.schema.dropIndex("users_email_index").execute();
|
|
3946
3995
|
}
|
|
3947
3996
|
const lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3948
3997
|
__proto__: null,
|
|
@@ -3950,10 +3999,10 @@ const lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3950
3999
|
up: ir
|
|
3951
4000
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3952
4001
|
async function dr(e) {
|
|
3953
|
-
await e.schema.alterTable("users").addColumn("
|
|
4002
|
+
await e.schema.alterTable("users").addColumn("profileData", "varchar(2048)").execute();
|
|
3954
4003
|
}
|
|
3955
4004
|
async function ur(e) {
|
|
3956
|
-
await e.schema.alterTable("users").dropColumn("
|
|
4005
|
+
await e.schema.alterTable("users").dropColumn("profileData").execute();
|
|
3957
4006
|
}
|
|
3958
4007
|
const _r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3959
4008
|
__proto__: null,
|
|
@@ -3961,22 +4010,10 @@ const _r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3961
4010
|
up: dr
|
|
3962
4011
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3963
4012
|
async function mr(e) {
|
|
3964
|
-
await e.schema.
|
|
3965
|
-
"tenant_id",
|
|
3966
|
-
"varchar(255)",
|
|
3967
|
-
(t) => t.references("tenants.id").onDelete("cascade")
|
|
3968
|
-
).addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("revoked_at", "varchar(255)").addColumn("cert", "varchar(4096)").addColumn("pkcs7", "varchar(4096)").addColumn("fingerprint", "varchar(256)").addColumn("thumbprint", "varchar(256)").addColumn("current_since", "varchar(256)").addColumn("current_until", "varchar(256)").addColumn(
|
|
3969
|
-
"type",
|
|
3970
|
-
"varchar(50)",
|
|
3971
|
-
(t) => t.notNull().defaultTo("jwt_signing")
|
|
3972
|
-
).addColumn(
|
|
3973
|
-
"connection",
|
|
3974
|
-
"varchar(255)",
|
|
3975
|
-
(t) => t.references("connections.id").onDelete("cascade")
|
|
3976
|
-
).execute();
|
|
4013
|
+
await e.schema.createIndex("users_linked_to_index").on("users").column("linked_to").execute();
|
|
3977
4014
|
}
|
|
3978
4015
|
async function hr(e) {
|
|
3979
|
-
await e.schema.
|
|
4016
|
+
await e.schema.dropIndex("users_linked_to_index");
|
|
3980
4017
|
}
|
|
3981
4018
|
const pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3982
4019
|
__proto__: null,
|
|
@@ -3984,8 +4021,10 @@ const pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3984
4021
|
up: mr
|
|
3985
4022
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3986
4023
|
async function fr(e) {
|
|
4024
|
+
await e.schema.alterTable("users").addColumn("locale", "varchar(255)").execute();
|
|
3987
4025
|
}
|
|
3988
4026
|
async function gr(e) {
|
|
4027
|
+
await e.schema.alterTable("users").dropColumn("locale").execute();
|
|
3989
4028
|
}
|
|
3990
4029
|
const wr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3991
4030
|
__proto__: null,
|
|
@@ -3993,8 +4032,22 @@ const wr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3993
4032
|
up: fr
|
|
3994
4033
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3995
4034
|
async function yr(e) {
|
|
4035
|
+
await e.schema.createTable("keys").addColumn("kid", "varchar(255)", (t) => t.primaryKey()).addColumn(
|
|
4036
|
+
"tenant_id",
|
|
4037
|
+
"varchar(255)",
|
|
4038
|
+
(t) => t.references("tenants.id").onDelete("cascade")
|
|
4039
|
+
).addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("revoked_at", "varchar(255)").addColumn("cert", "varchar(4096)").addColumn("pkcs7", "varchar(4096)").addColumn("fingerprint", "varchar(256)").addColumn("thumbprint", "varchar(256)").addColumn("current_since", "varchar(256)").addColumn("current_until", "varchar(256)").addColumn(
|
|
4040
|
+
"type",
|
|
4041
|
+
"varchar(50)",
|
|
4042
|
+
(t) => t.notNull().defaultTo("jwt_signing")
|
|
4043
|
+
).addColumn(
|
|
4044
|
+
"connection",
|
|
4045
|
+
"varchar(255)",
|
|
4046
|
+
(t) => t.references("connections.id").onDelete("cascade")
|
|
4047
|
+
).execute();
|
|
3996
4048
|
}
|
|
3997
4049
|
async function vr(e) {
|
|
4050
|
+
await e.schema.dropTable("keys").execute();
|
|
3998
4051
|
}
|
|
3999
4052
|
const Cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4000
4053
|
__proto__: null,
|
|
@@ -4002,10 +4055,8 @@ const Cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4002
4055
|
up: yr
|
|
4003
4056
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4004
4057
|
async function xr(e) {
|
|
4005
|
-
await e.schema.alterTable("otps").addColumn("audience", "varchar(255)").execute();
|
|
4006
4058
|
}
|
|
4007
4059
|
async function Tr(e) {
|
|
4008
|
-
await e.schema.alterTable("otps").dropColumn("audience").execute();
|
|
4009
4060
|
}
|
|
4010
4061
|
const Nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4011
4062
|
__proto__: null,
|
|
@@ -4022,10 +4073,10 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4022
4073
|
up: br
|
|
4023
4074
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4024
4075
|
async function kr(e) {
|
|
4025
|
-
await e.schema.alterTable("
|
|
4076
|
+
await e.schema.alterTable("otps").addColumn("audience", "varchar(255)").execute();
|
|
4026
4077
|
}
|
|
4027
4078
|
async function $r(e) {
|
|
4028
|
-
await e.schema.alterTable("
|
|
4079
|
+
await e.schema.alterTable("otps").dropColumn("audience").execute();
|
|
4029
4080
|
}
|
|
4030
4081
|
const Er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4031
4082
|
__proto__: null,
|
|
@@ -4033,10 +4084,8 @@ const Er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4033
4084
|
up: kr
|
|
4034
4085
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4035
4086
|
async function Ir(e) {
|
|
4036
|
-
await e.schema.alterTable("users").dropColumn("tags").execute();
|
|
4037
4087
|
}
|
|
4038
4088
|
async function zr(e) {
|
|
4039
|
-
await e.schema.alterTable("users").addColumn("tags", "varchar(255)").execute();
|
|
4040
4089
|
}
|
|
4041
4090
|
const Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4042
4091
|
__proto__: null,
|
|
@@ -4044,10 +4093,10 @@ const Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4044
4093
|
up: Ir
|
|
4045
4094
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4046
4095
|
async function Dr(e) {
|
|
4047
|
-
await e.schema.
|
|
4096
|
+
await e.schema.alterTable("logs").dropColumn("category").execute();
|
|
4048
4097
|
}
|
|
4049
4098
|
async function Ar(e) {
|
|
4050
|
-
await e.schema.
|
|
4099
|
+
await e.schema.alterTable("logs").addColumn("category", "varchar(255)", (t) => t.notNull()).execute();
|
|
4051
4100
|
}
|
|
4052
4101
|
const jr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4053
4102
|
__proto__: null,
|
|
@@ -4055,10 +4104,10 @@ const jr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4055
4104
|
up: Dr
|
|
4056
4105
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4057
4106
|
async function Fr(e) {
|
|
4058
|
-
await e.schema.alterTable("
|
|
4107
|
+
await e.schema.alterTable("users").dropColumn("tags").execute();
|
|
4059
4108
|
}
|
|
4060
4109
|
async function Rr(e) {
|
|
4061
|
-
await e.schema.alterTable("
|
|
4110
|
+
await e.schema.alterTable("users").addColumn("tags", "varchar(255)").execute();
|
|
4062
4111
|
}
|
|
4063
4112
|
const Mr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4064
4113
|
__proto__: null,
|
|
@@ -4066,10 +4115,10 @@ const Mr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4066
4115
|
up: Fr
|
|
4067
4116
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4068
4117
|
async function Jr(e) {
|
|
4069
|
-
await e.schema.
|
|
4118
|
+
await e.schema.createIndex("logs_user_id").on("logs").column("user_id").execute(), await e.schema.createIndex("logs_tenant_id").on("logs").column("tenant_id").execute(), await e.schema.createIndex("logs_date").on("logs").column("date").execute();
|
|
4070
4119
|
}
|
|
4071
4120
|
async function Lr(e) {
|
|
4072
|
-
await e.schema.
|
|
4121
|
+
await e.schema.dropIndex("logs_user_id"), await e.schema.dropIndex("logs_tenant_id"), await e.schema.dropIndex("logs_date");
|
|
4073
4122
|
}
|
|
4074
4123
|
const Kr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4075
4124
|
__proto__: null,
|
|
@@ -4077,31 +4126,32 @@ const Kr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4077
4126
|
up: Jr
|
|
4078
4127
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4079
4128
|
async function qr(e) {
|
|
4080
|
-
await e.schema.
|
|
4129
|
+
await e.schema.alterTable("logs").dropColumn("details").execute(), await e.schema.alterTable("logs").addColumn("details", "varchar(8192)").execute();
|
|
4081
4130
|
}
|
|
4082
|
-
async function
|
|
4083
|
-
await e.schema.
|
|
4131
|
+
async function Ur(e) {
|
|
4132
|
+
await e.schema.alterTable("logs").dropColumn("details").execute(), await e.schema.alterTable("logs").addColumn("details", "varchar(2048)").execute();
|
|
4084
4133
|
}
|
|
4085
|
-
const
|
|
4134
|
+
const Br = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4086
4135
|
__proto__: null,
|
|
4087
|
-
down:
|
|
4136
|
+
down: Ur,
|
|
4088
4137
|
up: qr
|
|
4089
4138
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4090
4139
|
async function Qr(e) {
|
|
4140
|
+
await e.schema.alterTable("logs").addColumn("user_name", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("auth0_client", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("isMobile", "boolean").execute(), await e.schema.alterTable("logs").addColumn("connection", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("connection_id", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("audience", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("scope", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("strategy", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("strategy_type", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("hostname", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("session_connection", "varchar(255)").execute();
|
|
4091
4141
|
}
|
|
4092
|
-
async function
|
|
4093
|
-
await e.schema.alterTable("
|
|
4142
|
+
async function Yr(e) {
|
|
4143
|
+
await e.schema.alterTable("logs").dropColumn("user_name").execute(), await e.schema.alterTable("logs").dropColumn("auth0_client").execute(), await e.schema.alterTable("logs").dropColumn("isMobile").execute(), await e.schema.alterTable("logs").dropColumn("connection").execute(), await e.schema.alterTable("logs").dropColumn("connection_id").execute(), await e.schema.alterTable("logs").dropColumn("audience").execute(), await e.schema.alterTable("logs").dropColumn("scope").execute(), await e.schema.alterTable("logs").dropColumn("strategy").execute(), await e.schema.alterTable("logs").dropColumn("strategy_type").execute(), await e.schema.alterTable("logs").dropColumn("hostname").execute(), await e.schema.alterTable("logs").dropColumn("session_connection").execute();
|
|
4094
4144
|
}
|
|
4095
|
-
const
|
|
4145
|
+
const Hr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4096
4146
|
__proto__: null,
|
|
4097
|
-
down:
|
|
4147
|
+
down: Yr,
|
|
4098
4148
|
up: Qr
|
|
4099
4149
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4100
4150
|
async function Wr(e) {
|
|
4101
|
-
await e.schema.
|
|
4151
|
+
await e.schema.createIndex("users_name_index").on("users").column("name").execute();
|
|
4102
4152
|
}
|
|
4103
4153
|
async function Gr(e) {
|
|
4104
|
-
await e.schema.
|
|
4154
|
+
await e.schema.dropIndex("users_name_index").execute();
|
|
4105
4155
|
}
|
|
4106
4156
|
const Vr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4107
4157
|
__proto__: null,
|
|
@@ -4109,10 +4159,9 @@ const Vr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4109
4159
|
up: Wr
|
|
4110
4160
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4111
4161
|
async function Xr(e) {
|
|
4112
|
-
await e.schema.alterTable("tickets").dropColumn("state").execute(), await e.schema.alterTable("tickets").addColumn("state", "varchar(8192)").execute();
|
|
4113
4162
|
}
|
|
4114
4163
|
async function Zr(e) {
|
|
4115
|
-
await e.schema.alterTable("
|
|
4164
|
+
await e.schema.alterTable("users").dropConstraint("unique_email_provider").execute();
|
|
4116
4165
|
}
|
|
4117
4166
|
const es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4118
4167
|
__proto__: null,
|
|
@@ -4120,14 +4169,10 @@ const es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4120
4169
|
up: Xr
|
|
4121
4170
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4122
4171
|
async function ts(e) {
|
|
4123
|
-
await e.schema.
|
|
4124
|
-
"tenant_id",
|
|
4125
|
-
"varchar(255)",
|
|
4126
|
-
(t) => t.references("tenants.id").onDelete("cascade").notNull().primaryKey()
|
|
4127
|
-
).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();
|
|
4172
|
+
await e.schema.alterTable("otps").dropColumn("state").execute(), await e.schema.alterTable("otps").addColumn("state", "varchar(8192)").execute();
|
|
4128
4173
|
}
|
|
4129
4174
|
async function as(e) {
|
|
4130
|
-
await e.schema.
|
|
4175
|
+
await e.schema.alterTable("otps").dropColumn("state").execute(), await e.schema.alterTable("otps").addColumn("state", "varchar(1024)").execute();
|
|
4131
4176
|
}
|
|
4132
4177
|
const ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4133
4178
|
__proto__: null,
|
|
@@ -4135,8 +4180,10 @@ const ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4135
4180
|
up: ts
|
|
4136
4181
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4137
4182
|
async function os(e) {
|
|
4183
|
+
await e.schema.alterTable("tickets").dropColumn("state").execute(), await e.schema.alterTable("tickets").addColumn("state", "varchar(8192)").execute();
|
|
4138
4184
|
}
|
|
4139
4185
|
async function rs(e) {
|
|
4186
|
+
await e.schema.alterTable("tickets").dropColumn("state").execute(), await e.schema.alterTable("tickets").addColumn("state", "varchar(1024)").execute();
|
|
4140
4187
|
}
|
|
4141
4188
|
const ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4142
4189
|
__proto__: null,
|
|
@@ -4144,8 +4191,14 @@ const ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4144
4191
|
up: os
|
|
4145
4192
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4146
4193
|
async function is(e) {
|
|
4194
|
+
await e.schema.createTable("branding").addColumn(
|
|
4195
|
+
"tenant_id",
|
|
4196
|
+
"varchar(255)",
|
|
4197
|
+
(t) => t.references("tenants.id").onDelete("cascade").notNull().primaryKey()
|
|
4198
|
+
).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();
|
|
4147
4199
|
}
|
|
4148
4200
|
async function cs(e) {
|
|
4201
|
+
await e.schema.dropTable("branding").execute();
|
|
4149
4202
|
}
|
|
4150
4203
|
const ls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4151
4204
|
__proto__: null,
|
|
@@ -4171,18 +4224,8 @@ const ps = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4171
4224
|
up: ms
|
|
4172
4225
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4173
4226
|
async function fs(e) {
|
|
4174
|
-
await e.schema.createTable("authentication_codes").addColumn(
|
|
4175
|
-
"tenant_id",
|
|
4176
|
-
"varchar(255)",
|
|
4177
|
-
(t) => t.references("tenants.id").onDelete("cascade").notNull()
|
|
4178
|
-
).addColumn("code", "varchar(255)", (t) => t.primaryKey()).addColumn(
|
|
4179
|
-
"client_id",
|
|
4180
|
-
"varchar(255)",
|
|
4181
|
-
(t) => t.references("applications.id").onDelete("cascade").notNull()
|
|
4182
|
-
).addColumn("user_id", "varchar(255)", (t) => t.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)", (t) => t.notNull()).addColumn("expires_at", "varchar(255)", (t) => t.notNull()).addColumn("used_at", "varchar(255)").execute();
|
|
4183
4227
|
}
|
|
4184
4228
|
async function gs(e) {
|
|
4185
|
-
await e.schema.dropTable("authentication_codes").execute();
|
|
4186
4229
|
}
|
|
4187
4230
|
const ws = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4188
4231
|
__proto__: null,
|
|
@@ -4199,10 +4242,18 @@ const Cs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4199
4242
|
up: ys
|
|
4200
4243
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4201
4244
|
async function xs(e) {
|
|
4202
|
-
await e.schema.
|
|
4245
|
+
await e.schema.createTable("authentication_codes").addColumn(
|
|
4246
|
+
"tenant_id",
|
|
4247
|
+
"varchar(255)",
|
|
4248
|
+
(t) => t.references("tenants.id").onDelete("cascade").notNull()
|
|
4249
|
+
).addColumn("code", "varchar(255)", (t) => t.primaryKey()).addColumn(
|
|
4250
|
+
"client_id",
|
|
4251
|
+
"varchar(255)",
|
|
4252
|
+
(t) => t.references("applications.id").onDelete("cascade").notNull()
|
|
4253
|
+
).addColumn("user_id", "varchar(255)", (t) => t.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)", (t) => t.notNull()).addColumn("expires_at", "varchar(255)", (t) => t.notNull()).addColumn("used_at", "varchar(255)").execute();
|
|
4203
4254
|
}
|
|
4204
4255
|
async function Ts(e) {
|
|
4205
|
-
await e.schema.
|
|
4256
|
+
await e.schema.dropTable("authentication_codes").execute();
|
|
4206
4257
|
}
|
|
4207
4258
|
const Ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4208
4259
|
__proto__: null,
|
|
@@ -4210,10 +4261,8 @@ const Ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4210
4261
|
up: xs
|
|
4211
4262
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4212
4263
|
async function bs(e) {
|
|
4213
|
-
await e.schema.alterTable("logs").dropColumn("user_agent").execute(), await e.schema.alterTable("logs").addColumn("user_agent", "varchar(1024)").execute();
|
|
4214
4264
|
}
|
|
4215
4265
|
async function Ss(e) {
|
|
4216
|
-
await e.schema.alterTable("logs").dropColumn("user_agent").execute(), await e.schema.alterTable("logs").addColumn("user_agent", "varchar(255)").execute();
|
|
4217
4266
|
}
|
|
4218
4267
|
const Os = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4219
4268
|
__proto__: null,
|
|
@@ -4221,8 +4270,10 @@ const Os = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4221
4270
|
up: bs
|
|
4222
4271
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4223
4272
|
async function ks(e) {
|
|
4273
|
+
await e.schema.alterTable("otps").addColumn("ip", "varchar(64)").execute();
|
|
4224
4274
|
}
|
|
4225
4275
|
async function $s(e) {
|
|
4276
|
+
await e.schema.alterTable("otps").dropColumn("ip").execute();
|
|
4226
4277
|
}
|
|
4227
4278
|
const Es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4228
4279
|
__proto__: null,
|
|
@@ -4230,18 +4281,10 @@ const Es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4230
4281
|
up: ks
|
|
4231
4282
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4232
4283
|
async function Is(e) {
|
|
4233
|
-
await e.schema.
|
|
4234
|
-
"tenant_id",
|
|
4235
|
-
"varchar(255)",
|
|
4236
|
-
(t) => t.references("tenants.id").onDelete("cascade").notNull()
|
|
4237
|
-
).addColumn("url", "varchar(512)", (t) => t.notNull()).addColumn("trigger_id", "varchar(255)", (t) => t.notNull()).addColumn("enabled", "boolean", (t) => t.notNull()).addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("updated_at", "varchar(255)", (t) => t.notNull()).addColumn(
|
|
4238
|
-
"synchronous",
|
|
4239
|
-
"boolean",
|
|
4240
|
-
(t) => t.defaultTo(!1).notNull()
|
|
4241
|
-
).addColumn("priority", "integer").execute();
|
|
4284
|
+
await e.schema.alterTable("logs").dropColumn("user_agent").execute(), await e.schema.alterTable("logs").addColumn("user_agent", "varchar(1024)").execute();
|
|
4242
4285
|
}
|
|
4243
4286
|
async function zs(e) {
|
|
4244
|
-
await e.schema.
|
|
4287
|
+
await e.schema.alterTable("logs").dropColumn("user_agent").execute(), await e.schema.alterTable("logs").addColumn("user_agent", "varchar(255)").execute();
|
|
4245
4288
|
}
|
|
4246
4289
|
const Ps = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4247
4290
|
__proto__: null,
|
|
@@ -4258,8 +4301,18 @@ const js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4258
4301
|
up: Ds
|
|
4259
4302
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4260
4303
|
async function Fs(e) {
|
|
4304
|
+
await e.schema.createTable("hooks").addColumn("hook_id", "varchar(255)", (t) => t.notNull().primaryKey()).addColumn(
|
|
4305
|
+
"tenant_id",
|
|
4306
|
+
"varchar(255)",
|
|
4307
|
+
(t) => t.references("tenants.id").onDelete("cascade").notNull()
|
|
4308
|
+
).addColumn("url", "varchar(512)", (t) => t.notNull()).addColumn("trigger_id", "varchar(255)", (t) => t.notNull()).addColumn("enabled", "boolean", (t) => t.notNull()).addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("updated_at", "varchar(255)", (t) => t.notNull()).addColumn(
|
|
4309
|
+
"synchronous",
|
|
4310
|
+
"boolean",
|
|
4311
|
+
(t) => t.defaultTo(!1).notNull()
|
|
4312
|
+
).addColumn("priority", "integer").execute();
|
|
4261
4313
|
}
|
|
4262
4314
|
async function Rs(e) {
|
|
4315
|
+
await e.schema.dropTable("hooks").execute();
|
|
4263
4316
|
}
|
|
4264
4317
|
const Ms = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4265
4318
|
__proto__: null,
|
|
@@ -4267,6 +4320,24 @@ const Ms = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4267
4320
|
up: Fs
|
|
4268
4321
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4269
4322
|
async function Js(e) {
|
|
4323
|
+
}
|
|
4324
|
+
async function Ls(e) {
|
|
4325
|
+
}
|
|
4326
|
+
const Ks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4327
|
+
__proto__: null,
|
|
4328
|
+
down: Ls,
|
|
4329
|
+
up: Js
|
|
4330
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
4331
|
+
async function qs(e) {
|
|
4332
|
+
}
|
|
4333
|
+
async function Us(e) {
|
|
4334
|
+
}
|
|
4335
|
+
const Bs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4336
|
+
__proto__: null,
|
|
4337
|
+
down: Us,
|
|
4338
|
+
up: qs
|
|
4339
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
4340
|
+
async function Qs(e) {
|
|
4270
4341
|
await e.schema.createTable("logins").addColumn("login_id", "varchar(255)", (t) => t.primaryKey()).addColumn(
|
|
4271
4342
|
"tenant_id",
|
|
4272
4343
|
"varchar(255)",
|
|
@@ -4283,7 +4354,7 @@ async function Js(e) {
|
|
|
4283
4354
|
(t) => t.onDelete("cascade")
|
|
4284
4355
|
).addColumn("code_type", "varchar(255)", (t) => t.notNull()).addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("expires_at", "varchar(255)", (t) => t.notNull()).addColumn("used_at", "varchar(255)").execute();
|
|
4285
4356
|
}
|
|
4286
|
-
async function
|
|
4357
|
+
async function Ys(e) {
|
|
4287
4358
|
await e.schema.dropTable("logins").execute(), await e.schema.alterTable("passwords").dropColumn("algorithm").execute(), await e.schema.dropTable("codes").execute(), await e.schema.createTable("codes").addColumn("id", "varchar(255)", (t) => t.primaryKey()).addColumn("code", "varchar(255)", (t) => t.notNull()).addColumn("user_id", "varchar(255)").addColumn("tenant_id", "varchar(255)").addForeignKeyConstraint(
|
|
4288
4359
|
"codes_user_id_tenant_id_constraint",
|
|
4289
4360
|
["user_id", "tenant_id"],
|
|
@@ -4292,36 +4363,14 @@ async function Ls(e) {
|
|
|
4292
4363
|
(t) => t.onDelete("cascade")
|
|
4293
4364
|
).addColumn("type", "varchar(255)", (t) => t.notNull()).addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("expires_at", "varchar(255)", (t) => t.notNull()).addColumn("used_at", "varchar(255)").execute();
|
|
4294
4365
|
}
|
|
4295
|
-
const
|
|
4296
|
-
__proto__: null,
|
|
4297
|
-
down: Ls,
|
|
4298
|
-
up: Js
|
|
4299
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
4300
|
-
async function qs(e) {
|
|
4301
|
-
}
|
|
4302
|
-
async function Bs(e) {
|
|
4303
|
-
}
|
|
4304
|
-
const Us = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4366
|
+
const Hs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4305
4367
|
__proto__: null,
|
|
4306
|
-
down:
|
|
4307
|
-
up: qs
|
|
4308
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
4309
|
-
async function Qs(e) {
|
|
4310
|
-
await e.schema.alterTable("logins").addColumn("auth0Client", "varchar(256)").execute();
|
|
4311
|
-
}
|
|
4312
|
-
async function Hs(e) {
|
|
4313
|
-
await e.schema.alterTable("logins").dropColumn("auth0Client").execute();
|
|
4314
|
-
}
|
|
4315
|
-
const Ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4316
|
-
__proto__: null,
|
|
4317
|
-
down: Hs,
|
|
4368
|
+
down: Ys,
|
|
4318
4369
|
up: Qs
|
|
4319
4370
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4320
4371
|
async function Ws(e) {
|
|
4321
|
-
await e.schema.alterTable("logins").dropColumn("authParams_state").execute(), await e.schema.alterTable("logins").addColumn("authParams_state", "varchar(8192)").execute();
|
|
4322
4372
|
}
|
|
4323
4373
|
async function Gs(e) {
|
|
4324
|
-
await e.schema.alterTable("logins").dropColumn("authParams_state").execute(), await e.schema.alterTable("logins").addColumn("authParams_state", "varchar(511)").execute();
|
|
4325
4374
|
}
|
|
4326
4375
|
const Vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4327
4376
|
__proto__: null,
|
|
@@ -4329,8 +4378,10 @@ const Vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4329
4378
|
up: Ws
|
|
4330
4379
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4331
4380
|
async function Xs(e) {
|
|
4381
|
+
await e.schema.alterTable("logins").addColumn("auth0Client", "varchar(256)").execute();
|
|
4332
4382
|
}
|
|
4333
4383
|
async function Zs(e) {
|
|
4384
|
+
await e.schema.alterTable("logins").dropColumn("auth0Client").execute();
|
|
4334
4385
|
}
|
|
4335
4386
|
const ei = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4336
4387
|
__proto__: null,
|
|
@@ -4338,8 +4389,10 @@ const ei = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4338
4389
|
up: Xs
|
|
4339
4390
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4340
4391
|
async function ti(e) {
|
|
4392
|
+
await e.schema.alterTable("logins").dropColumn("authParams_state").execute(), await e.schema.alterTable("logins").addColumn("authParams_state", "varchar(8192)").execute();
|
|
4341
4393
|
}
|
|
4342
4394
|
async function ai(e) {
|
|
4395
|
+
await e.schema.alterTable("logins").dropColumn("authParams_state").execute(), await e.schema.alterTable("logins").addColumn("authParams_state", "varchar(511)").execute();
|
|
4343
4396
|
}
|
|
4344
4397
|
const ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4345
4398
|
__proto__: null,
|
|
@@ -4347,10 +4400,8 @@ const ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4347
4400
|
up: ti
|
|
4348
4401
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4349
4402
|
async function oi(e) {
|
|
4350
|
-
await e.schema.alterTable("logins").addColumn("authParams_nonce", "varchar(255)").execute();
|
|
4351
4403
|
}
|
|
4352
4404
|
async function ri(e) {
|
|
4353
|
-
await e.schema.alterTable("logins").dropColumn("nonce").execute();
|
|
4354
4405
|
}
|
|
4355
4406
|
const si = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4356
4407
|
__proto__: null,
|
|
@@ -4367,8 +4418,10 @@ const li = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4367
4418
|
up: ii
|
|
4368
4419
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4369
4420
|
async function di(e) {
|
|
4421
|
+
await e.schema.alterTable("logins").addColumn("authParams_nonce", "varchar(255)").execute();
|
|
4370
4422
|
}
|
|
4371
4423
|
async function ui(e) {
|
|
4424
|
+
await e.schema.alterTable("logins").dropColumn("nonce").execute();
|
|
4372
4425
|
}
|
|
4373
4426
|
const _i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4374
4427
|
__proto__: null,
|
|
@@ -4376,6 +4429,24 @@ const _i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4376
4429
|
up: di
|
|
4377
4430
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4378
4431
|
async function mi(e) {
|
|
4432
|
+
}
|
|
4433
|
+
async function hi(e) {
|
|
4434
|
+
}
|
|
4435
|
+
const pi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4436
|
+
__proto__: null,
|
|
4437
|
+
down: hi,
|
|
4438
|
+
up: mi
|
|
4439
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
4440
|
+
async function fi(e) {
|
|
4441
|
+
}
|
|
4442
|
+
async function gi(e) {
|
|
4443
|
+
}
|
|
4444
|
+
const wi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4445
|
+
__proto__: null,
|
|
4446
|
+
down: gi,
|
|
4447
|
+
up: fi
|
|
4448
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
4449
|
+
async function yi(e) {
|
|
4379
4450
|
await e.schema.dropTable("codes").execute(), await e.schema.createTable("codes").addColumn("code_id", "varchar(255)", (t) => t.notNull()).addColumn(
|
|
4380
4451
|
"tenant_id",
|
|
4381
4452
|
"varchar(255)",
|
|
@@ -4391,7 +4462,7 @@ async function mi(e) {
|
|
|
4391
4462
|
"code_type"
|
|
4392
4463
|
]).execute();
|
|
4393
4464
|
}
|
|
4394
|
-
async function
|
|
4465
|
+
async function vi(e) {
|
|
4395
4466
|
await e.schema.dropTable("codes").execute(), await e.schema.createTable("codes").addColumn("code_id", "varchar(255)", (t) => t.primaryKey()).addColumn(
|
|
4396
4467
|
"tenant_id",
|
|
4397
4468
|
"varchar(255)",
|
|
@@ -4404,15 +4475,15 @@ async function hi(e) {
|
|
|
4404
4475
|
(t) => t.onDelete("cascade")
|
|
4405
4476
|
).addColumn("code_type", "varchar(255)", (t) => t.notNull()).addColumn("created_at", "varchar(255)", (t) => t.notNull()).addColumn("expires_at", "varchar(255)", (t) => t.notNull()).addColumn("used_at", "varchar(255)").execute();
|
|
4406
4477
|
}
|
|
4407
|
-
const
|
|
4478
|
+
const Ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4408
4479
|
__proto__: null,
|
|
4409
|
-
down:
|
|
4410
|
-
up:
|
|
4480
|
+
down: vi,
|
|
4481
|
+
up: yi
|
|
4411
4482
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4412
|
-
async function
|
|
4483
|
+
async function xi(e) {
|
|
4413
4484
|
await e.schema.dropTable("otps").execute(), await e.schema.dropTable("authentication_codes").execute();
|
|
4414
4485
|
}
|
|
4415
|
-
async function
|
|
4486
|
+
async function Ti(e) {
|
|
4416
4487
|
await e.schema.alterTable("keys").addColumn("private_key", "varchar(2048)").addColumn("public_key", "varchar(2048)").execute(), await e.schema.createTable("otps").addColumn(
|
|
4417
4488
|
"tenant_id",
|
|
4418
4489
|
"varchar(255)",
|
|
@@ -4431,32 +4502,32 @@ async function gi(e) {
|
|
|
4431
4502
|
(t) => t.references("applications.id").onDelete("cascade").notNull()
|
|
4432
4503
|
).addColumn("user_id", "varchar(255)", (t) => t.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)", (t) => t.notNull()).addColumn("expires_at", "varchar(255)", (t) => t.notNull()).addColumn("used_at", "varchar(255)").execute();
|
|
4433
4504
|
}
|
|
4434
|
-
const
|
|
4505
|
+
const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4435
4506
|
__proto__: null,
|
|
4436
|
-
down:
|
|
4437
|
-
up:
|
|
4507
|
+
down: Ti,
|
|
4508
|
+
up: xi
|
|
4438
4509
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4439
|
-
async function
|
|
4510
|
+
async function bi(e) {
|
|
4440
4511
|
await e.schema.createIndex("IDX_logs_tenant_date_type_user").on("logs").columns(["tenant_id", "date", "type", "user_id"]).execute();
|
|
4441
4512
|
}
|
|
4442
|
-
async function
|
|
4513
|
+
async function Si(e) {
|
|
4443
4514
|
await e.schema.dropIndex("IDX_logs_tenant_date_type_user").on("logs").execute();
|
|
4444
4515
|
}
|
|
4445
|
-
const
|
|
4516
|
+
const Oi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4446
4517
|
__proto__: null,
|
|
4447
|
-
down:
|
|
4448
|
-
up:
|
|
4518
|
+
down: Si,
|
|
4519
|
+
up: bi
|
|
4449
4520
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4450
|
-
async function
|
|
4521
|
+
async function ki(e) {
|
|
4451
4522
|
}
|
|
4452
|
-
async function
|
|
4523
|
+
async function $i(e) {
|
|
4453
4524
|
}
|
|
4454
|
-
const
|
|
4525
|
+
const Ei = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4455
4526
|
__proto__: null,
|
|
4456
|
-
down:
|
|
4457
|
-
up:
|
|
4527
|
+
down: $i,
|
|
4528
|
+
up: ki
|
|
4458
4529
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4459
|
-
async function
|
|
4530
|
+
async function Ii(e) {
|
|
4460
4531
|
await e.schema.createTable("prompt_settings").addColumn("tenant_id", "varchar(64)", (t) => t.primaryKey()).addColumn(
|
|
4461
4532
|
"universal_login_experience",
|
|
4462
4533
|
"varchar(16)",
|
|
@@ -4475,26 +4546,8 @@ async function bi(e) {
|
|
|
4475
4546
|
(t) => t.defaultTo(!1).notNull()
|
|
4476
4547
|
).execute();
|
|
4477
4548
|
}
|
|
4478
|
-
async function Si(e) {
|
|
4479
|
-
await e.schema.dropTable("prompt_settings").execute();
|
|
4480
|
-
}
|
|
4481
|
-
const Oi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4482
|
-
__proto__: null,
|
|
4483
|
-
down: Si,
|
|
4484
|
-
up: bi
|
|
4485
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
4486
|
-
async function ki(e) {
|
|
4487
|
-
}
|
|
4488
|
-
async function $i(e) {
|
|
4489
|
-
}
|
|
4490
|
-
const Ei = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4491
|
-
__proto__: null,
|
|
4492
|
-
down: $i,
|
|
4493
|
-
up: ki
|
|
4494
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
4495
|
-
async function Ii(e) {
|
|
4496
|
-
}
|
|
4497
4549
|
async function zi(e) {
|
|
4550
|
+
await e.schema.dropTable("prompt_settings").execute();
|
|
4498
4551
|
}
|
|
4499
4552
|
const Pi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4500
4553
|
__proto__: null,
|
|
@@ -4511,10 +4564,8 @@ const ji = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4511
4564
|
up: Di
|
|
4512
4565
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4513
4566
|
async function Fi(e) {
|
|
4514
|
-
await e.schema.alterTable("logins").addColumn("authParams_ui_locales", "varchar(32)").execute();
|
|
4515
4567
|
}
|
|
4516
4568
|
async function Ri(e) {
|
|
4517
|
-
await e.schema.alterTable("logins").dropColumn("authParams_ui_locales").execute();
|
|
4518
4569
|
}
|
|
4519
4570
|
const Mi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4520
4571
|
__proto__: null,
|
|
@@ -4522,10 +4573,8 @@ const Mi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4522
4573
|
up: Fi
|
|
4523
4574
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4524
4575
|
async function Ji(e) {
|
|
4525
|
-
await e.schema.alterTable("logins").addColumn("authParams_prompt", "varchar(16)").execute();
|
|
4526
4576
|
}
|
|
4527
4577
|
async function Li(e) {
|
|
4528
|
-
await e.schema.alterTable("logins").dropColumn("authParams_prompt").execute();
|
|
4529
4578
|
}
|
|
4530
4579
|
const Ki = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4531
4580
|
__proto__: null,
|
|
@@ -4533,30 +4582,30 @@ const Ki = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4533
4582
|
up: Ji
|
|
4534
4583
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4535
4584
|
async function qi(e) {
|
|
4585
|
+
await e.schema.alterTable("logins").addColumn("authParams_ui_locales", "varchar(32)").execute();
|
|
4536
4586
|
}
|
|
4537
|
-
async function
|
|
4587
|
+
async function Ui(e) {
|
|
4588
|
+
await e.schema.alterTable("logins").dropColumn("authParams_ui_locales").execute();
|
|
4538
4589
|
}
|
|
4539
|
-
const
|
|
4590
|
+
const Bi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4540
4591
|
__proto__: null,
|
|
4541
|
-
down:
|
|
4592
|
+
down: Ui,
|
|
4542
4593
|
up: qi
|
|
4543
4594
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4544
4595
|
async function Qi(e) {
|
|
4545
|
-
await e.schema.alterTable("logins").addColumn("
|
|
4596
|
+
await e.schema.alterTable("logins").addColumn("authParams_prompt", "varchar(16)").execute();
|
|
4546
4597
|
}
|
|
4547
|
-
async function
|
|
4548
|
-
await e.schema.alterTable("logins").dropColumn("
|
|
4598
|
+
async function Yi(e) {
|
|
4599
|
+
await e.schema.alterTable("logins").dropColumn("authParams_prompt").execute();
|
|
4549
4600
|
}
|
|
4550
|
-
const
|
|
4601
|
+
const Hi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4551
4602
|
__proto__: null,
|
|
4552
|
-
down:
|
|
4603
|
+
down: Yi,
|
|
4553
4604
|
up: Qi
|
|
4554
4605
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4555
4606
|
async function Wi(e) {
|
|
4556
|
-
await e.schema.alterTable("codes").addColumn("code_verifier", "varchar(128)").execute();
|
|
4557
4607
|
}
|
|
4558
4608
|
async function Gi(e) {
|
|
4559
|
-
await e.schema.alterTable("codes").dropColumn("code_verifier").execute();
|
|
4560
4609
|
}
|
|
4561
4610
|
const Vi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4562
4611
|
__proto__: null,
|
|
@@ -4564,6 +4613,28 @@ const Vi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4564
4613
|
up: Wi
|
|
4565
4614
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4566
4615
|
async function Xi(e) {
|
|
4616
|
+
await e.schema.alterTable("logins").addColumn("authParams_act_as", "varchar(255)").execute();
|
|
4617
|
+
}
|
|
4618
|
+
async function Zi(e) {
|
|
4619
|
+
await e.schema.alterTable("logins").dropColumn("authParam_act_as").execute();
|
|
4620
|
+
}
|
|
4621
|
+
const ec = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4622
|
+
__proto__: null,
|
|
4623
|
+
down: Zi,
|
|
4624
|
+
up: Xi
|
|
4625
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
4626
|
+
async function tc(e) {
|
|
4627
|
+
await e.schema.alterTable("codes").addColumn("code_verifier", "varchar(128)").execute();
|
|
4628
|
+
}
|
|
4629
|
+
async function ac(e) {
|
|
4630
|
+
await e.schema.alterTable("codes").dropColumn("code_verifier").execute();
|
|
4631
|
+
}
|
|
4632
|
+
const nc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4633
|
+
__proto__: null,
|
|
4634
|
+
down: ac,
|
|
4635
|
+
up: tc
|
|
4636
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
4637
|
+
async function oc(e) {
|
|
4567
4638
|
await e.schema.createTable("email_providers").addColumn("tenant_id", "varchar(255)", (t) => t.primaryKey()).addColumn("name", "varchar(255)", (t) => t.notNull()).addColumn("enabled", "boolean", (t) => t.notNull()).addColumn("default_from_address", "varchar(255)").addColumn(
|
|
4568
4639
|
"credentials",
|
|
4569
4640
|
"varchar(2048)",
|
|
@@ -4574,18 +4645,18 @@ async function Xi(e) {
|
|
|
4574
4645
|
(t) => t.notNull().defaultTo("{}")
|
|
4575
4646
|
).addColumn("created_at", "varchar(29)", (t) => t.notNull()).addColumn("updated_at", "varchar(29)", (t) => t.notNull()).execute();
|
|
4576
4647
|
}
|
|
4577
|
-
async function
|
|
4648
|
+
async function rc(e) {
|
|
4578
4649
|
await e.schema.dropTable("email_providers").execute();
|
|
4579
4650
|
}
|
|
4580
|
-
const
|
|
4651
|
+
const sc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4581
4652
|
__proto__: null,
|
|
4582
|
-
down:
|
|
4583
|
-
up:
|
|
4653
|
+
down: rc,
|
|
4654
|
+
up: oc
|
|
4584
4655
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4585
|
-
async function
|
|
4656
|
+
async function ic(e) {
|
|
4586
4657
|
await e.schema.dropTable("tickets").execute();
|
|
4587
4658
|
}
|
|
4588
|
-
async function
|
|
4659
|
+
async function cc(e) {
|
|
4589
4660
|
await e.schema.createTable("tickets").addColumn(
|
|
4590
4661
|
"tenant_id",
|
|
4591
4662
|
"varchar(255)",
|
|
@@ -4596,22 +4667,22 @@ async function ac(e) {
|
|
|
4596
4667
|
(t) => t.references("applications.id").onDelete("cascade").notNull()
|
|
4597
4668
|
).addColumn("email", "varchar(255)", (t) => t.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)", (t) => t.notNull()).addColumn("expires_at", "varchar(255)", (t) => t.notNull()).addColumn("used_at", "varchar(255)").execute();
|
|
4598
4669
|
}
|
|
4599
|
-
const
|
|
4670
|
+
const lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4600
4671
|
__proto__: null,
|
|
4601
|
-
down:
|
|
4602
|
-
up:
|
|
4672
|
+
down: cc,
|
|
4673
|
+
up: ic
|
|
4603
4674
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4604
|
-
async function
|
|
4675
|
+
async function dc(e) {
|
|
4605
4676
|
}
|
|
4606
|
-
async function
|
|
4677
|
+
async function uc(e) {
|
|
4607
4678
|
await e.schema.alterTable("logins").dropColumn("ip").dropColumn("useragent").execute();
|
|
4608
4679
|
}
|
|
4609
|
-
const
|
|
4680
|
+
const _c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4610
4681
|
__proto__: null,
|
|
4611
|
-
down:
|
|
4612
|
-
up:
|
|
4682
|
+
down: uc,
|
|
4683
|
+
up: dc
|
|
4613
4684
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4614
|
-
async function
|
|
4685
|
+
async function mc(e) {
|
|
4615
4686
|
await e.schema.createTable("refresh_tokens").addColumn("id", "varchar(21)", (t) => t.primaryKey()).addColumn(
|
|
4616
4687
|
"client_id",
|
|
4617
4688
|
"varchar(21)",
|
|
@@ -4624,27 +4695,27 @@ async function ic(e) {
|
|
|
4624
4695
|
(t) => t.onDelete("cascade")
|
|
4625
4696
|
).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("expires_at", "varchar(35)").addColumn("idle_expires_at", "varchar(35)").addColumn("last_exchanged_at", "varchar(35)").addColumn("device", "varchar(2048)", (t) => t.notNull()).addColumn("resource_servers", "varchar(2048)", (t) => t.notNull()).addColumn("rotating", "boolean", (t) => t.notNull()).execute();
|
|
4626
4697
|
}
|
|
4627
|
-
async function
|
|
4698
|
+
async function hc(e) {
|
|
4628
4699
|
await e.schema.dropTable("refresh_tokens").execute();
|
|
4629
4700
|
}
|
|
4630
|
-
const
|
|
4701
|
+
const pc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4631
4702
|
__proto__: null,
|
|
4632
|
-
down:
|
|
4633
|
-
up:
|
|
4703
|
+
down: hc,
|
|
4704
|
+
up: mc
|
|
4634
4705
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4635
|
-
async function
|
|
4706
|
+
async function fc(e) {
|
|
4636
4707
|
}
|
|
4637
|
-
async function
|
|
4708
|
+
async function gc(e) {
|
|
4638
4709
|
}
|
|
4639
|
-
const
|
|
4710
|
+
const wc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4640
4711
|
__proto__: null,
|
|
4641
|
-
down:
|
|
4642
|
-
up:
|
|
4712
|
+
down: gc,
|
|
4713
|
+
up: fc
|
|
4643
4714
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4644
|
-
async function
|
|
4715
|
+
async function yc(e) {
|
|
4645
4716
|
await e.schema.dropTable("sessions").execute(), await e.schema.dropTable("refresh_tokens").execute();
|
|
4646
4717
|
}
|
|
4647
|
-
async function
|
|
4718
|
+
async function vc(e) {
|
|
4648
4719
|
await e.schema.createTable("sessions").addColumn("id", "varchar(21)", (t) => t.primaryKey()).addColumn("tenant_id", "varchar(255)").addColumn("user_id", "varchar(255)").addForeignKeyConstraint(
|
|
4649
4720
|
"sessions_user_id_constraint",
|
|
4650
4721
|
["user_id", "tenant_id"],
|
|
@@ -4663,12 +4734,12 @@ async function hc(e) {
|
|
|
4663
4734
|
(t) => t.onDelete("cascade")
|
|
4664
4735
|
).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("expires_at", "varchar(35)").addColumn("idle_expires_at", "varchar(35)").addColumn("last_exchanged_at", "varchar(35)").addColumn("device", "varchar(2048)", (t) => t.notNull()).addColumn("resource_servers", "varchar(2048)", (t) => t.notNull()).addColumn("rotating", "boolean", (t) => t.notNull()).execute();
|
|
4665
4736
|
}
|
|
4666
|
-
const
|
|
4737
|
+
const Cc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4667
4738
|
__proto__: null,
|
|
4668
|
-
down:
|
|
4669
|
-
up:
|
|
4739
|
+
down: vc,
|
|
4740
|
+
up: yc
|
|
4670
4741
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4671
|
-
async function
|
|
4742
|
+
async function xc(e) {
|
|
4672
4743
|
await e.schema.createTable("sessions_2").addColumn("id", "varchar(21)", (t) => t.primaryKey()).addColumn("tenant_id", "varchar(255)").addColumn("user_id", "varchar(255)").addForeignKeyConstraint(
|
|
4673
4744
|
"sessions_2_user_id_constraint",
|
|
4674
4745
|
["user_id", "tenant_id"],
|
|
@@ -4687,15 +4758,15 @@ async function fc(e) {
|
|
|
4687
4758
|
(t) => t.onDelete("cascade")
|
|
4688
4759
|
).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("expires_at", "varchar(35)").addColumn("idle_expires_at", "varchar(35)").addColumn("last_exchanged_at", "varchar(35)").addColumn("device", "varchar(2048)", (t) => t.notNull()).addColumn("resource_servers", "varchar(2048)", (t) => t.notNull()).addColumn("rotating", "boolean", (t) => t.notNull()).execute();
|
|
4689
4760
|
}
|
|
4690
|
-
async function
|
|
4761
|
+
async function Tc(e) {
|
|
4691
4762
|
await e.schema.dropTable("sessions_2").execute(), await e.schema.dropTable("refresh_tokens_2").execute();
|
|
4692
4763
|
}
|
|
4693
|
-
const
|
|
4764
|
+
const Nc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4694
4765
|
__proto__: null,
|
|
4695
|
-
down:
|
|
4696
|
-
up:
|
|
4766
|
+
down: Tc,
|
|
4767
|
+
up: xc
|
|
4697
4768
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4698
|
-
async function
|
|
4769
|
+
async function bc(e) {
|
|
4699
4770
|
await e.schema.createTable("custom_domains").addColumn(
|
|
4700
4771
|
"custom_domain_id",
|
|
4701
4772
|
"varchar(21)",
|
|
@@ -4706,49 +4777,49 @@ async function yc(e) {
|
|
|
4706
4777
|
(t) => t.references("tenants.id").onDelete("cascade").notNull()
|
|
4707
4778
|
).addColumn("domain", "varchar(255)", (t) => t.notNull()).addColumn("primary", "boolean", (t) => t.notNull()).addColumn("status", "varchar(50)", (t) => t.notNull()).addColumn("type", "varchar(50)", (t) => t.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)", (t) => t.notNull()).addColumn("updated_at", "varchar(35)", (t) => t.notNull()).execute(), await e.schema.dropTable("domains").execute();
|
|
4708
4779
|
}
|
|
4709
|
-
async function
|
|
4780
|
+
async function Sc(e) {
|
|
4710
4781
|
await e.schema.dropTable("custom_domains").execute(), await e.schema.createTable("domains").addColumn("id", "varchar(255)", (t) => t.notNull().primaryKey()).addColumn(
|
|
4711
4782
|
"tenant_id",
|
|
4712
4783
|
"varchar(255)",
|
|
4713
4784
|
(t) => t.references("tenants.id").onDelete("cascade").notNull()
|
|
4714
4785
|
).addColumn("domain", "varchar(255)", (t) => t.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)", (t) => t.notNull()).addColumn("updated_at", "varchar(255)", (t) => t.notNull()).execute();
|
|
4715
4786
|
}
|
|
4716
|
-
const
|
|
4787
|
+
const Oc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4717
4788
|
__proto__: null,
|
|
4718
|
-
down:
|
|
4719
|
-
up:
|
|
4789
|
+
down: Sc,
|
|
4790
|
+
up: bc
|
|
4720
4791
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4721
|
-
async function
|
|
4792
|
+
async function kc(e) {
|
|
4722
4793
|
}
|
|
4723
|
-
async function
|
|
4794
|
+
async function $c(e) {
|
|
4724
4795
|
await e.schema.alterTable("logins").dropColumn("authParams_organization").dropColumn("authorization_url").execute();
|
|
4725
4796
|
}
|
|
4726
|
-
const
|
|
4797
|
+
const Ec = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4727
4798
|
__proto__: null,
|
|
4728
|
-
down:
|
|
4729
|
-
up:
|
|
4799
|
+
down: $c,
|
|
4800
|
+
up: kc
|
|
4730
4801
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4731
|
-
async function
|
|
4802
|
+
async function Ic(e) {
|
|
4732
4803
|
await e.schema.alterTable("logins").dropColumn("authorization_url").execute(), await e.schema.alterTable("logins").addColumn("authorization_url", "varchar(2048)").execute();
|
|
4733
4804
|
}
|
|
4734
|
-
async function
|
|
4805
|
+
async function zc(e) {
|
|
4735
4806
|
await e.schema.alterTable("logins").dropColumn("authorization_url").execute(), await e.schema.alterTable("logins").addColumn("authorization_url", "varchar(1024)").execute();
|
|
4736
4807
|
}
|
|
4737
|
-
const
|
|
4808
|
+
const Pc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4738
4809
|
__proto__: null,
|
|
4739
|
-
down:
|
|
4740
|
-
up:
|
|
4810
|
+
down: zc,
|
|
4811
|
+
up: Ic
|
|
4741
4812
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4742
|
-
async function
|
|
4813
|
+
async function Dc(e) {
|
|
4743
4814
|
}
|
|
4744
|
-
async function
|
|
4815
|
+
async function Ac(e) {
|
|
4745
4816
|
}
|
|
4746
|
-
const
|
|
4817
|
+
const jc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4747
4818
|
__proto__: null,
|
|
4748
|
-
down:
|
|
4749
|
-
up:
|
|
4819
|
+
down: Ac,
|
|
4820
|
+
up: Dc
|
|
4750
4821
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4751
|
-
async function
|
|
4822
|
+
async function Fc(e) {
|
|
4752
4823
|
await e.schema.createTable("sessions").addColumn("id", "varchar(21)", (t) => t.primaryKey()).addColumn("tenant_id", "varchar(255)").addColumn("user_id", "varchar(255)").addForeignKeyConstraint(
|
|
4753
4824
|
"sessions_user_id_constraint",
|
|
4754
4825
|
["user_id", "tenant_id"],
|
|
@@ -4775,25 +4846,25 @@ async function Ic(e) {
|
|
|
4775
4846
|
(t) => t.onDelete("cascade")
|
|
4776
4847
|
).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("expires_at", "varchar(35)").addColumn("idle_expires_at", "varchar(35)").addColumn("last_exchanged_at", "varchar(35)").addColumn("device", "varchar(2048)", (t) => t.notNull()).addColumn("resource_servers", "varchar(2048)", (t) => t.notNull()).addColumn("rotating", "boolean", (t) => t.notNull()).execute();
|
|
4777
4848
|
}
|
|
4778
|
-
async function
|
|
4849
|
+
async function Rc(e) {
|
|
4779
4850
|
await e.schema.dropTable("sessions").execute(), await e.schema.dropTable("login_sessions").execute(), await e.schema.dropTable("refresh_tokens").execute();
|
|
4780
4851
|
}
|
|
4781
|
-
const
|
|
4852
|
+
const Mc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4782
4853
|
__proto__: null,
|
|
4783
|
-
down:
|
|
4784
|
-
up:
|
|
4854
|
+
down: Rc,
|
|
4855
|
+
up: Fc
|
|
4785
4856
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4786
|
-
async function
|
|
4857
|
+
async function Jc(e) {
|
|
4787
4858
|
await e.schema.dropTable("logins").execute(), await e.schema.dropTable("sessions_2").execute(), await e.schema.dropTable("refresh_tokens_2").execute();
|
|
4788
4859
|
}
|
|
4789
|
-
async function
|
|
4860
|
+
async function Lc(e) {
|
|
4790
4861
|
}
|
|
4791
|
-
const
|
|
4862
|
+
const Kc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4792
4863
|
__proto__: null,
|
|
4793
|
-
down:
|
|
4794
|
-
up:
|
|
4864
|
+
down: Lc,
|
|
4865
|
+
up: Jc
|
|
4795
4866
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4796
|
-
async function
|
|
4867
|
+
async function qc(e) {
|
|
4797
4868
|
await e.schema.dropTable("custom_domains").execute(), await e.schema.createTable("custom_domains").addColumn(
|
|
4798
4869
|
"custom_domain_id",
|
|
4799
4870
|
"varchar(256)",
|
|
@@ -4804,54 +4875,28 @@ async function Fc(e) {
|
|
|
4804
4875
|
(t) => t.references("tenants.id").onDelete("cascade").notNull()
|
|
4805
4876
|
).addColumn("domain", "varchar(255)", (t) => t.notNull()).addColumn("primary", "boolean", (t) => t.notNull()).addColumn("status", "varchar(50)", (t) => t.notNull()).addColumn("type", "varchar(50)", (t) => t.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)", (t) => t.notNull()).addColumn("updated_at", "varchar(35)", (t) => t.notNull()).execute();
|
|
4806
4877
|
}
|
|
4807
|
-
async function
|
|
4808
|
-
}
|
|
4809
|
-
const Mc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4810
|
-
__proto__: null,
|
|
4811
|
-
down: Rc,
|
|
4812
|
-
up: Fc
|
|
4813
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
4814
|
-
async function Jc(e) {
|
|
4815
|
-
}
|
|
4816
|
-
async function Lc(e) {
|
|
4817
|
-
await e.schema.alterTable("users").dropColumn("phone_number").dropColumn("phone_verified").dropColumn("username").execute();
|
|
4878
|
+
async function Uc(e) {
|
|
4818
4879
|
}
|
|
4819
|
-
const
|
|
4880
|
+
const Bc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4820
4881
|
__proto__: null,
|
|
4821
|
-
down:
|
|
4822
|
-
up: Jc
|
|
4823
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
4824
|
-
async function qc(e) {
|
|
4825
|
-
await e.schema.createTable("forms").addColumn("id", "varchar(255)", (t) => t.primaryKey()).addColumn("name", "varchar(255)", (t) => t.notNull()).addColumn("tenant_id", "varchar(255)", (t) => t.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)", (t) => t.notNull()).addColumn("updated_at", "varchar(255)", (t) => t.notNull()).execute(), await e.schema.createIndex("forms_tenant_id_idx").on("forms").column("tenant_id").execute();
|
|
4826
|
-
}
|
|
4827
|
-
async function Bc(e) {
|
|
4828
|
-
await e.schema.dropTable("forms").execute();
|
|
4829
|
-
}
|
|
4830
|
-
const Uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4831
|
-
__proto__: null,
|
|
4832
|
-
down: Bc,
|
|
4882
|
+
down: Uc,
|
|
4833
4883
|
up: qc
|
|
4834
4884
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4835
4885
|
async function Qc(e) {
|
|
4836
|
-
await e.schema.alterTable("hooks").addColumn("form_id", "text").execute(), await e.schema.alterTable("hooks").addColumn("url_tmp", "varchar(512)").execute(), await e.updateTable("hooks").set((t) => ({ url_tmp: t.ref("url") })).execute(), await e.schema.alterTable("hooks").dropColumn("url").execute(), await e.schema.alterTable("hooks").renameColumn("url_tmp", "url").execute();
|
|
4837
4886
|
}
|
|
4838
|
-
async function
|
|
4839
|
-
await e.schema.
|
|
4887
|
+
async function Yc(e) {
|
|
4888
|
+
await e.schema.alterTable("users").dropColumn("phone_number").dropColumn("phone_verified").dropColumn("username").execute();
|
|
4840
4889
|
}
|
|
4841
|
-
const
|
|
4890
|
+
const Hc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4842
4891
|
__proto__: null,
|
|
4843
|
-
down:
|
|
4892
|
+
down: Yc,
|
|
4844
4893
|
up: Qc
|
|
4845
4894
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4846
|
-
async function Wc(e) {
|
|
4847
|
-
await e.schema.
|
|
4848
|
-
"login_completed",
|
|
4849
|
-
"boolean",
|
|
4850
|
-
(t) => t.notNull().defaultTo(0)
|
|
4851
|
-
).execute();
|
|
4895
|
+
async function Wc(e) {
|
|
4896
|
+
await e.schema.createTable("forms").addColumn("id", "varchar(255)", (t) => t.primaryKey()).addColumn("name", "varchar(255)", (t) => t.notNull()).addColumn("tenant_id", "varchar(255)", (t) => t.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)", (t) => t.notNull()).addColumn("updated_at", "varchar(255)", (t) => t.notNull()).execute(), await e.schema.createIndex("forms_tenant_id_idx").on("forms").column("tenant_id").execute();
|
|
4852
4897
|
}
|
|
4853
4898
|
async function Gc(e) {
|
|
4854
|
-
await e.schema.
|
|
4899
|
+
await e.schema.dropTable("forms").execute();
|
|
4855
4900
|
}
|
|
4856
4901
|
const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4857
4902
|
__proto__: null,
|
|
@@ -4859,14 +4904,10 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4859
4904
|
up: Wc
|
|
4860
4905
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4861
4906
|
async function Xc(e) {
|
|
4862
|
-
await e.schema.alterTable("
|
|
4863
|
-
"login_session_id",
|
|
4864
|
-
"varchar(21)",
|
|
4865
|
-
(t) => t.references("login_sessions.id").onDelete("set null")
|
|
4866
|
-
).execute();
|
|
4907
|
+
await e.schema.alterTable("hooks").addColumn("form_id", "text").execute(), await e.schema.alterTable("hooks").addColumn("url_tmp", "varchar(512)").execute(), await e.updateTable("hooks").set((t) => ({ url_tmp: t.ref("url") })).execute(), await e.schema.alterTable("hooks").dropColumn("url").execute(), await e.schema.alterTable("hooks").renameColumn("url_tmp", "url").execute();
|
|
4867
4908
|
}
|
|
4868
4909
|
async function Zc(e) {
|
|
4869
|
-
await e.schema.
|
|
4910
|
+
await e.schema.dropTable("hooks").ifExists().execute(), await e.schema.createTable("hooks").addColumn("hook_id", "text", (t) => t.primaryKey()).addColumn("tenant_id", "text", (t) => t.notNull()).addColumn("trigger_id", "text", (t) => t.notNull()).addColumn("enabled", "integer", (t) => t.notNull().defaultTo(0)).addColumn("url", "varchar(512)", (t) => t.notNull()).addColumn("synchronous", "integer", (t) => t.notNull().defaultTo(0)).addColumn("priority", "integer").addColumn("created_at", "text", (t) => t.notNull()).addColumn("updated_at", "text", (t) => t.notNull()).execute();
|
|
4870
4911
|
}
|
|
4871
4912
|
const el = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4872
4913
|
__proto__: null,
|
|
@@ -4874,10 +4915,14 @@ const el = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4874
4915
|
up: Xc
|
|
4875
4916
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4876
4917
|
async function tl(e) {
|
|
4877
|
-
await e.schema.
|
|
4918
|
+
await e.schema.alterTable("login_sessions").addColumn(
|
|
4919
|
+
"login_completed",
|
|
4920
|
+
"boolean",
|
|
4921
|
+
(t) => t.notNull().defaultTo(0)
|
|
4922
|
+
).execute();
|
|
4878
4923
|
}
|
|
4879
4924
|
async function al(e) {
|
|
4880
|
-
await e.schema.
|
|
4925
|
+
await e.schema.alterTable("login_sessions").dropColumn("login_completed").execute();
|
|
4881
4926
|
}
|
|
4882
4927
|
const nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4883
4928
|
__proto__: null,
|
|
@@ -4885,10 +4930,14 @@ const nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4885
4930
|
up: tl
|
|
4886
4931
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4887
4932
|
async function ol(e) {
|
|
4888
|
-
await e.schema.alterTable("
|
|
4933
|
+
await e.schema.alterTable("sessions").addColumn(
|
|
4934
|
+
"login_session_id",
|
|
4935
|
+
"varchar(21)",
|
|
4936
|
+
(t) => t.references("login_sessions.id").onDelete("set null")
|
|
4937
|
+
).execute();
|
|
4889
4938
|
}
|
|
4890
4939
|
async function rl(e) {
|
|
4891
|
-
await e.schema.alterTable("
|
|
4940
|
+
await e.schema.alterTable("sessions").dropColumn("login_session_id").execute();
|
|
4892
4941
|
}
|
|
4893
4942
|
const sl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4894
4943
|
__proto__: null,
|
|
@@ -4896,10 +4945,10 @@ const sl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4896
4945
|
up: ol
|
|
4897
4946
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4898
4947
|
async function il(e) {
|
|
4899
|
-
await e.schema.
|
|
4948
|
+
await e.schema.createIndex("IDX_sessions_login_session_id").on("sessions").column("login_session_id").execute();
|
|
4900
4949
|
}
|
|
4901
4950
|
async function cl(e) {
|
|
4902
|
-
await e.schema.
|
|
4951
|
+
await e.schema.dropIndex("IDX_sessions_login_session_id").on("sessions").execute();
|
|
4903
4952
|
}
|
|
4904
4953
|
const ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4905
4954
|
__proto__: null,
|
|
@@ -4907,10 +4956,10 @@ const ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4907
4956
|
up: il
|
|
4908
4957
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4909
4958
|
async function dl(e) {
|
|
4910
|
-
await e.schema.alterTable("codes").addColumn("
|
|
4959
|
+
await e.schema.alterTable("codes").addColumn("code_challenge", "varchar(128)").execute(), await e.schema.alterTable("codes").addColumn("code_challenge_method", "varchar(5)").execute();
|
|
4911
4960
|
}
|
|
4912
4961
|
async function ul(e) {
|
|
4913
|
-
await e.schema.alterTable("codes").dropColumn("
|
|
4962
|
+
await e.schema.alterTable("codes").dropColumn("code_challenge").execute(), await e.schema.alterTable("codes").dropColumn("code_challenge_method").execute();
|
|
4914
4963
|
}
|
|
4915
4964
|
const _l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4916
4965
|
__proto__: null,
|
|
@@ -4918,6 +4967,28 @@ const _l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4918
4967
|
up: dl
|
|
4919
4968
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4920
4969
|
async function ml(e) {
|
|
4970
|
+
await e.schema.alterTable("codes").addColumn("redirect_uri", "varchar(1024)").execute();
|
|
4971
|
+
}
|
|
4972
|
+
async function hl(e) {
|
|
4973
|
+
await e.schema.alterTable("codes").dropColumn("redirect_uri").execute();
|
|
4974
|
+
}
|
|
4975
|
+
const pl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4976
|
+
__proto__: null,
|
|
4977
|
+
down: hl,
|
|
4978
|
+
up: ml
|
|
4979
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
4980
|
+
async function fl(e) {
|
|
4981
|
+
await e.schema.alterTable("codes").addColumn("nonce", "varchar(1024)").execute(), await e.schema.alterTable("codes").addColumn("state", "varchar(2048)").execute();
|
|
4982
|
+
}
|
|
4983
|
+
async function gl(e) {
|
|
4984
|
+
await e.schema.alterTable("codes").dropColumn("nonce").execute(), await e.schema.alterTable("codes").dropColumn("state").execute();
|
|
4985
|
+
}
|
|
4986
|
+
const wl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4987
|
+
__proto__: null,
|
|
4988
|
+
down: gl,
|
|
4989
|
+
up: fl
|
|
4990
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
4991
|
+
async function yl(e) {
|
|
4921
4992
|
await e.schema.createTable("themes").addColumn(
|
|
4922
4993
|
"tenant_id",
|
|
4923
4994
|
"varchar(255)",
|
|
@@ -4992,26 +5063,26 @@ async function ml(e) {
|
|
|
4992
5063
|
(t) => t.notNull()
|
|
4993
5064
|
).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("updated_at", "varchar(35)", (t) => t.notNull()).addPrimaryKeyConstraint("themes_pkey", ["tenant_id", "themeId"]).execute(), await e.schema.createIndex("themes_tenant_id_idx").on("themes").column("tenant_id").execute();
|
|
4994
5065
|
}
|
|
4995
|
-
async function
|
|
5066
|
+
async function vl(e) {
|
|
4996
5067
|
await e.schema.dropTable("themes").execute();
|
|
4997
5068
|
}
|
|
4998
|
-
const
|
|
5069
|
+
const Cl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4999
5070
|
__proto__: null,
|
|
5000
|
-
down:
|
|
5001
|
-
up:
|
|
5071
|
+
down: vl,
|
|
5072
|
+
up: yl
|
|
5002
5073
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5003
|
-
async function
|
|
5074
|
+
async function xl(e) {
|
|
5004
5075
|
await e.schema.createTable("resource_servers").addColumn("id", "varchar(21)", (t) => t.notNull()).addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("identifier", "varchar(191)", (t) => t.notNull()).addColumn("name", "varchar(255)", (t) => t.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(35)", (t) => t.notNull()).addColumn("updated_at", "varchar(35)", (t) => t.notNull()).addPrimaryKeyConstraint("resource_servers_pk", ["tenant_id", "id"]).execute(), await e.schema.createIndex("resource_servers_tenant_identifier_uq").on("resource_servers").columns(["tenant_id", "identifier"]).unique().execute(), await e.schema.createTable("roles").addColumn("id", "varchar(21)", (t) => t.notNull()).addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("name", "varchar(50)", (t) => t.notNull()).addColumn("description", "varchar(255)").addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("updated_at", "varchar(35)", (t) => t.notNull()).addPrimaryKeyConstraint("roles_pk", ["tenant_id", "id"]).execute(), await e.schema.createIndex("roles_tenant_name_uq").on("roles").columns(["tenant_id", "name"]).unique().execute();
|
|
5005
5076
|
}
|
|
5006
|
-
async function
|
|
5077
|
+
async function Tl(e) {
|
|
5007
5078
|
await e.schema.dropTable("roles").execute(), await e.schema.dropTable("resource_servers").execute();
|
|
5008
5079
|
}
|
|
5009
|
-
const
|
|
5080
|
+
const Nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5010
5081
|
__proto__: null,
|
|
5011
|
-
down:
|
|
5012
|
-
up:
|
|
5082
|
+
down: Tl,
|
|
5083
|
+
up: xl
|
|
5013
5084
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5014
|
-
async function
|
|
5085
|
+
async function bl(e) {
|
|
5015
5086
|
await e.schema.createTable("role_permissions").addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("role_id", "varchar(21)", (t) => t.notNull()).addColumn(
|
|
5016
5087
|
"resource_server_identifier",
|
|
5017
5088
|
"varchar(191)",
|
|
@@ -5032,66 +5103,66 @@ async function yl(e) {
|
|
|
5032
5103
|
"permission_name"
|
|
5033
5104
|
]).execute(), await e.schema.createIndex("user_permissions_user_fk").on("user_permissions").columns(["tenant_id", "user_id"]).execute(), await e.schema.createIndex("user_permissions_permission_fk").on("user_permissions").columns(["tenant_id", "resource_server_identifier", "permission_name"]).execute();
|
|
5034
5105
|
}
|
|
5035
|
-
async function
|
|
5106
|
+
async function Sl(e) {
|
|
5036
5107
|
await e.schema.dropTable("user_permissions").execute(), await e.schema.dropTable("role_permissions").execute();
|
|
5037
5108
|
}
|
|
5038
|
-
const
|
|
5109
|
+
const Ol = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5039
5110
|
__proto__: null,
|
|
5040
|
-
down:
|
|
5041
|
-
up:
|
|
5111
|
+
down: Sl,
|
|
5112
|
+
up: bl
|
|
5042
5113
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5043
|
-
async function
|
|
5114
|
+
async function kl(e) {
|
|
5044
5115
|
await e.schema.createTable("user_roles").addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("user_id", "varchar(191)", (t) => t.notNull()).addColumn("role_id", "varchar(21)", (t) => t.notNull()).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addPrimaryKeyConstraint("user_roles_pk", [
|
|
5045
5116
|
"tenant_id",
|
|
5046
5117
|
"user_id",
|
|
5047
5118
|
"role_id"
|
|
5048
5119
|
]).execute(), await e.schema.createIndex("user_roles_user_fk").on("user_roles").columns(["tenant_id", "user_id"]).execute(), await e.schema.createIndex("user_roles_role_fk").on("user_roles").columns(["tenant_id", "role_id"]).execute();
|
|
5049
5120
|
}
|
|
5050
|
-
async function
|
|
5121
|
+
async function $l(e) {
|
|
5051
5122
|
await e.schema.dropTable("user_roles").execute();
|
|
5052
5123
|
}
|
|
5053
|
-
const
|
|
5124
|
+
const El = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5054
5125
|
__proto__: null,
|
|
5055
|
-
down:
|
|
5056
|
-
up:
|
|
5126
|
+
down: $l,
|
|
5127
|
+
up: kl
|
|
5057
5128
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5058
|
-
async function
|
|
5129
|
+
async function Il(e) {
|
|
5059
5130
|
}
|
|
5060
|
-
async function
|
|
5131
|
+
async function zl(e) {
|
|
5061
5132
|
await e.schema.alterTable("keys").dropColumn("connection").execute(), await e.schema.alterTable("keys").modifyColumn("cert", "varchar(2048)").execute(), await e.schema.alterTable("keys").modifyColumn("pkcs7", "varchar(2048)").execute(), await e.schema.alterTable("keys").dropColumn("type").execute();
|
|
5062
5133
|
}
|
|
5063
|
-
const
|
|
5134
|
+
const Pl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5064
5135
|
__proto__: null,
|
|
5065
|
-
down:
|
|
5066
|
-
up:
|
|
5136
|
+
down: zl,
|
|
5137
|
+
up: Il
|
|
5067
5138
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5068
|
-
async function
|
|
5139
|
+
async function Dl(e) {
|
|
5069
5140
|
await e.schema.createTable("organizations").addColumn("id", "varchar(21)", (t) => t.primaryKey()).addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("name", "varchar(256)", (t) => t.notNull()).addColumn("display_name", "varchar(256)").addColumn("branding", "text").addColumn("metadata", "text").addColumn("enabled_connections", "text").addColumn("token_quota", "text").addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("updated_at", "varchar(35)", (t) => t.notNull()).execute(), await e.schema.createIndex("idx_organizations_tenant_id").on("organizations").column("tenant_id").execute(), await e.schema.createIndex("idx_organizations_tenant_name_unique").on("organizations").columns(["tenant_id", "name"]).unique().execute();
|
|
5070
5141
|
}
|
|
5071
|
-
async function
|
|
5142
|
+
async function Al(e) {
|
|
5072
5143
|
await e.schema.dropTable("organizations").execute();
|
|
5073
5144
|
}
|
|
5074
|
-
const
|
|
5145
|
+
const jl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5075
5146
|
__proto__: null,
|
|
5076
|
-
down:
|
|
5077
|
-
up:
|
|
5147
|
+
down: Al,
|
|
5148
|
+
up: Dl
|
|
5078
5149
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5079
|
-
async function
|
|
5150
|
+
async function Fl(e) {
|
|
5080
5151
|
await e.schema.createTable("user_organizations").addColumn("id", "varchar(21)", (t) => t.primaryKey()).addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("user_id", "varchar(191)", (t) => t.notNull()).addColumn("organization_id", "varchar(21)", (t) => t.notNull()).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("updated_at", "varchar(35)", (t) => t.notNull()).addUniqueConstraint("user_organizations_unique", [
|
|
5081
5152
|
"tenant_id",
|
|
5082
5153
|
"user_id",
|
|
5083
5154
|
"organization_id"
|
|
5084
5155
|
]).execute(), await e.schema.createIndex("idx_user_organizations_tenant_id").on("user_organizations").column("tenant_id").execute(), await e.schema.createIndex("idx_user_organizations_user_id").on("user_organizations").column("user_id").execute(), await e.schema.createIndex("idx_user_organizations_organization_id").on("user_organizations").column("organization_id").execute();
|
|
5085
5156
|
}
|
|
5086
|
-
async function
|
|
5157
|
+
async function Rl(e) {
|
|
5087
5158
|
await e.schema.dropTable("user_organizations").execute();
|
|
5088
5159
|
}
|
|
5089
|
-
const
|
|
5160
|
+
const Ml = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5090
5161
|
__proto__: null,
|
|
5091
|
-
down:
|
|
5092
|
-
up:
|
|
5162
|
+
down: Rl,
|
|
5163
|
+
up: Fl
|
|
5093
5164
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5094
|
-
async function
|
|
5165
|
+
async function Jl(e) {
|
|
5095
5166
|
await e.schema.dropTable("user_permissions").execute(), await e.schema.dropTable("user_roles").execute(), await e.schema.createTable("user_permissions").addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("user_id", "varchar(191)", (t) => t.notNull()).addColumn(
|
|
5096
5167
|
"resource_server_identifier",
|
|
5097
5168
|
"varchar(21)",
|
|
@@ -5117,7 +5188,7 @@ async function Dl(e) {
|
|
|
5117
5188
|
"organization_id"
|
|
5118
5189
|
]).execute(), await e.schema.createIndex("user_roles_user_fk").on("user_roles").columns(["tenant_id", "user_id"]).execute(), await e.schema.createIndex("user_roles_role_fk").on("user_roles").columns(["tenant_id", "role_id"]).execute(), await e.schema.createIndex("user_roles_organization_fk").on("user_roles").column("organization_id").execute();
|
|
5119
5190
|
}
|
|
5120
|
-
async function
|
|
5191
|
+
async function Ll(e) {
|
|
5121
5192
|
await e.schema.dropTable("user_permissions").execute(), await e.schema.dropTable("user_roles").execute(), await e.schema.createTable("user_permissions").addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("user_id", "varchar(191)", (t) => t.notNull()).addColumn(
|
|
5122
5193
|
"resource_server_identifier",
|
|
5123
5194
|
"varchar(191)",
|
|
@@ -5133,12 +5204,12 @@ async function Al(e) {
|
|
|
5133
5204
|
"role_id"
|
|
5134
5205
|
]).execute(), await e.schema.createIndex("user_roles_user_fk").on("user_roles").columns(["tenant_id", "user_id"]).execute(), await e.schema.createIndex("user_roles_role_fk").on("user_roles").columns(["tenant_id", "role_id"]).execute();
|
|
5135
5206
|
}
|
|
5136
|
-
const
|
|
5207
|
+
const Kl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5137
5208
|
__proto__: null,
|
|
5138
|
-
down:
|
|
5139
|
-
up:
|
|
5209
|
+
down: Ll,
|
|
5210
|
+
up: Jl
|
|
5140
5211
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5141
|
-
async function
|
|
5212
|
+
async function ql(e) {
|
|
5142
5213
|
await e.schema.createTable("clients").addColumn("client_id", "varchar(191)", (t) => t.notNull()).addColumn(
|
|
5143
5214
|
"tenant_id",
|
|
5144
5215
|
"varchar(191)",
|
|
@@ -5180,13 +5251,13 @@ async function Fl(e) {
|
|
|
5180
5251
|
"client_id"
|
|
5181
5252
|
]).execute();
|
|
5182
5253
|
}
|
|
5183
|
-
async function
|
|
5254
|
+
async function Ul(e) {
|
|
5184
5255
|
await e.schema.dropTable("clients").execute();
|
|
5185
5256
|
}
|
|
5186
|
-
const
|
|
5257
|
+
const Bl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5187
5258
|
__proto__: null,
|
|
5188
|
-
down:
|
|
5189
|
-
up:
|
|
5259
|
+
down: Ul,
|
|
5260
|
+
up: ql
|
|
5190
5261
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5191
5262
|
async function ye(e) {
|
|
5192
5263
|
try {
|
|
@@ -5195,10 +5266,10 @@ async function ye(e) {
|
|
|
5195
5266
|
return "sqlite";
|
|
5196
5267
|
}
|
|
5197
5268
|
}
|
|
5198
|
-
async function
|
|
5199
|
-
await ye(e) === "mysql" ? await
|
|
5269
|
+
async function Ql(e) {
|
|
5270
|
+
await ye(e) === "mysql" ? await Yl(e) : await Hl(e);
|
|
5200
5271
|
}
|
|
5201
|
-
async function
|
|
5272
|
+
async function Yl(e) {
|
|
5202
5273
|
await e.transaction().execute(async (t) => {
|
|
5203
5274
|
const a = await h`
|
|
5204
5275
|
SELECT
|
|
@@ -5279,7 +5350,7 @@ async function Ll(e) {
|
|
|
5279
5350
|
FROM login_sessions_backup`.execute(t), await h`DROP TABLE sessions_backup`.execute(t), await h`DROP TABLE login_sessions_backup`.execute(t), await h`DROP TABLE refresh_tokens_backup`.execute(t);
|
|
5280
5351
|
});
|
|
5281
5352
|
}
|
|
5282
|
-
async function
|
|
5353
|
+
async function Hl(e) {
|
|
5283
5354
|
await e.transaction().execute(async (t) => {
|
|
5284
5355
|
const a = [
|
|
5285
5356
|
"sessions_backup",
|
|
@@ -5345,10 +5416,10 @@ async function Kl(e) {
|
|
|
5345
5416
|
FROM login_sessions_backup`.execute(t), await h`DROP TABLE sessions_backup`.execute(t), await h`DROP TABLE login_sessions_backup`.execute(t), await h`DROP TABLE refresh_tokens_backup`.execute(t);
|
|
5346
5417
|
});
|
|
5347
5418
|
}
|
|
5348
|
-
async function
|
|
5349
|
-
await ye(e) === "mysql" ? await
|
|
5419
|
+
async function Wl(e) {
|
|
5420
|
+
await ye(e) === "mysql" ? await Gl(e) : await Vl(e);
|
|
5350
5421
|
}
|
|
5351
|
-
async function
|
|
5422
|
+
async function Gl(e) {
|
|
5352
5423
|
await e.transaction().execute(async (t) => {
|
|
5353
5424
|
await h`ALTER TABLE refresh_tokens DROP FOREIGN KEY refresh_tokens_client_fk`.execute(
|
|
5354
5425
|
t
|
|
@@ -5365,7 +5436,7 @@ async function Bl(e) {
|
|
|
5365
5436
|
);
|
|
5366
5437
|
});
|
|
5367
5438
|
}
|
|
5368
|
-
async function
|
|
5439
|
+
async function Vl(e) {
|
|
5369
5440
|
await e.transaction().execute(async (t) => {
|
|
5370
5441
|
await h`CREATE TABLE refresh_tokens_temp AS SELECT * FROM refresh_tokens`.execute(
|
|
5371
5442
|
t
|
|
@@ -5395,12 +5466,12 @@ async function Ul(e) {
|
|
|
5395
5466
|
FROM login_sessions_temp`.execute(t), await h`DROP TABLE login_sessions_temp`.execute(t);
|
|
5396
5467
|
});
|
|
5397
5468
|
}
|
|
5398
|
-
const
|
|
5469
|
+
const Xl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5399
5470
|
__proto__: null,
|
|
5400
|
-
down:
|
|
5401
|
-
up:
|
|
5471
|
+
down: Wl,
|
|
5472
|
+
up: Ql
|
|
5402
5473
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5403
|
-
async function
|
|
5474
|
+
async function Zl(e) {
|
|
5404
5475
|
await e.schema.createTable("client_grants").addColumn("id", "varchar(21)", (t) => t.notNull()).addColumn(
|
|
5405
5476
|
"tenant_id",
|
|
5406
5477
|
"varchar(191)",
|
|
@@ -5417,89 +5488,89 @@ async function Hl(e) {
|
|
|
5417
5488
|
(t) => t.onDelete("cascade")
|
|
5418
5489
|
).execute(), await e.schema.createIndex("uq_client_grants_tenant_client_audience").on("client_grants").columns(["tenant_id", "client_id", "audience"]).unique().execute(), await e.schema.createIndex("idx_client_grants_audience").on("client_grants").columns(["audience"]).execute();
|
|
5419
5490
|
}
|
|
5420
|
-
async function
|
|
5491
|
+
async function ed(e) {
|
|
5421
5492
|
await e.schema.dropTable("client_grants").execute();
|
|
5422
5493
|
}
|
|
5423
|
-
const
|
|
5494
|
+
const td = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5424
5495
|
__proto__: null,
|
|
5425
|
-
down:
|
|
5426
|
-
up:
|
|
5496
|
+
down: ed,
|
|
5497
|
+
up: Zl
|
|
5427
5498
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5428
|
-
async function
|
|
5499
|
+
async function ad(e) {
|
|
5429
5500
|
await e.schema.dropTable("applications").execute();
|
|
5430
5501
|
}
|
|
5431
|
-
async function
|
|
5502
|
+
async function nd(e) {
|
|
5432
5503
|
await e.schema.createTable("applications").addColumn("id", "varchar(21)", (t) => t.notNull()).addColumn(
|
|
5433
5504
|
"tenant_id",
|
|
5434
5505
|
"varchar(191)",
|
|
5435
5506
|
(t) => t.notNull().references("tenants.id").onDelete("cascade")
|
|
5436
5507
|
).addColumn("name", "varchar(255)", (t) => t.notNull()).addColumn("client_secret", "varchar(255)").addColumn("callbacks", "text", (t) => t.defaultTo("[]")).addColumn("allowed_origins", "text", (t) => t.defaultTo("[]")).addColumn("web_origins", "text", (t) => t.defaultTo("[]")).addColumn("allowed_logout_urls", "text", (t) => t.defaultTo("[]")).addColumn("allowed_clients", "text", (t) => t.defaultTo("[]")).addColumn("disable_sign_ups", "integer", (t) => t.defaultTo(0)).addColumn("addons", "text", (t) => t.defaultTo("{}")).addColumn("client_metadata", "text", (t) => t.defaultTo("{}")).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("updated_at", "varchar(35)", (t) => t.notNull()).addPrimaryKeyConstraint("pk_applications", ["tenant_id", "id"]).execute(), await e.schema.createIndex("idx_applications_tenant_id").on("applications").columns(["tenant_id"]).execute();
|
|
5437
5508
|
}
|
|
5438
|
-
const
|
|
5509
|
+
const od = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5439
5510
|
__proto__: null,
|
|
5440
|
-
down:
|
|
5441
|
-
up:
|
|
5511
|
+
down: nd,
|
|
5512
|
+
up: ad
|
|
5442
5513
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5443
|
-
async function
|
|
5514
|
+
async function rd(e) {
|
|
5444
5515
|
await e.schema.createIndex("users_phone_tenant_provider_index").on("users").columns(["tenant_id", "phone_number", "provider"]).execute();
|
|
5445
5516
|
}
|
|
5446
|
-
async function
|
|
5517
|
+
async function sd(e) {
|
|
5447
5518
|
await e.schema.dropIndex("users_phone_tenant_provider_index").execute();
|
|
5448
5519
|
}
|
|
5449
|
-
const
|
|
5520
|
+
const id = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5450
5521
|
__proto__: null,
|
|
5451
|
-
down:
|
|
5452
|
-
up:
|
|
5522
|
+
down: sd,
|
|
5523
|
+
up: rd
|
|
5453
5524
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5454
|
-
async function
|
|
5525
|
+
async function cd(e) {
|
|
5455
5526
|
await e.schema.createIndex("login_sessions_id_index").on("login_sessions").column("id").execute();
|
|
5456
5527
|
}
|
|
5457
|
-
async function
|
|
5528
|
+
async function ld(e) {
|
|
5458
5529
|
await e.schema.dropIndex("login_sessions_id_index").execute();
|
|
5459
5530
|
}
|
|
5460
|
-
const
|
|
5531
|
+
const dd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5461
5532
|
__proto__: null,
|
|
5462
|
-
down:
|
|
5463
|
-
up:
|
|
5533
|
+
down: ld,
|
|
5534
|
+
up: cd
|
|
5464
5535
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5465
|
-
async function
|
|
5536
|
+
async function ud(e) {
|
|
5466
5537
|
await e.schema.createIndex("connections_tenant_id_index").on("connections").column("tenant_id").execute();
|
|
5467
5538
|
}
|
|
5468
|
-
async function
|
|
5539
|
+
async function _d(e) {
|
|
5469
5540
|
await e.schema.dropIndex("connections_tenant_id_index").execute();
|
|
5470
5541
|
}
|
|
5471
|
-
const
|
|
5542
|
+
const md = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5472
5543
|
__proto__: null,
|
|
5473
|
-
down:
|
|
5474
|
-
up:
|
|
5544
|
+
down: _d,
|
|
5545
|
+
up: ud
|
|
5475
5546
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5476
|
-
async function
|
|
5547
|
+
async function hd(e) {
|
|
5477
5548
|
await e.schema.dropIndex("idx_user_organizations_tenant_id").execute();
|
|
5478
5549
|
}
|
|
5479
|
-
async function
|
|
5550
|
+
async function pd(e) {
|
|
5480
5551
|
await e.schema.createIndex("idx_user_organizations_tenant_id").on("user_organizations").column("tenant_id").execute();
|
|
5481
5552
|
}
|
|
5482
|
-
const
|
|
5553
|
+
const fd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5483
5554
|
__proto__: null,
|
|
5484
|
-
down:
|
|
5485
|
-
up:
|
|
5555
|
+
down: pd,
|
|
5556
|
+
up: hd
|
|
5486
5557
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5487
|
-
async function
|
|
5558
|
+
async function gd(e) {
|
|
5488
5559
|
await e.schema.createTable("tenant_settings").addColumn(
|
|
5489
5560
|
"tenant_id",
|
|
5490
5561
|
"varchar(191)",
|
|
5491
5562
|
(t) => t.references("tenants.id").onDelete("cascade").notNull().primaryKey()
|
|
5492
5563
|
).addColumn("idle_session_lifetime", "integer").addColumn("session_lifetime", "integer").addColumn("session_cookie", "text").addColumn("enable_client_connections", "integer").addColumn("default_redirection_uri", "text").addColumn("enabled_locales", "text").addColumn("default_directory", "varchar(255)").addColumn("error_page", "text").addColumn("flags", "text").addColumn("friendly_name", "varchar(255)").addColumn("picture_url", "text").addColumn("support_email", "varchar(255)").addColumn("support_url", "text").addColumn("sandbox_version", "varchar(50)").addColumn("sandbox_versions_available", "text").addColumn("change_password", "text").addColumn("guardian_mfa_page", "text").addColumn("default_audience", "varchar(255)").addColumn("default_organization", "varchar(255)").addColumn("sessions", "text").execute();
|
|
5493
5564
|
}
|
|
5494
|
-
async function
|
|
5565
|
+
async function wd(e) {
|
|
5495
5566
|
await e.schema.dropTable("tenant_settings").execute();
|
|
5496
5567
|
}
|
|
5497
|
-
const
|
|
5568
|
+
const yd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5498
5569
|
__proto__: null,
|
|
5499
|
-
down:
|
|
5500
|
-
up:
|
|
5570
|
+
down: wd,
|
|
5571
|
+
up: gd
|
|
5501
5572
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5502
|
-
async function
|
|
5573
|
+
async function vd(e) {
|
|
5503
5574
|
if (await e.schema.alterTable("tenants").addColumn("idle_session_lifetime", "integer").execute(), await e.schema.alterTable("tenants").addColumn("session_lifetime", "integer").execute(), await e.schema.alterTable("tenants").addColumn("session_cookie", "text").execute(), await e.schema.alterTable("tenants").addColumn("allowed_logout_urls", "text").execute(), await e.schema.alterTable("tenants").addColumn("ephemeral_session_lifetime", "integer").execute(), await e.schema.alterTable("tenants").addColumn("idle_ephemeral_session_lifetime", "integer").execute(), await e.schema.alterTable("tenants").addColumn("default_redirection_uri", "text").execute(), await e.schema.alterTable("tenants").addColumn("enabled_locales", "text").execute(), await e.schema.alterTable("tenants").addColumn("default_directory", "varchar(255)").execute(), await e.schema.alterTable("tenants").addColumn("error_page", "text").execute(), await e.schema.alterTable("tenants").addColumn("flags", "text").execute(), await e.schema.alterTable("tenants").addColumn("friendly_name", "varchar(255)").execute(), await e.schema.alterTable("tenants").addColumn("picture_url", "text").execute(), await e.schema.alterTable("tenants").addColumn("support_email", "varchar(255)").execute(), await e.schema.alterTable("tenants").addColumn("sandbox_version", "varchar(50)").execute(), await e.schema.alterTable("tenants").addColumn("sandbox_versions_available", "text").execute(), await e.schema.alterTable("tenants").addColumn("legacy_sandbox_version", "varchar(50)").execute(), await e.schema.alterTable("tenants").addColumn("change_password", "text").execute(), await e.schema.alterTable("tenants").addColumn("guardian_mfa_page", "text").execute(), await e.schema.alterTable("tenants").addColumn("device_flow", "text").execute(), await e.schema.alterTable("tenants").addColumn("default_token_quota", "text").execute(), await e.schema.alterTable("tenants").addColumn("default_audience", "varchar(255)").execute(), await e.schema.alterTable("tenants").addColumn("default_organization", "varchar(255)").execute(), await e.schema.alterTable("tenants").addColumn("sessions", "text").execute(), await e.schema.alterTable("tenants").addColumn("oidc_logout", "text").execute(), await e.schema.alterTable("tenants").addColumn("allow_organization_name_in_authentication_api", "integer").execute(), await e.schema.alterTable("tenants").addColumn("customize_mfa_in_postlogin_action", "integer").execute(), await e.schema.alterTable("tenants").addColumn("acr_values_supported", "text").execute(), await e.schema.alterTable("tenants").addColumn("mtls", "text").execute(), await e.schema.alterTable("tenants").addColumn("pushed_authorization_requests_supported", "integer").execute(), await e.schema.alterTable("tenants").addColumn("authorization_response_iss_parameter_supported", "integer").execute(), await e.updateTable("tenants").set({
|
|
5504
5575
|
friendly_name: h`name`
|
|
5505
5576
|
}).execute(), await e.schema.alterTable("tenants").dropColumn("language").execute(), await e.schema.alterTable("tenants").dropColumn("logo").execute(), await e.schema.alterTable("tenants").dropColumn("primary_color").execute(), await e.schema.alterTable("tenants").dropColumn("secondary_color").execute(), await e.schema.alterTable("tenants").dropColumn("name").execute(), (await e.selectFrom("tenant_settings").select("tenant_id").limit(1).execute()).length > 0) {
|
|
@@ -5530,7 +5601,7 @@ async function hd(e) {
|
|
|
5530
5601
|
}
|
|
5531
5602
|
await e.schema.dropTable("tenant_settings").execute();
|
|
5532
5603
|
}
|
|
5533
|
-
async function
|
|
5604
|
+
async function Cd(e) {
|
|
5534
5605
|
await e.schema.createTable("tenant_settings").addColumn(
|
|
5535
5606
|
"tenant_id",
|
|
5536
5607
|
"varchar(191)",
|
|
@@ -5587,45 +5658,45 @@ async function pd(e) {
|
|
|
5587
5658
|
name: h`COALESCE(friendly_name, id)`
|
|
5588
5659
|
}).execute(), await e.schema.alterTable("tenants").addColumn("language", "varchar(255)").execute(), await e.schema.alterTable("tenants").addColumn("logo", "text").execute(), await e.schema.alterTable("tenants").addColumn("primary_color", "varchar(50)").execute(), await e.schema.alterTable("tenants").addColumn("secondary_color", "varchar(50)").execute();
|
|
5589
5660
|
}
|
|
5590
|
-
const
|
|
5661
|
+
const xd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5591
5662
|
__proto__: null,
|
|
5592
|
-
down:
|
|
5593
|
-
up:
|
|
5663
|
+
down: Cd,
|
|
5664
|
+
up: vd
|
|
5594
5665
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5595
|
-
async function
|
|
5666
|
+
async function Td(e) {
|
|
5596
5667
|
await e.schema.createTable("invites").addColumn("id", "varchar(21)", (t) => t.primaryKey()).addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("organization_id", "varchar(21)", (t) => t.notNull()).addColumn("inviter", "text", (t) => t.notNull()).addColumn("invitee", "text", (t) => t.notNull()).addColumn("client_id", "varchar(191)", (t) => t.notNull()).addColumn("connection_id", "varchar(21)").addColumn("invitation_url", "text", (t) => t.notNull()).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("expires_at", "varchar(35)", (t) => t.notNull()).addColumn("app_metadata", "text").addColumn("user_metadata", "text").addColumn("roles", "text").addColumn("ticket_id", "varchar(191)").addColumn("ttl_sec", "integer").addColumn("send_invitation_email", "integer").execute(), await e.schema.createIndex("idx_invites_tenant_id").on("invites").column("tenant_id").execute(), await e.schema.createIndex("idx_invites_organization_id").on("invites").column("organization_id").execute(), await e.schema.createIndex("idx_invites_expires_at").on("invites").column("expires_at").execute(), await e.schema.createIndex("idx_invites_tenant_created").on("invites").columns(["tenant_id", "created_at"]).execute();
|
|
5597
5668
|
}
|
|
5598
|
-
async function
|
|
5669
|
+
async function Nd(e) {
|
|
5599
5670
|
await e.schema.dropTable("invites").execute();
|
|
5600
5671
|
}
|
|
5601
|
-
const
|
|
5672
|
+
const bd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5602
5673
|
__proto__: null,
|
|
5603
|
-
down:
|
|
5604
|
-
up:
|
|
5674
|
+
down: Nd,
|
|
5675
|
+
up: Td
|
|
5605
5676
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5606
|
-
async function
|
|
5677
|
+
async function Sd(e) {
|
|
5607
5678
|
await e.schema.dropTable("logs").ifExists().execute(), await e.schema.createTable("logs").addColumn("log_id", "varchar(21)", (t) => t.primaryKey().notNull()).addColumn("category", "varchar(255)").addColumn("tenant_id", "varchar(64)").addColumn("user_id", "varchar(64)").addColumn("ip", "varchar(255)").addColumn("type", "varchar(8)", (t) => t.notNull()).addColumn("date", "varchar(25)", (t) => t.notNull()).addColumn("client_id", "varchar(255)").addColumn("client_name", "varchar(255)").addColumn("user_agent", "varchar(255)").addColumn("description", "varchar(255)").addColumn("details", "varchar(2048)").addColumn("isMobile", "integer").addColumn("user_name", "varchar(255)").addColumn("connection", "varchar(255)").addColumn("connection_id", "varchar(255)").addColumn("audience", "varchar(255)").addColumn("scope", "varchar(255)").addColumn("strategy", "varchar(255)").addColumn("strategy_type", "varchar(255)").addColumn("hostname", "varchar(255)").addColumn("auth0_client", "varchar(8192)").addColumn("session_connection", "varchar(255)").execute();
|
|
5608
5679
|
}
|
|
5609
|
-
async function
|
|
5680
|
+
async function Od(e) {
|
|
5610
5681
|
await e.schema.dropTable("logs").ifExists().execute(), await e.schema.createTable("logs").addColumn("id", "varchar(255)", (t) => t.primaryKey().notNull()).addColumn("category", "varchar(255)", (t) => t.notNull()).addColumn("tenant_id", "varchar(64)").addColumn("user_id", "varchar(64)").addColumn("ip", "varchar(255)").addColumn("type", "varchar(8)", (t) => t.notNull()).addColumn("date", "varchar(25)", (t) => t.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();
|
|
5611
5682
|
}
|
|
5612
|
-
const
|
|
5683
|
+
const kd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5613
5684
|
__proto__: null,
|
|
5614
|
-
down:
|
|
5615
|
-
up:
|
|
5685
|
+
down: Od,
|
|
5686
|
+
up: Sd
|
|
5616
5687
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5617
|
-
async function
|
|
5688
|
+
async function $d(e) {
|
|
5618
5689
|
await e.schema.alterTable("logs").addColumn("country_code", "varchar(2)").execute(), await e.schema.alterTable("logs").addColumn("city_name", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("latitude", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("longitude", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("time_zone", "varchar(255)").execute(), await e.schema.alterTable("logs").addColumn("continent_code", "varchar(2)").execute();
|
|
5619
5690
|
}
|
|
5620
|
-
async function
|
|
5691
|
+
async function Ed(e) {
|
|
5621
5692
|
await e.schema.alterTable("logs").dropColumn("country_code").execute(), await e.schema.alterTable("logs").dropColumn("city_name").execute(), await e.schema.alterTable("logs").dropColumn("latitude").execute(), await e.schema.alterTable("logs").dropColumn("longitude").execute(), await e.schema.alterTable("logs").dropColumn("time_zone").execute(), await e.schema.alterTable("logs").dropColumn("continent_code").execute();
|
|
5622
5693
|
}
|
|
5623
|
-
const
|
|
5694
|
+
const Id = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5624
5695
|
__proto__: null,
|
|
5625
|
-
down:
|
|
5626
|
-
up:
|
|
5696
|
+
down: Ed,
|
|
5697
|
+
up: $d
|
|
5627
5698
|
}, Symbol.toStringTag, { value: "Module" })), F = 1e3;
|
|
5628
|
-
async function
|
|
5699
|
+
async function zd(e) {
|
|
5629
5700
|
await e.schema.createTable("password_history").addColumn("id", "varchar(21)", (n) => n.primaryKey()).addColumn("user_id", "varchar(191)", (n) => n.notNull()).addColumn(
|
|
5630
5701
|
"tenant_id",
|
|
5631
5702
|
"varchar(191)",
|
|
@@ -5670,7 +5741,7 @@ async function Sd(e) {
|
|
|
5670
5741
|
}
|
|
5671
5742
|
await e.schema.alterTable("passwords").renameTo("passwords_backup").execute(), await e.schema.alterTable("password_history").renameTo("passwords").execute();
|
|
5672
5743
|
}
|
|
5673
|
-
async function
|
|
5744
|
+
async function Pd(e) {
|
|
5674
5745
|
await e.schema.alterTable("passwords").renameTo("password_history").execute();
|
|
5675
5746
|
try {
|
|
5676
5747
|
await e.schema.alterTable("passwords_backup").renameTo("passwords").execute();
|
|
@@ -5718,56 +5789,56 @@ async function Od(e) {
|
|
|
5718
5789
|
}
|
|
5719
5790
|
await e.schema.dropTable("password_history").execute();
|
|
5720
5791
|
}
|
|
5721
|
-
const
|
|
5792
|
+
const Dd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5722
5793
|
__proto__: null,
|
|
5723
|
-
down:
|
|
5724
|
-
up:
|
|
5794
|
+
down: Pd,
|
|
5795
|
+
up: zd
|
|
5725
5796
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5726
|
-
async function
|
|
5797
|
+
async function Ad(e) {
|
|
5727
5798
|
await e.schema.alterTable("connections").addColumn("display_name", "varchar(255)").execute(), await e.schema.alterTable("connections").addColumn("is_domain_connection", "integer").execute(), await e.schema.alterTable("connections").addColumn("show_as_button", "integer").execute(), await e.schema.alterTable("connections").addColumn("metadata", "varchar(4096)").execute();
|
|
5728
5799
|
}
|
|
5729
|
-
async function
|
|
5800
|
+
async function jd(e) {
|
|
5730
5801
|
await e.schema.alterTable("connections").dropColumn("display_name").execute(), await e.schema.alterTable("connections").dropColumn("is_domain_connection").execute(), await e.schema.alterTable("connections").dropColumn("show_as_button").execute(), await e.schema.alterTable("connections").dropColumn("metadata").execute();
|
|
5731
5802
|
}
|
|
5732
|
-
const
|
|
5803
|
+
const Fd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5733
5804
|
__proto__: null,
|
|
5734
|
-
down:
|
|
5735
|
-
up:
|
|
5805
|
+
down: jd,
|
|
5806
|
+
up: Ad
|
|
5736
5807
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5737
|
-
async function
|
|
5808
|
+
async function Rd(e) {
|
|
5738
5809
|
await e.schema.alterTable("clients").addColumn("connections", "text", (t) => t.notNull().defaultTo("[]")).execute();
|
|
5739
5810
|
}
|
|
5740
|
-
async function
|
|
5811
|
+
async function Md(e) {
|
|
5741
5812
|
await e.schema.alterTable("clients").dropColumn("connections").execute();
|
|
5742
5813
|
}
|
|
5743
|
-
const
|
|
5814
|
+
const Jd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5744
5815
|
__proto__: null,
|
|
5745
|
-
down:
|
|
5746
|
-
up:
|
|
5816
|
+
down: Md,
|
|
5817
|
+
up: Rd
|
|
5747
5818
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5748
|
-
async function
|
|
5819
|
+
async function Ld(e) {
|
|
5749
5820
|
await e.schema.createTable("flows").addColumn("id", "varchar(24)", (t) => t.primaryKey()).addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("name", "varchar(150)", (t) => t.notNull()).addColumn("actions", "text").addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("updated_at", "varchar(35)", (t) => t.notNull()).execute(), await e.schema.createIndex("flows_tenant_id_idx").on("flows").column("tenant_id").execute(), await e.schema.dropTable("passwords_backup").execute();
|
|
5750
5821
|
}
|
|
5751
|
-
async function
|
|
5822
|
+
async function Kd(e) {
|
|
5752
5823
|
await e.schema.dropTable("flows").execute();
|
|
5753
5824
|
}
|
|
5754
|
-
const
|
|
5825
|
+
const qd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5755
5826
|
__proto__: null,
|
|
5756
|
-
down:
|
|
5757
|
-
up:
|
|
5827
|
+
down: Kd,
|
|
5828
|
+
up: Ld
|
|
5758
5829
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5759
|
-
async function
|
|
5830
|
+
async function Ud(e) {
|
|
5760
5831
|
await e.schema.alterTable("resource_servers").addColumn("is_system", "integer", (t) => t.defaultTo(0).notNull()).execute(), await e.schema.alterTable("roles").addColumn("is_system", "integer", (t) => t.defaultTo(0).notNull()).execute(), await e.schema.alterTable("connections").addColumn("is_system", "integer", (t) => t.defaultTo(0).notNull()).execute();
|
|
5761
5832
|
}
|
|
5762
|
-
async function
|
|
5833
|
+
async function Bd(e) {
|
|
5763
5834
|
await e.schema.alterTable("resource_servers").dropColumn("is_system").execute(), await e.schema.alterTable("roles").dropColumn("is_system").execute(), await e.schema.alterTable("connections").dropColumn("is_system").execute();
|
|
5764
5835
|
}
|
|
5765
|
-
const
|
|
5836
|
+
const Qd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5766
5837
|
__proto__: null,
|
|
5767
|
-
down:
|
|
5768
|
-
up:
|
|
5838
|
+
down: Bd,
|
|
5839
|
+
up: Ud
|
|
5769
5840
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5770
|
-
async function
|
|
5841
|
+
async function Yd(e) {
|
|
5771
5842
|
const t = await e.selectFrom("keys").selectAll().execute();
|
|
5772
5843
|
await e.schema.dropTable("keys").execute(), await h`ALTER TABLE connections RENAME TO connections_old`.execute(e), await e.schema.createTable("connections").addColumn("id", "varchar(255)", (a) => a.notNull()).addColumn(
|
|
5773
5844
|
"tenant_id",
|
|
@@ -5800,7 +5871,7 @@ async function Ld(e) {
|
|
|
5800
5871
|
for (const a of t)
|
|
5801
5872
|
await e.insertInto("keys").values(a).execute();
|
|
5802
5873
|
}
|
|
5803
|
-
async function
|
|
5874
|
+
async function Hd(e) {
|
|
5804
5875
|
const t = await e.selectFrom("keys").selectAll().execute();
|
|
5805
5876
|
await e.schema.dropTable("keys").execute(), await h`ALTER TABLE connections RENAME TO connections_new`.execute(e), await e.schema.createTable("connections").addColumn("id", "varchar(255)", (a) => a.notNull().primaryKey()).addColumn(
|
|
5806
5877
|
"tenant_id",
|
|
@@ -5837,12 +5908,12 @@ async function Kd(e) {
|
|
|
5837
5908
|
for (const a of t)
|
|
5838
5909
|
await e.insertInto("keys").values(a).execute();
|
|
5839
5910
|
}
|
|
5840
|
-
const
|
|
5911
|
+
const Wd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5841
5912
|
__proto__: null,
|
|
5842
|
-
down:
|
|
5843
|
-
up:
|
|
5913
|
+
down: Hd,
|
|
5914
|
+
up: Yd
|
|
5844
5915
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5845
|
-
async function
|
|
5916
|
+
async function Gd(e) {
|
|
5846
5917
|
await e.schema.alterTable("login_sessions").addColumn("state", "varchar(50)", (t) => t.defaultTo("pending")).execute(), await e.schema.alterTable("login_sessions").addColumn("state_data", "text").execute(), await e.schema.alterTable("login_sessions").addColumn("failure_reason", "text").execute(), await e.schema.alterTable("login_sessions").addColumn("user_id", "varchar(255)").execute(), await e.schema.createIndex("login_sessions_tenant_user_idx").on("login_sessions").columns(["tenant_id", "user_id"]).execute(), await e.updateTable("login_sessions").set({
|
|
5847
5918
|
state: h`CASE
|
|
5848
5919
|
WHEN login_completed = 1 THEN 'completed'
|
|
@@ -5851,28 +5922,28 @@ async function Bd(e) {
|
|
|
5851
5922
|
END`
|
|
5852
5923
|
}).execute(), await e.schema.alterTable("login_sessions").dropColumn("login_completed").execute(), await e.schema.createIndex("login_sessions_state_idx").on("login_sessions").column("state").execute(), await e.schema.createIndex("login_sessions_state_updated_idx").on("login_sessions").columns(["state", "updated_at"]).execute();
|
|
5853
5924
|
}
|
|
5854
|
-
async function
|
|
5925
|
+
async function Vd(e) {
|
|
5855
5926
|
await e.schema.alterTable("login_sessions").addColumn("login_completed", "integer", (t) => t.defaultTo(0)).execute(), await e.updateTable("login_sessions").set({
|
|
5856
5927
|
login_completed: h`CASE WHEN state = 'completed' THEN 1 ELSE 0 END`
|
|
5857
5928
|
}).execute(), await e.schema.dropIndex("login_sessions_state_updated_idx").execute(), await e.schema.dropIndex("login_sessions_state_idx").execute(), await e.schema.dropIndex("login_sessions_tenant_user_idx").execute(), await e.schema.alterTable("login_sessions").dropColumn("state").dropColumn("state_data").dropColumn("failure_reason").dropColumn("user_id").execute();
|
|
5858
5929
|
}
|
|
5859
|
-
const
|
|
5930
|
+
const Xd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5860
5931
|
__proto__: null,
|
|
5861
|
-
down:
|
|
5862
|
-
up:
|
|
5932
|
+
down: Vd,
|
|
5933
|
+
up: Gd
|
|
5863
5934
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5864
|
-
async function
|
|
5935
|
+
async function Zd(e) {
|
|
5865
5936
|
await e.schema.alterTable("roles").addColumn("metadata", "varchar(4096)").execute(), await e.schema.alterTable("resource_servers").addColumn("metadata", "varchar(4096)").execute();
|
|
5866
5937
|
}
|
|
5867
|
-
async function
|
|
5938
|
+
async function eu(e) {
|
|
5868
5939
|
await e.schema.alterTable("roles").dropColumn("metadata").execute(), await e.schema.alterTable("resource_servers").dropColumn("metadata").execute();
|
|
5869
5940
|
}
|
|
5870
|
-
const
|
|
5941
|
+
const tu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5871
5942
|
__proto__: null,
|
|
5872
|
-
down:
|
|
5873
|
-
up:
|
|
5943
|
+
down: eu,
|
|
5944
|
+
up: Zd
|
|
5874
5945
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5875
|
-
async function
|
|
5946
|
+
async function au(e) {
|
|
5876
5947
|
try {
|
|
5877
5948
|
return await h`SELECT VERSION()`.execute(e), "mysql";
|
|
5878
5949
|
} catch {
|
|
@@ -5892,8 +5963,8 @@ async function x(e, t, a, n) {
|
|
|
5892
5963
|
throw o;
|
|
5893
5964
|
}
|
|
5894
5965
|
}
|
|
5895
|
-
async function
|
|
5896
|
-
const t = await
|
|
5966
|
+
async function nu(e) {
|
|
5967
|
+
const t = await au(e);
|
|
5897
5968
|
await x(e, "refresh_tokens", "created_at_ts", "bigint"), await x(e, "refresh_tokens", "expires_at_ts", "bigint"), await x(e, "refresh_tokens", "idle_expires_at_ts", "bigint"), await x(e, "refresh_tokens", "last_exchanged_at_ts", "bigint"), await x(e, "sessions", "created_at_ts", "bigint"), await x(e, "sessions", "updated_at_ts", "bigint"), await x(e, "sessions", "expires_at_ts", "bigint"), await x(e, "sessions", "idle_expires_at_ts", "bigint"), await x(e, "sessions", "authenticated_at_ts", "bigint"), await x(e, "sessions", "last_interaction_at_ts", "bigint"), await x(e, "sessions", "used_at_ts", "bigint"), await x(e, "sessions", "revoked_at_ts", "bigint"), await x(e, "login_sessions", "created_at_ts", "bigint"), await x(e, "login_sessions", "updated_at_ts", "bigint"), await x(e, "login_sessions", "expires_at_ts", "bigint"), t === "mysql" && (await e.schema.alterTable("refresh_tokens").modifyColumn("created_at", "varchar(35)").execute(), await e.schema.alterTable("refresh_tokens").modifyColumn("expires_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").modifyColumn("created_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").modifyColumn("updated_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").modifyColumn("expires_at", "varchar(35)").execute(), await e.schema.alterTable("login_sessions").modifyColumn("created_at", "varchar(35)").execute(), await e.schema.alterTable("login_sessions").modifyColumn("updated_at", "varchar(35)").execute(), await e.schema.alterTable("login_sessions").modifyColumn("expires_at", "varchar(35)").execute()), await e.schema.createIndex("idx_sessions_user_id").on("sessions").columns(["tenant_id", "user_id"]).execute(), await e.schema.createIndex("idx_refresh_tokens_user_id").on("refresh_tokens").columns(["tenant_id", "user_id"]).execute(), await e.schema.createIndex("idx_refresh_tokens_session_id").on("refresh_tokens").column("session_id").execute(), await e.schema.createIndex("idx_refresh_tokens_expires_at_ts").on("refresh_tokens").column("expires_at_ts").execute(), await e.schema.createIndex("idx_sessions_expires_at_ts").on("sessions").column("expires_at_ts").execute(), await e.schema.createIndex("idx_login_sessions_expires_at_ts").on("login_sessions").column("expires_at_ts").execute();
|
|
5898
5969
|
}
|
|
5899
5970
|
async function j(e, t, a) {
|
|
@@ -5914,13 +5985,13 @@ async function T(e, t, a) {
|
|
|
5914
5985
|
throw n;
|
|
5915
5986
|
}
|
|
5916
5987
|
}
|
|
5917
|
-
async function
|
|
5988
|
+
async function ou(e) {
|
|
5918
5989
|
await j(e, "idx_sessions_user_id", "sessions"), await j(e, "idx_refresh_tokens_user_id", "refresh_tokens"), await j(e, "idx_refresh_tokens_session_id", "refresh_tokens"), await j(e, "idx_refresh_tokens_expires_at_ts", "refresh_tokens"), await j(e, "idx_sessions_expires_at_ts", "sessions"), await j(e, "idx_login_sessions_expires_at_ts", "login_sessions"), await T(e, "refresh_tokens", "created_at_ts"), await T(e, "refresh_tokens", "expires_at_ts"), await T(e, "refresh_tokens", "idle_expires_at_ts"), await T(e, "refresh_tokens", "last_exchanged_at_ts"), await T(e, "sessions", "created_at_ts"), await T(e, "sessions", "updated_at_ts"), await T(e, "sessions", "expires_at_ts"), await T(e, "sessions", "idle_expires_at_ts"), await T(e, "sessions", "authenticated_at_ts"), await T(e, "sessions", "last_interaction_at_ts"), await T(e, "sessions", "used_at_ts"), await T(e, "sessions", "revoked_at_ts"), await T(e, "login_sessions", "created_at_ts"), await T(e, "login_sessions", "updated_at_ts"), await T(e, "login_sessions", "expires_at_ts");
|
|
5919
5990
|
}
|
|
5920
|
-
const
|
|
5991
|
+
const ru = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5921
5992
|
__proto__: null,
|
|
5922
|
-
down:
|
|
5923
|
-
up:
|
|
5993
|
+
down: ou,
|
|
5994
|
+
up: nu
|
|
5924
5995
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5925
5996
|
async function ve(e) {
|
|
5926
5997
|
try {
|
|
@@ -5943,7 +6014,7 @@ async function N(e, t, a) {
|
|
|
5943
6014
|
throw n;
|
|
5944
6015
|
}
|
|
5945
6016
|
}
|
|
5946
|
-
async function
|
|
6017
|
+
async function su(e) {
|
|
5947
6018
|
const t = await ve(e);
|
|
5948
6019
|
console.log("Dropping indexes that depend on old date columns...");
|
|
5949
6020
|
try {
|
|
@@ -5957,48 +6028,48 @@ async function eu(e) {
|
|
|
5957
6028
|
}
|
|
5958
6029
|
console.log("Dropping old date columns..."), await N(e, "refresh_tokens", "created_at"), await N(e, "refresh_tokens", "expires_at"), await N(e, "refresh_tokens", "idle_expires_at"), await N(e, "refresh_tokens", "last_exchanged_at"), await N(e, "sessions", "created_at"), await N(e, "sessions", "updated_at"), await N(e, "sessions", "expires_at"), await N(e, "sessions", "idle_expires_at"), await N(e, "sessions", "authenticated_at"), await N(e, "sessions", "last_interaction_at"), await N(e, "sessions", "used_at"), await N(e, "sessions", "revoked_at"), await N(e, "login_sessions", "created_at"), await N(e, "login_sessions", "updated_at"), await N(e, "login_sessions", "expires_at"), t === "mysql" && (console.log("Increasing ID column sizes for ULID support..."), await e.schema.alterTable("login_sessions").modifyColumn("id", "varchar(26)").execute(), await e.schema.alterTable("login_sessions").modifyColumn("session_id", "varchar(26)").execute(), await e.schema.alterTable("login_sessions").modifyColumn("csrf_token", "varchar(26)").execute(), await e.schema.alterTable("sessions").modifyColumn("id", "varchar(26)").execute(), await e.schema.alterTable("sessions").modifyColumn("login_session_id", "varchar(26)").execute(), await e.schema.alterTable("refresh_tokens").modifyColumn("id", "varchar(26)").execute(), await e.schema.alterTable("refresh_tokens").modifyColumn("session_id", "varchar(26)").execute()), console.log("Migration completed successfully");
|
|
5959
6030
|
}
|
|
5960
|
-
async function
|
|
6031
|
+
async function iu(e) {
|
|
5961
6032
|
await ve(e) === "mysql" && (console.log("Restoring ID column sizes to varchar(21)..."), await e.schema.alterTable("login_sessions").modifyColumn("id", "varchar(21)").execute(), await e.schema.alterTable("login_sessions").modifyColumn("session_id", "varchar(21)").execute(), await e.schema.alterTable("login_sessions").modifyColumn("csrf_token", "varchar(21)").execute(), await e.schema.alterTable("sessions").modifyColumn("id", "varchar(21)").execute(), await e.schema.alterTable("sessions").modifyColumn("login_session_id", "varchar(21)").execute(), await e.schema.alterTable("refresh_tokens").modifyColumn("id", "varchar(21)").execute(), await e.schema.alterTable("refresh_tokens").modifyColumn("session_id", "varchar(21)").execute()), console.log("Re-adding old date columns (data will be empty)..."), await e.schema.alterTable("refresh_tokens").addColumn("created_at", "varchar(35)").execute(), await e.schema.alterTable("refresh_tokens").addColumn("expires_at", "varchar(35)").execute(), await e.schema.alterTable("refresh_tokens").addColumn("idle_expires_at", "varchar(35)").execute(), await e.schema.alterTable("refresh_tokens").addColumn("last_exchanged_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").addColumn("created_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").addColumn("updated_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").addColumn("expires_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").addColumn("idle_expires_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").addColumn("authenticated_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").addColumn("last_interaction_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").addColumn("used_at", "varchar(35)").execute(), await e.schema.alterTable("sessions").addColumn("revoked_at", "varchar(35)").execute(), await e.schema.alterTable("login_sessions").addColumn("created_at", "varchar(35)").execute(), await e.schema.alterTable("login_sessions").addColumn("updated_at", "varchar(35)").execute(), await e.schema.alterTable("login_sessions").addColumn("expires_at", "varchar(35)").execute(), console.log("Rollback completed");
|
|
5962
6033
|
}
|
|
5963
|
-
const
|
|
6034
|
+
const cu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5964
6035
|
__proto__: null,
|
|
5965
|
-
down:
|
|
5966
|
-
up:
|
|
6036
|
+
down: iu,
|
|
6037
|
+
up: su
|
|
5967
6038
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5968
|
-
async function
|
|
6039
|
+
async function lu(e) {
|
|
5969
6040
|
await e.schema.alterTable("users").dropColumn("user_metadata").execute(), await e.schema.alterTable("users").addColumn("user_metadata", "text").execute(), await e.schema.alterTable("users").addColumn("middle_name", "varchar(100)").execute(), await e.schema.alterTable("users").addColumn("profile", "text").execute(), await e.schema.alterTable("users").addColumn("website", "text").execute(), await e.schema.alterTable("users").addColumn("gender", "varchar(50)").execute(), await e.schema.alterTable("users").addColumn("birthdate", "varchar(10)").execute(), await e.schema.alterTable("users").addColumn("zoneinfo", "varchar(100)").execute();
|
|
5970
6041
|
}
|
|
5971
|
-
async function
|
|
6042
|
+
async function du(e) {
|
|
5972
6043
|
await e.schema.alterTable("users").dropColumn("middle_name").execute(), await e.schema.alterTable("users").dropColumn("profile").execute(), await e.schema.alterTable("users").dropColumn("website").execute(), await e.schema.alterTable("users").dropColumn("gender").execute(), await e.schema.alterTable("users").dropColumn("birthdate").execute(), await e.schema.alterTable("users").dropColumn("zoneinfo").execute(), await e.schema.alterTable("users").dropColumn("user_metadata").execute(), await e.schema.alterTable("users").addColumn("user_metadata", "varchar(4096)").execute();
|
|
5973
6044
|
}
|
|
5974
|
-
const
|
|
6045
|
+
const uu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5975
6046
|
__proto__: null,
|
|
5976
|
-
down:
|
|
5977
|
-
up:
|
|
6047
|
+
down: du,
|
|
6048
|
+
up: lu
|
|
5978
6049
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5979
|
-
async function
|
|
6050
|
+
async function _u(e) {
|
|
5980
6051
|
await e.schema.alterTable("users").addColumn("preferred_username", "varchar(255)").execute();
|
|
5981
6052
|
}
|
|
5982
|
-
async function
|
|
6053
|
+
async function mu(e) {
|
|
5983
6054
|
await e.schema.alterTable("users").dropColumn("preferred_username").execute();
|
|
5984
6055
|
}
|
|
5985
|
-
const
|
|
6056
|
+
const hu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5986
6057
|
__proto__: null,
|
|
5987
|
-
down:
|
|
5988
|
-
up:
|
|
6058
|
+
down: mu,
|
|
6059
|
+
up: _u
|
|
5989
6060
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5990
|
-
async function
|
|
6061
|
+
async function pu(e) {
|
|
5991
6062
|
await e.schema.alterTable("users").addColumn("address", "text").execute();
|
|
5992
6063
|
}
|
|
5993
|
-
async function
|
|
6064
|
+
async function fu(e) {
|
|
5994
6065
|
await e.schema.alterTable("users").dropColumn("address").execute();
|
|
5995
6066
|
}
|
|
5996
|
-
const
|
|
6067
|
+
const gu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5997
6068
|
__proto__: null,
|
|
5998
|
-
down:
|
|
5999
|
-
up:
|
|
6069
|
+
down: fu,
|
|
6070
|
+
up: pu
|
|
6000
6071
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6001
|
-
async function
|
|
6072
|
+
async function wu(e) {
|
|
6002
6073
|
try {
|
|
6003
6074
|
await e.schema.alterTable("login_sessions").addColumn("authParams_max_age", "integer").execute(), console.log(" Added column authParams_max_age to login_sessions");
|
|
6004
6075
|
} catch (t) {
|
|
@@ -6014,7 +6085,7 @@ async function _u(e) {
|
|
|
6014
6085
|
);
|
|
6015
6086
|
}
|
|
6016
6087
|
}
|
|
6017
|
-
async function
|
|
6088
|
+
async function yu(e) {
|
|
6018
6089
|
try {
|
|
6019
6090
|
await e.schema.alterTable("login_sessions").dropColumn("authParams_max_age").execute();
|
|
6020
6091
|
} catch (t) {
|
|
@@ -6030,38 +6101,38 @@ async function mu(e) {
|
|
|
6030
6101
|
);
|
|
6031
6102
|
}
|
|
6032
6103
|
}
|
|
6033
|
-
const
|
|
6104
|
+
const vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6034
6105
|
__proto__: null,
|
|
6035
|
-
down:
|
|
6036
|
-
up:
|
|
6106
|
+
down: yu,
|
|
6107
|
+
up: wu
|
|
6037
6108
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6038
|
-
async function
|
|
6109
|
+
async function Cu(e) {
|
|
6039
6110
|
await e.schema.alterTable("clients").addColumn("auth0_conformant", "integer", (t) => t.defaultTo(1)).execute();
|
|
6040
6111
|
}
|
|
6041
|
-
async function
|
|
6112
|
+
async function xu(e) {
|
|
6042
6113
|
await e.schema.alterTable("clients").dropColumn("auth0_conformant").execute();
|
|
6043
6114
|
}
|
|
6044
|
-
const
|
|
6115
|
+
const Tu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6045
6116
|
__proto__: null,
|
|
6046
|
-
down:
|
|
6047
|
-
up:
|
|
6117
|
+
down: xu,
|
|
6118
|
+
up: Cu
|
|
6048
6119
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6049
|
-
async function
|
|
6120
|
+
async function Nu(e) {
|
|
6050
6121
|
await e.schema.createTable("universal_login_templates").addColumn(
|
|
6051
6122
|
"tenant_id",
|
|
6052
6123
|
"varchar(191)",
|
|
6053
6124
|
(t) => t.primaryKey().references("tenants.id").onDelete("cascade")
|
|
6054
6125
|
).addColumn("body", "text", (t) => t.notNull()).addColumn("updated_at_ts", "integer", (t) => t.notNull()).addColumn("created_at_ts", "integer", (t) => t.notNull()).execute();
|
|
6055
6126
|
}
|
|
6056
|
-
async function
|
|
6127
|
+
async function bu(e) {
|
|
6057
6128
|
await e.schema.dropTable("universal_login_templates").execute();
|
|
6058
6129
|
}
|
|
6059
|
-
const
|
|
6130
|
+
const Su = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6060
6131
|
__proto__: null,
|
|
6061
|
-
down:
|
|
6062
|
-
up:
|
|
6132
|
+
down: bu,
|
|
6133
|
+
up: Nu
|
|
6063
6134
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6064
|
-
async function
|
|
6135
|
+
async function Ou(e) {
|
|
6065
6136
|
await e.schema.createTable("custom_text").addColumn(
|
|
6066
6137
|
"tenant_id",
|
|
6067
6138
|
"varchar(191)",
|
|
@@ -6072,26 +6143,26 @@ async function Cu(e) {
|
|
|
6072
6143
|
"language"
|
|
6073
6144
|
]).execute();
|
|
6074
6145
|
}
|
|
6075
|
-
async function
|
|
6146
|
+
async function ku(e) {
|
|
6076
6147
|
await e.schema.dropTable("custom_text").execute();
|
|
6077
6148
|
}
|
|
6078
|
-
const
|
|
6149
|
+
const $u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6079
6150
|
__proto__: null,
|
|
6080
|
-
down:
|
|
6081
|
-
up:
|
|
6151
|
+
down: ku,
|
|
6152
|
+
up: Ou
|
|
6082
6153
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6083
|
-
async function
|
|
6154
|
+
async function Eu(e) {
|
|
6084
6155
|
await e.schema.alterTable("tenants").addColumn("mfa", "text").execute();
|
|
6085
6156
|
}
|
|
6086
|
-
async function
|
|
6157
|
+
async function Iu(e) {
|
|
6087
6158
|
await e.schema.alterTable("tenants").dropColumn("mfa").execute();
|
|
6088
6159
|
}
|
|
6089
|
-
const
|
|
6160
|
+
const zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6090
6161
|
__proto__: null,
|
|
6091
|
-
down:
|
|
6092
|
-
up:
|
|
6162
|
+
down: Iu,
|
|
6163
|
+
up: Eu
|
|
6093
6164
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6094
|
-
async function
|
|
6165
|
+
async function Pu(e) {
|
|
6095
6166
|
try {
|
|
6096
6167
|
return await h`SELECT VERSION()`.execute(e), "mysql";
|
|
6097
6168
|
} catch {
|
|
@@ -6111,8 +6182,8 @@ async function Q(e, t, a, n) {
|
|
|
6111
6182
|
throw o;
|
|
6112
6183
|
}
|
|
6113
6184
|
}
|
|
6114
|
-
async function
|
|
6115
|
-
const t = await
|
|
6185
|
+
async function Du(e) {
|
|
6186
|
+
const t = await Pu(e);
|
|
6116
6187
|
await Q(e, "hooks", "template_id", "text"), await Q(e, "hooks", "created_at_ts", "bigint"), await Q(e, "hooks", "updated_at_ts", "bigint"), t === "mysql" ? await h`
|
|
6117
6188
|
UPDATE hooks
|
|
6118
6189
|
SET created_at_ts = UNIX_TIMESTAMP(created_at) * 1000,
|
|
@@ -6125,7 +6196,7 @@ async function ku(e) {
|
|
|
6125
6196
|
WHERE created_at_ts IS NULL AND created_at IS NOT NULL
|
|
6126
6197
|
`.execute(e), t === "mysql" && (await e.schema.alterTable("hooks").modifyColumn("created_at", "varchar(255)").execute(), await e.schema.alterTable("hooks").modifyColumn("updated_at", "varchar(255)").execute());
|
|
6127
6198
|
}
|
|
6128
|
-
async function
|
|
6199
|
+
async function Y(e, t, a) {
|
|
6129
6200
|
try {
|
|
6130
6201
|
await e.schema.alterTable(t).dropColumn(a).execute();
|
|
6131
6202
|
} catch (n) {
|
|
@@ -6134,13 +6205,13 @@ async function H(e, t, a) {
|
|
|
6134
6205
|
throw n;
|
|
6135
6206
|
}
|
|
6136
6207
|
}
|
|
6137
|
-
async function
|
|
6138
|
-
await
|
|
6208
|
+
async function Au(e) {
|
|
6209
|
+
await Y(e, "hooks", "template_id"), await Y(e, "hooks", "created_at_ts"), await Y(e, "hooks", "updated_at_ts");
|
|
6139
6210
|
}
|
|
6140
|
-
const
|
|
6211
|
+
const ju = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6141
6212
|
__proto__: null,
|
|
6142
|
-
down:
|
|
6143
|
-
up:
|
|
6213
|
+
down: Au,
|
|
6214
|
+
up: Du
|
|
6144
6215
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6145
6216
|
async function Ce(e) {
|
|
6146
6217
|
try {
|
|
@@ -6163,7 +6234,7 @@ async function se(e, t, a) {
|
|
|
6163
6234
|
throw n;
|
|
6164
6235
|
}
|
|
6165
6236
|
}
|
|
6166
|
-
async function
|
|
6237
|
+
async function Fu(e) {
|
|
6167
6238
|
var r, s, i, d, u;
|
|
6168
6239
|
const t = await Ce(e);
|
|
6169
6240
|
console.log(
|
|
@@ -6202,7 +6273,7 @@ async function Iu(e) {
|
|
|
6202
6273
|
(c) => c.notNull().primaryKey()
|
|
6203
6274
|
).execute(), await e.schema.alterTable("hooks").modifyColumn("form_id", "varchar(128)").execute(), await e.schema.alterTable("hooks").modifyColumn("template_id", "varchar(64)").execute());
|
|
6204
6275
|
}
|
|
6205
|
-
async function
|
|
6276
|
+
async function Ru(e) {
|
|
6206
6277
|
const t = await Ce(e);
|
|
6207
6278
|
await e.schema.alterTable("hooks").addColumn("created_at", "varchar(255)").execute(), await e.schema.alterTable("hooks").addColumn("updated_at", "varchar(255)").execute(), t === "mysql" ? await h`
|
|
6208
6279
|
UPDATE hooks
|
|
@@ -6220,12 +6291,12 @@ async function zu(e) {
|
|
|
6220
6291
|
(a) => a.notNull().primaryKey()
|
|
6221
6292
|
).execute(), await e.schema.alterTable("hooks").modifyColumn("form_id", "text").execute(), await e.schema.alterTable("hooks").modifyColumn("template_id", "text").execute());
|
|
6222
6293
|
}
|
|
6223
|
-
const
|
|
6294
|
+
const Mu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6224
6295
|
__proto__: null,
|
|
6225
|
-
down:
|
|
6226
|
-
up:
|
|
6296
|
+
down: Ru,
|
|
6297
|
+
up: Fu
|
|
6227
6298
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6228
|
-
async function
|
|
6299
|
+
async function Ju(e) {
|
|
6229
6300
|
const { rows: t } = await h`
|
|
6230
6301
|
SELECT username, provider, tenant_id, COUNT(*) AS cnt
|
|
6231
6302
|
FROM users
|
|
@@ -6261,24 +6332,24 @@ async function Du(e) {
|
|
|
6261
6332
|
}
|
|
6262
6333
|
await e.schema.createIndex("unique_username_provider").on("users").unique().columns(["username", "provider", "tenant_id"]).execute();
|
|
6263
6334
|
}
|
|
6264
|
-
async function
|
|
6335
|
+
async function Lu(e) {
|
|
6265
6336
|
await e.schema.dropIndex("unique_username_provider").execute();
|
|
6266
6337
|
}
|
|
6267
|
-
const
|
|
6338
|
+
const Ku = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6268
6339
|
__proto__: null,
|
|
6269
|
-
down:
|
|
6270
|
-
up:
|
|
6340
|
+
down: Lu,
|
|
6341
|
+
up: Ju
|
|
6271
6342
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6272
|
-
async function
|
|
6343
|
+
async function qu(e) {
|
|
6273
6344
|
await e.schema.alterTable("refresh_tokens").addColumn("login_id", "varchar(26)").execute(), await e.schema.createIndex("idx_refresh_tokens_login_id").on("refresh_tokens").column("login_id").execute();
|
|
6274
6345
|
}
|
|
6275
|
-
async function
|
|
6346
|
+
async function Uu(e) {
|
|
6276
6347
|
await e.schema.dropIndex("idx_refresh_tokens_login_id").execute(), await e.schema.alterTable("refresh_tokens").dropColumn("login_id").execute();
|
|
6277
6348
|
}
|
|
6278
|
-
const
|
|
6349
|
+
const Bu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6279
6350
|
__proto__: null,
|
|
6280
|
-
down:
|
|
6281
|
-
up:
|
|
6351
|
+
down: Uu,
|
|
6352
|
+
up: qu
|
|
6282
6353
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6283
6354
|
async function xe(e) {
|
|
6284
6355
|
try {
|
|
@@ -6287,48 +6358,22 @@ async function xe(e) {
|
|
|
6287
6358
|
return "sqlite";
|
|
6288
6359
|
}
|
|
6289
6360
|
}
|
|
6290
|
-
async function
|
|
6361
|
+
async function Qu(e) {
|
|
6291
6362
|
await xe(e) === "mysql" ? (await e.schema.alterTable("refresh_tokens").modifyColumn("login_id", "varchar(26)", (a) => a.notNull()).execute(), await e.schema.dropIndex("idx_refresh_tokens_session_id").execute(), await e.schema.alterTable("refresh_tokens").dropColumn("session_id").execute()) : (await e.schema.dropIndex("idx_refresh_tokens_session_id").execute(), await e.schema.alterTable("refresh_tokens").dropColumn("session_id").execute());
|
|
6292
6363
|
}
|
|
6293
|
-
async function
|
|
6364
|
+
async function Yu(e) {
|
|
6294
6365
|
await xe(e) === "mysql" ? (await e.schema.alterTable("refresh_tokens").addColumn("session_id", "varchar(26)").execute(), await e.schema.createIndex("idx_refresh_tokens_session_id").on("refresh_tokens").column("session_id").execute(), await e.schema.alterTable("refresh_tokens").modifyColumn("login_id", "varchar(26)").execute()) : await e.schema.alterTable("refresh_tokens").addColumn("session_id", "varchar(21)").execute();
|
|
6295
6366
|
}
|
|
6296
|
-
const
|
|
6297
|
-
__proto__: null,
|
|
6298
|
-
down: Lu,
|
|
6299
|
-
up: Ju
|
|
6300
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
6301
|
-
async function qu(e) {
|
|
6302
|
-
await e.schema.createIndex("idx_sessions_idle_expires_at_ts").on("sessions").column("idle_expires_at_ts").execute(), await e.schema.createIndex("idx_refresh_tokens_idle_expires_at_ts").on("refresh_tokens").column("idle_expires_at_ts").execute();
|
|
6303
|
-
}
|
|
6304
|
-
async function Bu(e) {
|
|
6305
|
-
await e.schema.dropIndex("idx_sessions_idle_expires_at_ts").on("sessions").execute(), await e.schema.dropIndex("idx_refresh_tokens_idle_expires_at_ts").on("refresh_tokens").execute();
|
|
6306
|
-
}
|
|
6307
|
-
const Uu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6308
|
-
__proto__: null,
|
|
6309
|
-
down: Bu,
|
|
6310
|
-
up: qu
|
|
6311
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
6312
|
-
async function Qu(e) {
|
|
6313
|
-
await e.schema.alterTable("login_sessions").addColumn("auth_connection", "varchar(255)").execute();
|
|
6314
|
-
}
|
|
6315
|
-
async function Hu(e) {
|
|
6316
|
-
await e.schema.alterTable("login_sessions").dropColumn("auth_connection").execute();
|
|
6317
|
-
}
|
|
6318
|
-
const Yu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6367
|
+
const Hu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6319
6368
|
__proto__: null,
|
|
6320
|
-
down:
|
|
6369
|
+
down: Yu,
|
|
6321
6370
|
up: Qu
|
|
6322
6371
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6323
6372
|
async function Wu(e) {
|
|
6324
|
-
await e.schema.
|
|
6325
|
-
"tenant_id",
|
|
6326
|
-
"varchar(191)",
|
|
6327
|
-
(t) => t.references("tenants.id").onDelete("cascade").notNull()
|
|
6328
|
-
).addColumn("user_id", "varchar(255)", (t) => t.notNull()).addColumn("type", "varchar(32)", (t) => t.notNull()).addColumn("phone_number", "varchar(32)").addColumn("totp_secret", "varchar(255)").addColumn("confirmed", "integer", (t) => t.notNull().defaultTo(0)).addColumn("created_at_ts", "bigint", (t) => t.notNull()).addColumn("updated_at_ts", "bigint", (t) => t.notNull()).execute(), await e.schema.createIndex("mfa_enrollments_tenant_user_idx").on("mfa_enrollments").columns(["tenant_id", "user_id"]).execute();
|
|
6373
|
+
await e.schema.createIndex("idx_sessions_idle_expires_at_ts").on("sessions").column("idle_expires_at_ts").execute(), await e.schema.createIndex("idx_refresh_tokens_idle_expires_at_ts").on("refresh_tokens").column("idle_expires_at_ts").execute();
|
|
6329
6374
|
}
|
|
6330
6375
|
async function Gu(e) {
|
|
6331
|
-
await e.schema.
|
|
6376
|
+
await e.schema.dropIndex("idx_sessions_idle_expires_at_ts").on("sessions").execute(), await e.schema.dropIndex("idx_refresh_tokens_idle_expires_at_ts").on("refresh_tokens").execute();
|
|
6332
6377
|
}
|
|
6333
6378
|
const Vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6334
6379
|
__proto__: null,
|
|
@@ -6336,10 +6381,10 @@ const Vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6336
6381
|
up: Wu
|
|
6337
6382
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6338
6383
|
async function Xu(e) {
|
|
6339
|
-
await e.schema.alterTable("
|
|
6384
|
+
await e.schema.alterTable("login_sessions").addColumn("auth_connection", "varchar(255)").execute();
|
|
6340
6385
|
}
|
|
6341
6386
|
async function Zu(e) {
|
|
6342
|
-
await e.schema.alterTable("
|
|
6387
|
+
await e.schema.alterTable("login_sessions").dropColumn("auth_connection").execute();
|
|
6343
6388
|
}
|
|
6344
6389
|
const e_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6345
6390
|
__proto__: null,
|
|
@@ -6347,10 +6392,14 @@ const e_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6347
6392
|
up: Xu
|
|
6348
6393
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6349
6394
|
async function t_(e) {
|
|
6350
|
-
await e.schema.
|
|
6395
|
+
await e.schema.createTable("mfa_enrollments").addColumn("id", "varchar(26)", (t) => t.primaryKey()).addColumn(
|
|
6396
|
+
"tenant_id",
|
|
6397
|
+
"varchar(191)",
|
|
6398
|
+
(t) => t.references("tenants.id").onDelete("cascade").notNull()
|
|
6399
|
+
).addColumn("user_id", "varchar(255)", (t) => t.notNull()).addColumn("type", "varchar(32)", (t) => t.notNull()).addColumn("phone_number", "varchar(32)").addColumn("totp_secret", "varchar(255)").addColumn("confirmed", "integer", (t) => t.notNull().defaultTo(0)).addColumn("created_at_ts", "bigint", (t) => t.notNull()).addColumn("updated_at_ts", "bigint", (t) => t.notNull()).execute(), await e.schema.createIndex("mfa_enrollments_tenant_user_idx").on("mfa_enrollments").columns(["tenant_id", "user_id"]).execute();
|
|
6351
6400
|
}
|
|
6352
6401
|
async function a_(e) {
|
|
6353
|
-
await e.schema.
|
|
6402
|
+
await e.schema.dropTable("mfa_enrollments").execute();
|
|
6354
6403
|
}
|
|
6355
6404
|
const n_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6356
6405
|
__proto__: null,
|
|
@@ -6358,10 +6407,10 @@ const n_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6358
6407
|
up: t_
|
|
6359
6408
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6360
6409
|
async function o_(e) {
|
|
6361
|
-
await e.schema.
|
|
6410
|
+
await e.schema.alterTable("codes").addColumn("otp", "varchar(32)").execute();
|
|
6362
6411
|
}
|
|
6363
6412
|
async function r_(e) {
|
|
6364
|
-
await e.schema.
|
|
6413
|
+
await e.schema.alterTable("codes").dropColumn("otp").execute();
|
|
6365
6414
|
}
|
|
6366
6415
|
const s_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6367
6416
|
__proto__: null,
|
|
@@ -6369,10 +6418,10 @@ const s_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6369
6418
|
up: o_
|
|
6370
6419
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6371
6420
|
async function i_(e) {
|
|
6372
|
-
await e.schema.alterTable("
|
|
6421
|
+
await e.schema.alterTable("mfa_enrollments").renameTo("authentication_methods").execute(), await e.schema.alterTable("authentication_methods").addColumn("credential_id", "varchar(512)").execute(), await e.schema.alterTable("authentication_methods").addColumn("public_key", "text").execute(), await e.schema.alterTable("authentication_methods").addColumn("sign_count", "integer").execute(), await e.schema.alterTable("authentication_methods").addColumn("credential_backed_up", "integer").execute(), await e.schema.alterTable("authentication_methods").addColumn("transports", "varchar(512)").execute(), await e.schema.alterTable("authentication_methods").addColumn("friendly_name", "varchar(255)").execute(), await e.schema.createIndex("authentication_methods_credential_id_idx").on("authentication_methods").column("credential_id").execute();
|
|
6373
6422
|
}
|
|
6374
6423
|
async function c_(e) {
|
|
6375
|
-
await e.schema.alterTable("
|
|
6424
|
+
await e.schema.dropIndex("authentication_methods_credential_id_idx").execute(), await e.schema.alterTable("authentication_methods").dropColumn("friendly_name").execute(), await e.schema.alterTable("authentication_methods").dropColumn("transports").execute(), await e.schema.alterTable("authentication_methods").dropColumn("credential_backed_up").execute(), await e.schema.alterTable("authentication_methods").dropColumn("sign_count").execute(), await e.schema.alterTable("authentication_methods").dropColumn("public_key").execute(), await e.schema.alterTable("authentication_methods").dropColumn("credential_id").execute(), await e.schema.alterTable("authentication_methods").renameTo("mfa_enrollments").execute();
|
|
6376
6425
|
}
|
|
6377
6426
|
const l_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6378
6427
|
__proto__: null,
|
|
@@ -6380,6 +6429,28 @@ const l_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6380
6429
|
up: i_
|
|
6381
6430
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6382
6431
|
async function d_(e) {
|
|
6432
|
+
await e.schema.createTable("outbox_events").addColumn("id", "varchar(21)", (t) => t.primaryKey()).addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("event_type", "varchar(255)", (t) => t.notNull()).addColumn("log_type", "varchar(64)", (t) => t.notNull()).addColumn("aggregate_type", "varchar(64)", (t) => t.notNull()).addColumn("aggregate_id", "varchar(255)", (t) => t.notNull()).addColumn("payload", "text", (t) => t.notNull()).addColumn("created_at", "varchar(35)", (t) => t.notNull()).addColumn("processed_at", "varchar(35)").addColumn("retry_count", "integer", (t) => t.notNull().defaultTo(0)).addColumn("next_retry_at", "varchar(35)").addColumn("error", "text").execute(), await e.schema.createIndex("idx_outbox_unprocessed").on("outbox_events").columns(["processed_at", "created_at"]).execute(), await e.schema.createIndex("idx_outbox_tenant_type").on("outbox_events").columns(["tenant_id", "event_type", "created_at"]).execute();
|
|
6433
|
+
}
|
|
6434
|
+
async function u_(e) {
|
|
6435
|
+
await e.schema.dropTable("outbox_events").execute();
|
|
6436
|
+
}
|
|
6437
|
+
const __ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6438
|
+
__proto__: null,
|
|
6439
|
+
down: u_,
|
|
6440
|
+
up: d_
|
|
6441
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
6442
|
+
async function m_(e) {
|
|
6443
|
+
await e.schema.alterTable("outbox_events").addColumn("claimed_by", "varchar(64)").execute(), await e.schema.alterTable("outbox_events").addColumn("claim_expires_at", "varchar(35)").execute();
|
|
6444
|
+
}
|
|
6445
|
+
async function h_(e) {
|
|
6446
|
+
await e.schema.alterTable("outbox_events").dropColumn("claimed_by").execute(), await e.schema.alterTable("outbox_events").dropColumn("claim_expires_at").execute();
|
|
6447
|
+
}
|
|
6448
|
+
const p_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6449
|
+
__proto__: null,
|
|
6450
|
+
down: h_,
|
|
6451
|
+
up: m_
|
|
6452
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
6453
|
+
async function f_(e) {
|
|
6383
6454
|
await e.schema.createIndex("idx_outbox_claim").on("outbox_events").columns([
|
|
6384
6455
|
"processed_at",
|
|
6385
6456
|
"claim_expires_at",
|
|
@@ -6387,156 +6458,168 @@ async function d_(e) {
|
|
|
6387
6458
|
"created_at"
|
|
6388
6459
|
]).execute();
|
|
6389
6460
|
}
|
|
6390
|
-
async function
|
|
6461
|
+
async function g_(e) {
|
|
6391
6462
|
await e.schema.dropIndex("idx_outbox_claim").on("outbox_events").execute();
|
|
6392
6463
|
}
|
|
6393
|
-
const
|
|
6464
|
+
const w_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6394
6465
|
__proto__: null,
|
|
6395
|
-
down:
|
|
6396
|
-
up:
|
|
6466
|
+
down: g_,
|
|
6467
|
+
up: f_
|
|
6468
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
6469
|
+
async function y_(e) {
|
|
6470
|
+
await e.schema.createTable("hook_code").addColumn("id", "varchar(21)", (t) => t.primaryKey()).addColumn("tenant_id", "varchar(191)", (t) => t.notNull()).addColumn("code", "text", (t) => t.notNull()).addColumn("secrets", "text").addColumn("created_at_ts", "bigint", (t) => t.notNull()).addColumn("updated_at_ts", "bigint", (t) => t.notNull()).execute(), await e.schema.createIndex("idx_hook_code_tenant").on("hook_code").columns(["tenant_id"]).execute(), await e.schema.alterTable("hooks").addColumn("code_id", "varchar(21)").execute();
|
|
6471
|
+
}
|
|
6472
|
+
async function v_(e) {
|
|
6473
|
+
await e.schema.alterTable("hooks").dropColumn("code_id").execute(), await e.schema.dropTable("hook_code").execute();
|
|
6474
|
+
}
|
|
6475
|
+
const C_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6476
|
+
__proto__: null,
|
|
6477
|
+
down: v_,
|
|
6478
|
+
up: y_
|
|
6397
6479
|
}, Symbol.toStringTag, { value: "Module" })), Te = {
|
|
6398
|
-
m1_init:
|
|
6399
|
-
m2_magicLink:
|
|
6400
|
-
m3_updateAt:
|
|
6401
|
-
m4_logTable:
|
|
6402
|
-
m5_userProfile:
|
|
6403
|
-
m6_sessions:
|
|
6404
|
-
m7_passwords:
|
|
6405
|
-
m8_logsTableNewFields:
|
|
6406
|
-
m9_passwordTableNewField:
|
|
6407
|
-
n01_codesTable:
|
|
6408
|
-
n11_universalLoginSession:
|
|
6409
|
-
n12_userFields:
|
|
6410
|
-
n13_userEmailIndex:
|
|
6411
|
-
n14_profileDataField:
|
|
6412
|
-
n15_userEmailIndex:
|
|
6413
|
-
n16_userLocale:
|
|
6414
|
-
n17_signingKeys:
|
|
6415
|
-
n18_logsFields:
|
|
6416
|
-
n19_connectionsUserinfo:
|
|
6417
|
-
n20_missingFields:
|
|
6418
|
-
n21_sessionDeletedAt:
|
|
6419
|
-
n22_dropLogsFields:
|
|
6420
|
-
n23_dropUsersFields:
|
|
6421
|
-
n24_logsIndexes:
|
|
6422
|
-
n25_logDescMaxLength:
|
|
6423
|
-
n26_logsTableExtraFields:
|
|
6424
|
-
n27_usersTableNameIndex:
|
|
6425
|
-
n28_usersEmailConstrain:
|
|
6426
|
-
n29_increaseOtpStateLength:
|
|
6427
|
-
n30_increaseTicketStateLength:
|
|
6428
|
-
n31_branding:
|
|
6429
|
-
n32_indexesAndNotNull:
|
|
6430
|
-
n33_vendorIdInUniversalLoginSession:
|
|
6431
|
-
n34_auth0ClientInUniversalLoginSession:
|
|
6432
|
-
n35_increaseUniversalSessionStateLength:
|
|
6433
|
-
n36_authenticationCodes:
|
|
6434
|
-
n37_disableSignUps:
|
|
6435
|
-
n38_otpIpAddress:
|
|
6436
|
-
n39_increaseUserAgentLength:
|
|
6437
|
-
n40_userId:
|
|
6438
|
-
n41_hooks:
|
|
6439
|
-
n42_userIdIndexes:
|
|
6440
|
-
n43_userIdIndexes:
|
|
6441
|
-
n44_codes:
|
|
6442
|
-
n45_hookProperties:
|
|
6443
|
-
n46_loginAuth0Client:
|
|
6444
|
-
n47_loginAuth0Client:
|
|
6445
|
-
n48_saml:
|
|
6446
|
-
n49_removeFields:
|
|
6447
|
-
n50_authParamsNonce:
|
|
6448
|
-
n51_connectionid:
|
|
6449
|
-
n52_cert:
|
|
6450
|
-
n53_codes_primary_key:
|
|
6451
|
-
n54_cleanup_tables:
|
|
6452
|
-
n55_logs_index:
|
|
6453
|
-
n56_application_fields:
|
|
6454
|
-
n57_prompt_settings:
|
|
6455
|
-
n58_connection_client_id:
|
|
6456
|
-
n59_connection_options:
|
|
6457
|
-
n60_users_metadata:
|
|
6458
|
-
n61_userLocales:
|
|
6459
|
-
n62_prompt:
|
|
6460
|
-
n63_connection_cleanup:
|
|
6461
|
-
n64_act_as:
|
|
6462
|
-
n65_code_verifier:
|
|
6463
|
-
n66_email_providers:
|
|
6464
|
-
n67_drop_tickets:
|
|
6465
|
-
n68_login_useragents:
|
|
6466
|
-
n70_refresh_tokens:
|
|
6467
|
-
n71_session_new_fields:
|
|
6468
|
-
n72_session_primary_key:
|
|
6469
|
-
n73_drop_sessions:
|
|
6470
|
-
n74_custom_domains:
|
|
6471
|
-
n75_organizations:
|
|
6472
|
-
n76_authorization_url_length:
|
|
6473
|
-
n77_drop_sessions:
|
|
6474
|
-
n78_login_sessions:
|
|
6475
|
-
n79_drop_sessions_2:
|
|
6476
|
-
n80_recreate_custom_domains:
|
|
6477
|
-
n81_phone:
|
|
6478
|
-
n82_forms:
|
|
6479
|
-
n83_addFormsIdToHooks:
|
|
6480
|
-
n84_login_completed:
|
|
6481
|
-
n85_add_login_session_id_to_sessions:
|
|
6482
|
-
n86_index_sessions_login_session_id:
|
|
6483
|
-
n87_code_challenge:
|
|
6484
|
-
n88_add_redirect_uri_to_codes:
|
|
6485
|
-
n89_add_nonce_and_state_to_codes:
|
|
6486
|
-
n90_themes:
|
|
6487
|
-
n91_resource_servers_rules_permissions:
|
|
6488
|
-
n92_role_permissions:
|
|
6489
|
-
n93_add_permissions_to_roles:
|
|
6490
|
-
n94_keys_connection_and_extend_columns:
|
|
6491
|
-
n95_create_organizations_table:
|
|
6492
|
-
n96_create_user_organizations_table:
|
|
6493
|
-
n97_add_organization_to_user_permissions_and_roles:
|
|
6494
|
-
n98_clients:
|
|
6495
|
-
n99_update_client_foreign_keys:
|
|
6496
|
-
o001_client_grants:
|
|
6497
|
-
o002_drop_applications:
|
|
6498
|
-
o003_phone_number_index:
|
|
6499
|
-
o004_login_sessions_id_index:
|
|
6500
|
-
o005_connections_tenant_index:
|
|
6501
|
-
o006_remove_redundant_user_organizations_tenant_index:
|
|
6502
|
-
o007_tenant_settings:
|
|
6503
|
-
o008_merge_tenant_settings_into_tenants:
|
|
6504
|
-
o009_create_invites_table:
|
|
6505
|
-
o010_add_log_id_to_logs:
|
|
6506
|
-
o011_add_location_info_to_logs:
|
|
6507
|
-
o012_add_password_history:
|
|
6508
|
-
o013_connection_display_name:
|
|
6509
|
-
o014_client_connections:
|
|
6510
|
-
o015_flows:
|
|
6511
|
-
o016_add_is_system_column:
|
|
6512
|
-
o017_connections_composite_key:
|
|
6513
|
-
o018_login_session_state:
|
|
6514
|
-
o019_roles_resource_servers_metadata:
|
|
6515
|
-
o020_session_add_timestamp_columns:
|
|
6516
|
-
o021_session_cleanup_and_ulid:
|
|
6517
|
-
o022_oidc_profile_claims:
|
|
6518
|
-
o023_preferred_username:
|
|
6519
|
-
o024_user_address:
|
|
6520
|
-
o025_authparams_max_age:
|
|
6521
|
-
o026_auth0_conformant:
|
|
6522
|
-
o027_universal_login_templates:
|
|
6523
|
-
o028_custom_text:
|
|
6524
|
-
o029_guardian_mfa:
|
|
6525
|
-
o030_add_template_id_to_hooks:
|
|
6526
|
-
o031_hooks_cleanup:
|
|
6527
|
-
o032_unique_username_provider:
|
|
6528
|
-
o033_add_login_id_to_refresh_tokens:
|
|
6529
|
-
o034_refresh_tokens_replace_session_id_with_login_id:
|
|
6530
|
-
o035_idle_expires_at_ts_indexes:
|
|
6531
|
-
o036_add_connection_to_login_sessions:
|
|
6532
|
-
o037_mfa_enrollments:
|
|
6533
|
-
o038_add_otp_to_codes:
|
|
6534
|
-
o039_rename_mfa_enrollments_to_authentication_methods:
|
|
6535
|
-
o040_create_outbox_events:
|
|
6536
|
-
o041_add_outbox_claim_columns:
|
|
6537
|
-
o042_add_outbox_claim_index:
|
|
6480
|
+
m1_init: Oo,
|
|
6481
|
+
m2_magicLink: Eo,
|
|
6482
|
+
m3_updateAt: Po,
|
|
6483
|
+
m4_logTable: jo,
|
|
6484
|
+
m5_userProfile: Mo,
|
|
6485
|
+
m6_sessions: Ko,
|
|
6486
|
+
m7_passwords: Bo,
|
|
6487
|
+
m8_logsTableNewFields: Ho,
|
|
6488
|
+
m9_passwordTableNewField: Vo,
|
|
6489
|
+
n01_codesTable: er,
|
|
6490
|
+
n11_universalLoginSession: nr,
|
|
6491
|
+
n12_userFields: sr,
|
|
6492
|
+
n13_userEmailIndex: lr,
|
|
6493
|
+
n14_profileDataField: _r,
|
|
6494
|
+
n15_userEmailIndex: pr,
|
|
6495
|
+
n16_userLocale: wr,
|
|
6496
|
+
n17_signingKeys: Cr,
|
|
6497
|
+
n18_logsFields: Nr,
|
|
6498
|
+
n19_connectionsUserinfo: Or,
|
|
6499
|
+
n20_missingFields: Er,
|
|
6500
|
+
n21_sessionDeletedAt: Pr,
|
|
6501
|
+
n22_dropLogsFields: jr,
|
|
6502
|
+
n23_dropUsersFields: Mr,
|
|
6503
|
+
n24_logsIndexes: Kr,
|
|
6504
|
+
n25_logDescMaxLength: Br,
|
|
6505
|
+
n26_logsTableExtraFields: Hr,
|
|
6506
|
+
n27_usersTableNameIndex: Vr,
|
|
6507
|
+
n28_usersEmailConstrain: es,
|
|
6508
|
+
n29_increaseOtpStateLength: ns,
|
|
6509
|
+
n30_increaseTicketStateLength: ss,
|
|
6510
|
+
n31_branding: ls,
|
|
6511
|
+
n32_indexesAndNotNull: _s,
|
|
6512
|
+
n33_vendorIdInUniversalLoginSession: ps,
|
|
6513
|
+
n34_auth0ClientInUniversalLoginSession: ws,
|
|
6514
|
+
n35_increaseUniversalSessionStateLength: Cs,
|
|
6515
|
+
n36_authenticationCodes: Ns,
|
|
6516
|
+
n37_disableSignUps: Os,
|
|
6517
|
+
n38_otpIpAddress: Es,
|
|
6518
|
+
n39_increaseUserAgentLength: Ps,
|
|
6519
|
+
n40_userId: js,
|
|
6520
|
+
n41_hooks: Ms,
|
|
6521
|
+
n42_userIdIndexes: Ks,
|
|
6522
|
+
n43_userIdIndexes: Bs,
|
|
6523
|
+
n44_codes: Hs,
|
|
6524
|
+
n45_hookProperties: Vs,
|
|
6525
|
+
n46_loginAuth0Client: ei,
|
|
6526
|
+
n47_loginAuth0Client: ni,
|
|
6527
|
+
n48_saml: si,
|
|
6528
|
+
n49_removeFields: li,
|
|
6529
|
+
n50_authParamsNonce: _i,
|
|
6530
|
+
n51_connectionid: pi,
|
|
6531
|
+
n52_cert: wi,
|
|
6532
|
+
n53_codes_primary_key: Ci,
|
|
6533
|
+
n54_cleanup_tables: Ni,
|
|
6534
|
+
n55_logs_index: Oi,
|
|
6535
|
+
n56_application_fields: Ei,
|
|
6536
|
+
n57_prompt_settings: Pi,
|
|
6537
|
+
n58_connection_client_id: ji,
|
|
6538
|
+
n59_connection_options: Mi,
|
|
6539
|
+
n60_users_metadata: Ki,
|
|
6540
|
+
n61_userLocales: Bi,
|
|
6541
|
+
n62_prompt: Hi,
|
|
6542
|
+
n63_connection_cleanup: Vi,
|
|
6543
|
+
n64_act_as: ec,
|
|
6544
|
+
n65_code_verifier: nc,
|
|
6545
|
+
n66_email_providers: sc,
|
|
6546
|
+
n67_drop_tickets: lc,
|
|
6547
|
+
n68_login_useragents: _c,
|
|
6548
|
+
n70_refresh_tokens: pc,
|
|
6549
|
+
n71_session_new_fields: wc,
|
|
6550
|
+
n72_session_primary_key: Cc,
|
|
6551
|
+
n73_drop_sessions: Nc,
|
|
6552
|
+
n74_custom_domains: Oc,
|
|
6553
|
+
n75_organizations: Ec,
|
|
6554
|
+
n76_authorization_url_length: Pc,
|
|
6555
|
+
n77_drop_sessions: jc,
|
|
6556
|
+
n78_login_sessions: Mc,
|
|
6557
|
+
n79_drop_sessions_2: Kc,
|
|
6558
|
+
n80_recreate_custom_domains: Bc,
|
|
6559
|
+
n81_phone: Hc,
|
|
6560
|
+
n82_forms: Vc,
|
|
6561
|
+
n83_addFormsIdToHooks: el,
|
|
6562
|
+
n84_login_completed: nl,
|
|
6563
|
+
n85_add_login_session_id_to_sessions: sl,
|
|
6564
|
+
n86_index_sessions_login_session_id: ll,
|
|
6565
|
+
n87_code_challenge: _l,
|
|
6566
|
+
n88_add_redirect_uri_to_codes: pl,
|
|
6567
|
+
n89_add_nonce_and_state_to_codes: wl,
|
|
6568
|
+
n90_themes: Cl,
|
|
6569
|
+
n91_resource_servers_rules_permissions: Nl,
|
|
6570
|
+
n92_role_permissions: Ol,
|
|
6571
|
+
n93_add_permissions_to_roles: El,
|
|
6572
|
+
n94_keys_connection_and_extend_columns: Pl,
|
|
6573
|
+
n95_create_organizations_table: jl,
|
|
6574
|
+
n96_create_user_organizations_table: Ml,
|
|
6575
|
+
n97_add_organization_to_user_permissions_and_roles: Kl,
|
|
6576
|
+
n98_clients: Bl,
|
|
6577
|
+
n99_update_client_foreign_keys: Xl,
|
|
6578
|
+
o001_client_grants: td,
|
|
6579
|
+
o002_drop_applications: od,
|
|
6580
|
+
o003_phone_number_index: id,
|
|
6581
|
+
o004_login_sessions_id_index: dd,
|
|
6582
|
+
o005_connections_tenant_index: md,
|
|
6583
|
+
o006_remove_redundant_user_organizations_tenant_index: fd,
|
|
6584
|
+
o007_tenant_settings: yd,
|
|
6585
|
+
o008_merge_tenant_settings_into_tenants: xd,
|
|
6586
|
+
o009_create_invites_table: bd,
|
|
6587
|
+
o010_add_log_id_to_logs: kd,
|
|
6588
|
+
o011_add_location_info_to_logs: Id,
|
|
6589
|
+
o012_add_password_history: Dd,
|
|
6590
|
+
o013_connection_display_name: Fd,
|
|
6591
|
+
o014_client_connections: Jd,
|
|
6592
|
+
o015_flows: qd,
|
|
6593
|
+
o016_add_is_system_column: Qd,
|
|
6594
|
+
o017_connections_composite_key: Wd,
|
|
6595
|
+
o018_login_session_state: Xd,
|
|
6596
|
+
o019_roles_resource_servers_metadata: tu,
|
|
6597
|
+
o020_session_add_timestamp_columns: ru,
|
|
6598
|
+
o021_session_cleanup_and_ulid: cu,
|
|
6599
|
+
o022_oidc_profile_claims: uu,
|
|
6600
|
+
o023_preferred_username: hu,
|
|
6601
|
+
o024_user_address: gu,
|
|
6602
|
+
o025_authparams_max_age: vu,
|
|
6603
|
+
o026_auth0_conformant: Tu,
|
|
6604
|
+
o027_universal_login_templates: Su,
|
|
6605
|
+
o028_custom_text: $u,
|
|
6606
|
+
o029_guardian_mfa: zu,
|
|
6607
|
+
o030_add_template_id_to_hooks: ju,
|
|
6608
|
+
o031_hooks_cleanup: Mu,
|
|
6609
|
+
o032_unique_username_provider: Ku,
|
|
6610
|
+
o033_add_login_id_to_refresh_tokens: Bu,
|
|
6611
|
+
o034_refresh_tokens_replace_session_id_with_login_id: Hu,
|
|
6612
|
+
o035_idle_expires_at_ts_indexes: Vu,
|
|
6613
|
+
o036_add_connection_to_login_sessions: e_,
|
|
6614
|
+
o037_mfa_enrollments: n_,
|
|
6615
|
+
o038_add_otp_to_codes: s_,
|
|
6616
|
+
o039_rename_mfa_enrollments_to_authentication_methods: l_,
|
|
6617
|
+
o040_create_outbox_events: __,
|
|
6618
|
+
o041_add_outbox_claim_columns: p_,
|
|
6619
|
+
o042_add_outbox_claim_index: w_,
|
|
6620
|
+
o043_add_code_hooks: C_
|
|
6538
6621
|
};
|
|
6539
|
-
async function
|
|
6622
|
+
async function k_(e, t = !1) {
|
|
6540
6623
|
t && console.log("migrating...");
|
|
6541
6624
|
const a = new we(Te), n = new ce({
|
|
6542
6625
|
db: e,
|
|
@@ -6549,7 +6632,7 @@ async function y_(e, t = !1) {
|
|
|
6549
6632
|
}), o)
|
|
6550
6633
|
throw console.error("failed to migrate"), console.error(o), o;
|
|
6551
6634
|
}
|
|
6552
|
-
async function
|
|
6635
|
+
async function $_(e) {
|
|
6553
6636
|
console.log("migrating...");
|
|
6554
6637
|
const t = new we(Te), a = new ce({
|
|
6555
6638
|
db: e,
|
|
@@ -6560,46 +6643,50 @@ async function v_(e) {
|
|
|
6560
6643
|
}), n)
|
|
6561
6644
|
throw console.error("failed to migrate"), console.error(n), n;
|
|
6562
6645
|
}
|
|
6563
|
-
function
|
|
6646
|
+
function x_(e, t = { useTransactions: !0 }) {
|
|
6564
6647
|
const a = {
|
|
6565
|
-
branding:
|
|
6566
|
-
clients:
|
|
6567
|
-
clientConnections:
|
|
6568
|
-
clientGrants:
|
|
6648
|
+
branding: wa(e),
|
|
6649
|
+
clients: Qt(e),
|
|
6650
|
+
clientConnections: Xt(e),
|
|
6651
|
+
clientGrants: oa(e),
|
|
6569
6652
|
codes: Nt(e),
|
|
6570
|
-
connections:
|
|
6571
|
-
emailProviders:
|
|
6572
|
-
customDomains:
|
|
6573
|
-
flows:
|
|
6574
|
-
forms:
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6653
|
+
connections: Mt(e),
|
|
6654
|
+
emailProviders: en(e),
|
|
6655
|
+
customDomains: pa(e),
|
|
6656
|
+
flows: He(e),
|
|
6657
|
+
forms: pn(e),
|
|
6658
|
+
hookCode: Pa(e),
|
|
6659
|
+
hooks: ka(e),
|
|
6660
|
+
invites: so(e),
|
|
6661
|
+
keys: ca(e),
|
|
6662
|
+
loginSessions: Qa(e),
|
|
6579
6663
|
logs: st(e),
|
|
6580
|
-
authenticationMethods:
|
|
6664
|
+
authenticationMethods: fo(e),
|
|
6581
6665
|
passwords: gt(e),
|
|
6582
|
-
promptSettings:
|
|
6583
|
-
refreshTokens:
|
|
6584
|
-
resourceServers:
|
|
6585
|
-
rolePermissions:
|
|
6586
|
-
userPermissions:
|
|
6587
|
-
userRoles:
|
|
6588
|
-
roles:
|
|
6666
|
+
promptSettings: Wa(e),
|
|
6667
|
+
refreshTokens: sn(e),
|
|
6668
|
+
resourceServers: Cn(e),
|
|
6669
|
+
rolePermissions: In(e),
|
|
6670
|
+
userPermissions: jn(e),
|
|
6671
|
+
userRoles: Ln(e),
|
|
6672
|
+
roles: On(e),
|
|
6589
6673
|
sessions: _t(e),
|
|
6590
|
-
sessionCleanup:
|
|
6674
|
+
sessionCleanup: ln(e),
|
|
6591
6675
|
tenants: tt(e),
|
|
6592
|
-
themes:
|
|
6593
|
-
universalLoginTemplates:
|
|
6594
|
-
customText:
|
|
6676
|
+
themes: Ra(e),
|
|
6677
|
+
universalLoginTemplates: xa(e),
|
|
6678
|
+
customText: lo(e),
|
|
6595
6679
|
users: Ke(e),
|
|
6596
|
-
organizations:
|
|
6597
|
-
userOrganizations:
|
|
6598
|
-
stats:
|
|
6599
|
-
outbox:
|
|
6680
|
+
organizations: Yn(e),
|
|
6681
|
+
userOrganizations: eo(e),
|
|
6682
|
+
stats: co(e),
|
|
6683
|
+
outbox: No(e),
|
|
6600
6684
|
async transaction(n) {
|
|
6601
6685
|
return t.useTransactions === !1 ? n(a) : e.transaction().execute(async (o) => {
|
|
6602
|
-
const r =
|
|
6686
|
+
const r = x_(o, {
|
|
6687
|
+
...t,
|
|
6688
|
+
useTransactions: !1
|
|
6689
|
+
});
|
|
6603
6690
|
return n(r);
|
|
6604
6691
|
});
|
|
6605
6692
|
}
|
|
@@ -6607,7 +6694,7 @@ function m_(e, t = { useTransactions: !0 }) {
|
|
|
6607
6694
|
return a;
|
|
6608
6695
|
}
|
|
6609
6696
|
export {
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6697
|
+
x_ as default,
|
|
6698
|
+
$_ as migrateDown,
|
|
6699
|
+
k_ as migrateToLatest
|
|
6613
6700
|
};
|