-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevents.d.ts
104 lines (103 loc) · 2.06 KB
/
events.d.ts
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// AUTO-GENERATED by typescript-type-def
export type I32 = number;
export type Usize = number;
export type ValuePathComponent = ({
"Key": string;
} | {
"Index": Usize;
});
export type ValuePath = {
"path": (ValuePathComponent)[];
};
export type F64 = number;
export type DateTime = {
"raw": string;
};
export type File = {
"sha": string;
"name": (string | null);
"description": (string | null);
"filename": string;
"mime": string;
"display_type": "image"|"audio"|"video"|"upload";
"url": string;
};
export type MetaValue = ({
"String": string;
} | {
"Number": F64;
} | {
"Boolean": boolean;
} | {
"DateTime": DateTime;
} | {
"Array": MetaValue[];
} | {
"Map": Record<string, MetaValue>;
});
export type Meta = Record<string, MetaValue>;
export type FieldValue = ({
"String": string;
} | {
"Markdown": string;
} | {
"Number": F64;
} | {
"Date": DateTime;
} | {
"Objects": Record<string, FieldValue>[];
} | {
"Boolean": boolean;
} | {
"File": File;
} | {
"Meta": Meta;
});
export type AddObjectValue = {
"path": ValuePath;
"value": FieldValue;
};
export type AddObjectEvent = {
"object": string;
"filename": string;
"order": I32;
"values": (AddObjectValue)[];
};
export type DeleteObjectEvent = {
"object": string;
"filename": string;
"source": (string | null);
};
export type EditFieldEvent = {
"object": string;
"filename": string;
"path": ValuePath;
"field": string;
"value": (FieldValue | null);
"source": (string | null);
};
export type EditOrderEvent = {
"object": string;
"filename": string;
"order": I32;
"source": (string | null);
};
export type ChildEvent = {
"object": string;
"filename": string;
"path": ValuePath;
"source": (string | null);
};
export type ArchivalEvent = ({
"AddObject": AddObjectEvent;
} | {
"DeleteObject": DeleteObjectEvent;
} | {
"EditField": EditFieldEvent;
} | {
"EditOrder": EditOrderEvent;
} | {
"AddChild": ChildEvent;
} | {
"RemoveChild": ChildEvent;
});