Codapi test

const schemaSpecification = await adminClient.getSchemaSpecification();
console.log('Schema:', schemaSpecification.valueOrThrow());

const dossierCore = await import("https://esm.sh/@dossierhq/core@0.5.15");
const dossierServer = await import("https://esm.sh/@dossierhq/server@0.5.15");
const dossierSqlJs = await import("https://esm.sh/@dossierhq/sql.js@0.5.15");
const { default: initSqlJs } = await import("https://esm.sh/sql.js@1.10.2");
const logger = dossierCore.createConsoleLogger(console);
logger.info("Initializing Dossier...");
const SQL = await initSqlJs({ locateFile: file => `https://sql.js.org/dist/${file}` });
const database = new SQL.Database();
const databaseAdapterResult = await dossierSqlJs.createSqlJsAdapter({ logger }, database, {
    migrate: true,
    fts: { version: 'fts4' },
    journalMode: 'memory',
});
const serverResult = await dossierServer.createServer({ logger, databaseAdapter: databaseAdapterResult.valueOrThrow() });
const server = serverResult.valueOrThrow();

const sessionResult = await server.createSession({ provider: 'sys', identifier: 'user', defaultAuthKeys: ['none', 'subject'], logger, databasePerformance: null});
const session = sessionResult.valueOrThrow();
const adminClient = server.createAdminClient(session);