import { normalizeSampleRecord } from './sampleNormalizers' import { createTemplateEnvelope } from './templateEnvelopes' import { validateSampleSheetData } from './templateValidators' import type { CreateSampleSheetTemplateOptions, SampleSheetTemplate, SampleSheetTemplateData, } from './types' /** @deprecated Scheduled for removal from the core SDK in MINT 1.4; the biology templates move to a dedicated package or the owning plugins. */ export function createSampleSheetTemplate( options: CreateSampleSheetTemplateOptions ): SampleSheetTemplate { const data: SampleSheetTemplateData = { samples: options.samples.map(normalizeSampleRecord), columns: options.columns ?? [ { id: 'sampleId', label: 'Sample ID', type: 'string', required: true, groupable: false }, { id: 'name', label: 'Name', type: 'string', required: false, groupable: false }, ], groups: options.groups ?? [], } validateSampleSheetData(data) return createTemplateEnvelope('sample-sheet', data, options.metadata ?? {}) }