@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/zero/schema.ts"],"names":[],"mappings":"AA2bA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAvWJ,MAAM;4BACX,MAAM,EAAE;4BACR,MAAM,EAAE;6BACP,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwYjB,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,OAAO,MAAM,CAAA;AAE3C,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BA/YR,MAAM;wBACX,MAAM,EAAE;wBACR,MAAM,EAAE;yBACP,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ZT,CAAA"}
|
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
import { boolean, createSchema, enumeration, json, number as numeric, relationships, string, table, } from '@rocicorp/zero';
|
|
2
|
+
const user = table('user')
|
|
3
|
+
.columns({
|
|
4
|
+
id: string(),
|
|
5
|
+
name: string().optional(),
|
|
6
|
+
profilePicture: string().optional(),
|
|
7
|
+
undoSendEnabled: boolean(),
|
|
8
|
+
})
|
|
9
|
+
.primaryKey('id');
|
|
10
|
+
const userPushNotificationToken = table('userPushNotificationToken')
|
|
11
|
+
.columns({
|
|
12
|
+
createdAt: numeric(),
|
|
13
|
+
id: string(),
|
|
14
|
+
token: string(),
|
|
15
|
+
userId: string(),
|
|
16
|
+
})
|
|
17
|
+
.primaryKey('id');
|
|
18
|
+
const contact = table('contact')
|
|
19
|
+
.columns({
|
|
20
|
+
emailAddress: string(),
|
|
21
|
+
id: string(),
|
|
22
|
+
name: string().optional(),
|
|
23
|
+
userId: string(),
|
|
24
|
+
})
|
|
25
|
+
.primaryKey('id');
|
|
26
|
+
const account = table('account')
|
|
27
|
+
.columns({
|
|
28
|
+
color: string(),
|
|
29
|
+
displayName: string().optional(),
|
|
30
|
+
id: string(),
|
|
31
|
+
imapConnectionStatus: enumeration(),
|
|
32
|
+
mailProcessedCount: numeric(),
|
|
33
|
+
mailTotalCount: numeric(),
|
|
34
|
+
primaryAliasId: string().optional(),
|
|
35
|
+
userId: string(),
|
|
36
|
+
})
|
|
37
|
+
.primaryKey('id');
|
|
38
|
+
const accountAlias = table('accountAlias')
|
|
39
|
+
.columns({
|
|
40
|
+
accountId: string(),
|
|
41
|
+
emailAddress: string(),
|
|
42
|
+
id: string(),
|
|
43
|
+
isPrimary: boolean(),
|
|
44
|
+
name: string().optional(),
|
|
45
|
+
})
|
|
46
|
+
.primaryKey('id');
|
|
47
|
+
const accountLabel = table('accountLabel')
|
|
48
|
+
.columns({
|
|
49
|
+
accountId: string(),
|
|
50
|
+
id: string(),
|
|
51
|
+
path: string(),
|
|
52
|
+
specialUse: enumeration().optional(),
|
|
53
|
+
})
|
|
54
|
+
.primaryKey('id');
|
|
55
|
+
const draft = table('draft')
|
|
56
|
+
.columns({
|
|
57
|
+
accountId: string(),
|
|
58
|
+
body: json(),
|
|
59
|
+
error: string().optional(),
|
|
60
|
+
fromAliasId: string().optional(),
|
|
61
|
+
fromEmail: string(),
|
|
62
|
+
fromName: string().optional(),
|
|
63
|
+
id: string(),
|
|
64
|
+
referencedMessageId: string().optional(),
|
|
65
|
+
scheduledFor: numeric().optional(),
|
|
66
|
+
status: enumeration(),
|
|
67
|
+
subject: string().optional(),
|
|
68
|
+
type: enumeration(),
|
|
69
|
+
updatedAt: numeric(),
|
|
70
|
+
userId: string(),
|
|
71
|
+
})
|
|
72
|
+
.primaryKey('id');
|
|
73
|
+
const draftRecipient = table('draftRecipient')
|
|
74
|
+
.columns({
|
|
75
|
+
draftId: string(),
|
|
76
|
+
emailAddress: string(),
|
|
77
|
+
id: string(),
|
|
78
|
+
type: enumeration(),
|
|
79
|
+
})
|
|
80
|
+
.primaryKey('id');
|
|
81
|
+
const draftAttachment = table('draftAttachment')
|
|
82
|
+
.columns({
|
|
83
|
+
draftId: string(),
|
|
84
|
+
failed: boolean(),
|
|
85
|
+
fileName: string(),
|
|
86
|
+
id: string(),
|
|
87
|
+
mimeType: string(),
|
|
88
|
+
totalChunks: numeric(),
|
|
89
|
+
totalSize: numeric(),
|
|
90
|
+
uploadedChunks: numeric(),
|
|
91
|
+
})
|
|
92
|
+
.primaryKey('id');
|
|
93
|
+
const thread = table('thread')
|
|
94
|
+
.columns({
|
|
95
|
+
accountId: string(),
|
|
96
|
+
flagged: boolean(),
|
|
97
|
+
id: string(),
|
|
98
|
+
latestMessageDate: numeric(),
|
|
99
|
+
seen: boolean(),
|
|
100
|
+
userId: string(),
|
|
101
|
+
words: string(),
|
|
102
|
+
})
|
|
103
|
+
.primaryKey('id');
|
|
104
|
+
const threadLabel = table('threadLabel')
|
|
105
|
+
.columns({
|
|
106
|
+
labelId: string(),
|
|
107
|
+
threadId: string(),
|
|
108
|
+
})
|
|
109
|
+
.primaryKey('threadId', 'labelId');
|
|
110
|
+
const threadMessage = table('threadMessage')
|
|
111
|
+
.columns({
|
|
112
|
+
envelopeDate: numeric(),
|
|
113
|
+
envelopeSubject: string().optional(),
|
|
114
|
+
id: string(),
|
|
115
|
+
previewText: string(),
|
|
116
|
+
senderEmail: string(),
|
|
117
|
+
senderName: string().optional(),
|
|
118
|
+
threadId: string(),
|
|
119
|
+
})
|
|
120
|
+
.primaryKey('id');
|
|
121
|
+
const threadMessageRecipient = table('threadMessageRecipient')
|
|
122
|
+
.columns({
|
|
123
|
+
emailAddress: string(),
|
|
124
|
+
id: string(),
|
|
125
|
+
name: string().optional(),
|
|
126
|
+
threadMessageId: string(),
|
|
127
|
+
type: enumeration(),
|
|
128
|
+
})
|
|
129
|
+
.primaryKey('id');
|
|
130
|
+
const threadMessageAttachment = table('threadMessageAttachment')
|
|
131
|
+
.columns({
|
|
132
|
+
fileName: string(),
|
|
133
|
+
id: string(),
|
|
134
|
+
mimeType: string(),
|
|
135
|
+
size: numeric(),
|
|
136
|
+
status: enumeration(),
|
|
137
|
+
threadMessageId: string(),
|
|
138
|
+
})
|
|
139
|
+
.primaryKey('id');
|
|
140
|
+
const threadMessageLabel = table('threadMessageLabel')
|
|
141
|
+
.columns({
|
|
142
|
+
labelId: string(),
|
|
143
|
+
threadMessageId: string(),
|
|
144
|
+
})
|
|
145
|
+
.primaryKey('threadMessageId', 'labelId');
|
|
146
|
+
const userRelationships = relationships(user, ({ many }) => ({
|
|
147
|
+
accounts: many({
|
|
148
|
+
destField: ['userId'],
|
|
149
|
+
destSchema: account,
|
|
150
|
+
sourceField: ['id'],
|
|
151
|
+
}),
|
|
152
|
+
contacts: many({
|
|
153
|
+
destField: ['userId'],
|
|
154
|
+
destSchema: contact,
|
|
155
|
+
sourceField: ['id'],
|
|
156
|
+
}),
|
|
157
|
+
drafts: many({
|
|
158
|
+
destField: ['userId'],
|
|
159
|
+
destSchema: draft,
|
|
160
|
+
sourceField: ['id'],
|
|
161
|
+
}),
|
|
162
|
+
pushNotificationTokens: many({
|
|
163
|
+
destField: ['userId'],
|
|
164
|
+
destSchema: userPushNotificationToken,
|
|
165
|
+
sourceField: ['id'],
|
|
166
|
+
}),
|
|
167
|
+
threads: many({
|
|
168
|
+
destField: ['userId'],
|
|
169
|
+
destSchema: thread,
|
|
170
|
+
sourceField: ['id'],
|
|
171
|
+
}),
|
|
172
|
+
}));
|
|
173
|
+
const userPushNotificationTokenRelationships = relationships(userPushNotificationToken, ({ one }) => ({
|
|
174
|
+
user: one({
|
|
175
|
+
destField: ['id'],
|
|
176
|
+
destSchema: user,
|
|
177
|
+
sourceField: ['userId'],
|
|
178
|
+
}),
|
|
179
|
+
}));
|
|
180
|
+
const contactRelationships = relationships(contact, ({ one }) => ({
|
|
181
|
+
user: one({
|
|
182
|
+
destField: ['id'],
|
|
183
|
+
destSchema: user,
|
|
184
|
+
sourceField: ['userId'],
|
|
185
|
+
}),
|
|
186
|
+
}));
|
|
187
|
+
const accountRelationships = relationships(account, ({ one, many }) => ({
|
|
188
|
+
aliases: many({
|
|
189
|
+
destField: ['accountId'],
|
|
190
|
+
destSchema: accountAlias,
|
|
191
|
+
sourceField: ['id'],
|
|
192
|
+
}),
|
|
193
|
+
drafts: many({
|
|
194
|
+
destField: ['accountId'],
|
|
195
|
+
destSchema: draft,
|
|
196
|
+
sourceField: ['id'],
|
|
197
|
+
}),
|
|
198
|
+
labels: many({
|
|
199
|
+
destField: ['accountId'],
|
|
200
|
+
destSchema: accountLabel,
|
|
201
|
+
sourceField: ['id'],
|
|
202
|
+
}),
|
|
203
|
+
primaryAlias: one({
|
|
204
|
+
destField: ['id'],
|
|
205
|
+
destSchema: accountAlias,
|
|
206
|
+
sourceField: ['primaryAliasId'],
|
|
207
|
+
}),
|
|
208
|
+
threads: many({
|
|
209
|
+
destField: ['accountId'],
|
|
210
|
+
destSchema: thread,
|
|
211
|
+
sourceField: ['id'],
|
|
212
|
+
}),
|
|
213
|
+
user: one({
|
|
214
|
+
destField: ['id'],
|
|
215
|
+
destSchema: user,
|
|
216
|
+
sourceField: ['userId'],
|
|
217
|
+
}),
|
|
218
|
+
}));
|
|
219
|
+
const accountAliasRelationships = relationships(accountAlias, ({ one }) => ({
|
|
220
|
+
account: one({
|
|
221
|
+
destField: ['id'],
|
|
222
|
+
destSchema: account,
|
|
223
|
+
sourceField: ['accountId'],
|
|
224
|
+
}),
|
|
225
|
+
}));
|
|
226
|
+
const accountLabelRelationships = relationships(accountLabel, ({ one, many }) => ({
|
|
227
|
+
account: one({
|
|
228
|
+
destField: ['id'],
|
|
229
|
+
destSchema: account,
|
|
230
|
+
sourceField: ['accountId'],
|
|
231
|
+
}),
|
|
232
|
+
threadMessages: many({
|
|
233
|
+
destField: ['labelId'],
|
|
234
|
+
destSchema: threadMessageLabel,
|
|
235
|
+
sourceField: ['id'],
|
|
236
|
+
}, {
|
|
237
|
+
destField: ['id'],
|
|
238
|
+
destSchema: threadMessage,
|
|
239
|
+
sourceField: ['threadMessageId'],
|
|
240
|
+
}),
|
|
241
|
+
threads: many({
|
|
242
|
+
destField: ['labelId'],
|
|
243
|
+
destSchema: threadLabel,
|
|
244
|
+
sourceField: ['id'],
|
|
245
|
+
}, {
|
|
246
|
+
destField: ['id'],
|
|
247
|
+
destSchema: thread,
|
|
248
|
+
sourceField: ['threadId'],
|
|
249
|
+
}),
|
|
250
|
+
}));
|
|
251
|
+
const draftRelationships = relationships(draft, ({ one, many }) => ({
|
|
252
|
+
account: one({
|
|
253
|
+
destField: ['id'],
|
|
254
|
+
destSchema: account,
|
|
255
|
+
sourceField: ['accountId'],
|
|
256
|
+
}),
|
|
257
|
+
attachments: many({
|
|
258
|
+
destField: ['draftId'],
|
|
259
|
+
destSchema: draftAttachment,
|
|
260
|
+
sourceField: ['id'],
|
|
261
|
+
}),
|
|
262
|
+
recipients: many({
|
|
263
|
+
destField: ['draftId'],
|
|
264
|
+
destSchema: draftRecipient,
|
|
265
|
+
sourceField: ['id'],
|
|
266
|
+
}),
|
|
267
|
+
user: one({
|
|
268
|
+
destField: ['id'],
|
|
269
|
+
destSchema: user,
|
|
270
|
+
sourceField: ['userId'],
|
|
271
|
+
}),
|
|
272
|
+
}));
|
|
273
|
+
const draftAttachmentRelationships = relationships(draftAttachment, ({ one }) => ({
|
|
274
|
+
draft: one({
|
|
275
|
+
destField: ['id'],
|
|
276
|
+
destSchema: draft,
|
|
277
|
+
sourceField: ['draftId'],
|
|
278
|
+
}),
|
|
279
|
+
}));
|
|
280
|
+
const draftRecipientRelationships = relationships(draftRecipient, ({ one }) => ({
|
|
281
|
+
draft: one({
|
|
282
|
+
destField: ['id'],
|
|
283
|
+
destSchema: draft,
|
|
284
|
+
sourceField: ['draftId'],
|
|
285
|
+
}),
|
|
286
|
+
}));
|
|
287
|
+
const threadRelationships = relationships(thread, ({ one, many }) => ({
|
|
288
|
+
account: one({
|
|
289
|
+
destField: ['id'],
|
|
290
|
+
destSchema: account,
|
|
291
|
+
sourceField: ['accountId'],
|
|
292
|
+
}),
|
|
293
|
+
labels: many({
|
|
294
|
+
destField: ['threadId'],
|
|
295
|
+
destSchema: threadLabel,
|
|
296
|
+
sourceField: ['id'],
|
|
297
|
+
}, {
|
|
298
|
+
destField: ['id'],
|
|
299
|
+
destSchema: accountLabel,
|
|
300
|
+
sourceField: ['labelId'],
|
|
301
|
+
}),
|
|
302
|
+
messages: many({
|
|
303
|
+
destField: ['threadId'],
|
|
304
|
+
destSchema: threadMessage,
|
|
305
|
+
sourceField: ['id'],
|
|
306
|
+
}),
|
|
307
|
+
user: one({
|
|
308
|
+
destField: ['id'],
|
|
309
|
+
destSchema: user,
|
|
310
|
+
sourceField: ['userId'],
|
|
311
|
+
}),
|
|
312
|
+
}));
|
|
313
|
+
const threadLabelRelationships = relationships(threadLabel, ({ one }) => ({
|
|
314
|
+
label: one({
|
|
315
|
+
destField: ['id'],
|
|
316
|
+
destSchema: accountLabel,
|
|
317
|
+
sourceField: ['labelId'],
|
|
318
|
+
}),
|
|
319
|
+
thread: one({
|
|
320
|
+
destField: ['id'],
|
|
321
|
+
destSchema: thread,
|
|
322
|
+
sourceField: ['threadId'],
|
|
323
|
+
}),
|
|
324
|
+
}));
|
|
325
|
+
const threadMessageRelationships = relationships(threadMessage, ({ one, many }) => ({
|
|
326
|
+
attachments: many({
|
|
327
|
+
destField: ['threadMessageId'],
|
|
328
|
+
destSchema: threadMessageAttachment,
|
|
329
|
+
sourceField: ['id'],
|
|
330
|
+
}),
|
|
331
|
+
labels: many({
|
|
332
|
+
destField: ['threadMessageId'],
|
|
333
|
+
destSchema: threadMessageLabel,
|
|
334
|
+
sourceField: ['id'],
|
|
335
|
+
}, {
|
|
336
|
+
destField: ['id'],
|
|
337
|
+
destSchema: accountLabel,
|
|
338
|
+
sourceField: ['labelId'],
|
|
339
|
+
}),
|
|
340
|
+
recipients: many({
|
|
341
|
+
destField: ['threadMessageId'],
|
|
342
|
+
destSchema: threadMessageRecipient,
|
|
343
|
+
sourceField: ['id'],
|
|
344
|
+
}),
|
|
345
|
+
thread: one({
|
|
346
|
+
destField: ['id'],
|
|
347
|
+
destSchema: thread,
|
|
348
|
+
sourceField: ['threadId'],
|
|
349
|
+
}),
|
|
350
|
+
}));
|
|
351
|
+
const threadMessageAttachmentRelationships = relationships(threadMessageAttachment, ({ one }) => ({
|
|
352
|
+
message: one({
|
|
353
|
+
destField: ['id'],
|
|
354
|
+
destSchema: threadMessage,
|
|
355
|
+
sourceField: ['threadMessageId'],
|
|
356
|
+
}),
|
|
357
|
+
}));
|
|
358
|
+
const threadMessageRecipientRelationships = relationships(threadMessageRecipient, ({ one }) => ({
|
|
359
|
+
message: one({
|
|
360
|
+
destField: ['id'],
|
|
361
|
+
destSchema: threadMessage,
|
|
362
|
+
sourceField: ['threadMessageId'],
|
|
363
|
+
}),
|
|
364
|
+
}));
|
|
365
|
+
const threadMessageLabelRelationships = relationships(threadMessageLabel, ({ one }) => ({
|
|
366
|
+
label: one({
|
|
367
|
+
destField: ['id'],
|
|
368
|
+
destSchema: accountLabel,
|
|
369
|
+
sourceField: ['labelId'],
|
|
370
|
+
}),
|
|
371
|
+
message: one({
|
|
372
|
+
destField: ['id'],
|
|
373
|
+
destSchema: threadMessage,
|
|
374
|
+
sourceField: ['threadMessageId'],
|
|
375
|
+
}),
|
|
376
|
+
}));
|
|
377
|
+
export const schema = createSchema({
|
|
378
|
+
enableLegacyMutators: false,
|
|
379
|
+
relationships: [
|
|
380
|
+
userRelationships,
|
|
381
|
+
userPushNotificationTokenRelationships,
|
|
382
|
+
contactRelationships,
|
|
383
|
+
accountRelationships,
|
|
384
|
+
accountAliasRelationships,
|
|
385
|
+
accountLabelRelationships,
|
|
386
|
+
draftRelationships,
|
|
387
|
+
draftAttachmentRelationships,
|
|
388
|
+
draftRecipientRelationships,
|
|
389
|
+
threadRelationships,
|
|
390
|
+
threadLabelRelationships,
|
|
391
|
+
threadMessageRelationships,
|
|
392
|
+
threadMessageAttachmentRelationships,
|
|
393
|
+
threadMessageRecipientRelationships,
|
|
394
|
+
threadMessageLabelRelationships,
|
|
395
|
+
],
|
|
396
|
+
tables: [
|
|
397
|
+
user,
|
|
398
|
+
userPushNotificationToken,
|
|
399
|
+
contact,
|
|
400
|
+
account,
|
|
401
|
+
accountAlias,
|
|
402
|
+
accountLabel,
|
|
403
|
+
draft,
|
|
404
|
+
draftRecipient,
|
|
405
|
+
draftAttachment,
|
|
406
|
+
thread,
|
|
407
|
+
threadLabel,
|
|
408
|
+
threadMessage,
|
|
409
|
+
threadMessageRecipient,
|
|
410
|
+
threadMessageAttachment,
|
|
411
|
+
threadMessageLabel,
|
|
412
|
+
],
|
|
413
|
+
});
|
|
414
|
+
export const zeroTables = {
|
|
415
|
+
account,
|
|
416
|
+
accountAlias,
|
|
417
|
+
accountLabel,
|
|
418
|
+
contact,
|
|
419
|
+
draft,
|
|
420
|
+
draftAttachment,
|
|
421
|
+
draftRecipient,
|
|
422
|
+
thread,
|
|
423
|
+
threadLabel,
|
|
424
|
+
threadMessage,
|
|
425
|
+
threadMessageAttachment,
|
|
426
|
+
threadMessageLabel,
|
|
427
|
+
threadMessageRecipient,
|
|
428
|
+
user,
|
|
429
|
+
userPushNotificationToken,
|
|
430
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marcoappio/marco-config",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.416",
|
|
4
4
|
"author": "team@marcoapp.io",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": "git@github.com:marcoappio/marco-config.git",
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"typecheck": "tsc -noEmit --incremental"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
+
"@rocicorp/zero": "0.24.2025101500",
|
|
28
29
|
"diff": "8.0.2",
|
|
29
30
|
"valibot": "1.1.0"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
33
|
"@auto-it/npm": "11.2.0",
|
|
33
34
|
"@biomejs/biome": "2.3.0",
|
|
34
|
-
"@instantdb/admin": "0.22.41",
|
|
35
35
|
"@types/bun": "1.3.0",
|
|
36
36
|
"auto": "11.2.0",
|
|
37
37
|
"tsc-alias": "1.8.16",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/instantDB/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,kBAAkB,CAAA"}
|
package/dist/instantDB/index.js
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
declare const rules: {
|
|
2
|
-
$users: {
|
|
3
|
-
allow: {
|
|
4
|
-
view: string;
|
|
5
|
-
};
|
|
6
|
-
bind: string[];
|
|
7
|
-
};
|
|
8
|
-
accountMailCounts: {
|
|
9
|
-
allow: {
|
|
10
|
-
view: string;
|
|
11
|
-
};
|
|
12
|
-
bind: string[];
|
|
13
|
-
};
|
|
14
|
-
accountSettings: {
|
|
15
|
-
allow: {
|
|
16
|
-
update: string;
|
|
17
|
-
view: string;
|
|
18
|
-
};
|
|
19
|
-
bind: string[];
|
|
20
|
-
};
|
|
21
|
-
accounts: {
|
|
22
|
-
allow: {
|
|
23
|
-
create: string;
|
|
24
|
-
delete: string;
|
|
25
|
-
update: string;
|
|
26
|
-
view: string;
|
|
27
|
-
};
|
|
28
|
-
bind: string[];
|
|
29
|
-
};
|
|
30
|
-
aliases: {
|
|
31
|
-
allow: {
|
|
32
|
-
create: string;
|
|
33
|
-
delete: string;
|
|
34
|
-
update: string;
|
|
35
|
-
view: string;
|
|
36
|
-
};
|
|
37
|
-
bind: string[];
|
|
38
|
-
};
|
|
39
|
-
contacts: {
|
|
40
|
-
allow: {
|
|
41
|
-
view: string;
|
|
42
|
-
};
|
|
43
|
-
bind: string[];
|
|
44
|
-
};
|
|
45
|
-
draftAttachments: {
|
|
46
|
-
allow: {
|
|
47
|
-
create: string;
|
|
48
|
-
delete: string;
|
|
49
|
-
update: string;
|
|
50
|
-
view: string;
|
|
51
|
-
};
|
|
52
|
-
bind: string[];
|
|
53
|
-
};
|
|
54
|
-
draftRecipients: {
|
|
55
|
-
allow: {
|
|
56
|
-
create: string;
|
|
57
|
-
delete: string;
|
|
58
|
-
update: string;
|
|
59
|
-
view: string;
|
|
60
|
-
};
|
|
61
|
-
bind: string[];
|
|
62
|
-
};
|
|
63
|
-
drafts: {
|
|
64
|
-
allow: {
|
|
65
|
-
create: string;
|
|
66
|
-
delete: string;
|
|
67
|
-
update: string;
|
|
68
|
-
view: string;
|
|
69
|
-
};
|
|
70
|
-
bind: string[];
|
|
71
|
-
};
|
|
72
|
-
labels: {
|
|
73
|
-
allow: {
|
|
74
|
-
view: string;
|
|
75
|
-
};
|
|
76
|
-
bind: string[];
|
|
77
|
-
};
|
|
78
|
-
messageAttachments: {
|
|
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
|
-
messages: {
|
|
94
|
-
allow: {
|
|
95
|
-
view: string;
|
|
96
|
-
};
|
|
97
|
-
bind: string[];
|
|
98
|
-
};
|
|
99
|
-
threadBagOfWords: {
|
|
100
|
-
allow: {
|
|
101
|
-
view: string;
|
|
102
|
-
};
|
|
103
|
-
bind: never[];
|
|
104
|
-
};
|
|
105
|
-
threads: {
|
|
106
|
-
allow: {
|
|
107
|
-
create: string;
|
|
108
|
-
delete: string;
|
|
109
|
-
update: string;
|
|
110
|
-
view: string;
|
|
111
|
-
};
|
|
112
|
-
bind: string[];
|
|
113
|
-
};
|
|
114
|
-
userPushNotificationToken: {
|
|
115
|
-
allow: {
|
|
116
|
-
create: string;
|
|
117
|
-
delete: string;
|
|
118
|
-
update: string;
|
|
119
|
-
view: string;
|
|
120
|
-
};
|
|
121
|
-
bind: string[];
|
|
122
|
-
};
|
|
123
|
-
userSettings: {
|
|
124
|
-
allow: {
|
|
125
|
-
create: string;
|
|
126
|
-
delete: string;
|
|
127
|
-
update: string;
|
|
128
|
-
view: string;
|
|
129
|
-
};
|
|
130
|
-
bind: string[];
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
export default rules;
|
|
134
|
-
//# sourceMappingURL=instant.perms.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|