mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-16 12:12:15 +01:00
add basic crud frontend for clients, tags and projects
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
import type { ApiOf, ZodiosResponseByAlias } from '@zodios/core';
|
||||
import type {
|
||||
ApiOf,
|
||||
ZodiosResponseByAlias,
|
||||
ZodiosBodyByAlias,
|
||||
} from '@zodios/core';
|
||||
import { api } from '../../../openapi.json.client';
|
||||
|
||||
export type SolidTimeApi = ApiOf<typeof api>;
|
||||
@@ -15,5 +19,29 @@ export type ProjectResponse = ZodiosResponseByAlias<
|
||||
>;
|
||||
export type Project = ProjectResponse['data'][0];
|
||||
|
||||
export type CreateProjectBody = ZodiosBodyByAlias<
|
||||
SolidTimeApi,
|
||||
'createProject'
|
||||
>;
|
||||
|
||||
export type CreateClientBody = ZodiosBodyByAlias<SolidTimeApi, 'createClient'>;
|
||||
|
||||
export type TagIndexResponse = ZodiosResponseByAlias<SolidTimeApi, 'getTags'>;
|
||||
export type Tag = TagIndexResponse['data'][0];
|
||||
|
||||
export type TaskIndexResponse = ZodiosResponseByAlias<SolidTimeApi, 'getTasks'>;
|
||||
export type Task = TaskIndexResponse['data'][0];
|
||||
|
||||
export type ClientIndexResponse = ZodiosResponseByAlias<
|
||||
SolidTimeApi,
|
||||
'getClients'
|
||||
>;
|
||||
export type Client = ClientIndexResponse['data'][0];
|
||||
|
||||
export type MemberIndexResponse = ZodiosResponseByAlias<
|
||||
SolidTimeApi,
|
||||
'getMembers'
|
||||
>;
|
||||
export type Member = MemberIndexResponse['data'][0];
|
||||
|
||||
export type CreateTagBody = ZodiosBodyByAlias<SolidTimeApi, 'createTag'>;
|
||||
|
||||
Reference in New Issue
Block a user