-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypings.d.ts
More file actions
88 lines (80 loc) · 1.71 KB
/
typings.d.ts
File metadata and controls
88 lines (80 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
declare module '*.less' {
const resource: { [key: string]: any };
export default resource;
};
/**
* @param name 中文名
* @param username 邮箱前缀
* @param orgDisplayName 部门名称
* @param thumbnailAvatarUrl 头像缩略图
*/
interface T_At {
id: string;
name: string;
username: string;
thumbnailAvatarUrl: string;
orgDisplayName: string;
};
type T_Ats = Array<T_At>;
type T_ChangeType = undefined | 'addComment' | 'updateComment' | 'deleteComment'
interface T_Notes {
id: string;
innerText: string;
innerHTML: string;
operationTime: number | null;
operator: {
username: string;
name: string;
thumbnailAvatarUrl: string;
email: string;
}
ats?: T_Ats;
changeInfo?: T_ChangeInfo;
};
interface T_Operation {
type: T_ChangeType
}
interface T_Data {
id: string;
notesMap: {
[key: string]: T_Notes | Array<T_Notes>;
};
operationMap: {
[key: string]: {
[key: string]: T_Operation
};
};
};
interface AtEmailData {
/** 主题 */
subject: string;
/** 接收用户邮箱 */
to: string[];
/** 评论内容 */
body: string;
/** 评论这条艾特消息的用户邮箱 */
from: string;
extra: {
noteId: noteId,
/** 评论时间 */
commentTime: number
}
}
interface T_AppCtx {
file: {
name: string;
};
user: {
name: string;
avatar: string;
email: string;
userId: string;
userName: string;
id: number;
};
onUpload: (file: File) => any;
onSearchUser: (keyword: string) => any;
onAtsEmail: ({ subject, to, body, extra, from }) => any
};
type T_BtnClickType = 'submit' | 'cancel' | 'edit' | 'delete' | 'comment';
type T_EventType = T_BtnClickType | 'add' | 'blurSave';