{"version":3,"file":"snapshot.cjs","names":[],"sources":["../../../../src/rest/commands/schema/snapshot.ts"],"sourcesContent":["import type { RestCommand } from '../../types.js';\n\n// TODO improve typing\nexport type SchemaSnapshotOutput = {\n\tversion: number;\n\tdirectus: string;\n\tvendor: string;\n\tcollections: Record<string, any>[];\n\tfields: Record<string, any>[];\n\trelations: Record<string, any>[];\n};\n\n/**\n * Retrieve the current schema. This endpoint is only available to admin users.\n * @returns Returns the JSON object containing schema details.\n */\nexport const schemaSnapshot =\n\t<Schema>(): RestCommand<SchemaSnapshotOutput, Schema> =>\n\t() => ({\n\t\tmethod: 'GET',\n\t\tpath: '/schema/snapshot',\n\t});\n"],"mappings":"AAgBA,MAAa,WAEL,CACN,OAAQ,MACR,KAAM,mBACN"}