@marcoappio/marco-config 2.0.411 → 2.0.412

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.
@@ -108,6 +108,14 @@ declare const rules: {
108
108
  };
109
109
  bind: string[];
110
110
  };
111
+ threadBagOfWordsLink: {
112
+ allow: {
113
+ create: string;
114
+ delete: string;
115
+ view: string;
116
+ };
117
+ bind: string[];
118
+ };
111
119
  threads: {
112
120
  allow: {
113
121
  create: string;
@@ -1 +1 @@
1
- {"version":3,"file":"instant.perms.d.ts","sourceRoot":"","sources":["../../src/instantDB/instant.perms.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyIa,CAAA;AAExB,eAAe,KAAK,CAAA"}
1
+ {"version":3,"file":"instant.perms.d.ts","sourceRoot":"","sources":["../../src/instantDB/instant.perms.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiJa,CAAA;AAExB,eAAe,KAAK,CAAA"}
@@ -9,14 +9,14 @@ const rules = {
9
9
  allow: {
10
10
  view: 'isOwner',
11
11
  },
12
- bind: ['isOwner', 'data.account.user.id == auth.id'],
12
+ bind: ['isOwner', 'data.userId == auth.id'],
13
13
  },
14
14
  accountSettings: {
15
15
  allow: {
16
16
  update: 'isOwner',
17
17
  view: 'isOwner',
18
18
  },
19
- bind: ['isOwner', 'data.account.user.id == auth.id'],
19
+ bind: ['isOwner', 'data.userId == auth.id'],
20
20
  },
21
21
  accounts: {
22
22
  allow: {
@@ -25,7 +25,7 @@ const rules = {
25
25
  update: 'isOwner',
26
26
  view: 'isOwner',
27
27
  },
28
- bind: ['isOwner', 'data.user.id == auth.id'],
28
+ bind: ['isOwner', 'data.userId == auth.id'],
29
29
  },
30
30
  aliases: {
31
31
  allow: {
@@ -34,13 +34,13 @@ const rules = {
34
34
  update: 'isOwner',
35
35
  view: 'isOwner',
36
36
  },
37
- bind: ['isOwner', 'data.account.user.id == auth.id'],
37
+ bind: ['isOwner', 'data.userId == auth.id'],
38
38
  },
39
39
  contacts: {
40
40
  allow: {
41
41
  view: 'isOwner',
42
42
  },
43
- bind: ['isOwner', 'data.user.id == auth.id'],
43
+ bind: ['isOwner', 'data.userId == auth.id'],
44
44
  },
45
45
  draftAttachments: {
46
46
  allow: {
@@ -49,7 +49,7 @@ const rules = {
49
49
  update: 'isOwner',
50
50
  view: 'isOwner',
51
51
  },
52
- bind: ['isOwner', 'data.draft.account.user.id == auth.id'],
52
+ bind: ['isOwner', 'data.userId == auth.id'],
53
53
  },
54
54
  draftRecipients: {
55
55
  allow: {
@@ -58,7 +58,7 @@ const rules = {
58
58
  update: 'isOwner',
59
59
  view: 'isOwner',
60
60
  },
61
- bind: ['isOwner', 'data.draft.account.user.id == auth.id'],
61
+ bind: ['isOwner', 'data.userId == auth.id'],
62
62
  },
63
63
  drafts: {
64
64
  allow: {
@@ -67,19 +67,19 @@ const rules = {
67
67
  update: 'isOwner',
68
68
  view: 'isOwner',
69
69
  },
70
- bind: ['isOwner', 'data.account.user.id == auth.id'],
70
+ bind: ['isOwner', 'data.userId == auth.id'],
71
71
  },
72
72
  labels: {
73
73
  allow: {
74
74
  view: 'isOwner',
75
75
  },
76
- bind: ['isOwner', 'data.account.user.id == auth.id'],
76
+ bind: ['isOwner', 'data.userId == auth.id'],
77
77
  },
78
78
  messageAttachments: {
79
79
  allow: {
80
80
  view: 'isOwner',
81
81
  },
82
- bind: ['isOwner', 'data.message.thread.account.user.id == auth.id'],
82
+ bind: ['isOwner', 'data.userId == auth.id'],
83
83
  },
84
84
  messageLabels: {
85
85
  allow: {
@@ -88,25 +88,33 @@ const rules = {
88
88
  update: 'isOwner',
89
89
  view: 'isOwner',
90
90
  },
91
- bind: ['isOwner', 'data.message.thread.account.user.id == auth.id'],
91
+ bind: ['isOwner', 'data.userId == auth.id'],
92
92
  },
93
93
  messageRecipients: {
94
94
  allow: {
95
95
  view: 'isOwner',
96
96
  },
97
- bind: ['isOwner', 'data.message.thread.account.user.id == auth.id'],
97
+ bind: ['isOwner', 'data.userId == auth.id'],
98
98
  },
99
99
  messages: {
100
100
  allow: {
101
101
  view: 'isOwner',
102
102
  },
103
- bind: ['isOwner', 'data.thread.account.user.id == auth.id'],
103
+ bind: ['isOwner', 'data.userId == auth.id'],
104
104
  },
105
105
  threadBagOfWords: {
106
106
  allow: {
107
+ view: 'auth.id != null',
108
+ },
109
+ bind: ['hasLink', 'auth.id in data.ref("threadLinks.userId")'],
110
+ },
111
+ threadBagOfWordsLink: {
112
+ allow: {
113
+ create: 'isOwner',
114
+ delete: 'isOwner',
107
115
  view: 'isOwner',
108
116
  },
109
- bind: ['isOwner', 'data.thread.account.user.id == auth.id'],
117
+ bind: ['isOwner', 'data.userId == auth.id'],
110
118
  },
111
119
  threads: {
112
120
  allow: {
@@ -115,7 +123,7 @@ const rules = {
115
123
  update: 'isOwner',
116
124
  view: 'isOwner',
117
125
  },
118
- bind: ['isOwner', 'data.account.user.id == auth.id'],
126
+ bind: ['isOwner', 'data.userId == auth.id'],
119
127
  },
120
128
  userPushNotificationToken: {
121
129
  allow: {
@@ -124,7 +132,7 @@ const rules = {
124
132
  update: 'isOwner',
125
133
  view: 'isOwner',
126
134
  },
127
- bind: ['isOwner', 'data.userSettings.user.id == auth.id'],
135
+ bind: ['isOwner', 'data.userId == auth.id'],
128
136
  },
129
137
  userSettings: {
130
138
  allow: {
@@ -133,7 +141,7 @@ const rules = {
133
141
  update: 'isOwner',
134
142
  view: 'isOwner',
135
143
  },
136
- bind: ['isOwner', 'data.user.id == auth.id'],
144
+ bind: ['isOwner', 'data.userId == auth.id'],
137
145
  },
138
146
  };
139
147
  export default rules;
@@ -4,24 +4,29 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
4
4
  email: import("@instantdb/core").DataAttrDef<string, true, true>;
5
5
  }, {}, void>;
6
6
  accountMailCounts: import("@instantdb/core").EntityDef<{
7
- processed: import("@instantdb/core").DataAttrDef<number, true, true>;
8
- total: import("@instantdb/core").DataAttrDef<number, true, true>;
7
+ processed: import("@instantdb/core").DataAttrDef<number, true, false>;
8
+ total: import("@instantdb/core").DataAttrDef<number, true, false>;
9
+ userId: import("@instantdb/core").DataAttrDef<string, true, true>;
9
10
  }, {}, void>;
10
11
  accountSettings: import("@instantdb/core").EntityDef<{
11
12
  color: import("@instantdb/core").DataAttrDef<string, true, false>;
12
13
  name: import("@instantdb/core").DataAttrDef<string, false, false>;
14
+ userId: import("@instantdb/core").DataAttrDef<string, true, true>;
13
15
  }, {}, void>;
14
16
  accounts: import("@instantdb/core").EntityDef<{
15
17
  imapConnectionStatus: import("@instantdb/core").DataAttrDef<string, true, true>;
18
+ userId: import("@instantdb/core").DataAttrDef<string, true, true>;
16
19
  }, {}, void>;
17
20
  aliases: import("@instantdb/core").EntityDef<{
18
21
  emailAddress: import("@instantdb/core").DataAttrDef<string, true, true>;
19
22
  isPrimary: import("@instantdb/core").DataAttrDef<boolean, true, true>;
20
23
  name: import("@instantdb/core").DataAttrDef<string, false, false>;
24
+ userId: import("@instantdb/core").DataAttrDef<string, true, true>;
21
25
  }, {}, void>;
22
26
  contacts: import("@instantdb/core").EntityDef<{
23
27
  emailAddress: import("@instantdb/core").DataAttrDef<string, true, true>;
24
28
  name: import("@instantdb/core").DataAttrDef<string, false, false>;
29
+ userId: import("@instantdb/core").DataAttrDef<string, true, true>;
25
30
  }, {}, void>;
26
31
  draftAttachments: import("@instantdb/core").EntityDef<{
27
32
  failed: import("@instantdb/core").DataAttrDef<boolean, true, false>;
@@ -30,10 +35,12 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
30
35
  totalChunks: import("@instantdb/core").DataAttrDef<number, true, false>;
31
36
  totalSize: import("@instantdb/core").DataAttrDef<number, true, false>;
32
37
  uploadedChunks: import("@instantdb/core").DataAttrDef<number, true, false>;
38
+ userId: import("@instantdb/core").DataAttrDef<string, true, true>;
33
39
  }, {}, void>;
34
40
  draftRecipients: import("@instantdb/core").EntityDef<{
35
- emailAddress: import("@instantdb/core").DataAttrDef<string, true, true>;
36
- recipientType: import("@instantdb/core").DataAttrDef<string, true, true>;
41
+ emailAddress: import("@instantdb/core").DataAttrDef<string, true, false>;
42
+ recipientType: import("@instantdb/core").DataAttrDef<string, true, false>;
43
+ userId: import("@instantdb/core").DataAttrDef<string, true, true>;
37
44
  }, {}, void>;
38
45
  drafts: import("@instantdb/core").EntityDef<{
39
46
  bodyContent: import("@instantdb/core").DataAttrDef<string, true, false>;
@@ -47,11 +54,13 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
47
54
  status: import("@instantdb/core").DataAttrDef<string, true, true>;
48
55
  type: import("@instantdb/core").DataAttrDef<string, true, true>;
49
56
  updatedAt: import("@instantdb/core").DataAttrDef<number, true, true>;
57
+ userId: import("@instantdb/core").DataAttrDef<string, true, true>;
50
58
  }, {}, void>;
51
59
  labels: import("@instantdb/core").EntityDef<{
52
60
  labelId: import("@instantdb/core").DataAttrDef<string, true, true>;
53
61
  path: import("@instantdb/core").DataAttrDef<string, true, true>;
54
62
  specialUse: import("@instantdb/core").DataAttrDef<string, false, true>;
63
+ userId: import("@instantdb/core").DataAttrDef<string, true, true>;
55
64
  }, {}, void>;
56
65
  messageAttachments: import("@instantdb/core").EntityDef<{
57
66
  attachmentId: import("@instantdb/core").DataAttrDef<string, true, true>;
@@ -59,14 +68,17 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
59
68
  mimeType: import("@instantdb/core").DataAttrDef<string, true, false>;
60
69
  size: import("@instantdb/core").DataAttrDef<number, true, false>;
61
70
  status: import("@instantdb/core").DataAttrDef<string, true, true>;
71
+ userId: import("@instantdb/core").DataAttrDef<string, true, true>;
62
72
  }, {}, void>;
63
73
  messageLabels: import("@instantdb/core").EntityDef<{
64
74
  labelId: import("@instantdb/core").DataAttrDef<string, true, true>;
75
+ userId: import("@instantdb/core").DataAttrDef<string, true, true>;
65
76
  }, {}, void>;
66
77
  messageRecipients: import("@instantdb/core").EntityDef<{
67
78
  emailAddress: import("@instantdb/core").DataAttrDef<string, true, true>;
68
79
  name: import("@instantdb/core").DataAttrDef<string, false, false>;
69
- recipientType: import("@instantdb/core").DataAttrDef<string, true, true>;
80
+ recipientType: import("@instantdb/core").DataAttrDef<string, true, false>;
81
+ userId: import("@instantdb/core").DataAttrDef<string, true, true>;
70
82
  }, {}, void>;
71
83
  messages: import("@instantdb/core").EntityDef<{
72
84
  envelopeDate: import("@instantdb/core").DataAttrDef<number, true, true>;
@@ -75,10 +87,16 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
75
87
  fromName: import("@instantdb/core").DataAttrDef<string, false, false>;
76
88
  messageId: import("@instantdb/core").DataAttrDef<string, true, true>;
77
89
  previewText: import("@instantdb/core").DataAttrDef<string, true, false>;
90
+ userId: import("@instantdb/core").DataAttrDef<string, true, true>;
78
91
  }, {}, void>;
79
92
  threadBagOfWords: import("@instantdb/core").EntityDef<{
80
93
  word: import("@instantdb/core").DataAttrDef<string, true, true>;
81
94
  }, {}, void>;
95
+ threadBagOfWordsLink: import("@instantdb/core").EntityDef<{
96
+ threadId: import("@instantdb/core").DataAttrDef<string, true, true>;
97
+ userId: import("@instantdb/core").DataAttrDef<string, true, true>;
98
+ wordId: import("@instantdb/core").DataAttrDef<string, true, true>;
99
+ }, {}, void>;
82
100
  threads: import("@instantdb/core").EntityDef<{
83
101
  emailAccountId: import("@instantdb/core").DataAttrDef<string, true, true>;
84
102
  flagged: import("@instantdb/core").DataAttrDef<boolean, true, true>;
@@ -87,15 +105,18 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
87
105
  messageIds: import("@instantdb/core").DataAttrDef<any, true, false>;
88
106
  participants: import("@instantdb/core").DataAttrDef<any, true, false>;
89
107
  seen: import("@instantdb/core").DataAttrDef<boolean, true, true>;
108
+ userId: import("@instantdb/core").DataAttrDef<string, true, true>;
90
109
  }, {}, void>;
91
110
  userPushNotificationToken: import("@instantdb/core").EntityDef<{
92
111
  createdAt: import("@instantdb/core").DataAttrDef<number, true, true>;
93
112
  token: import("@instantdb/core").DataAttrDef<string, true, true>;
113
+ userId: import("@instantdb/core").DataAttrDef<string, true, true>;
94
114
  }, {}, void>;
95
115
  userSettings: import("@instantdb/core").EntityDef<{
96
116
  name: import("@instantdb/core").DataAttrDef<string, false, false>;
97
117
  profilePicture: import("@instantdb/core").DataAttrDef<string, false, false>;
98
118
  undoSendEnabled: import("@instantdb/core").DataAttrDef<boolean, true, false>;
119
+ userId: import("@instantdb/core").DataAttrDef<string, true, true>;
99
120
  }, {}, void>;
100
121
  }, {
101
122
  readonly accountAliases: {
@@ -230,15 +251,15 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
230
251
  readonly on: "accounts";
231
252
  };
232
253
  };
233
- readonly threadBagOfWordsLinks: {
254
+ readonly threadBagOfWordsJunction: {
234
255
  readonly forward: {
235
256
  readonly has: "one";
236
257
  readonly label: "thread";
237
- readonly on: "threadBagOfWords";
258
+ readonly on: "threadBagOfWordsLink";
238
259
  };
239
260
  readonly reverse: {
240
261
  readonly has: "many";
241
- readonly label: "bagOfWords";
262
+ readonly label: "wordLinks";
242
263
  readonly on: "threads";
243
264
  };
244
265
  };
@@ -302,6 +323,18 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
302
323
  readonly on: "userSettings";
303
324
  };
304
325
  };
326
+ readonly wordBagOfWordsJunction: {
327
+ readonly forward: {
328
+ readonly has: "one";
329
+ readonly label: "word";
330
+ readonly on: "threadBagOfWordsLink";
331
+ };
332
+ readonly reverse: {
333
+ readonly has: "many";
334
+ readonly label: "threadLinks";
335
+ readonly on: "threadBagOfWords";
336
+ };
337
+ };
305
338
  }>, import("@instantdb/core").LinksDef<any>, {}>;
306
339
  type BaseAppSchema = typeof schema;
307
340
  export type AppSchema = {
@@ -1 +1 @@
1
- {"version":3,"file":"instant.schema.d.ts","sourceRoot":"","sources":["../../src/instantDB/instant.schema.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,qBAAqB,CAAA;AAE5B,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDA2KV,CAAA;AAEF,KAAK,aAAa,GAAG,OAAO,MAAM,CAAA;AAElC,MAAM,MAAM,SAAS,GAAG;KACrB,CAAC,IAAI,MAAM,aAAa,GAAG,CAAC,SAAS,UAAU,GAC5C;QACE,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,EAAE,sBAAsB,CAAC,GAAG;YAC9E,oBAAoB,EAAE,oBAAoB,CAAA;SAC3C,CAAA;QACD,eAAe,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,iBAAiB,CAAC,EAAE,eAAe,CAAC,GAAG;YACrF,aAA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GAAG;YAChE,UAAU,EAAE,eAAe,GAAG,IAAI,CAAA;SACnC,CAAA;QACD,kBAAkB,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC,EAAE,QAAQ,CAAC,GAAG;YACpF,MAAM,EAAE,uBAAuB,CAAA;SAChC,CAAA;QACD,iBAAiB,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,mBAAmB,CAAC,EAAE,eAAe,CAAC,GAAG;YACzF,aAAa,EAAE,oBAAoB,CAAA;SACpC,CAAA;QACD,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,EAAE,UAAU,GAAG,YAAY,GAAG,cAAc,CAAC,GAAG;YAChG,QAAQ,EAAE,MAAM,EAAE,CAAA;YAClB,UAAU,EAAE,MAAM,EAAE,CAAA;YACpB,YAAY,EAAE,MAAM,EAAE,CAAA;SACvB,CAAA;KACF,GAAG,IAAI,CACN,aAAa,CAAC,UAAU,CAAC,EACzB,UAAU,GAAG,iBAAiB,GAAG,QAAQ,GAAG,QAAQ,GAAG,oBAAoB,GAAG,mBAAmB,GAAG,SAAS,CAC9G,GACD,aAAa,CAAC,CAAC,CAAC;CACrB,CAAA;AAED,eAAe,MAAM,CAAA"}
@@ -5,24 +5,29 @@ const schema = i.schema({
5
5
  email: i.string().unique().indexed(),
6
6
  }),
7
7
  accountMailCounts: i.entity({
8
- processed: i.number().indexed(),
9
- total: i.number().indexed(),
8
+ processed: i.number(),
9
+ total: i.number(),
10
+ userId: i.string().indexed(),
10
11
  }),
11
12
  accountSettings: i.entity({
12
13
  color: i.string(),
13
14
  name: i.string().optional(),
15
+ userId: i.string().indexed(),
14
16
  }),
15
17
  accounts: i.entity({
16
18
  imapConnectionStatus: i.string().indexed(),
19
+ userId: i.string().indexed(),
17
20
  }),
18
21
  aliases: i.entity({
19
22
  emailAddress: i.string().indexed(),
20
23
  isPrimary: i.boolean().indexed(),
21
24
  name: i.string().optional(),
25
+ userId: i.string().indexed(),
22
26
  }),
23
27
  contacts: i.entity({
24
28
  emailAddress: i.string().indexed(),
25
29
  name: i.string().optional(),
30
+ userId: i.string().indexed(),
26
31
  }),
27
32
  draftAttachments: i.entity({
28
33
  failed: i.boolean(),
@@ -31,10 +36,12 @@ const schema = i.schema({
31
36
  totalChunks: i.number(),
32
37
  totalSize: i.number(),
33
38
  uploadedChunks: i.number(),
39
+ userId: i.string().indexed(),
34
40
  }),
35
41
  draftRecipients: i.entity({
36
- emailAddress: i.string().indexed(),
37
- recipientType: i.string().indexed(),
42
+ emailAddress: i.string(),
43
+ recipientType: i.string(),
44
+ userId: i.string().indexed(),
38
45
  }),
39
46
  drafts: i.entity({
40
47
  bodyContent: i.string(),
@@ -48,11 +55,13 @@ const schema = i.schema({
48
55
  status: i.string().indexed(),
49
56
  type: i.string().indexed(),
50
57
  updatedAt: i.number().indexed(),
58
+ userId: i.string().indexed(),
51
59
  }),
52
60
  labels: i.entity({
53
61
  labelId: i.string().indexed(),
54
62
  path: i.string().indexed(),
55
63
  specialUse: i.string().indexed().optional(),
64
+ userId: i.string().indexed(),
56
65
  }),
57
66
  messageAttachments: i.entity({
58
67
  attachmentId: i.string().indexed(),
@@ -60,14 +69,17 @@ const schema = i.schema({
60
69
  mimeType: i.string(),
61
70
  size: i.number(),
62
71
  status: i.string().indexed(),
72
+ userId: i.string().indexed(),
63
73
  }),
64
74
  messageLabels: i.entity({
65
75
  labelId: i.string().indexed(),
76
+ userId: i.string().indexed(),
66
77
  }),
67
78
  messageRecipients: i.entity({
68
79
  emailAddress: i.string().indexed(),
69
80
  name: i.string().optional(),
70
- recipientType: i.string().indexed(),
81
+ recipientType: i.string(),
82
+ userId: i.string().indexed(),
71
83
  }),
72
84
  messages: i.entity({
73
85
  envelopeDate: i.number().indexed(),
@@ -76,9 +88,15 @@ const schema = i.schema({
76
88
  fromName: i.string().optional(),
77
89
  messageId: i.string().indexed(),
78
90
  previewText: i.string(),
91
+ userId: i.string().indexed(),
79
92
  }),
80
93
  threadBagOfWords: i.entity({
81
- word: i.string().indexed(),
94
+ word: i.string().unique().indexed(),
95
+ }),
96
+ threadBagOfWordsLink: i.entity({
97
+ threadId: i.string().indexed(),
98
+ userId: i.string().indexed(),
99
+ wordId: i.string().indexed(),
82
100
  }),
83
101
  threads: i.entity({
84
102
  emailAccountId: i.string().indexed(),
@@ -88,15 +106,18 @@ const schema = i.schema({
88
106
  messageIds: i.json(),
89
107
  participants: i.json(),
90
108
  seen: i.boolean().indexed(),
109
+ userId: i.string().indexed(),
91
110
  }),
92
111
  userPushNotificationToken: i.entity({
93
112
  createdAt: i.number().indexed(),
94
113
  token: i.string().unique().indexed(),
114
+ userId: i.string().indexed(),
95
115
  }),
96
116
  userSettings: i.entity({
97
117
  name: i.string().optional(),
98
118
  profilePicture: i.string().optional(),
99
119
  undoSendEnabled: i.boolean(),
120
+ userId: i.string().indexed(),
100
121
  }),
101
122
  },
102
123
  links: {
@@ -144,9 +165,9 @@ const schema = i.schema({
144
165
  forward: { has: 'one', label: 'account', on: 'threads' },
145
166
  reverse: { has: 'many', label: 'threads', on: 'accounts' },
146
167
  },
147
- threadBagOfWordsLinks: {
148
- forward: { has: 'one', label: 'thread', on: 'threadBagOfWords' },
149
- reverse: { has: 'many', label: 'bagOfWords', on: 'threads' },
168
+ threadBagOfWordsJunction: {
169
+ forward: { has: 'one', label: 'thread', on: 'threadBagOfWordsLink' },
170
+ reverse: { has: 'many', label: 'wordLinks', on: 'threads' },
150
171
  },
151
172
  threadMessages: {
152
173
  forward: { has: 'one', label: 'thread', on: 'messages' },
@@ -168,6 +189,10 @@ const schema = i.schema({
168
189
  forward: { has: 'one', label: 'userSettings', on: 'userPushNotificationToken' },
169
190
  reverse: { has: 'many', label: 'pushNotificationTokens', on: 'userSettings' },
170
191
  },
192
+ wordBagOfWordsJunction: {
193
+ forward: { has: 'one', label: 'word', on: 'threadBagOfWordsLink' },
194
+ reverse: { has: 'many', label: 'threadLinks', on: 'threadBagOfWords' },
195
+ },
171
196
  },
172
197
  rooms: {},
173
198
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "2.0.411",
3
+ "version": "2.0.412",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",