@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
1 lines • 2.51 kB
Source Map (JSON)
{"version":3,"file":"preview-sessions.mjs","names":[],"sources":["../../../src/libs/repositories/preview-sessions.ts"],"sourcesContent":["import z from \"zod\";\nimport type DatabaseAdapter from \"../db/adapter-base.js\";\nimport type { KyselyDB } from \"../db/types.js\";\nimport StaticRepository from \"./parents/static-repository.js\";\n\nexport default class PreviewSessionsRepository extends StaticRepository<\"lucid_preview_sessions\"> {\n\tconstructor(db: KyselyDB, dbAdapter: DatabaseAdapter) {\n\t\tsuper(db, dbAdapter, \"lucid_preview_sessions\");\n\t}\n\ttableSchema = z.object({\n\t\tid: z.number(),\n\t\ttoken_hash: z.string(),\n\t\tentry_collection_key: z.string(),\n\t\tentry_document_id: z.number(),\n\t\tentry_version_type: z.string(),\n\t\tmode: z.enum([\"perspective\", \"scoped\"]),\n\t\tentry_version_id: z.number().nullable(),\n\t\texpires_at: z.union([z.string(), z.date()]),\n\t\tcreated_by: z.number().nullable(),\n\t\tcreated_at: z.union([z.string(), z.date()]),\n\t});\n\tcolumnFormats = {\n\t\tid: this.dbAdapter.getDataType(\"primary\"),\n\t\ttoken_hash: this.dbAdapter.getDataType(\"char\", 64),\n\t\tentry_collection_key: this.dbAdapter.getDataType(\"text\"),\n\t\tentry_document_id: this.dbAdapter.getDataType(\"integer\"),\n\t\tentry_version_type: this.dbAdapter.getDataType(\"varchar\", 255),\n\t\tmode: this.dbAdapter.getDataType(\"varchar\", 255),\n\t\tentry_version_id: this.dbAdapter.getDataType(\"integer\"),\n\t\texpires_at: this.dbAdapter.getDataType(\"timestamp\"),\n\t\tcreated_by: this.dbAdapter.getDataType(\"integer\"),\n\t\tcreated_at: this.dbAdapter.getDataType(\"timestamp\"),\n\t};\n\tqueryConfig = undefined;\n}\n"],"mappings":"kEAKA,IAAqB,EAArB,cAAuD,CAA2C,CACjG,YAAY,EAAc,EAA4B,CACrD,MAAM,EAAI,EAAW,wBAAwB,CAC9C,CACA,YAAc,EAAE,OAAO,CACtB,GAAI,EAAE,OAAO,EACb,WAAY,EAAE,OAAO,EACrB,qBAAsB,EAAE,OAAO,EAC/B,kBAAmB,EAAE,OAAO,EAC5B,mBAAoB,EAAE,OAAO,EAC7B,KAAM,EAAE,KAAK,CAAC,cAAe,QAAQ,CAAC,EACtC,iBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,EACtC,WAAY,EAAE,MAAM,CAAC,EAAE,OAAO,EAAG,EAAE,KAAK,CAAC,CAAC,EAC1C,WAAY,EAAE,OAAO,CAAC,CAAC,SAAS,EAChC,WAAY,EAAE,MAAM,CAAC,EAAE,OAAO,EAAG,EAAE,KAAK,CAAC,CAAC,CAC3C,CAAC,EACD,cAAgB,CACf,GAAI,KAAK,UAAU,YAAY,SAAS,EACxC,WAAY,KAAK,UAAU,YAAY,OAAQ,EAAE,EACjD,qBAAsB,KAAK,UAAU,YAAY,MAAM,EACvD,kBAAmB,KAAK,UAAU,YAAY,SAAS,EACvD,mBAAoB,KAAK,UAAU,YAAY,UAAW,GAAG,EAC7D,KAAM,KAAK,UAAU,YAAY,UAAW,GAAG,EAC/C,iBAAkB,KAAK,UAAU,YAAY,SAAS,EACtD,WAAY,KAAK,UAAU,YAAY,WAAW,EAClD,WAAY,KAAK,UAAU,YAAY,SAAS,EAChD,WAAY,KAAK,UAAU,YAAY,WAAW,CACnD,EACA,YAAc,IAAA,EACf"}