@marcoappio/marco-config 2.0.412 → 2.0.414

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.
@@ -90,12 +90,6 @@ declare const rules: {
90
90
  };
91
91
  bind: string[];
92
92
  };
93
- messageRecipients: {
94
- allow: {
95
- view: string;
96
- };
97
- bind: string[];
98
- };
99
93
  messages: {
100
94
  allow: {
101
95
  view: string;
@@ -106,15 +100,7 @@ declare const rules: {
106
100
  allow: {
107
101
  view: string;
108
102
  };
109
- bind: string[];
110
- };
111
- threadBagOfWordsLink: {
112
- allow: {
113
- create: string;
114
- delete: string;
115
- view: string;
116
- };
117
- bind: string[];
103
+ bind: never[];
118
104
  };
119
105
  threads: {
120
106
  allow: {
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"instant.perms.d.ts","sourceRoot":"","sources":["../../src/instantDB/instant.perms.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmIa,CAAA;AAExB,eAAe,KAAK,CAAA"}
@@ -90,12 +90,6 @@ const rules = {
90
90
  },
91
91
  bind: ['isOwner', 'data.userId == auth.id'],
92
92
  },
93
- messageRecipients: {
94
- allow: {
95
- view: 'isOwner',
96
- },
97
- bind: ['isOwner', 'data.userId == auth.id'],
98
- },
99
93
  messages: {
100
94
  allow: {
101
95
  view: 'isOwner',
@@ -106,15 +100,7 @@ const rules = {
106
100
  allow: {
107
101
  view: 'auth.id != null',
108
102
  },
109
- bind: ['hasLink', 'auth.id in data.ref("threadLinks.userId")'],
110
- },
111
- threadBagOfWordsLink: {
112
- allow: {
113
- create: 'isOwner',
114
- delete: 'isOwner',
115
- view: 'isOwner',
116
- },
117
- bind: ['isOwner', 'data.userId == auth.id'],
103
+ bind: [],
118
104
  },
119
105
  threads: {
120
106
  allow: {
@@ -74,12 +74,6 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
74
74
  labelId: import("@instantdb/core").DataAttrDef<string, true, true>;
75
75
  userId: import("@instantdb/core").DataAttrDef<string, true, true>;
76
76
  }, {}, void>;
77
- messageRecipients: import("@instantdb/core").EntityDef<{
78
- emailAddress: import("@instantdb/core").DataAttrDef<string, true, true>;
79
- name: import("@instantdb/core").DataAttrDef<string, false, false>;
80
- recipientType: import("@instantdb/core").DataAttrDef<string, true, false>;
81
- userId: import("@instantdb/core").DataAttrDef<string, true, true>;
82
- }, {}, void>;
83
77
  messages: import("@instantdb/core").EntityDef<{
84
78
  envelopeDate: import("@instantdb/core").DataAttrDef<number, true, true>;
85
79
  envelopeSubject: import("@instantdb/core").DataAttrDef<string, false, false>;
@@ -87,16 +81,12 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
87
81
  fromName: import("@instantdb/core").DataAttrDef<string, false, false>;
88
82
  messageId: import("@instantdb/core").DataAttrDef<string, true, true>;
89
83
  previewText: import("@instantdb/core").DataAttrDef<string, true, false>;
84
+ recipients: import("@instantdb/core").DataAttrDef<any, true, false>;
90
85
  userId: import("@instantdb/core").DataAttrDef<string, true, true>;
91
86
  }, {}, void>;
92
87
  threadBagOfWords: import("@instantdb/core").EntityDef<{
93
88
  word: import("@instantdb/core").DataAttrDef<string, true, true>;
94
89
  }, {}, 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>;
100
90
  threads: import("@instantdb/core").EntityDef<{
101
91
  emailAccountId: import("@instantdb/core").DataAttrDef<string, true, true>;
102
92
  flagged: import("@instantdb/core").DataAttrDef<boolean, true, true>;
@@ -108,7 +98,6 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
108
98
  userId: import("@instantdb/core").DataAttrDef<string, true, true>;
109
99
  }, {}, void>;
110
100
  userPushNotificationToken: import("@instantdb/core").EntityDef<{
111
- createdAt: import("@instantdb/core").DataAttrDef<number, true, true>;
112
101
  token: import("@instantdb/core").DataAttrDef<string, true, true>;
113
102
  userId: import("@instantdb/core").DataAttrDef<string, true, true>;
114
103
  }, {}, void>;
@@ -227,18 +216,6 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
227
216
  readonly on: "messages";
228
217
  };
229
218
  };
230
- readonly messageRecipientLinks: {
231
- readonly forward: {
232
- readonly has: "one";
233
- readonly label: "message";
234
- readonly on: "messageRecipients";
235
- };
236
- readonly reverse: {
237
- readonly has: "many";
238
- readonly label: "recipients";
239
- readonly on: "messages";
240
- };
241
- };
242
219
  readonly threadAccount: {
243
220
  readonly forward: {
244
221
  readonly has: "one";
@@ -251,28 +228,28 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
251
228
  readonly on: "accounts";
252
229
  };
253
230
  };
254
- readonly threadBagOfWordsJunction: {
231
+ readonly threadMessages: {
255
232
  readonly forward: {
256
233
  readonly has: "one";
257
234
  readonly label: "thread";
258
- readonly on: "threadBagOfWordsLink";
235
+ readonly on: "messages";
259
236
  };
260
237
  readonly reverse: {
261
238
  readonly has: "many";
262
- readonly label: "wordLinks";
239
+ readonly label: "messages";
263
240
  readonly on: "threads";
264
241
  };
265
242
  };
266
- readonly threadMessages: {
243
+ readonly threadWords: {
267
244
  readonly forward: {
268
- readonly has: "one";
269
- readonly label: "thread";
270
- readonly on: "messages";
245
+ readonly has: "many";
246
+ readonly label: "words";
247
+ readonly on: "threads";
271
248
  };
272
249
  readonly reverse: {
273
250
  readonly has: "many";
274
- readonly label: "messages";
275
- readonly on: "threads";
251
+ readonly label: "threads";
252
+ readonly on: "threadBagOfWords";
276
253
  };
277
254
  };
278
255
  readonly userAccounts: {
@@ -323,18 +300,6 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
323
300
  readonly on: "userSettings";
324
301
  };
325
302
  };
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
- };
338
303
  }>, import("@instantdb/core").LinksDef<any>, {}>;
339
304
  type BaseAppSchema = typeof schema;
340
305
  export type AppSchema = {
@@ -355,15 +320,19 @@ export type AppSchema = {
355
320
  messageAttachments: Omit<BaseAppSchema['entities']['messageAttachments'], 'status'> & {
356
321
  status: MessageAttachmentStatus;
357
322
  };
358
- messageRecipients: Omit<BaseAppSchema['entities']['messageRecipients'], 'recipientType'> & {
359
- recipientType: MessageRecipientType;
323
+ messages: Omit<BaseAppSchema['entities']['messages'], 'recipients'> & {
324
+ recipients: Array<{
325
+ email: string;
326
+ name: string | null;
327
+ type: MessageRecipientType;
328
+ }>;
360
329
  };
361
330
  threads: Omit<BaseAppSchema['entities']['threads'], 'labelIds' | 'messageIds' | 'participants'> & {
362
331
  labelIds: string[];
363
332
  messageIds: string[];
364
333
  participants: string[];
365
334
  };
366
- } & Omit<BaseAppSchema['entities'], 'accounts' | 'draftRecipients' | 'drafts' | 'labels' | 'messageAttachments' | 'messageRecipients' | 'threads'> : BaseAppSchema[K];
335
+ } & Omit<BaseAppSchema['entities'], 'accounts' | 'draftRecipients' | 'drafts' | 'labels' | 'messageAttachments' | 'messages' | 'threads'> : BaseAppSchema[K];
367
336
  };
368
337
  export default schema;
369
338
  //# sourceMappingURL=instant.schema.d.ts.map
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAoMV,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,aAAa,EAAE,kBAAkB,CAAA;SAClC,CAAA;QACD,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AI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC,EAAE,QAAQ,CAAC,GAAG;YACpF,MAAM,EAAE,uBAAuB,CAAA;SAChC,CAAA;QACD,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC,GAAG;YACpE,UAAU,EAAE,KAAK,CAAC;gBAChB,KAAK,EAAE,MAAM,CAAA;gBACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;gBACnB,IAAI,EAAE,oBAAoB,CAAA;aAC3B,CAAC,CAAA;SACH,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,UAAU,GAAG,SAAS,CACrG,GACD,aAAa,CAAC,CAAC,CAAC;CACrB,CAAA;AAED,eAAe,MAAM,CAAA"}
@@ -75,12 +75,6 @@ const schema = i.schema({
75
75
  labelId: i.string().indexed(),
76
76
  userId: i.string().indexed(),
77
77
  }),
78
- messageRecipients: i.entity({
79
- emailAddress: i.string().indexed(),
80
- name: i.string().optional(),
81
- recipientType: i.string(),
82
- userId: i.string().indexed(),
83
- }),
84
78
  messages: i.entity({
85
79
  envelopeDate: i.number().indexed(),
86
80
  envelopeSubject: i.string().optional(),
@@ -88,16 +82,12 @@ const schema = i.schema({
88
82
  fromName: i.string().optional(),
89
83
  messageId: i.string().indexed(),
90
84
  previewText: i.string(),
85
+ recipients: i.json(),
91
86
  userId: i.string().indexed(),
92
87
  }),
93
88
  threadBagOfWords: i.entity({
94
89
  word: i.string().unique().indexed(),
95
90
  }),
96
- threadBagOfWordsLink: i.entity({
97
- threadId: i.string().indexed(),
98
- userId: i.string().indexed(),
99
- wordId: i.string().indexed(),
100
- }),
101
91
  threads: i.entity({
102
92
  emailAccountId: i.string().indexed(),
103
93
  flagged: i.boolean().indexed(),
@@ -109,7 +99,6 @@ const schema = i.schema({
109
99
  userId: i.string().indexed(),
110
100
  }),
111
101
  userPushNotificationToken: i.entity({
112
- createdAt: i.number().indexed(),
113
102
  token: i.string().unique().indexed(),
114
103
  userId: i.string().indexed(),
115
104
  }),
@@ -157,22 +146,18 @@ const schema = i.schema({
157
146
  forward: { has: 'one', label: 'message', on: 'messageLabels' },
158
147
  reverse: { has: 'many', label: 'labelIds', on: 'messages' },
159
148
  },
160
- messageRecipientLinks: {
161
- forward: { has: 'one', label: 'message', on: 'messageRecipients' },
162
- reverse: { has: 'many', label: 'recipients', on: 'messages' },
163
- },
164
149
  threadAccount: {
165
150
  forward: { has: 'one', label: 'account', on: 'threads' },
166
151
  reverse: { has: 'many', label: 'threads', on: 'accounts' },
167
152
  },
168
- threadBagOfWordsJunction: {
169
- forward: { has: 'one', label: 'thread', on: 'threadBagOfWordsLink' },
170
- reverse: { has: 'many', label: 'wordLinks', on: 'threads' },
171
- },
172
153
  threadMessages: {
173
154
  forward: { has: 'one', label: 'thread', on: 'messages' },
174
155
  reverse: { has: 'many', label: 'messages', on: 'threads' },
175
156
  },
157
+ threadWords: {
158
+ forward: { has: 'many', label: 'words', on: 'threads' },
159
+ reverse: { has: 'many', label: 'threads', on: 'threadBagOfWords' },
160
+ },
176
161
  userAccounts: {
177
162
  forward: { has: 'one', label: 'user', on: 'accounts' },
178
163
  reverse: { has: 'many', label: 'accounts', on: '$users' },
@@ -189,10 +174,6 @@ const schema = i.schema({
189
174
  forward: { has: 'one', label: 'userSettings', on: 'userPushNotificationToken' },
190
175
  reverse: { has: 'many', label: 'pushNotificationTokens', on: 'userSettings' },
191
176
  },
192
- wordBagOfWordsJunction: {
193
- forward: { has: 'one', label: 'word', on: 'threadBagOfWordsLink' },
194
- reverse: { has: 'many', label: 'threadLinks', on: 'threadBagOfWords' },
195
- },
196
177
  },
197
178
  rooms: {},
198
179
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "2.0.412",
3
+ "version": "2.0.414",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",