From 60bd628c2186fa88a4bf2d59ee7c5fa37a07fa5c Mon Sep 17 00:00:00 2001 From: Manuel Holtgrewe Date: Wed, 25 Sep 2024 10:51:19 +0200 Subject: [PATCH] feat: migrate from pinia stores to TanStack Query (#247) (#251) Co-authored-by: gromdimon --- .gitignore | 3 + Makefile | 73 +++ ext/cadaPrio-api/openapi.yaml | 82 +++ .../src/lib/@tanstack/vue-query.gen.ts | 78 +++ ext/cadaPrio-api/src/lib/index.ts | 4 + ext/cadaPrio-api/src/lib/schemas.gen.ts | 45 ++ ext/cadaPrio-api/src/lib/services.gen.ts | 45 ++ ext/cadaPrio-api/src/lib/types.gen.ts | 26 + ext/dotty-api/openapi.yaml | 251 +++++++++ .../src/lib/@tanstack/vue-query.gen.ts | 85 +++ ext/dotty-api/src/lib/index.ts | 4 + ext/dotty-api/src/lib/schemas.gen.ts | 231 ++++++++ ext/dotty-api/src/lib/services.gen.ts | 47 ++ ext/dotty-api/src/lib/types.gen.ts | 98 ++++ ext/variantValidator-api/openapi.yaml | 413 +++++++++++++++ .../src/lib/@tanstack/vue-query.gen.ts | 247 +++++++++ ext/variantValidator-api/src/lib/index.ts | 3 + .../src/lib/services.gen.ts | 177 +++++++ ext/variantValidator-api/src/lib/types.gen.ts | 411 +++++++++++++++ ext/viguno-api/openapi.yaml | 494 ++++++++++++++++++ .../src/lib/@tanstack/vue-query.gen.ts | 143 +++++ ext/viguno-api/src/lib/index.ts | 4 + ext/viguno-api/src/lib/schemas.gen.ts | 280 ++++++++++ ext/viguno-api/src/lib/services.gen.ts | 95 ++++ ext/viguno-api/src/lib/types.gen.ts | 334 ++++++++++++ openapi-ts.config.cadaPrio.ts | 10 + openapi-ts.config.dotty.ts | 10 + openapi-ts.config.variantValidator.ts | 10 + openapi-ts.config.viguno.ts | 10 + openapis/cada-prio.yaml | 82 +++ openapis/dotty.yaml | 0 package-lock.json | 380 +++++++++----- package.json | 4 +- .../SeqvarVariantValidatorCard.vue | 14 +- 34 files changed, 4053 insertions(+), 140 deletions(-) create mode 100644 ext/cadaPrio-api/openapi.yaml create mode 100644 ext/cadaPrio-api/src/lib/@tanstack/vue-query.gen.ts create mode 100644 ext/cadaPrio-api/src/lib/index.ts create mode 100644 ext/cadaPrio-api/src/lib/schemas.gen.ts create mode 100644 ext/cadaPrio-api/src/lib/services.gen.ts create mode 100644 ext/cadaPrio-api/src/lib/types.gen.ts create mode 100644 ext/dotty-api/openapi.yaml create mode 100644 ext/dotty-api/src/lib/@tanstack/vue-query.gen.ts create mode 100644 ext/dotty-api/src/lib/index.ts create mode 100644 ext/dotty-api/src/lib/schemas.gen.ts create mode 100644 ext/dotty-api/src/lib/services.gen.ts create mode 100644 ext/dotty-api/src/lib/types.gen.ts create mode 100644 ext/variantValidator-api/openapi.yaml create mode 100644 ext/variantValidator-api/src/lib/@tanstack/vue-query.gen.ts create mode 100644 ext/variantValidator-api/src/lib/index.ts create mode 100644 ext/variantValidator-api/src/lib/services.gen.ts create mode 100644 ext/variantValidator-api/src/lib/types.gen.ts create mode 100644 ext/viguno-api/openapi.yaml create mode 100644 ext/viguno-api/src/lib/@tanstack/vue-query.gen.ts create mode 100644 ext/viguno-api/src/lib/index.ts create mode 100644 ext/viguno-api/src/lib/schemas.gen.ts create mode 100644 ext/viguno-api/src/lib/services.gen.ts create mode 100644 ext/viguno-api/src/lib/types.gen.ts create mode 100644 openapi-ts.config.cadaPrio.ts create mode 100644 openapi-ts.config.dotty.ts create mode 100644 openapi-ts.config.variantValidator.ts create mode 100644 openapi-ts.config.viguno.ts create mode 100644 openapis/cada-prio.yaml create mode 100644 openapis/dotty.yaml diff --git a/.gitignore b/.gitignore index 79467d3..18c38af 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# log files +/*.log + # nodejs /node_modules diff --git a/Makefile b/Makefile index c9a63ba..c627a31 100644 --- a/Makefile +++ b/Makefile @@ -110,3 +110,76 @@ proto-ts: .PHONY: proto proto: proto-fetch proto-ts format lint + +.PHONY: openapi +openapi: \ + openapi-cadaPrio-ts \ + openapi-dotty-ts \ + openapi-variantValidator-ts \ + openapi-viguno-ts \ + format \ + lint + +.PHONY: openapi-cadaPrio-fetch +openapi-cadaPrio-fetch: + mkdir -p ext/cadaPrio-api + + rm -f ext/cadaPrio-api/openapi.yaml + docker pull ghcr.io/bihealth/cada-prio:main + docker run ghcr.io/bihealth/cada-prio:main cada-prio utils dump-openapi-yaml /dev/stdout \ + | grep -v '^+' \ + > ext/cadaPrio-api/openapi.yaml + +.PHONY: openapi-cadaPrio-ts +openapi-cadaPrio-ts: openapi-cadaPrio-fetch + rm -rf ext/cadaPrio-api/src/lib + mkdir -p ext/cadaPrio-api/src + npx @hey-api/openapi-ts --file openapi-ts.config.cadaPrio.ts + +.PHONY: openapi-dotty-fetch +openapi-dotty-fetch: + mkdir -p ext/dotty-api + + rm -f ext/dotty-api/openapi.yaml + docker pull ghcr.io/bihealth/dotty:main + docker run ghcr.io/bihealth/dotty:main python -m dotty.main \ + | grep -v '^+' \ + > ext/dotty-api/openapi.yaml + +.PHONY: openapi-dotty-ts +openapi-dotty-ts: openapi-dotty-fetch + rm -rf ext/dotty-api/src/lib + mkdir -p ext/dotty-api/src + npx @hey-api/openapi-ts --file openapi-ts.config.dotty.ts + +.PHONY: openapi-variantValidator-fetch +openapi-variantValidator-fetch: + mkdir -p ext/variantValidator-api + + rm -f ext/variantValidator-api/openapi.yaml + wget -O ext/variantValidator-api/openapi.yaml \ + https://rest.variantvalidator.org/swagger.json + +.PHONY: openapi-variantValidator-ts +openapi-variantValidator-ts: openapi-variantValidator-fetch + rm -rf ext/variantValidator-api/src/lib + mkdir -p ext/variantValidator-api/src + npx @hey-api/openapi-ts --file openapi-ts.config.variantValidator.ts + +.PHONY: openapi-viguno-fetch +openapi-viguno-fetch: + rm -rf ext/viguno-api/openapi.yaml + mkdir -p ext/viguno-api + + docker pull ghcr.io/varfish-org/viguno:main + docker run -t ghcr.io/varfish-org/viguno:main \ + exec viguno server schema --output-file /dev/stdout \ + | grep -v ' INFO' \ + | grep -v '^+' \ + > ext/viguno-api/openapi.yaml + +.PHONY: openapi-viguno-ts +openapi-viguno-ts: openapi-viguno-fetch + rm -rf ext/viguno-api/src/lib + mkdir -p ext/viguno-api/src + npx @hey-api/openapi-ts --file openapi-ts.config.viguno.ts diff --git a/ext/cadaPrio-api/openapi.yaml b/ext/cadaPrio-api/openapi.yaml new file mode 100644 index 0000000..81e76d3 --- /dev/null +++ b/ext/cadaPrio-api/openapi.yaml @@ -0,0 +1,82 @@ +components: + schemas: + HTTPValidationError: + properties: + detail: + items: + $ref: '#/components/schemas/ValidationError' + title: Detail + type: array + title: HTTPValidationError + type: object + ValidationError: + properties: + loc: + items: + anyOf: + - type: string + - type: integer + title: Location + type: array + msg: + title: Message + type: string + type: + title: Error Type + type: string + required: + - loc + - msg + - type + title: ValidationError + type: object +info: + description: A phenotype-based gene prioritization tool. + title: cada-prio + version: 0.6.1 +openapi: 3.1.0 +paths: + /api/v1/predict: + get: + description: Predict genes for a given set of HPO terms and optionally genes. + operationId: handle_predict_api_v1_predict_get + parameters: + - example: HP:0000098,HP:0000218,HP:0000486 + in: query + name: hpo_terms + required: true + schema: + title: Hpo Terms + type: string + - example: FBN1,TTN,BRCA1 + in: query + name: genes + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Genes + responses: + '200': + content: + application/json: + schema: {} + description: Successful Response + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + summary: Handle Predict + /api/v1/version: + get: + operationId: version_api_v1_version_get + responses: + '200': + content: + application/json: + schema: {} + description: Successful Response + summary: Version diff --git a/ext/cadaPrio-api/src/lib/@tanstack/vue-query.gen.ts b/ext/cadaPrio-api/src/lib/@tanstack/vue-query.gen.ts new file mode 100644 index 0000000..f09d375 --- /dev/null +++ b/ext/cadaPrio-api/src/lib/@tanstack/vue-query.gen.ts @@ -0,0 +1,78 @@ +// This file is auto-generated by @hey-api/openapi-ts +import type { Options } from '@hey-api/client-fetch' +import { queryOptions } from '@tanstack/vue-query' + +import { client, handlePredictApiV1PredictGet, versionApiV1VersionGet } from '../services.gen' +import type { HandlePredictApiV1PredictGetData } from '../types.gen' + +type QueryKey = [ + Pick & { + _id: string + _infinite?: boolean + } +] + +const createQueryKey = ( + id: string, + options?: TOptions, + infinite?: boolean +): QueryKey[0] => { + const params: QueryKey[0] = { + _id: id, + baseUrl: client.getConfig().baseUrl + } as QueryKey[0] + if (infinite) { + params._infinite = infinite + } + if (options?.body) { + params.body = options.body + } + if (options?.headers) { + params.headers = options.headers + } + if (options?.path) { + params.path = options.path + } + if (options?.query) { + params.query = options.query + } + return params +} + +export const handlePredictApiV1PredictGetQueryKey = ( + options: Options +) => [createQueryKey('handlePredictApiV1PredictGet', options)] + +export const handlePredictApiV1PredictGetOptions = ( + options: Options +) => { + return queryOptions({ + queryFn: async ({ queryKey }) => { + const { data } = await handlePredictApiV1PredictGet({ + ...options, + ...queryKey[0], + throwOnError: true + }) + return data + }, + queryKey: handlePredictApiV1PredictGetQueryKey(options) + }) +} + +export const versionApiV1VersionGetQueryKey = (options?: Options) => [ + createQueryKey('versionApiV1VersionGet', options) +] + +export const versionApiV1VersionGetOptions = (options?: Options) => { + return queryOptions({ + queryFn: async ({ queryKey }) => { + const { data } = await versionApiV1VersionGet({ + ...options, + ...queryKey[0], + throwOnError: true + }) + return data + }, + queryKey: versionApiV1VersionGetQueryKey(options) + }) +} diff --git a/ext/cadaPrio-api/src/lib/index.ts b/ext/cadaPrio-api/src/lib/index.ts new file mode 100644 index 0000000..d4894af --- /dev/null +++ b/ext/cadaPrio-api/src/lib/index.ts @@ -0,0 +1,4 @@ +// This file is auto-generated by @hey-api/openapi-ts +export * from './schemas.gen' +export * from './services.gen' +export * from './types.gen' diff --git a/ext/cadaPrio-api/src/lib/schemas.gen.ts b/ext/cadaPrio-api/src/lib/schemas.gen.ts new file mode 100644 index 0000000..80c715f --- /dev/null +++ b/ext/cadaPrio-api/src/lib/schemas.gen.ts @@ -0,0 +1,45 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export const $HTTPValidationError = { + properties: { + detail: { + items: { + $ref: '#/components/schemas/ValidationError' + }, + title: 'Detail', + type: 'array' + } + }, + title: 'HTTPValidationError', + type: 'object' +} as const + +export const $ValidationError = { + properties: { + loc: { + items: { + anyOf: [ + { + type: 'string' + }, + { + type: 'integer' + } + ] + }, + title: 'Location', + type: 'array' + }, + msg: { + title: 'Message', + type: 'string' + }, + type: { + title: 'Error Type', + type: 'string' + } + }, + required: ['loc', 'msg', 'type'], + title: 'ValidationError', + type: 'object' +} as const diff --git a/ext/cadaPrio-api/src/lib/services.gen.ts b/ext/cadaPrio-api/src/lib/services.gen.ts new file mode 100644 index 0000000..56e1a31 --- /dev/null +++ b/ext/cadaPrio-api/src/lib/services.gen.ts @@ -0,0 +1,45 @@ +// This file is auto-generated by @hey-api/openapi-ts +import { type Options, createClient, createConfig } from '@hey-api/client-fetch' + +import type { + HandlePredictApiV1PredictGetData, + HandlePredictApiV1PredictGetError, + HandlePredictApiV1PredictGetResponse, + VersionApiV1VersionGetError, + VersionApiV1VersionGetResponse +} from './types.gen' + +export const client = createClient(createConfig()) + +/** + * Handle Predict + * Predict genes for a given set of HPO terms and optionally genes. + */ +export const handlePredictApiV1PredictGet = ( + options: Options +) => { + return (options?.client ?? client).get< + HandlePredictApiV1PredictGetResponse, + HandlePredictApiV1PredictGetError, + ThrowOnError + >({ + ...options, + url: '/api/v1/predict' + }) +} + +/** + * Version + */ +export const versionApiV1VersionGet = ( + options?: Options +) => { + return (options?.client ?? client).get< + VersionApiV1VersionGetResponse, + VersionApiV1VersionGetError, + ThrowOnError + >({ + ...options, + url: '/api/v1/version' + }) +} diff --git a/ext/cadaPrio-api/src/lib/types.gen.ts b/ext/cadaPrio-api/src/lib/types.gen.ts new file mode 100644 index 0000000..3340af9 --- /dev/null +++ b/ext/cadaPrio-api/src/lib/types.gen.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type HTTPValidationError = { + detail?: Array +} + +export type ValidationError = { + loc: Array + msg: string + type: string +} + +export type HandlePredictApiV1PredictGetData = { + query: { + genes?: string | null + hpo_terms: string + } +} + +export type HandlePredictApiV1PredictGetResponse = unknown + +export type HandlePredictApiV1PredictGetError = HTTPValidationError + +export type VersionApiV1VersionGetResponse = unknown + +export type VersionApiV1VersionGetError = unknown diff --git a/ext/dotty-api/openapi.yaml b/ext/dotty-api/openapi.yaml new file mode 100644 index 0000000..5ee43ed --- /dev/null +++ b/ext/dotty-api/openapi.yaml @@ -0,0 +1,251 @@ +components: + schemas: + Assembly: + description: Enumeration for supported assemblies. + enum: + - GRCh37 + - GRCh38 + title: Assembly + type: string + ExonAlignment: + description: Alignment of an exon to an assembly. + properties: + alignment: + anyOf: + - type: string + - type: 'null' + title: Alignment + exon_no: + title: Exon No + type: integer + ref_end: + title: Ref End + type: integer + ref_start: + title: Ref Start + type: integer + tx_end: + title: Tx End + type: integer + tx_start: + title: Tx Start + type: integer + required: + - ref_start + - ref_end + - exon_no + - tx_start + - tx_end + - alignment + title: ExonAlignment + type: object + HTTPValidationError: + properties: + detail: + items: + $ref: '#/components/schemas/ValidationError' + title: Detail + type: array + title: HTTPValidationError + type: object + Spdi: + description: SPDI representation of a variant. + properties: + alternate_inserted: + title: Alternate Inserted + type: string + assembly: + title: Assembly + type: string + contig: + title: Contig + type: string + pos: + title: Pos + type: integer + reference_deleted: + title: Reference Deleted + type: string + required: + - assembly + - contig + - pos + - reference_deleted + - alternate_inserted + title: Spdi + type: object + SpdiResult: + description: The result of the query. + properties: + message: + anyOf: + - type: string + - type: 'null' + title: Message + success: + title: Success + type: boolean + value: + anyOf: + - $ref: '#/components/schemas/Spdi' + - type: 'null' + required: + - success + title: SpdiResult + type: object + TanscriptAlignment: + description: Alignment of a `Transcript` to an assembly. + properties: + assembly: + title: Assembly + type: string + cds_end: + title: Cds End + type: integer + cds_start: + title: Cds Start + type: integer + contig: + title: Contig + type: string + exons: + items: + $ref: '#/components/schemas/ExonAlignment' + title: Exons + type: array + required: + - assembly + - contig + - cds_start + - cds_end + - exons + title: TanscriptAlignment + type: object + Transcript: + description: Transcript model. + properties: + alignments: + items: + $ref: '#/components/schemas/TanscriptAlignment' + title: Alignments + type: array + hgnc_id: + title: Hgnc Id + type: string + hgnc_symbol: + title: Hgnc Symbol + type: string + id: + title: Id + type: string + required: + - id + - hgnc_id + - hgnc_symbol + - alignments + title: Transcript + type: object + TranscriptResult: + description: The result of the query for searching for transcripts. + properties: + transcripts: + items: + $ref: '#/components/schemas/Transcript' + title: Transcripts + type: array + required: + - transcripts + title: TranscriptResult + type: object + ValidationError: + properties: + loc: + items: + anyOf: + - type: string + - type: integer + title: Location + type: array + msg: + title: Message + type: string + type: + title: Error Type + type: string + required: + - loc + - msg + - type + title: ValidationError + type: object +info: + title: dotty + version: 0.1.0 +openapi: 3.1.0 +paths: + /api/v1/find-transcripts: + get: + description: Find transcripts for the given HGNC ID. + operationId: find_transcripts_api_v1_find_transcripts_get + parameters: + - in: query + name: hgnc_id + required: true + schema: + title: Hgnc Id + type: string + - in: query + name: assembly + required: false + schema: + allOf: + - $ref: '#/components/schemas/Assembly' + default: GRCh38 + title: Assembly + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TranscriptResult' + description: Successful Response + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + summary: Find Transcripts + /api/v1/to-spdi: + get: + description: Resolve the given HGVS variant to SPDI representation. + operationId: to_spdi_api_v1_to_spdi_get + parameters: + - in: query + name: q + required: true + schema: + title: Q + type: string + - in: query + name: assembly + required: false + schema: + allOf: + - $ref: '#/components/schemas/Assembly' + default: GRCh38 + title: Assembly + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SpdiResult' + description: Successful Response + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + summary: To Spdi diff --git a/ext/dotty-api/src/lib/@tanstack/vue-query.gen.ts b/ext/dotty-api/src/lib/@tanstack/vue-query.gen.ts new file mode 100644 index 0000000..73efdee --- /dev/null +++ b/ext/dotty-api/src/lib/@tanstack/vue-query.gen.ts @@ -0,0 +1,85 @@ +// This file is auto-generated by @hey-api/openapi-ts +import type { Options } from '@hey-api/client-fetch' +import { queryOptions } from '@tanstack/vue-query' + +import { + client, + findTranscriptsApiV1FindTranscriptsGet, + toSpdiApiV1ToSpdiGet +} from '../services.gen' +import type { + FindTranscriptsApiV1FindTranscriptsGetData, + ToSpdiApiV1ToSpdiGetData +} from '../types.gen' + +type QueryKey = [ + Pick & { + _id: string + _infinite?: boolean + } +] + +const createQueryKey = ( + id: string, + options?: TOptions, + infinite?: boolean +): QueryKey[0] => { + const params: QueryKey[0] = { + _id: id, + baseUrl: client.getConfig().baseUrl + } as QueryKey[0] + if (infinite) { + params._infinite = infinite + } + if (options?.body) { + params.body = options.body + } + if (options?.headers) { + params.headers = options.headers + } + if (options?.path) { + params.path = options.path + } + if (options?.query) { + params.query = options.query + } + return params +} + +export const findTranscriptsApiV1FindTranscriptsGetQueryKey = ( + options: Options +) => [createQueryKey('findTranscriptsApiV1FindTranscriptsGet', options)] + +export const findTranscriptsApiV1FindTranscriptsGetOptions = ( + options: Options +) => { + return queryOptions({ + queryFn: async ({ queryKey }) => { + const { data } = await findTranscriptsApiV1FindTranscriptsGet({ + ...options, + ...queryKey[0], + throwOnError: true + }) + return data + }, + queryKey: findTranscriptsApiV1FindTranscriptsGetQueryKey(options) + }) +} + +export const toSpdiApiV1ToSpdiGetQueryKey = (options: Options) => [ + createQueryKey('toSpdiApiV1ToSpdiGet', options) +] + +export const toSpdiApiV1ToSpdiGetOptions = (options: Options) => { + return queryOptions({ + queryFn: async ({ queryKey }) => { + const { data } = await toSpdiApiV1ToSpdiGet({ + ...options, + ...queryKey[0], + throwOnError: true + }) + return data + }, + queryKey: toSpdiApiV1ToSpdiGetQueryKey(options) + }) +} diff --git a/ext/dotty-api/src/lib/index.ts b/ext/dotty-api/src/lib/index.ts new file mode 100644 index 0000000..d4894af --- /dev/null +++ b/ext/dotty-api/src/lib/index.ts @@ -0,0 +1,4 @@ +// This file is auto-generated by @hey-api/openapi-ts +export * from './schemas.gen' +export * from './services.gen' +export * from './types.gen' diff --git a/ext/dotty-api/src/lib/schemas.gen.ts b/ext/dotty-api/src/lib/schemas.gen.ts new file mode 100644 index 0000000..5fb57c5 --- /dev/null +++ b/ext/dotty-api/src/lib/schemas.gen.ts @@ -0,0 +1,231 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export const $Assembly = { + description: 'Enumeration for supported assemblies.', + enum: ['GRCh37', 'GRCh38'], + title: 'Assembly', + type: 'string' +} as const + +export const $ExonAlignment = { + description: 'Alignment of an exon to an assembly.', + properties: { + alignment: { + anyOf: [ + { + type: 'string' + }, + { + type: 'null' + } + ], + title: 'Alignment' + }, + exon_no: { + title: 'Exon No', + type: 'integer' + }, + ref_end: { + title: 'Ref End', + type: 'integer' + }, + ref_start: { + title: 'Ref Start', + type: 'integer' + }, + tx_end: { + title: 'Tx End', + type: 'integer' + }, + tx_start: { + title: 'Tx Start', + type: 'integer' + } + }, + required: ['ref_start', 'ref_end', 'exon_no', 'tx_start', 'tx_end', 'alignment'], + title: 'ExonAlignment', + type: 'object' +} as const + +export const $HTTPValidationError = { + properties: { + detail: { + items: { + $ref: '#/components/schemas/ValidationError' + }, + title: 'Detail', + type: 'array' + } + }, + title: 'HTTPValidationError', + type: 'object' +} as const + +export const $Spdi = { + description: 'SPDI representation of a variant.', + properties: { + alternate_inserted: { + title: 'Alternate Inserted', + type: 'string' + }, + assembly: { + title: 'Assembly', + type: 'string' + }, + contig: { + title: 'Contig', + type: 'string' + }, + pos: { + title: 'Pos', + type: 'integer' + }, + reference_deleted: { + title: 'Reference Deleted', + type: 'string' + } + }, + required: ['assembly', 'contig', 'pos', 'reference_deleted', 'alternate_inserted'], + title: 'Spdi', + type: 'object' +} as const + +export const $SpdiResult = { + description: 'The result of the query.', + properties: { + message: { + anyOf: [ + { + type: 'string' + }, + { + type: 'null' + } + ], + title: 'Message' + }, + success: { + title: 'Success', + type: 'boolean' + }, + value: { + anyOf: [ + { + $ref: '#/components/schemas/Spdi' + }, + { + type: 'null' + } + ] + } + }, + required: ['success'], + title: 'SpdiResult', + type: 'object' +} as const + +export const $TanscriptAlignment = { + description: 'Alignment of a `Transcript` to an assembly.', + properties: { + assembly: { + title: 'Assembly', + type: 'string' + }, + cds_end: { + title: 'Cds End', + type: 'integer' + }, + cds_start: { + title: 'Cds Start', + type: 'integer' + }, + contig: { + title: 'Contig', + type: 'string' + }, + exons: { + items: { + $ref: '#/components/schemas/ExonAlignment' + }, + title: 'Exons', + type: 'array' + } + }, + required: ['assembly', 'contig', 'cds_start', 'cds_end', 'exons'], + title: 'TanscriptAlignment', + type: 'object' +} as const + +export const $Transcript = { + description: 'Transcript model.', + properties: { + alignments: { + items: { + $ref: '#/components/schemas/TanscriptAlignment' + }, + title: 'Alignments', + type: 'array' + }, + hgnc_id: { + title: 'Hgnc Id', + type: 'string' + }, + hgnc_symbol: { + title: 'Hgnc Symbol', + type: 'string' + }, + id: { + title: 'Id', + type: 'string' + } + }, + required: ['id', 'hgnc_id', 'hgnc_symbol', 'alignments'], + title: 'Transcript', + type: 'object' +} as const + +export const $TranscriptResult = { + description: 'The result of the query for searching for transcripts.', + properties: { + transcripts: { + items: { + $ref: '#/components/schemas/Transcript' + }, + title: 'Transcripts', + type: 'array' + } + }, + required: ['transcripts'], + title: 'TranscriptResult', + type: 'object' +} as const + +export const $ValidationError = { + properties: { + loc: { + items: { + anyOf: [ + { + type: 'string' + }, + { + type: 'integer' + } + ] + }, + title: 'Location', + type: 'array' + }, + msg: { + title: 'Message', + type: 'string' + }, + type: { + title: 'Error Type', + type: 'string' + } + }, + required: ['loc', 'msg', 'type'], + title: 'ValidationError', + type: 'object' +} as const diff --git a/ext/dotty-api/src/lib/services.gen.ts b/ext/dotty-api/src/lib/services.gen.ts new file mode 100644 index 0000000..bd780f6 --- /dev/null +++ b/ext/dotty-api/src/lib/services.gen.ts @@ -0,0 +1,47 @@ +// This file is auto-generated by @hey-api/openapi-ts +import { type Options, createClient, createConfig } from '@hey-api/client-fetch' + +import type { + FindTranscriptsApiV1FindTranscriptsGetData, + FindTranscriptsApiV1FindTranscriptsGetError, + FindTranscriptsApiV1FindTranscriptsGetResponse, + ToSpdiApiV1ToSpdiGetData, + ToSpdiApiV1ToSpdiGetError, + ToSpdiApiV1ToSpdiGetResponse +} from './types.gen' + +export const client = createClient(createConfig()) + +/** + * Find Transcripts + * Find transcripts for the given HGNC ID. + */ +export const findTranscriptsApiV1FindTranscriptsGet = ( + options: Options +) => { + return (options?.client ?? client).get< + FindTranscriptsApiV1FindTranscriptsGetResponse, + FindTranscriptsApiV1FindTranscriptsGetError, + ThrowOnError + >({ + ...options, + url: '/api/v1/find-transcripts' + }) +} + +/** + * To Spdi + * Resolve the given HGVS variant to SPDI representation. + */ +export const toSpdiApiV1ToSpdiGet = ( + options: Options +) => { + return (options?.client ?? client).get< + ToSpdiApiV1ToSpdiGetResponse, + ToSpdiApiV1ToSpdiGetError, + ThrowOnError + >({ + ...options, + url: '/api/v1/to-spdi' + }) +} diff --git a/ext/dotty-api/src/lib/types.gen.ts b/ext/dotty-api/src/lib/types.gen.ts new file mode 100644 index 0000000..beda0ee --- /dev/null +++ b/ext/dotty-api/src/lib/types.gen.ts @@ -0,0 +1,98 @@ +// This file is auto-generated by @hey-api/openapi-ts + +/** + * Enumeration for supported assemblies. + */ +export type Assembly = 'GRCh37' | 'GRCh38' + +/** + * Alignment of an exon to an assembly. + */ +export type ExonAlignment = { + alignment: string | null + exon_no: number + ref_end: number + ref_start: number + tx_end: number + tx_start: number +} + +export type HTTPValidationError = { + detail?: Array +} + +/** + * SPDI representation of a variant. + */ +export type Spdi = { + alternate_inserted: string + assembly: string + contig: string + pos: number + reference_deleted: string +} + +/** + * The result of the query. + */ +export type SpdiResult = { + message?: string | null + success: boolean + value?: Spdi | null +} + +/** + * Alignment of a `Transcript` to an assembly. + */ +export type TanscriptAlignment = { + assembly: string + cds_end: number + cds_start: number + contig: string + exons: Array +} + +/** + * Transcript model. + */ +export type Transcript = { + alignments: Array + hgnc_id: string + hgnc_symbol: string + id: string +} + +/** + * The result of the query for searching for transcripts. + */ +export type TranscriptResult = { + transcripts: Array +} + +export type ValidationError = { + loc: Array + msg: string + type: string +} + +export type FindTranscriptsApiV1FindTranscriptsGetData = { + query: { + assembly?: Assembly + hgnc_id: string + } +} + +export type FindTranscriptsApiV1FindTranscriptsGetResponse = TranscriptResult + +export type FindTranscriptsApiV1FindTranscriptsGetError = HTTPValidationError + +export type ToSpdiApiV1ToSpdiGetData = { + query: { + assembly?: Assembly + q: string + } +} + +export type ToSpdiApiV1ToSpdiGetResponse = SpdiResult + +export type ToSpdiApiV1ToSpdiGetError = HTTPValidationError diff --git a/ext/variantValidator-api/openapi.yaml b/ext/variantValidator-api/openapi.yaml new file mode 100644 index 0000000..4aa0c4e --- /dev/null +++ b/ext/variantValidator-api/openapi.yaml @@ -0,0 +1,413 @@ +{ + 'basePath': '/', + 'consumes': ['application/json'], + 'info': + { + 'description': "## By continuing to use this service you agree to our terms and conditions of Use\n- [Terms and Conditions](https://github.com/openvar/variantValidator/blob/master/README.md)\n\n## Powered by\n- [VariantValidator](https://github.com/openvar/rest_variantValidator) version 2.2.1.dev695+ga4c1a1f\n- [VariantFormatter](https://github.com/openvar/variantFormatter) version 2.2.1.dev73+g6cb7954\n - [vv_hgvs](https://github.com/openvar/vv_hgvs) version 2.2.0\n - [VVTA](https://www528.lamp.le.ac.uk/) release vvta_2024_01\n - [vvSeqRepo](https://www528.lamp.le.ac.uk/) release VV_SR_2024_04", + 'title': 'rest_VariantValidator', + 'version': '2.2.1.dev226+ga6ccfbe.d20240725' + }, + 'paths': + { + '/LOVD/lovd/{genome_build}/{variant_description}/{transcript_model}/{select_transcripts}/{checkonly}/{liftover}': + { + 'get': + { + 'description': 'This endpoint has a rate limit of 4 requests per second.', + 'operationId': 'get_lovd_class', + 'parameters': + [ + { + 'description': '***Select the response format***', + 'enum': ['application/json', 'text/xml'], + 'in': 'query', + 'name': 'content-type', + 'type': 'string' + } + ], + 'responses': { '200': { 'description': 'Success' } }, + 'tags': ['LOVD'] + }, + 'parameters': + [ + { + 'description': "***Accepted***\n> - True - (liftover to all genomic loci)\n> - primary - (lift to primary assembly only)\n> - False", + 'in': 'path', + 'name': 'liftover', + 'required': true, + 'type': 'string' + }, + { + 'description': "***Accepted:***\n> - True (return ONLY the genomic variant descriptions and not transcript and protein descriptions)\n> - False\n> - tx (Stop at transcript level, exclude protein)", + 'in': 'path', + 'name': 'checkonly', + 'required': true, + 'type': 'string' + }, + { + 'description': "***Accepted:***\n> - GRCh37\n> - GRCh38\n> - hg19\n> - hg38\n", + 'in': 'path', + 'name': 'genome_build', + 'required': true, + 'type': 'string' + }, + { + 'description': "***Return all possible transcripts***\n> None or all (all transcripts at the latest versions)\n> raw (all transcripts all version)\n> select (select transcripts)\n> mane (MANE Select transcripts)\n> mane_select (MANE Select and MANE Plus Clinical transcripts)\n\n***Single***\n> NM_000093.4\n\n***Multiple***\n> NM_000093.4|NM_001278074.1|NM_000093.3", + 'in': 'path', + 'name': 'select_transcripts', + 'required': true, + 'type': 'string' + }, + { + 'description': "***Accepted:***\n> - refseq (return data for RefSeq transcript models)\n> - ensembl (return data for ensembl transcript models)\n> - all", + 'in': 'path', + 'name': 'transcript_model', + 'required': true, + 'type': 'string' + }, + { + 'description': "***Genomic HGVS***\n> - NC_000017.10:g.48275363C>A\n\n***Pseudo-VCF***\n> - 17-50198002-C-A\n> - 17:50198002:C:A\n\n> *Notes*\n> - *pVCF, multiple comma separated ALTs are supported*\n > - *Multiple variants can be submitted, separated by the pipe '|' character*\n> - *Recommended maximum is 10 variants per submission*", + 'in': 'path', + 'name': 'variant_description', + 'required': true, + 'type': 'string' + } + ] + }, + '/VariantFormatter/variantformatter/{genome_build}/{variant_description}/{transcript_model}/{select_transcripts}/{checkonly}': + { + 'get': + { + 'description': 'This endpoint has a rate limit of 4 requests per second.', + 'operationId': 'get_variant_formatter_class', + 'parameters': + [ + { + 'description': '***Select the response format***', + 'enum': ['application/json', 'text/xml'], + 'in': 'query', + 'name': 'content-type', + 'type': 'string' + } + ], + 'responses': { '200': { 'description': 'Success' } }, + 'tags': ['VariantFormatter'] + }, + 'parameters': + [ + { + 'description': "***Accepted:***\n> - True (return ONLY the genomic variant descriptions and not transcript and protein descriptions)\n> - False", + 'in': 'path', + 'name': 'checkonly', + 'required': true, + 'type': 'string' + }, + { + 'description': "***Accepted:***\n> - GRCh37\n> - GRCh38", + 'in': 'path', + 'name': 'genome_build', + 'required': true, + 'type': 'string' + }, + { + 'description': "***Return all possible transcripts***\n> None or all (all transcripts at the latest versions)\n> raw (all transcripts all version)\n> select (select transcripts)\n> mane (MANE select transcripts)\n> mane_select (MANE select and MANE Plus Clinical transcripts)\n\n***Single***\n> NM_000093.4\n\n***Multiple***\n> NM_000093.4|NM_001278074.1|NM_000093.3", + 'in': 'path', + 'name': 'select_transcripts', + 'required': true, + 'type': 'string' + }, + { + 'description': "***Accepted:***\n> - refseq (return data for RefSeq transcript models)\n> - ensembl (return data for ensembl transcript models)\n> - all", + 'in': 'path', + 'name': 'transcript_model', + 'required': true, + 'type': 'string' + }, + { + 'description': "***Genomic HGVS***\n> - NC_000017.10:g.48275363C>A\n\n***Pseudo-VCF***\n> - 17-50198002-C-A\n> - 17:50198002:C:A\n\n> *Notes*\n> - *pVCF, multiple comma separated ALTs are supported*\n > - *Multiple variants can be submitted, separated by the pipe '|' character*\n> - *Recommended maximum is 10 variants per submission*", + 'in': 'path', + 'name': 'variant_description', + 'required': true, + 'type': 'string' + } + ] + }, + '/VariantValidator/tools/gene2transcripts/{gene_query}': + { + 'get': + { + 'description': 'This endpoint has a rate limit of 1 request per second.', + 'operationId': 'get_gene2transcripts_class', + 'parameters': + [ + { + 'description': '***Select the response format***', + 'enum': ['application/json', 'text/xml'], + 'in': 'query', + 'name': 'content-type', + 'type': 'string' + } + ], + 'responses': { '200': { 'description': 'Success' } }, + 'tags': ['VariantValidator'] + }, + 'parameters': + [ + { + 'description': "***HGNC gene symbol, HGNC ID, or transcript ID***\n\nCurrent supported transcript IDs\n- RefSeq\n\n***Single***\n> COL1A1\n> HGNC:2197\n> NM_000088.4\n", + 'in': 'path', + 'name': 'gene_query', + 'required': true, + 'type': 'string' + } + ] + }, + '/VariantValidator/tools/gene2transcripts_v2/{gene_query}/{limit_transcripts}/{transcript_set}/{genome_build}': + { + 'get': + { + 'description': 'This endpoint has a rate limit of 1 request per second.', + 'operationId': 'get_gene2transcripts_v2_class', + 'parameters': + [ + { + 'description': '***Select the response format***', + 'enum': ['application/json', 'text/xml'], + 'in': 'query', + 'name': 'content-type', + 'type': 'string' + } + ], + 'responses': { '200': { 'description': 'Success' } }, + 'tags': ['VariantValidator'] + }, + 'parameters': + [ + { + 'description': "***GRCh37 or GRCh38***\n\nall = all builds, GRCh37 = GRCh37 only, GRCh38 = GRCh38 only", + 'in': 'path', + 'name': 'genome_build', + 'required': true, + 'type': 'string' + }, + { + 'description': "***RefSeq or Ensembl***\n\nall = all transcripts, refseq = RefSeq only, ensembl = Ensembl only", + 'in': 'path', + 'name': 'transcript_set', + 'required': true, + 'type': 'string' + }, + { + 'description': "***Return all possible transcripts***\n> False\n\n***Single***\n> NM_000088.4\n\n***Multiple***\n> NM_000088.4|NM_000088.3\n\n***Limit to select transcripts***\n> mane_select = MANE Select transcript only\n> mane = Mane Select and MANE Plus Clinical\n> select = All transcripts that have been classified as canonical", + 'in': 'path', + 'name': 'limit_transcripts', + 'required': true, + 'type': 'string' + }, + { + 'description': "***HGNC gene symbol, HGNC ID, or transcript ID***\n\nCurrent supported transcript IDs\n- RefSeq or Ensembl\n\n***Single***\n> COL1A1\n> HGNC:2197\n> NM_000088.4\n\n***Multiple***\n> COL1A1|COL1A2|COL5A1|HGNC:2197\n", + 'in': 'path', + 'name': 'gene_query', + 'required': true, + 'type': 'string' + } + ] + }, + '/VariantValidator/tools/hgvs2reference/{hgvs_description}': + { + 'get': + { + 'operationId': 'get_hgvs2reference_class', + 'parameters': + [ + { + 'description': '***Select the response format***', + 'enum': ['application/json', 'text/xml'], + 'in': 'query', + 'name': 'content-type', + 'type': 'string' + } + ], + 'responses': { '200': { 'description': 'Success' } }, + 'tags': ['VariantValidator'] + }, + 'parameters': + [ + { + 'description': "***hgvs_description***\n\nSequence variation description in the HGVS format\n\n *Intronic descriptions in the context of transcript reference sequences are currently unsupported*", + 'in': 'path', + 'name': 'hgvs_description', + 'required': true, + 'type': 'string' + } + ] + }, + '/VariantValidator/variantvalidator/{genome_build}/{variant_description}/{select_transcripts}': + { + 'get': + { + 'description': 'This endpoint has a rate limit of 2 requests per second.', + 'operationId': 'get_variant_validator_class', + 'parameters': + [ + { + 'description': '***Select the response format***', + 'enum': ['application/json', 'text/xml'], + 'in': 'query', + 'name': 'content-type', + 'type': 'string' + } + ], + 'responses': { '200': { 'description': 'Success' } }, + 'tags': ['VariantValidator'] + }, + 'parameters': + [ + { + 'description': "***Accepted:***\n> - GRCh37\n> - GRCh38\n> - hg19\n> - hg38", + 'in': 'path', + 'name': 'genome_build', + 'required': true, + 'type': 'string' + }, + { + 'description': "***HGVS***\n> - NM_000088.3:c.589G>T\n> - NC_000017.10:g.48275363C>A\n> - NG_007400.1:g.8638G>T\n> - LRG_1:g.8638G>T\n> - LRG_1t1:c.589G>T\n\n***Pseudo-VCF***\n> - 17-50198002-C-A\n> - 17:50198002:C:A\n> - GRCh38-17-50198002-C-A\n> - GRCh38:17:50198002:C:A\n\n***Hybrid***\n> - chr17:50198002C>A\n > - chr17:50198002C>A(GRCh38)\n> - chr17(GRCh38):50198002C>A\n> - chr17:g.50198002C>A\n> - chr17:g.50198002C>A(GRCh38)\n> - chr17(GRCh38):g.50198002C>A", + 'in': 'path', + 'name': 'variant_description', + 'required': true, + 'type': 'string' + }, + { + 'description': "***Return all possible transcripts***\n\n***Return only 'select' transcripts***\n> select\n> mane_select\n> mane (MANE and MANE Plus Clinical)\n> refseq_select\n\n***Single***\n> NM_000093.4\n\n***Multiple***\n> NM_000093.4|NM_001278074.1|NM_000093.3", + 'in': 'path', + 'name': 'select_transcripts', + 'required': true, + 'type': 'string' + } + ] + }, + '/VariantValidator/variantvalidator_ensembl/{genome_build}/{variant_description}/{select_transcripts}': + { + 'get': + { + 'description': 'This endpoint has a rate limit of 2 requests per second.', + 'operationId': 'get_variant_validator_ensembl_class', + 'parameters': + [ + { + 'description': '***Select the response format***', + 'enum': ['application/json', 'text/xml'], + 'in': 'query', + 'name': 'content-type', + 'type': 'string' + } + ], + 'responses': { '200': { 'description': 'Success' } }, + 'tags': ['VariantValidator'] + }, + 'parameters': + [ + { + 'description': "***Accepted:***\n> - GRCh37\n> - GRCh38\n> - hg19\n> - hg38", + 'in': 'path', + 'name': 'genome_build', + 'required': true, + 'type': 'string' + }, + { + 'description': "***HGVS***\n> - ENST00000225964.10:c.589G>T\n> - NC_000017.10:g.48275363C>A\n\n***Pseudo-VCF***\n> - 17-50198002-C-A\n> - 17:50198002:C:A\n> - GRCh38-17-50198002-C-A\n> - GRCh38:17:50198002:C:A\n\n***Hybrid***\n> - chr17:50198002C>A\n > - chr17:50198002C>A(GRCh38)\n> - chr17(GRCh38):50198002C>A\n> - chr17:g.50198002C>A\n> - chr17:g.50198002C>A(GRCh38)\n> - chr17(GRCh38):g.50198002C>A", + 'in': 'path', + 'name': 'variant_description', + 'required': true, + 'type': 'string' + }, + { + 'description': "***Return all possible transcripts***\n\n***Return only 'select' transcripts***\n> select\n> mane_select\n> mane (MANE and MANE Plus Clinical)\n> refseq_select\n\n***Single***\n> ENST00000225964.10\n\n***Multiple***\n> ENST00000225964.9|ENST00000225964.10", + 'in': 'path', + 'name': 'select_transcripts', + 'required': true, + 'type': 'string' + } + ] + }, + '/hello/': + { + 'get': + { + 'operationId': 'get_hello_class', + 'parameters': + [ + { + 'description': '***Select the response format***', + 'enum': ['application/json', 'text/xml'], + 'in': 'query', + 'name': 'content-type', + 'type': 'string' + } + ], + 'responses': { '200': { 'description': 'Success' } }, + 'tags': ['hello'] + } + }, + '/hello/limit': + { + 'get': + { + 'operationId': 'get_limited_rate_helllo', + 'parameters': + [ + { + 'description': '***Select the response format***', + 'enum': ['application/json', 'text/xml'], + 'in': 'query', + 'name': 'content-type', + 'type': 'string' + } + ], + 'responses': { '200': { 'description': 'Success' } }, + 'tags': ['hello'] + } + }, + '/hello/trigger_error/{error_code}': + { + 'get': + { + 'operationId': 'get_exception_class', + 'parameters': + [ + { + 'description': '***Select the response format***', + 'enum': ['application/json', 'text/xml'], + 'in': 'query', + 'name': 'content-type', + 'type': 'string' + } + ], + 'responses': { '200': { 'description': 'Success' } }, + 'tags': ['hello'] + }, + 'parameters': + [{ 'in': 'path', 'name': 'error_code', 'required': true, 'type': 'integer' }] + } + }, + 'produces': ['application/json', 'text/xml'], + 'responses': + { + 'Forbidden': {}, + 'InternalServerError': {}, + 'MaskError': { 'description': 'When any error occurs on mask' }, + 'ParseError': { 'description': "When a mask can't be parsed" }, + 'TooManyRequests': {} + }, + 'swagger': '2.0', + 'tags': + [ + { 'description': 'VariantValidator API Endpoints', 'name': 'VariantValidator' }, + { 'description': 'Variantformatter API Endpoints', 'name': 'VariantFormatter' }, + { 'description': 'LOVD API Endpoints', 'name': 'LOVD' }, + { + 'description': 'Endpoint to check services are "alive" and display the current software and database versions', + 'name': 'hello' + } + ] +} diff --git a/ext/variantValidator-api/src/lib/@tanstack/vue-query.gen.ts b/ext/variantValidator-api/src/lib/@tanstack/vue-query.gen.ts new file mode 100644 index 0000000..d20b7fa --- /dev/null +++ b/ext/variantValidator-api/src/lib/@tanstack/vue-query.gen.ts @@ -0,0 +1,247 @@ +// This file is auto-generated by @hey-api/openapi-ts +import type { Options } from '@hey-api/client-fetch' +import { queryOptions } from '@tanstack/vue-query' + +import { + client, + getExceptionClass, + getGene2TranscriptsClass, + getGene2TranscriptsV2Class, + getHelloClass, + getHgvs2ReferenceClass, + getLimitedRateHelllo, + getLovdClass, + getVariantFormatterClass, + getVariantValidatorClass, + getVariantValidatorEnsemblClass +} from '../services.gen' +import type { + GetExceptionClassData, + GetGene2TranscriptsClassData, + GetGene2TranscriptsV2ClassData, + GetHelloClassData, + GetHgvs2ReferenceClassData, + GetLimitedRateHellloData, + GetLovdClassData, + GetVariantFormatterClassData, + GetVariantValidatorClassData, + GetVariantValidatorEnsemblClassData +} from '../types.gen' + +type QueryKey = [ + Pick & { + _id: string + _infinite?: boolean + } +] + +const createQueryKey = ( + id: string, + options?: TOptions, + infinite?: boolean +): QueryKey[0] => { + const params: QueryKey[0] = { + _id: id, + baseUrl: client.getConfig().baseUrl + } as QueryKey[0] + if (infinite) { + params._infinite = infinite + } + if (options?.body) { + params.body = options.body + } + if (options?.headers) { + params.headers = options.headers + } + if (options?.path) { + params.path = options.path + } + if (options?.query) { + params.query = options.query + } + return params +} + +export const getLovdClassQueryKey = (options: Options) => [ + createQueryKey('getLovdClass', options) +] + +export const getLovdClassOptions = (options: Options) => { + return queryOptions({ + queryFn: async ({ queryKey }) => { + const { data } = await getLovdClass({ + ...options, + ...queryKey[0], + throwOnError: true + }) + return data + }, + queryKey: getLovdClassQueryKey(options) + }) +} + +export const getVariantFormatterClassQueryKey = ( + options: Options +) => [createQueryKey('getVariantFormatterClass', options)] + +export const getVariantFormatterClassOptions = (options: Options) => { + return queryOptions({ + queryFn: async ({ queryKey }) => { + const { data } = await getVariantFormatterClass({ + ...options, + ...queryKey[0], + throwOnError: true + }) + return data + }, + queryKey: getVariantFormatterClassQueryKey(options) + }) +} + +export const getGene2TranscriptsClassQueryKey = ( + options: Options +) => [createQueryKey('getGene2TranscriptsClass', options)] + +export const getGene2TranscriptsClassOptions = (options: Options) => { + return queryOptions({ + queryFn: async ({ queryKey }) => { + const { data } = await getGene2TranscriptsClass({ + ...options, + ...queryKey[0], + throwOnError: true + }) + return data + }, + queryKey: getGene2TranscriptsClassQueryKey(options) + }) +} + +export const getGene2TranscriptsV2ClassQueryKey = ( + options: Options +) => [createQueryKey('getGene2TranscriptsV2Class', options)] + +export const getGene2TranscriptsV2ClassOptions = ( + options: Options +) => { + return queryOptions({ + queryFn: async ({ queryKey }) => { + const { data } = await getGene2TranscriptsV2Class({ + ...options, + ...queryKey[0], + throwOnError: true + }) + return data + }, + queryKey: getGene2TranscriptsV2ClassQueryKey(options) + }) +} + +export const getHgvs2ReferenceClassQueryKey = (options: Options) => [ + createQueryKey('getHgvs2ReferenceClass', options) +] + +export const getHgvs2ReferenceClassOptions = (options: Options) => { + return queryOptions({ + queryFn: async ({ queryKey }) => { + const { data } = await getHgvs2ReferenceClass({ + ...options, + ...queryKey[0], + throwOnError: true + }) + return data + }, + queryKey: getHgvs2ReferenceClassQueryKey(options) + }) +} + +export const getVariantValidatorClassQueryKey = ( + options: Options +) => [createQueryKey('getVariantValidatorClass', options)] + +export const getVariantValidatorClassOptions = (options: Options) => { + return queryOptions({ + queryFn: async ({ queryKey }) => { + const { data } = await getVariantValidatorClass({ + ...options, + ...queryKey[0], + throwOnError: true + }) + return data + }, + queryKey: getVariantValidatorClassQueryKey(options) + }) +} + +export const getVariantValidatorEnsemblClassQueryKey = ( + options: Options +) => [createQueryKey('getVariantValidatorEnsemblClass', options)] + +export const getVariantValidatorEnsemblClassOptions = ( + options: Options +) => { + return queryOptions({ + queryFn: async ({ queryKey }) => { + const { data } = await getVariantValidatorEnsemblClass({ + ...options, + ...queryKey[0], + throwOnError: true + }) + return data + }, + queryKey: getVariantValidatorEnsemblClassQueryKey(options) + }) +} + +export const getHelloClassQueryKey = (options?: Options) => [ + createQueryKey('getHelloClass', options) +] + +export const getHelloClassOptions = (options?: Options) => { + return queryOptions({ + queryFn: async ({ queryKey }) => { + const { data } = await getHelloClass({ + ...options, + ...queryKey[0], + throwOnError: true + }) + return data + }, + queryKey: getHelloClassQueryKey(options) + }) +} + +export const getLimitedRateHellloQueryKey = (options?: Options) => [ + createQueryKey('getLimitedRateHelllo', options) +] + +export const getLimitedRateHellloOptions = (options?: Options) => { + return queryOptions({ + queryFn: async ({ queryKey }) => { + const { data } = await getLimitedRateHelllo({ + ...options, + ...queryKey[0], + throwOnError: true + }) + return data + }, + queryKey: getLimitedRateHellloQueryKey(options) + }) +} + +export const getExceptionClassQueryKey = (options: Options) => [ + createQueryKey('getExceptionClass', options) +] + +export const getExceptionClassOptions = (options: Options) => { + return queryOptions({ + queryFn: async ({ queryKey }) => { + const { data } = await getExceptionClass({ + ...options, + ...queryKey[0], + throwOnError: true + }) + return data + }, + queryKey: getExceptionClassQueryKey(options) + }) +} diff --git a/ext/variantValidator-api/src/lib/index.ts b/ext/variantValidator-api/src/lib/index.ts new file mode 100644 index 0000000..4b318ff --- /dev/null +++ b/ext/variantValidator-api/src/lib/index.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by @hey-api/openapi-ts +export * from './services.gen' +export * from './types.gen' diff --git a/ext/variantValidator-api/src/lib/services.gen.ts b/ext/variantValidator-api/src/lib/services.gen.ts new file mode 100644 index 0000000..fba0999 --- /dev/null +++ b/ext/variantValidator-api/src/lib/services.gen.ts @@ -0,0 +1,177 @@ +// This file is auto-generated by @hey-api/openapi-ts +import { type Options, createClient, createConfig } from '@hey-api/client-fetch' + +import type { + GetExceptionClassData, + GetExceptionClassError, + GetExceptionClassResponse, + GetGene2TranscriptsClassData, + GetGene2TranscriptsClassError, + GetGene2TranscriptsClassResponse, + GetGene2TranscriptsV2ClassData, + GetGene2TranscriptsV2ClassError, + GetGene2TranscriptsV2ClassResponse, + GetHelloClassData, + GetHelloClassError, + GetHelloClassResponse, + GetHgvs2ReferenceClassData, + GetHgvs2ReferenceClassError, + GetHgvs2ReferenceClassResponse, + GetLimitedRateHellloData, + GetLimitedRateHellloError, + GetLimitedRateHellloResponse, + GetLovdClassData, + GetLovdClassError, + GetLovdClassResponse, + GetVariantFormatterClassData, + GetVariantFormatterClassError, + GetVariantFormatterClassResponse, + GetVariantValidatorClassData, + GetVariantValidatorClassError, + GetVariantValidatorClassResponse, + GetVariantValidatorEnsemblClassData, + GetVariantValidatorEnsemblClassError, + GetVariantValidatorEnsemblClassResponse +} from './types.gen' + +export const client = createClient(createConfig()) + +/** + * This endpoint has a rate limit of 4 requests per second. + */ +export const getLovdClass = ( + options: Options +) => { + return (options?.client ?? client).get({ + ...options, + url: '/LOVD/lovd/{genome_build}/{variant_description}/{transcript_model}/{select_transcripts}/{checkonly}/{liftover}' + }) +} + +/** + * This endpoint has a rate limit of 4 requests per second. + */ +export const getVariantFormatterClass = ( + options: Options +) => { + return (options?.client ?? client).get< + GetVariantFormatterClassResponse, + GetVariantFormatterClassError, + ThrowOnError + >({ + ...options, + url: '/VariantFormatter/variantformatter/{genome_build}/{variant_description}/{transcript_model}/{select_transcripts}/{checkonly}' + }) +} + +/** + * This endpoint has a rate limit of 1 request per second. + */ +export const getGene2TranscriptsClass = ( + options: Options +) => { + return (options?.client ?? client).get< + GetGene2TranscriptsClassResponse, + GetGene2TranscriptsClassError, + ThrowOnError + >({ + ...options, + url: '/VariantValidator/tools/gene2transcripts/{gene_query}' + }) +} + +/** + * This endpoint has a rate limit of 1 request per second. + */ +export const getGene2TranscriptsV2Class = ( + options: Options +) => { + return (options?.client ?? client).get< + GetGene2TranscriptsV2ClassResponse, + GetGene2TranscriptsV2ClassError, + ThrowOnError + >({ + ...options, + url: '/VariantValidator/tools/gene2transcripts_v2/{gene_query}/{limit_transcripts}/{transcript_set}/{genome_build}' + }) +} + +export const getHgvs2ReferenceClass = ( + options: Options +) => { + return (options?.client ?? client).get< + GetHgvs2ReferenceClassResponse, + GetHgvs2ReferenceClassError, + ThrowOnError + >({ + ...options, + url: '/VariantValidator/tools/hgvs2reference/{hgvs_description}' + }) +} + +/** + * This endpoint has a rate limit of 2 requests per second. + */ +export const getVariantValidatorClass = ( + options: Options +) => { + return (options?.client ?? client).get< + GetVariantValidatorClassResponse, + GetVariantValidatorClassError, + ThrowOnError + >({ + ...options, + url: '/VariantValidator/variantvalidator/{genome_build}/{variant_description}/{select_transcripts}' + }) +} + +/** + * This endpoint has a rate limit of 2 requests per second. + */ +export const getVariantValidatorEnsemblClass = ( + options: Options +) => { + return (options?.client ?? client).get< + GetVariantValidatorEnsemblClassResponse, + GetVariantValidatorEnsemblClassError, + ThrowOnError + >({ + ...options, + url: '/VariantValidator/variantvalidator_ensembl/{genome_build}/{variant_description}/{select_transcripts}' + }) +} + +export const getHelloClass = ( + options?: Options +) => { + return (options?.client ?? client).get({ + ...options, + url: '/hello/' + }) +} + +export const getLimitedRateHelllo = ( + options?: Options +) => { + return (options?.client ?? client).get< + GetLimitedRateHellloResponse, + GetLimitedRateHellloError, + ThrowOnError + >({ + ...options, + url: '/hello/limit' + }) +} + +export const getExceptionClass = ( + options: Options +) => { + return (options?.client ?? client).get< + GetExceptionClassResponse, + GetExceptionClassError, + ThrowOnError + >({ + ...options, + url: '/hello/trigger_error/{error_code}' + }) +} diff --git a/ext/variantValidator-api/src/lib/types.gen.ts b/ext/variantValidator-api/src/lib/types.gen.ts new file mode 100644 index 0000000..e8f0a17 --- /dev/null +++ b/ext/variantValidator-api/src/lib/types.gen.ts @@ -0,0 +1,411 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type GetLovdClassData = { + path: { + /** + * ***Accepted:*** + * > - True (return ONLY the genomic variant descriptions and not transcript and protein descriptions) + * > - False + * > - tx (Stop at transcript level, exclude protein) + */ + checkonly: string + /** + * ***Accepted:*** + * > - GRCh37 + * > - GRCh38 + * > - hg19 + * > - hg38 + * + */ + genome_build: string + /** + * ***Accepted*** + * > - True - (liftover to all genomic loci) + * > - primary - (lift to primary assembly only) + * > - False + */ + liftover: string + /** + * ***Return all possible transcripts*** + * > None or all (all transcripts at the latest versions) + * > raw (all transcripts all version) + * > select (select transcripts) + * > mane (MANE Select transcripts) + * > mane_select (MANE Select and MANE Plus Clinical transcripts) + * + * ***Single*** + * > NM_000093.4 + * + * ***Multiple*** + * > NM_000093.4|NM_001278074.1|NM_000093.3 + */ + select_transcripts: string + /** + * ***Accepted:*** + * > - refseq (return data for RefSeq transcript models) + * > - ensembl (return data for ensembl transcript models) + * > - all + */ + transcript_model: string + /** + * ***Genomic HGVS*** + * > - NC_000017.10:g.48275363C>A + * + * ***Pseudo-VCF*** + * > - 17-50198002-C-A + * > - 17:50198002:C:A + * + * > *Notes* + * > - *pVCF, multiple comma separated ALTs are supported* + * > - *Multiple variants can be submitted, separated by the pipe '|' character* + * > - *Recommended maximum is 10 variants per submission* + */ + variant_description: string + } + query?: { + /** + * ***Select the response format*** + */ + 'content-type'?: 'application/json' | 'text/xml' + } +} + +export type GetLovdClassResponse = unknown + +export type GetLovdClassError = unknown + +export type GetVariantFormatterClassData = { + path: { + /** + * ***Accepted:*** + * > - True (return ONLY the genomic variant descriptions and not transcript and protein descriptions) + * > - False + */ + checkonly: string + /** + * ***Accepted:*** + * > - GRCh37 + * > - GRCh38 + */ + genome_build: string + /** + * ***Return all possible transcripts*** + * > None or all (all transcripts at the latest versions) + * > raw (all transcripts all version) + * > select (select transcripts) + * > mane (MANE select transcripts) + * > mane_select (MANE select and MANE Plus Clinical transcripts) + * + * ***Single*** + * > NM_000093.4 + * + * ***Multiple*** + * > NM_000093.4|NM_001278074.1|NM_000093.3 + */ + select_transcripts: string + /** + * ***Accepted:*** + * > - refseq (return data for RefSeq transcript models) + * > - ensembl (return data for ensembl transcript models) + * > - all + */ + transcript_model: string + /** + * ***Genomic HGVS*** + * > - NC_000017.10:g.48275363C>A + * + * ***Pseudo-VCF*** + * > - 17-50198002-C-A + * > - 17:50198002:C:A + * + * > *Notes* + * > - *pVCF, multiple comma separated ALTs are supported* + * > - *Multiple variants can be submitted, separated by the pipe '|' character* + * > - *Recommended maximum is 10 variants per submission* + */ + variant_description: string + } + query?: { + /** + * ***Select the response format*** + */ + 'content-type'?: 'application/json' | 'text/xml' + } +} + +export type GetVariantFormatterClassResponse = unknown + +export type GetVariantFormatterClassError = unknown + +export type GetGene2TranscriptsClassData = { + path: { + /** + * ***HGNC gene symbol, HGNC ID, or transcript ID*** + * + * Current supported transcript IDs + * - RefSeq + * + * ***Single*** + * > COL1A1 + * > HGNC:2197 + * > NM_000088.4 + * + */ + gene_query: string + } + query?: { + /** + * ***Select the response format*** + */ + 'content-type'?: 'application/json' | 'text/xml' + } +} + +export type GetGene2TranscriptsClassResponse = unknown + +export type GetGene2TranscriptsClassError = unknown + +export type GetGene2TranscriptsV2ClassData = { + path: { + /** + * ***HGNC gene symbol, HGNC ID, or transcript ID*** + * + * Current supported transcript IDs + * - RefSeq or Ensembl + * + * ***Single*** + * > COL1A1 + * > HGNC:2197 + * > NM_000088.4 + * + * ***Multiple*** + * > COL1A1|COL1A2|COL5A1|HGNC:2197 + * + */ + gene_query: string + /** + * ***GRCh37 or GRCh38*** + * + * all = all builds, GRCh37 = GRCh37 only, GRCh38 = GRCh38 only + */ + genome_build: string + /** + * ***Return all possible transcripts*** + * > False + * + * ***Single*** + * > NM_000088.4 + * + * ***Multiple*** + * > NM_000088.4|NM_000088.3 + * + * ***Limit to select transcripts*** + * > mane_select = MANE Select transcript only + * > mane = Mane Select and MANE Plus Clinical + * > select = All transcripts that have been classified as canonical + */ + limit_transcripts: string + /** + * ***RefSeq or Ensembl*** + * + * all = all transcripts, refseq = RefSeq only, ensembl = Ensembl only + */ + transcript_set: string + } + query?: { + /** + * ***Select the response format*** + */ + 'content-type'?: 'application/json' | 'text/xml' + } +} + +export type GetGene2TranscriptsV2ClassResponse = unknown + +export type GetGene2TranscriptsV2ClassError = unknown + +export type GetHgvs2ReferenceClassData = { + path: { + /** + * ***hgvs_description*** + * + * Sequence variation description in the HGVS format + * + * *Intronic descriptions in the context of transcript reference sequences are currently unsupported* + */ + hgvs_description: string + } + query?: { + /** + * ***Select the response format*** + */ + 'content-type'?: 'application/json' | 'text/xml' + } +} + +export type GetHgvs2ReferenceClassResponse = unknown + +export type GetHgvs2ReferenceClassError = unknown + +export type GetVariantValidatorClassData = { + path: { + /** + * ***Accepted:*** + * > - GRCh37 + * > - GRCh38 + * > - hg19 + * > - hg38 + */ + genome_build: string + /** + * ***Return all possible transcripts*** + * + * ***Return only 'select' transcripts*** + * > select + * > mane_select + * > mane (MANE and MANE Plus Clinical) + * > refseq_select + * + * ***Single*** + * > NM_000093.4 + * + * ***Multiple*** + * > NM_000093.4|NM_001278074.1|NM_000093.3 + */ + select_transcripts: string + /** + * ***HGVS*** + * > - NM_000088.3:c.589G>T + * > - NC_000017.10:g.48275363C>A + * > - NG_007400.1:g.8638G>T + * > - LRG_1:g.8638G>T + * > - LRG_1t1:c.589G>T + * + * ***Pseudo-VCF*** + * > - 17-50198002-C-A + * > - 17:50198002:C:A + * > - GRCh38-17-50198002-C-A + * > - GRCh38:17:50198002:C:A + * + * ***Hybrid*** + * > - chr17:50198002C>A + * > - chr17:50198002C>A(GRCh38) + * > - chr17(GRCh38):50198002C>A + * > - chr17:g.50198002C>A + * > - chr17:g.50198002C>A(GRCh38) + * > - chr17(GRCh38):g.50198002C>A + */ + variant_description: string + } + query?: { + /** + * ***Select the response format*** + */ + 'content-type'?: 'application/json' | 'text/xml' + } +} + +export type GetVariantValidatorClassResponse = unknown + +export type GetVariantValidatorClassError = unknown + +export type GetVariantValidatorEnsemblClassData = { + path: { + /** + * ***Accepted:*** + * > - GRCh37 + * > - GRCh38 + * > - hg19 + * > - hg38 + */ + genome_build: string + /** + * ***Return all possible transcripts*** + * + * ***Return only 'select' transcripts*** + * > select + * > mane_select + * > mane (MANE and MANE Plus Clinical) + * > refseq_select + * + * ***Single*** + * > ENST00000225964.10 + * + * ***Multiple*** + * > ENST00000225964.9|ENST00000225964.10 + */ + select_transcripts: string + /** + * ***HGVS*** + * > - ENST00000225964.10:c.589G>T + * > - NC_000017.10:g.48275363C>A + * + * ***Pseudo-VCF*** + * > - 17-50198002-C-A + * > - 17:50198002:C:A + * > - GRCh38-17-50198002-C-A + * > - GRCh38:17:50198002:C:A + * + * ***Hybrid*** + * > - chr17:50198002C>A + * > - chr17:50198002C>A(GRCh38) + * > - chr17(GRCh38):50198002C>A + * > - chr17:g.50198002C>A + * > - chr17:g.50198002C>A(GRCh38) + * > - chr17(GRCh38):g.50198002C>A + */ + variant_description: string + } + query?: { + /** + * ***Select the response format*** + */ + 'content-type'?: 'application/json' | 'text/xml' + } +} + +export type GetVariantValidatorEnsemblClassResponse = unknown + +export type GetVariantValidatorEnsemblClassError = unknown + +export type GetHelloClassData = { + query?: { + /** + * ***Select the response format*** + */ + 'content-type'?: 'application/json' | 'text/xml' + } +} + +export type GetHelloClassResponse = unknown + +export type GetHelloClassError = unknown + +export type GetLimitedRateHellloData = { + query?: { + /** + * ***Select the response format*** + */ + 'content-type'?: 'application/json' | 'text/xml' + } +} + +export type GetLimitedRateHellloResponse = unknown + +export type GetLimitedRateHellloError = unknown + +export type GetExceptionClassData = { + path: { + error_code: number + } + query?: { + /** + * ***Select the response format*** + */ + 'content-type'?: 'application/json' | 'text/xml' + } +} + +export type GetExceptionClassResponse = unknown + +export type GetExceptionClassError = unknown diff --git a/ext/viguno-api/openapi.yaml b/ext/viguno-api/openapi.yaml new file mode 100644 index 0000000..3ca0af3 --- /dev/null +++ b/ext/viguno-api/openapi.yaml @@ -0,0 +1,494 @@ +openapi: 3.0.3 +info: + title: viguno + description: Phenotype/disease for VarFish + contact: + name: Manuel Holtgrewe + email: manuel.holtgrewe@bih-charite.de + license: + name: Apache-2.0 + version: 0.3.2 +paths: + /hpo/genes: + get: + tags: + - hpo_genes + summary: Query for genes in the HPO database. + operationId: hpo_genes + parameters: + - name: gene_id + in: query + description: The gene ID to search for. + required: false + schema: + type: string + nullable: true + - name: gene_symbol + in: query + description: The gene symbol to search for. + required: false + schema: + type: string + nullable: true + - name: match_ + in: query + description: The match mode. + required: false + schema: + allOf: + - $ref: '#/components/schemas/Match' + nullable: true + - name: max_results + in: query + description: Maximal number of results to return. + required: false + schema: + type: integer + minimum: 0 + - name: hpo_terms + in: query + description: Whether to include HPO terms. + required: false + schema: + type: boolean + responses: + '200': + description: The query was successful. + content: + application/json: + schema: + $ref: '#/components/schemas/Result' + /hpo/omims: + get: + tags: + - hpo_omims + summary: Query for OMIM diseases in the HPO database. + operationId: hpo_omims + parameters: + - name: omim_id + in: query + description: The OMIM ID to search for. + required: false + schema: + type: string + nullable: true + - name: name + in: query + description: The disease name to search for. + required: false + schema: + type: string + nullable: true + - name: match_ + in: query + description: The match mode, default is `Match::Exact`. + required: false + schema: + allOf: + - $ref: '#/components/schemas/Match' + nullable: true + - name: ignore_case + in: query + description: Whether case is insentivie, default is `false`. + required: false + schema: + type: boolean + nullable: true + - name: max_results + in: query + description: Maximal number of results to return. + required: false + schema: + type: integer + minimum: 0 + - name: hpo_terms + in: query + description: Whether to include HPO terms. + required: false + schema: + type: boolean + responses: + '200': + description: The query was successful. + content: + application/json: + schema: + $ref: '#/components/schemas/Result' + /hpo/sim/term-gene: + get: + tags: + - hpo_sim::term_gene + summary: Query for similarity between a set of terms to each entry in a + description: list of genes. + operationId: hpo_sim_term_gene + parameters: + - name: terms + in: query + description: Set of terms to use as query. + required: true + schema: + type: array + items: + type: string + - name: gene_ids + in: query + description: The set of ids for genes to use as "database". + required: false + schema: + type: array + items: + type: string + nullable: true + - name: gene_symbols + in: query + description: The set of symbols for genes to use as "database". + required: false + schema: + type: array + items: + type: string + nullable: true + responses: + '200': + description: The query was successful. + content: + application/json: + schema: + $ref: '#/components/schemas/Result' + /hpo/sim/term-term: + get: + tags: + - hpo_sim::term_term + summary: Query for pairwise term similarity. + description: |- + In the case of Resnik, this corresponds to `IC(MICA(t_1, t_2))`. + + # Errors + + In the case that there is an error running the server. + operationId: hpo_sim_term_term + parameters: + - name: lhs + in: query + description: The one set of HPO terms to compute similarity for. + required: true + schema: + type: array + items: + type: string + - name: rhs + in: query + description: The second set of HPO terms to compute similarity for. + required: true + schema: + type: array + items: + type: string + - name: ic_base + in: query + description: What should information content be based on. + required: false + schema: + $ref: '#/components/schemas/IcBasedOn' + - name: similarity + in: query + description: The similarity method to use. + required: false + schema: + $ref: '#/components/schemas/SimilarityMethod' + - name: combiner + in: query + description: The score combiner. + required: false + schema: + $ref: '#/components/schemas/ScoreCombiner' + responses: + '200': + description: The query was successful. + content: + application/json: + schema: + $ref: '#/components/schemas/Result' + /hpo/terms: + get: + tags: + - hpo_terms + summary: Query for terms in the HPO database. + description: |- + # Errors + + In the case that there is an error running the server. + operationId: hpo_terms + parameters: + - name: term_id + in: query + description: The term ID to search for. + required: false + schema: + type: string + nullable: true + - name: name + in: query + description: The term name to search for. + required: false + schema: + type: string + nullable: true + - name: max_results + in: query + description: Maximal number of results to return. + required: false + schema: + type: integer + minimum: 0 + - name: genes + in: query + description: Whether to include genes. + required: false + schema: + type: boolean + responses: + '200': + description: The query was successful. + content: + application/json: + schema: + $ref: '#/components/schemas/Result' +components: + schemas: + HpoTerm: + type: object + description: Struct for loading an HPO term from JSON. + required: + - term_id + properties: + term_id: + type: string + description: The term ID. + term_name: + type: string + description: The term name (optional). + nullable: true + IcBasedOn: + type: string + description: |- + Enum for representing the information content kind. + + We replicate what is in the `hpo` create so we can put them on the command line and use + them in HTTP queries more easily. + enum: + - gene + - omim + Match: + type: string + description: Specify how to perform query matches in the API calls. + enum: + - exact + - prefix + - suffix + - contains + Query: + type: object + title: HpoSimTermGeneQuery + description: |- + Parameters for `handle`. + + This allows to compute differences between + + - `terms` -- set of terms to use as query + - `gene_ids` -- set of ids for genes to use as "database", can be NCBI\ + gene ID or HGNC gene ID. + - `gene_symbols` -- set of symbols for genes to use as + "database" + required: + - terms + properties: + terms: + type: array + items: + type: string + description: Set of terms to use as query. + gene_ids: + type: array + items: + type: string + description: The set of ids for genes to use as "database". + nullable: true + gene_symbols: + type: array + items: + type: string + description: The set of symbols for genes to use as "database". + nullable: true + ResponseQuery: + type: object + title: HpoSimTermTermQuery + description: |- + Request as sent together with the response. + + The difference is that the `lhs` and `rhs` fields are replaced by vecs. + required: + - lhs + - rhs + properties: + lhs: + type: array + items: + type: string + description: The one set of HPO terms to compute similarity for. + rhs: + type: array + items: + type: string + description: The second set of HPO terms to compute similarity for. + ic_base: + $ref: '#/components/schemas/IcBasedOn' + similarity: + $ref: '#/components/schemas/SimilarityMethod' + combiner: + $ref: '#/components/schemas/ScoreCombiner' + Result: + type: object + title: HpoSimTermTermResult + description: Result container. + required: + - version + - query + - result + properties: + version: + $ref: '#/components/schemas/Version' + query: + $ref: '#/components/schemas/ResponseQuery' + result: + type: array + items: + $ref: '#/components/schemas/ResultEntry' + description: The resulting records for the scored genes. + ResultEntry: + type: object + title: HpoSimTermTermResultEntry + description: Result entry for `handle`. + required: + - lhs + - rhs + - score + properties: + lhs: + type: string + description: The lhs entry. + rhs: + type: string + description: The rhs entry. + score: + type: number + format: float + description: The similarity score. + ResultGene: + type: object + description: Representation of a gene. + required: + - ncbi_gene_id + - gene_symbol + properties: + ncbi_gene_id: + type: integer + format: int32 + description: The HPO ID. + minimum: 0 + gene_symbol: + type: string + description: The description. + hgnc_id: + type: string + description: The HGNC ID. + nullable: true + ResultHpoTerm: + type: object + description: Representation of an HPO term. + required: + - term_id + - name + properties: + term_id: + type: string + description: The HPO ID. + name: + type: string + description: The term name. + Result_: + type: object + title: HpoTermsResult + description: Container for the result. + required: + - version + - query + - result + properties: + version: + $ref: '#/components/schemas/Version' + query: + $ref: '#/components/schemas/Query' + result: + type: array + items: + $ref: '#/components/schemas/ResultEntry' + description: The resulting records for the scored genes. + ScoreCombiner: + type: string + description: |- + Representation of the standard combiners from HPO. + + We replicate what is in the `hpo` create so we can put them on the command line and use + them in HTTP queries more easily. + enum: + - fun-sim-avg + - fun-sim-max + - bma + SimilarityMethod: + type: string + description: |- + Enum for representing similarity method to use. + + We replicate what is in the `hpo` create so we can put them on the command line and use + them in HTTP queries more easily. + enum: + - distance-gene + - graph-ic + - information-coefficient + - jc + - lin + - mutation + - relevance + - resnik + TermDetails: + type: object + title: HpoSimTermGeneTermDetails + description: Detailed term scores. + required: + - term_gene + - score + properties: + term_query: + allOf: + - $ref: '#/components/schemas/HpoTerm' + nullable: true + term_gene: + $ref: '#/components/schemas/HpoTerm' + score: + type: number + format: float + description: The similarity score. + Version: + type: object + description: Version information that is returned by the HTTP server. + required: + - hpo + - viguno + properties: + hpo: + type: string + description: Version of the HPO. + viguno: + type: string + description: Version of the `viguno` package. diff --git a/ext/viguno-api/src/lib/@tanstack/vue-query.gen.ts b/ext/viguno-api/src/lib/@tanstack/vue-query.gen.ts new file mode 100644 index 0000000..796f718 --- /dev/null +++ b/ext/viguno-api/src/lib/@tanstack/vue-query.gen.ts @@ -0,0 +1,143 @@ +// This file is auto-generated by @hey-api/openapi-ts +import type { Options } from '@hey-api/client-fetch' +import { queryOptions } from '@tanstack/vue-query' + +import { + client, + hpoGenes, + hpoOmims, + hpoSimTermGene, + hpoSimTermTerm, + hpoTerms +} from '../services.gen' +import type { + HpoGenesData, + HpoOmimsData, + HpoSimTermGeneData, + HpoSimTermTermData, + HpoTermsData +} from '../types.gen' + +type QueryKey = [ + Pick & { + _id: string + _infinite?: boolean + } +] + +const createQueryKey = ( + id: string, + options?: TOptions, + infinite?: boolean +): QueryKey[0] => { + const params: QueryKey[0] = { + _id: id, + baseUrl: client.getConfig().baseUrl + } as QueryKey[0] + if (infinite) { + params._infinite = infinite + } + if (options?.body) { + params.body = options.body + } + if (options?.headers) { + params.headers = options.headers + } + if (options?.path) { + params.path = options.path + } + if (options?.query) { + params.query = options.query + } + return params +} + +export const hpoGenesQueryKey = (options?: Options) => [ + createQueryKey('hpoGenes', options) +] + +export const hpoGenesOptions = (options?: Options) => { + return queryOptions({ + queryFn: async ({ queryKey }) => { + const { data } = await hpoGenes({ + ...options, + ...queryKey[0], + throwOnError: true + }) + return data + }, + queryKey: hpoGenesQueryKey(options) + }) +} + +export const hpoOmimsQueryKey = (options?: Options) => [ + createQueryKey('hpoOmims', options) +] + +export const hpoOmimsOptions = (options?: Options) => { + return queryOptions({ + queryFn: async ({ queryKey }) => { + const { data } = await hpoOmims({ + ...options, + ...queryKey[0], + throwOnError: true + }) + return data + }, + queryKey: hpoOmimsQueryKey(options) + }) +} + +export const hpoSimTermGeneQueryKey = (options: Options) => [ + createQueryKey('hpoSimTermGene', options) +] + +export const hpoSimTermGeneOptions = (options: Options) => { + return queryOptions({ + queryFn: async ({ queryKey }) => { + const { data } = await hpoSimTermGene({ + ...options, + ...queryKey[0], + throwOnError: true + }) + return data + }, + queryKey: hpoSimTermGeneQueryKey(options) + }) +} + +export const hpoSimTermTermQueryKey = (options: Options) => [ + createQueryKey('hpoSimTermTerm', options) +] + +export const hpoSimTermTermOptions = (options: Options) => { + return queryOptions({ + queryFn: async ({ queryKey }) => { + const { data } = await hpoSimTermTerm({ + ...options, + ...queryKey[0], + throwOnError: true + }) + return data + }, + queryKey: hpoSimTermTermQueryKey(options) + }) +} + +export const hpoTermsQueryKey = (options?: Options) => [ + createQueryKey('hpoTerms', options) +] + +export const hpoTermsOptions = (options?: Options) => { + return queryOptions({ + queryFn: async ({ queryKey }) => { + const { data } = await hpoTerms({ + ...options, + ...queryKey[0], + throwOnError: true + }) + return data + }, + queryKey: hpoTermsQueryKey(options) + }) +} diff --git a/ext/viguno-api/src/lib/index.ts b/ext/viguno-api/src/lib/index.ts new file mode 100644 index 0000000..d4894af --- /dev/null +++ b/ext/viguno-api/src/lib/index.ts @@ -0,0 +1,4 @@ +// This file is auto-generated by @hey-api/openapi-ts +export * from './schemas.gen' +export * from './services.gen' +export * from './types.gen' diff --git a/ext/viguno-api/src/lib/schemas.gen.ts b/ext/viguno-api/src/lib/schemas.gen.ts new file mode 100644 index 0000000..e746c6b --- /dev/null +++ b/ext/viguno-api/src/lib/schemas.gen.ts @@ -0,0 +1,280 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export const $HpoTerm = { + type: 'object', + description: 'Struct for loading an HPO term from JSON.', + required: ['term_id'], + properties: { + term_id: { + type: 'string', + description: 'The term ID.' + }, + term_name: { + type: 'string', + description: 'The term name (optional).', + nullable: true + } + } +} as const + +export const $IcBasedOn = { + type: 'string', + description: `Enum for representing the information content kind. + +We replicate what is in the \`hpo\` create so we can put them on the command line and use +them in HTTP queries more easily.`, + enum: ['gene', 'omim'] +} as const + +export const $Match = { + type: 'string', + description: 'Specify how to perform query matches in the API calls.', + enum: ['exact', 'prefix', 'suffix', 'contains'] +} as const + +export const $Query = { + type: 'object', + title: 'HpoSimTermGeneQuery', + description: `Parameters for \`handle\`. + +This allows to compute differences between + +- \`terms\` -- set of terms to use as query +- \`gene_ids\` -- set of ids for genes to use as "database", can be NCBI\ +gene ID or HGNC gene ID. +- \`gene_symbols\` -- set of symbols for genes to use as +"database"`, + required: ['terms'], + properties: { + terms: { + type: 'array', + items: { + type: 'string' + }, + description: 'Set of terms to use as query.' + }, + gene_ids: { + type: 'array', + items: { + type: 'string' + }, + description: 'The set of ids for genes to use as "database".', + nullable: true + }, + gene_symbols: { + type: 'array', + items: { + type: 'string' + }, + description: 'The set of symbols for genes to use as "database".', + nullable: true + } + } +} as const + +export const $ResponseQuery = { + type: 'object', + title: 'HpoSimTermTermQuery', + description: `Request as sent together with the response. + +The difference is that the \`lhs\` and \`rhs\` fields are replaced by vecs.`, + required: ['lhs', 'rhs'], + properties: { + lhs: { + type: 'array', + items: { + type: 'string' + }, + description: 'The one set of HPO terms to compute similarity for.' + }, + rhs: { + type: 'array', + items: { + type: 'string' + }, + description: 'The second set of HPO terms to compute similarity for.' + }, + ic_base: { + $ref: '#/components/schemas/IcBasedOn' + }, + similarity: { + $ref: '#/components/schemas/SimilarityMethod' + }, + combiner: { + $ref: '#/components/schemas/ScoreCombiner' + } + } +} as const + +export const $Result = { + type: 'object', + title: 'HpoSimTermTermResult', + description: 'Result container.', + required: ['version', 'query', 'result'], + properties: { + version: { + $ref: '#/components/schemas/Version' + }, + query: { + $ref: '#/components/schemas/ResponseQuery' + }, + result: { + type: 'array', + items: { + $ref: '#/components/schemas/ResultEntry' + }, + description: 'The resulting records for the scored genes.' + } + } +} as const + +export const $ResultEntry = { + type: 'object', + title: 'HpoSimTermTermResultEntry', + description: 'Result entry for `handle`.', + required: ['lhs', 'rhs', 'score'], + properties: { + lhs: { + type: 'string', + description: 'The lhs entry.' + }, + rhs: { + type: 'string', + description: 'The rhs entry.' + }, + score: { + type: 'number', + format: 'float', + description: 'The similarity score.' + } + } +} as const + +export const $ResultGene = { + type: 'object', + description: 'Representation of a gene.', + required: ['ncbi_gene_id', 'gene_symbol'], + properties: { + ncbi_gene_id: { + type: 'integer', + format: 'int32', + description: 'The HPO ID.', + minimum: 0 + }, + gene_symbol: { + type: 'string', + description: 'The description.' + }, + hgnc_id: { + type: 'string', + description: 'The HGNC ID.', + nullable: true + } + } +} as const + +export const $ResultHpoTerm = { + type: 'object', + description: 'Representation of an HPO term.', + required: ['term_id', 'name'], + properties: { + term_id: { + type: 'string', + description: 'The HPO ID.' + }, + name: { + type: 'string', + description: 'The term name.' + } + } +} as const + +export const $Result_ = { + type: 'object', + title: 'HpoTermsResult', + description: 'Container for the result.', + required: ['version', 'query', 'result'], + properties: { + version: { + $ref: '#/components/schemas/Version' + }, + query: { + $ref: '#/components/schemas/Query' + }, + result: { + type: 'array', + items: { + $ref: '#/components/schemas/ResultEntry' + }, + description: 'The resulting records for the scored genes.' + } + } +} as const + +export const $ScoreCombiner = { + type: 'string', + description: `Representation of the standard combiners from HPO. + +We replicate what is in the \`hpo\` create so we can put them on the command line and use +them in HTTP queries more easily.`, + enum: ['fun-sim-avg', 'fun-sim-max', 'bma'] +} as const + +export const $SimilarityMethod = { + type: 'string', + description: `Enum for representing similarity method to use. + +We replicate what is in the \`hpo\` create so we can put them on the command line and use +them in HTTP queries more easily.`, + enum: [ + 'distance-gene', + 'graph-ic', + 'information-coefficient', + 'jc', + 'lin', + 'mutation', + 'relevance', + 'resnik' + ] +} as const + +export const $TermDetails = { + type: 'object', + title: 'HpoSimTermGeneTermDetails', + description: 'Detailed term scores.', + required: ['term_gene', 'score'], + properties: { + term_query: { + allOf: [ + { + $ref: '#/components/schemas/HpoTerm' + } + ], + nullable: true + }, + term_gene: { + $ref: '#/components/schemas/HpoTerm' + }, + score: { + type: 'number', + format: 'float', + description: 'The similarity score.' + } + } +} as const + +export const $Version = { + type: 'object', + description: 'Version information that is returned by the HTTP server.', + required: ['hpo', 'viguno'], + properties: { + hpo: { + type: 'string', + description: 'Version of the HPO.' + }, + viguno: { + type: 'string', + description: 'Version of the `viguno` package.' + } + } +} as const diff --git a/ext/viguno-api/src/lib/services.gen.ts b/ext/viguno-api/src/lib/services.gen.ts new file mode 100644 index 0000000..39c06f1 --- /dev/null +++ b/ext/viguno-api/src/lib/services.gen.ts @@ -0,0 +1,95 @@ +// This file is auto-generated by @hey-api/openapi-ts +import { type Options, createClient, createConfig } from '@hey-api/client-fetch' + +import type { + HpoGenesData, + HpoGenesError, + HpoGenesResponse, + HpoOmimsData, + HpoOmimsError, + HpoOmimsResponse, + HpoSimTermGeneData, + HpoSimTermGeneError, + HpoSimTermGeneResponse, + HpoSimTermTermData, + HpoSimTermTermError, + HpoSimTermTermResponse, + HpoTermsData, + HpoTermsError, + HpoTermsResponse +} from './types.gen' + +export const client = createClient(createConfig()) + +/** + * Query for genes in the HPO database. + */ +export const hpoGenes = ( + options?: Options +) => { + return (options?.client ?? client).get({ + ...options, + url: '/hpo/genes' + }) +} + +/** + * Query for OMIM diseases in the HPO database. + */ +export const hpoOmims = ( + options?: Options +) => { + return (options?.client ?? client).get({ + ...options, + url: '/hpo/omims' + }) +} + +/** + * Query for similarity between a set of terms to each entry in a + * list of genes. + */ +export const hpoSimTermGene = ( + options: Options +) => { + return (options?.client ?? client).get( + { + ...options, + url: '/hpo/sim/term-gene' + } + ) +} + +/** + * Query for pairwise term similarity. + * In the case of Resnik, this corresponds to `IC(MICA(t_1, t_2))`. + * + * # Errors + * + * In the case that there is an error running the server. + */ +export const hpoSimTermTerm = ( + options: Options +) => { + return (options?.client ?? client).get( + { + ...options, + url: '/hpo/sim/term-term' + } + ) +} + +/** + * Query for terms in the HPO database. + * # Errors + * + * In the case that there is an error running the server. + */ +export const hpoTerms = ( + options?: Options +) => { + return (options?.client ?? client).get({ + ...options, + url: '/hpo/terms' + }) +} diff --git a/ext/viguno-api/src/lib/types.gen.ts b/ext/viguno-api/src/lib/types.gen.ts new file mode 100644 index 0000000..771c218 --- /dev/null +++ b/ext/viguno-api/src/lib/types.gen.ts @@ -0,0 +1,334 @@ +// This file is auto-generated by @hey-api/openapi-ts + +/** + * Struct for loading an HPO term from JSON. + */ +export type HpoTerm = { + /** + * The term ID. + */ + term_id: string + /** + * The term name (optional). + */ + term_name?: string | null +} + +/** + * Enum for representing the information content kind. + * + * We replicate what is in the `hpo` create so we can put them on the command line and use + * them in HTTP queries more easily. + */ +export type IcBasedOn = 'gene' | 'omim' + +/** + * Specify how to perform query matches in the API calls. + */ +export type Match = 'exact' | 'prefix' | 'suffix' | 'contains' + +/** + * Parameters for `handle`. + * + * This allows to compute differences between + * + * - `terms` -- set of terms to use as query + * - `gene_ids` -- set of ids for genes to use as "database", can be NCBI\ + * gene ID or HGNC gene ID. + * - `gene_symbols` -- set of symbols for genes to use as + * "database" + */ +export type Query = { + /** + * Set of terms to use as query. + */ + terms: Array + /** + * The set of ids for genes to use as "database". + */ + gene_ids?: Array | null + /** + * The set of symbols for genes to use as "database". + */ + gene_symbols?: Array | null +} + +/** + * Request as sent together with the response. + * + * The difference is that the `lhs` and `rhs` fields are replaced by vecs. + */ +export type ResponseQuery = { + /** + * The one set of HPO terms to compute similarity for. + */ + lhs: Array + /** + * The second set of HPO terms to compute similarity for. + */ + rhs: Array + ic_base?: IcBasedOn + similarity?: SimilarityMethod + combiner?: ScoreCombiner +} + +/** + * Result container. + */ +export type Result = { + version: Version + query: ResponseQuery + /** + * The resulting records for the scored genes. + */ + result: Array +} + +/** + * Result entry for `handle`. + */ +export type ResultEntry = { + /** + * The lhs entry. + */ + lhs: string + /** + * The rhs entry. + */ + rhs: string + /** + * The similarity score. + */ + score: number +} + +/** + * Representation of a gene. + */ +export type ResultGene = { + /** + * The HPO ID. + */ + ncbi_gene_id: number + /** + * The description. + */ + gene_symbol: string + /** + * The HGNC ID. + */ + hgnc_id?: string | null +} + +/** + * Representation of an HPO term. + */ +export type ResultHpoTerm = { + /** + * The HPO ID. + */ + term_id: string + /** + * The term name. + */ + name: string +} + +/** + * Container for the result. + */ +export type Result_ = { + version: Version + query: Query + /** + * The resulting records for the scored genes. + */ + result: Array +} + +/** + * Representation of the standard combiners from HPO. + * + * We replicate what is in the `hpo` create so we can put them on the command line and use + * them in HTTP queries more easily. + */ +export type ScoreCombiner = 'fun-sim-avg' | 'fun-sim-max' | 'bma' + +/** + * Enum for representing similarity method to use. + * + * We replicate what is in the `hpo` create so we can put them on the command line and use + * them in HTTP queries more easily. + */ +export type SimilarityMethod = + | 'distance-gene' + | 'graph-ic' + | 'information-coefficient' + | 'jc' + | 'lin' + | 'mutation' + | 'relevance' + | 'resnik' + +/** + * Detailed term scores. + */ +export type TermDetails = { + term_query?: HpoTerm | null + term_gene: HpoTerm + /** + * The similarity score. + */ + score: number +} + +/** + * Version information that is returned by the HTTP server. + */ +export type Version = { + /** + * Version of the HPO. + */ + hpo: string + /** + * Version of the `viguno` package. + */ + viguno: string +} + +export type HpoGenesData = { + query?: { + /** + * The gene ID to search for. + */ + gene_id?: string | null + /** + * The gene symbol to search for. + */ + gene_symbol?: string | null + /** + * Whether to include HPO terms. + */ + hpo_terms?: boolean + /** + * The match mode. + */ + match_?: Match | null + /** + * Maximal number of results to return. + */ + max_results?: number + } +} + +export type HpoGenesResponse = Result + +export type HpoGenesError = unknown + +export type HpoOmimsData = { + query?: { + /** + * Whether to include HPO terms. + */ + hpo_terms?: boolean + /** + * Whether case is insentivie, default is `false`. + */ + ignore_case?: boolean | null + /** + * The match mode, default is `Match::Exact`. + */ + match_?: Match | null + /** + * Maximal number of results to return. + */ + max_results?: number + /** + * The disease name to search for. + */ + name?: string | null + /** + * The OMIM ID to search for. + */ + omim_id?: string | null + } +} + +export type HpoOmimsResponse = Result + +export type HpoOmimsError = unknown + +export type HpoSimTermGeneData = { + query: { + /** + * The set of ids for genes to use as "database". + */ + gene_ids?: Array | null + /** + * The set of symbols for genes to use as "database". + */ + gene_symbols?: Array | null + /** + * Set of terms to use as query. + */ + terms: Array + } +} + +export type HpoSimTermGeneResponse = Result + +export type HpoSimTermGeneError = unknown + +export type HpoSimTermTermData = { + query: { + /** + * The score combiner. + */ + combiner?: ScoreCombiner + /** + * What should information content be based on. + */ + ic_base?: IcBasedOn + /** + * The one set of HPO terms to compute similarity for. + */ + lhs: Array + /** + * The second set of HPO terms to compute similarity for. + */ + rhs: Array + /** + * The similarity method to use. + */ + similarity?: SimilarityMethod + } +} + +export type HpoSimTermTermResponse = Result + +export type HpoSimTermTermError = unknown + +export type HpoTermsData = { + query?: { + /** + * Whether to include genes. + */ + genes?: boolean + /** + * Maximal number of results to return. + */ + max_results?: number + /** + * The term name to search for. + */ + name?: string | null + /** + * The term ID to search for. + */ + term_id?: string | null + } +} + +export type HpoTermsResponse = Result + +export type HpoTermsError = unknown diff --git a/openapi-ts.config.cadaPrio.ts b/openapi-ts.config.cadaPrio.ts new file mode 100644 index 0000000..b7b498a --- /dev/null +++ b/openapi-ts.config.cadaPrio.ts @@ -0,0 +1,10 @@ +import { defineConfig } from '@hey-api/openapi-ts'; + +export default defineConfig({ + client: '@hey-api/client-fetch', + input: 'ext/cadaPrio-api/openapi.yaml', + output: 'ext/cadaPrio-api/src/lib', + plugins: [ + '@tanstack/vue-query' + ] +}); diff --git a/openapi-ts.config.dotty.ts b/openapi-ts.config.dotty.ts new file mode 100644 index 0000000..6c47dc6 --- /dev/null +++ b/openapi-ts.config.dotty.ts @@ -0,0 +1,10 @@ +import { defineConfig } from '@hey-api/openapi-ts'; + +export default defineConfig({ + client: '@hey-api/client-fetch', + input: 'ext/dotty-api/openapi.yaml', + output: 'ext/dotty-api/src/lib', + plugins: [ + '@tanstack/vue-query' + ] +}); diff --git a/openapi-ts.config.variantValidator.ts b/openapi-ts.config.variantValidator.ts new file mode 100644 index 0000000..1b23e5f --- /dev/null +++ b/openapi-ts.config.variantValidator.ts @@ -0,0 +1,10 @@ +import { defineConfig } from '@hey-api/openapi-ts'; + +export default defineConfig({ + client: '@hey-api/client-fetch', + input: 'ext/variantValidator-api/openapi.yaml', + output: 'ext/variantValidator-api/src/lib', + plugins: [ + '@tanstack/vue-query' + ] +}); diff --git a/openapi-ts.config.viguno.ts b/openapi-ts.config.viguno.ts new file mode 100644 index 0000000..52202d9 --- /dev/null +++ b/openapi-ts.config.viguno.ts @@ -0,0 +1,10 @@ +import { defineConfig } from '@hey-api/openapi-ts'; + +export default defineConfig({ + client: '@hey-api/client-fetch', + input: 'ext/viguno-api/openapi.yaml', + output: 'ext/viguno-api/src/lib', + plugins: [ + '@tanstack/vue-query' + ] +}); diff --git a/openapis/cada-prio.yaml b/openapis/cada-prio.yaml new file mode 100644 index 0000000..2c79431 --- /dev/null +++ b/openapis/cada-prio.yaml @@ -0,0 +1,82 @@ +components: + schemas: + HTTPValidationError: + properties: + detail: + items: + $ref: '#/components/schemas/ValidationError' + title: Detail + type: array + title: HTTPValidationError + type: object + ValidationError: + properties: + loc: + items: + anyOf: + - type: string + - type: integer + title: Location + type: array + msg: + title: Message + type: string + type: + title: Error Type + type: string + required: + - loc + - msg + - type + title: ValidationError + type: object +info: + description: A phenotype-based gene prioritization tool. + title: cada-prio + version: 0.6.1 +openapi: 3.1.0 +paths: + /api/v1/predict: + get: + description: Predict genes for a given set of HPO terms and optionally genes. + operationId: handle_predict_api_v1_predict_get + parameters: + - example: HP:0000098,HP:0000218,HP:0000486 + in: query + name: hpo_terms + required: true + schema: + title: Hpo Terms + type: string + - example: FBN1,TTN,BRCA1 + in: query + name: genes + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Genes + responses: + '200': + content: + application/json: + schema: {} + description: Successful Response + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + summary: Handle Predict + /api/v1/version: + get: + operationId: version_api_v1_version_get + responses: + '200': + content: + application/json: + schema: {} + description: Successful Response + summary: Version diff --git a/openapis/dotty.yaml b/openapis/dotty.yaml new file mode 100644 index 0000000..e69de29 diff --git a/package-lock.json b/package-lock.json index c008ab0..4c441f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,8 @@ "name": "@bihealth/reev-frontend-lib", "version": "0.7.1", "dependencies": { + "@hey-api/client-fetch": "^0.2.4", + "@hey-api/openapi-ts": "^0.52.11", "@mdi/font": "^7.4.47", "@protobuf-ts/runtime": "^2.9.3", "@reactgular/chunks": "^1.0.1", @@ -98,6 +100,41 @@ "node": ">=6.0.0" } }, + "node_modules/@apidevtools/json-schema-ref-parser": { + "version": "11.7.0", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.7.0.tgz", + "integrity": "sha512-pRrmXMCwnmrkS3MLgAIW5dXRzeTv6GLjkjb4HmxNnvAKXN1Nfzp4KmGADBQvlVUcqi+a5D+hfGDLLnd5NnYxog==", + "license": "MIT", + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.15", + "js-yaml": "^4.1.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/philsturgeon" + } + }, + "node_modules/@apidevtools/json-schema-ref-parser/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" + }, + "node_modules/@apidevtools/json-schema-ref-parser/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/@aw-web-design/x-default-browser": { "version": "1.4.126", "resolved": "https://registry.npmjs.org/@aw-web-design/x-default-browser/-/x-default-browser-1.4.126.tgz", @@ -513,19 +550,19 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", - "dev": true, + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", + "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true, + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -653,9 +690,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.9.tgz", - "integrity": "sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.6.tgz", + "integrity": "sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.6" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -2135,13 +2176,13 @@ } }, "node_modules/@babel/types": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.9.tgz", - "integrity": "sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q==", - "dev": true, + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.6.tgz", + "integrity": "sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==", + "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-string-parser": "^7.24.8", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -2716,6 +2757,42 @@ "integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==", "dev": true }, + "node_modules/@hey-api/client-fetch": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@hey-api/client-fetch/-/client-fetch-0.2.4.tgz", + "integrity": "sha512-SGTVAVw3PlKDLw+IyhNhb/jCH3P1P2xJzLxA8Kyz1g95HrkYOJdRpl9F5I7LLwo9aCIB7nwR2NrSeX7QaQD7vQ==", + "license": "MIT" + }, + "node_modules/@hey-api/openapi-ts": { + "version": "0.52.11", + "resolved": "https://registry.npmjs.org/@hey-api/openapi-ts/-/openapi-ts-0.52.11.tgz", + "integrity": "sha512-S3NrCQDxy7AtW5sx8OVoBaqpaYNqYsD0y6YNwhUXPUahbrW7Wxm/N4RIEsRtXVbcjUqdAjo1FmFmeyEKYziJkw==", + "license": "MIT", + "dependencies": { + "@apidevtools/json-schema-ref-parser": "11.7.0", + "c12": "1.11.1", + "commander": "12.1.0", + "handlebars": "4.7.8" + }, + "bin": { + "openapi-ts": "bin/index.cjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "typescript": "^5.x" + } + }, + "node_modules/@hey-api/openapi-ts/node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -3036,6 +3113,12 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", + "license": "MIT" + }, "node_modules/@juggle/resize-observer": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/@juggle/resize-observer/-/resize-observer-3.4.0.tgz", @@ -5982,8 +6065,7 @@ "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" }, "node_modules/@types/json5": { "version": "0.0.29", @@ -7145,7 +7227,6 @@ "version": "8.11.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "devOptional": true, "bin": { "acorn": "bin/acorn" }, @@ -7928,6 +8009,34 @@ "node": ">= 0.8" } }, + "node_modules/c12": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/c12/-/c12-1.11.1.tgz", + "integrity": "sha512-KDU0TvSvVdaYcQKQ6iPHATGz/7p/KiVjPg4vQrB6Jg/wX9R0yl5RZxWm9IoZqaIHD2+6PZd81+KMGwRr/lRIUg==", + "license": "MIT", + "dependencies": { + "chokidar": "^3.6.0", + "confbox": "^0.1.7", + "defu": "^6.1.4", + "dotenv": "^16.4.5", + "giget": "^1.2.3", + "jiti": "^1.21.6", + "mlly": "^1.7.1", + "ohash": "^1.1.3", + "pathe": "^1.1.2", + "perfect-debounce": "^1.0.0", + "pkg-types": "^1.1.1", + "rc9": "^2.1.2" + }, + "peerDependencies": { + "magicast": "^0.3.4" + }, + "peerDependenciesMeta": { + "magicast": { + "optional": true + } + } + }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -8107,15 +8216,10 @@ } }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -8128,6 +8232,9 @@ "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { "fsevents": "~2.3.2" } @@ -8147,7 +8254,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "dev": true, "engines": { "node": ">=10" } @@ -8171,7 +8277,7 @@ "version": "0.1.6", "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", "integrity": "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==", - "dev": true, + "license": "MIT", "dependencies": { "consola": "^3.2.3" } @@ -8432,6 +8538,12 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/confbox": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.7.tgz", + "integrity": "sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==", + "license": "MIT" + }, "node_modules/config-chain": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", @@ -8446,7 +8558,7 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/consola/-/consola-3.2.3.tgz", "integrity": "sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==", - "dev": true, + "license": "MIT", "engines": { "node": "^14.18.0 || >=16.10.0" } @@ -8555,7 +8667,6 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -9032,8 +9143,7 @@ "node_modules/defu": { "version": "6.1.4", "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", - "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", - "dev": true + "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==" }, "node_modules/del": { "version": "6.1.1", @@ -9092,6 +9202,12 @@ "node": ">=6" } }, + "node_modules/destr": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.3.tgz", + "integrity": "sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==", + "license": "MIT" + }, "node_modules/destroy": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", @@ -9211,15 +9327,15 @@ "dev": true }, "node_modules/dotenv": { - "version": "16.4.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.1.tgz", - "integrity": "sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==", - "dev": true, + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "license": "BSD-2-Clause", "engines": { "node": ">=12" }, "funding": { - "url": "https://github.com/motdotla/dotenv?sponsor=1" + "url": "https://dotenvx.com" } }, "node_modules/dotenv-expand": { @@ -11155,7 +11271,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, "dependencies": { "minipass": "^3.0.0" }, @@ -11167,7 +11282,6 @@ "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -11178,8 +11292,7 @@ "node_modules/fs-minipass/node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/fs.realpath": { "version": "1.0.0", @@ -11350,18 +11463,18 @@ } }, "node_modules/giget": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/giget/-/giget-1.2.1.tgz", - "integrity": "sha512-4VG22mopWtIeHwogGSy1FViXVo0YT+m6BrqZfz0JJFwbSsePsCdOzdLIIli5BtMp7Xe8f/o2OmBpQX2NBOC24g==", - "dev": true, + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/giget/-/giget-1.2.3.tgz", + "integrity": "sha512-8EHPljDvs7qKykr6uw8b+lqLiUc/vUg+KVTI0uND4s63TdsZM2Xus3mflvF0DDG9SiM4RlCkFGL+7aAjRmV7KA==", + "license": "MIT", "dependencies": { - "citty": "^0.1.5", + "citty": "^0.1.6", "consola": "^3.2.3", - "defu": "^6.1.3", - "node-fetch-native": "^1.6.1", - "nypm": "^0.3.3", + "defu": "^6.1.4", + "node-fetch-native": "^1.6.3", + "nypm": "^0.3.8", "ohash": "^1.1.3", - "pathe": "^1.1.1", + "pathe": "^1.1.2", "tar": "^6.2.0" }, "bin": { @@ -11502,7 +11615,6 @@ "version": "4.7.8", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", - "dev": true, "dependencies": { "minimist": "^1.2.5", "neo-async": "^2.6.2", @@ -12437,8 +12549,7 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "node_modules/isobject": { "version": "3.0.1", @@ -12789,6 +12900,15 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/jiti": { + "version": "1.21.6", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz", + "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==", + "license": "MIT", + "bin": { + "jiti": "bin/jiti.js" + } + }, "node_modules/jju": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", @@ -13005,12 +13125,6 @@ "node": ">=6" } }, - "node_modules/jsonc-parser": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", - "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", - "dev": true - }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -13267,14 +13381,15 @@ } }, "node_modules/magicast": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.3.tgz", - "integrity": "sha512-ZbrP1Qxnpoes8sz47AM0z08U+jW6TyRgZzcWy3Ma3vDhJttwMwAFDMMQFobwdBxByBD46JYmxRzeF7w2+wJEuw==", - "dev": true, + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz", + "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==", + "devOptional": true, + "license": "MIT", "dependencies": { - "@babel/parser": "^7.23.6", - "@babel/types": "^7.23.6", - "source-map-js": "^1.0.2" + "@babel/parser": "^7.25.4", + "@babel/types": "^7.25.4", + "source-map-js": "^1.2.0" } }, "node_modules/make-dir": { @@ -14050,8 +14165,7 @@ "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" }, "node_modules/merge2": { "version": "1.4.1", @@ -14733,7 +14847,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -14751,7 +14864,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dev": true, "dependencies": { "minipass": "^3.0.0", "yallist": "^4.0.0" @@ -14764,7 +14876,6 @@ "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -14775,8 +14886,7 @@ "node_modules/minizlib/node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/mitt": { "version": "3.0.1", @@ -14803,15 +14913,15 @@ "dev": true }, "node_modules/mlly": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.5.0.tgz", - "integrity": "sha512-NPVQvAY1xr1QoVeG0cy8yUYC7FQcOx6evl/RjT1wL5FvzPnzOysoqB/jmx/DhssT2dYa8nxECLAaFI/+gVLhDQ==", - "dev": true, + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.1.tgz", + "integrity": "sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==", + "license": "MIT", "dependencies": { "acorn": "^8.11.3", "pathe": "^1.1.2", - "pkg-types": "^1.0.3", - "ufo": "^1.3.2" + "pkg-types": "^1.1.1", + "ufo": "^1.5.3" } }, "node_modules/moo-color": { @@ -14878,8 +14988,7 @@ "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, "node_modules/node-dir": { "version": "0.1.17", @@ -14935,10 +15044,10 @@ } }, "node_modules/node-fetch-native": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.2.tgz", - "integrity": "sha512-69mtXOFZ6hSkYiXAVB5SqaRvrbITC/NPyqv7yuu/qw0nmgPyYbIMYYNIDhNtwPrzk0ptrimrLz/hhjvm4w5Z+w==", - "dev": true + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.4.tgz", + "integrity": "sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==", + "license": "MIT" }, "node_modules/node-fetch/node_modules/tr46": { "version": "0.0.3", @@ -15055,15 +15164,17 @@ "dev": true }, "node_modules/nypm": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.3.6.tgz", - "integrity": "sha512-2CATJh3pd6CyNfU5VZM7qSwFu0ieyabkEdnogE30Obn1czrmOYiZ8DOZLe1yBdLKWoyD3Mcy2maUs+0MR3yVjQ==", - "dev": true, + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.3.11.tgz", + "integrity": "sha512-E5GqaAYSnbb6n1qZyik2wjPDZON43FqOJO59+3OkWrnmQtjggrMOVnsyzfjxp/tS6nlYJBA4zRA5jSM2YaadMg==", + "license": "MIT", "dependencies": { - "citty": "^0.1.5", + "citty": "^0.1.6", + "consola": "^3.2.3", "execa": "^8.0.1", "pathe": "^1.1.2", - "ufo": "^1.3.2" + "pkg-types": "^1.2.0", + "ufo": "^1.5.4" }, "bin": { "nypm": "dist/cli.mjs" @@ -15076,7 +15187,7 @@ "version": "8.0.1", "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", - "dev": true, + "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^8.0.1", @@ -15099,7 +15210,7 @@ "version": "8.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", - "dev": true, + "license": "MIT", "engines": { "node": ">=16" }, @@ -15111,7 +15222,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", - "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=16.17.0" } @@ -15120,7 +15231,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, + "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -15132,7 +15243,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -15144,7 +15255,7 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", - "dev": true, + "license": "MIT", "dependencies": { "path-key": "^4.0.0" }, @@ -15159,7 +15270,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dev": true, + "license": "MIT", "dependencies": { "mimic-fn": "^4.0.0" }, @@ -15174,7 +15285,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -15186,7 +15297,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, + "license": "ISC", "engines": { "node": ">=14" }, @@ -15198,7 +15309,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -15317,8 +15428,7 @@ "node_modules/ohash": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/ohash/-/ohash-1.1.3.tgz", - "integrity": "sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw==", - "dev": true + "integrity": "sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw==" }, "node_modules/on-finished": { "version": "2.4.1", @@ -15589,7 +15699,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, "engines": { "node": ">=8" } @@ -15658,8 +15767,7 @@ "node_modules/pathe": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", - "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", - "dev": true + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==" }, "node_modules/pathval": { "version": "1.1.1", @@ -15687,6 +15795,12 @@ "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", "dev": true }, + "node_modules/perfect-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", + "integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==", + "license": "MIT" + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -15788,14 +15902,14 @@ } }, "node_modules/pkg-types": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", - "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==", - "dev": true, + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.2.0.tgz", + "integrity": "sha512-+ifYuSSqOQ8CqP4MbZA5hDpb97n3E8SVWdJe+Wms9kj745lmd3b7EZJiqvmLwAlmRfjrI7Hi5z3kdBJ93lFNPA==", + "license": "MIT", "dependencies": { - "jsonc-parser": "^3.2.0", - "mlly": "^1.2.0", - "pathe": "^1.1.0" + "confbox": "^0.1.7", + "mlly": "^1.7.1", + "pathe": "^1.1.2" } }, "node_modules/plotly.js-dist": { @@ -16396,6 +16510,16 @@ "node": ">= 0.8" } }, + "node_modules/rc9": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/rc9/-/rc9-2.1.2.tgz", + "integrity": "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==", + "license": "MIT", + "dependencies": { + "defu": "^6.1.4", + "destr": "^2.0.3" + } + }, "node_modules/react": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", @@ -17547,7 +17671,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -17559,7 +17682,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, "engines": { "node": ">=8" } @@ -17609,7 +17731,6 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "devOptional": true, "engines": { "node": ">=0.10.0" } @@ -18023,7 +18144,6 @@ "version": "6.2.0", "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==", - "dev": true, "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -18074,7 +18194,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", - "dev": true, "engines": { "node": ">=8" } @@ -18083,7 +18202,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, "bin": { "mkdirp": "bin/cmd.js" }, @@ -18094,8 +18212,7 @@ "node_modules/tar/node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/telejson": { "version": "7.2.0", @@ -18383,7 +18500,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, "engines": { "node": ">=4" } @@ -18682,7 +18798,6 @@ "version": "5.3.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", - "devOptional": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -18692,16 +18807,15 @@ } }, "node_modules/ufo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.2.tgz", - "integrity": "sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==", - "dev": true + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz", + "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==", + "license": "MIT" }, "node_modules/uglify-js": { "version": "3.17.4", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", - "dev": true, "optional": true, "bin": { "uglifyjs": "bin/uglifyjs" @@ -21216,7 +21330,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, "dependencies": { "isexe": "^2.0.0" }, @@ -21311,8 +21424,7 @@ "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", - "dev": true + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==" }, "node_modules/wrap-ansi": { "version": "8.1.0", diff --git a/package.json b/package.json index c3d8379..d6e17cf 100644 --- a/package.json +++ b/package.json @@ -40,12 +40,13 @@ "build": "vue-tsc && vite build", "type-check": "vue-tsc --noEmit --composite false", "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts,.mdx --fix --ignore-path .gitignore --ignore-pattern 'src/pbs/google/protobuf/*'", - "format": "prettier --write .storybook src/ *.json *.cjs *.mts", + "format": "prettier --write .storybook ext/ src/ *.json *.cjs *.mts", "format:check": "prettier --list-different .storybook src/ *.json *.cjs *.mts", "storybook": "storybook dev -p 6006", "build-storybook": "storybook build" }, "dependencies": { + "@hey-api/client-fetch": "^0.2.4", "@mdi/font": "^7.4.47", "@protobuf-ts/runtime": "^2.9.3", "@reactgular/chunks": "^1.0.1", @@ -65,6 +66,7 @@ "vuetify": "^3.5.7" }, "devDependencies": { + "@hey-api/openapi-ts": "^0.52.11", "@pinia/testing": "^0.1.3", "@protobuf-ts/plugin": "^2.9.3", "@rushstack/eslint-patch": "^1.7.2", diff --git a/src/components/SeqvarVariantValidatorCard/SeqvarVariantValidatorCard.vue b/src/components/SeqvarVariantValidatorCard/SeqvarVariantValidatorCard.vue index 73d93be..659ff3c 100644 --- a/src/components/SeqvarVariantValidatorCard/SeqvarVariantValidatorCard.vue +++ b/src/components/SeqvarVariantValidatorCard/SeqvarVariantValidatorCard.vue @@ -17,11 +17,15 @@ enum VariantValidatorStates { Error = 3 } -interface Props { - seqvar?: Seqvar -} - -const props = defineProps() +/** This component's props. */ +const props = withDefaults( + defineProps<{ + seqvar?: Seqvar + }>(), + { + seqvar: undefined + } +) /** This component's emits. */ const emit = defineEmits<{