This commit is contained in:
Mikan
2025-05-30 19:32:58 +03:00
parent 93471d038a
commit 90d12b57ec
25 changed files with 3395 additions and 180 deletions

13
src/types/api.ts Normal file
View File

@@ -0,0 +1,13 @@
export interface ApiResponse {
body?: object,
success: boolean
}
export interface PageResponse<T>{
count: number;
next?: string;
previous?: string;
results: T[]
}

12
src/types/common.ts Normal file
View File

@@ -0,0 +1,12 @@
export interface UniqueItem{
id: number;
}
export interface PageControl<T>{
items: T[] | null;
hasNext: boolean;
hasPrevious: boolean;
nextPage(): void;
previousPage(): void;
}

7
src/types/survey.ts Normal file
View File

@@ -0,0 +1,7 @@
import {UniqueItem} from "./common.ts";
export interface Survey extends UniqueItem{
title: string;
}