Add Tailwind + shadcn UI primitives; add React Query + Orval client
This commit is contained in:
69
frontend/src/api/generated/activities/activities.ts
Normal file
69
frontend/src/api/generated/activities/activities.ts
Normal file
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
import type {
|
||||
HTTPValidationError,
|
||||
ListActivitiesActivitiesGetParams,
|
||||
} from ".././model";
|
||||
|
||||
import { customFetch } from "../../mutator";
|
||||
|
||||
/**
|
||||
* @summary List Activities
|
||||
*/
|
||||
export type listActivitiesActivitiesGetResponse200 = {
|
||||
data: unknown;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type listActivitiesActivitiesGetResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type listActivitiesActivitiesGetResponseSuccess =
|
||||
listActivitiesActivitiesGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type listActivitiesActivitiesGetResponseError =
|
||||
listActivitiesActivitiesGetResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type listActivitiesActivitiesGetResponse =
|
||||
| listActivitiesActivitiesGetResponseSuccess
|
||||
| listActivitiesActivitiesGetResponseError;
|
||||
|
||||
export const getListActivitiesActivitiesGetUrl = (
|
||||
params?: ListActivitiesActivitiesGetParams,
|
||||
) => {
|
||||
const normalizedParams = new URLSearchParams();
|
||||
|
||||
Object.entries(params || {}).forEach(([key, value]) => {
|
||||
if (value !== undefined) {
|
||||
normalizedParams.append(key, value === null ? "null" : value.toString());
|
||||
}
|
||||
});
|
||||
|
||||
const stringifiedParams = normalizedParams.toString();
|
||||
|
||||
return stringifiedParams.length > 0
|
||||
? `/activities?${stringifiedParams}`
|
||||
: `/activities`;
|
||||
};
|
||||
|
||||
export const listActivitiesActivitiesGet = async (
|
||||
params?: ListActivitiesActivitiesGetParams,
|
||||
options?: RequestInit,
|
||||
): Promise<listActivitiesActivitiesGetResponse> => {
|
||||
return customFetch<listActivitiesActivitiesGetResponse>(
|
||||
getListActivitiesActivitiesGetUrl(params),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
33
frontend/src/api/generated/default/default.ts
Normal file
33
frontend/src/api/generated/default/default.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
import { customFetch } from "../../mutator";
|
||||
|
||||
/**
|
||||
* @summary Health
|
||||
*/
|
||||
export type healthHealthGetResponse200 = {
|
||||
data: unknown;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type healthHealthGetResponseSuccess = healthHealthGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type healthHealthGetResponse = healthHealthGetResponseSuccess;
|
||||
|
||||
export const getHealthHealthGetUrl = () => {
|
||||
return `/health`;
|
||||
};
|
||||
|
||||
export const healthHealthGet = async (
|
||||
options?: RequestInit,
|
||||
): Promise<healthHealthGetResponse> => {
|
||||
return customFetch<healthHealthGetResponse>(getHealthHealthGetUrl(), {
|
||||
...options,
|
||||
method: "GET",
|
||||
});
|
||||
};
|
||||
216
frontend/src/api/generated/hr/hr.ts
Normal file
216
frontend/src/api/generated/hr/hr.ts
Normal file
@@ -0,0 +1,216 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
import type {
|
||||
EmploymentAction,
|
||||
EmploymentActionCreate,
|
||||
HTTPValidationError,
|
||||
HeadcountRequest,
|
||||
HeadcountRequestCreate,
|
||||
HeadcountRequestUpdate,
|
||||
} from ".././model";
|
||||
|
||||
import { customFetch } from "../../mutator";
|
||||
|
||||
/**
|
||||
* @summary List Headcount Requests
|
||||
*/
|
||||
export type listHeadcountRequestsHrHeadcountGetResponse200 = {
|
||||
data: HeadcountRequest[];
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type listHeadcountRequestsHrHeadcountGetResponseSuccess =
|
||||
listHeadcountRequestsHrHeadcountGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type listHeadcountRequestsHrHeadcountGetResponse =
|
||||
listHeadcountRequestsHrHeadcountGetResponseSuccess;
|
||||
|
||||
export const getListHeadcountRequestsHrHeadcountGetUrl = () => {
|
||||
return `/hr/headcount`;
|
||||
};
|
||||
|
||||
export const listHeadcountRequestsHrHeadcountGet = async (
|
||||
options?: RequestInit,
|
||||
): Promise<listHeadcountRequestsHrHeadcountGetResponse> => {
|
||||
return customFetch<listHeadcountRequestsHrHeadcountGetResponse>(
|
||||
getListHeadcountRequestsHrHeadcountGetUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create Headcount Request
|
||||
*/
|
||||
export type createHeadcountRequestHrHeadcountPostResponse200 = {
|
||||
data: HeadcountRequest;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type createHeadcountRequestHrHeadcountPostResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type createHeadcountRequestHrHeadcountPostResponseSuccess =
|
||||
createHeadcountRequestHrHeadcountPostResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type createHeadcountRequestHrHeadcountPostResponseError =
|
||||
createHeadcountRequestHrHeadcountPostResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type createHeadcountRequestHrHeadcountPostResponse =
|
||||
| createHeadcountRequestHrHeadcountPostResponseSuccess
|
||||
| createHeadcountRequestHrHeadcountPostResponseError;
|
||||
|
||||
export const getCreateHeadcountRequestHrHeadcountPostUrl = () => {
|
||||
return `/hr/headcount`;
|
||||
};
|
||||
|
||||
export const createHeadcountRequestHrHeadcountPost = async (
|
||||
headcountRequestCreate: HeadcountRequestCreate,
|
||||
options?: RequestInit,
|
||||
): Promise<createHeadcountRequestHrHeadcountPostResponse> => {
|
||||
return customFetch<createHeadcountRequestHrHeadcountPostResponse>(
|
||||
getCreateHeadcountRequestHrHeadcountPostUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(headcountRequestCreate),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update Headcount Request
|
||||
*/
|
||||
export type updateHeadcountRequestHrHeadcountRequestIdPatchResponse200 = {
|
||||
data: HeadcountRequest;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type updateHeadcountRequestHrHeadcountRequestIdPatchResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type updateHeadcountRequestHrHeadcountRequestIdPatchResponseSuccess =
|
||||
updateHeadcountRequestHrHeadcountRequestIdPatchResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type updateHeadcountRequestHrHeadcountRequestIdPatchResponseError =
|
||||
updateHeadcountRequestHrHeadcountRequestIdPatchResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type updateHeadcountRequestHrHeadcountRequestIdPatchResponse =
|
||||
| updateHeadcountRequestHrHeadcountRequestIdPatchResponseSuccess
|
||||
| updateHeadcountRequestHrHeadcountRequestIdPatchResponseError;
|
||||
|
||||
export const getUpdateHeadcountRequestHrHeadcountRequestIdPatchUrl = (
|
||||
requestId: number,
|
||||
) => {
|
||||
return `/hr/headcount/${requestId}`;
|
||||
};
|
||||
|
||||
export const updateHeadcountRequestHrHeadcountRequestIdPatch = async (
|
||||
requestId: number,
|
||||
headcountRequestUpdate: HeadcountRequestUpdate,
|
||||
options?: RequestInit,
|
||||
): Promise<updateHeadcountRequestHrHeadcountRequestIdPatchResponse> => {
|
||||
return customFetch<updateHeadcountRequestHrHeadcountRequestIdPatchResponse>(
|
||||
getUpdateHeadcountRequestHrHeadcountRequestIdPatchUrl(requestId),
|
||||
{
|
||||
...options,
|
||||
method: "PATCH",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(headcountRequestUpdate),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary List Employment Actions
|
||||
*/
|
||||
export type listEmploymentActionsHrActionsGetResponse200 = {
|
||||
data: EmploymentAction[];
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type listEmploymentActionsHrActionsGetResponseSuccess =
|
||||
listEmploymentActionsHrActionsGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type listEmploymentActionsHrActionsGetResponse =
|
||||
listEmploymentActionsHrActionsGetResponseSuccess;
|
||||
|
||||
export const getListEmploymentActionsHrActionsGetUrl = () => {
|
||||
return `/hr/actions`;
|
||||
};
|
||||
|
||||
export const listEmploymentActionsHrActionsGet = async (
|
||||
options?: RequestInit,
|
||||
): Promise<listEmploymentActionsHrActionsGetResponse> => {
|
||||
return customFetch<listEmploymentActionsHrActionsGetResponse>(
|
||||
getListEmploymentActionsHrActionsGetUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create Employment Action
|
||||
*/
|
||||
export type createEmploymentActionHrActionsPostResponse200 = {
|
||||
data: EmploymentAction;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type createEmploymentActionHrActionsPostResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type createEmploymentActionHrActionsPostResponseSuccess =
|
||||
createEmploymentActionHrActionsPostResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type createEmploymentActionHrActionsPostResponseError =
|
||||
createEmploymentActionHrActionsPostResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type createEmploymentActionHrActionsPostResponse =
|
||||
| createEmploymentActionHrActionsPostResponseSuccess
|
||||
| createEmploymentActionHrActionsPostResponseError;
|
||||
|
||||
export const getCreateEmploymentActionHrActionsPostUrl = () => {
|
||||
return `/hr/actions`;
|
||||
};
|
||||
|
||||
export const createEmploymentActionHrActionsPost = async (
|
||||
employmentActionCreate: EmploymentActionCreate,
|
||||
options?: RequestInit,
|
||||
): Promise<createEmploymentActionHrActionsPostResponse> => {
|
||||
return customFetch<createEmploymentActionHrActionsPostResponse>(
|
||||
getCreateEmploymentActionHrActionsPostUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(employmentActionCreate),
|
||||
},
|
||||
);
|
||||
};
|
||||
12
frontend/src/api/generated/model/department.ts
Normal file
12
frontend/src/api/generated/model/department.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface Department {
|
||||
id?: number | null;
|
||||
name: string;
|
||||
head_employee_id?: number | null;
|
||||
}
|
||||
11
frontend/src/api/generated/model/departmentCreate.ts
Normal file
11
frontend/src/api/generated/model/departmentCreate.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface DepartmentCreate {
|
||||
name: string;
|
||||
head_employee_id?: number | null;
|
||||
}
|
||||
11
frontend/src/api/generated/model/departmentUpdate.ts
Normal file
11
frontend/src/api/generated/model/departmentUpdate.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface DepartmentUpdate {
|
||||
name?: string | null;
|
||||
head_employee_id?: number | null;
|
||||
}
|
||||
16
frontend/src/api/generated/model/employee.ts
Normal file
16
frontend/src/api/generated/model/employee.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface Employee {
|
||||
id?: number | null;
|
||||
name: string;
|
||||
employee_type: string;
|
||||
department_id?: number | null;
|
||||
manager_id?: number | null;
|
||||
title?: string | null;
|
||||
status?: string;
|
||||
}
|
||||
15
frontend/src/api/generated/model/employeeCreate.ts
Normal file
15
frontend/src/api/generated/model/employeeCreate.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface EmployeeCreate {
|
||||
name: string;
|
||||
employee_type: string;
|
||||
department_id?: number | null;
|
||||
manager_id?: number | null;
|
||||
title?: string | null;
|
||||
status?: string;
|
||||
}
|
||||
15
frontend/src/api/generated/model/employeeUpdate.ts
Normal file
15
frontend/src/api/generated/model/employeeUpdate.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface EmployeeUpdate {
|
||||
name?: string | null;
|
||||
employee_type?: string | null;
|
||||
department_id?: number | null;
|
||||
manager_id?: number | null;
|
||||
title?: string | null;
|
||||
status?: string | null;
|
||||
}
|
||||
15
frontend/src/api/generated/model/employmentAction.ts
Normal file
15
frontend/src/api/generated/model/employmentAction.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface EmploymentAction {
|
||||
id?: number | null;
|
||||
employee_id: number;
|
||||
issued_by_employee_id: number;
|
||||
action_type: string;
|
||||
notes?: string | null;
|
||||
created_at?: string;
|
||||
}
|
||||
13
frontend/src/api/generated/model/employmentActionCreate.ts
Normal file
13
frontend/src/api/generated/model/employmentActionCreate.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface EmploymentActionCreate {
|
||||
employee_id: number;
|
||||
issued_by_employee_id: number;
|
||||
action_type: string;
|
||||
notes?: string | null;
|
||||
}
|
||||
11
frontend/src/api/generated/model/hTTPValidationError.ts
Normal file
11
frontend/src/api/generated/model/hTTPValidationError.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
import type { ValidationError } from "./validationError";
|
||||
|
||||
export interface HTTPValidationError {
|
||||
detail?: ValidationError[];
|
||||
}
|
||||
18
frontend/src/api/generated/model/headcountRequest.ts
Normal file
18
frontend/src/api/generated/model/headcountRequest.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface HeadcountRequest {
|
||||
id?: number | null;
|
||||
department_id: number;
|
||||
requested_by_manager_id: number;
|
||||
role_title: string;
|
||||
employee_type: string;
|
||||
quantity?: number;
|
||||
justification?: string | null;
|
||||
status?: string;
|
||||
created_at?: string;
|
||||
}
|
||||
15
frontend/src/api/generated/model/headcountRequestCreate.ts
Normal file
15
frontend/src/api/generated/model/headcountRequestCreate.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface HeadcountRequestCreate {
|
||||
department_id: number;
|
||||
requested_by_manager_id: number;
|
||||
role_title: string;
|
||||
employee_type: string;
|
||||
quantity?: number;
|
||||
justification?: string | null;
|
||||
}
|
||||
11
frontend/src/api/generated/model/headcountRequestUpdate.ts
Normal file
11
frontend/src/api/generated/model/headcountRequestUpdate.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface HeadcountRequestUpdate {
|
||||
status?: string | null;
|
||||
justification?: string | null;
|
||||
}
|
||||
31
frontend/src/api/generated/model/index.ts
Normal file
31
frontend/src/api/generated/model/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export * from "./department";
|
||||
export * from "./departmentCreate";
|
||||
export * from "./departmentUpdate";
|
||||
export * from "./employee";
|
||||
export * from "./employeeCreate";
|
||||
export * from "./employeeUpdate";
|
||||
export * from "./employmentAction";
|
||||
export * from "./employmentActionCreate";
|
||||
export * from "./headcountRequest";
|
||||
export * from "./headcountRequestCreate";
|
||||
export * from "./headcountRequestUpdate";
|
||||
export * from "./hTTPValidationError";
|
||||
export * from "./listActivitiesActivitiesGetParams";
|
||||
export * from "./listTaskCommentsTaskCommentsGetParams";
|
||||
export * from "./listTasksTasksGetParams";
|
||||
export * from "./project";
|
||||
export * from "./projectCreate";
|
||||
export * from "./projectUpdate";
|
||||
export * from "./task";
|
||||
export * from "./taskComment";
|
||||
export * from "./taskCommentCreate";
|
||||
export * from "./taskCreate";
|
||||
export * from "./taskUpdate";
|
||||
export * from "./validationError";
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export type ListActivitiesActivitiesGetParams = {
|
||||
limit?: number;
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export type ListTaskCommentsTaskCommentsGetParams = {
|
||||
task_id: number;
|
||||
};
|
||||
10
frontend/src/api/generated/model/listTasksTasksGetParams.ts
Normal file
10
frontend/src/api/generated/model/listTasksTasksGetParams.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export type ListTasksTasksGetParams = {
|
||||
project_id?: number | null;
|
||||
};
|
||||
12
frontend/src/api/generated/model/project.ts
Normal file
12
frontend/src/api/generated/model/project.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface Project {
|
||||
id?: number | null;
|
||||
name: string;
|
||||
status?: string;
|
||||
}
|
||||
11
frontend/src/api/generated/model/projectCreate.ts
Normal file
11
frontend/src/api/generated/model/projectCreate.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface ProjectCreate {
|
||||
name: string;
|
||||
status?: string;
|
||||
}
|
||||
11
frontend/src/api/generated/model/projectUpdate.ts
Normal file
11
frontend/src/api/generated/model/projectUpdate.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface ProjectUpdate {
|
||||
name?: string | null;
|
||||
status?: string | null;
|
||||
}
|
||||
19
frontend/src/api/generated/model/task.ts
Normal file
19
frontend/src/api/generated/model/task.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface Task {
|
||||
id?: number | null;
|
||||
project_id: number;
|
||||
title: string;
|
||||
description?: string | null;
|
||||
status?: string;
|
||||
assignee_employee_id?: number | null;
|
||||
reviewer_employee_id?: number | null;
|
||||
created_by_employee_id?: number | null;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
}
|
||||
14
frontend/src/api/generated/model/taskComment.ts
Normal file
14
frontend/src/api/generated/model/taskComment.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface TaskComment {
|
||||
id?: number | null;
|
||||
task_id: number;
|
||||
author_employee_id?: number | null;
|
||||
body: string;
|
||||
created_at?: string;
|
||||
}
|
||||
12
frontend/src/api/generated/model/taskCommentCreate.ts
Normal file
12
frontend/src/api/generated/model/taskCommentCreate.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface TaskCommentCreate {
|
||||
task_id: number;
|
||||
author_employee_id?: number | null;
|
||||
body: string;
|
||||
}
|
||||
16
frontend/src/api/generated/model/taskCreate.ts
Normal file
16
frontend/src/api/generated/model/taskCreate.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface TaskCreate {
|
||||
project_id: number;
|
||||
title: string;
|
||||
description?: string | null;
|
||||
status?: string;
|
||||
assignee_employee_id?: number | null;
|
||||
reviewer_employee_id?: number | null;
|
||||
created_by_employee_id?: number | null;
|
||||
}
|
||||
14
frontend/src/api/generated/model/taskUpdate.ts
Normal file
14
frontend/src/api/generated/model/taskUpdate.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface TaskUpdate {
|
||||
title?: string | null;
|
||||
description?: string | null;
|
||||
status?: string | null;
|
||||
assignee_employee_id?: number | null;
|
||||
reviewer_employee_id?: number | null;
|
||||
}
|
||||
12
frontend/src/api/generated/model/validationError.ts
Normal file
12
frontend/src/api/generated/model/validationError.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
|
||||
export interface ValidationError {
|
||||
loc: (string | number)[];
|
||||
msg: string;
|
||||
type: string;
|
||||
}
|
||||
265
frontend/src/api/generated/org/org.ts
Normal file
265
frontend/src/api/generated/org/org.ts
Normal 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),
|
||||
},
|
||||
);
|
||||
};
|
||||
138
frontend/src/api/generated/projects/projects.ts
Normal file
138
frontend/src/api/generated/projects/projects.ts
Normal file
@@ -0,0 +1,138 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
import type {
|
||||
HTTPValidationError,
|
||||
Project,
|
||||
ProjectCreate,
|
||||
ProjectUpdate,
|
||||
} from ".././model";
|
||||
|
||||
import { customFetch } from "../../mutator";
|
||||
|
||||
/**
|
||||
* @summary List Projects
|
||||
*/
|
||||
export type listProjectsProjectsGetResponse200 = {
|
||||
data: Project[];
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type listProjectsProjectsGetResponseSuccess =
|
||||
listProjectsProjectsGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type listProjectsProjectsGetResponse =
|
||||
listProjectsProjectsGetResponseSuccess;
|
||||
|
||||
export const getListProjectsProjectsGetUrl = () => {
|
||||
return `/projects`;
|
||||
};
|
||||
|
||||
export const listProjectsProjectsGet = async (
|
||||
options?: RequestInit,
|
||||
): Promise<listProjectsProjectsGetResponse> => {
|
||||
return customFetch<listProjectsProjectsGetResponse>(
|
||||
getListProjectsProjectsGetUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create Project
|
||||
*/
|
||||
export type createProjectProjectsPostResponse200 = {
|
||||
data: Project;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type createProjectProjectsPostResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type createProjectProjectsPostResponseSuccess =
|
||||
createProjectProjectsPostResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type createProjectProjectsPostResponseError =
|
||||
createProjectProjectsPostResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type createProjectProjectsPostResponse =
|
||||
| createProjectProjectsPostResponseSuccess
|
||||
| createProjectProjectsPostResponseError;
|
||||
|
||||
export const getCreateProjectProjectsPostUrl = () => {
|
||||
return `/projects`;
|
||||
};
|
||||
|
||||
export const createProjectProjectsPost = async (
|
||||
projectCreate: ProjectCreate,
|
||||
options?: RequestInit,
|
||||
): Promise<createProjectProjectsPostResponse> => {
|
||||
return customFetch<createProjectProjectsPostResponse>(
|
||||
getCreateProjectProjectsPostUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(projectCreate),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update Project
|
||||
*/
|
||||
export type updateProjectProjectsProjectIdPatchResponse200 = {
|
||||
data: Project;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type updateProjectProjectsProjectIdPatchResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type updateProjectProjectsProjectIdPatchResponseSuccess =
|
||||
updateProjectProjectsProjectIdPatchResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type updateProjectProjectsProjectIdPatchResponseError =
|
||||
updateProjectProjectsProjectIdPatchResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type updateProjectProjectsProjectIdPatchResponse =
|
||||
| updateProjectProjectsProjectIdPatchResponseSuccess
|
||||
| updateProjectProjectsProjectIdPatchResponseError;
|
||||
|
||||
export const getUpdateProjectProjectsProjectIdPatchUrl = (
|
||||
projectId: number,
|
||||
) => {
|
||||
return `/projects/${projectId}`;
|
||||
};
|
||||
|
||||
export const updateProjectProjectsProjectIdPatch = async (
|
||||
projectId: number,
|
||||
projectUpdate: ProjectUpdate,
|
||||
options?: RequestInit,
|
||||
): Promise<updateProjectProjectsProjectIdPatchResponse> => {
|
||||
return customFetch<updateProjectProjectsProjectIdPatchResponse>(
|
||||
getUpdateProjectProjectsProjectIdPatchUrl(projectId),
|
||||
{
|
||||
...options,
|
||||
method: "PATCH",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(projectUpdate),
|
||||
},
|
||||
);
|
||||
};
|
||||
304
frontend/src/api/generated/work/work.ts
Normal file
304
frontend/src/api/generated/work/work.ts
Normal file
@@ -0,0 +1,304 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenClaw Agency API
|
||||
* OpenAPI spec version: 0.3.0
|
||||
*/
|
||||
import type {
|
||||
HTTPValidationError,
|
||||
ListTaskCommentsTaskCommentsGetParams,
|
||||
ListTasksTasksGetParams,
|
||||
Task,
|
||||
TaskComment,
|
||||
TaskCommentCreate,
|
||||
TaskCreate,
|
||||
TaskUpdate,
|
||||
} from ".././model";
|
||||
|
||||
import { customFetch } from "../../mutator";
|
||||
|
||||
/**
|
||||
* @summary List Tasks
|
||||
*/
|
||||
export type listTasksTasksGetResponse200 = {
|
||||
data: Task[];
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type listTasksTasksGetResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type listTasksTasksGetResponseSuccess = listTasksTasksGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type listTasksTasksGetResponseError = listTasksTasksGetResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type listTasksTasksGetResponse =
|
||||
| listTasksTasksGetResponseSuccess
|
||||
| listTasksTasksGetResponseError;
|
||||
|
||||
export const getListTasksTasksGetUrl = (params?: ListTasksTasksGetParams) => {
|
||||
const normalizedParams = new URLSearchParams();
|
||||
|
||||
Object.entries(params || {}).forEach(([key, value]) => {
|
||||
if (value !== undefined) {
|
||||
normalizedParams.append(key, value === null ? "null" : value.toString());
|
||||
}
|
||||
});
|
||||
|
||||
const stringifiedParams = normalizedParams.toString();
|
||||
|
||||
return stringifiedParams.length > 0
|
||||
? `/tasks?${stringifiedParams}`
|
||||
: `/tasks`;
|
||||
};
|
||||
|
||||
export const listTasksTasksGet = async (
|
||||
params?: ListTasksTasksGetParams,
|
||||
options?: RequestInit,
|
||||
): Promise<listTasksTasksGetResponse> => {
|
||||
return customFetch<listTasksTasksGetResponse>(
|
||||
getListTasksTasksGetUrl(params),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create Task
|
||||
*/
|
||||
export type createTaskTasksPostResponse200 = {
|
||||
data: Task;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type createTaskTasksPostResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type createTaskTasksPostResponseSuccess =
|
||||
createTaskTasksPostResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type createTaskTasksPostResponseError =
|
||||
createTaskTasksPostResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type createTaskTasksPostResponse =
|
||||
| createTaskTasksPostResponseSuccess
|
||||
| createTaskTasksPostResponseError;
|
||||
|
||||
export const getCreateTaskTasksPostUrl = () => {
|
||||
return `/tasks`;
|
||||
};
|
||||
|
||||
export const createTaskTasksPost = async (
|
||||
taskCreate: TaskCreate,
|
||||
options?: RequestInit,
|
||||
): Promise<createTaskTasksPostResponse> => {
|
||||
return customFetch<createTaskTasksPostResponse>(getCreateTaskTasksPostUrl(), {
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(taskCreate),
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update Task
|
||||
*/
|
||||
export type updateTaskTasksTaskIdPatchResponse200 = {
|
||||
data: Task;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type updateTaskTasksTaskIdPatchResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type updateTaskTasksTaskIdPatchResponseSuccess =
|
||||
updateTaskTasksTaskIdPatchResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type updateTaskTasksTaskIdPatchResponseError =
|
||||
updateTaskTasksTaskIdPatchResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type updateTaskTasksTaskIdPatchResponse =
|
||||
| updateTaskTasksTaskIdPatchResponseSuccess
|
||||
| updateTaskTasksTaskIdPatchResponseError;
|
||||
|
||||
export const getUpdateTaskTasksTaskIdPatchUrl = (taskId: number) => {
|
||||
return `/tasks/${taskId}`;
|
||||
};
|
||||
|
||||
export const updateTaskTasksTaskIdPatch = async (
|
||||
taskId: number,
|
||||
taskUpdate: TaskUpdate,
|
||||
options?: RequestInit,
|
||||
): Promise<updateTaskTasksTaskIdPatchResponse> => {
|
||||
return customFetch<updateTaskTasksTaskIdPatchResponse>(
|
||||
getUpdateTaskTasksTaskIdPatchUrl(taskId),
|
||||
{
|
||||
...options,
|
||||
method: "PATCH",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(taskUpdate),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Delete Task
|
||||
*/
|
||||
export type deleteTaskTasksTaskIdDeleteResponse200 = {
|
||||
data: unknown;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type deleteTaskTasksTaskIdDeleteResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type deleteTaskTasksTaskIdDeleteResponseSuccess =
|
||||
deleteTaskTasksTaskIdDeleteResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type deleteTaskTasksTaskIdDeleteResponseError =
|
||||
deleteTaskTasksTaskIdDeleteResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type deleteTaskTasksTaskIdDeleteResponse =
|
||||
| deleteTaskTasksTaskIdDeleteResponseSuccess
|
||||
| deleteTaskTasksTaskIdDeleteResponseError;
|
||||
|
||||
export const getDeleteTaskTasksTaskIdDeleteUrl = (taskId: number) => {
|
||||
return `/tasks/${taskId}`;
|
||||
};
|
||||
|
||||
export const deleteTaskTasksTaskIdDelete = async (
|
||||
taskId: number,
|
||||
options?: RequestInit,
|
||||
): Promise<deleteTaskTasksTaskIdDeleteResponse> => {
|
||||
return customFetch<deleteTaskTasksTaskIdDeleteResponse>(
|
||||
getDeleteTaskTasksTaskIdDeleteUrl(taskId),
|
||||
{
|
||||
...options,
|
||||
method: "DELETE",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary List Task Comments
|
||||
*/
|
||||
export type listTaskCommentsTaskCommentsGetResponse200 = {
|
||||
data: TaskComment[];
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type listTaskCommentsTaskCommentsGetResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type listTaskCommentsTaskCommentsGetResponseSuccess =
|
||||
listTaskCommentsTaskCommentsGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type listTaskCommentsTaskCommentsGetResponseError =
|
||||
listTaskCommentsTaskCommentsGetResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type listTaskCommentsTaskCommentsGetResponse =
|
||||
| listTaskCommentsTaskCommentsGetResponseSuccess
|
||||
| listTaskCommentsTaskCommentsGetResponseError;
|
||||
|
||||
export const getListTaskCommentsTaskCommentsGetUrl = (
|
||||
params: ListTaskCommentsTaskCommentsGetParams,
|
||||
) => {
|
||||
const normalizedParams = new URLSearchParams();
|
||||
|
||||
Object.entries(params || {}).forEach(([key, value]) => {
|
||||
if (value !== undefined) {
|
||||
normalizedParams.append(key, value === null ? "null" : value.toString());
|
||||
}
|
||||
});
|
||||
|
||||
const stringifiedParams = normalizedParams.toString();
|
||||
|
||||
return stringifiedParams.length > 0
|
||||
? `/task-comments?${stringifiedParams}`
|
||||
: `/task-comments`;
|
||||
};
|
||||
|
||||
export const listTaskCommentsTaskCommentsGet = async (
|
||||
params: ListTaskCommentsTaskCommentsGetParams,
|
||||
options?: RequestInit,
|
||||
): Promise<listTaskCommentsTaskCommentsGetResponse> => {
|
||||
return customFetch<listTaskCommentsTaskCommentsGetResponse>(
|
||||
getListTaskCommentsTaskCommentsGetUrl(params),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create Task Comment
|
||||
*/
|
||||
export type createTaskCommentTaskCommentsPostResponse200 = {
|
||||
data: TaskComment;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type createTaskCommentTaskCommentsPostResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type createTaskCommentTaskCommentsPostResponseSuccess =
|
||||
createTaskCommentTaskCommentsPostResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type createTaskCommentTaskCommentsPostResponseError =
|
||||
createTaskCommentTaskCommentsPostResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type createTaskCommentTaskCommentsPostResponse =
|
||||
| createTaskCommentTaskCommentsPostResponseSuccess
|
||||
| createTaskCommentTaskCommentsPostResponseError;
|
||||
|
||||
export const getCreateTaskCommentTaskCommentsPostUrl = () => {
|
||||
return `/task-comments`;
|
||||
};
|
||||
|
||||
export const createTaskCommentTaskCommentsPost = async (
|
||||
taskCommentCreate: TaskCommentCreate,
|
||||
options?: RequestInit,
|
||||
): Promise<createTaskCommentTaskCommentsPostResponse> => {
|
||||
return customFetch<createTaskCommentTaskCommentsPostResponse>(
|
||||
getCreateTaskCommentTaskCommentsPostUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(taskCommentCreate),
|
||||
},
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user