@marcoappio/marco-config 2.0.411 → 2.0.413
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/dist/instantDB/instant.perms.d.ts +3 -33
- package/dist/instantDB/instant.perms.d.ts.map +1 -1
- package/dist/instantDB/instant.perms.js +17 -47
- package/dist/instantDB/instant.schema.d.ts +87 -110
- package/dist/instantDB/instant.schema.d.ts.map +1 -1
- package/dist/instantDB/instant.schema.js +39 -57
- package/package.json +1 -1
|
@@ -5,12 +5,6 @@ declare const rules: {
|
|
|
5
5
|
};
|
|
6
6
|
bind: string[];
|
|
7
7
|
};
|
|
8
|
-
accountMailCounts: {
|
|
9
|
-
allow: {
|
|
10
|
-
view: string;
|
|
11
|
-
};
|
|
12
|
-
bind: string[];
|
|
13
|
-
};
|
|
14
8
|
accountSettings: {
|
|
15
9
|
allow: {
|
|
16
10
|
update: string;
|
|
@@ -51,15 +45,6 @@ declare const rules: {
|
|
|
51
45
|
};
|
|
52
46
|
bind: string[];
|
|
53
47
|
};
|
|
54
|
-
draftRecipients: {
|
|
55
|
-
allow: {
|
|
56
|
-
create: string;
|
|
57
|
-
delete: string;
|
|
58
|
-
update: string;
|
|
59
|
-
view: string;
|
|
60
|
-
};
|
|
61
|
-
bind: string[];
|
|
62
|
-
};
|
|
63
48
|
drafts: {
|
|
64
49
|
allow: {
|
|
65
50
|
create: string;
|
|
@@ -75,34 +60,19 @@ declare const rules: {
|
|
|
75
60
|
};
|
|
76
61
|
bind: string[];
|
|
77
62
|
};
|
|
78
|
-
|
|
79
|
-
allow: {
|
|
80
|
-
view: string;
|
|
81
|
-
};
|
|
82
|
-
bind: string[];
|
|
83
|
-
};
|
|
84
|
-
messageLabels: {
|
|
85
|
-
allow: {
|
|
86
|
-
create: string;
|
|
87
|
-
delete: string;
|
|
88
|
-
update: string;
|
|
89
|
-
view: string;
|
|
90
|
-
};
|
|
91
|
-
bind: string[];
|
|
92
|
-
};
|
|
93
|
-
messageRecipients: {
|
|
63
|
+
messages: {
|
|
94
64
|
allow: {
|
|
95
65
|
view: string;
|
|
96
66
|
};
|
|
97
67
|
bind: string[];
|
|
98
68
|
};
|
|
99
|
-
|
|
69
|
+
threadBagOfWords: {
|
|
100
70
|
allow: {
|
|
101
71
|
view: string;
|
|
102
72
|
};
|
|
103
73
|
bind: string[];
|
|
104
74
|
};
|
|
105
|
-
|
|
75
|
+
threadBagOfWordsLink: {
|
|
106
76
|
allow: {
|
|
107
77
|
view: string;
|
|
108
78
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instant.perms.d.ts","sourceRoot":"","sources":["../../src/instantDB/instant.perms.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"instant.perms.d.ts","sourceRoot":"","sources":["../../src/instantDB/instant.perms.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2Ga,CAAA;AAExB,eAAe,KAAK,CAAA"}
|
|
@@ -5,18 +5,12 @@ const rules = {
|
|
|
5
5
|
},
|
|
6
6
|
bind: ['isOwner', 'data.id == auth.id'],
|
|
7
7
|
},
|
|
8
|
-
accountMailCounts: {
|
|
9
|
-
allow: {
|
|
10
|
-
view: 'isOwner',
|
|
11
|
-
},
|
|
12
|
-
bind: ['isOwner', 'data.account.user.id == auth.id'],
|
|
13
|
-
},
|
|
14
8
|
accountSettings: {
|
|
15
9
|
allow: {
|
|
16
10
|
update: 'isOwner',
|
|
17
11
|
view: 'isOwner',
|
|
18
12
|
},
|
|
19
|
-
bind: ['isOwner', 'data.
|
|
13
|
+
bind: ['isOwner', 'data.userId == auth.id'],
|
|
20
14
|
},
|
|
21
15
|
accounts: {
|
|
22
16
|
allow: {
|
|
@@ -25,7 +19,7 @@ const rules = {
|
|
|
25
19
|
update: 'isOwner',
|
|
26
20
|
view: 'isOwner',
|
|
27
21
|
},
|
|
28
|
-
bind: ['isOwner', 'data.
|
|
22
|
+
bind: ['isOwner', 'data.userId == auth.id'],
|
|
29
23
|
},
|
|
30
24
|
aliases: {
|
|
31
25
|
allow: {
|
|
@@ -34,13 +28,13 @@ const rules = {
|
|
|
34
28
|
update: 'isOwner',
|
|
35
29
|
view: 'isOwner',
|
|
36
30
|
},
|
|
37
|
-
bind: ['isOwner', 'data.
|
|
31
|
+
bind: ['isOwner', 'data.userId == auth.id'],
|
|
38
32
|
},
|
|
39
33
|
contacts: {
|
|
40
34
|
allow: {
|
|
41
35
|
view: 'isOwner',
|
|
42
36
|
},
|
|
43
|
-
bind: ['isOwner', 'data.
|
|
37
|
+
bind: ['isOwner', 'data.userId == auth.id'],
|
|
44
38
|
},
|
|
45
39
|
draftAttachments: {
|
|
46
40
|
allow: {
|
|
@@ -49,16 +43,7 @@ const rules = {
|
|
|
49
43
|
update: 'isOwner',
|
|
50
44
|
view: 'isOwner',
|
|
51
45
|
},
|
|
52
|
-
bind: ['isOwner', 'data.
|
|
53
|
-
},
|
|
54
|
-
draftRecipients: {
|
|
55
|
-
allow: {
|
|
56
|
-
create: 'isOwner',
|
|
57
|
-
delete: 'isOwner',
|
|
58
|
-
update: 'isOwner',
|
|
59
|
-
view: 'isOwner',
|
|
60
|
-
},
|
|
61
|
-
bind: ['isOwner', 'data.draft.account.user.id == auth.id'],
|
|
46
|
+
bind: ['isOwner', 'data.userId == auth.id'],
|
|
62
47
|
},
|
|
63
48
|
drafts: {
|
|
64
49
|
allow: {
|
|
@@ -67,46 +52,31 @@ const rules = {
|
|
|
67
52
|
update: 'isOwner',
|
|
68
53
|
view: 'isOwner',
|
|
69
54
|
},
|
|
70
|
-
bind: ['isOwner', 'data.
|
|
55
|
+
bind: ['isOwner', 'data.userId == auth.id'],
|
|
71
56
|
},
|
|
72
57
|
labels: {
|
|
73
58
|
allow: {
|
|
74
59
|
view: 'isOwner',
|
|
75
60
|
},
|
|
76
|
-
bind: ['isOwner', 'data.
|
|
61
|
+
bind: ['isOwner', 'data.userId == auth.id'],
|
|
77
62
|
},
|
|
78
|
-
|
|
79
|
-
allow: {
|
|
80
|
-
view: 'isOwner',
|
|
81
|
-
},
|
|
82
|
-
bind: ['isOwner', 'data.message.thread.account.user.id == auth.id'],
|
|
83
|
-
},
|
|
84
|
-
messageLabels: {
|
|
85
|
-
allow: {
|
|
86
|
-
create: 'isOwner',
|
|
87
|
-
delete: 'isOwner',
|
|
88
|
-
update: 'isOwner',
|
|
89
|
-
view: 'isOwner',
|
|
90
|
-
},
|
|
91
|
-
bind: ['isOwner', 'data.message.thread.account.user.id == auth.id'],
|
|
92
|
-
},
|
|
93
|
-
messageRecipients: {
|
|
63
|
+
messages: {
|
|
94
64
|
allow: {
|
|
95
65
|
view: 'isOwner',
|
|
96
66
|
},
|
|
97
|
-
bind: ['isOwner', 'data.
|
|
67
|
+
bind: ['isOwner', 'data.userId == auth.id'],
|
|
98
68
|
},
|
|
99
|
-
|
|
69
|
+
threadBagOfWords: {
|
|
100
70
|
allow: {
|
|
101
|
-
view: '
|
|
71
|
+
view: 'hasLink',
|
|
102
72
|
},
|
|
103
|
-
bind: ['
|
|
73
|
+
bind: ['hasLink', 'auth.id in data.ref("threadLinks.userId")'],
|
|
104
74
|
},
|
|
105
|
-
|
|
75
|
+
threadBagOfWordsLink: {
|
|
106
76
|
allow: {
|
|
107
77
|
view: 'isOwner',
|
|
108
78
|
},
|
|
109
|
-
bind: ['isOwner', 'data.
|
|
79
|
+
bind: ['isOwner', 'data.userId == auth.id'],
|
|
110
80
|
},
|
|
111
81
|
threads: {
|
|
112
82
|
allow: {
|
|
@@ -115,7 +85,7 @@ const rules = {
|
|
|
115
85
|
update: 'isOwner',
|
|
116
86
|
view: 'isOwner',
|
|
117
87
|
},
|
|
118
|
-
bind: ['isOwner', 'data.
|
|
88
|
+
bind: ['isOwner', 'data.userId == auth.id'],
|
|
119
89
|
},
|
|
120
90
|
userPushNotificationToken: {
|
|
121
91
|
allow: {
|
|
@@ -124,7 +94,7 @@ const rules = {
|
|
|
124
94
|
update: 'isOwner',
|
|
125
95
|
view: 'isOwner',
|
|
126
96
|
},
|
|
127
|
-
bind: ['isOwner', 'data.
|
|
97
|
+
bind: ['isOwner', 'data.userId == auth.id'],
|
|
128
98
|
},
|
|
129
99
|
userSettings: {
|
|
130
100
|
allow: {
|
|
@@ -133,7 +103,7 @@ const rules = {
|
|
|
133
103
|
update: 'isOwner',
|
|
134
104
|
view: 'isOwner',
|
|
135
105
|
},
|
|
136
|
-
bind: ['isOwner', 'data.
|
|
106
|
+
bind: ['isOwner', 'data.userId == auth.id'],
|
|
137
107
|
},
|
|
138
108
|
};
|
|
139
109
|
export default rules;
|
|
@@ -3,25 +3,27 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
|
|
|
3
3
|
$users: import("@instantdb/core").EntityDef<{
|
|
4
4
|
email: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
5
5
|
}, {}, void>;
|
|
6
|
-
accountMailCounts: import("@instantdb/core").EntityDef<{
|
|
7
|
-
processed: import("@instantdb/core").DataAttrDef<number, true, true>;
|
|
8
|
-
total: import("@instantdb/core").DataAttrDef<number, true, true>;
|
|
9
|
-
}, {}, void>;
|
|
10
6
|
accountSettings: import("@instantdb/core").EntityDef<{
|
|
11
7
|
color: import("@instantdb/core").DataAttrDef<string, true, false>;
|
|
8
|
+
mailProcessed: import("@instantdb/core").DataAttrDef<number, true, false>;
|
|
9
|
+
mailTotal: import("@instantdb/core").DataAttrDef<number, true, false>;
|
|
12
10
|
name: import("@instantdb/core").DataAttrDef<string, false, false>;
|
|
11
|
+
userId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
13
12
|
}, {}, void>;
|
|
14
13
|
accounts: import("@instantdb/core").EntityDef<{
|
|
15
14
|
imapConnectionStatus: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
15
|
+
userId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
16
16
|
}, {}, void>;
|
|
17
17
|
aliases: import("@instantdb/core").EntityDef<{
|
|
18
18
|
emailAddress: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
19
19
|
isPrimary: import("@instantdb/core").DataAttrDef<boolean, true, true>;
|
|
20
20
|
name: import("@instantdb/core").DataAttrDef<string, false, false>;
|
|
21
|
+
userId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
21
22
|
}, {}, void>;
|
|
22
23
|
contacts: import("@instantdb/core").EntityDef<{
|
|
23
24
|
emailAddress: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
24
25
|
name: import("@instantdb/core").DataAttrDef<string, false, false>;
|
|
26
|
+
userId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
25
27
|
}, {}, void>;
|
|
26
28
|
draftAttachments: import("@instantdb/core").EntityDef<{
|
|
27
29
|
failed: import("@instantdb/core").DataAttrDef<boolean, true, false>;
|
|
@@ -30,55 +32,48 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
|
|
|
30
32
|
totalChunks: import("@instantdb/core").DataAttrDef<number, true, false>;
|
|
31
33
|
totalSize: import("@instantdb/core").DataAttrDef<number, true, false>;
|
|
32
34
|
uploadedChunks: import("@instantdb/core").DataAttrDef<number, true, false>;
|
|
33
|
-
|
|
34
|
-
draftRecipients: import("@instantdb/core").EntityDef<{
|
|
35
|
-
emailAddress: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
36
|
-
recipientType: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
35
|
+
userId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
37
36
|
}, {}, void>;
|
|
38
37
|
drafts: import("@instantdb/core").EntityDef<{
|
|
39
38
|
bodyContent: import("@instantdb/core").DataAttrDef<string, true, false>;
|
|
40
39
|
bodySubject: import("@instantdb/core").DataAttrDef<string, false, false>;
|
|
41
40
|
emailAccountId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
42
41
|
error: import("@instantdb/core").DataAttrDef<string, false, false>;
|
|
43
|
-
from: import("@instantdb/core").DataAttrDef<
|
|
44
|
-
|
|
42
|
+
from: import("@instantdb/core").DataAttrDef<any, true, false>;
|
|
43
|
+
recipients: import("@instantdb/core").DataAttrDef<any, true, false>;
|
|
45
44
|
referencedMessageId: import("@instantdb/core").DataAttrDef<string, false, true>;
|
|
46
45
|
scheduledFor: import("@instantdb/core").DataAttrDef<number, false, true>;
|
|
47
46
|
status: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
48
47
|
type: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
49
48
|
updatedAt: import("@instantdb/core").DataAttrDef<number, true, true>;
|
|
49
|
+
userId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
50
50
|
}, {}, void>;
|
|
51
51
|
labels: import("@instantdb/core").EntityDef<{
|
|
52
52
|
labelId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
53
53
|
path: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
54
54
|
specialUse: import("@instantdb/core").DataAttrDef<string, false, true>;
|
|
55
|
-
|
|
56
|
-
messageAttachments: import("@instantdb/core").EntityDef<{
|
|
57
|
-
attachmentId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
58
|
-
fileName: import("@instantdb/core").DataAttrDef<string, true, false>;
|
|
59
|
-
mimeType: import("@instantdb/core").DataAttrDef<string, true, false>;
|
|
60
|
-
size: import("@instantdb/core").DataAttrDef<number, true, false>;
|
|
61
|
-
status: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
62
|
-
}, {}, void>;
|
|
63
|
-
messageLabels: import("@instantdb/core").EntityDef<{
|
|
64
|
-
labelId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
65
|
-
}, {}, void>;
|
|
66
|
-
messageRecipients: import("@instantdb/core").EntityDef<{
|
|
67
|
-
emailAddress: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
68
|
-
name: import("@instantdb/core").DataAttrDef<string, false, false>;
|
|
69
|
-
recipientType: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
55
|
+
userId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
70
56
|
}, {}, void>;
|
|
71
57
|
messages: import("@instantdb/core").EntityDef<{
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
58
|
+
attachments: import("@instantdb/core").DataAttrDef<any, true, false>;
|
|
59
|
+
date: import("@instantdb/core").DataAttrDef<number, true, true>;
|
|
60
|
+
from: import("@instantdb/core").DataAttrDef<any, true, false>;
|
|
61
|
+
labelIds: import("@instantdb/core").DataAttrDef<any, true, false>;
|
|
76
62
|
messageId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
77
63
|
previewText: import("@instantdb/core").DataAttrDef<string, true, false>;
|
|
64
|
+
recipients: import("@instantdb/core").DataAttrDef<any, true, false>;
|
|
65
|
+
subject: import("@instantdb/core").DataAttrDef<string, false, false>;
|
|
66
|
+
threadId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
67
|
+
userId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
78
68
|
}, {}, void>;
|
|
79
69
|
threadBagOfWords: import("@instantdb/core").EntityDef<{
|
|
80
70
|
word: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
81
71
|
}, {}, void>;
|
|
72
|
+
threadBagOfWordsLink: import("@instantdb/core").EntityDef<{
|
|
73
|
+
threadId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
74
|
+
userId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
75
|
+
wordId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
76
|
+
}, {}, void>;
|
|
82
77
|
threads: import("@instantdb/core").EntityDef<{
|
|
83
78
|
emailAccountId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
84
79
|
flagged: import("@instantdb/core").DataAttrDef<boolean, true, true>;
|
|
@@ -87,15 +82,18 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
|
|
|
87
82
|
messageIds: import("@instantdb/core").DataAttrDef<any, true, false>;
|
|
88
83
|
participants: import("@instantdb/core").DataAttrDef<any, true, false>;
|
|
89
84
|
seen: import("@instantdb/core").DataAttrDef<boolean, true, true>;
|
|
85
|
+
threadId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
86
|
+
userId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
90
87
|
}, {}, void>;
|
|
91
88
|
userPushNotificationToken: import("@instantdb/core").EntityDef<{
|
|
92
|
-
createdAt: import("@instantdb/core").DataAttrDef<number, true, true>;
|
|
93
89
|
token: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
90
|
+
userId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
94
91
|
}, {}, void>;
|
|
95
92
|
userSettings: import("@instantdb/core").EntityDef<{
|
|
96
93
|
name: import("@instantdb/core").DataAttrDef<string, false, false>;
|
|
97
94
|
profilePicture: import("@instantdb/core").DataAttrDef<string, false, false>;
|
|
98
95
|
undoSendEnabled: import("@instantdb/core").DataAttrDef<boolean, true, false>;
|
|
96
|
+
userId: import("@instantdb/core").DataAttrDef<string, true, true>;
|
|
99
97
|
}, {}, void>;
|
|
100
98
|
}, {
|
|
101
99
|
readonly accountAliases: {
|
|
@@ -122,18 +120,6 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
|
|
|
122
120
|
readonly on: "accounts";
|
|
123
121
|
};
|
|
124
122
|
};
|
|
125
|
-
readonly accountMailCountsLink: {
|
|
126
|
-
readonly forward: {
|
|
127
|
-
readonly has: "one";
|
|
128
|
-
readonly label: "account";
|
|
129
|
-
readonly on: "accountMailCounts";
|
|
130
|
-
};
|
|
131
|
-
readonly reverse: {
|
|
132
|
-
readonly has: "one";
|
|
133
|
-
readonly label: "mailCounts";
|
|
134
|
-
readonly on: "accounts";
|
|
135
|
-
};
|
|
136
|
-
};
|
|
137
123
|
readonly accountSettingsLink: {
|
|
138
124
|
readonly forward: {
|
|
139
125
|
readonly has: "one";
|
|
@@ -170,52 +156,16 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
|
|
|
170
156
|
readonly on: "drafts";
|
|
171
157
|
};
|
|
172
158
|
};
|
|
173
|
-
readonly
|
|
174
|
-
readonly forward: {
|
|
175
|
-
readonly has: "one";
|
|
176
|
-
readonly label: "draft";
|
|
177
|
-
readonly on: "draftRecipients";
|
|
178
|
-
};
|
|
179
|
-
readonly reverse: {
|
|
180
|
-
readonly has: "many";
|
|
181
|
-
readonly label: "bodyRecipients";
|
|
182
|
-
readonly on: "drafts";
|
|
183
|
-
};
|
|
184
|
-
};
|
|
185
|
-
readonly messageAttachmentLinks: {
|
|
186
|
-
readonly forward: {
|
|
187
|
-
readonly has: "one";
|
|
188
|
-
readonly label: "message";
|
|
189
|
-
readonly on: "messageAttachments";
|
|
190
|
-
};
|
|
191
|
-
readonly reverse: {
|
|
192
|
-
readonly has: "many";
|
|
193
|
-
readonly label: "attachments";
|
|
194
|
-
readonly on: "messages";
|
|
195
|
-
};
|
|
196
|
-
};
|
|
197
|
-
readonly messageLabelLinks: {
|
|
159
|
+
readonly messageThread: {
|
|
198
160
|
readonly forward: {
|
|
199
161
|
readonly has: "one";
|
|
200
|
-
readonly label: "
|
|
201
|
-
readonly on: "messageLabels";
|
|
202
|
-
};
|
|
203
|
-
readonly reverse: {
|
|
204
|
-
readonly has: "many";
|
|
205
|
-
readonly label: "labelIds";
|
|
162
|
+
readonly label: "thread";
|
|
206
163
|
readonly on: "messages";
|
|
207
164
|
};
|
|
208
|
-
};
|
|
209
|
-
readonly messageRecipientLinks: {
|
|
210
|
-
readonly forward: {
|
|
211
|
-
readonly has: "one";
|
|
212
|
-
readonly label: "message";
|
|
213
|
-
readonly on: "messageRecipients";
|
|
214
|
-
};
|
|
215
165
|
readonly reverse: {
|
|
216
166
|
readonly has: "many";
|
|
217
|
-
readonly label: "
|
|
218
|
-
readonly on: "
|
|
167
|
+
readonly label: "messages";
|
|
168
|
+
readonly on: "threads";
|
|
219
169
|
};
|
|
220
170
|
};
|
|
221
171
|
readonly threadAccount: {
|
|
@@ -230,27 +180,15 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
|
|
|
230
180
|
readonly on: "accounts";
|
|
231
181
|
};
|
|
232
182
|
};
|
|
233
|
-
readonly
|
|
234
|
-
readonly forward: {
|
|
235
|
-
readonly has: "one";
|
|
236
|
-
readonly label: "thread";
|
|
237
|
-
readonly on: "threadBagOfWords";
|
|
238
|
-
};
|
|
239
|
-
readonly reverse: {
|
|
240
|
-
readonly has: "many";
|
|
241
|
-
readonly label: "bagOfWords";
|
|
242
|
-
readonly on: "threads";
|
|
243
|
-
};
|
|
244
|
-
};
|
|
245
|
-
readonly threadMessages: {
|
|
183
|
+
readonly threadBagOfWordsJunction: {
|
|
246
184
|
readonly forward: {
|
|
247
185
|
readonly has: "one";
|
|
248
186
|
readonly label: "thread";
|
|
249
|
-
readonly on: "
|
|
187
|
+
readonly on: "threadBagOfWordsLink";
|
|
250
188
|
};
|
|
251
189
|
readonly reverse: {
|
|
252
190
|
readonly has: "many";
|
|
253
|
-
readonly label: "
|
|
191
|
+
readonly label: "wordLinks";
|
|
254
192
|
readonly on: "threads";
|
|
255
193
|
};
|
|
256
194
|
};
|
|
@@ -302,6 +240,18 @@ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instan
|
|
|
302
240
|
readonly on: "userSettings";
|
|
303
241
|
};
|
|
304
242
|
};
|
|
243
|
+
readonly wordBagOfWordsJunction: {
|
|
244
|
+
readonly forward: {
|
|
245
|
+
readonly has: "one";
|
|
246
|
+
readonly label: "word";
|
|
247
|
+
readonly on: "threadBagOfWordsLink";
|
|
248
|
+
};
|
|
249
|
+
readonly reverse: {
|
|
250
|
+
readonly has: "many";
|
|
251
|
+
readonly label: "threadLinks";
|
|
252
|
+
readonly on: "threadBagOfWords";
|
|
253
|
+
};
|
|
254
|
+
};
|
|
305
255
|
}>, import("@instantdb/core").LinksDef<any>, {}>;
|
|
306
256
|
type BaseAppSchema = typeof schema;
|
|
307
257
|
export type AppSchema = {
|
|
@@ -309,28 +259,55 @@ export type AppSchema = {
|
|
|
309
259
|
accounts: Omit<BaseAppSchema['entities']['accounts'], 'imapConnectionStatus'> & {
|
|
310
260
|
imapConnectionStatus: ImapConnectionStatus;
|
|
311
261
|
};
|
|
312
|
-
draftRecipients: Omit<BaseAppSchema['entities']['draftRecipients'], 'recipientType'> & {
|
|
313
|
-
recipientType: DraftRecipientType;
|
|
314
|
-
};
|
|
315
|
-
drafts: Omit<BaseAppSchema['entities']['drafts'], 'status' | 'type'> & {
|
|
316
|
-
status: DraftStatus;
|
|
317
|
-
type: DraftType;
|
|
318
|
-
};
|
|
319
262
|
labels: Omit<BaseAppSchema['entities']['labels'], 'specialUse'> & {
|
|
320
263
|
specialUse: LabelSpecialUse | null;
|
|
321
264
|
};
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
265
|
+
messages: Omit<BaseAppSchema['entities']['messages'], 'from' | 'recipients' | 'attachments' | 'labelIds'> & {
|
|
266
|
+
from: {
|
|
267
|
+
email: string;
|
|
268
|
+
name: string | null;
|
|
269
|
+
};
|
|
270
|
+
recipients: Array<{
|
|
271
|
+
email: string;
|
|
272
|
+
name: string | null;
|
|
273
|
+
type: MessageRecipientType;
|
|
274
|
+
}>;
|
|
275
|
+
attachments: Array<{
|
|
276
|
+
attachmentId: string;
|
|
277
|
+
fileName: string;
|
|
278
|
+
mimeType: string;
|
|
279
|
+
size: number;
|
|
280
|
+
status: MessageAttachmentStatus;
|
|
281
|
+
}>;
|
|
282
|
+
labelIds: string[];
|
|
327
283
|
};
|
|
328
284
|
threads: Omit<BaseAppSchema['entities']['threads'], 'labelIds' | 'messageIds' | 'participants'> & {
|
|
329
285
|
labelIds: string[];
|
|
330
286
|
messageIds: string[];
|
|
331
287
|
participants: string[];
|
|
332
288
|
};
|
|
333
|
-
|
|
289
|
+
drafts: Omit<BaseAppSchema['entities']['drafts'], 'from' | 'recipients' | 'attachments' | 'status' | 'type'> & {
|
|
290
|
+
from: {
|
|
291
|
+
email: string;
|
|
292
|
+
name: string | null;
|
|
293
|
+
};
|
|
294
|
+
recipients: Array<{
|
|
295
|
+
email: string;
|
|
296
|
+
name: string | null;
|
|
297
|
+
type: DraftRecipientType;
|
|
298
|
+
}>;
|
|
299
|
+
attachments: Array<{
|
|
300
|
+
fileName: string;
|
|
301
|
+
mimeType: string;
|
|
302
|
+
size: number;
|
|
303
|
+
uploadedChunks: number;
|
|
304
|
+
totalChunks: number;
|
|
305
|
+
failed: boolean;
|
|
306
|
+
}>;
|
|
307
|
+
status: DraftStatus;
|
|
308
|
+
type: DraftType;
|
|
309
|
+
};
|
|
310
|
+
} & Omit<BaseAppSchema['entities'], 'accounts' | 'drafts' | 'labels' | 'messages' | 'threads'> : BaseAppSchema[K];
|
|
334
311
|
};
|
|
335
312
|
export default schema;
|
|
336
313
|
//# 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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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B,CAAA;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -4,25 +4,27 @@ const schema = i.schema({
|
|
|
4
4
|
$users: i.entity({
|
|
5
5
|
email: i.string().unique().indexed(),
|
|
6
6
|
}),
|
|
7
|
-
accountMailCounts: i.entity({
|
|
8
|
-
processed: i.number().indexed(),
|
|
9
|
-
total: i.number().indexed(),
|
|
10
|
-
}),
|
|
11
7
|
accountSettings: i.entity({
|
|
12
8
|
color: i.string(),
|
|
9
|
+
mailProcessed: i.number(),
|
|
10
|
+
mailTotal: i.number(),
|
|
13
11
|
name: i.string().optional(),
|
|
12
|
+
userId: i.string().indexed(),
|
|
14
13
|
}),
|
|
15
14
|
accounts: i.entity({
|
|
16
15
|
imapConnectionStatus: i.string().indexed(),
|
|
16
|
+
userId: i.string().indexed(),
|
|
17
17
|
}),
|
|
18
18
|
aliases: i.entity({
|
|
19
19
|
emailAddress: i.string().indexed(),
|
|
20
20
|
isPrimary: i.boolean().indexed(),
|
|
21
21
|
name: i.string().optional(),
|
|
22
|
+
userId: i.string().indexed(),
|
|
22
23
|
}),
|
|
23
24
|
contacts: i.entity({
|
|
24
25
|
emailAddress: i.string().indexed(),
|
|
25
26
|
name: i.string().optional(),
|
|
27
|
+
userId: i.string().indexed(),
|
|
26
28
|
}),
|
|
27
29
|
draftAttachments: i.entity({
|
|
28
30
|
failed: i.boolean(),
|
|
@@ -31,54 +33,47 @@ const schema = i.schema({
|
|
|
31
33
|
totalChunks: i.number(),
|
|
32
34
|
totalSize: i.number(),
|
|
33
35
|
uploadedChunks: i.number(),
|
|
34
|
-
|
|
35
|
-
draftRecipients: i.entity({
|
|
36
|
-
emailAddress: i.string().indexed(),
|
|
37
|
-
recipientType: i.string().indexed(),
|
|
36
|
+
userId: i.string().indexed(),
|
|
38
37
|
}),
|
|
39
38
|
drafts: i.entity({
|
|
40
39
|
bodyContent: i.string(),
|
|
41
40
|
bodySubject: i.string().optional(),
|
|
42
41
|
emailAccountId: i.string().indexed(),
|
|
43
42
|
error: i.string().optional(),
|
|
44
|
-
from: i.
|
|
45
|
-
|
|
43
|
+
from: i.json(),
|
|
44
|
+
recipients: i.json(),
|
|
46
45
|
referencedMessageId: i.string().indexed().optional(),
|
|
47
46
|
scheduledFor: i.number().indexed().optional(),
|
|
48
47
|
status: i.string().indexed(),
|
|
49
48
|
type: i.string().indexed(),
|
|
50
49
|
updatedAt: i.number().indexed(),
|
|
50
|
+
userId: i.string().indexed(),
|
|
51
51
|
}),
|
|
52
52
|
labels: i.entity({
|
|
53
53
|
labelId: i.string().indexed(),
|
|
54
54
|
path: i.string().indexed(),
|
|
55
55
|
specialUse: i.string().indexed().optional(),
|
|
56
|
-
|
|
57
|
-
messageAttachments: i.entity({
|
|
58
|
-
attachmentId: i.string().indexed(),
|
|
59
|
-
fileName: i.string(),
|
|
60
|
-
mimeType: i.string(),
|
|
61
|
-
size: i.number(),
|
|
62
|
-
status: i.string().indexed(),
|
|
63
|
-
}),
|
|
64
|
-
messageLabels: i.entity({
|
|
65
|
-
labelId: i.string().indexed(),
|
|
66
|
-
}),
|
|
67
|
-
messageRecipients: i.entity({
|
|
68
|
-
emailAddress: i.string().indexed(),
|
|
69
|
-
name: i.string().optional(),
|
|
70
|
-
recipientType: i.string().indexed(),
|
|
56
|
+
userId: i.string().indexed(),
|
|
71
57
|
}),
|
|
72
58
|
messages: i.entity({
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
59
|
+
attachments: i.json(),
|
|
60
|
+
date: i.number().indexed(),
|
|
61
|
+
from: i.json(),
|
|
62
|
+
labelIds: i.json(),
|
|
77
63
|
messageId: i.string().indexed(),
|
|
78
64
|
previewText: i.string(),
|
|
65
|
+
recipients: i.json(),
|
|
66
|
+
subject: i.string().optional(),
|
|
67
|
+
threadId: i.string().indexed(),
|
|
68
|
+
userId: i.string().indexed(),
|
|
79
69
|
}),
|
|
80
70
|
threadBagOfWords: i.entity({
|
|
81
|
-
word: i.string().indexed(),
|
|
71
|
+
word: i.string().unique().indexed(),
|
|
72
|
+
}),
|
|
73
|
+
threadBagOfWordsLink: i.entity({
|
|
74
|
+
threadId: i.string().indexed(),
|
|
75
|
+
userId: i.string().indexed(),
|
|
76
|
+
wordId: i.string().indexed(),
|
|
82
77
|
}),
|
|
83
78
|
threads: i.entity({
|
|
84
79
|
emailAccountId: i.string().indexed(),
|
|
@@ -88,15 +83,18 @@ const schema = i.schema({
|
|
|
88
83
|
messageIds: i.json(),
|
|
89
84
|
participants: i.json(),
|
|
90
85
|
seen: i.boolean().indexed(),
|
|
86
|
+
threadId: i.string().indexed(),
|
|
87
|
+
userId: i.string().indexed(),
|
|
91
88
|
}),
|
|
92
89
|
userPushNotificationToken: i.entity({
|
|
93
|
-
createdAt: i.number().indexed(),
|
|
94
90
|
token: i.string().unique().indexed(),
|
|
91
|
+
userId: i.string().indexed(),
|
|
95
92
|
}),
|
|
96
93
|
userSettings: i.entity({
|
|
97
94
|
name: i.string().optional(),
|
|
98
95
|
profilePicture: i.string().optional(),
|
|
99
96
|
undoSendEnabled: i.boolean(),
|
|
97
|
+
userId: i.string().indexed(),
|
|
100
98
|
}),
|
|
101
99
|
},
|
|
102
100
|
links: {
|
|
@@ -108,10 +106,6 @@ const schema = i.schema({
|
|
|
108
106
|
forward: { has: 'one', label: 'account', on: 'labels' },
|
|
109
107
|
reverse: { has: 'many', label: 'labels', on: 'accounts' },
|
|
110
108
|
},
|
|
111
|
-
accountMailCountsLink: {
|
|
112
|
-
forward: { has: 'one', label: 'account', on: 'accountMailCounts' },
|
|
113
|
-
reverse: { has: 'one', label: 'mailCounts', on: 'accounts' },
|
|
114
|
-
},
|
|
115
109
|
accountSettingsLink: {
|
|
116
110
|
forward: { has: 'one', label: 'account', on: 'accountSettings' },
|
|
117
111
|
reverse: { has: 'one', label: 'settings', on: 'accounts' },
|
|
@@ -124,33 +118,17 @@ const schema = i.schema({
|
|
|
124
118
|
forward: { has: 'one', label: 'draft', on: 'draftAttachments' },
|
|
125
119
|
reverse: { has: 'many', label: 'attachments', on: 'drafts' },
|
|
126
120
|
},
|
|
127
|
-
|
|
128
|
-
forward: { has: 'one', label: '
|
|
129
|
-
reverse: { has: 'many', label: '
|
|
130
|
-
},
|
|
131
|
-
messageAttachmentLinks: {
|
|
132
|
-
forward: { has: 'one', label: 'message', on: 'messageAttachments' },
|
|
133
|
-
reverse: { has: 'many', label: 'attachments', on: 'messages' },
|
|
134
|
-
},
|
|
135
|
-
messageLabelLinks: {
|
|
136
|
-
forward: { has: 'one', label: 'message', on: 'messageLabels' },
|
|
137
|
-
reverse: { has: 'many', label: 'labelIds', on: 'messages' },
|
|
138
|
-
},
|
|
139
|
-
messageRecipientLinks: {
|
|
140
|
-
forward: { has: 'one', label: 'message', on: 'messageRecipients' },
|
|
141
|
-
reverse: { has: 'many', label: 'recipients', on: 'messages' },
|
|
121
|
+
messageThread: {
|
|
122
|
+
forward: { has: 'one', label: 'thread', on: 'messages' },
|
|
123
|
+
reverse: { has: 'many', label: 'messages', on: 'threads' },
|
|
142
124
|
},
|
|
143
125
|
threadAccount: {
|
|
144
126
|
forward: { has: 'one', label: 'account', on: 'threads' },
|
|
145
127
|
reverse: { has: 'many', label: 'threads', on: 'accounts' },
|
|
146
128
|
},
|
|
147
|
-
|
|
148
|
-
forward: { has: 'one', label: 'thread', on: '
|
|
149
|
-
reverse: { has: 'many', label: '
|
|
150
|
-
},
|
|
151
|
-
threadMessages: {
|
|
152
|
-
forward: { has: 'one', label: 'thread', on: 'messages' },
|
|
153
|
-
reverse: { has: 'many', label: 'messages', on: 'threads' },
|
|
129
|
+
threadBagOfWordsJunction: {
|
|
130
|
+
forward: { has: 'one', label: 'thread', on: 'threadBagOfWordsLink' },
|
|
131
|
+
reverse: { has: 'many', label: 'wordLinks', on: 'threads' },
|
|
154
132
|
},
|
|
155
133
|
userAccounts: {
|
|
156
134
|
forward: { has: 'one', label: 'user', on: 'accounts' },
|
|
@@ -168,6 +146,10 @@ const schema = i.schema({
|
|
|
168
146
|
forward: { has: 'one', label: 'userSettings', on: 'userPushNotificationToken' },
|
|
169
147
|
reverse: { has: 'many', label: 'pushNotificationTokens', on: 'userSettings' },
|
|
170
148
|
},
|
|
149
|
+
wordBagOfWordsJunction: {
|
|
150
|
+
forward: { has: 'one', label: 'word', on: 'threadBagOfWordsLink' },
|
|
151
|
+
reverse: { has: 'many', label: 'threadLinks', on: 'threadBagOfWords' },
|
|
152
|
+
},
|
|
171
153
|
},
|
|
172
154
|
rooms: {},
|
|
173
155
|
});
|