mgtypes 1.0.76 → 1.0.78
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/Admin.ts +166 -0
- package/types/Content.ts +4 -0
- package/types/Permissions.ts +8 -8
- package/types/User.ts +4 -0
- package/types/configs/ClientConfig.ts +29 -16
package/package.json
CHANGED
package/types/Admin.ts
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
//
|
|
2
|
+
|
|
3
|
+
interface mgAdminOrganization {}
|
|
4
|
+
|
|
5
|
+
interface mgAdminUser {}
|
|
6
|
+
interface mgAdminUserRole {}
|
|
7
|
+
|
|
8
|
+
export enum mgAdminRoleTitle {
|
|
9
|
+
ADMINISTRATOR = 'ADMINISTRATOR', // FULL
|
|
10
|
+
EDITOR = 'EDITOR', // USERS, CONTENT
|
|
11
|
+
CONTRIBUTOR = 'CONTRIBUTOR', // CONTENT
|
|
12
|
+
DESIGNER = 'DESIGNER', // STYLES, THEME, MAP
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface mgAdminRoleProfile {
|
|
16
|
+
CONTENT: {
|
|
17
|
+
CAN_CREATE_CONTENT: boolean;
|
|
18
|
+
CAN_UPDATE_CONTENT: boolean;
|
|
19
|
+
CAN_DELETE_CONTENT: boolean;
|
|
20
|
+
};
|
|
21
|
+
USERS: {
|
|
22
|
+
CAN_CREATE_USERS: boolean;
|
|
23
|
+
CAN_UPDATE_USERS: boolean;
|
|
24
|
+
CAN_DELETE_USERS: boolean;
|
|
25
|
+
};
|
|
26
|
+
TEAM: {
|
|
27
|
+
// CAN INVITE SOMEONE INTO TEAM
|
|
28
|
+
CAN_ADD_MEMBERS: boolean;
|
|
29
|
+
|
|
30
|
+
// YOU CAN REMOVE THESE
|
|
31
|
+
// FROM YOUR TEAM, RESTRICTING
|
|
32
|
+
// ACCESS
|
|
33
|
+
CAN_REMOVE_MEMBERS: {
|
|
34
|
+
ADMINISTRATOR: boolean;
|
|
35
|
+
EDITOR: boolean;
|
|
36
|
+
CONTRIBUTOR: boolean;
|
|
37
|
+
DESIGNER: boolean;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
CAN_ASSIGN_ROLE: {
|
|
41
|
+
ADMINISTRATOR: boolean;
|
|
42
|
+
EDITOR: boolean;
|
|
43
|
+
CONTRIBUTOR: boolean;
|
|
44
|
+
DESIGNER: boolean;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
// THIS IS A CONSTANT, COULD BE CONFIGGLED SOMEHOW?
|
|
51
|
+
// DO WE NEED TO CONFIGGLE IT?
|
|
52
|
+
export const mgAdminRoleProfiles: {
|
|
53
|
+
ADMINISTRATOR: mgAdminRoleProfile;
|
|
54
|
+
EDITOR: mgAdminRoleProfile;
|
|
55
|
+
CONTRIBUTOR: mgAdminRoleProfile;
|
|
56
|
+
DESIGNER: mgAdminRoleProfile;
|
|
57
|
+
} = {
|
|
58
|
+
ADMINISTRATOR: {
|
|
59
|
+
CONTENT: {
|
|
60
|
+
CAN_CREATE_CONTENT: true,
|
|
61
|
+
CAN_DELETE_CONTENT: true,
|
|
62
|
+
CAN_UPDATE_CONTENT: true,
|
|
63
|
+
},
|
|
64
|
+
USERS: {
|
|
65
|
+
CAN_CREATE_USERS: true,
|
|
66
|
+
CAN_DELETE_USERS: true,
|
|
67
|
+
CAN_UPDATE_USERS: true,
|
|
68
|
+
},
|
|
69
|
+
TEAM: {
|
|
70
|
+
CAN_ADD_MEMBERS: true,
|
|
71
|
+
CAN_ASSIGN_ROLE: {
|
|
72
|
+
ADMINISTRATOR: true,
|
|
73
|
+
EDITOR: true,
|
|
74
|
+
CONTRIBUTOR: true,
|
|
75
|
+
DESIGNER: true,
|
|
76
|
+
},
|
|
77
|
+
CAN_REMOVE_MEMBERS: {
|
|
78
|
+
ADMINISTRATOR: true,
|
|
79
|
+
EDITOR: true,
|
|
80
|
+
CONTRIBUTOR: true,
|
|
81
|
+
DESIGNER: true,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
EDITOR: {
|
|
86
|
+
CONTENT: {
|
|
87
|
+
CAN_CREATE_CONTENT: true,
|
|
88
|
+
CAN_DELETE_CONTENT: true,
|
|
89
|
+
CAN_UPDATE_CONTENT: true,
|
|
90
|
+
},
|
|
91
|
+
USERS: {
|
|
92
|
+
CAN_CREATE_USERS: true,
|
|
93
|
+
CAN_DELETE_USERS: true,
|
|
94
|
+
CAN_UPDATE_USERS: true,
|
|
95
|
+
},
|
|
96
|
+
TEAM: {
|
|
97
|
+
CAN_ADD_MEMBERS: true,
|
|
98
|
+
CAN_ASSIGN_ROLE: {
|
|
99
|
+
ADMINISTRATOR: false,
|
|
100
|
+
EDITOR: true,
|
|
101
|
+
CONTRIBUTOR: true,
|
|
102
|
+
DESIGNER: true,
|
|
103
|
+
},
|
|
104
|
+
CAN_REMOVE_MEMBERS: {
|
|
105
|
+
ADMINISTRATOR: false,
|
|
106
|
+
EDITOR: false,
|
|
107
|
+
CONTRIBUTOR: true,
|
|
108
|
+
DESIGNER: true,
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
CONTRIBUTOR: {
|
|
113
|
+
CONTENT: {
|
|
114
|
+
CAN_CREATE_CONTENT: true,
|
|
115
|
+
CAN_DELETE_CONTENT: true,
|
|
116
|
+
CAN_UPDATE_CONTENT: true,
|
|
117
|
+
},
|
|
118
|
+
USERS: {
|
|
119
|
+
CAN_CREATE_USERS: false,
|
|
120
|
+
CAN_DELETE_USERS: false,
|
|
121
|
+
CAN_UPDATE_USERS: false,
|
|
122
|
+
},
|
|
123
|
+
TEAM: {
|
|
124
|
+
CAN_ADD_MEMBERS: false,
|
|
125
|
+
CAN_ASSIGN_ROLE: {
|
|
126
|
+
ADMINISTRATOR: false,
|
|
127
|
+
EDITOR: false,
|
|
128
|
+
CONTRIBUTOR: false,
|
|
129
|
+
DESIGNER: false,
|
|
130
|
+
},
|
|
131
|
+
CAN_REMOVE_MEMBERS: {
|
|
132
|
+
ADMINISTRATOR: false,
|
|
133
|
+
EDITOR: false,
|
|
134
|
+
CONTRIBUTOR: false,
|
|
135
|
+
DESIGNER: false,
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
DESIGNER: {
|
|
140
|
+
CONTENT: {
|
|
141
|
+
CAN_CREATE_CONTENT: false,
|
|
142
|
+
CAN_DELETE_CONTENT: false,
|
|
143
|
+
CAN_UPDATE_CONTENT: false,
|
|
144
|
+
},
|
|
145
|
+
USERS: {
|
|
146
|
+
CAN_CREATE_USERS: false,
|
|
147
|
+
CAN_DELETE_USERS: false,
|
|
148
|
+
CAN_UPDATE_USERS: false,
|
|
149
|
+
},
|
|
150
|
+
TEAM: {
|
|
151
|
+
CAN_ADD_MEMBERS: false,
|
|
152
|
+
CAN_ASSIGN_ROLE: {
|
|
153
|
+
ADMINISTRATOR: false,
|
|
154
|
+
EDITOR: false,
|
|
155
|
+
CONTRIBUTOR: false,
|
|
156
|
+
DESIGNER: false,
|
|
157
|
+
},
|
|
158
|
+
CAN_REMOVE_MEMBERS: {
|
|
159
|
+
ADMINISTRATOR: false,
|
|
160
|
+
EDITOR: false,
|
|
161
|
+
CONTRIBUTOR: false,
|
|
162
|
+
DESIGNER: false,
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
};
|
package/types/Content.ts
CHANGED
package/types/Permissions.ts
CHANGED
|
@@ -20,7 +20,7 @@ export enum mgNonNativePermissionTitle {
|
|
|
20
20
|
export enum mgLocationPermissionTitle {
|
|
21
21
|
SHOW_LOCATION = 'SHOW_LOCATION',
|
|
22
22
|
SHOW_DISTANCE_TO_PINS = 'SHOW_DISTANCE_TO_PINS',
|
|
23
|
-
|
|
23
|
+
RECEIVE_GEOTARGETED_CONTENT = 'RECEIVE_GEOTARGETED_CONTENT',
|
|
24
24
|
SHARE_BACKGROUND_LOCATION_WITH_FRIENDS = 'SHARE_BACKGROUND_LOCATION_WITH_FRIENDS',
|
|
25
25
|
SHARE_FOREGROUND_LOCATION_WITH_FRIENDS = 'SHARE_FOREGROUND_LOCATION_WITH_FRIENDS',
|
|
26
26
|
SHARE_LOCATION_FOR_EMERGENCIES = 'SHARE_LOCATION_FOR_EMERGENCIES',
|
|
@@ -28,9 +28,9 @@ export enum mgLocationPermissionTitle {
|
|
|
28
28
|
|
|
29
29
|
// TODO:permissionsConfig -- Not being used at the moment
|
|
30
30
|
export enum mgCalendarPermissionTitle {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
CAN_CREATE_EVENTS = 'CAN_CREATE_EVENTS',
|
|
32
|
+
CAN_CREATE_REMINDERS = 'CAN_CREATE_REMINDERS',
|
|
33
|
+
CAN_ADD_ATTENDEES = 'CAN_ADD_ATTENDEES',
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
// TODO:permissionsConfig -- Not being used at the moment
|
|
@@ -98,16 +98,16 @@ export const nativePermissionsOrder: mgNativePermissionTitle[] = [
|
|
|
98
98
|
export const locationPermissionsOrder: mgLocationPermissionTitle[] = [
|
|
99
99
|
mgLocationPermissionTitle.SHOW_LOCATION,
|
|
100
100
|
mgLocationPermissionTitle.SHOW_DISTANCE_TO_PINS,
|
|
101
|
-
mgLocationPermissionTitle.
|
|
101
|
+
mgLocationPermissionTitle.RECEIVE_GEOTARGETED_CONTENT,
|
|
102
102
|
mgLocationPermissionTitle.SHARE_BACKGROUND_LOCATION_WITH_FRIENDS,
|
|
103
103
|
mgLocationPermissionTitle.SHARE_FOREGROUND_LOCATION_WITH_FRIENDS,
|
|
104
104
|
mgLocationPermissionTitle.SHARE_LOCATION_FOR_EMERGENCIES,
|
|
105
105
|
];
|
|
106
106
|
|
|
107
107
|
export const calendarPermissionsOrder: mgCalendarPermissionTitle[] = [
|
|
108
|
-
mgCalendarPermissionTitle.
|
|
109
|
-
mgCalendarPermissionTitle.
|
|
110
|
-
mgCalendarPermissionTitle.
|
|
108
|
+
mgCalendarPermissionTitle.CAN_CREATE_EVENTS,
|
|
109
|
+
mgCalendarPermissionTitle.CAN_CREATE_REMINDERS,
|
|
110
|
+
mgCalendarPermissionTitle.CAN_ADD_ATTENDEES,
|
|
111
111
|
];
|
|
112
112
|
|
|
113
113
|
export const notificationsPermissionsOrder: mgNotificationsPermissionTitle[] = [
|
package/types/User.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { mgFriendship } from "./Content";
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
|
|
3
5
|
export interface mgUser {
|
|
4
6
|
id: number | null;
|
|
5
7
|
deviceId: string| null; // this will be abstracted away to a join table
|
|
@@ -14,6 +16,7 @@ export interface mgUser {
|
|
|
14
16
|
createdAt: string | null;
|
|
15
17
|
updatedAt: string | null;
|
|
16
18
|
imageURL: string | null;
|
|
19
|
+
createdBy: 'admin' | 'user'
|
|
17
20
|
// friendship?: mgFriendship; // a user's friends have a record of the friendship attached
|
|
18
21
|
// activeRole?:string; // indicates whether user is a friend ('user') or responder ('medical', 'security', etc.)
|
|
19
22
|
}
|
|
@@ -49,3 +52,4 @@ export interface mgShareTimeStamp {
|
|
|
49
52
|
updatedAt: string;
|
|
50
53
|
}
|
|
51
54
|
|
|
55
|
+
|
|
@@ -26,13 +26,14 @@ export interface mgMapConfig {
|
|
|
26
26
|
MAP_BILLBOARDS: mgMapBillboards;
|
|
27
27
|
MAP_STYLE_URL: string;
|
|
28
28
|
DEFAULT_MAP_BOUNDARIES: { latitude: number; longitude: number }[];
|
|
29
|
+
EVENT_CENTER_COORDINATES: {latitude: number, longitude:number}
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
33
|
* Configs for feed
|
|
33
34
|
*/
|
|
34
35
|
export interface mgFeedConfig {
|
|
35
|
-
SHOW_NETWORK_INDICATOR: boolean;
|
|
36
|
+
SHOW_NETWORK_INDICATOR: boolean; // TODO: delete, not used, just have a popup when network fails
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
/**
|
|
@@ -54,11 +55,10 @@ export interface mgCalendarConfig {
|
|
|
54
55
|
*/
|
|
55
56
|
export interface mgSpecsConfig {
|
|
56
57
|
EVENT_NAME: string;
|
|
57
|
-
EVENT_START_DATETIME: string;
|
|
58
|
-
EVENT_END_DATETIME: string;
|
|
59
|
-
EVENT_LONGITUDE: string;
|
|
60
|
-
EVENT_LATITUDE: string;
|
|
61
58
|
APP_ALIAS: string;
|
|
59
|
+
PRESENTING_ORGANIZATION: string | null;
|
|
60
|
+
EVENT_START_DATETIME: string | null;
|
|
61
|
+
EVENT_END_DATETIME: string | null;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/**
|
|
@@ -210,6 +210,7 @@ export interface mgColorsConfig {
|
|
|
210
210
|
onTertiary: string;
|
|
211
211
|
tertiaryContainer: string;
|
|
212
212
|
onTertiaryContainer: string;
|
|
213
|
+
|
|
213
214
|
error: string;
|
|
214
215
|
onError: string;
|
|
215
216
|
errorContainer: string;
|
|
@@ -254,27 +255,39 @@ interface mgFontTextStyle {
|
|
|
254
255
|
/**
|
|
255
256
|
* Configs for all the app's font styles
|
|
256
257
|
*
|
|
257
|
-
* @property
|
|
258
|
-
* @property
|
|
259
|
-
*
|
|
260
|
-
* @property
|
|
261
|
-
* @property
|
|
258
|
+
* @property displayMedium: Nothing, could be back up for app title on splash/login
|
|
259
|
+
* @property displaySmall: permission/loading modal text
|
|
260
|
+
*
|
|
261
|
+
* @property titleMedium: page titles
|
|
262
|
+
* @property titleSmall: modal titles
|
|
263
|
+
*
|
|
264
|
+
* @property labelLarge: standard & segmented button texts, loading
|
|
265
|
+
* modal, accordion titles, help modal, confirm action snackbar title
|
|
266
|
+
* @property labelMedium: Billboard marker title,
|
|
267
|
+
* @property labelSmall: bottom navigation buttons, map label marker
|
|
268
|
+
* ("ZOOM IN"), other small-font instructions/labels, custom chip
|
|
269
|
+
*
|
|
262
270
|
* @property bodyLarge: TextInput, some accessory text (on splash)
|
|
263
|
-
* @property
|
|
264
|
-
* @property
|
|
265
|
-
*
|
|
271
|
+
* @property bodyMedium: avatar and modal text, card primary text,
|
|
272
|
+
* @property bodySmall: smallest normal text. Still needs to be legible.
|
|
273
|
+
*
|
|
266
274
|
* @property default: fallback
|
|
267
275
|
*/
|
|
268
276
|
export interface mgFontsConfig {
|
|
277
|
+
displayMedium: mgFontTextStyle;
|
|
278
|
+
displaySmall: mgFontTextStyle;
|
|
279
|
+
|
|
280
|
+
titleMedium: mgFontTextStyle;
|
|
281
|
+
titleSmall: mgFontTextStyle;
|
|
282
|
+
|
|
269
283
|
labelLarge: mgFontTextStyle;
|
|
270
284
|
labelMedium: mgFontTextStyle;
|
|
271
285
|
labelSmall: mgFontTextStyle;
|
|
286
|
+
|
|
272
287
|
bodyLarge: mgFontTextStyle;
|
|
273
288
|
bodyMedium: mgFontTextStyle;
|
|
274
289
|
bodySmall: mgFontTextStyle;
|
|
275
|
-
|
|
276
|
-
displaySmall: mgFontTextStyle;
|
|
277
|
-
headlineSmall: mgFontTextStyle;
|
|
290
|
+
|
|
278
291
|
default: mgFontTextStyle;
|
|
279
292
|
}
|
|
280
293
|
|