mgtypes 1.0.98 → 1.0.100
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/Permissions.ts +4 -21
- package/types/configs/ClientConfig.ts +16 -12
package/package.json
CHANGED
package/types/Permissions.ts
CHANGED
|
@@ -40,37 +40,20 @@ export enum mgNotificationsPermissionTitle {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
// STATE //////////////////////////////////////////////
|
|
43
|
+
// THESE ARE THE ACTUAL CURRENT PERMISSIONS AVAILABLE IN APP
|
|
43
44
|
export interface mgPermissionsState {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
47
|
-
LOCATION: {
|
|
48
|
-
[permission: string]: mgNonNativePermission;
|
|
49
|
-
};
|
|
45
|
+
SHOW_LOCATION_AND_DISTANCES: mgNonNativePermission;
|
|
46
|
+
LOCATION_FOREGROUND: mgNativePermission;
|
|
50
47
|
}
|
|
51
48
|
|
|
52
49
|
export interface mgNativePermission {
|
|
53
50
|
status: 'granted' | 'undetermined' | 'denied';
|
|
54
51
|
canAskAgain: boolean;
|
|
55
|
-
// will display in info modal: these are non-native, non-toggleable, and true
|
|
56
|
-
defaultTruePermissions: (
|
|
57
|
-
| mgNonNativePermissionTitle
|
|
58
|
-
| mgLocationPermissionTitle
|
|
59
|
-
| mgCalendarPermissionTitle
|
|
60
|
-
| mgNotificationsPermissionTitle
|
|
61
|
-
)[]; // TODO:permissionsConfig
|
|
62
|
-
toggleablePermissions: (
|
|
63
|
-
| mgNonNativePermissionTitle
|
|
64
|
-
| mgLocationPermissionTitle
|
|
65
|
-
| mgCalendarPermissionTitle
|
|
66
|
-
| mgNotificationsPermissionTitle
|
|
67
|
-
)[]; // TODO:permissionsConfig
|
|
68
52
|
}
|
|
69
53
|
|
|
70
54
|
export interface mgNonNativePermission {
|
|
71
55
|
isGranted: boolean;
|
|
72
|
-
|
|
73
|
-
ungrantedNativePermissions: mgNativePermissionTitle[];
|
|
56
|
+
isToggleable: boolean;
|
|
74
57
|
}
|
|
75
58
|
|
|
76
59
|
/**
|
|
@@ -412,9 +412,13 @@ export interface mgPermissionsProfile {
|
|
|
412
412
|
};
|
|
413
413
|
// ARE THESE PERMISSIONS NEEDED FOR THE USER'S
|
|
414
414
|
// VERSION OF THE APP? IF SO, THEY APPEAR IN SETTINGS
|
|
415
|
+
// 'isRequired' here refers to whether the configuration of the
|
|
416
|
+
// app has features that require that permission. So the Location_foreground
|
|
417
|
+
// is required if the app is configured to allow SHOW_LOCATION_AND_DISTANCES.
|
|
418
|
+
// The other native permissions are commented out because
|
|
419
|
+
// there are no finished features in the app that require them.
|
|
415
420
|
NATIVE_PERMISSIONS: {
|
|
416
421
|
LOCATION_FOREGROUND: { isRequired: boolean; requestOnInit: boolean };
|
|
417
|
-
// TODO:permissionsConfig
|
|
418
422
|
// LOCATION_BACKGROUND: { isRequired: boolean; requestOnInit: boolean };
|
|
419
423
|
// MEDIA_LIBRARY: { isRequired: boolean; requestOnInit: boolean };
|
|
420
424
|
// REMINDERS: { isRequired: boolean; requestOnInit: boolean };
|
|
@@ -437,35 +441,35 @@ export interface mgPermissionsProfile {
|
|
|
437
441
|
// if a permission is not toggleable and defaults to false, don't
|
|
438
442
|
// even bother showing it
|
|
439
443
|
LOCATION: {
|
|
440
|
-
SHOW_LOCATION_AND_DISTANCES: {
|
|
444
|
+
SHOW_LOCATION_AND_DISTANCES: { isToggleable: boolean; default: boolean }; // blue dot and user-to-pin distances
|
|
441
445
|
// user coordinate are sent to server
|
|
442
|
-
ENABLE_GEOTARGETED_CONTENT: {
|
|
446
|
+
ENABLE_GEOTARGETED_CONTENT: { isToggleable: boolean; default: boolean };
|
|
443
447
|
// shares location with friends when using the app
|
|
444
448
|
SHARE_FOREGROUND_LOCATION_WITH_FRIENDS: {
|
|
445
|
-
|
|
449
|
+
isToggleable: boolean;
|
|
446
450
|
default: boolean;
|
|
447
451
|
};
|
|
448
452
|
// shares location with friends when not using the app
|
|
449
453
|
SHARE_BACKGROUND_LOCATION_WITH_FRIENDS: {
|
|
450
|
-
|
|
454
|
+
isToggleable: boolean;
|
|
451
455
|
default: boolean;
|
|
452
456
|
};
|
|
453
457
|
// requires both foreground and background location tracking
|
|
454
|
-
SHARE_LOCATIONS_FOR_EMERGENCIES: {
|
|
458
|
+
SHARE_LOCATIONS_FOR_EMERGENCIES: { isToggleable: boolean; default: boolean };
|
|
455
459
|
};
|
|
456
460
|
|
|
457
461
|
// TODO:permissionsConfig
|
|
458
462
|
// CALENDAR: {
|
|
459
463
|
// ENABLE_CREATE_EVENTS: {
|
|
460
|
-
//
|
|
464
|
+
// isToggleable: boolean;
|
|
461
465
|
// default: boolean;
|
|
462
466
|
// };
|
|
463
467
|
// ENABLE_CREATE_REMINDERS: {
|
|
464
|
-
//
|
|
468
|
+
// isToggleable: boolean;
|
|
465
469
|
// default: boolean;
|
|
466
470
|
// };
|
|
467
471
|
// ENABLE_ADD_ATTENDEES: {
|
|
468
|
-
//
|
|
472
|
+
// isToggleable: boolean;
|
|
469
473
|
// default: boolean;
|
|
470
474
|
// };
|
|
471
475
|
// };
|
|
@@ -473,15 +477,15 @@ export interface mgPermissionsProfile {
|
|
|
473
477
|
// TODO:permissionsConfig
|
|
474
478
|
// NOTIFICATIONS: {
|
|
475
479
|
// RECEIVE_RSVP_NOTIFICATIONS: {
|
|
476
|
-
//
|
|
480
|
+
// isToggleable: boolean;
|
|
477
481
|
// default: boolean;
|
|
478
482
|
// };
|
|
479
483
|
// RECEIVE_EVENT_NEWS_NOTIFICATIONS: {
|
|
480
|
-
//
|
|
484
|
+
// isToggleable: boolean;
|
|
481
485
|
// default: boolean;
|
|
482
486
|
// };
|
|
483
487
|
// RECEIVE_MARKETING_NOTIFICATIONS: {
|
|
484
|
-
//
|
|
488
|
+
// isToggleable: boolean;
|
|
485
489
|
// default: boolean;
|
|
486
490
|
// };
|
|
487
491
|
// };
|