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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mgtypes",
3
- "version": "1.0.98",
3
+ "version": "1.0.100",
4
4
  "description": "types for mg development",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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
- NATIVE: {
45
- [permission: string]: mgNativePermission;
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
- disabled: boolean;
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: { canToggle: boolean; default: boolean }; // blue dot and user-to-pin 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: { canToggle: boolean; default: boolean };
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
- canToggle: boolean;
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
- canToggle: boolean;
454
+ isToggleable: boolean;
451
455
  default: boolean;
452
456
  };
453
457
  // requires both foreground and background location tracking
454
- SHARE_LOCATIONS_FOR_EMERGENCIES: { canToggle: boolean; default: boolean };
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
- // canToggle: boolean;
464
+ // isToggleable: boolean;
461
465
  // default: boolean;
462
466
  // };
463
467
  // ENABLE_CREATE_REMINDERS: {
464
- // canToggle: boolean;
468
+ // isToggleable: boolean;
465
469
  // default: boolean;
466
470
  // };
467
471
  // ENABLE_ADD_ATTENDEES: {
468
- // canToggle: boolean;
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
- // canToggle: boolean;
480
+ // isToggleable: boolean;
477
481
  // default: boolean;
478
482
  // };
479
483
  // RECEIVE_EVENT_NEWS_NOTIFICATIONS: {
480
- // canToggle: boolean;
484
+ // isToggleable: boolean;
481
485
  // default: boolean;
482
486
  // };
483
487
  // RECEIVE_MARKETING_NOTIFICATIONS: {
484
- // canToggle: boolean;
488
+ // isToggleable: boolean;
485
489
  // default: boolean;
486
490
  // };
487
491
  // };