Initial Commit

This commit is contained in:
Xyroscar
2024-11-06 19:31:39 +05:30
commit 2e29a1cb82
74 changed files with 10837 additions and 0 deletions

58
src/types/index.ts Normal file
View File

@@ -0,0 +1,58 @@
export interface Variable {
id: string;
name: string;
value: string;
description?: string;
}
export interface Collection {
id: string;
workspace_id: string;
name: string;
description?: string;
created_at: number;
updated_at: number;
requests: Request[];
}
export interface Request {
id: string;
name: string;
url: string;
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
headers: Header[];
queryParams: QueryParam[];
body?: string;
}
export interface Header {
id: string;
key: string;
value: string;
enabled: boolean;
}
export interface QueryParam {
id: string;
key: string;
value: string;
enabled: boolean;
}
export interface RequestResponse {
status: number;
statusText: string;
headers: Record<string, string>;
body: any;
time: number;
}
export interface Workspace {
id: string;
name: string;
variables?: Variable[];
collections?: Collection[];
description?: string;
created_at: number;
updated_at: number;
}