@marcoappio/marco-config 2.0.449 → 2.0.451
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/types/{ImapConnectionStatus.d.ts → IMAPConnectionStatus.d.ts} +2 -2
- package/dist/types/IMAPConnectionStatus.d.ts.map +1 -0
- package/dist/types/IMAPSourceLocation.d.ts +7 -0
- package/dist/types/IMAPSourceLocation.d.ts.map +1 -0
- package/dist/types/IMAPSourceLocation.js +1 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -1
- package/dist/zero/index.d.ts +190 -114
- package/dist/zero/index.d.ts.map +1 -1
- package/dist/zero/mutatorSchemas/index.d.ts +36 -0
- package/dist/zero/mutatorSchemas/index.d.ts.map +1 -1
- package/dist/zero/mutatorSchemas/thread.d.ts +36 -0
- package/dist/zero/mutatorSchemas/thread.d.ts.map +1 -1
- package/dist/zero/mutatorSchemas/thread.js +18 -7
- package/dist/zero/mutators/threadMutators/threadMutators.d.ts +2 -2
- package/dist/zero/mutators/threadMutators/threadMutators.d.ts.map +1 -1
- package/dist/zero/mutators/threadMutators/threadMutators.js +43 -10
- package/dist/zero/mutators/threadMutators/threadMutators.test.js +6 -0
- package/dist/zero/queries/getAccounts.d.ts +23 -17
- package/dist/zero/queries/getAccounts.d.ts.map +1 -1
- package/dist/zero/queries/getContacts.d.ts +23 -17
- package/dist/zero/queries/getContacts.d.ts.map +1 -1
- package/dist/zero/queries/getDrafts.d.ts +23 -17
- package/dist/zero/queries/getDrafts.d.ts.map +1 -1
- package/dist/zero/queries/getThreads.d.ts +23 -19
- package/dist/zero/queries/getThreads.d.ts.map +1 -1
- package/dist/zero/queries/getUser.d.ts +23 -17
- package/dist/zero/queries/getUser.d.ts.map +1 -1
- package/dist/zero/queries/index.d.ts +23 -17
- package/dist/zero/queries/index.d.ts.map +1 -1
- package/dist/zero/schema.d.ts +39 -27
- package/dist/zero/schema.d.ts.map +1 -1
- package/dist/zero/schema.js +2 -2
- package/package.json +1 -1
- package/dist/types/ImapConnectionStatus.d.ts.map +0 -1
- /package/dist/types/{ImapConnectionStatus.js → IMAPConnectionStatus.js} +0 -0
package/dist/zero/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/zero/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/zero/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAM,CAAA;AAEV,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -241,6 +241,12 @@ export declare const zeroMutatorSchemas: {
|
|
|
241
241
|
readonly addLabel: {
|
|
242
242
|
readonly delta: import("valibot").ObjectSchema<{
|
|
243
243
|
readonly labelPath: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
244
|
+
readonly sourceLocations: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
245
|
+
readonly labelId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
246
|
+
readonly threadMessageId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
247
|
+
readonly uid: import("valibot").NumberSchema<undefined>;
|
|
248
|
+
readonly uidValidity: import("valibot").NumberSchema<undefined>;
|
|
249
|
+
}, undefined>, undefined>;
|
|
244
250
|
readonly threadIds: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
245
251
|
}, undefined>;
|
|
246
252
|
};
|
|
@@ -252,6 +258,12 @@ export declare const zeroMutatorSchemas: {
|
|
|
252
258
|
readonly removeLabel: {
|
|
253
259
|
readonly delta: import("valibot").ObjectSchema<{
|
|
254
260
|
readonly labelPath: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
261
|
+
readonly sourceLocations: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
262
|
+
readonly labelId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
263
|
+
readonly threadMessageId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
264
|
+
readonly uid: import("valibot").NumberSchema<undefined>;
|
|
265
|
+
readonly uidValidity: import("valibot").NumberSchema<undefined>;
|
|
266
|
+
}, undefined>, undefined>;
|
|
255
267
|
readonly threadIds: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
256
268
|
}, undefined>;
|
|
257
269
|
};
|
|
@@ -263,6 +275,12 @@ export declare const zeroMutatorSchemas: {
|
|
|
263
275
|
};
|
|
264
276
|
readonly setArchive: {
|
|
265
277
|
readonly delta: import("valibot").ObjectSchema<{
|
|
278
|
+
readonly sourceLocations: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
279
|
+
readonly labelId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
280
|
+
readonly threadMessageId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
281
|
+
readonly uid: import("valibot").NumberSchema<undefined>;
|
|
282
|
+
readonly uidValidity: import("valibot").NumberSchema<undefined>;
|
|
283
|
+
}, undefined>, undefined>;
|
|
266
284
|
readonly threadIds: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
267
285
|
}, undefined>;
|
|
268
286
|
};
|
|
@@ -274,6 +292,12 @@ export declare const zeroMutatorSchemas: {
|
|
|
274
292
|
};
|
|
275
293
|
readonly setInbox: {
|
|
276
294
|
readonly delta: import("valibot").ObjectSchema<{
|
|
295
|
+
readonly sourceLocations: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
296
|
+
readonly labelId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
297
|
+
readonly threadMessageId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
298
|
+
readonly uid: import("valibot").NumberSchema<undefined>;
|
|
299
|
+
readonly uidValidity: import("valibot").NumberSchema<undefined>;
|
|
300
|
+
}, undefined>, undefined>;
|
|
277
301
|
readonly threadIds: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
278
302
|
}, undefined>;
|
|
279
303
|
};
|
|
@@ -285,11 +309,23 @@ export declare const zeroMutatorSchemas: {
|
|
|
285
309
|
};
|
|
286
310
|
readonly setSpam: {
|
|
287
311
|
readonly delta: import("valibot").ObjectSchema<{
|
|
312
|
+
readonly sourceLocations: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
313
|
+
readonly labelId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
314
|
+
readonly threadMessageId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
315
|
+
readonly uid: import("valibot").NumberSchema<undefined>;
|
|
316
|
+
readonly uidValidity: import("valibot").NumberSchema<undefined>;
|
|
317
|
+
}, undefined>, undefined>;
|
|
288
318
|
readonly threadIds: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
289
319
|
}, undefined>;
|
|
290
320
|
};
|
|
291
321
|
readonly setTrash: {
|
|
292
322
|
readonly delta: import("valibot").ObjectSchema<{
|
|
323
|
+
readonly sourceLocations: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
324
|
+
readonly labelId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
325
|
+
readonly threadMessageId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
326
|
+
readonly uid: import("valibot").NumberSchema<undefined>;
|
|
327
|
+
readonly uidValidity: import("valibot").NumberSchema<undefined>;
|
|
328
|
+
}, undefined>, undefined>;
|
|
293
329
|
readonly threadIds: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
294
330
|
}, undefined>;
|
|
295
331
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/zero/mutatorSchemas/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/zero/mutatorSchemas/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKrB,CAAA;AAEV,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAA"}
|
|
@@ -3,6 +3,12 @@ export declare const threadMutatorSchemas: {
|
|
|
3
3
|
readonly addLabel: {
|
|
4
4
|
readonly delta: v.ObjectSchema<{
|
|
5
5
|
readonly labelPath: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
6
|
+
readonly sourceLocations: v.ArraySchema<v.ObjectSchema<{
|
|
7
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
8
|
+
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
9
|
+
readonly uid: v.NumberSchema<undefined>;
|
|
10
|
+
readonly uidValidity: v.NumberSchema<undefined>;
|
|
11
|
+
}, undefined>, undefined>;
|
|
6
12
|
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
7
13
|
}, undefined>;
|
|
8
14
|
};
|
|
@@ -14,6 +20,12 @@ export declare const threadMutatorSchemas: {
|
|
|
14
20
|
readonly removeLabel: {
|
|
15
21
|
readonly delta: v.ObjectSchema<{
|
|
16
22
|
readonly labelPath: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
23
|
+
readonly sourceLocations: v.ArraySchema<v.ObjectSchema<{
|
|
24
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
25
|
+
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
26
|
+
readonly uid: v.NumberSchema<undefined>;
|
|
27
|
+
readonly uidValidity: v.NumberSchema<undefined>;
|
|
28
|
+
}, undefined>, undefined>;
|
|
17
29
|
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
18
30
|
}, undefined>;
|
|
19
31
|
};
|
|
@@ -25,6 +37,12 @@ export declare const threadMutatorSchemas: {
|
|
|
25
37
|
};
|
|
26
38
|
readonly setArchive: {
|
|
27
39
|
readonly delta: v.ObjectSchema<{
|
|
40
|
+
readonly sourceLocations: v.ArraySchema<v.ObjectSchema<{
|
|
41
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
42
|
+
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
43
|
+
readonly uid: v.NumberSchema<undefined>;
|
|
44
|
+
readonly uidValidity: v.NumberSchema<undefined>;
|
|
45
|
+
}, undefined>, undefined>;
|
|
28
46
|
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
29
47
|
}, undefined>;
|
|
30
48
|
};
|
|
@@ -36,6 +54,12 @@ export declare const threadMutatorSchemas: {
|
|
|
36
54
|
};
|
|
37
55
|
readonly setInbox: {
|
|
38
56
|
readonly delta: v.ObjectSchema<{
|
|
57
|
+
readonly sourceLocations: v.ArraySchema<v.ObjectSchema<{
|
|
58
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
59
|
+
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
60
|
+
readonly uid: v.NumberSchema<undefined>;
|
|
61
|
+
readonly uidValidity: v.NumberSchema<undefined>;
|
|
62
|
+
}, undefined>, undefined>;
|
|
39
63
|
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
40
64
|
}, undefined>;
|
|
41
65
|
};
|
|
@@ -47,11 +71,23 @@ export declare const threadMutatorSchemas: {
|
|
|
47
71
|
};
|
|
48
72
|
readonly setSpam: {
|
|
49
73
|
readonly delta: v.ObjectSchema<{
|
|
74
|
+
readonly sourceLocations: v.ArraySchema<v.ObjectSchema<{
|
|
75
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
76
|
+
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
77
|
+
readonly uid: v.NumberSchema<undefined>;
|
|
78
|
+
readonly uidValidity: v.NumberSchema<undefined>;
|
|
79
|
+
}, undefined>, undefined>;
|
|
50
80
|
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
51
81
|
}, undefined>;
|
|
52
82
|
};
|
|
53
83
|
readonly setTrash: {
|
|
54
84
|
readonly delta: v.ObjectSchema<{
|
|
85
|
+
readonly sourceLocations: v.ArraySchema<v.ObjectSchema<{
|
|
86
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
87
|
+
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
88
|
+
readonly uid: v.NumberSchema<undefined>;
|
|
89
|
+
readonly uidValidity: v.NumberSchema<undefined>;
|
|
90
|
+
}, undefined>, undefined>;
|
|
55
91
|
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
56
92
|
}, undefined>;
|
|
57
93
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thread.d.ts","sourceRoot":"","sources":["../../../src/zero/mutatorSchemas/thread.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"thread.d.ts","sourceRoot":"","sources":["../../../src/zero/mutatorSchemas/thread.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AA0B5B,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCvB,CAAA"}
|
|
@@ -3,19 +3,30 @@ import { marcoSchemas } from '../../schemas';
|
|
|
3
3
|
const threadIdsSchema = v.object({
|
|
4
4
|
threadIds: v.array(marcoSchemas.string.required()),
|
|
5
5
|
});
|
|
6
|
-
const
|
|
6
|
+
const imapSourceLocationSchema = v.object({
|
|
7
|
+
labelId: marcoSchemas.string.required(),
|
|
8
|
+
threadMessageId: marcoSchemas.string.required(),
|
|
9
|
+
uid: v.number(),
|
|
10
|
+
uidValidity: v.number(),
|
|
11
|
+
});
|
|
12
|
+
const specialUseLabelChangeDeltaSchema = v.object({
|
|
13
|
+
sourceLocations: v.array(imapSourceLocationSchema),
|
|
14
|
+
threadIds: v.array(marcoSchemas.string.required()),
|
|
15
|
+
});
|
|
16
|
+
const threadChangeLabelSchema = v.object({
|
|
7
17
|
labelPath: marcoSchemas.string.required(),
|
|
18
|
+
sourceLocations: v.array(imapSourceLocationSchema),
|
|
8
19
|
threadIds: v.array(marcoSchemas.string.required()),
|
|
9
20
|
});
|
|
10
21
|
export const threadMutatorSchemas = {
|
|
11
22
|
addLabel: {
|
|
12
|
-
delta:
|
|
23
|
+
delta: threadChangeLabelSchema,
|
|
13
24
|
},
|
|
14
25
|
delete: {
|
|
15
26
|
delta: threadIdsSchema,
|
|
16
27
|
},
|
|
17
28
|
removeLabel: {
|
|
18
|
-
delta:
|
|
29
|
+
delta: threadChangeLabelSchema,
|
|
19
30
|
},
|
|
20
31
|
requestAttachmentDownload: {
|
|
21
32
|
delta: v.object({
|
|
@@ -24,7 +35,7 @@ export const threadMutatorSchemas = {
|
|
|
24
35
|
}),
|
|
25
36
|
},
|
|
26
37
|
setArchive: {
|
|
27
|
-
delta:
|
|
38
|
+
delta: specialUseLabelChangeDeltaSchema,
|
|
28
39
|
},
|
|
29
40
|
setFlagged: {
|
|
30
41
|
delta: v.object({
|
|
@@ -33,7 +44,7 @@ export const threadMutatorSchemas = {
|
|
|
33
44
|
}),
|
|
34
45
|
},
|
|
35
46
|
setInbox: {
|
|
36
|
-
delta:
|
|
47
|
+
delta: specialUseLabelChangeDeltaSchema,
|
|
37
48
|
},
|
|
38
49
|
setSeen: {
|
|
39
50
|
delta: v.object({
|
|
@@ -42,9 +53,9 @@ export const threadMutatorSchemas = {
|
|
|
42
53
|
}),
|
|
43
54
|
},
|
|
44
55
|
setSpam: {
|
|
45
|
-
delta:
|
|
56
|
+
delta: specialUseLabelChangeDeltaSchema,
|
|
46
57
|
},
|
|
47
58
|
setTrash: {
|
|
48
|
-
delta:
|
|
59
|
+
delta: specialUseLabelChangeDeltaSchema,
|
|
49
60
|
},
|
|
50
61
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type * as v from 'valibot';
|
|
2
|
-
import type { LabelSpecialUse } from '../../../types';
|
|
2
|
+
import type { IMAPSourceLocation, LabelSpecialUse } from '../../../types';
|
|
3
3
|
import { type AuthData, type HandlerMap } from '../../../types';
|
|
4
4
|
import type { ZeroMutatorSchemas } from '../../../zero/mutatorSchemas';
|
|
5
5
|
export type ThreadMutatorCallbacks = {
|
|
6
6
|
[K in keyof ZeroMutatorSchemas['thread']]?: (args: v.InferOutput<ZeroMutatorSchemas['thread'][K]['delta']>) => Promise<void>;
|
|
7
7
|
};
|
|
8
|
-
export declare const setSystemLabel: (tx: any, threadId: string, targetSpecialUse: LabelSpecialUse) => Promise<
|
|
8
|
+
export declare const setSystemLabel: (tx: any, threadId: string, targetSpecialUse: LabelSpecialUse) => Promise<IMAPSourceLocation[]>;
|
|
9
9
|
export declare const createThreadMutators: (_authData: AuthData | undefined, callbacks?: ThreadMutatorCallbacks) => HandlerMap<ZeroMutatorSchemas["thread"]>;
|
|
10
10
|
//# sourceMappingURL=threadMutators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"threadMutators.d.ts","sourceRoot":"","sources":["../../../../src/zero/mutators/threadMutators/threadMutators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,CAAC,MAAM,SAAS,CAAA;AAEjC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"threadMutators.d.ts","sourceRoot":"","sources":["../../../../src/zero/mutators/threadMutators/threadMutators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,CAAC,MAAM,SAAS,CAAA;AAEjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC9E,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAiB,MAAM,qBAAqB,CAAA;AACnF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AAE3E,MAAM,MAAM,sBAAsB,GAAG;KAClC,CAAC,IAAI,MAAM,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAC1C,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,KAC1D,OAAO,CAAC,IAAI,CAAC;CACnB,CAAA;AAED,eAAO,MAAM,cAAc,OACrB,GAAG,YACG,MAAM,oBACE,eAAe,KAChC,OAAO,CAAC,kBAAkB,EAAE,CA+D9B,CAAA;AAED,eAAO,MAAM,oBAAoB,cACpB,QAAQ,GAAG,SAAS,cACnB,sBAAsB,KACjC,UAAU,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAiLxC,CAAA"}
|
|
@@ -14,12 +14,24 @@ export const setSystemLabel = async (tx, threadId, targetSpecialUse) => {
|
|
|
14
14
|
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
15
15
|
}
|
|
16
16
|
const allThreadLabels = await tx.query.threadLabel.where('threadId', threadId).run();
|
|
17
|
+
const sourceLocations = [];
|
|
17
18
|
let hasTarget = false;
|
|
18
19
|
for (const label of allThreadLabels) {
|
|
19
20
|
if (label.labelId === targetLabel.id) {
|
|
20
21
|
hasTarget = true;
|
|
21
22
|
}
|
|
22
23
|
else {
|
|
24
|
+
if (label.uid !== null &&
|
|
25
|
+
label.uid !== undefined &&
|
|
26
|
+
label.uidValidity !== null &&
|
|
27
|
+
label.uidValidity !== undefined) {
|
|
28
|
+
sourceLocations.push({
|
|
29
|
+
labelId: label.labelId,
|
|
30
|
+
threadMessageId: label.threadMessageId,
|
|
31
|
+
uid: label.uid,
|
|
32
|
+
uidValidity: label.uidValidity,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
23
35
|
await tx.mutate.threadLabel.delete({
|
|
24
36
|
accountId,
|
|
25
37
|
labelId: label.labelId,
|
|
@@ -38,6 +50,7 @@ export const setSystemLabel = async (tx, threadId, targetSpecialUse) => {
|
|
|
38
50
|
});
|
|
39
51
|
}
|
|
40
52
|
}
|
|
53
|
+
return sourceLocations;
|
|
41
54
|
};
|
|
42
55
|
export const createThreadMutators = (_authData, callbacks) => ({
|
|
43
56
|
addLabel: async (tx, args) => {
|
|
@@ -71,7 +84,7 @@ export const createThreadMutators = (_authData, callbacks) => ({
|
|
|
71
84
|
}
|
|
72
85
|
}
|
|
73
86
|
}
|
|
74
|
-
callbacks?.addLabel?.(args);
|
|
87
|
+
callbacks?.addLabel?.({ ...args, sourceLocations: [] });
|
|
75
88
|
},
|
|
76
89
|
delete: async (tx, args) => {
|
|
77
90
|
for (const threadId of args.threadIds) {
|
|
@@ -82,6 +95,7 @@ export const createThreadMutators = (_authData, callbacks) => ({
|
|
|
82
95
|
callbacks?.delete?.(args);
|
|
83
96
|
},
|
|
84
97
|
removeLabel: async (tx, args) => {
|
|
98
|
+
const allSourceLocations = [];
|
|
85
99
|
for (const threadId of args.threadIds) {
|
|
86
100
|
const thread = await tx.query.thread.where('id', threadId).one().run();
|
|
87
101
|
if (!thread) {
|
|
@@ -100,6 +114,17 @@ export const createThreadMutators = (_authData, callbacks) => ({
|
|
|
100
114
|
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
101
115
|
}
|
|
102
116
|
for (const existing of existingLabels) {
|
|
117
|
+
if (existing.uid !== null &&
|
|
118
|
+
existing.uid !== undefined &&
|
|
119
|
+
existing.uidValidity !== null &&
|
|
120
|
+
existing.uidValidity !== undefined) {
|
|
121
|
+
allSourceLocations.push({
|
|
122
|
+
labelId: existing.labelId,
|
|
123
|
+
threadMessageId: existing.threadMessageId,
|
|
124
|
+
uid: existing.uid,
|
|
125
|
+
uidValidity: existing.uidValidity,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
103
128
|
await tx.mutate.threadLabel.delete({
|
|
104
129
|
accountId: thread.accountId,
|
|
105
130
|
labelId: label.id,
|
|
@@ -107,7 +132,7 @@ export const createThreadMutators = (_authData, callbacks) => ({
|
|
|
107
132
|
});
|
|
108
133
|
}
|
|
109
134
|
}
|
|
110
|
-
callbacks?.removeLabel?.(args);
|
|
135
|
+
callbacks?.removeLabel?.({ ...args, sourceLocations: allSourceLocations });
|
|
111
136
|
},
|
|
112
137
|
requestAttachmentDownload: async (tx, args) => {
|
|
113
138
|
for (const attachmentId of args.attachmentIds) {
|
|
@@ -123,10 +148,12 @@ export const createThreadMutators = (_authData, callbacks) => ({
|
|
|
123
148
|
}
|
|
124
149
|
},
|
|
125
150
|
setArchive: async (tx, args) => {
|
|
151
|
+
const allSourceLocations = [];
|
|
126
152
|
for (const threadId of args.threadIds) {
|
|
127
|
-
await setSystemLabel(tx, threadId, 'ARCHIVE');
|
|
153
|
+
const sourceLocations = await setSystemLabel(tx, threadId, 'ARCHIVE');
|
|
154
|
+
allSourceLocations.push(...sourceLocations);
|
|
128
155
|
}
|
|
129
|
-
callbacks?.setArchive?.(args);
|
|
156
|
+
callbacks?.setArchive?.({ ...args, sourceLocations: allSourceLocations });
|
|
130
157
|
},
|
|
131
158
|
setFlagged: async (tx, args) => {
|
|
132
159
|
for (const threadId of args.threadIds) {
|
|
@@ -138,10 +165,12 @@ export const createThreadMutators = (_authData, callbacks) => ({
|
|
|
138
165
|
callbacks?.setFlagged?.(args);
|
|
139
166
|
},
|
|
140
167
|
setInbox: async (tx, args) => {
|
|
168
|
+
const allSourceLocations = [];
|
|
141
169
|
for (const threadId of args.threadIds) {
|
|
142
|
-
await setSystemLabel(tx, threadId, 'INBOX');
|
|
170
|
+
const sourceLocations = await setSystemLabel(tx, threadId, 'INBOX');
|
|
171
|
+
allSourceLocations.push(...sourceLocations);
|
|
143
172
|
}
|
|
144
|
-
callbacks?.setInbox?.(args);
|
|
173
|
+
callbacks?.setInbox?.({ ...args, sourceLocations: allSourceLocations });
|
|
145
174
|
},
|
|
146
175
|
setSeen: async (tx, args) => {
|
|
147
176
|
for (const threadId of args.threadIds) {
|
|
@@ -153,15 +182,19 @@ export const createThreadMutators = (_authData, callbacks) => ({
|
|
|
153
182
|
callbacks?.setSeen?.(args);
|
|
154
183
|
},
|
|
155
184
|
setSpam: async (tx, args) => {
|
|
185
|
+
const allSourceLocations = [];
|
|
156
186
|
for (const threadId of args.threadIds) {
|
|
157
|
-
await setSystemLabel(tx, threadId, 'SPAM');
|
|
187
|
+
const sourceLocations = await setSystemLabel(tx, threadId, 'SPAM');
|
|
188
|
+
allSourceLocations.push(...sourceLocations);
|
|
158
189
|
}
|
|
159
|
-
callbacks?.setSpam?.(args);
|
|
190
|
+
callbacks?.setSpam?.({ ...args, sourceLocations: allSourceLocations });
|
|
160
191
|
},
|
|
161
192
|
setTrash: async (tx, args) => {
|
|
193
|
+
const allSourceLocations = [];
|
|
162
194
|
for (const threadId of args.threadIds) {
|
|
163
|
-
await setSystemLabel(tx, threadId, 'TRASH');
|
|
195
|
+
const sourceLocations = await setSystemLabel(tx, threadId, 'TRASH');
|
|
196
|
+
allSourceLocations.push(...sourceLocations);
|
|
164
197
|
}
|
|
165
|
-
callbacks?.setTrash?.(args);
|
|
198
|
+
callbacks?.setTrash?.({ ...args, sourceLocations: allSourceLocations });
|
|
166
199
|
},
|
|
167
200
|
});
|
|
@@ -52,6 +52,7 @@ describe('threadMutators', () => {
|
|
|
52
52
|
const mutators = createMutators();
|
|
53
53
|
await mutators.thread.addLabel(transaction, {
|
|
54
54
|
labelPath: 'Work',
|
|
55
|
+
sourceLocations: [],
|
|
55
56
|
threadIds: ['test-thread-id-1'],
|
|
56
57
|
});
|
|
57
58
|
expect(threadLabelInsert).toHaveBeenCalledTimes(2);
|
|
@@ -148,6 +149,7 @@ describe('threadMutators', () => {
|
|
|
148
149
|
const mutators = createMutators();
|
|
149
150
|
await mutators.thread.removeLabel(transaction, {
|
|
150
151
|
labelPath: 'Work',
|
|
152
|
+
sourceLocations: [],
|
|
151
153
|
threadIds: ['test-thread-id-1'],
|
|
152
154
|
});
|
|
153
155
|
expect(threadLabelDelete).toHaveBeenCalledTimes(2);
|
|
@@ -247,6 +249,7 @@ describe('threadMutators', () => {
|
|
|
247
249
|
};
|
|
248
250
|
const mutators = createMutators();
|
|
249
251
|
await mutators.thread.setArchive(transaction, {
|
|
252
|
+
sourceLocations: [],
|
|
250
253
|
threadIds: ['test-thread-id-1'],
|
|
251
254
|
});
|
|
252
255
|
expect(threadLabelDelete).toHaveBeenCalledWith({
|
|
@@ -335,6 +338,7 @@ describe('threadMutators', () => {
|
|
|
335
338
|
};
|
|
336
339
|
const mutators = createMutators();
|
|
337
340
|
await mutators.thread.setInbox(transaction, {
|
|
341
|
+
sourceLocations: [],
|
|
338
342
|
threadIds: ['test-thread-id-1'],
|
|
339
343
|
});
|
|
340
344
|
expect(threadLabelDelete).toHaveBeenCalledWith({
|
|
@@ -424,6 +428,7 @@ describe('threadMutators', () => {
|
|
|
424
428
|
};
|
|
425
429
|
const mutators = createMutators();
|
|
426
430
|
await mutators.thread.setSpam(transaction, {
|
|
431
|
+
sourceLocations: [],
|
|
427
432
|
threadIds: ['test-thread-id-1'],
|
|
428
433
|
});
|
|
429
434
|
expect(threadLabelInsert).toHaveBeenCalledWith({
|
|
@@ -481,6 +486,7 @@ describe('threadMutators', () => {
|
|
|
481
486
|
};
|
|
482
487
|
const mutators = createMutators();
|
|
483
488
|
await mutators.thread.setTrash(transaction, {
|
|
489
|
+
sourceLocations: [],
|
|
484
490
|
threadIds: ['test-thread-id-1'],
|
|
485
491
|
});
|
|
486
492
|
expect(threadLabelInsert).toHaveBeenCalledWith({
|
|
@@ -525,6 +525,22 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
|
|
|
525
525
|
} & {
|
|
526
526
|
serverName: string;
|
|
527
527
|
};
|
|
528
|
+
readonly uid: Omit<{
|
|
529
|
+
type: "number";
|
|
530
|
+
optional: false;
|
|
531
|
+
customType: number;
|
|
532
|
+
}, "optional"> & {
|
|
533
|
+
optional: true;
|
|
534
|
+
};
|
|
535
|
+
readonly uidValidity: Omit<{
|
|
536
|
+
type: "number";
|
|
537
|
+
optional: false;
|
|
538
|
+
customType: number;
|
|
539
|
+
}, "optional"> & {
|
|
540
|
+
optional: true;
|
|
541
|
+
} & {
|
|
542
|
+
serverName: string;
|
|
543
|
+
};
|
|
528
544
|
};
|
|
529
545
|
primaryKey: readonly [string, ...string[]];
|
|
530
546
|
} & {
|
|
@@ -556,11 +572,6 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
|
|
|
556
572
|
} & {
|
|
557
573
|
serverName: string;
|
|
558
574
|
};
|
|
559
|
-
readonly flagged: {
|
|
560
|
-
type: "boolean";
|
|
561
|
-
optional: false;
|
|
562
|
-
customType: boolean;
|
|
563
|
-
};
|
|
564
575
|
readonly id: {
|
|
565
576
|
type: "string";
|
|
566
577
|
optional: false;
|
|
@@ -573,11 +584,6 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
|
|
|
573
584
|
} & {
|
|
574
585
|
serverName: string;
|
|
575
586
|
};
|
|
576
|
-
readonly seen: {
|
|
577
|
-
type: "boolean";
|
|
578
|
-
optional: false;
|
|
579
|
-
customType: boolean;
|
|
580
|
-
};
|
|
581
587
|
readonly senderEmail: {
|
|
582
588
|
type: "string";
|
|
583
589
|
optional: false;
|
|
@@ -794,7 +800,7 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
|
|
|
794
800
|
}];
|
|
795
801
|
threads: [{
|
|
796
802
|
readonly sourceField: string[];
|
|
797
|
-
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId")[];
|
|
803
|
+
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId" | "uidValidity" | "uid")[];
|
|
798
804
|
readonly destSchema: "threadLabel";
|
|
799
805
|
readonly cardinality: "many";
|
|
800
806
|
}, {
|
|
@@ -855,7 +861,7 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
|
|
|
855
861
|
}];
|
|
856
862
|
labels: [{
|
|
857
863
|
readonly sourceField: string[];
|
|
858
|
-
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId")[];
|
|
864
|
+
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId" | "uidValidity" | "uid")[];
|
|
859
865
|
readonly destSchema: "threadLabel";
|
|
860
866
|
readonly cardinality: "many";
|
|
861
867
|
}, {
|
|
@@ -866,7 +872,7 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
|
|
|
866
872
|
}];
|
|
867
873
|
messages: [{
|
|
868
874
|
readonly sourceField: string[];
|
|
869
|
-
readonly destField: ("id" | "accountId" | "
|
|
875
|
+
readonly destField: ("id" | "accountId" | "threadId" | "envelopeDate" | "envelopeSubject" | "previewText" | "senderEmail" | "senderName")[];
|
|
870
876
|
readonly destSchema: "threadMessage";
|
|
871
877
|
readonly cardinality: "many";
|
|
872
878
|
}];
|
|
@@ -886,7 +892,7 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
|
|
|
886
892
|
}];
|
|
887
893
|
message: [{
|
|
888
894
|
readonly sourceField: string[];
|
|
889
|
-
readonly destField: ("id" | "accountId" | "
|
|
895
|
+
readonly destField: ("id" | "accountId" | "threadId" | "envelopeDate" | "envelopeSubject" | "previewText" | "senderEmail" | "senderName")[];
|
|
890
896
|
readonly destSchema: "threadMessage";
|
|
891
897
|
readonly cardinality: "one";
|
|
892
898
|
}];
|
|
@@ -906,7 +912,7 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
|
|
|
906
912
|
}];
|
|
907
913
|
labels: [{
|
|
908
914
|
readonly sourceField: string[];
|
|
909
|
-
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId")[];
|
|
915
|
+
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId" | "uidValidity" | "uid")[];
|
|
910
916
|
readonly destSchema: "threadLabel";
|
|
911
917
|
readonly cardinality: "many";
|
|
912
918
|
}, {
|
|
@@ -931,7 +937,7 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
|
|
|
931
937
|
readonly threadMessageRecipient: {
|
|
932
938
|
message: [{
|
|
933
939
|
readonly sourceField: string[];
|
|
934
|
-
readonly destField: ("id" | "accountId" | "
|
|
940
|
+
readonly destField: ("id" | "accountId" | "threadId" | "envelopeDate" | "envelopeSubject" | "previewText" | "senderEmail" | "senderName")[];
|
|
935
941
|
readonly destSchema: "threadMessage";
|
|
936
942
|
readonly cardinality: "one";
|
|
937
943
|
}];
|
|
@@ -939,7 +945,7 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
|
|
|
939
945
|
readonly threadMessageAttachment: {
|
|
940
946
|
message: [{
|
|
941
947
|
readonly sourceField: string[];
|
|
942
|
-
readonly destField: ("id" | "accountId" | "
|
|
948
|
+
readonly destField: ("id" | "accountId" | "threadId" | "envelopeDate" | "envelopeSubject" | "previewText" | "senderEmail" | "senderName")[];
|
|
943
949
|
readonly destSchema: "threadMessage";
|
|
944
950
|
readonly cardinality: "one";
|
|
945
951
|
}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAccounts.d.ts","sourceRoot":"","sources":["../../../src/zero/queries/getAccounts.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAGlE,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"getAccounts.d.ts","sourceRoot":"","sources":["../../../src/zero/queries/getAccounts.ts"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