{"version":3,"file":"export.cjs","names":[],"sources":["../../../../src/rest/commands/utils/export.ts"],"sourcesContent":["import type { Query } from '../../../index.js';\nimport type { DirectusFile } from '../../../schema/file.js';\nimport type { RestCommand } from '../../types.js';\n\nexport type FileFormat = 'csv' | 'csv_utf8' | 'json' | 'xml' | 'yaml';\n\n/**\n * Export a larger data set to a file in the File Library\n * @returns Nothing\n */\nexport const utilsExport =\n\t<Schema, TQuery extends Query<Schema, Schema[Collection]>, Collection extends keyof Schema>(\n\t\tcollection: Collection,\n\t\tformat: FileFormat,\n\t\tquery: TQuery,\n\t\tfile: Partial<DirectusFile<Schema>>,\n\t): RestCommand<void, Schema> =>\n\t() => ({\n\t\tmethod: 'POST',\n\t\tpath: `/utils/export/${collection as string}`,\n\t\tbody: JSON.stringify({ format, query, file }),\n\t});\n"],"mappings":"AAUA,MAAa,GAEX,EACA,EACA,EACA,SAEM,CACN,OAAQ,OACR,KAAM,iBAAiB,IACvB,KAAM,KAAK,UAAU,CAAE,SAAQ,QAAO,OAAM,CAAC,CAC7C"}