@kyro-cms/core 0.13.5 → 0.13.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/api-handler-graphql.cjs +1 -1
- package/dist/api-handler-graphql.js +2 -2
- package/dist/api-handler-trpc.cjs +1 -1
- package/dist/api-handler-trpc.js +2 -2
- package/dist/api-handler.cjs +1 -1
- package/dist/api-handler.js +1 -1
- package/dist/auth-session-4WJUKESW.js +1 -0
- package/dist/auth-session-VHUHDBCL.cjs +1 -0
- package/dist/bootstrap-JYAUQ52D.cjs +1 -0
- package/dist/bootstrap-TTMLNQM3.js +1 -0
- package/dist/chunk-23RSKVJP.cjs +1 -0
- package/dist/chunk-24W5I6SJ.cjs +2 -0
- package/dist/{chunk-CH4TZZI5.js → chunk-2I2AXTKY.cjs} +38 -39
- package/dist/chunk-34LCWI5X.cjs +1 -0
- package/dist/chunk-3A5UO6OQ.cjs +114 -0
- package/dist/chunk-3N34WXBS.js +2 -0
- package/dist/chunk-3RIGRHON.js +109 -0
- package/dist/chunk-5BUAWCU6.js +91 -0
- package/dist/{chunk-7NKNSRCB.cjs → chunk-5I3BM5TV.js} +33 -32
- package/dist/chunk-5RBGM5N5.js +3 -0
- package/dist/chunk-7EY3GXRA.js +2 -0
- package/dist/chunk-7KTPBTH5.cjs +1 -0
- package/dist/chunk-A7763NCF.cjs +19 -0
- package/dist/chunk-AQWTJGML.cjs +1 -0
- package/dist/chunk-DCFOVCJX.cjs +1 -0
- package/dist/chunk-DCKJT247.cjs +1 -0
- package/dist/chunk-EG4SRTYS.cjs +2 -0
- package/dist/chunk-FAG2645P.js +2 -0
- package/dist/chunk-FIVTKI25.cjs +3 -0
- package/dist/chunk-FU76HURF.cjs +1 -0
- package/dist/chunk-GS4CMYKS.cjs +1 -0
- package/dist/chunk-GTAKGVUY.js +2 -0
- package/dist/chunk-GWUHIIPO.cjs +132 -0
- package/dist/chunk-H2IJDTA2.cjs +1 -0
- package/dist/chunk-HCM2G674.cjs +20 -0
- package/dist/chunk-I22MSXGL.js +2 -0
- package/dist/chunk-IIPSXKNV.js +115 -0
- package/dist/{chunk-WNU76M2C.js → chunk-IIVBEZC2.js} +6 -6
- package/dist/chunk-JHFD3IAU.cjs +1 -0
- package/dist/chunk-JJY2F6NL.cjs +3 -0
- package/dist/chunk-JQ4V2MGJ.cjs +2 -0
- package/dist/chunk-JXJTFBHG.js +3 -0
- package/dist/chunk-KOSR7235.cjs +1 -0
- package/dist/chunk-KUY4QDAL.js +2 -0
- package/dist/chunk-LGUHXOEW.js +3 -0
- package/dist/chunk-LXTVMP5F.cjs +6 -0
- package/dist/chunk-MCK2QRAU.cjs +4 -0
- package/dist/chunk-N2BMGZIX.cjs +90 -0
- package/dist/chunk-N7CDHWQH.cjs +2 -0
- package/dist/chunk-NGNXOXI5.js +2 -0
- package/dist/chunk-O2SA56P2.cjs +108 -0
- package/dist/chunk-O4PPZOVI.cjs +1 -0
- package/dist/chunk-O4RKZQYQ.js +2 -0
- package/dist/chunk-O6I26T6A.js +3 -0
- package/dist/chunk-OJBL4CXK.cjs +2 -0
- package/dist/chunk-OPKZYQV7.js +3 -0
- package/dist/chunk-OXEJCIOA.cjs +1 -0
- package/dist/chunk-OXH6CANN.js +2 -0
- package/dist/chunk-PPGZHOYR.cjs +1 -0
- package/dist/{chunk-EQN3HDES.cjs → chunk-PW6Y5MQL.cjs} +5 -5
- package/dist/chunk-RLW6AQF2.js +2 -0
- package/dist/chunk-SBFVITY2.js +7 -0
- package/dist/chunk-SEJ7LMYY.js +4 -0
- package/dist/chunk-SYE3OS5T.js +5 -0
- package/dist/chunk-SZY25KAE.js +21 -0
- package/dist/chunk-TJ6N5ZPZ.js +133 -0
- package/dist/chunk-TVWHTVLI.js +2 -0
- package/dist/chunk-UE7DTBD7.cjs +1 -0
- package/dist/chunk-V2RMDMWN.js +2 -0
- package/dist/chunk-V4SR7DU5.js +3 -0
- package/dist/chunk-VLFM66BZ.js +4 -0
- package/dist/chunk-VPBGZW4P.cjs +1 -0
- package/dist/chunk-W5GDZG64.js +2 -0
- package/dist/chunk-WLSVS3NC.js +2 -0
- package/dist/chunk-XL64URKD.cjs +2 -0
- package/dist/chunk-YNBJGPIU.js +2 -0
- package/dist/chunk-YNSKDTFG.js +2 -0
- package/dist/chunk-YOJOVQIH.cjs +1 -0
- package/dist/chunk-ZE2X3FBU.js +20 -0
- package/dist/chunk-ZMH35QYG.js +2 -0
- package/dist/cli/index.cjs +53 -182
- package/dist/cli/index.js +54 -183
- package/dist/drizzle/index.cjs +1 -1
- package/dist/drizzle/index.js +1 -1
- package/dist/fields/index.cjs +1 -1
- package/dist/fields/index.js +1 -1
- package/dist/graphql/index.cjs +1 -1
- package/dist/graphql/index.js +1 -1
- package/dist/index-B_39z2jP.d.cts +217 -0
- package/dist/index-xqpVL2Zq.d.ts +217 -0
- package/dist/index.cjs +30 -30
- package/dist/index.d.cts +2 -31
- package/dist/index.d.ts +2 -31
- package/dist/index.js +31 -31
- package/dist/integration.cjs +1 -1
- package/dist/integration.js +1 -1
- package/dist/local-DKP43BWQ.cjs +1 -0
- package/dist/local-TF5ZMHWW.js +1 -0
- package/dist/media-M3EIZ4QS.cjs +1 -0
- package/dist/media-WYEILC6K.js +1 -0
- package/dist/mongo-auth-adapter-22MV3TI3.cjs +1 -0
- package/dist/mongo-auth-adapter-66PWVRZW.js +1 -0
- package/dist/mongodb/index.cjs +1 -1
- package/dist/mongodb/index.d.cts +3 -130
- package/dist/mongodb/index.d.ts +3 -130
- package/dist/mongodb/index.js +1 -1
- package/dist/nodemailer-transport-7F3VLLBW.js +1 -0
- package/dist/nodemailer-transport-WAPZD3SJ.cjs +1 -0
- package/dist/postgres-auth-adapter-7BCPXNBO.js +1 -0
- package/dist/postgres-auth-adapter-HMXFUM5W.cjs +1 -0
- package/dist/redis-adapter-2E5AWMMA.cjs +1 -0
- package/dist/redis-adapter-GFH74CF4.js +1 -0
- package/dist/rest/index.cjs +1 -1
- package/dist/rest/index.js +1 -1
- package/dist/schema-FNIDQKIJ.cjs +1 -0
- package/dist/schema-KD736QFN.js +1 -0
- package/dist/sqlite-adapter-HL53RLSN.cjs +1 -0
- package/dist/sqlite-adapter-TT6ZASDG.js +1 -0
- package/dist/templates/index.cjs +1 -1
- package/dist/templates/index.js +1 -1
- package/dist/trpc/index.cjs +1 -1
- package/dist/trpc/index.js +1 -1
- package/dist/ws/index.cjs +1 -1
- package/dist/ws/index.js +1 -1
- package/package.json +2 -10
- package/dist/WebhookService-CGxHtw7E.d.cts +0 -143
- package/dist/WebhookService-CNC1lYz7.d.ts +0 -143
- package/dist/auth-session-DHVGXHOH.cjs +0 -1
- package/dist/auth-session-O7IIH7EP.js +0 -1
- package/dist/base-A9AJPCG5.d.ts +0 -219
- package/dist/base-C6wyX2nC.d.cts +0 -219
- package/dist/bcryptjs-WIQSWJGK.cjs +0 -1
- package/dist/bcryptjs-ZEEHSMAG.js +0 -2
- package/dist/better-sqlite3-5IISPX34.cjs +0 -1
- package/dist/better-sqlite3-B34RIU4C.js +0 -2
- package/dist/bootstrap-PG2LGDLB.js +0 -1
- package/dist/bootstrap-YD3GLTWX.cjs +0 -1
- package/dist/bowser-SB3ZUPO4.js +0 -11
- package/dist/bowser-VX6B6ZSE.cjs +0 -10
- package/dist/chokidar-5RVQZVHP.cjs +0 -5
- package/dist/chokidar-BOYGRT4Q.js +0 -6
- package/dist/chunk-262YP5XA.cjs +0 -1
- package/dist/chunk-2HA6EKXX.js +0 -24
- package/dist/chunk-2SPWRQ5O.js +0 -122
- package/dist/chunk-2TYITUOC.js +0 -122
- package/dist/chunk-35PGCW3S.cjs +0 -1
- package/dist/chunk-3CIMGC2F.cjs +0 -56
- package/dist/chunk-3KZXF4US.js +0 -2
- package/dist/chunk-3NSZZCOJ.js +0 -2
- package/dist/chunk-3TAUNYEM.js +0 -8
- package/dist/chunk-3VXEK5ZW.cjs +0 -1
- package/dist/chunk-47CXBWMA.js +0 -2
- package/dist/chunk-4BMWWGJN.js +0 -384
- package/dist/chunk-4NTIK6DF.cjs +0 -2
- package/dist/chunk-6E44MQQ5.js +0 -115
- package/dist/chunk-6LWF5MPL.js +0 -20
- package/dist/chunk-6NBZDW53.js +0 -133
- package/dist/chunk-6TPICJ2L.js +0 -7
- package/dist/chunk-6YS6XLOD.cjs +0 -121
- package/dist/chunk-73D2PNHD.cjs +0 -7
- package/dist/chunk-7ACHOBWY.cjs +0 -13
- package/dist/chunk-7GGZA5YU.cjs +0 -2
- package/dist/chunk-7JWQ2PZP.cjs +0 -1
- package/dist/chunk-7KLEANTO.cjs +0 -1
- package/dist/chunk-7MNDQU6K.js +0 -8
- package/dist/chunk-7NH7H3WA.js +0 -10
- package/dist/chunk-7WMMKGEO.cjs +0 -1
- package/dist/chunk-ALTU3FDG.js +0 -2
- package/dist/chunk-BAVN7VDR.cjs +0 -1
- package/dist/chunk-BCEE4NBZ.cjs +0 -2
- package/dist/chunk-BUNLC3II.cjs +0 -1
- package/dist/chunk-C7QCZX7X.js +0 -2
- package/dist/chunk-D6SDGHY6.js +0 -2
- package/dist/chunk-DVWYO3KK.cjs +0 -1
- package/dist/chunk-EHWUALGH.cjs +0 -1
- package/dist/chunk-EML5FDUU.js +0 -2
- package/dist/chunk-EN65ZEK2.cjs +0 -2
- package/dist/chunk-EW424IBO.cjs +0 -1
- package/dist/chunk-EZIDQBXI.cjs +0 -1
- package/dist/chunk-F2O4QO5N.cjs +0 -383
- package/dist/chunk-F4ITQ6XQ.cjs +0 -3
- package/dist/chunk-FK2BG4HU.js +0 -3
- package/dist/chunk-FLMUMPDE.js +0 -2
- package/dist/chunk-GIS6X43A.cjs +0 -3
- package/dist/chunk-GNEVCEJU.cjs +0 -3
- package/dist/chunk-GNOSG3PK.cjs +0 -1
- package/dist/chunk-GQGFNTDZ.js +0 -2
- package/dist/chunk-GTR7JAKP.cjs +0 -3
- package/dist/chunk-HPIJI7TM.js +0 -3
- package/dist/chunk-HPYH7GTS.cjs +0 -1
- package/dist/chunk-HRAY65XH.js +0 -3
- package/dist/chunk-HTYVI2HK.cjs +0 -9
- package/dist/chunk-IKGVPXMK.js +0 -3
- package/dist/chunk-J6V573PE.cjs +0 -1
- package/dist/chunk-JA44K75G.js +0 -2
- package/dist/chunk-JRUQ5ABB.js +0 -4
- package/dist/chunk-JV4HJBXW.js +0 -14
- package/dist/chunk-KEITOXIP.js +0 -2
- package/dist/chunk-KMFLHGD5.cjs +0 -1
- package/dist/chunk-KZHXYXSH.cjs +0 -10
- package/dist/chunk-L3Q64RUX.js +0 -3
- package/dist/chunk-LEBM6ZSZ.cjs +0 -10
- package/dist/chunk-LKRI5X2V.cjs +0 -1
- package/dist/chunk-LQ3YZTPU.cjs +0 -15
- package/dist/chunk-LVBHOZZF.js +0 -4
- package/dist/chunk-LWM4WABU.js +0 -3
- package/dist/chunk-LY7N3UHH.cjs +0 -23
- package/dist/chunk-MCIZG4A3.cjs +0 -1
- package/dist/chunk-MDLJTZLV.cjs +0 -1
- package/dist/chunk-N4FXLQE3.cjs +0 -132
- package/dist/chunk-N5POANYV.js +0 -2
- package/dist/chunk-NGNJSUGL.cjs +0 -1
- package/dist/chunk-NRE6VKL6.cjs +0 -121
- package/dist/chunk-O4YE57OS.cjs +0 -6
- package/dist/chunk-OBYAIJVU.js +0 -11
- package/dist/chunk-OLRCZ6E3.js +0 -2
- package/dist/chunk-OOVNTOZC.cjs +0 -56
- package/dist/chunk-P6JITOFF.js +0 -4
- package/dist/chunk-PITMDQYN.cjs +0 -18
- package/dist/chunk-PYUWSKKP.js +0 -57
- package/dist/chunk-Q5TFO66G.cjs +0 -1
- package/dist/chunk-QO5ZWQA3.cjs +0 -74
- package/dist/chunk-QYN6C3FZ.cjs +0 -114
- package/dist/chunk-REQ622YC.js +0 -3
- package/dist/chunk-RPRGGGIW.js +0 -11
- package/dist/chunk-RVBSJ4UQ.cjs +0 -7
- package/dist/chunk-RYHOWZLK.js +0 -2
- package/dist/chunk-RYXLEFS5.js +0 -2
- package/dist/chunk-SBNMXQNO.cjs +0 -2
- package/dist/chunk-SLMIYECU.js +0 -2
- package/dist/chunk-SRIXRJHL.js +0 -4
- package/dist/chunk-TBHNE4VV.js +0 -2
- package/dist/chunk-TCFL3UWT.cjs +0 -2
- package/dist/chunk-TYQYKKWJ.js +0 -16
- package/dist/chunk-U6KFONKM.js +0 -2
- package/dist/chunk-UNYXWPLZ.cjs +0 -2
- package/dist/chunk-UWHWSWDE.js +0 -2
- package/dist/chunk-V4FAL7AG.js +0 -2
- package/dist/chunk-VQ53TFYA.cjs +0 -1
- package/dist/chunk-VRZC4TTF.cjs +0 -1
- package/dist/chunk-W45TLOOT.js +0 -2
- package/dist/chunk-WAVGRSE6.js +0 -2
- package/dist/chunk-WPM6LFCY.js +0 -2
- package/dist/chunk-WXT2XW7T.js +0 -13
- package/dist/chunk-X473JI7Z.js +0 -75
- package/dist/chunk-X6HUA6EF.cjs +0 -20
- package/dist/chunk-XDPLVJRO.js +0 -21
- package/dist/chunk-XDQVYCIR.cjs +0 -1
- package/dist/chunk-XFYSADHV.cjs +0 -2
- package/dist/chunk-XOR64WUQ.cjs +0 -19
- package/dist/chunk-Y2YAKDEQ.js +0 -2
- package/dist/chunk-YENNL5HG.js +0 -2
- package/dist/chunk-YGI5W4RS.js +0 -2
- package/dist/chunk-YIFKTA5N.js +0 -57
- package/dist/chunk-YUUXFD73.js +0 -19
- package/dist/chunk-ZAKYTBEN.js +0 -3
- package/dist/chunk-ZHA446FA.cjs +0 -1
- package/dist/chunk-ZTLGK6R4.cjs +0 -12
- package/dist/chunk-ZUBJ6RLQ.cjs +0 -1
- package/dist/client.d.cts +0 -1291
- package/dist/client.d.ts +0 -1291
- package/dist/d1-5ZQJOFDX.cjs +0 -1
- package/dist/d1-HPB6B253.js +0 -2
- package/dist/dist-es-3SSNUZST.cjs +0 -1
- package/dist/dist-es-64F22JL2.js +0 -2
- package/dist/dist-es-A5OF2STN.cjs +0 -2
- package/dist/dist-es-BOW5V247.cjs +0 -6
- package/dist/dist-es-CRIMATLL.cjs +0 -2
- package/dist/dist-es-DL3VLVP6.cjs +0 -1
- package/dist/dist-es-F2ZR55UK.js +0 -4
- package/dist/dist-es-IPSSZNFP.js +0 -1
- package/dist/dist-es-M2F7M27Y.js +0 -2
- package/dist/dist-es-M66JKZF5.js +0 -7
- package/dist/dist-es-OKLLRYI3.js +0 -2
- package/dist/dist-es-P25IKLBI.cjs +0 -1
- package/dist/dist-es-SRPWSAF4.cjs +0 -1
- package/dist/dist-es-SVHZDVUF.js +0 -3
- package/dist/dist-es-T2H2W5BX.cjs +0 -3
- package/dist/dist-es-WFI55HKT.js +0 -3
- package/dist/drizzle-orm-47ELDEM6.cjs +0 -1
- package/dist/drizzle-orm-XRTSOQJS.js +0 -1
- package/dist/event-streams-7NAWZW2I.js +0 -1
- package/dist/event-streams-JBMWCI2O.cjs +0 -1
- package/dist/fs-KWBRQ6T6.js +0 -1
- package/dist/fs-ZQYOJOIO.cjs +0 -1
- package/dist/index-NGnJpSgf.d.ts +0 -105
- package/dist/index-Zrg3sZ6R.d.cts +0 -105
- package/dist/jsonwebtoken-DFB6ZBZA.cjs +0 -8
- package/dist/jsonwebtoken-OD67R5JS.js +0 -9
- package/dist/lib-A2D63VXD.cjs +0 -1
- package/dist/lib-JQD2JAOO.js +0 -2
- package/dist/loadSso-JY4WDQPS.cjs +0 -2
- package/dist/loadSso-UQR6545M.js +0 -3
- package/dist/local-6UUGBZ4M.js +0 -1
- package/dist/local-ZYHV3J2K.cjs +0 -1
- package/dist/media-3Z6YW5J4.cjs +0 -1
- package/dist/media-E762GEHL.js +0 -1
- package/dist/mongo-auth-adapter-2H2AXDRH.cjs +0 -1
- package/dist/mongo-auth-adapter-YWMEOC42.js +0 -1
- package/dist/nodemailer-IDML4L6W.cjs +0 -53
- package/dist/nodemailer-NITB45SS.js +0 -54
- package/dist/nodemailer-transport-3VWVUBM5.cjs +0 -1
- package/dist/nodemailer-transport-7RHATUKL.js +0 -1
- package/dist/postgres-auth-adapter-QKBNXVPT.js +0 -1
- package/dist/postgres-auth-adapter-WMLM4UUC.cjs +0 -1
- package/dist/postgres-js-7YBZKGXG.cjs +0 -1
- package/dist/postgres-js-JLFIWOBH.js +0 -1
- package/dist/redis-adapter-EVK2SMKH.cjs +0 -1
- package/dist/redis-adapter-LY2NBSAG.js +0 -1
- package/dist/schema-RT6WSUYC.cjs +0 -1
- package/dist/schema-YFMSJK2P.js +0 -2
- package/dist/signin-N3T2KF5Q.js +0 -3
- package/dist/signin-VFBLX7EL.cjs +0 -2
- package/dist/sqlite-adapter-KPSISY6E.cjs +0 -1
- package/dist/sqlite-adapter-PI6SIY7O.js +0 -1
- package/dist/src-6LAUXXDM.cjs +0 -1
- package/dist/src-QBADSZV4.js +0 -1
- package/dist/sso-oidc-54BIRYR6.cjs +0 -2
- package/dist/sso-oidc-UB7G4END.js +0 -3
- package/dist/sts-WAA6I22C.js +0 -3
- package/dist/sts-YLXXIB3X.cjs +0 -2
- package/dist/types-BCOhfwHC.d.ts +0 -839
- package/dist/types-DxaK39ix.d.cts +0 -330
- package/dist/types-DxaK39ix.d.ts +0 -330
- package/dist/types-QglJ7PwT.d.cts +0 -839
package/dist/drizzle/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkGWUHIIPO_cjs=require('../chunk-GWUHIIPO.cjs'),chunkEG4SRTYS_cjs=require('../chunk-EG4SRTYS.cjs'),chunk3A5UO6OQ_cjs=require('../chunk-3A5UO6OQ.cjs');require('../chunk-23RSKVJP.cjs'),require('../chunk-YOJOVQIH.cjs'),require('../chunk-O4PPZOVI.cjs'),require('../chunk-JJY2F6NL.cjs'),require('../chunk-OXEJCIOA.cjs'),require('../chunk-KOSR7235.cjs'),require('../chunk-JHFD3IAU.cjs');Object.defineProperty(exports,"DrizzleAdapter",{enumerable:true,get:function(){return chunkGWUHIIPO_cjs.c}});Object.defineProperty(exports,"collectionToDrizzleSchema",{enumerable:true,get:function(){return chunkGWUHIIPO_cjs.b}});Object.defineProperty(exports,"createDrizzleAdapter",{enumerable:true,get:function(){return chunkGWUHIIPO_cjs.d}});Object.defineProperty(exports,"fieldToDrizzleType",{enumerable:true,get:function(){return chunkGWUHIIPO_cjs.a}});Object.defineProperty(exports,"createDatabase",{enumerable:true,get:function(){return chunkEG4SRTYS_cjs.b}});Object.defineProperty(exports,"runMigrations",{enumerable:true,get:function(){return chunkEG4SRTYS_cjs.c}});Object.defineProperty(exports,"seedDefaultRoles",{enumerable:true,get:function(){return chunkEG4SRTYS_cjs.d}});Object.defineProperty(exports,"PostgresAuthAdapter",{enumerable:true,get:function(){return chunk3A5UO6OQ_cjs.a}});
|
package/dist/drizzle/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as DrizzleAdapter,b as collectionToDrizzleSchema,d as createDrizzleAdapter,a as fieldToDrizzleType}from'../chunk-
|
|
1
|
+
export{c as DrizzleAdapter,b as collectionToDrizzleSchema,d as createDrizzleAdapter,a as fieldToDrizzleType}from'../chunk-TJ6N5ZPZ.js';export{b as createDatabase,c as runMigrations,d as seedDefaultRoles}from'../chunk-JXJTFBHG.js';export{a as PostgresAuthAdapter}from'../chunk-IIPSXKNV.js';import'../chunk-7EY3GXRA.js';import'../chunk-WLSVS3NC.js';import'../chunk-YNSKDTFG.js';import'../chunk-VLFM66BZ.js';import'../chunk-NGNXOXI5.js';import'../chunk-O4RKZQYQ.js';import'../chunk-RLW6AQF2.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
|
package/dist/fields/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkN2BMGZIX_cjs=require('../chunk-N2BMGZIX.cjs'),chunkDCKJT247_cjs=require('../chunk-DCKJT247.cjs');require('../chunk-JHFD3IAU.cjs');Object.defineProperty(exports,"ALL_FIELD_TYPES",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.r}});Object.defineProperty(exports,"COMPLEX_FIELD_TYPES",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.o}});Object.defineProperty(exports,"LAYOUT_FIELD_TYPES",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.q}});Object.defineProperty(exports,"PRIMITIVE_FIELD_TYPES",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.n}});Object.defineProperty(exports,"RELATIONAL_FIELD_TYPES",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.p}});Object.defineProperty(exports,"createRelationshipFieldConfig",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.s}});Object.defineProperty(exports,"isArrayField",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.d}});Object.defineProperty(exports,"isBlocksField",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.f}});Object.defineProperty(exports,"isEmbeddingField",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.m}});Object.defineProperty(exports,"isGroupField",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.e}});Object.defineProperty(exports,"isIconField",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.l}});Object.defineProperty(exports,"isImageField",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.h}});Object.defineProperty(exports,"isLayoutField",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.k}});Object.defineProperty(exports,"isNumberField",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.b}});Object.defineProperty(exports,"isRelationshipField",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.c}});Object.defineProperty(exports,"isRichTextField",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.i}});Object.defineProperty(exports,"isSelectField",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.j}});Object.defineProperty(exports,"isTextField",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.a}});Object.defineProperty(exports,"isUploadField",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.g}});Object.defineProperty(exports,"normalizeRichTextValue",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.u}});Object.defineProperty(exports,"renderRichText",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.v}});Object.defineProperty(exports,"richTextStyles",{enumerable:true,get:function(){return chunkN2BMGZIX_cjs.t}});Object.defineProperty(exports,"generateSEOFields",{enumerable:true,get:function(){return chunkDCKJT247_cjs.a}});
|
package/dist/fields/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{r as ALL_FIELD_TYPES,o as COMPLEX_FIELD_TYPES,q as LAYOUT_FIELD_TYPES,n as PRIMITIVE_FIELD_TYPES,p as RELATIONAL_FIELD_TYPES,s as createRelationshipFieldConfig,d as isArrayField,f as isBlocksField,m as isEmbeddingField,e as isGroupField,l as isIconField,h as isImageField,k as isLayoutField,b as isNumberField,c as isRelationshipField,i as isRichTextField,j as isSelectField,a as isTextField,g as isUploadField,u as normalizeRichTextValue,v as renderRichText,t as richTextStyles}from'../chunk-
|
|
1
|
+
export{r as ALL_FIELD_TYPES,o as COMPLEX_FIELD_TYPES,q as LAYOUT_FIELD_TYPES,n as PRIMITIVE_FIELD_TYPES,p as RELATIONAL_FIELD_TYPES,s as createRelationshipFieldConfig,d as isArrayField,f as isBlocksField,m as isEmbeddingField,e as isGroupField,l as isIconField,h as isImageField,k as isLayoutField,b as isNumberField,c as isRelationshipField,i as isRichTextField,j as isSelectField,a as isTextField,g as isUploadField,u as normalizeRichTextValue,v as renderRichText,t as richTextStyles}from'../chunk-5BUAWCU6.js';export{a as generateSEOFields}from'../chunk-ZMH35QYG.js';import'../chunk-RLW6AQF2.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
|
package/dist/graphql/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk24W5I6SJ_cjs=require('../chunk-24W5I6SJ.cjs');require('../chunk-DCFOVCJX.cjs'),require('../chunk-KOSR7235.cjs'),require('../chunk-JHFD3IAU.cjs');Object.defineProperty(exports,"RelationLoader",{enumerable:true,get:function(){return chunk24W5I6SJ_cjs.a}});Object.defineProperty(exports,"buildGraphQLSchema",{enumerable:true,get:function(){return chunk24W5I6SJ_cjs.c}});Object.defineProperty(exports,"createGraphQLSchema",{enumerable:true,get:function(){return chunk24W5I6SJ_cjs.d}});Object.defineProperty(exports,"depthLimit",{enumerable:true,get:function(){return chunk24W5I6SJ_cjs.b}});Object.defineProperty(exports,"printSchema",{enumerable:true,get:function(){return chunk24W5I6SJ_cjs.e}});
|
package/dist/graphql/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{a as RelationLoader,c as buildGraphQLSchema,d as createGraphQLSchema,b as depthLimit,e as printSchema}from'../chunk-5RBGM5N5.js';import'../chunk-3N34WXBS.js';import'../chunk-O4RKZQYQ.js';import'../chunk-RLW6AQF2.js';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { b as AbstractBaseAdapter, c as AuthAdapter, U as UserRole, d as AuthUser, S as Session, a as AuditLogFilter, A as AuditLog } from './base-DIpT2Vuz.cjs';
|
|
2
|
+
import { F as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, U as UpdateArgs, D as DeleteArgs, e as FindOneArgs, f as FindVersionsArgs, V as VersionRecord, g as CreateVersionArgs } from './types-CdwfDpyW.cjs';
|
|
3
|
+
|
|
4
|
+
type DatabaseType = 'postgres' | 'sqlite' | 'mongodb';
|
|
5
|
+
interface DatabaseConnectionOptions {
|
|
6
|
+
type: DatabaseType;
|
|
7
|
+
host?: string;
|
|
8
|
+
port?: number;
|
|
9
|
+
database?: string;
|
|
10
|
+
user?: string;
|
|
11
|
+
password?: string;
|
|
12
|
+
url?: string;
|
|
13
|
+
ssl?: boolean | Record<string, any>;
|
|
14
|
+
maxConnections?: number;
|
|
15
|
+
connectionTimeout?: number;
|
|
16
|
+
}
|
|
17
|
+
interface DrizzleAdapterOptions {
|
|
18
|
+
type?: 'postgres' | 'sqlite';
|
|
19
|
+
client?: any;
|
|
20
|
+
schema?: any;
|
|
21
|
+
connectionString?: string;
|
|
22
|
+
connectionOptions?: DatabaseConnectionOptions;
|
|
23
|
+
}
|
|
24
|
+
interface MongoDBAdapterOptions {
|
|
25
|
+
type?: 'mongodb';
|
|
26
|
+
client?: any;
|
|
27
|
+
database?: string;
|
|
28
|
+
connectionString?: string;
|
|
29
|
+
connectionOptions?: DatabaseConnectionOptions;
|
|
30
|
+
/**
|
|
31
|
+
* Maximum number of connections in the connection pool.
|
|
32
|
+
* Defaults to 10 (or process.env.MONGODB_MAX_POOL_SIZE).
|
|
33
|
+
* Note: Default MongoDB driver setting is 100, which can easily overwhelm
|
|
34
|
+
* MongoDB Atlas free/shared tiers (e.g. M0 limit is 500 connections cluster-wide).
|
|
35
|
+
*/
|
|
36
|
+
maxPoolSize?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Minimum number of connections in the connection pool.
|
|
39
|
+
* Defaults to 1 (or process.env.MONGODB_MIN_POOL_SIZE).
|
|
40
|
+
*/
|
|
41
|
+
minPoolSize?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Maximum number of milliseconds that a connection can remain idle in the pool before being removed.
|
|
44
|
+
* Defaults to 30000 (30 seconds).
|
|
45
|
+
*/
|
|
46
|
+
maxIdleTimeMS?: number;
|
|
47
|
+
/**
|
|
48
|
+
* How long the MongoDB driver will attempt to select a server before timing out.
|
|
49
|
+
* Defaults to 5000 (5 seconds).
|
|
50
|
+
*/
|
|
51
|
+
serverSelectionTimeoutMS?: number;
|
|
52
|
+
/**
|
|
53
|
+
* How long a connection attempt can take before timing out.
|
|
54
|
+
* Defaults to 10000 (10 seconds).
|
|
55
|
+
*/
|
|
56
|
+
connectTimeoutMS?: number;
|
|
57
|
+
/**
|
|
58
|
+
* How long a send or receive on a socket can take before timing out.
|
|
59
|
+
*/
|
|
60
|
+
socketTimeoutMS?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Additional raw MongoClientOptions passed directly to MongoClient.
|
|
63
|
+
*/
|
|
64
|
+
clientOptions?: Record<string, any>;
|
|
65
|
+
/**
|
|
66
|
+
* Whether to disable global client caching across HMR / module reloads in development.
|
|
67
|
+
* Defaults to false (caching enabled).
|
|
68
|
+
*/
|
|
69
|
+
disableGlobalClientCache?: boolean;
|
|
70
|
+
}
|
|
71
|
+
type AdapterOptions = DrizzleAdapterOptions | MongoDBAdapterOptions;
|
|
72
|
+
|
|
73
|
+
declare class MongoDBAdapter extends AbstractBaseAdapter {
|
|
74
|
+
dialect: "mongodb";
|
|
75
|
+
client: any;
|
|
76
|
+
db: any;
|
|
77
|
+
private database;
|
|
78
|
+
private connectionString?;
|
|
79
|
+
private options;
|
|
80
|
+
constructor(options: MongoDBAdapterOptions);
|
|
81
|
+
/**
|
|
82
|
+
* Resolves the default connection pool options for MongoDB to prevent
|
|
83
|
+
* connection pool exhaustion in serverless / Astro / Next.js environments.
|
|
84
|
+
*/
|
|
85
|
+
private getPoolOptions;
|
|
86
|
+
connect(): Promise<void>;
|
|
87
|
+
disconnect(options?: {
|
|
88
|
+
force?: boolean;
|
|
89
|
+
}): Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* Helper to retrieve or initialize a singleton MongoDB Db instance.
|
|
92
|
+
*/
|
|
93
|
+
static getDb(options?: MongoDBAdapterOptions | string): Promise<any>;
|
|
94
|
+
/**
|
|
95
|
+
* Helper to retrieve or initialize a singleton MongoClient instance.
|
|
96
|
+
*/
|
|
97
|
+
static getClient(options?: MongoDBAdapterOptions | string): Promise<any>;
|
|
98
|
+
private getMongoCollection;
|
|
99
|
+
find<T>(args: FindArgs): Promise<FindResult<T>>;
|
|
100
|
+
private buildIdFilter;
|
|
101
|
+
findByID<T>(args: FindByIDArgs): Promise<T | null>;
|
|
102
|
+
create<T>(args: CreateArgs): Promise<T>;
|
|
103
|
+
update<T>(args: UpdateArgs): Promise<T>;
|
|
104
|
+
delete<T>(args: DeleteArgs): Promise<T>;
|
|
105
|
+
count(args: {
|
|
106
|
+
collection: string;
|
|
107
|
+
where?: Record<string, any>;
|
|
108
|
+
tenantId?: string;
|
|
109
|
+
}): Promise<number>;
|
|
110
|
+
findOne(args: FindOneArgs): Promise<any>;
|
|
111
|
+
findVersions(args: FindVersionsArgs): Promise<FindResult<VersionRecord>>;
|
|
112
|
+
findVersionByID(args: {
|
|
113
|
+
collection: string;
|
|
114
|
+
versionId: string;
|
|
115
|
+
tenantId?: string;
|
|
116
|
+
}): Promise<VersionRecord | null>;
|
|
117
|
+
createVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
118
|
+
updateLatestVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
119
|
+
deleteVersions(args: {
|
|
120
|
+
collection: string;
|
|
121
|
+
documentId: string;
|
|
122
|
+
keepLatest?: number;
|
|
123
|
+
tenantId?: string;
|
|
124
|
+
}): Promise<void>;
|
|
125
|
+
migrate?(): Promise<void>;
|
|
126
|
+
private getCollectionConfig;
|
|
127
|
+
private buildFilter;
|
|
128
|
+
private buildProjection;
|
|
129
|
+
private processResult;
|
|
130
|
+
private generateId;
|
|
131
|
+
}
|
|
132
|
+
declare function createMongoDBAdapter(options: MongoDBAdapterOptions): MongoDBAdapter;
|
|
133
|
+
/**
|
|
134
|
+
* Global helper to access or initialize a pooled MongoDB Db singleton instance.
|
|
135
|
+
*/
|
|
136
|
+
declare function getMongoDb(options?: MongoDBAdapterOptions | string): Promise<any>;
|
|
137
|
+
/**
|
|
138
|
+
* Global helper to access or initialize a pooled MongoClient singleton instance.
|
|
139
|
+
*/
|
|
140
|
+
declare function getMongoClient(options?: MongoDBAdapterOptions | string): Promise<any>;
|
|
141
|
+
|
|
142
|
+
interface MongoDBAuthAdapterOptions {
|
|
143
|
+
db?: any | (() => any);
|
|
144
|
+
adapter?: any;
|
|
145
|
+
client?: any;
|
|
146
|
+
collectionPrefix?: string;
|
|
147
|
+
sessionTTL?: number;
|
|
148
|
+
refreshTokenTTL?: number;
|
|
149
|
+
}
|
|
150
|
+
declare class MongoDBAuthAdapter implements AuthAdapter {
|
|
151
|
+
private db;
|
|
152
|
+
private adapter;
|
|
153
|
+
private client;
|
|
154
|
+
private prefix;
|
|
155
|
+
private sessionTTL;
|
|
156
|
+
private refreshTokenTTL;
|
|
157
|
+
private indexesEnsured;
|
|
158
|
+
constructor(options: MongoDBAuthAdapterOptions);
|
|
159
|
+
private getDatabase;
|
|
160
|
+
private col;
|
|
161
|
+
connect(): Promise<void>;
|
|
162
|
+
disconnect(): Promise<void>;
|
|
163
|
+
private ensureIndexes;
|
|
164
|
+
createUser(data: {
|
|
165
|
+
email: string;
|
|
166
|
+
password: string;
|
|
167
|
+
name?: string;
|
|
168
|
+
role?: UserRole;
|
|
169
|
+
avatar?: string;
|
|
170
|
+
tenantId?: string;
|
|
171
|
+
}): Promise<AuthUser>;
|
|
172
|
+
findUserByEmail(email: string): Promise<AuthUser | null>;
|
|
173
|
+
findUserById(id: string): Promise<AuthUser | null>;
|
|
174
|
+
updateUser(id: string, data: Partial<AuthUser>): Promise<AuthUser | null>;
|
|
175
|
+
deleteUser(id: string): Promise<boolean>;
|
|
176
|
+
verifyPassword(email: string, password: string): Promise<AuthUser | null>;
|
|
177
|
+
hashPassword(password: string): Promise<string>;
|
|
178
|
+
createSession(userId: string, data?: {
|
|
179
|
+
ipAddress?: string;
|
|
180
|
+
userAgent?: string;
|
|
181
|
+
}): Promise<Session>;
|
|
182
|
+
findSessionByToken(token: string): Promise<Session | null>;
|
|
183
|
+
findSessionByRefreshToken(refreshToken: string): Promise<Session | null>;
|
|
184
|
+
deleteSession(sessionId: string): Promise<boolean>;
|
|
185
|
+
deleteUserSessions(userId: string): Promise<number>;
|
|
186
|
+
hasAnyUsers(): Promise<boolean>;
|
|
187
|
+
addPasswordToHistory(userId: string, passwordHash: string): Promise<void>;
|
|
188
|
+
getPasswordHistory(userId: string, count?: number): Promise<string[]>;
|
|
189
|
+
isPasswordInHistory(password: string, userId: string, historyCount?: number): Promise<boolean>;
|
|
190
|
+
findAuditLogs(filter: AuditLogFilter): Promise<{
|
|
191
|
+
logs: AuditLog[];
|
|
192
|
+
total: number;
|
|
193
|
+
}>;
|
|
194
|
+
createAuditLog(data: Omit<AuditLog, "id" | "timestamp">): Promise<AuditLog>;
|
|
195
|
+
private docToAuthUser;
|
|
196
|
+
private docToSession;
|
|
197
|
+
createEmailVerificationToken(userId: string): Promise<{
|
|
198
|
+
token: string;
|
|
199
|
+
expiresAt: Date;
|
|
200
|
+
}>;
|
|
201
|
+
verifyEmailToken(token: string): Promise<{
|
|
202
|
+
success: boolean;
|
|
203
|
+
userId?: string;
|
|
204
|
+
error?: string;
|
|
205
|
+
}>;
|
|
206
|
+
createPasswordResetToken(email: string): Promise<{
|
|
207
|
+
token: string;
|
|
208
|
+
expiresAt: Date;
|
|
209
|
+
error?: string;
|
|
210
|
+
}>;
|
|
211
|
+
resetPasswordWithToken(token: string, newPassword: string): Promise<{
|
|
212
|
+
success: boolean;
|
|
213
|
+
error?: string;
|
|
214
|
+
}>;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export { type AdapterOptions as A, type DatabaseConnectionOptions as D, MongoDBAdapter as M, type DatabaseType as a, type DrizzleAdapterOptions as b, type MongoDBAdapterOptions as c, MongoDBAuthAdapter as d, createMongoDBAdapter as e, getMongoDb as f, getMongoClient as g };
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { b as AbstractBaseAdapter, c as AuthAdapter, U as UserRole, d as AuthUser, S as Session, a as AuditLogFilter, A as AuditLog } from './base-C2DOe8wD.js';
|
|
2
|
+
import { F as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, U as UpdateArgs, D as DeleteArgs, e as FindOneArgs, f as FindVersionsArgs, V as VersionRecord, g as CreateVersionArgs } from './types-CKWnrUAh.js';
|
|
3
|
+
|
|
4
|
+
type DatabaseType = 'postgres' | 'sqlite' | 'mongodb';
|
|
5
|
+
interface DatabaseConnectionOptions {
|
|
6
|
+
type: DatabaseType;
|
|
7
|
+
host?: string;
|
|
8
|
+
port?: number;
|
|
9
|
+
database?: string;
|
|
10
|
+
user?: string;
|
|
11
|
+
password?: string;
|
|
12
|
+
url?: string;
|
|
13
|
+
ssl?: boolean | Record<string, any>;
|
|
14
|
+
maxConnections?: number;
|
|
15
|
+
connectionTimeout?: number;
|
|
16
|
+
}
|
|
17
|
+
interface DrizzleAdapterOptions {
|
|
18
|
+
type?: 'postgres' | 'sqlite';
|
|
19
|
+
client?: any;
|
|
20
|
+
schema?: any;
|
|
21
|
+
connectionString?: string;
|
|
22
|
+
connectionOptions?: DatabaseConnectionOptions;
|
|
23
|
+
}
|
|
24
|
+
interface MongoDBAdapterOptions {
|
|
25
|
+
type?: 'mongodb';
|
|
26
|
+
client?: any;
|
|
27
|
+
database?: string;
|
|
28
|
+
connectionString?: string;
|
|
29
|
+
connectionOptions?: DatabaseConnectionOptions;
|
|
30
|
+
/**
|
|
31
|
+
* Maximum number of connections in the connection pool.
|
|
32
|
+
* Defaults to 10 (or process.env.MONGODB_MAX_POOL_SIZE).
|
|
33
|
+
* Note: Default MongoDB driver setting is 100, which can easily overwhelm
|
|
34
|
+
* MongoDB Atlas free/shared tiers (e.g. M0 limit is 500 connections cluster-wide).
|
|
35
|
+
*/
|
|
36
|
+
maxPoolSize?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Minimum number of connections in the connection pool.
|
|
39
|
+
* Defaults to 1 (or process.env.MONGODB_MIN_POOL_SIZE).
|
|
40
|
+
*/
|
|
41
|
+
minPoolSize?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Maximum number of milliseconds that a connection can remain idle in the pool before being removed.
|
|
44
|
+
* Defaults to 30000 (30 seconds).
|
|
45
|
+
*/
|
|
46
|
+
maxIdleTimeMS?: number;
|
|
47
|
+
/**
|
|
48
|
+
* How long the MongoDB driver will attempt to select a server before timing out.
|
|
49
|
+
* Defaults to 5000 (5 seconds).
|
|
50
|
+
*/
|
|
51
|
+
serverSelectionTimeoutMS?: number;
|
|
52
|
+
/**
|
|
53
|
+
* How long a connection attempt can take before timing out.
|
|
54
|
+
* Defaults to 10000 (10 seconds).
|
|
55
|
+
*/
|
|
56
|
+
connectTimeoutMS?: number;
|
|
57
|
+
/**
|
|
58
|
+
* How long a send or receive on a socket can take before timing out.
|
|
59
|
+
*/
|
|
60
|
+
socketTimeoutMS?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Additional raw MongoClientOptions passed directly to MongoClient.
|
|
63
|
+
*/
|
|
64
|
+
clientOptions?: Record<string, any>;
|
|
65
|
+
/**
|
|
66
|
+
* Whether to disable global client caching across HMR / module reloads in development.
|
|
67
|
+
* Defaults to false (caching enabled).
|
|
68
|
+
*/
|
|
69
|
+
disableGlobalClientCache?: boolean;
|
|
70
|
+
}
|
|
71
|
+
type AdapterOptions = DrizzleAdapterOptions | MongoDBAdapterOptions;
|
|
72
|
+
|
|
73
|
+
declare class MongoDBAdapter extends AbstractBaseAdapter {
|
|
74
|
+
dialect: "mongodb";
|
|
75
|
+
client: any;
|
|
76
|
+
db: any;
|
|
77
|
+
private database;
|
|
78
|
+
private connectionString?;
|
|
79
|
+
private options;
|
|
80
|
+
constructor(options: MongoDBAdapterOptions);
|
|
81
|
+
/**
|
|
82
|
+
* Resolves the default connection pool options for MongoDB to prevent
|
|
83
|
+
* connection pool exhaustion in serverless / Astro / Next.js environments.
|
|
84
|
+
*/
|
|
85
|
+
private getPoolOptions;
|
|
86
|
+
connect(): Promise<void>;
|
|
87
|
+
disconnect(options?: {
|
|
88
|
+
force?: boolean;
|
|
89
|
+
}): Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* Helper to retrieve or initialize a singleton MongoDB Db instance.
|
|
92
|
+
*/
|
|
93
|
+
static getDb(options?: MongoDBAdapterOptions | string): Promise<any>;
|
|
94
|
+
/**
|
|
95
|
+
* Helper to retrieve or initialize a singleton MongoClient instance.
|
|
96
|
+
*/
|
|
97
|
+
static getClient(options?: MongoDBAdapterOptions | string): Promise<any>;
|
|
98
|
+
private getMongoCollection;
|
|
99
|
+
find<T>(args: FindArgs): Promise<FindResult<T>>;
|
|
100
|
+
private buildIdFilter;
|
|
101
|
+
findByID<T>(args: FindByIDArgs): Promise<T | null>;
|
|
102
|
+
create<T>(args: CreateArgs): Promise<T>;
|
|
103
|
+
update<T>(args: UpdateArgs): Promise<T>;
|
|
104
|
+
delete<T>(args: DeleteArgs): Promise<T>;
|
|
105
|
+
count(args: {
|
|
106
|
+
collection: string;
|
|
107
|
+
where?: Record<string, any>;
|
|
108
|
+
tenantId?: string;
|
|
109
|
+
}): Promise<number>;
|
|
110
|
+
findOne(args: FindOneArgs): Promise<any>;
|
|
111
|
+
findVersions(args: FindVersionsArgs): Promise<FindResult<VersionRecord>>;
|
|
112
|
+
findVersionByID(args: {
|
|
113
|
+
collection: string;
|
|
114
|
+
versionId: string;
|
|
115
|
+
tenantId?: string;
|
|
116
|
+
}): Promise<VersionRecord | null>;
|
|
117
|
+
createVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
118
|
+
updateLatestVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
119
|
+
deleteVersions(args: {
|
|
120
|
+
collection: string;
|
|
121
|
+
documentId: string;
|
|
122
|
+
keepLatest?: number;
|
|
123
|
+
tenantId?: string;
|
|
124
|
+
}): Promise<void>;
|
|
125
|
+
migrate?(): Promise<void>;
|
|
126
|
+
private getCollectionConfig;
|
|
127
|
+
private buildFilter;
|
|
128
|
+
private buildProjection;
|
|
129
|
+
private processResult;
|
|
130
|
+
private generateId;
|
|
131
|
+
}
|
|
132
|
+
declare function createMongoDBAdapter(options: MongoDBAdapterOptions): MongoDBAdapter;
|
|
133
|
+
/**
|
|
134
|
+
* Global helper to access or initialize a pooled MongoDB Db singleton instance.
|
|
135
|
+
*/
|
|
136
|
+
declare function getMongoDb(options?: MongoDBAdapterOptions | string): Promise<any>;
|
|
137
|
+
/**
|
|
138
|
+
* Global helper to access or initialize a pooled MongoClient singleton instance.
|
|
139
|
+
*/
|
|
140
|
+
declare function getMongoClient(options?: MongoDBAdapterOptions | string): Promise<any>;
|
|
141
|
+
|
|
142
|
+
interface MongoDBAuthAdapterOptions {
|
|
143
|
+
db?: any | (() => any);
|
|
144
|
+
adapter?: any;
|
|
145
|
+
client?: any;
|
|
146
|
+
collectionPrefix?: string;
|
|
147
|
+
sessionTTL?: number;
|
|
148
|
+
refreshTokenTTL?: number;
|
|
149
|
+
}
|
|
150
|
+
declare class MongoDBAuthAdapter implements AuthAdapter {
|
|
151
|
+
private db;
|
|
152
|
+
private adapter;
|
|
153
|
+
private client;
|
|
154
|
+
private prefix;
|
|
155
|
+
private sessionTTL;
|
|
156
|
+
private refreshTokenTTL;
|
|
157
|
+
private indexesEnsured;
|
|
158
|
+
constructor(options: MongoDBAuthAdapterOptions);
|
|
159
|
+
private getDatabase;
|
|
160
|
+
private col;
|
|
161
|
+
connect(): Promise<void>;
|
|
162
|
+
disconnect(): Promise<void>;
|
|
163
|
+
private ensureIndexes;
|
|
164
|
+
createUser(data: {
|
|
165
|
+
email: string;
|
|
166
|
+
password: string;
|
|
167
|
+
name?: string;
|
|
168
|
+
role?: UserRole;
|
|
169
|
+
avatar?: string;
|
|
170
|
+
tenantId?: string;
|
|
171
|
+
}): Promise<AuthUser>;
|
|
172
|
+
findUserByEmail(email: string): Promise<AuthUser | null>;
|
|
173
|
+
findUserById(id: string): Promise<AuthUser | null>;
|
|
174
|
+
updateUser(id: string, data: Partial<AuthUser>): Promise<AuthUser | null>;
|
|
175
|
+
deleteUser(id: string): Promise<boolean>;
|
|
176
|
+
verifyPassword(email: string, password: string): Promise<AuthUser | null>;
|
|
177
|
+
hashPassword(password: string): Promise<string>;
|
|
178
|
+
createSession(userId: string, data?: {
|
|
179
|
+
ipAddress?: string;
|
|
180
|
+
userAgent?: string;
|
|
181
|
+
}): Promise<Session>;
|
|
182
|
+
findSessionByToken(token: string): Promise<Session | null>;
|
|
183
|
+
findSessionByRefreshToken(refreshToken: string): Promise<Session | null>;
|
|
184
|
+
deleteSession(sessionId: string): Promise<boolean>;
|
|
185
|
+
deleteUserSessions(userId: string): Promise<number>;
|
|
186
|
+
hasAnyUsers(): Promise<boolean>;
|
|
187
|
+
addPasswordToHistory(userId: string, passwordHash: string): Promise<void>;
|
|
188
|
+
getPasswordHistory(userId: string, count?: number): Promise<string[]>;
|
|
189
|
+
isPasswordInHistory(password: string, userId: string, historyCount?: number): Promise<boolean>;
|
|
190
|
+
findAuditLogs(filter: AuditLogFilter): Promise<{
|
|
191
|
+
logs: AuditLog[];
|
|
192
|
+
total: number;
|
|
193
|
+
}>;
|
|
194
|
+
createAuditLog(data: Omit<AuditLog, "id" | "timestamp">): Promise<AuditLog>;
|
|
195
|
+
private docToAuthUser;
|
|
196
|
+
private docToSession;
|
|
197
|
+
createEmailVerificationToken(userId: string): Promise<{
|
|
198
|
+
token: string;
|
|
199
|
+
expiresAt: Date;
|
|
200
|
+
}>;
|
|
201
|
+
verifyEmailToken(token: string): Promise<{
|
|
202
|
+
success: boolean;
|
|
203
|
+
userId?: string;
|
|
204
|
+
error?: string;
|
|
205
|
+
}>;
|
|
206
|
+
createPasswordResetToken(email: string): Promise<{
|
|
207
|
+
token: string;
|
|
208
|
+
expiresAt: Date;
|
|
209
|
+
error?: string;
|
|
210
|
+
}>;
|
|
211
|
+
resetPasswordWithToken(token: string, newPassword: string): Promise<{
|
|
212
|
+
success: boolean;
|
|
213
|
+
error?: string;
|
|
214
|
+
}>;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export { type AdapterOptions as A, type DatabaseConnectionOptions as D, MongoDBAdapter as M, type DatabaseType as a, type DrizzleAdapterOptions as b, type MongoDBAdapterOptions as c, MongoDBAuthAdapter as d, createMongoDBAdapter as e, getMongoDb as f, getMongoClient as g };
|