mgtypes 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/Configuration.ts +27 -3
- package/types/Content.ts +14 -29
- package/types/Emergency.ts +1 -2
- package/types/Tag.ts +2 -6
- package/types/User.ts +5 -6
- package/types/Vote.ts +2 -4
package/package.json
CHANGED
package/types/Configuration.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Position } from 'geojson';
|
|
2
2
|
import { MapSign } from './App';
|
|
3
3
|
|
|
4
|
-
interface Configuration {
|
|
4
|
+
export interface Configuration {
|
|
5
5
|
eventSpecs: EventSpecs;
|
|
6
6
|
eventColors: EventColors;
|
|
7
|
+
eventFonts: EventFonts;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
export interface EventSpecs {
|
|
@@ -40,7 +41,7 @@ export interface EventColors {
|
|
|
40
41
|
onPrimary: string;
|
|
41
42
|
primaryContainer: string;
|
|
42
43
|
onPrimaryContainer: string;
|
|
43
|
-
onPrimaryContainerUnselected:string;
|
|
44
|
+
onPrimaryContainerUnselected: string;
|
|
44
45
|
secondary: string;
|
|
45
46
|
onSecondary: string;
|
|
46
47
|
secondaryContainer: string;
|
|
@@ -79,4 +80,27 @@ export interface EventColors {
|
|
|
79
80
|
backdrop: string;
|
|
80
81
|
}
|
|
81
82
|
|
|
82
|
-
|
|
83
|
+
interface MGFontTextStyle {
|
|
84
|
+
fontFamily?: string;
|
|
85
|
+
fontWeight?: '200' | '300' | '400' | '500' | '700';
|
|
86
|
+
letterSpacing?: number;
|
|
87
|
+
fontSize?: number;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface EventFonts {
|
|
91
|
+
labelLarge: MGFontTextStyle;
|
|
92
|
+
labelMedium: MGFontTextStyle;
|
|
93
|
+
labelSmall: MGFontTextStyle;
|
|
94
|
+
bodyLarge: MGFontTextStyle;
|
|
95
|
+
bodyMedium: MGFontTextStyle;
|
|
96
|
+
displayMedium: MGFontTextStyle;
|
|
97
|
+
displaySmall: MGFontTextStyle;
|
|
98
|
+
headlineSmall: MGFontTextStyle;
|
|
99
|
+
default: MGFontTextStyle;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface EventStyles {
|
|
103
|
+
borderRadius: 'none' | 'small' | 'large',
|
|
104
|
+
borderWidth: 'none' | 'thin' | 'normal' | 'thick',
|
|
105
|
+
shadow: 'none' | 'small' | 'large'
|
|
106
|
+
}
|
package/types/Content.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { Position } from 'geojson';
|
|
|
6
6
|
|
|
7
7
|
// shared posts will have sharedContentDetails, normal posts won't have sCD. Posts with threads attached have children; thread tracks who added and where a threaded post goes. A plan may have UserPlan details that indicate if user is attending the plan
|
|
8
8
|
|
|
9
|
-
interface AllAppContent {
|
|
9
|
+
export interface AllAppContent {
|
|
10
10
|
feedData: {
|
|
11
11
|
mainContent: { order: number[]; content: { [contentId: string]: Post } };
|
|
12
12
|
sharedContent: { order: number[]; content: { [contentId: string]: Post } };
|
|
@@ -32,11 +32,11 @@ interface AllAppContent {
|
|
|
32
32
|
emergencies: Emergency[];
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
interface PostWithIndex {
|
|
35
|
+
export interface PostWithIndex {
|
|
36
36
|
[contentId: string]: Post;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
interface Post {
|
|
39
|
+
export interface Post {
|
|
40
40
|
content: Content;
|
|
41
41
|
contentable: Contentable;
|
|
42
42
|
user: User;
|
|
@@ -51,7 +51,7 @@ interface Post {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
// indicates who embedded a piece of content: used for ThreadModal
|
|
54
|
-
interface Thread {
|
|
54
|
+
export interface Thread {
|
|
55
55
|
id: number;
|
|
56
56
|
parentId: number;
|
|
57
57
|
childId: number;
|
|
@@ -61,7 +61,7 @@ interface Thread {
|
|
|
61
61
|
threader: User;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
interface Content {
|
|
64
|
+
export interface Content {
|
|
65
65
|
id: number;
|
|
66
66
|
latitude: number | string; // should be a number but is coming back from db as a string for some reason
|
|
67
67
|
longitude: number | string; // same as above
|
|
@@ -86,7 +86,7 @@ interface Content {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
// Covers all different content types (pin, plan, comment, photo) coming in from server
|
|
89
|
-
interface Contentable {
|
|
89
|
+
export interface Contentable {
|
|
90
90
|
id: number;
|
|
91
91
|
primaryText: string;
|
|
92
92
|
secondaryText?: string;
|
|
@@ -130,7 +130,7 @@ interface Contentable {
|
|
|
130
130
|
embeddedContentId: number;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
interface PinHour {
|
|
133
|
+
export interface PinHour {
|
|
134
134
|
id: number;
|
|
135
135
|
openDateTime: string;
|
|
136
136
|
closeDateTime: string;
|
|
@@ -139,7 +139,7 @@ interface PinHour {
|
|
|
139
139
|
pinId: number;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
interface SharedContentDetails {
|
|
142
|
+
export interface SharedContentDetails {
|
|
143
143
|
senders: Sender[];
|
|
144
144
|
sharedContentStatus: {
|
|
145
145
|
id: number;
|
|
@@ -158,7 +158,7 @@ interface SharedContentDetails {
|
|
|
158
158
|
* has last updated it. TODO: create events that document
|
|
159
159
|
* how a friendship has changed over time
|
|
160
160
|
*/
|
|
161
|
-
interface FriendRequest {
|
|
161
|
+
export interface FriendRequest {
|
|
162
162
|
id: number;
|
|
163
163
|
status:
|
|
164
164
|
| 'pending'
|
|
@@ -177,7 +177,7 @@ interface FriendRequest {
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
// Specific content types - type Contentable above covers all content types coming in from server, but content types below are used for creating/editing content in Create[ContentType].tsx component
|
|
180
|
-
interface Pin {
|
|
180
|
+
export interface Pin {
|
|
181
181
|
id: number | null; // will not have id when creating
|
|
182
182
|
pinCategory?: string;
|
|
183
183
|
pinType?: string;
|
|
@@ -196,7 +196,7 @@ interface Pin {
|
|
|
196
196
|
link?: string | null;
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
interface Plan {
|
|
199
|
+
export interface Plan {
|
|
200
200
|
id: number | null; // will not have id when creating
|
|
201
201
|
planCategory: string;
|
|
202
202
|
planType: string;
|
|
@@ -215,14 +215,14 @@ interface Plan {
|
|
|
215
215
|
updatedAt: string;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
interface Comment {
|
|
218
|
+
export interface Comment {
|
|
219
219
|
id: number | null; // will not have id when creating
|
|
220
220
|
primaryText: string;
|
|
221
221
|
createdAt: string;
|
|
222
222
|
updatedAt: string;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
interface Photo {
|
|
225
|
+
export interface Photo {
|
|
226
226
|
id: number | null; // will not have id when creating
|
|
227
227
|
primaryText: string;
|
|
228
228
|
photoURL?: string; // may not have one (gets returned from Cloudinary after posting)
|
|
@@ -230,7 +230,7 @@ interface Photo {
|
|
|
230
230
|
updatedAt: string;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
interface Route {
|
|
233
|
+
export interface Route {
|
|
234
234
|
routeCategory: string;
|
|
235
235
|
primaryText: string;
|
|
236
236
|
secondaryText: string;
|
|
@@ -243,18 +243,3 @@ interface Route {
|
|
|
243
243
|
phoneNumber: string;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
export {
|
|
249
|
-
Post,
|
|
250
|
-
FriendRequest,
|
|
251
|
-
Comment,
|
|
252
|
-
Photo,
|
|
253
|
-
Pin,
|
|
254
|
-
Plan,
|
|
255
|
-
PostWithIndex,
|
|
256
|
-
AllAppContent,
|
|
257
|
-
PinHour,
|
|
258
|
-
Route,
|
|
259
|
-
Contentable,
|
|
260
|
-
};
|
package/types/Emergency.ts
CHANGED
package/types/Tag.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface Tag {
|
|
1
|
+
export interface Tag {
|
|
2
2
|
id: number;
|
|
3
3
|
tag: string;
|
|
4
4
|
createdAt: string;
|
|
@@ -6,14 +6,10 @@ interface Tag {
|
|
|
6
6
|
content_tag: ContentTag;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
interface ContentTag {
|
|
9
|
+
export interface ContentTag {
|
|
10
10
|
id: number;
|
|
11
11
|
createdAt: string;
|
|
12
12
|
updatedAt: string;
|
|
13
13
|
contentId: number;
|
|
14
14
|
tagId: number;
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
Tag
|
|
19
|
-
}
|
package/types/User.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FriendRequest } from "./Content";
|
|
2
2
|
|
|
3
|
-
interface User {
|
|
3
|
+
export interface User {
|
|
4
4
|
id: number | null;
|
|
5
5
|
givenName: string | null;
|
|
6
6
|
familyName: string | null;
|
|
@@ -18,7 +18,7 @@ interface User {
|
|
|
18
18
|
activeRole?:string; // indicates whether user is a friend ('user') or responder ('medical', 'security', etc.)
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
interface UserRole {
|
|
21
|
+
export interface UserRole {
|
|
22
22
|
id: number | null;
|
|
23
23
|
createdAt: string | null;
|
|
24
24
|
updatedAt: string | null;
|
|
@@ -27,7 +27,7 @@ interface UserRole {
|
|
|
27
27
|
isActiveRole: boolean;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
interface UserPlan {
|
|
30
|
+
export interface UserPlan {
|
|
31
31
|
status: 'accepted' | 'denied' | 'pending';
|
|
32
32
|
userId: number;
|
|
33
33
|
contentId: number;
|
|
@@ -36,11 +36,11 @@ interface UserPlan {
|
|
|
36
36
|
id: number;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
interface Sender extends User {
|
|
39
|
+
export interface Sender extends User {
|
|
40
40
|
shareTimeStamp: ShareTimeStamp;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
interface ShareTimeStamp {
|
|
43
|
+
export interface ShareTimeStamp {
|
|
44
44
|
id: number | null;
|
|
45
45
|
contentId: number;
|
|
46
46
|
senderId: number;
|
|
@@ -49,4 +49,3 @@ interface ShareTimeStamp {
|
|
|
49
49
|
updatedAt: string;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
export { User, UserPlan, Sender, UserRole };
|