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