@marcoappio/marco-config 2.0.540 → 2.0.541
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/constants/index.d.ts +0 -4
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +0 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/marcoPublicConfig.d.ts +0 -3
- package/dist/marcoPublicConfig.d.ts.map +1 -1
- package/dist/marcoPublicConfig.js +0 -9
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/mutators/index.d.ts +2 -0
- package/dist/schemas/mutators/index.d.ts.map +1 -0
- package/dist/schemas/mutators/index.js +1 -0
- package/dist/{zero → schemas/mutators}/mutatorSchemas.d.ts +4 -4
- package/dist/{zero → schemas/mutators}/mutatorSchemas.d.ts.map +1 -1
- package/dist/{zero → schemas/mutators}/mutatorSchemas.js +4 -4
- package/dist/sdk/endpoints/private/mutations/account/createAccount.js +1 -1
- package/dist/sdk/endpoints/private/mutations/account/createAlias.js +1 -1
- package/dist/sdk/endpoints/private/mutations/account/deleteAccount.js +1 -1
- package/dist/sdk/endpoints/private/mutations/account/deleteAlias.js +1 -1
- package/dist/sdk/endpoints/private/mutations/account/setAliasName.js +1 -1
- package/dist/sdk/endpoints/private/mutations/account/setAliasPrimary.js +1 -1
- package/dist/sdk/endpoints/private/mutations/account/setConnectionConfigImap.js +1 -1
- package/dist/sdk/endpoints/private/mutations/account/setConnectionConfigOauth.js +1 -1
- package/dist/sdk/endpoints/private/mutations/account/setSettings.js +1 -1
- package/dist/sdk/endpoints/private/mutations/draft/cancelSend.js +1 -1
- package/dist/sdk/endpoints/private/mutations/draft/createAttachment.js +1 -1
- package/dist/sdk/endpoints/private/mutations/draft/createDraft.js +1 -1
- package/dist/sdk/endpoints/private/mutations/draft/deleteAttachment.js +1 -1
- package/dist/sdk/endpoints/private/mutations/draft/deleteDraft.js +1 -1
- package/dist/sdk/endpoints/private/mutations/draft/scheduleSend.js +1 -1
- package/dist/sdk/endpoints/private/mutations/draft/setContent.js +1 -1
- package/dist/sdk/endpoints/private/mutations/draft/setEnvelope.d.ts +2 -2
- package/dist/sdk/endpoints/private/mutations/draft/setEnvelope.js +1 -1
- package/dist/sdk/endpoints/private/mutations/draft/setFrom.js +1 -1
- package/dist/sdk/endpoints/private/mutations/thread/addLabel.js +1 -1
- package/dist/sdk/endpoints/private/mutations/thread/deleteThreads.js +1 -1
- package/dist/sdk/endpoints/private/mutations/thread/removeLabel.js +1 -1
- package/dist/sdk/endpoints/private/mutations/thread/setArchive.js +1 -1
- package/dist/sdk/endpoints/private/mutations/thread/setFlagged.js +1 -1
- package/dist/sdk/endpoints/private/mutations/thread/setInbox.js +1 -1
- package/dist/sdk/endpoints/private/mutations/thread/setSeen.js +1 -1
- package/dist/sdk/endpoints/private/mutations/thread/setSpam.js +1 -1
- package/dist/sdk/endpoints/private/mutations/thread/setTrash.js +1 -1
- package/dist/sdk/endpoints/private/mutations/user/createView.js +1 -1
- package/dist/sdk/endpoints/private/mutations/user/deletePushToken.js +1 -1
- package/dist/sdk/endpoints/private/mutations/user/deleteView.js +1 -1
- package/dist/sdk/endpoints/private/mutations/user/setPushToken.js +1 -1
- package/dist/sdk/endpoints/private/mutations/user/setSettingsName.js +1 -1
- package/dist/sdk/endpoints/private/mutations/user/updateView.js +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +0 -1
- package/package.json +1 -2
- package/dist/constants/zero.d.ts +0 -5
- package/dist/constants/zero.d.ts.map +0 -1
- package/dist/constants/zero.js +0 -4
- package/dist/types/Zero.d.ts +0 -17
- package/dist/types/Zero.d.ts.map +0 -1
- package/dist/types/Zero.js +0 -5
- package/dist/zero/index.d.ts +0 -5072
- package/dist/zero/index.d.ts.map +0 -1
- package/dist/zero/index.js +0 -12
- package/dist/zero/mutators.d.ts +0 -1523
- package/dist/zero/mutators.d.ts.map +0 -1
- package/dist/zero/mutators.js +0 -560
- package/dist/zero/mutators.test.d.ts +0 -2
- package/dist/zero/mutators.test.d.ts.map +0 -1
- package/dist/zero/mutators.test.js +0 -1158
- package/dist/zero/queries.d.ts +0 -1372
- package/dist/zero/queries.d.ts.map +0 -1
- package/dist/zero/queries.js +0 -173
- package/dist/zero/schema.d.ts +0 -1821
- package/dist/zero/schema.d.ts.map +0 -1
- package/dist/zero/schema.js +0 -434
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/zero/schema.ts"],"names":[],"mappings":"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"}
|
package/dist/zero/schema.js
DELETED
|
@@ -1,434 +0,0 @@
|
|
|
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().from('profile_picture'),
|
|
7
|
-
undoSendEnabled: boolean().from('undo_send_enabled'),
|
|
8
|
-
views: json(),
|
|
9
|
-
})
|
|
10
|
-
.primaryKey('id');
|
|
11
|
-
const userPushNotificationToken = table('userPushNotificationToken')
|
|
12
|
-
.from('user_push_notification_token')
|
|
13
|
-
.columns({
|
|
14
|
-
createdAt: numeric().from('created_at'),
|
|
15
|
-
id: string(),
|
|
16
|
-
token: string(),
|
|
17
|
-
userId: string().from('user_id'),
|
|
18
|
-
})
|
|
19
|
-
.primaryKey('id');
|
|
20
|
-
const contact = table('contact')
|
|
21
|
-
.columns({
|
|
22
|
-
emailAddress: string().from('email_address'),
|
|
23
|
-
id: string(),
|
|
24
|
-
name: string().optional(),
|
|
25
|
-
userId: string().from('user_id'),
|
|
26
|
-
})
|
|
27
|
-
.primaryKey('id');
|
|
28
|
-
const account = table('account')
|
|
29
|
-
.columns({
|
|
30
|
-
color: string(),
|
|
31
|
-
displayName: string().optional().from('display_name'),
|
|
32
|
-
id: string(),
|
|
33
|
-
imapConnectionStatus: enumeration().from('imap_connection_status'),
|
|
34
|
-
mailProcessedCount: numeric().from('mail_processed_count'),
|
|
35
|
-
mailTotalCount: numeric().from('mail_total_count'),
|
|
36
|
-
primaryAliasId: string().optional().from('primary_alias_id'),
|
|
37
|
-
userId: string().from('user_id'),
|
|
38
|
-
})
|
|
39
|
-
.primaryKey('id');
|
|
40
|
-
const accountAlias = table('accountAlias')
|
|
41
|
-
.from('account_alias')
|
|
42
|
-
.columns({
|
|
43
|
-
accountId: string().from('account_id'),
|
|
44
|
-
emailAddress: string().from('email_address'),
|
|
45
|
-
id: string(),
|
|
46
|
-
isPrimary: boolean().from('is_primary'),
|
|
47
|
-
name: string().optional(),
|
|
48
|
-
})
|
|
49
|
-
.primaryKey('id');
|
|
50
|
-
const accountLabel = table('accountLabel')
|
|
51
|
-
.from('account_label')
|
|
52
|
-
.columns({
|
|
53
|
-
accountId: string().from('account_id'),
|
|
54
|
-
id: string(),
|
|
55
|
-
name: string().optional(),
|
|
56
|
-
path: string(),
|
|
57
|
-
specialUse: enumeration().optional().from('special_use'),
|
|
58
|
-
uidValidity: numeric().from('uid_validity'),
|
|
59
|
-
unreadCount: numeric().from('unread_count'),
|
|
60
|
-
})
|
|
61
|
-
.primaryKey('id');
|
|
62
|
-
const draft = table('draft')
|
|
63
|
-
.columns({
|
|
64
|
-
accountId: string().from('account_id'),
|
|
65
|
-
body: json(),
|
|
66
|
-
error: string().optional(),
|
|
67
|
-
fromAliasId: string().optional().from('from_alias_id'),
|
|
68
|
-
fromEmail: string().from('from_email'),
|
|
69
|
-
fromName: string().optional().from('from_name'),
|
|
70
|
-
id: string(),
|
|
71
|
-
referencedMessageId: string().optional().from('referenced_message_id'),
|
|
72
|
-
scheduledFor: numeric().optional().from('scheduled_for'),
|
|
73
|
-
status: enumeration(),
|
|
74
|
-
subject: string().optional(),
|
|
75
|
-
type: enumeration(),
|
|
76
|
-
updatedAt: numeric().from('updated_at'),
|
|
77
|
-
userId: string().from('user_id'),
|
|
78
|
-
})
|
|
79
|
-
.primaryKey('id');
|
|
80
|
-
const draftAttachment = table('draftAttachment')
|
|
81
|
-
.from('draft_attachment')
|
|
82
|
-
.columns({
|
|
83
|
-
draftId: string().from('draft_id'),
|
|
84
|
-
fileName: string().from('file_name'),
|
|
85
|
-
id: string(),
|
|
86
|
-
mimeType: string().from('mime_type'),
|
|
87
|
-
status: enumeration().from('upload_status'),
|
|
88
|
-
totalSize: numeric().from('total_size'),
|
|
89
|
-
})
|
|
90
|
-
.primaryKey('id');
|
|
91
|
-
const thread = table('thread')
|
|
92
|
-
.columns({
|
|
93
|
-
accountId: string().from('account_id'),
|
|
94
|
-
flagged: boolean(),
|
|
95
|
-
hasAttachments: boolean().from('has_attachments'),
|
|
96
|
-
id: string(),
|
|
97
|
-
labelIdList: string().from('label_id_list'),
|
|
98
|
-
latestMessageDate: numeric().from('latest_message_date'),
|
|
99
|
-
latestMessageId: string().from('latest_message_id'),
|
|
100
|
-
messageCount: numeric().from('message_count'),
|
|
101
|
-
previewText: string().from('preview_text'),
|
|
102
|
-
seen: boolean(),
|
|
103
|
-
senderEmail: string().from('sender_email'),
|
|
104
|
-
senderName: string().optional().from('sender_name'),
|
|
105
|
-
subject: string().optional(),
|
|
106
|
-
userId: string().from('user_id'),
|
|
107
|
-
words: string(),
|
|
108
|
-
})
|
|
109
|
-
.primaryKey('id');
|
|
110
|
-
const threadLabel = table('threadLabel')
|
|
111
|
-
.from('thread_label')
|
|
112
|
-
.columns({
|
|
113
|
-
accountId: string().from('account_id'),
|
|
114
|
-
labelId: string().from('label_id'),
|
|
115
|
-
lastSyncedAt: numeric().from('last_synced_at'),
|
|
116
|
-
threadId: string().from('thread_id'),
|
|
117
|
-
threadMessageId: string().from('thread_message_id'),
|
|
118
|
-
uid: numeric(),
|
|
119
|
-
uidValidity: numeric().from('uid_validity'),
|
|
120
|
-
})
|
|
121
|
-
.primaryKey('accountId', 'labelId', 'threadMessageId');
|
|
122
|
-
const threadByLabel = table('threadByLabel')
|
|
123
|
-
.from('thread_by_label')
|
|
124
|
-
.columns({
|
|
125
|
-
labelId: string().from('label_id'),
|
|
126
|
-
latestMessageDate: numeric().from('latest_message_date'),
|
|
127
|
-
threadId: string().from('thread_id'),
|
|
128
|
-
})
|
|
129
|
-
.primaryKey('labelId', 'threadId');
|
|
130
|
-
const threadMessage = table('threadMessage')
|
|
131
|
-
.from('thread_message')
|
|
132
|
-
.columns({
|
|
133
|
-
accountId: string().from('account_id'),
|
|
134
|
-
envelopeDate: numeric().from('envelope_date'),
|
|
135
|
-
envelopeSubject: string().optional().from('envelope_subject'),
|
|
136
|
-
id: string(),
|
|
137
|
-
previewText: string().from('preview_text'),
|
|
138
|
-
senderEmail: string().from('sender_email'),
|
|
139
|
-
senderName: string().optional().from('sender_name'),
|
|
140
|
-
threadId: string().from('thread_id'),
|
|
141
|
-
unsubscribeUrl: string().optional().from('unsubscribe_url'),
|
|
142
|
-
})
|
|
143
|
-
.primaryKey('id');
|
|
144
|
-
const threadMessageRecipient = table('threadMessageRecipient')
|
|
145
|
-
.from('thread_message_recipient')
|
|
146
|
-
.columns({
|
|
147
|
-
emailAddress: string().from('email_address'),
|
|
148
|
-
id: string(),
|
|
149
|
-
name: string().optional(),
|
|
150
|
-
threadMessageId: string().from('thread_message_id'),
|
|
151
|
-
type: enumeration(),
|
|
152
|
-
})
|
|
153
|
-
.primaryKey('id');
|
|
154
|
-
const threadMessageAttachment = table('threadMessageAttachment')
|
|
155
|
-
.from('thread_message_attachment')
|
|
156
|
-
.columns({
|
|
157
|
-
fileName: string().from('file_name'),
|
|
158
|
-
id: string(),
|
|
159
|
-
mimeType: string().from('mime_type'),
|
|
160
|
-
size: numeric(),
|
|
161
|
-
threadMessageId: string().from('thread_message_id'),
|
|
162
|
-
})
|
|
163
|
-
.primaryKey('id');
|
|
164
|
-
const userRelationships = relationships(user, ({ many }) => ({
|
|
165
|
-
accounts: many({
|
|
166
|
-
destField: ['userId'],
|
|
167
|
-
destSchema: account,
|
|
168
|
-
sourceField: ['id'],
|
|
169
|
-
}),
|
|
170
|
-
contacts: many({
|
|
171
|
-
destField: ['userId'],
|
|
172
|
-
destSchema: contact,
|
|
173
|
-
sourceField: ['id'],
|
|
174
|
-
}),
|
|
175
|
-
drafts: many({
|
|
176
|
-
destField: ['userId'],
|
|
177
|
-
destSchema: draft,
|
|
178
|
-
sourceField: ['id'],
|
|
179
|
-
}),
|
|
180
|
-
pushNotificationTokens: many({
|
|
181
|
-
destField: ['userId'],
|
|
182
|
-
destSchema: userPushNotificationToken,
|
|
183
|
-
sourceField: ['id'],
|
|
184
|
-
}),
|
|
185
|
-
threads: many({
|
|
186
|
-
destField: ['userId'],
|
|
187
|
-
destSchema: thread,
|
|
188
|
-
sourceField: ['id'],
|
|
189
|
-
}),
|
|
190
|
-
}));
|
|
191
|
-
const userPushNotificationTokenRelationships = relationships(userPushNotificationToken, ({ one }) => ({
|
|
192
|
-
user: one({
|
|
193
|
-
destField: ['id'],
|
|
194
|
-
destSchema: user,
|
|
195
|
-
sourceField: ['userId'],
|
|
196
|
-
}),
|
|
197
|
-
}));
|
|
198
|
-
const contactRelationships = relationships(contact, ({ one }) => ({
|
|
199
|
-
user: one({
|
|
200
|
-
destField: ['id'],
|
|
201
|
-
destSchema: user,
|
|
202
|
-
sourceField: ['userId'],
|
|
203
|
-
}),
|
|
204
|
-
}));
|
|
205
|
-
const accountRelationships = relationships(account, ({ one, many }) => ({
|
|
206
|
-
aliases: many({
|
|
207
|
-
destField: ['accountId'],
|
|
208
|
-
destSchema: accountAlias,
|
|
209
|
-
sourceField: ['id'],
|
|
210
|
-
}),
|
|
211
|
-
drafts: many({
|
|
212
|
-
destField: ['accountId'],
|
|
213
|
-
destSchema: draft,
|
|
214
|
-
sourceField: ['id'],
|
|
215
|
-
}),
|
|
216
|
-
labels: many({
|
|
217
|
-
destField: ['accountId'],
|
|
218
|
-
destSchema: accountLabel,
|
|
219
|
-
sourceField: ['id'],
|
|
220
|
-
}),
|
|
221
|
-
primaryAlias: one({
|
|
222
|
-
destField: ['id'],
|
|
223
|
-
destSchema: accountAlias,
|
|
224
|
-
sourceField: ['primaryAliasId'],
|
|
225
|
-
}),
|
|
226
|
-
threads: many({
|
|
227
|
-
destField: ['accountId'],
|
|
228
|
-
destSchema: thread,
|
|
229
|
-
sourceField: ['id'],
|
|
230
|
-
}),
|
|
231
|
-
user: one({
|
|
232
|
-
destField: ['id'],
|
|
233
|
-
destSchema: user,
|
|
234
|
-
sourceField: ['userId'],
|
|
235
|
-
}),
|
|
236
|
-
}));
|
|
237
|
-
const accountAliasRelationships = relationships(accountAlias, ({ one }) => ({
|
|
238
|
-
account: one({
|
|
239
|
-
destField: ['id'],
|
|
240
|
-
destSchema: account,
|
|
241
|
-
sourceField: ['accountId'],
|
|
242
|
-
}),
|
|
243
|
-
}));
|
|
244
|
-
const accountLabelRelationships = relationships(accountLabel, ({ one, many }) => ({
|
|
245
|
-
account: one({
|
|
246
|
-
destField: ['id'],
|
|
247
|
-
destSchema: account,
|
|
248
|
-
sourceField: ['accountId'],
|
|
249
|
-
}),
|
|
250
|
-
threads: many({
|
|
251
|
-
destField: ['labelId'],
|
|
252
|
-
destSchema: threadLabel,
|
|
253
|
-
sourceField: ['id'],
|
|
254
|
-
}, {
|
|
255
|
-
destField: ['id'],
|
|
256
|
-
destSchema: thread,
|
|
257
|
-
sourceField: ['threadId'],
|
|
258
|
-
}),
|
|
259
|
-
}));
|
|
260
|
-
const draftRelationships = relationships(draft, ({ one, many }) => ({
|
|
261
|
-
account: one({
|
|
262
|
-
destField: ['id'],
|
|
263
|
-
destSchema: account,
|
|
264
|
-
sourceField: ['accountId'],
|
|
265
|
-
}),
|
|
266
|
-
attachments: many({
|
|
267
|
-
destField: ['draftId'],
|
|
268
|
-
destSchema: draftAttachment,
|
|
269
|
-
sourceField: ['id'],
|
|
270
|
-
}),
|
|
271
|
-
user: one({
|
|
272
|
-
destField: ['id'],
|
|
273
|
-
destSchema: user,
|
|
274
|
-
sourceField: ['userId'],
|
|
275
|
-
}),
|
|
276
|
-
}));
|
|
277
|
-
const draftAttachmentRelationships = relationships(draftAttachment, ({ one }) => ({
|
|
278
|
-
draft: one({
|
|
279
|
-
destField: ['id'],
|
|
280
|
-
destSchema: draft,
|
|
281
|
-
sourceField: ['draftId'],
|
|
282
|
-
}),
|
|
283
|
-
}));
|
|
284
|
-
const threadRelationships = relationships(thread, ({ one, many }) => ({
|
|
285
|
-
account: one({
|
|
286
|
-
destField: ['id'],
|
|
287
|
-
destSchema: account,
|
|
288
|
-
sourceField: ['accountId'],
|
|
289
|
-
}),
|
|
290
|
-
labels: many({
|
|
291
|
-
destField: ['threadId'],
|
|
292
|
-
destSchema: threadLabel,
|
|
293
|
-
sourceField: ['id'],
|
|
294
|
-
}, {
|
|
295
|
-
destField: ['id'],
|
|
296
|
-
destSchema: accountLabel,
|
|
297
|
-
sourceField: ['labelId'],
|
|
298
|
-
}),
|
|
299
|
-
messages: many({
|
|
300
|
-
destField: ['threadId'],
|
|
301
|
-
destSchema: threadMessage,
|
|
302
|
-
sourceField: ['id'],
|
|
303
|
-
}),
|
|
304
|
-
threadByLabel: many({
|
|
305
|
-
destField: ['threadId'],
|
|
306
|
-
destSchema: threadByLabel,
|
|
307
|
-
sourceField: ['id'],
|
|
308
|
-
}),
|
|
309
|
-
user: one({
|
|
310
|
-
destField: ['id'],
|
|
311
|
-
destSchema: user,
|
|
312
|
-
sourceField: ['userId'],
|
|
313
|
-
}),
|
|
314
|
-
}));
|
|
315
|
-
const threadLabelRelationships = relationships(threadLabel, ({ one }) => ({
|
|
316
|
-
label: one({
|
|
317
|
-
destField: ['id'],
|
|
318
|
-
destSchema: accountLabel,
|
|
319
|
-
sourceField: ['labelId'],
|
|
320
|
-
}),
|
|
321
|
-
message: one({
|
|
322
|
-
destField: ['id'],
|
|
323
|
-
destSchema: threadMessage,
|
|
324
|
-
sourceField: ['threadMessageId'],
|
|
325
|
-
}),
|
|
326
|
-
thread: one({
|
|
327
|
-
destField: ['id'],
|
|
328
|
-
destSchema: thread,
|
|
329
|
-
sourceField: ['threadId'],
|
|
330
|
-
}),
|
|
331
|
-
}));
|
|
332
|
-
const threadByLabelRelationships = relationships(threadByLabel, ({ one }) => ({
|
|
333
|
-
label: one({
|
|
334
|
-
destField: ['id'],
|
|
335
|
-
destSchema: accountLabel,
|
|
336
|
-
sourceField: ['labelId'],
|
|
337
|
-
}),
|
|
338
|
-
thread: one({
|
|
339
|
-
destField: ['id'],
|
|
340
|
-
destSchema: thread,
|
|
341
|
-
sourceField: ['threadId'],
|
|
342
|
-
}),
|
|
343
|
-
}));
|
|
344
|
-
const threadMessageRelationships = relationships(threadMessage, ({ one, many }) => ({
|
|
345
|
-
attachments: many({
|
|
346
|
-
destField: ['threadMessageId'],
|
|
347
|
-
destSchema: threadMessageAttachment,
|
|
348
|
-
sourceField: ['id'],
|
|
349
|
-
}),
|
|
350
|
-
labels: many({
|
|
351
|
-
destField: ['threadMessageId'],
|
|
352
|
-
destSchema: threadLabel,
|
|
353
|
-
sourceField: ['id'],
|
|
354
|
-
}, {
|
|
355
|
-
destField: ['id'],
|
|
356
|
-
destSchema: accountLabel,
|
|
357
|
-
sourceField: ['labelId'],
|
|
358
|
-
}),
|
|
359
|
-
recipients: many({
|
|
360
|
-
destField: ['threadMessageId'],
|
|
361
|
-
destSchema: threadMessageRecipient,
|
|
362
|
-
sourceField: ['id'],
|
|
363
|
-
}),
|
|
364
|
-
thread: one({
|
|
365
|
-
destField: ['id'],
|
|
366
|
-
destSchema: thread,
|
|
367
|
-
sourceField: ['threadId'],
|
|
368
|
-
}),
|
|
369
|
-
}));
|
|
370
|
-
const threadMessageAttachmentRelationships = relationships(threadMessageAttachment, ({ one }) => ({
|
|
371
|
-
message: one({
|
|
372
|
-
destField: ['id'],
|
|
373
|
-
destSchema: threadMessage,
|
|
374
|
-
sourceField: ['threadMessageId'],
|
|
375
|
-
}),
|
|
376
|
-
}));
|
|
377
|
-
const threadMessageRecipientRelationships = relationships(threadMessageRecipient, ({ one }) => ({
|
|
378
|
-
message: one({
|
|
379
|
-
destField: ['id'],
|
|
380
|
-
destSchema: threadMessage,
|
|
381
|
-
sourceField: ['threadMessageId'],
|
|
382
|
-
}),
|
|
383
|
-
}));
|
|
384
|
-
export const schema = createSchema({
|
|
385
|
-
enableLegacyMutators: false,
|
|
386
|
-
relationships: [
|
|
387
|
-
userRelationships,
|
|
388
|
-
userPushNotificationTokenRelationships,
|
|
389
|
-
contactRelationships,
|
|
390
|
-
accountRelationships,
|
|
391
|
-
accountAliasRelationships,
|
|
392
|
-
accountLabelRelationships,
|
|
393
|
-
draftRelationships,
|
|
394
|
-
draftAttachmentRelationships,
|
|
395
|
-
threadRelationships,
|
|
396
|
-
threadLabelRelationships,
|
|
397
|
-
threadByLabelRelationships,
|
|
398
|
-
threadMessageRelationships,
|
|
399
|
-
threadMessageAttachmentRelationships,
|
|
400
|
-
threadMessageRecipientRelationships,
|
|
401
|
-
],
|
|
402
|
-
tables: [
|
|
403
|
-
user,
|
|
404
|
-
userPushNotificationToken,
|
|
405
|
-
contact,
|
|
406
|
-
account,
|
|
407
|
-
accountAlias,
|
|
408
|
-
accountLabel,
|
|
409
|
-
draft,
|
|
410
|
-
draftAttachment,
|
|
411
|
-
thread,
|
|
412
|
-
threadLabel,
|
|
413
|
-
threadByLabel,
|
|
414
|
-
threadMessage,
|
|
415
|
-
threadMessageRecipient,
|
|
416
|
-
threadMessageAttachment,
|
|
417
|
-
],
|
|
418
|
-
});
|
|
419
|
-
export const tables = {
|
|
420
|
-
account,
|
|
421
|
-
accountAlias,
|
|
422
|
-
accountLabel,
|
|
423
|
-
contact,
|
|
424
|
-
draft,
|
|
425
|
-
draftAttachment,
|
|
426
|
-
thread,
|
|
427
|
-
threadByLabel,
|
|
428
|
-
threadLabel,
|
|
429
|
-
threadMessage,
|
|
430
|
-
threadMessageAttachment,
|
|
431
|
-
threadMessageRecipient,
|
|
432
|
-
user,
|
|
433
|
-
userPushNotificationToken,
|
|
434
|
-
};
|