diff --git a/website/src/services/lapisApi.ts b/website/src/services/lapisApi.ts index 3e681d09e..627181a87 100644 --- a/website/src/services/lapisApi.ts +++ b/website/src/services/lapisApi.ts @@ -8,6 +8,7 @@ import { lapisBaseRequest, mutationsRequest, mutationsResponse, + sequenceRequest, } from '../types/lapis.ts'; function withSample(path: Path) { @@ -107,7 +108,7 @@ const alignedNucleotideSequencesEndpoint = makeEndpoint({ { name: 'request', type: 'Body', - schema: lapisBaseRequest, + schema: sequenceRequest, }, ], response: z.string(), @@ -122,7 +123,7 @@ const alignedNucleotideSequencesMultiSegmentEndpoint = makeEndpoint({ { name: 'request', type: 'Body', - schema: lapisBaseRequest, + schema: sequenceRequest, }, ], response: z.string(), @@ -137,7 +138,7 @@ const unalignedNucleotideSequencesMultiSegmentEndpoint = makeEndpoint({ { name: 'request', type: 'Body', - schema: lapisBaseRequest, + schema: sequenceRequest, }, ], response: z.string(), @@ -152,7 +153,7 @@ const unalignedNucleotideSequencesEndpoint = makeEndpoint({ { name: 'request', type: 'Body', - schema: lapisBaseRequest, + schema: sequenceRequest, }, ], response: z.string(), @@ -167,7 +168,7 @@ const alignedAminoAcidSequencesEndpoint = makeEndpoint({ { name: 'request', type: 'Body', - schema: lapisBaseRequest, + schema: sequenceRequest, }, ], response: z.string(), diff --git a/website/src/services/lapisClient.ts b/website/src/services/lapisClient.ts index 3682e8f0f..1011f0d27 100644 --- a/website/src/services/lapisClient.ts +++ b/website/src/services/lapisClient.ts @@ -149,6 +149,7 @@ export class LapisClient extends ZodiosWrapperClient { public getUnalignedSequences(accessionVersion: string) { return this.call('unalignedNucleotideSequences', { [this.schema.primaryKey]: accessionVersion, + dataFormat: 'FASTA', }); } @@ -159,6 +160,7 @@ export class LapisClient extends ZodiosWrapperClient { 'unalignedNucleotideSequencesMultiSegment', { [this.schema.primaryKey]: accessionVersion, + dataFormat: 'FASTA', }, { params: { segment } }, ), diff --git a/website/src/types/lapis.ts b/website/src/types/lapis.ts index 747d8391a..170e3a262 100644 --- a/website/src/types/lapis.ts +++ b/website/src/types/lapis.ts @@ -24,6 +24,8 @@ export type LapisBaseRequest = z.infer; export const mutationsRequest = lapisBaseRequest.extend({ minProportion: z.number().optional() }); +export const sequenceRequest = lapisBaseRequest.extend({ dataFormat: z.enum(['FASTA', 'NDJSON', 'JSON']) }); + export const mutationProportionCount = z.object({ mutation: z.string(), proportion: z.number(),