@kyro-cms/core 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/WebhookService-BCgL1bLF.d.cts +112 -0
- package/dist/WebhookService-BPVJUgTl.d.ts +112 -0
- package/dist/{base-DlhVlwnN.d.cts → base-B0Y6isUJ.d.cts} +1 -1
- package/dist/{base-CQkFzqQl.d.ts → base-DaP-5PPG.d.ts} +1 -1
- package/dist/bootstrap-BMWVB2T6.cjs +31 -0
- package/dist/{bootstrap-X6TP3NKX.cjs.map → bootstrap-BMWVB2T6.cjs.map} +1 -1
- package/dist/bootstrap-LL6O7PWO.js +6 -0
- package/dist/{bootstrap-BDTTUGY2.js.map → bootstrap-LL6O7PWO.js.map} +1 -1
- package/dist/{chunk-3VZCX4DF.cjs → chunk-42JPONZU.cjs} +77 -14
- package/dist/chunk-42JPONZU.cjs.map +1 -0
- package/dist/{chunk-MHS6CPO5.cjs → chunk-4M5PHMUE.cjs} +66 -346
- package/dist/chunk-4M5PHMUE.cjs.map +1 -0
- package/dist/chunk-4PWRCMTQ.cjs +15 -0
- package/dist/chunk-4PWRCMTQ.cjs.map +1 -0
- package/dist/chunk-6COM32WF.js +47 -0
- package/dist/chunk-6COM32WF.js.map +1 -0
- package/dist/chunk-6MSSF46R.js +941 -0
- package/dist/chunk-6MSSF46R.js.map +1 -0
- package/dist/{chunk-TZFJMPCH.cjs → chunk-7YITG2US.cjs} +9 -18
- package/dist/chunk-7YITG2US.cjs.map +1 -0
- package/dist/{chunk-A3RQWHKD.cjs → chunk-BLMFBDBG.cjs} +56 -6
- package/dist/chunk-BLMFBDBG.cjs.map +1 -0
- package/dist/{chunk-EINVJPFM.js → chunk-BTOE3VUK.js} +65 -3
- package/dist/chunk-BTOE3VUK.js.map +1 -0
- package/dist/chunk-E5X75WNB.js +497 -0
- package/dist/chunk-E5X75WNB.js.map +1 -0
- package/dist/chunk-E63IF3MD.cjs +951 -0
- package/dist/chunk-E63IF3MD.cjs.map +1 -0
- package/dist/{chunk-K7QF2QCM.cjs → chunk-FTSSDDZQ.cjs} +7 -3
- package/dist/chunk-FTSSDDZQ.cjs.map +1 -0
- package/dist/chunk-G7VZBCD6.cjs +35 -0
- package/dist/{chunk-5BLDMQED.cjs.map → chunk-G7VZBCD6.cjs.map} +1 -1
- package/dist/{chunk-VMSRTAH7.js → chunk-GLCPGZPM.js} +56 -6
- package/dist/chunk-GLCPGZPM.js.map +1 -0
- package/dist/{chunk-V3B25QOK.cjs → chunk-GVFB5C6O.cjs} +74 -2
- package/dist/chunk-GVFB5C6O.cjs.map +1 -0
- package/dist/chunk-HVSQDZZJ.cjs +765 -0
- package/dist/chunk-HVSQDZZJ.cjs.map +1 -0
- package/dist/chunk-HYC4GNHX.js +758 -0
- package/dist/chunk-HYC4GNHX.js.map +1 -0
- package/dist/chunk-KDVDIZ4Y.cjs +3479 -0
- package/dist/chunk-KDVDIZ4Y.cjs.map +1 -0
- package/dist/{chunk-OG3KX56O.js → chunk-KWGNR4HM.js} +7 -3
- package/dist/chunk-KWGNR4HM.js.map +1 -0
- package/dist/chunk-LIJVWQKU.cjs +256 -0
- package/dist/chunk-LIJVWQKU.cjs.map +1 -0
- package/dist/{chunk-XTZSUDSI.js → chunk-LTRCYJAG.js} +3 -18
- package/dist/chunk-LTRCYJAG.js.map +1 -0
- package/dist/{chunk-UEYC46RL.js → chunk-OUGKLCYF.js} +71 -8
- package/dist/chunk-OUGKLCYF.js.map +1 -0
- package/dist/chunk-RONAX6UU.js +3456 -0
- package/dist/chunk-RONAX6UU.js.map +1 -0
- package/dist/{chunk-C74MQIRL.js → chunk-RRYXQMZG.js} +66 -344
- package/dist/chunk-RRYXQMZG.js.map +1 -0
- package/dist/{chunk-QUJ4OLSC.js → chunk-U74F3YZU.js} +87 -7
- package/dist/chunk-U74F3YZU.js.map +1 -0
- package/dist/chunk-VIONYQ2K.cjs +517 -0
- package/dist/chunk-VIONYQ2K.cjs.map +1 -0
- package/dist/chunk-VSTRLXMQ.cjs +50 -0
- package/dist/chunk-VSTRLXMQ.cjs.map +1 -0
- package/dist/chunk-YT7HXXVN.js +13 -0
- package/dist/chunk-YT7HXXVN.js.map +1 -0
- package/dist/chunk-Z6ZWNWWR.js +30 -0
- package/dist/{chunk-NSBPE2FW.js.map → chunk-Z6ZWNWWR.js.map} +1 -1
- package/dist/cli/index.cjs +11 -7
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +11 -7
- package/dist/cli/index.js.map +1 -1
- package/dist/drizzle/index.cjs +20 -17
- package/dist/drizzle/index.d.cts +4 -4
- package/dist/drizzle/index.d.ts +4 -4
- package/dist/drizzle/index.js +4 -5
- package/dist/graphql/index.cjs +4 -4
- package/dist/graphql/index.d.cts +3 -2
- package/dist/graphql/index.d.ts +3 -2
- package/dist/graphql/index.js +2 -2
- package/dist/{index-DI0DRPNv.d.cts → index-BwE4NueJ.d.cts} +1 -1
- package/dist/{index-CMUNCIWQ.d.ts → index-DUKmDSeC.d.cts} +96 -24
- package/dist/{index-BMySjW6o.d.cts → index-DtBi3zP0.d.ts} +96 -24
- package/dist/{index-4fJKLFK2.d.ts → index-DupWTmW6.d.ts} +1 -1
- package/dist/index.cjs +3317 -352
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +379 -105
- package/dist/index.d.ts +379 -105
- package/dist/index.js +3211 -310
- package/dist/index.js.map +1 -1
- package/dist/media-HOT3O7RW.js +4 -0
- package/dist/media-HOT3O7RW.js.map +1 -0
- package/dist/media-WKP5AOX2.cjs +17 -0
- package/dist/media-WKP5AOX2.cjs.map +1 -0
- package/dist/mongodb/index.cjs +1 -1
- package/dist/mongodb/index.d.cts +2 -2
- package/dist/mongodb/index.d.ts +2 -2
- package/dist/mongodb/index.js +1 -1
- package/dist/mysql-media-AI6YK767.cjs +48 -0
- package/dist/mysql-media-AI6YK767.cjs.map +1 -0
- package/dist/mysql-media-CDZUS7YX.js +45 -0
- package/dist/mysql-media-CDZUS7YX.js.map +1 -0
- package/dist/postgres-auth-adapter-EVRPO7BQ.cjs +14 -0
- package/dist/{postgres-auth-adapter-VK6GY7LX.cjs.map → postgres-auth-adapter-EVRPO7BQ.cjs.map} +1 -1
- package/dist/postgres-auth-adapter-OTRWSTT5.js +5 -0
- package/dist/{postgres-auth-adapter-REJFUMP7.js.map → postgres-auth-adapter-OTRWSTT5.js.map} +1 -1
- package/dist/redis-adapter-2N6VA7BI.cjs +13 -0
- package/dist/{redis-adapter-LBLNKGNS.cjs.map → redis-adapter-2N6VA7BI.cjs.map} +1 -1
- package/dist/redis-adapter-RA24FNCX.js +4 -0
- package/dist/{redis-adapter-4YDY4LWE.js.map → redis-adapter-RA24FNCX.js.map} +1 -1
- package/dist/rest/index.cjs +7 -5
- package/dist/rest/index.d.cts +29 -3
- package/dist/rest/index.d.ts +29 -3
- package/dist/rest/index.js +5 -3
- package/dist/schema-CNB2DDTX.js +6 -0
- package/dist/schema-CNB2DDTX.js.map +1 -0
- package/dist/schema-Y777CQQS.cjs +67 -0
- package/dist/schema-Y777CQQS.cjs.map +1 -0
- package/dist/templates/index.cjs +24 -28
- package/dist/templates/index.d.cts +2 -4
- package/dist/templates/index.d.ts +2 -4
- package/dist/templates/index.js +2 -2
- package/dist/trpc/index.cjs +12 -12
- package/dist/trpc/index.d.cts +19 -14
- package/dist/trpc/index.d.ts +19 -14
- package/dist/trpc/index.js +3 -3
- package/dist/{types-BGM5MV_K.d.cts → types-BM0s_YOy.d.cts} +67 -35
- package/dist/{types-BGM5MV_K.d.ts → types-BM0s_YOy.d.ts} +67 -35
- package/dist/ws/index.cjs +1 -1
- package/dist/ws/index.js +1 -1
- package/package.json +11 -1
- package/dist/bootstrap-BDTTUGY2.js +0 -4
- package/dist/bootstrap-X6TP3NKX.cjs +0 -29
- package/dist/chunk-3QX6KG2S.js +0 -2125
- package/dist/chunk-3QX6KG2S.js.map +0 -1
- package/dist/chunk-3VZCX4DF.cjs.map +0 -1
- package/dist/chunk-5BLDMQED.cjs +0 -18
- package/dist/chunk-7G6EVYCU.cjs +0 -94
- package/dist/chunk-7G6EVYCU.cjs.map +0 -1
- package/dist/chunk-A3RQWHKD.cjs.map +0 -1
- package/dist/chunk-C74MQIRL.js.map +0 -1
- package/dist/chunk-EINVJPFM.js.map +0 -1
- package/dist/chunk-F5B64H5S.cjs +0 -2149
- package/dist/chunk-F5B64H5S.cjs.map +0 -1
- package/dist/chunk-K7QF2QCM.cjs.map +0 -1
- package/dist/chunk-LRTZJJPD.js +0 -86
- package/dist/chunk-LRTZJJPD.js.map +0 -1
- package/dist/chunk-MHS6CPO5.cjs.map +0 -1
- package/dist/chunk-NSBPE2FW.js +0 -15
- package/dist/chunk-OG3KX56O.js.map +0 -1
- package/dist/chunk-QUJ4OLSC.js.map +0 -1
- package/dist/chunk-R3XIBBAW.cjs +0 -34
- package/dist/chunk-R3XIBBAW.cjs.map +0 -1
- package/dist/chunk-SDMNUYVU.js +0 -30
- package/dist/chunk-SDMNUYVU.js.map +0 -1
- package/dist/chunk-TZFJMPCH.cjs.map +0 -1
- package/dist/chunk-UEG7KMKC.cjs +0 -228
- package/dist/chunk-UEG7KMKC.cjs.map +0 -1
- package/dist/chunk-UEYC46RL.js.map +0 -1
- package/dist/chunk-V3B25QOK.cjs.map +0 -1
- package/dist/chunk-VMSRTAH7.js.map +0 -1
- package/dist/chunk-XTZSUDSI.js.map +0 -1
- package/dist/chunk-YD7Y25W7.cjs +0 -176
- package/dist/chunk-YD7Y25W7.cjs.map +0 -1
- package/dist/chunk-YPAFJ7EV.js +0 -225
- package/dist/chunk-YPAFJ7EV.js.map +0 -1
- package/dist/database-7CJOXEZR.js +0 -5
- package/dist/database-7CJOXEZR.js.map +0 -1
- package/dist/database-QOIV44GT.cjs +0 -22
- package/dist/database-QOIV44GT.cjs.map +0 -1
- package/dist/postgres-auth-adapter-REJFUMP7.js +0 -5
- package/dist/postgres-auth-adapter-VK6GY7LX.cjs +0 -14
- package/dist/redis-adapter-4YDY4LWE.js +0 -4
- package/dist/redis-adapter-LBLNKGNS.cjs +0 -13
package/dist/drizzle/index.cjs
CHANGED
|
@@ -1,45 +1,48 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
require('../chunk-TZFJMPCH.cjs');
|
|
3
|
+
var chunkGVFB5C6O_cjs = require('../chunk-GVFB5C6O.cjs');
|
|
4
|
+
var chunkLIJVWQKU_cjs = require('../chunk-LIJVWQKU.cjs');
|
|
5
|
+
require('../chunk-7YITG2US.cjs');
|
|
7
6
|
require('../chunk-RLTG4YZM.cjs');
|
|
8
|
-
require('../chunk-
|
|
7
|
+
require('../chunk-G7VZBCD6.cjs');
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
Object.defineProperty(exports, "DrizzleAdapter", {
|
|
13
12
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkGVFB5C6O_cjs.DrizzleAdapter; }
|
|
15
14
|
});
|
|
16
15
|
Object.defineProperty(exports, "collectionToDrizzleSchema", {
|
|
17
16
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkGVFB5C6O_cjs.collectionToDrizzleSchema; }
|
|
19
18
|
});
|
|
20
|
-
Object.defineProperty(exports, "
|
|
19
|
+
Object.defineProperty(exports, "createDatabase", {
|
|
21
20
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkGVFB5C6O_cjs.createDatabase; }
|
|
23
22
|
});
|
|
24
|
-
Object.defineProperty(exports, "
|
|
23
|
+
Object.defineProperty(exports, "createDrizzleAdapter", {
|
|
25
24
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkGVFB5C6O_cjs.createDrizzleAdapter; }
|
|
27
26
|
});
|
|
28
|
-
Object.defineProperty(exports, "
|
|
27
|
+
Object.defineProperty(exports, "fieldToDrizzleType", {
|
|
29
28
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkGVFB5C6O_cjs.fieldToDrizzleType; }
|
|
31
30
|
});
|
|
32
|
-
Object.defineProperty(exports, "
|
|
31
|
+
Object.defineProperty(exports, "genId", {
|
|
33
32
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkGVFB5C6O_cjs.genId; }
|
|
35
34
|
});
|
|
36
35
|
Object.defineProperty(exports, "runMigrations", {
|
|
37
36
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkGVFB5C6O_cjs.runMigrations; }
|
|
39
38
|
});
|
|
40
39
|
Object.defineProperty(exports, "seedDefaultRoles", {
|
|
41
40
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkGVFB5C6O_cjs.seedDefaultRoles; }
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, "PostgresAuthAdapter", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () { return chunkLIJVWQKU_cjs.PostgresAuthAdapter; }
|
|
43
46
|
});
|
|
44
47
|
//# sourceMappingURL=index.cjs.map
|
|
45
48
|
//# sourceMappingURL=index.cjs.map
|
package/dist/drizzle/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { D as DrizzleAdapter, P as PostgresAuthAdapter,
|
|
2
|
-
import '../base-
|
|
3
|
-
import '../types-
|
|
1
|
+
export { D as Dialect, h as DrizzleAdapter, P as PostgresAuthAdapter, i as collectionToDrizzleSchema, k as createDatabase, l as createDrizzleAdapter, m as fieldToDrizzleType, n as genId, r as runMigrations, s as seedDefaultRoles } from '../index-DUKmDSeC.cjs';
|
|
2
|
+
import '../base-B0Y6isUJ.cjs';
|
|
3
|
+
import '../types-BM0s_YOy.cjs';
|
|
4
4
|
import 'drizzle-orm/postgres-js';
|
|
5
|
-
import '
|
|
5
|
+
import 'ioredis';
|
package/dist/drizzle/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { D as DrizzleAdapter, P as PostgresAuthAdapter,
|
|
2
|
-
import '../base-
|
|
3
|
-
import '../types-
|
|
1
|
+
export { D as Dialect, h as DrizzleAdapter, P as PostgresAuthAdapter, i as collectionToDrizzleSchema, k as createDatabase, l as createDrizzleAdapter, m as fieldToDrizzleType, n as genId, r as runMigrations, s as seedDefaultRoles } from '../index-DtBi3zP0.js';
|
|
2
|
+
import '../base-DaP-5PPG.js';
|
|
3
|
+
import '../types-BM0s_YOy.js';
|
|
4
4
|
import 'drizzle-orm/postgres-js';
|
|
5
|
-
import '
|
|
5
|
+
import 'ioredis';
|
package/dist/drizzle/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export { DrizzleAdapter, collectionToDrizzleSchema, createDrizzleAdapter, fieldToDrizzleType } from '../chunk-
|
|
2
|
-
export { PostgresAuthAdapter } from '../chunk-
|
|
3
|
-
|
|
4
|
-
import '../chunk-XTZSUDSI.js';
|
|
1
|
+
export { DrizzleAdapter, collectionToDrizzleSchema, createDatabase, createDrizzleAdapter, fieldToDrizzleType, genId, runMigrations, seedDefaultRoles } from '../chunk-BTOE3VUK.js';
|
|
2
|
+
export { PostgresAuthAdapter } from '../chunk-U74F3YZU.js';
|
|
3
|
+
import '../chunk-LTRCYJAG.js';
|
|
5
4
|
import '../chunk-BXMWDUED.js';
|
|
6
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-Z6ZWNWWR.js';
|
|
7
6
|
//# sourceMappingURL=index.js.map
|
|
8
7
|
//# sourceMappingURL=index.js.map
|
package/dist/graphql/index.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkFTSSDDZQ_cjs = require('../chunk-FTSSDDZQ.cjs');
|
|
4
|
+
require('../chunk-G7VZBCD6.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "buildGraphQLSchema", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkFTSSDDZQ_cjs.buildGraphQLSchema; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "createGraphQLSchema", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkFTSSDDZQ_cjs.createGraphQLSchema; }
|
|
15
15
|
});
|
|
16
16
|
//# sourceMappingURL=index.cjs.map
|
|
17
17
|
//# sourceMappingURL=index.cjs.map
|
package/dist/graphql/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GraphQLSchema } from 'graphql';
|
|
2
|
-
import { B as BaseAdapter, f as User, g as Request } from '../types-
|
|
3
|
-
import { R as Registry } from '../index-
|
|
2
|
+
import { B as BaseAdapter, f as User, g as Request } from '../types-BM0s_YOy.cjs';
|
|
3
|
+
import { R as Registry } from '../index-BwE4NueJ.cjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
interface GraphQLSchemaOptions {
|
|
@@ -9,6 +9,7 @@ interface GraphQLSchemaOptions {
|
|
|
9
9
|
user?: User;
|
|
10
10
|
req?: Request;
|
|
11
11
|
tenantID?: string;
|
|
12
|
+
settings?: Record<string, any>;
|
|
12
13
|
}
|
|
13
14
|
declare function buildGraphQLSchema(options: GraphQLSchemaOptions): GraphQLSchema;
|
|
14
15
|
declare function createGraphQLSchema(registry: Registry, db: BaseAdapter, options?: {
|
package/dist/graphql/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GraphQLSchema } from 'graphql';
|
|
2
|
-
import { B as BaseAdapter, f as User, g as Request } from '../types-
|
|
3
|
-
import { R as Registry } from '../index-
|
|
2
|
+
import { B as BaseAdapter, f as User, g as Request } from '../types-BM0s_YOy.js';
|
|
3
|
+
import { R as Registry } from '../index-DupWTmW6.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
interface GraphQLSchemaOptions {
|
|
@@ -9,6 +9,7 @@ interface GraphQLSchemaOptions {
|
|
|
9
9
|
user?: User;
|
|
10
10
|
req?: Request;
|
|
11
11
|
tenantID?: string;
|
|
12
|
+
settings?: Record<string, any>;
|
|
12
13
|
}
|
|
13
14
|
declare function buildGraphQLSchema(options: GraphQLSchemaOptions): GraphQLSchema;
|
|
14
15
|
declare function createGraphQLSchema(registry: Registry, db: BaseAdapter, options?: {
|
package/dist/graphql/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { buildGraphQLSchema, createGraphQLSchema } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { buildGraphQLSchema, createGraphQLSchema } from '../chunk-KWGNR4HM.js';
|
|
2
|
+
import '../chunk-Z6ZWNWWR.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CollectionConfig, G as GlobalConfig, P as PluginConfig, F as Field } from './types-
|
|
1
|
+
import { C as CollectionConfig, G as GlobalConfig, P as PluginConfig, F as Field } from './types-BM0s_YOy.cjs';
|
|
2
2
|
import { ZodTypeAny } from 'zod';
|
|
3
3
|
|
|
4
4
|
declare class Registry {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { A as AbstractBaseAdapter } from './base-
|
|
2
|
-
import { a as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, U as UpdateArgs, D as DeleteArgs, C as CollectionConfig, F as Field } from './types-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import postgres from 'postgres';
|
|
1
|
+
import { A as AbstractBaseAdapter } from './base-B0Y6isUJ.cjs';
|
|
2
|
+
import { a as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, U as UpdateArgs, D as DeleteArgs, C as CollectionConfig, F as Field } from './types-BM0s_YOy.cjs';
|
|
3
|
+
import { PostgresJsDatabase } from 'drizzle-orm/postgres-js';
|
|
4
|
+
import Redis from 'ioredis';
|
|
6
5
|
|
|
7
6
|
declare function fieldToDrizzleType(field: Field, dialect?: 'postgres' | 'mysql' | 'sqlite'): string;
|
|
8
7
|
declare function collectionToDrizzleSchema(collection: CollectionConfig, dialect?: 'postgres' | 'mysql' | 'sqlite'): string;
|
|
@@ -49,6 +48,70 @@ declare function createDrizzleAdapter(options: {
|
|
|
49
48
|
schema?: any;
|
|
50
49
|
}): DrizzleAdapter;
|
|
51
50
|
|
|
51
|
+
type AuditAction = "login" | "logout" | "login_failed" | "register" | "verify_email" | "password_change" | "password_reset" | "password_reset_request" | "role_change" | "permission_change" | "document_create" | "document_update" | "document_delete" | "settings_change" | "user_lockout" | "user_unlock" | "user_create" | "user_update" | "user_delete" | "api_request" | "api_key_create" | "api_key_delete" | "tenant_create" | "tenant_delete";
|
|
52
|
+
interface AuditLog {
|
|
53
|
+
id: string;
|
|
54
|
+
timestamp: Date;
|
|
55
|
+
action: AuditAction;
|
|
56
|
+
userId?: string;
|
|
57
|
+
userEmail?: string;
|
|
58
|
+
role?: string;
|
|
59
|
+
resource: string;
|
|
60
|
+
resourceId?: string;
|
|
61
|
+
changes?: {
|
|
62
|
+
field: string;
|
|
63
|
+
old: any;
|
|
64
|
+
new: any;
|
|
65
|
+
}[];
|
|
66
|
+
ipAddress?: string;
|
|
67
|
+
userAgent?: string;
|
|
68
|
+
success: boolean;
|
|
69
|
+
error?: string;
|
|
70
|
+
metadata?: Record<string, any>;
|
|
71
|
+
}
|
|
72
|
+
interface AuditLogFilter {
|
|
73
|
+
userId?: string;
|
|
74
|
+
action?: AuditAction | AuditAction[];
|
|
75
|
+
resource?: string;
|
|
76
|
+
resourceId?: string;
|
|
77
|
+
success?: boolean;
|
|
78
|
+
startDate?: Date;
|
|
79
|
+
endDate?: Date;
|
|
80
|
+
limit?: number;
|
|
81
|
+
offset?: number;
|
|
82
|
+
}
|
|
83
|
+
declare class AuditLogger {
|
|
84
|
+
private redis;
|
|
85
|
+
private prefix;
|
|
86
|
+
private retentionDays;
|
|
87
|
+
constructor(redis: Redis, retentionDays?: number, prefix?: string);
|
|
88
|
+
log(data: Omit<AuditLog, "id" | "timestamp">): Promise<string>;
|
|
89
|
+
get(id: string): Promise<AuditLog | null>;
|
|
90
|
+
query(filter?: AuditLogFilter): Promise<{
|
|
91
|
+
logs: AuditLog[];
|
|
92
|
+
total: number;
|
|
93
|
+
}>;
|
|
94
|
+
getRecent(limit?: number): Promise<AuditLog[]>;
|
|
95
|
+
getUserActivity(userId: string, limit?: number): Promise<AuditLog[]>;
|
|
96
|
+
getStats(startDate?: Date, endDate?: Date): Promise<{
|
|
97
|
+
totalEvents: number;
|
|
98
|
+
byAction: Record<string, number>;
|
|
99
|
+
successRate: number;
|
|
100
|
+
failedLogins: number;
|
|
101
|
+
uniqueUsers: Set<string>;
|
|
102
|
+
}>;
|
|
103
|
+
cleanup(): Promise<number>;
|
|
104
|
+
private getKeyForDate;
|
|
105
|
+
private getKeysForDateRange;
|
|
106
|
+
private matchesFilter;
|
|
107
|
+
private serializeLog;
|
|
108
|
+
private deserializeLog;
|
|
109
|
+
}
|
|
110
|
+
declare function createAuditContext(req: Request): {
|
|
111
|
+
ipAddress: string;
|
|
112
|
+
userAgent: string;
|
|
113
|
+
};
|
|
114
|
+
|
|
52
115
|
interface AuthUser {
|
|
53
116
|
id: string;
|
|
54
117
|
email: string;
|
|
@@ -109,15 +172,17 @@ interface AuthResult {
|
|
|
109
172
|
interface AuthAdapter {
|
|
110
173
|
createUser(data: {
|
|
111
174
|
email: string;
|
|
112
|
-
|
|
113
|
-
role
|
|
175
|
+
password: string;
|
|
176
|
+
role?: UserRole;
|
|
114
177
|
tenantId?: string;
|
|
115
178
|
}): Promise<AuthUser>;
|
|
116
179
|
findUserByEmail(email: string): Promise<AuthUser | null>;
|
|
117
180
|
findUserById(id: string): Promise<AuthUser | null>;
|
|
118
|
-
updateUser(id: string, data: Partial<AuthUser>
|
|
181
|
+
updateUser(id: string, data: Partial<AuthUser> & {
|
|
182
|
+
password?: string;
|
|
183
|
+
}): Promise<AuthUser | null>;
|
|
119
184
|
deleteUser(id: string): Promise<boolean>;
|
|
120
|
-
verifyPassword(
|
|
185
|
+
verifyPassword(email: string, password: string): Promise<AuthUser | null>;
|
|
121
186
|
hashPassword(password: string): Promise<string>;
|
|
122
187
|
createSession(userId: string, data?: {
|
|
123
188
|
ipAddress?: string;
|
|
@@ -132,6 +197,11 @@ interface AuthAdapter {
|
|
|
132
197
|
addPasswordToHistory?(userId: string, passwordHash: string): Promise<void>;
|
|
133
198
|
getPasswordHistory?(userId: string, count?: number): Promise<string[]>;
|
|
134
199
|
isPasswordInHistory?(password: string, userId: string, historyCount?: number): Promise<boolean>;
|
|
200
|
+
findAuditLogs(filter: AuditLogFilter): Promise<{
|
|
201
|
+
logs: AuditLog[];
|
|
202
|
+
total: number;
|
|
203
|
+
}>;
|
|
204
|
+
createAuditLog(data: Omit<AuditLog, "id" | "timestamp">): Promise<AuditLog>;
|
|
135
205
|
}
|
|
136
206
|
|
|
137
207
|
interface PostgresAuthAdapterOptions {
|
|
@@ -148,7 +218,7 @@ declare class PostgresAuthAdapter implements AuthAdapter {
|
|
|
148
218
|
constructor(options: PostgresAuthAdapterOptions);
|
|
149
219
|
createUser(data: {
|
|
150
220
|
email: string;
|
|
151
|
-
|
|
221
|
+
password: string;
|
|
152
222
|
role?: UserRole;
|
|
153
223
|
tenantId?: string;
|
|
154
224
|
}): Promise<AuthUser>;
|
|
@@ -156,7 +226,7 @@ declare class PostgresAuthAdapter implements AuthAdapter {
|
|
|
156
226
|
findUserById(id: string): Promise<AuthUser | null>;
|
|
157
227
|
updateUser(id: string, data: Partial<AuthUser>): Promise<AuthUser | null>;
|
|
158
228
|
deleteUser(id: string): Promise<boolean>;
|
|
159
|
-
verifyPassword(
|
|
229
|
+
verifyPassword(email: string, password: string): Promise<AuthUser | null>;
|
|
160
230
|
hashPassword(password: string): Promise<string>;
|
|
161
231
|
createSession(userId: string, data?: {
|
|
162
232
|
ipAddress?: string;
|
|
@@ -177,22 +247,24 @@ declare class PostgresAuthAdapter implements AuthAdapter {
|
|
|
177
247
|
locked: boolean;
|
|
178
248
|
}>;
|
|
179
249
|
resetAttempts(userId: string): Promise<void>;
|
|
250
|
+
findAuditLogs(filter: AuditLogFilter): Promise<{
|
|
251
|
+
logs: AuditLog[];
|
|
252
|
+
total: number;
|
|
253
|
+
}>;
|
|
254
|
+
createAuditLog(data: Omit<AuditLog, "id" | "timestamp">): Promise<AuditLog>;
|
|
180
255
|
private userToAuthUser;
|
|
181
256
|
private sessionToSession;
|
|
182
257
|
}
|
|
183
258
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
259
|
+
type Dialect = "sqlite" | "postgres" | "mysql";
|
|
260
|
+
declare function genId(): string;
|
|
261
|
+
interface DatabaseResult {
|
|
262
|
+
db: any;
|
|
263
|
+
dialect: Dialect;
|
|
264
|
+
genId: () => string;
|
|
188
265
|
}
|
|
189
|
-
declare function createDatabase(
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
$client: postgres.Sql<{}>;
|
|
193
|
-
};
|
|
194
|
-
}>;
|
|
195
|
-
declare function runMigrations(db: ReturnType<typeof drizzle>): Promise<void>;
|
|
196
|
-
declare function seedDefaultRoles(db: ReturnType<typeof drizzle>): Promise<void>;
|
|
266
|
+
declare function createDatabase(): Promise<DatabaseResult>;
|
|
267
|
+
declare function runMigrations(_db: any, _dialect?: Dialect): Promise<void>;
|
|
268
|
+
declare function seedDefaultRoles(db: any): Promise<void>;
|
|
197
269
|
|
|
198
|
-
export { type AuthAdapter as A,
|
|
270
|
+
export { type AuthAdapter as A, type Dialect as D, type JWTPayload as J, type LoginCredentials as L, PostgresAuthAdapter as P, type RegisterData as R, type Session as S, type UserRole as U, type AuthUser as a, type AuditLog as b, type AuditLogFilter as c, type AuthTokenConfig as d, type AuthResult as e, type AuditAction as f, AuditLogger as g, DrizzleAdapter as h, collectionToDrizzleSchema as i, createAuditContext as j, createDatabase as k, createDrizzleAdapter as l, fieldToDrizzleType as m, genId as n, runMigrations as r, seedDefaultRoles as s };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { A as AbstractBaseAdapter } from './base-
|
|
2
|
-
import { a as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, U as UpdateArgs, D as DeleteArgs, C as CollectionConfig, F as Field } from './types-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import postgres from 'postgres';
|
|
1
|
+
import { A as AbstractBaseAdapter } from './base-DaP-5PPG.js';
|
|
2
|
+
import { a as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, U as UpdateArgs, D as DeleteArgs, C as CollectionConfig, F as Field } from './types-BM0s_YOy.js';
|
|
3
|
+
import { PostgresJsDatabase } from 'drizzle-orm/postgres-js';
|
|
4
|
+
import Redis from 'ioredis';
|
|
6
5
|
|
|
7
6
|
declare function fieldToDrizzleType(field: Field, dialect?: 'postgres' | 'mysql' | 'sqlite'): string;
|
|
8
7
|
declare function collectionToDrizzleSchema(collection: CollectionConfig, dialect?: 'postgres' | 'mysql' | 'sqlite'): string;
|
|
@@ -49,6 +48,70 @@ declare function createDrizzleAdapter(options: {
|
|
|
49
48
|
schema?: any;
|
|
50
49
|
}): DrizzleAdapter;
|
|
51
50
|
|
|
51
|
+
type AuditAction = "login" | "logout" | "login_failed" | "register" | "verify_email" | "password_change" | "password_reset" | "password_reset_request" | "role_change" | "permission_change" | "document_create" | "document_update" | "document_delete" | "settings_change" | "user_lockout" | "user_unlock" | "user_create" | "user_update" | "user_delete" | "api_request" | "api_key_create" | "api_key_delete" | "tenant_create" | "tenant_delete";
|
|
52
|
+
interface AuditLog {
|
|
53
|
+
id: string;
|
|
54
|
+
timestamp: Date;
|
|
55
|
+
action: AuditAction;
|
|
56
|
+
userId?: string;
|
|
57
|
+
userEmail?: string;
|
|
58
|
+
role?: string;
|
|
59
|
+
resource: string;
|
|
60
|
+
resourceId?: string;
|
|
61
|
+
changes?: {
|
|
62
|
+
field: string;
|
|
63
|
+
old: any;
|
|
64
|
+
new: any;
|
|
65
|
+
}[];
|
|
66
|
+
ipAddress?: string;
|
|
67
|
+
userAgent?: string;
|
|
68
|
+
success: boolean;
|
|
69
|
+
error?: string;
|
|
70
|
+
metadata?: Record<string, any>;
|
|
71
|
+
}
|
|
72
|
+
interface AuditLogFilter {
|
|
73
|
+
userId?: string;
|
|
74
|
+
action?: AuditAction | AuditAction[];
|
|
75
|
+
resource?: string;
|
|
76
|
+
resourceId?: string;
|
|
77
|
+
success?: boolean;
|
|
78
|
+
startDate?: Date;
|
|
79
|
+
endDate?: Date;
|
|
80
|
+
limit?: number;
|
|
81
|
+
offset?: number;
|
|
82
|
+
}
|
|
83
|
+
declare class AuditLogger {
|
|
84
|
+
private redis;
|
|
85
|
+
private prefix;
|
|
86
|
+
private retentionDays;
|
|
87
|
+
constructor(redis: Redis, retentionDays?: number, prefix?: string);
|
|
88
|
+
log(data: Omit<AuditLog, "id" | "timestamp">): Promise<string>;
|
|
89
|
+
get(id: string): Promise<AuditLog | null>;
|
|
90
|
+
query(filter?: AuditLogFilter): Promise<{
|
|
91
|
+
logs: AuditLog[];
|
|
92
|
+
total: number;
|
|
93
|
+
}>;
|
|
94
|
+
getRecent(limit?: number): Promise<AuditLog[]>;
|
|
95
|
+
getUserActivity(userId: string, limit?: number): Promise<AuditLog[]>;
|
|
96
|
+
getStats(startDate?: Date, endDate?: Date): Promise<{
|
|
97
|
+
totalEvents: number;
|
|
98
|
+
byAction: Record<string, number>;
|
|
99
|
+
successRate: number;
|
|
100
|
+
failedLogins: number;
|
|
101
|
+
uniqueUsers: Set<string>;
|
|
102
|
+
}>;
|
|
103
|
+
cleanup(): Promise<number>;
|
|
104
|
+
private getKeyForDate;
|
|
105
|
+
private getKeysForDateRange;
|
|
106
|
+
private matchesFilter;
|
|
107
|
+
private serializeLog;
|
|
108
|
+
private deserializeLog;
|
|
109
|
+
}
|
|
110
|
+
declare function createAuditContext(req: Request): {
|
|
111
|
+
ipAddress: string;
|
|
112
|
+
userAgent: string;
|
|
113
|
+
};
|
|
114
|
+
|
|
52
115
|
interface AuthUser {
|
|
53
116
|
id: string;
|
|
54
117
|
email: string;
|
|
@@ -109,15 +172,17 @@ interface AuthResult {
|
|
|
109
172
|
interface AuthAdapter {
|
|
110
173
|
createUser(data: {
|
|
111
174
|
email: string;
|
|
112
|
-
|
|
113
|
-
role
|
|
175
|
+
password: string;
|
|
176
|
+
role?: UserRole;
|
|
114
177
|
tenantId?: string;
|
|
115
178
|
}): Promise<AuthUser>;
|
|
116
179
|
findUserByEmail(email: string): Promise<AuthUser | null>;
|
|
117
180
|
findUserById(id: string): Promise<AuthUser | null>;
|
|
118
|
-
updateUser(id: string, data: Partial<AuthUser>
|
|
181
|
+
updateUser(id: string, data: Partial<AuthUser> & {
|
|
182
|
+
password?: string;
|
|
183
|
+
}): Promise<AuthUser | null>;
|
|
119
184
|
deleteUser(id: string): Promise<boolean>;
|
|
120
|
-
verifyPassword(
|
|
185
|
+
verifyPassword(email: string, password: string): Promise<AuthUser | null>;
|
|
121
186
|
hashPassword(password: string): Promise<string>;
|
|
122
187
|
createSession(userId: string, data?: {
|
|
123
188
|
ipAddress?: string;
|
|
@@ -132,6 +197,11 @@ interface AuthAdapter {
|
|
|
132
197
|
addPasswordToHistory?(userId: string, passwordHash: string): Promise<void>;
|
|
133
198
|
getPasswordHistory?(userId: string, count?: number): Promise<string[]>;
|
|
134
199
|
isPasswordInHistory?(password: string, userId: string, historyCount?: number): Promise<boolean>;
|
|
200
|
+
findAuditLogs(filter: AuditLogFilter): Promise<{
|
|
201
|
+
logs: AuditLog[];
|
|
202
|
+
total: number;
|
|
203
|
+
}>;
|
|
204
|
+
createAuditLog(data: Omit<AuditLog, "id" | "timestamp">): Promise<AuditLog>;
|
|
135
205
|
}
|
|
136
206
|
|
|
137
207
|
interface PostgresAuthAdapterOptions {
|
|
@@ -148,7 +218,7 @@ declare class PostgresAuthAdapter implements AuthAdapter {
|
|
|
148
218
|
constructor(options: PostgresAuthAdapterOptions);
|
|
149
219
|
createUser(data: {
|
|
150
220
|
email: string;
|
|
151
|
-
|
|
221
|
+
password: string;
|
|
152
222
|
role?: UserRole;
|
|
153
223
|
tenantId?: string;
|
|
154
224
|
}): Promise<AuthUser>;
|
|
@@ -156,7 +226,7 @@ declare class PostgresAuthAdapter implements AuthAdapter {
|
|
|
156
226
|
findUserById(id: string): Promise<AuthUser | null>;
|
|
157
227
|
updateUser(id: string, data: Partial<AuthUser>): Promise<AuthUser | null>;
|
|
158
228
|
deleteUser(id: string): Promise<boolean>;
|
|
159
|
-
verifyPassword(
|
|
229
|
+
verifyPassword(email: string, password: string): Promise<AuthUser | null>;
|
|
160
230
|
hashPassword(password: string): Promise<string>;
|
|
161
231
|
createSession(userId: string, data?: {
|
|
162
232
|
ipAddress?: string;
|
|
@@ -177,22 +247,24 @@ declare class PostgresAuthAdapter implements AuthAdapter {
|
|
|
177
247
|
locked: boolean;
|
|
178
248
|
}>;
|
|
179
249
|
resetAttempts(userId: string): Promise<void>;
|
|
250
|
+
findAuditLogs(filter: AuditLogFilter): Promise<{
|
|
251
|
+
logs: AuditLog[];
|
|
252
|
+
total: number;
|
|
253
|
+
}>;
|
|
254
|
+
createAuditLog(data: Omit<AuditLog, "id" | "timestamp">): Promise<AuditLog>;
|
|
180
255
|
private userToAuthUser;
|
|
181
256
|
private sessionToSession;
|
|
182
257
|
}
|
|
183
258
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
259
|
+
type Dialect = "sqlite" | "postgres" | "mysql";
|
|
260
|
+
declare function genId(): string;
|
|
261
|
+
interface DatabaseResult {
|
|
262
|
+
db: any;
|
|
263
|
+
dialect: Dialect;
|
|
264
|
+
genId: () => string;
|
|
188
265
|
}
|
|
189
|
-
declare function createDatabase(
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
$client: postgres.Sql<{}>;
|
|
193
|
-
};
|
|
194
|
-
}>;
|
|
195
|
-
declare function runMigrations(db: ReturnType<typeof drizzle>): Promise<void>;
|
|
196
|
-
declare function seedDefaultRoles(db: ReturnType<typeof drizzle>): Promise<void>;
|
|
266
|
+
declare function createDatabase(): Promise<DatabaseResult>;
|
|
267
|
+
declare function runMigrations(_db: any, _dialect?: Dialect): Promise<void>;
|
|
268
|
+
declare function seedDefaultRoles(db: any): Promise<void>;
|
|
197
269
|
|
|
198
|
-
export { type AuthAdapter as A,
|
|
270
|
+
export { type AuthAdapter as A, type Dialect as D, type JWTPayload as J, type LoginCredentials as L, PostgresAuthAdapter as P, type RegisterData as R, type Session as S, type UserRole as U, type AuthUser as a, type AuditLog as b, type AuditLogFilter as c, type AuthTokenConfig as d, type AuthResult as e, type AuditAction as f, AuditLogger as g, DrizzleAdapter as h, collectionToDrizzleSchema as i, createAuditContext as j, createDatabase as k, createDrizzleAdapter as l, fieldToDrizzleType as m, genId as n, runMigrations as r, seedDefaultRoles as s };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CollectionConfig, G as GlobalConfig, P as PluginConfig, F as Field } from './types-
|
|
1
|
+
import { C as CollectionConfig, G as GlobalConfig, P as PluginConfig, F as Field } from './types-BM0s_YOy.js';
|
|
2
2
|
import { ZodTypeAny } from 'zod';
|
|
3
3
|
|
|
4
4
|
declare class Registry {
|