-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: gromdimon <[email protected]>
- Loading branch information
Showing
34 changed files
with
4,053 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# log files | ||
/*.log | ||
|
||
# nodejs | ||
/node_modules | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<TOptions extends Options> = [ | ||
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & { | ||
_id: string | ||
_infinite?: boolean | ||
} | ||
] | ||
|
||
const createQueryKey = <TOptions extends Options>( | ||
id: string, | ||
options?: TOptions, | ||
infinite?: boolean | ||
): QueryKey<TOptions>[0] => { | ||
const params: QueryKey<TOptions>[0] = { | ||
_id: id, | ||
baseUrl: client.getConfig().baseUrl | ||
} as QueryKey<TOptions>[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<HandlePredictApiV1PredictGetData> | ||
) => [createQueryKey('handlePredictApiV1PredictGet', options)] | ||
|
||
export const handlePredictApiV1PredictGetOptions = ( | ||
options: Options<HandlePredictApiV1PredictGetData> | ||
) => { | ||
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) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 = <ThrowOnError extends boolean = false>( | ||
options: Options<HandlePredictApiV1PredictGetData, ThrowOnError> | ||
) => { | ||
return (options?.client ?? client).get< | ||
HandlePredictApiV1PredictGetResponse, | ||
HandlePredictApiV1PredictGetError, | ||
ThrowOnError | ||
>({ | ||
...options, | ||
url: '/api/v1/predict' | ||
}) | ||
} | ||
|
||
/** | ||
* Version | ||
*/ | ||
export const versionApiV1VersionGet = <ThrowOnError extends boolean = false>( | ||
options?: Options<unknown, ThrowOnError> | ||
) => { | ||
return (options?.client ?? client).get< | ||
VersionApiV1VersionGetResponse, | ||
VersionApiV1VersionGetError, | ||
ThrowOnError | ||
>({ | ||
...options, | ||
url: '/api/v1/version' | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// This file is auto-generated by @hey-api/openapi-ts | ||
|
||
export type HTTPValidationError = { | ||
detail?: Array<ValidationError> | ||
} | ||
|
||
export type ValidationError = { | ||
loc: Array<string | number> | ||
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 |
Oops, something went wrong.