mgtypes 1.0.99 → 1.0.101

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.99",
3
+ "version": "1.0.101",
4
4
  "description": "types for mg development",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -40,43 +40,22 @@ export enum mgNotificationsPermissionTitle {
40
40
  }
41
41
 
42
42
  // STATE //////////////////////////////////////////////
43
- // THESE ARE ALL THE PERMISSIONS THAT MOBGOB HAS AT WRITING
43
+ // THESE ARE THE ACTUAL CURRENT PERMISSIONS AVAILABLE IN APP
44
44
  export interface mgPermissionsState {
45
- SHOW_LOCATION_AND_DISTANCES: mgNonNativePermission;
46
- LOCATION_FOREGROUND: mgNativePermission;
45
+ SHOW_LOCATION_AND_DISTANCES?: mgNonNativePermission;
46
+ LOCATION_FOREGROUND?: mgNativePermission;
47
47
  }
48
48
 
49
49
  export interface mgNativePermission {
50
50
  status: 'granted' | 'undetermined' | 'denied';
51
51
  canAskAgain: boolean;
52
- // will display in info modal: these are non-native, non-toggleable, and true
53
- defaultTruePermissions: (
54
- | mgNonNativePermissionTitle
55
- | mgLocationPermissionTitle
56
- | mgCalendarPermissionTitle
57
- | mgNotificationsPermissionTitle
58
- )[]; // TODO:permissionsConfig
59
- toggleablePermissions: (
60
- | mgNonNativePermissionTitle
61
- | mgLocationPermissionTitle
62
- | mgCalendarPermissionTitle
63
- | mgNotificationsPermissionTitle
64
- )[]; // TODO:permissionsConfig
65
52
  }
66
53
 
67
54
  export interface mgNonNativePermission {
68
55
  isGranted: boolean;
69
- disabled: boolean;
70
- ungrantedNativePermissions: mgNativePermissionTitle[];
56
+ isToggleable: boolean;
71
57
  }
72
58
 
73
- /**
74
- * a non-native permission state in secure store
75
- */
76
- export interface mgSecureStorePermission {
77
- disabled: boolean; // disabled permisions won't be displayed in Settings page
78
- isGranted: boolean;
79
- }
80
59
 
81
60
  // ORDERS OF PERMISSIONS //////////////////////////////////
82
61
 
@@ -144,16 +144,14 @@ export interface mgFeaturesConfig {
144
144
  userAuthMode: 'guest only' | 'account only' | 'guest or account';
145
145
  AUTH_PAGE: {
146
146
  displayMode: 'never' | 'interval' | 'always';
147
- interval:
148
- | null
149
- | '10 minutes'
150
- | '30 minutes'
151
- | '1 hour'
152
- | '1 day'
153
- | '1 week'
154
- | '1 month';
147
+ interval: { amount: number, units: 'second'|'minute'|'day'|'week'|'month'|'year'}
155
148
  };
156
149
  };
150
+ PERMISSIONS: {
151
+ MODAL: {
152
+ interval: {amount:number, units:'second'|'minute'|'day'|'week'|'month'|'year'}
153
+ }
154
+ }
157
155
  }
158
156
 
159
157
  /**
@@ -322,7 +320,7 @@ export interface mgFontTextStyle {
322
320
  *
323
321
  * @property labelLarge: BUTTONS, segmented buttons
324
322
  * accordion titles, help modal, confirm action snackbar title
325
- * @property labelMedium: Billboard title,
323
+ * @property labelMedium: Billboard title, setting subtitles
326
324
  * @property labelSmall: bottom navigation buttons,
327
325
  * Billboard "ZOOM IN", custom chip,
328
326
  * other small-font instructions/labels,
@@ -441,35 +439,35 @@ export interface mgPermissionsProfile {
441
439
  // if a permission is not toggleable and defaults to false, don't
442
440
  // even bother showing it
443
441
  LOCATION: {
444
- SHOW_LOCATION_AND_DISTANCES: { canToggle: boolean; default: boolean }; // blue dot and user-to-pin distances
442
+ SHOW_LOCATION_AND_DISTANCES: { isToggleable: boolean; default: boolean }; // blue dot and user-to-pin distances
445
443
  // user coordinate are sent to server
446
- ENABLE_GEOTARGETED_CONTENT: { canToggle: boolean; default: boolean };
444
+ ENABLE_GEOTARGETED_CONTENT: { isToggleable: boolean; default: boolean };
447
445
  // shares location with friends when using the app
448
446
  SHARE_FOREGROUND_LOCATION_WITH_FRIENDS: {
449
- canToggle: boolean;
447
+ isToggleable: boolean;
450
448
  default: boolean;
451
449
  };
452
450
  // shares location with friends when not using the app
453
451
  SHARE_BACKGROUND_LOCATION_WITH_FRIENDS: {
454
- canToggle: boolean;
452
+ isToggleable: boolean;
455
453
  default: boolean;
456
454
  };
457
455
  // requires both foreground and background location tracking
458
- SHARE_LOCATIONS_FOR_EMERGENCIES: { canToggle: boolean; default: boolean };
456
+ SHARE_LOCATIONS_FOR_EMERGENCIES: { isToggleable: boolean; default: boolean };
459
457
  };
460
458
 
461
459
  // TODO:permissionsConfig
462
460
  // CALENDAR: {
463
461
  // ENABLE_CREATE_EVENTS: {
464
- // canToggle: boolean;
462
+ // isToggleable: boolean;
465
463
  // default: boolean;
466
464
  // };
467
465
  // ENABLE_CREATE_REMINDERS: {
468
- // canToggle: boolean;
466
+ // isToggleable: boolean;
469
467
  // default: boolean;
470
468
  // };
471
469
  // ENABLE_ADD_ATTENDEES: {
472
- // canToggle: boolean;
470
+ // isToggleable: boolean;
473
471
  // default: boolean;
474
472
  // };
475
473
  // };
@@ -477,15 +475,15 @@ export interface mgPermissionsProfile {
477
475
  // TODO:permissionsConfig
478
476
  // NOTIFICATIONS: {
479
477
  // RECEIVE_RSVP_NOTIFICATIONS: {
480
- // canToggle: boolean;
478
+ // isToggleable: boolean;
481
479
  // default: boolean;
482
480
  // };
483
481
  // RECEIVE_EVENT_NEWS_NOTIFICATIONS: {
484
- // canToggle: boolean;
482
+ // isToggleable: boolean;
485
483
  // default: boolean;
486
484
  // };
487
485
  // RECEIVE_MARKETING_NOTIFICATIONS: {
488
- // canToggle: boolean;
486
+ // isToggleable: boolean;
489
487
  // default: boolean;
490
488
  // };
491
489
  // };