Add Tailwind + shadcn UI primitives; add React Query + Orval client

This commit is contained in:
Abhimanyu Saharan
2026-02-01 23:26:21 +05:30
parent aa6b0c807b
commit 87d454852c
47 changed files with 4262 additions and 164 deletions

View File

@@ -0,0 +1,265 @@
/**
* Generated by orval v8.2.0 🍺
* Do not edit manually.
* OpenClaw Agency API
* OpenAPI spec version: 0.3.0
*/
import type {
Department,
DepartmentCreate,
DepartmentUpdate,
Employee,
EmployeeCreate,
EmployeeUpdate,
HTTPValidationError,
} from ".././model";
import { customFetch } from "../../mutator";
/**
* @summary List Departments
*/
export type listDepartmentsDepartmentsGetResponse200 = {
data: Department[];
status: 200;
};
export type listDepartmentsDepartmentsGetResponseSuccess =
listDepartmentsDepartmentsGetResponse200 & {
headers: Headers;
};
export type listDepartmentsDepartmentsGetResponse =
listDepartmentsDepartmentsGetResponseSuccess;
export const getListDepartmentsDepartmentsGetUrl = () => {
return `/departments`;
};
export const listDepartmentsDepartmentsGet = async (
options?: RequestInit,
): Promise<listDepartmentsDepartmentsGetResponse> => {
return customFetch<listDepartmentsDepartmentsGetResponse>(
getListDepartmentsDepartmentsGetUrl(),
{
...options,
method: "GET",
},
);
};
/**
* @summary Create Department
*/
export type createDepartmentDepartmentsPostResponse200 = {
data: Department;
status: 200;
};
export type createDepartmentDepartmentsPostResponse422 = {
data: HTTPValidationError;
status: 422;
};
export type createDepartmentDepartmentsPostResponseSuccess =
createDepartmentDepartmentsPostResponse200 & {
headers: Headers;
};
export type createDepartmentDepartmentsPostResponseError =
createDepartmentDepartmentsPostResponse422 & {
headers: Headers;
};
export type createDepartmentDepartmentsPostResponse =
| createDepartmentDepartmentsPostResponseSuccess
| createDepartmentDepartmentsPostResponseError;
export const getCreateDepartmentDepartmentsPostUrl = () => {
return `/departments`;
};
export const createDepartmentDepartmentsPost = async (
departmentCreate: DepartmentCreate,
options?: RequestInit,
): Promise<createDepartmentDepartmentsPostResponse> => {
return customFetch<createDepartmentDepartmentsPostResponse>(
getCreateDepartmentDepartmentsPostUrl(),
{
...options,
method: "POST",
headers: { "Content-Type": "application/json", ...options?.headers },
body: JSON.stringify(departmentCreate),
},
);
};
/**
* @summary Update Department
*/
export type updateDepartmentDepartmentsDepartmentIdPatchResponse200 = {
data: Department;
status: 200;
};
export type updateDepartmentDepartmentsDepartmentIdPatchResponse422 = {
data: HTTPValidationError;
status: 422;
};
export type updateDepartmentDepartmentsDepartmentIdPatchResponseSuccess =
updateDepartmentDepartmentsDepartmentIdPatchResponse200 & {
headers: Headers;
};
export type updateDepartmentDepartmentsDepartmentIdPatchResponseError =
updateDepartmentDepartmentsDepartmentIdPatchResponse422 & {
headers: Headers;
};
export type updateDepartmentDepartmentsDepartmentIdPatchResponse =
| updateDepartmentDepartmentsDepartmentIdPatchResponseSuccess
| updateDepartmentDepartmentsDepartmentIdPatchResponseError;
export const getUpdateDepartmentDepartmentsDepartmentIdPatchUrl = (
departmentId: number,
) => {
return `/departments/${departmentId}`;
};
export const updateDepartmentDepartmentsDepartmentIdPatch = async (
departmentId: number,
departmentUpdate: DepartmentUpdate,
options?: RequestInit,
): Promise<updateDepartmentDepartmentsDepartmentIdPatchResponse> => {
return customFetch<updateDepartmentDepartmentsDepartmentIdPatchResponse>(
getUpdateDepartmentDepartmentsDepartmentIdPatchUrl(departmentId),
{
...options,
method: "PATCH",
headers: { "Content-Type": "application/json", ...options?.headers },
body: JSON.stringify(departmentUpdate),
},
);
};
/**
* @summary List Employees
*/
export type listEmployeesEmployeesGetResponse200 = {
data: Employee[];
status: 200;
};
export type listEmployeesEmployeesGetResponseSuccess =
listEmployeesEmployeesGetResponse200 & {
headers: Headers;
};
export type listEmployeesEmployeesGetResponse =
listEmployeesEmployeesGetResponseSuccess;
export const getListEmployeesEmployeesGetUrl = () => {
return `/employees`;
};
export const listEmployeesEmployeesGet = async (
options?: RequestInit,
): Promise<listEmployeesEmployeesGetResponse> => {
return customFetch<listEmployeesEmployeesGetResponse>(
getListEmployeesEmployeesGetUrl(),
{
...options,
method: "GET",
},
);
};
/**
* @summary Create Employee
*/
export type createEmployeeEmployeesPostResponse200 = {
data: Employee;
status: 200;
};
export type createEmployeeEmployeesPostResponse422 = {
data: HTTPValidationError;
status: 422;
};
export type createEmployeeEmployeesPostResponseSuccess =
createEmployeeEmployeesPostResponse200 & {
headers: Headers;
};
export type createEmployeeEmployeesPostResponseError =
createEmployeeEmployeesPostResponse422 & {
headers: Headers;
};
export type createEmployeeEmployeesPostResponse =
| createEmployeeEmployeesPostResponseSuccess
| createEmployeeEmployeesPostResponseError;
export const getCreateEmployeeEmployeesPostUrl = () => {
return `/employees`;
};
export const createEmployeeEmployeesPost = async (
employeeCreate: EmployeeCreate,
options?: RequestInit,
): Promise<createEmployeeEmployeesPostResponse> => {
return customFetch<createEmployeeEmployeesPostResponse>(
getCreateEmployeeEmployeesPostUrl(),
{
...options,
method: "POST",
headers: { "Content-Type": "application/json", ...options?.headers },
body: JSON.stringify(employeeCreate),
},
);
};
/**
* @summary Update Employee
*/
export type updateEmployeeEmployeesEmployeeIdPatchResponse200 = {
data: Employee;
status: 200;
};
export type updateEmployeeEmployeesEmployeeIdPatchResponse422 = {
data: HTTPValidationError;
status: 422;
};
export type updateEmployeeEmployeesEmployeeIdPatchResponseSuccess =
updateEmployeeEmployeesEmployeeIdPatchResponse200 & {
headers: Headers;
};
export type updateEmployeeEmployeesEmployeeIdPatchResponseError =
updateEmployeeEmployeesEmployeeIdPatchResponse422 & {
headers: Headers;
};
export type updateEmployeeEmployeesEmployeeIdPatchResponse =
| updateEmployeeEmployeesEmployeeIdPatchResponseSuccess
| updateEmployeeEmployeesEmployeeIdPatchResponseError;
export const getUpdateEmployeeEmployeesEmployeeIdPatchUrl = (
employeeId: number,
) => {
return `/employees/${employeeId}`;
};
export const updateEmployeeEmployeesEmployeeIdPatch = async (
employeeId: number,
employeeUpdate: EmployeeUpdate,
options?: RequestInit,
): Promise<updateEmployeeEmployeesEmployeeIdPatchResponse> => {
return customFetch<updateEmployeeEmployeesEmployeeIdPatchResponse>(
getUpdateEmployeeEmployeesEmployeeIdPatchUrl(employeeId),
{
...options,
method: "PATCH",
headers: { "Content-Type": "application/json", ...options?.headers },
body: JSON.stringify(employeeUpdate),
},
);
};