mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-07 13:42:34 +00:00
chore: init web project
This commit is contained in:
13
web/src/types/common.d.ts
vendored
Normal file
13
web/src/types/common.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
type BasicType = undefined | null | boolean | number | string | Record<string, unknown> | Array<BasicType>;
|
||||
|
||||
type DateStamp = number;
|
||||
|
||||
type TimeStamp = number;
|
||||
|
||||
type FunctionType = (...args: unknown[]) => unknown;
|
||||
|
||||
interface KVObject<T = any> {
|
||||
[key: string]: T;
|
||||
}
|
||||
|
||||
type Option<T> = T | undefined;
|
1
web/src/types/modules/common.d.ts
vendored
Normal file
1
web/src/types/modules/common.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
type RowStatus = "NORMAL" | "ARCHIVED";
|
38
web/src/types/modules/shortcut.d.ts
vendored
Normal file
38
web/src/types/modules/shortcut.d.ts
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
type ShortcutId = number;
|
||||
|
||||
type Visibility = "PRIVATE" | "WORKSPACE";
|
||||
|
||||
interface Shortcut {
|
||||
id: ShortcutId;
|
||||
|
||||
creatorId: UserId;
|
||||
createdTs: TimeStamp;
|
||||
updatedTs: TimeStamp;
|
||||
workspaceId: WorkspaceId;
|
||||
rowStatus: RowStatus;
|
||||
|
||||
name: string;
|
||||
link: string;
|
||||
visibility: Visibility;
|
||||
}
|
||||
|
||||
interface ShortcutCreate {
|
||||
workspaceId: WorkspaceId;
|
||||
|
||||
name: string;
|
||||
link: string;
|
||||
visibility: Visibility;
|
||||
}
|
||||
|
||||
interface ShortcutPatch {
|
||||
id: ShortcutId;
|
||||
|
||||
name?: string;
|
||||
link?: string;
|
||||
visibility?: Visibility;
|
||||
}
|
||||
|
||||
interface ShortcutFind {
|
||||
creatorId?: UserId;
|
||||
workspaceId?: WorkspaceId;
|
||||
}
|
8
web/src/types/modules/system.d.ts
vendored
Normal file
8
web/src/types/modules/system.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
interface Profile {
|
||||
mode: string;
|
||||
version: string;
|
||||
}
|
||||
|
||||
interface SystemStatus {
|
||||
profile: Profile;
|
||||
}
|
31
web/src/types/modules/user.d.ts
vendored
Normal file
31
web/src/types/modules/user.d.ts
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
type UserId = number;
|
||||
|
||||
interface User {
|
||||
id: UserId;
|
||||
|
||||
createdTs: TimeStamp;
|
||||
updatedTs: TimeStamp;
|
||||
rowStatus: RowStatus;
|
||||
|
||||
email: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
interface UserCreate {
|
||||
email: string;
|
||||
password: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
interface UserPatch {
|
||||
id: UserId;
|
||||
|
||||
rowStatus?: RowStatus;
|
||||
|
||||
name?: string;
|
||||
password?: string;
|
||||
}
|
||||
|
||||
interface UserDelete {
|
||||
id: UserId;
|
||||
}
|
30
web/src/types/modules/workspace.d.ts
vendored
Normal file
30
web/src/types/modules/workspace.d.ts
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
type WorkspaceId = number;
|
||||
|
||||
interface Workspace {
|
||||
id: WorkspaceId;
|
||||
|
||||
creatorId: UserId;
|
||||
createdTs: TimeStamp;
|
||||
updatedTs: TimeStamp;
|
||||
rowStatus: RowStatus;
|
||||
|
||||
name: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
interface WorkspaceCreate {
|
||||
name: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
interface WorkspacePatch {
|
||||
id: WorkspaceId;
|
||||
rowStatus?: RowStatus;
|
||||
name?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
interface WorkspaceFind {
|
||||
creatorId?: UserId;
|
||||
memberId?: UserId;
|
||||
}
|
7
web/src/types/view.d.ts
vendored
Normal file
7
web/src/types/view.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
interface DialogProps {
|
||||
destroy: FunctionType;
|
||||
}
|
||||
|
||||
interface DialogCallback {
|
||||
destroy: FunctionType;
|
||||
}
|
Reference in New Issue
Block a user