mgtypes 1.0.51 → 1.0.52

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.51",
3
+ "version": "1.0.52",
4
4
  "description": "types for mg development",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -228,7 +228,6 @@ export interface mgColorsConfig {
228
228
  darkNeutral: string;
229
229
  dark: string;
230
230
 
231
-
232
231
  success: string;
233
232
  warning: string;
234
233
 
@@ -241,7 +240,6 @@ export interface mgColorsConfig {
241
240
  secondaryContainerGradient: string;
242
241
  tertiaryContainerGradient: string;
243
242
 
244
-
245
243
  // ORIGINALS
246
244
 
247
245
  primary: string;
@@ -472,39 +470,22 @@ export interface mgPermissionsProfile {
472
470
  * @param pins one of this property's internal properties can be 'all', which will filter all pins
473
471
  * @param plans same as above
474
472
  */
473
+
474
+ // TODO: create a data structure that encapsulates
475
+ // how filters might effectively work
475
476
  export interface mgMapFiltersProfile {
476
- pins?: { [key: string]: mgMapFilter };
477
- plans?: { [key: string]: mgMapFilter };
478
- people?: {
479
- friends?: mgMapFilter;
480
- fire?: mgMapFilter;
481
- security?: mgMapFilter;
482
- medical?: mgMapFilter;
483
- 'mental health'?: mgMapFilter;
484
- allResponders?: mgMapFilter;
485
- all?: mgMapFilter;
486
- };
487
- emergencies?: {
488
- fire?: mgMapFilter;
489
- security?: mgMapFilter;
490
- medical?: mgMapFilter;
491
- 'mental health'?: mgMapFilter;
492
- all?: mgMapFilter;
493
- };
494
- routes?: {
495
- runs?: mgMapFilter;
496
- parades?: mgMapFilter;
497
- all?: mgMapFilter;
498
- };
477
+ [filterName: string]: mgMapFilter;
499
478
  }
500
479
 
501
480
  /**
502
481
  * Configs to display a map filter
503
482
  */
504
483
  export interface mgMapFilter {
505
- category: 'route' | 'pin' | 'person' | 'plan' | 'emergency';
506
- value: string;
507
- labelText: string;
484
+ contentToFilter?: {
485
+ contentType: 'pin' | 'plan' | 'route'; // 'pin'
486
+ contentableCategory: string; // 'food'
487
+ contentableType: string; // 'burgers'
488
+ }[];
489
+ contentItemsToFilter?: number[]
508
490
  icon: string;
509
- color: string;
510
491
  }
package/types/Content.ts CHANGED
@@ -4,54 +4,6 @@ import { Vote } from './Vote';
4
4
  import { Emergency } from './Emergency';
5
5
  import { Position } from 'geojson';
6
6
 
7
- /**
8
- * shared posts will have sharedContentDetails, normal
9
- * posts won't have sCD. Posts with threads attached have
10
- * children; thread tracks who added and where a threaded
11
- * post goes. A plan may have UserPlan details that indicate
12
- * if user is attending the plan
13
- * */
14
- export interface AppContent {
15
- feedData: {
16
- mainContent: { order: number[]; content: { [contentId: string]: Post } };
17
- sharedContent: { order: number[]; content: { [contentId: string]: Post } };
18
- friendsContent: { order: number[]; content: { [contentId: string]: Post } };
19
- userContent: { order: number[]; content: { [contentId: string]: Post } };
20
- };
21
- mapData: {
22
- pins: { [contentId: string]: Post };
23
- publicPlans: { [contentId: string]: Post };
24
- userPlans: { [contentId: string]: Post };
25
- pinAds: { [contentId: string]: Post };
26
- planAds: { [contentId: string]: Post };
27
- routes: { [contentId: string]: Post };
28
- };
29
- userData: {
30
- user: User;
31
- votes: Vote[];
32
- friends: { [userId: string]: User };
33
- plans: UserPlan[];
34
- friendRequests: { [friendRequestId: string]: FriendRequest };
35
- roles: UserRole[];
36
- activeRole: string;
37
- emergencies: Emergency[];
38
- };
39
- listsData: {
40
- [listId: string]: {
41
- content: { [contentId: string]: Post };
42
- order: number[];
43
- title: string;
44
- description: string;
45
- icon: string;
46
- };
47
- };
48
- calendarData: {
49
- publicPlans: { [contentId: string]: Post };
50
- };
51
- }
52
- export interface PostWithIndex {
53
- [contentId: string]: Post;
54
- }
55
7
 
56
8
  export interface Post {
57
9
  content: Content;
@@ -152,6 +104,7 @@ export interface Contentable {
152
104
 
153
105
  // Routes
154
106
  routeCategory?: string;
107
+ routeType?:string;
155
108
  distance?: string;
156
109
  color?: string;
157
110
  coordinates?: Position[];
@@ -172,14 +125,6 @@ export interface PinHour {
172
125
 
173
126
  export interface SharedContentDetails {
174
127
  senders: Sender[];
175
- sharedContentStatus: {
176
- id: number;
177
- isArchived: boolean;
178
- createdAt: string;
179
- updatedAt: string;
180
- contentId: number;
181
- userId: number;
182
- };
183
128
  }
184
129
 
185
130
  /**