feat: add boards and tasks management endpoints

This commit is contained in:
Abhimanyu Saharan
2026-02-04 02:28:51 +05:30
parent 23faa0865b
commit 1abc8f68f3
170 changed files with 6860 additions and 10706 deletions

View File

@@ -1,23 +0,0 @@
// NOTE:
// Orval-generated hooks already return strongly-typed arrays for most endpoints.
// We keep only the Activity type + a tiny normalizer here because Activity is not
// currently generated as a model.
export type Activity = {
id?: number;
actor_employee_id?: number | null;
entity_type?: string;
entity_id?: number | null;
verb?: string;
payload?: unknown;
created_at?: string;
};
export function normalizeActivities(data: unknown): Activity[] {
if (Array.isArray(data)) return data as Activity[];
if (data && typeof data === "object" && "data" in data) {
const maybe = (data as { data?: unknown }).data;
if (Array.isArray(maybe)) return maybe as Activity[];
}
return [];
}