list users
This commit is contained in:
7
frontend/shared/types/api.ts
Normal file
7
frontend/shared/types/api.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export type ApiResponse<T> = {
|
||||
status: number;
|
||||
data: T;
|
||||
};
|
||||
|
||||
// TODO: Fix
|
||||
export type ApiError = string;
|
||||
18
frontend/shared/types/auth.ts
Normal file
18
frontend/shared/types/auth.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
export type AuthSessionType = 'WarrenAuth';
|
||||
export interface AuthSession {
|
||||
type: AuthSessionType;
|
||||
id: string;
|
||||
|
||||
user: AuthUser;
|
||||
expiresAt: number;
|
||||
}
|
||||
|
||||
export interface AuthUser extends AuthUserFields {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface AuthUserFields {
|
||||
name: string;
|
||||
email: string;
|
||||
admin: boolean;
|
||||
}
|
||||
25
frontend/shared/types/index.ts
Normal file
25
frontend/shared/types/index.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
export type FileType = 'file' | 'directory';
|
||||
|
||||
export type BreadcrumbData = {
|
||||
name: string;
|
||||
href: string;
|
||||
};
|
||||
|
||||
export type DirectoryEntry = {
|
||||
name: string;
|
||||
fileType: FileType;
|
||||
mimeType: string | null;
|
||||
/// Timestamp in seconds
|
||||
createdAt: number | null;
|
||||
};
|
||||
|
||||
export type UploadStatus =
|
||||
| 'not_uploaded'
|
||||
| 'uploading'
|
||||
| 'completed'
|
||||
| 'failed';
|
||||
|
||||
export type UploadFile = {
|
||||
status: UploadStatus;
|
||||
data: File;
|
||||
};
|
||||
4
frontend/shared/types/warrens.ts
Normal file
4
frontend/shared/types/warrens.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export type Warren = {
|
||||
id: string;
|
||||
name: string;
|
||||
};
|
||||
Reference in New Issue
Block a user