Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 37x 823x 9x | import type { ApiContract } from '@/layers/interfaces'
import type { components } from '@/types/api'
type Run = components['schemas']['Run']
type CreateRunRequest = components['schemas']['CreateRunRequest']
type UpdateRunRequest = components['schemas']['UpdateRunRequest']
type RunListQuery = {
[key: string]: string | number | boolean | undefined
}
export const runsContract: ApiContract<
Run & { id: string },
CreateRunRequest,
UpdateRunRequest,
RunListQuery
> = {
idOf: (e) => e.run_id as string,
entityPath: 'runs',
endpoints: {
list: '/runs',
detail: (id) => `/runs/${id}`,
create: '/runs',
update: (id) => `/runs/${id}`,
remove: (id) => `/runs/${id}`,
},
subscription: {
ssePath: '/runs/events',
entityName: 'run',
},
}
|