Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions lib/adapters/REST/endpoints/concept.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type {
GetManyConceptParams,
GetOrganizationParams,
UpdateConceptParams,
Link,
} from '../../../common-types'
import type { ConceptProps, CreateConceptProps } from '../../../entities/concept'
import type { RestEndpoint } from '../types'
Expand Down Expand Up @@ -96,7 +97,11 @@ export const updatePut: RestEndpoint<'Concept', 'updatePut'> = (
export const get: RestEndpoint<'Concept', 'get'> = (
http: AxiosInstance,
params: GetConceptParams
) => raw.get<ConceptProps>(http, `${basePath(params.organizationId)}/${params.conceptId}`)
) =>
raw.get<ConceptProps & { conceptSchemes?: Link<'TaxonomyConceptScheme'>[] }>(
http,
`${basePath(params.organizationId)}/${params.conceptId}`
)

export const del: RestEndpoint<'Concept', 'delete'> = (
http: AxiosInstance,
Expand All @@ -115,7 +120,11 @@ export const getMany: RestEndpoint<'Concept', 'getMany'> = (
params: GetManyConceptParams
) => {
const { url, queryParams } = cursorBasedCollection('', params)
return raw.get<CursorPaginatedCollectionProp<ConceptProps>>(http, url, {
return raw.get<
CursorPaginatedCollectionProp<
ConceptProps & { conceptSchemes?: Link<'TaxonomyConceptScheme'>[] }
>
>(http, url, {
params: queryParams,
})
}
Expand Down