@marcoappio/marco-config 2.0.450 → 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 +166 -18
- 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 +19 -3
- package/dist/zero/queries/getAccounts.d.ts.map +1 -1
- package/dist/zero/queries/getContacts.d.ts +19 -3
- package/dist/zero/queries/getContacts.d.ts.map +1 -1
- package/dist/zero/queries/getDrafts.d.ts +19 -3
- package/dist/zero/queries/getDrafts.d.ts.map +1 -1
- package/dist/zero/queries/getThreads.d.ts +19 -3
- package/dist/zero/queries/getThreads.d.ts.map +1 -1
- package/dist/zero/queries/getUser.d.ts +19 -3
- package/dist/zero/queries/getUser.d.ts.map +1 -1
- package/dist/zero/queries/index.d.ts +19 -3
- package/dist/zero/queries/index.d.ts.map +1 -1
- package/dist/zero/schema.d.ts +35 -3
- package/dist/zero/schema.d.ts.map +1 -1
- package/dist/zero/schema.js +2 -0
- package/package.json +1 -1
- package/dist/types/ImapConnectionStatus.d.ts.map +0 -1
- /package/dist/types/{ImapConnectionStatus.js → IMAPConnectionStatus.js} +0 -0
|
@@ -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
|
} & {
|
|
@@ -784,7 +800,7 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
|
|
|
784
800
|
}];
|
|
785
801
|
threads: [{
|
|
786
802
|
readonly sourceField: string[];
|
|
787
|
-
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId")[];
|
|
803
|
+
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId" | "uidValidity" | "uid")[];
|
|
788
804
|
readonly destSchema: "threadLabel";
|
|
789
805
|
readonly cardinality: "many";
|
|
790
806
|
}, {
|
|
@@ -845,7 +861,7 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
|
|
|
845
861
|
}];
|
|
846
862
|
labels: [{
|
|
847
863
|
readonly sourceField: string[];
|
|
848
|
-
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId")[];
|
|
864
|
+
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId" | "uidValidity" | "uid")[];
|
|
849
865
|
readonly destSchema: "threadLabel";
|
|
850
866
|
readonly cardinality: "many";
|
|
851
867
|
}, {
|
|
@@ -896,7 +912,7 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
|
|
|
896
912
|
}];
|
|
897
913
|
labels: [{
|
|
898
914
|
readonly sourceField: string[];
|
|
899
|
-
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId")[];
|
|
915
|
+
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId" | "uidValidity" | "uid")[];
|
|
900
916
|
readonly destSchema: "threadLabel";
|
|
901
917
|
readonly cardinality: "many";
|
|
902
918
|
}, {
|
|
@@ -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"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAGlE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAEvB,CAAA"}
|
|
@@ -534,6 +534,22 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
534
534
|
} & {
|
|
535
535
|
serverName: string;
|
|
536
536
|
};
|
|
537
|
+
readonly uid: Omit<{
|
|
538
|
+
type: "number";
|
|
539
|
+
optional: false;
|
|
540
|
+
customType: number;
|
|
541
|
+
}, "optional"> & {
|
|
542
|
+
optional: true;
|
|
543
|
+
};
|
|
544
|
+
readonly uidValidity: Omit<{
|
|
545
|
+
type: "number";
|
|
546
|
+
optional: false;
|
|
547
|
+
customType: number;
|
|
548
|
+
}, "optional"> & {
|
|
549
|
+
optional: true;
|
|
550
|
+
} & {
|
|
551
|
+
serverName: string;
|
|
552
|
+
};
|
|
537
553
|
};
|
|
538
554
|
primaryKey: readonly [string, ...string[]];
|
|
539
555
|
} & {
|
|
@@ -793,7 +809,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
793
809
|
}];
|
|
794
810
|
threads: [{
|
|
795
811
|
readonly sourceField: string[];
|
|
796
|
-
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId")[];
|
|
812
|
+
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId" | "uidValidity" | "uid")[];
|
|
797
813
|
readonly destSchema: "threadLabel";
|
|
798
814
|
readonly cardinality: "many";
|
|
799
815
|
}, {
|
|
@@ -854,7 +870,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
854
870
|
}];
|
|
855
871
|
labels: [{
|
|
856
872
|
readonly sourceField: string[];
|
|
857
|
-
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId")[];
|
|
873
|
+
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId" | "uidValidity" | "uid")[];
|
|
858
874
|
readonly destSchema: "threadLabel";
|
|
859
875
|
readonly cardinality: "many";
|
|
860
876
|
}, {
|
|
@@ -905,7 +921,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
905
921
|
}];
|
|
906
922
|
labels: [{
|
|
907
923
|
readonly sourceField: string[];
|
|
908
|
-
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId")[];
|
|
924
|
+
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId" | "uidValidity" | "uid")[];
|
|
909
925
|
readonly destSchema: "threadLabel";
|
|
910
926
|
readonly cardinality: "many";
|
|
911
927
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getContacts.d.ts","sourceRoot":"","sources":["../../../src/zero/queries/getContacts.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAMlE,KA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BvB,CAAA"}
|
|
@@ -531,6 +531,22 @@ export declare const getDrafts: import("@rocicorp/zero").SyncedQuery<"getDrafts"
|
|
|
531
531
|
} & {
|
|
532
532
|
serverName: string;
|
|
533
533
|
};
|
|
534
|
+
readonly uid: Omit<{
|
|
535
|
+
type: "number";
|
|
536
|
+
optional: false;
|
|
537
|
+
customType: number;
|
|
538
|
+
}, "optional"> & {
|
|
539
|
+
optional: true;
|
|
540
|
+
};
|
|
541
|
+
readonly uidValidity: Omit<{
|
|
542
|
+
type: "number";
|
|
543
|
+
optional: false;
|
|
544
|
+
customType: number;
|
|
545
|
+
}, "optional"> & {
|
|
546
|
+
optional: true;
|
|
547
|
+
} & {
|
|
548
|
+
serverName: string;
|
|
549
|
+
};
|
|
534
550
|
};
|
|
535
551
|
primaryKey: readonly [string, ...string[]];
|
|
536
552
|
} & {
|
|
@@ -790,7 +806,7 @@ export declare const getDrafts: import("@rocicorp/zero").SyncedQuery<"getDrafts"
|
|
|
790
806
|
}];
|
|
791
807
|
threads: [{
|
|
792
808
|
readonly sourceField: string[];
|
|
793
|
-
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId")[];
|
|
809
|
+
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId" | "uidValidity" | "uid")[];
|
|
794
810
|
readonly destSchema: "threadLabel";
|
|
795
811
|
readonly cardinality: "many";
|
|
796
812
|
}, {
|
|
@@ -851,7 +867,7 @@ export declare const getDrafts: import("@rocicorp/zero").SyncedQuery<"getDrafts"
|
|
|
851
867
|
}];
|
|
852
868
|
labels: [{
|
|
853
869
|
readonly sourceField: string[];
|
|
854
|
-
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId")[];
|
|
870
|
+
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId" | "uidValidity" | "uid")[];
|
|
855
871
|
readonly destSchema: "threadLabel";
|
|
856
872
|
readonly cardinality: "many";
|
|
857
873
|
}, {
|
|
@@ -902,7 +918,7 @@ export declare const getDrafts: import("@rocicorp/zero").SyncedQuery<"getDrafts"
|
|
|
902
918
|
}];
|
|
903
919
|
labels: [{
|
|
904
920
|
readonly sourceField: string[];
|
|
905
|
-
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId")[];
|
|
921
|
+
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId" | "uidValidity" | "uid")[];
|
|
906
922
|
readonly destSchema: "threadLabel";
|
|
907
923
|
readonly cardinality: "many";
|
|
908
924
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDrafts.d.ts","sourceRoot":"","sources":["../../../src/zero/queries/getDrafts.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAMpD,KAAK,aAAa,GAAG;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoBrB,CAAA"}
|
|
@@ -537,6 +537,22 @@ export declare const getThreads: import("@rocicorp/zero").SyncedQuery<"getThread
|
|
|
537
537
|
} & {
|
|
538
538
|
serverName: string;
|
|
539
539
|
};
|
|
540
|
+
readonly uid: Omit<{
|
|
541
|
+
type: "number";
|
|
542
|
+
optional: false;
|
|
543
|
+
customType: number;
|
|
544
|
+
}, "optional"> & {
|
|
545
|
+
optional: true;
|
|
546
|
+
};
|
|
547
|
+
readonly uidValidity: Omit<{
|
|
548
|
+
type: "number";
|
|
549
|
+
optional: false;
|
|
550
|
+
customType: number;
|
|
551
|
+
}, "optional"> & {
|
|
552
|
+
optional: true;
|
|
553
|
+
} & {
|
|
554
|
+
serverName: string;
|
|
555
|
+
};
|
|
540
556
|
};
|
|
541
557
|
primaryKey: readonly [string, ...string[]];
|
|
542
558
|
} & {
|
|
@@ -796,7 +812,7 @@ export declare const getThreads: import("@rocicorp/zero").SyncedQuery<"getThread
|
|
|
796
812
|
}];
|
|
797
813
|
threads: [{
|
|
798
814
|
readonly sourceField: string[];
|
|
799
|
-
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId")[];
|
|
815
|
+
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId" | "uidValidity" | "uid")[];
|
|
800
816
|
readonly destSchema: "threadLabel";
|
|
801
817
|
readonly cardinality: "many";
|
|
802
818
|
}, {
|
|
@@ -857,7 +873,7 @@ export declare const getThreads: import("@rocicorp/zero").SyncedQuery<"getThread
|
|
|
857
873
|
}];
|
|
858
874
|
labels: [{
|
|
859
875
|
readonly sourceField: string[];
|
|
860
|
-
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId")[];
|
|
876
|
+
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId" | "uidValidity" | "uid")[];
|
|
861
877
|
readonly destSchema: "threadLabel";
|
|
862
878
|
readonly cardinality: "many";
|
|
863
879
|
}, {
|
|
@@ -908,7 +924,7 @@ export declare const getThreads: import("@rocicorp/zero").SyncedQuery<"getThread
|
|
|
908
924
|
}];
|
|
909
925
|
labels: [{
|
|
910
926
|
readonly sourceField: string[];
|
|
911
|
-
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId")[];
|
|
927
|
+
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId" | "uidValidity" | "uid")[];
|
|
912
928
|
readonly destSchema: "threadLabel";
|
|
913
929
|
readonly cardinality: "many";
|
|
914
930
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getThreads.d.ts","sourceRoot":"","sources":["../../../src/zero/queries/getThreads.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAMlE,KAAK,cAAc,GAAG;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,EAAE,CAAC,EAAE,MAAM,CAAA;QACX,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;QACrB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;QACvB,IAAI,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDtB,CAAA"}
|
|
@@ -525,6 +525,22 @@ export declare const getUser: import("@rocicorp/zero").SyncedQuery<"getUser", Ma
|
|
|
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
|
} & {
|
|
@@ -784,7 +800,7 @@ export declare const getUser: import("@rocicorp/zero").SyncedQuery<"getUser", Ma
|
|
|
784
800
|
}];
|
|
785
801
|
threads: [{
|
|
786
802
|
readonly sourceField: string[];
|
|
787
|
-
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId")[];
|
|
803
|
+
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId" | "uidValidity" | "uid")[];
|
|
788
804
|
readonly destSchema: "threadLabel";
|
|
789
805
|
readonly cardinality: "many";
|
|
790
806
|
}, {
|
|
@@ -845,7 +861,7 @@ export declare const getUser: import("@rocicorp/zero").SyncedQuery<"getUser", Ma
|
|
|
845
861
|
}];
|
|
846
862
|
labels: [{
|
|
847
863
|
readonly sourceField: string[];
|
|
848
|
-
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId")[];
|
|
864
|
+
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId" | "uidValidity" | "uid")[];
|
|
849
865
|
readonly destSchema: "threadLabel";
|
|
850
866
|
readonly cardinality: "many";
|
|
851
867
|
}, {
|
|
@@ -896,7 +912,7 @@ export declare const getUser: import("@rocicorp/zero").SyncedQuery<"getUser", Ma
|
|
|
896
912
|
}];
|
|
897
913
|
labels: [{
|
|
898
914
|
readonly sourceField: string[];
|
|
899
|
-
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId")[];
|
|
915
|
+
readonly destField: ("accountId" | "labelId" | "threadId" | "threadMessageId" | "uidValidity" | "uid")[];
|
|
900
916
|
readonly destSchema: "threadLabel";
|
|
901
917
|
readonly cardinality: "many";
|
|
902
918
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUser.d.ts","sourceRoot":"","sources":["../../../src/zero/queries/getUser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAGlE,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"getUser.d.ts","sourceRoot":"","sources":["../../../src/zero/queries/getUser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAGlE,eAAO,MAAM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