@marcoappio/marco-config 2.0.489 → 2.0.491
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/zero/index.d.ts +23 -41
- package/dist/zero/index.d.ts.map +1 -1
- package/dist/zero/mutatorSchemas/index.d.ts +23 -41
- package/dist/zero/mutatorSchemas/index.d.ts.map +1 -1
- package/dist/zero/mutatorSchemas/thread.d.ts +23 -41
- package/dist/zero/mutatorSchemas/thread.d.ts.map +1 -1
- package/dist/zero/mutatorSchemas/thread.js +12 -20
- 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 +146 -152
- package/dist/zero/mutators/threadMutators/threadMutators.test.js +22 -89
- package/package.json +1 -1
package/dist/zero/index.d.ts
CHANGED
|
@@ -230,87 +230,69 @@ export declare const marcoZero: {
|
|
|
230
230
|
readonly thread: {
|
|
231
231
|
readonly addLabel: {
|
|
232
232
|
readonly delta: import("valibot").ObjectSchema<{
|
|
233
|
-
readonly
|
|
234
|
-
|
|
235
|
-
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>;
|
|
236
|
-
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>;
|
|
237
|
-
readonly uid: import("valibot").NumberSchema<undefined>;
|
|
238
|
-
readonly uidValidity: import("valibot").NumberSchema<undefined>;
|
|
233
|
+
readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
|
|
234
|
+
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>;
|
|
239
235
|
}, undefined>, undefined>;
|
|
240
|
-
readonly
|
|
236
|
+
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>;
|
|
241
237
|
}, undefined>;
|
|
242
238
|
};
|
|
243
239
|
readonly delete: {
|
|
244
240
|
readonly delta: import("valibot").ObjectSchema<{
|
|
245
|
-
readonly
|
|
241
|
+
readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
|
|
242
|
+
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>;
|
|
243
|
+
}, undefined>, undefined>;
|
|
246
244
|
}, undefined>;
|
|
247
245
|
};
|
|
248
246
|
readonly removeLabel: {
|
|
249
247
|
readonly delta: import("valibot").ObjectSchema<{
|
|
250
|
-
readonly
|
|
251
|
-
|
|
252
|
-
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>;
|
|
253
|
-
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>;
|
|
254
|
-
readonly uid: import("valibot").NumberSchema<undefined>;
|
|
255
|
-
readonly uidValidity: import("valibot").NumberSchema<undefined>;
|
|
248
|
+
readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
|
|
249
|
+
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
250
|
}, undefined>, undefined>;
|
|
257
|
-
readonly
|
|
251
|
+
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>;
|
|
258
252
|
}, undefined>;
|
|
259
253
|
};
|
|
260
254
|
readonly setArchive: {
|
|
261
255
|
readonly delta: import("valibot").ObjectSchema<{
|
|
262
|
-
readonly
|
|
263
|
-
readonly
|
|
264
|
-
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>;
|
|
265
|
-
readonly uid: import("valibot").NumberSchema<undefined>;
|
|
266
|
-
readonly uidValidity: import("valibot").NumberSchema<undefined>;
|
|
256
|
+
readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
|
|
257
|
+
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
258
|
}, undefined>, undefined>;
|
|
268
|
-
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>;
|
|
269
259
|
}, undefined>;
|
|
270
260
|
};
|
|
271
261
|
readonly setFlagged: {
|
|
272
262
|
readonly delta: import("valibot").ObjectSchema<{
|
|
263
|
+
readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
|
|
264
|
+
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>;
|
|
265
|
+
}, undefined>, undefined>;
|
|
273
266
|
readonly flagged: import("valibot").NonOptionalSchema<import("valibot").BooleanSchema<undefined>, undefined>;
|
|
274
|
-
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>;
|
|
275
267
|
}, undefined>;
|
|
276
268
|
};
|
|
277
269
|
readonly setInbox: {
|
|
278
270
|
readonly delta: import("valibot").ObjectSchema<{
|
|
279
|
-
readonly
|
|
280
|
-
readonly
|
|
281
|
-
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>;
|
|
282
|
-
readonly uid: import("valibot").NumberSchema<undefined>;
|
|
283
|
-
readonly uidValidity: import("valibot").NumberSchema<undefined>;
|
|
271
|
+
readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
|
|
272
|
+
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>;
|
|
284
273
|
}, undefined>, undefined>;
|
|
285
|
-
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>;
|
|
286
274
|
}, undefined>;
|
|
287
275
|
};
|
|
288
276
|
readonly setSeen: {
|
|
289
277
|
readonly delta: import("valibot").ObjectSchema<{
|
|
278
|
+
readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
|
|
279
|
+
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>;
|
|
280
|
+
}, undefined>, undefined>;
|
|
290
281
|
readonly seen: import("valibot").BooleanSchema<undefined>;
|
|
291
|
-
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>;
|
|
292
282
|
}, undefined>;
|
|
293
283
|
};
|
|
294
284
|
readonly setSpam: {
|
|
295
285
|
readonly delta: import("valibot").ObjectSchema<{
|
|
296
|
-
readonly
|
|
297
|
-
readonly
|
|
298
|
-
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>;
|
|
299
|
-
readonly uid: import("valibot").NumberSchema<undefined>;
|
|
300
|
-
readonly uidValidity: import("valibot").NumberSchema<undefined>;
|
|
286
|
+
readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
|
|
287
|
+
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>;
|
|
301
288
|
}, undefined>, undefined>;
|
|
302
|
-
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>;
|
|
303
289
|
}, undefined>;
|
|
304
290
|
};
|
|
305
291
|
readonly setTrash: {
|
|
306
292
|
readonly delta: import("valibot").ObjectSchema<{
|
|
307
|
-
readonly
|
|
308
|
-
readonly
|
|
309
|
-
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>;
|
|
310
|
-
readonly uid: import("valibot").NumberSchema<undefined>;
|
|
311
|
-
readonly uidValidity: import("valibot").NumberSchema<undefined>;
|
|
293
|
+
readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
|
|
294
|
+
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>;
|
|
312
295
|
}, undefined>, undefined>;
|
|
313
|
-
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>;
|
|
314
296
|
}, undefined>;
|
|
315
297
|
};
|
|
316
298
|
};
|
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":"A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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAU,CAAA;AAEV,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -228,87 +228,69 @@ export declare const zeroMutatorSchemas: {
|
|
|
228
228
|
readonly thread: {
|
|
229
229
|
readonly addLabel: {
|
|
230
230
|
readonly delta: import("valibot").ObjectSchema<{
|
|
231
|
-
readonly
|
|
232
|
-
|
|
233
|
-
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>;
|
|
234
|
-
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>;
|
|
235
|
-
readonly uid: import("valibot").NumberSchema<undefined>;
|
|
236
|
-
readonly uidValidity: import("valibot").NumberSchema<undefined>;
|
|
231
|
+
readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
|
|
232
|
+
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>;
|
|
237
233
|
}, undefined>, undefined>;
|
|
238
|
-
readonly
|
|
234
|
+
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>;
|
|
239
235
|
}, undefined>;
|
|
240
236
|
};
|
|
241
237
|
readonly delete: {
|
|
242
238
|
readonly delta: import("valibot").ObjectSchema<{
|
|
243
|
-
readonly
|
|
239
|
+
readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
|
|
240
|
+
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>;
|
|
241
|
+
}, undefined>, undefined>;
|
|
244
242
|
}, undefined>;
|
|
245
243
|
};
|
|
246
244
|
readonly removeLabel: {
|
|
247
245
|
readonly delta: import("valibot").ObjectSchema<{
|
|
248
|
-
readonly
|
|
249
|
-
|
|
250
|
-
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>;
|
|
251
|
-
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>;
|
|
252
|
-
readonly uid: import("valibot").NumberSchema<undefined>;
|
|
253
|
-
readonly uidValidity: import("valibot").NumberSchema<undefined>;
|
|
246
|
+
readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
|
|
247
|
+
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>;
|
|
254
248
|
}, undefined>, undefined>;
|
|
255
|
-
readonly
|
|
249
|
+
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>;
|
|
256
250
|
}, undefined>;
|
|
257
251
|
};
|
|
258
252
|
readonly setArchive: {
|
|
259
253
|
readonly delta: import("valibot").ObjectSchema<{
|
|
260
|
-
readonly
|
|
261
|
-
readonly
|
|
262
|
-
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>;
|
|
263
|
-
readonly uid: import("valibot").NumberSchema<undefined>;
|
|
264
|
-
readonly uidValidity: import("valibot").NumberSchema<undefined>;
|
|
254
|
+
readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
|
|
255
|
+
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>;
|
|
265
256
|
}, undefined>, undefined>;
|
|
266
|
-
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
257
|
}, undefined>;
|
|
268
258
|
};
|
|
269
259
|
readonly setFlagged: {
|
|
270
260
|
readonly delta: import("valibot").ObjectSchema<{
|
|
261
|
+
readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
|
|
262
|
+
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>;
|
|
263
|
+
}, undefined>, undefined>;
|
|
271
264
|
readonly flagged: import("valibot").NonOptionalSchema<import("valibot").BooleanSchema<undefined>, undefined>;
|
|
272
|
-
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>;
|
|
273
265
|
}, undefined>;
|
|
274
266
|
};
|
|
275
267
|
readonly setInbox: {
|
|
276
268
|
readonly delta: import("valibot").ObjectSchema<{
|
|
277
|
-
readonly
|
|
278
|
-
readonly
|
|
279
|
-
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>;
|
|
280
|
-
readonly uid: import("valibot").NumberSchema<undefined>;
|
|
281
|
-
readonly uidValidity: import("valibot").NumberSchema<undefined>;
|
|
269
|
+
readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
|
|
270
|
+
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>;
|
|
282
271
|
}, undefined>, undefined>;
|
|
283
|
-
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>;
|
|
284
272
|
}, undefined>;
|
|
285
273
|
};
|
|
286
274
|
readonly setSeen: {
|
|
287
275
|
readonly delta: import("valibot").ObjectSchema<{
|
|
276
|
+
readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
|
|
277
|
+
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
|
+
}, undefined>, undefined>;
|
|
288
279
|
readonly seen: import("valibot").BooleanSchema<undefined>;
|
|
289
|
-
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>;
|
|
290
280
|
}, undefined>;
|
|
291
281
|
};
|
|
292
282
|
readonly setSpam: {
|
|
293
283
|
readonly delta: import("valibot").ObjectSchema<{
|
|
294
|
-
readonly
|
|
295
|
-
readonly
|
|
296
|
-
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>;
|
|
297
|
-
readonly uid: import("valibot").NumberSchema<undefined>;
|
|
298
|
-
readonly uidValidity: import("valibot").NumberSchema<undefined>;
|
|
284
|
+
readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
|
|
285
|
+
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>;
|
|
299
286
|
}, undefined>, undefined>;
|
|
300
|
-
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>;
|
|
301
287
|
}, undefined>;
|
|
302
288
|
};
|
|
303
289
|
readonly setTrash: {
|
|
304
290
|
readonly delta: import("valibot").ObjectSchema<{
|
|
305
|
-
readonly
|
|
306
|
-
readonly
|
|
307
|
-
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>;
|
|
308
|
-
readonly uid: import("valibot").NumberSchema<undefined>;
|
|
309
|
-
readonly uidValidity: import("valibot").NumberSchema<undefined>;
|
|
291
|
+
readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
|
|
292
|
+
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>;
|
|
310
293
|
}, undefined>, undefined>;
|
|
311
|
-
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>;
|
|
312
294
|
}, undefined>;
|
|
313
295
|
};
|
|
314
296
|
};
|
|
@@ -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"}
|
|
@@ -2,87 +2,69 @@ import * as v from 'valibot';
|
|
|
2
2
|
export declare const threadMutatorSchemas: {
|
|
3
3
|
readonly addLabel: {
|
|
4
4
|
readonly delta: v.ObjectSchema<{
|
|
5
|
-
readonly
|
|
6
|
-
|
|
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>;
|
|
5
|
+
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
6
|
+
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
11
7
|
}, undefined>, undefined>;
|
|
12
|
-
readonly
|
|
8
|
+
readonly labelPath: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
13
9
|
}, undefined>;
|
|
14
10
|
};
|
|
15
11
|
readonly delete: {
|
|
16
12
|
readonly delta: v.ObjectSchema<{
|
|
17
|
-
readonly
|
|
13
|
+
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
14
|
+
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
15
|
+
}, undefined>, undefined>;
|
|
18
16
|
}, undefined>;
|
|
19
17
|
};
|
|
20
18
|
readonly removeLabel: {
|
|
21
19
|
readonly delta: v.ObjectSchema<{
|
|
22
|
-
readonly
|
|
23
|
-
|
|
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>;
|
|
20
|
+
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
21
|
+
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
28
22
|
}, undefined>, undefined>;
|
|
29
|
-
readonly
|
|
23
|
+
readonly labelPath: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
30
24
|
}, undefined>;
|
|
31
25
|
};
|
|
32
26
|
readonly setArchive: {
|
|
33
27
|
readonly delta: v.ObjectSchema<{
|
|
34
|
-
readonly
|
|
35
|
-
readonly
|
|
36
|
-
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
37
|
-
readonly uid: v.NumberSchema<undefined>;
|
|
38
|
-
readonly uidValidity: v.NumberSchema<undefined>;
|
|
28
|
+
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
29
|
+
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
39
30
|
}, undefined>, undefined>;
|
|
40
|
-
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
41
31
|
}, undefined>;
|
|
42
32
|
};
|
|
43
33
|
readonly setFlagged: {
|
|
44
34
|
readonly delta: v.ObjectSchema<{
|
|
35
|
+
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
36
|
+
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
37
|
+
}, undefined>, undefined>;
|
|
45
38
|
readonly flagged: v.NonOptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
46
|
-
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
47
39
|
}, undefined>;
|
|
48
40
|
};
|
|
49
41
|
readonly setInbox: {
|
|
50
42
|
readonly delta: v.ObjectSchema<{
|
|
51
|
-
readonly
|
|
52
|
-
readonly
|
|
53
|
-
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
54
|
-
readonly uid: v.NumberSchema<undefined>;
|
|
55
|
-
readonly uidValidity: v.NumberSchema<undefined>;
|
|
43
|
+
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
44
|
+
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
56
45
|
}, undefined>, undefined>;
|
|
57
|
-
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
58
46
|
}, undefined>;
|
|
59
47
|
};
|
|
60
48
|
readonly setSeen: {
|
|
61
49
|
readonly delta: v.ObjectSchema<{
|
|
50
|
+
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
51
|
+
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
52
|
+
}, undefined>, undefined>;
|
|
62
53
|
readonly seen: v.BooleanSchema<undefined>;
|
|
63
|
-
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
64
54
|
}, undefined>;
|
|
65
55
|
};
|
|
66
56
|
readonly setSpam: {
|
|
67
57
|
readonly delta: v.ObjectSchema<{
|
|
68
|
-
readonly
|
|
69
|
-
readonly
|
|
70
|
-
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
71
|
-
readonly uid: v.NumberSchema<undefined>;
|
|
72
|
-
readonly uidValidity: v.NumberSchema<undefined>;
|
|
58
|
+
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
59
|
+
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
73
60
|
}, undefined>, undefined>;
|
|
74
|
-
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
75
61
|
}, undefined>;
|
|
76
62
|
};
|
|
77
63
|
readonly setTrash: {
|
|
78
64
|
readonly delta: v.ObjectSchema<{
|
|
79
|
-
readonly
|
|
80
|
-
readonly
|
|
81
|
-
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
82
|
-
readonly uid: v.NumberSchema<undefined>;
|
|
83
|
-
readonly uidValidity: v.NumberSchema<undefined>;
|
|
65
|
+
readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
|
|
66
|
+
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
84
67
|
}, undefined>, undefined>;
|
|
85
|
-
readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
86
68
|
}, undefined>;
|
|
87
69
|
};
|
|
88
70
|
};
|
|
@@ -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;AAoB5B,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCvB,CAAA"}
|
|
@@ -1,55 +1,47 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
import { marcoSchemas } from '../../schemas';
|
|
3
|
-
const
|
|
4
|
-
threadIds: v.array(marcoSchemas.string.required()),
|
|
5
|
-
});
|
|
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),
|
|
3
|
+
const accountsSchema = v.record(marcoSchemas.string.required(), v.object({
|
|
14
4
|
threadIds: v.array(marcoSchemas.string.required()),
|
|
5
|
+
}));
|
|
6
|
+
const baseThreadSchema = v.object({
|
|
7
|
+
accounts: accountsSchema,
|
|
15
8
|
});
|
|
16
9
|
const threadChangeLabelSchema = v.object({
|
|
10
|
+
accounts: accountsSchema,
|
|
17
11
|
labelPath: marcoSchemas.string.required(),
|
|
18
|
-
sourceLocations: v.array(imapSourceLocationSchema),
|
|
19
|
-
threadIds: v.array(marcoSchemas.string.required()),
|
|
20
12
|
});
|
|
21
13
|
export const threadMutatorSchemas = {
|
|
22
14
|
addLabel: {
|
|
23
15
|
delta: threadChangeLabelSchema,
|
|
24
16
|
},
|
|
25
17
|
delete: {
|
|
26
|
-
delta:
|
|
18
|
+
delta: baseThreadSchema,
|
|
27
19
|
},
|
|
28
20
|
removeLabel: {
|
|
29
21
|
delta: threadChangeLabelSchema,
|
|
30
22
|
},
|
|
31
23
|
setArchive: {
|
|
32
|
-
delta:
|
|
24
|
+
delta: baseThreadSchema,
|
|
33
25
|
},
|
|
34
26
|
setFlagged: {
|
|
35
27
|
delta: v.object({
|
|
28
|
+
accounts: accountsSchema,
|
|
36
29
|
flagged: v.nonOptional(v.boolean()),
|
|
37
|
-
threadIds: v.array(marcoSchemas.string.required()),
|
|
38
30
|
}),
|
|
39
31
|
},
|
|
40
32
|
setInbox: {
|
|
41
|
-
delta:
|
|
33
|
+
delta: baseThreadSchema,
|
|
42
34
|
},
|
|
43
35
|
setSeen: {
|
|
44
36
|
delta: v.object({
|
|
37
|
+
accounts: accountsSchema,
|
|
45
38
|
seen: v.boolean(),
|
|
46
|
-
threadIds: v.array(marcoSchemas.string.required()),
|
|
47
39
|
}),
|
|
48
40
|
},
|
|
49
41
|
setSpam: {
|
|
50
|
-
delta:
|
|
42
|
+
delta: baseThreadSchema,
|
|
51
43
|
},
|
|
52
44
|
setTrash: {
|
|
53
|
-
delta:
|
|
45
|
+
delta: baseThreadSchema,
|
|
54
46
|
},
|
|
55
47
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Transaction } from '@rocicorp/zero';
|
|
2
2
|
import type * as v from 'valibot';
|
|
3
|
-
import type {
|
|
3
|
+
import type { LabelSpecialUse } from '../../../types';
|
|
4
4
|
import { type AuthData, type HandlerMap } from '../../../types';
|
|
5
5
|
import type { ZeroMutatorSchemas } from '../../../zero/mutatorSchemas';
|
|
6
6
|
import type { MarcoZeroSchema } from '../../../zero/schema';
|
|
7
7
|
export type ThreadMutatorCallbacks = {
|
|
8
8
|
[K in keyof ZeroMutatorSchemas['thread']]?: (args: v.InferOutput<ZeroMutatorSchemas['thread'][K]['delta']>) => Promise<void>;
|
|
9
9
|
};
|
|
10
|
-
export declare const setSystemLabel: (tx: Transaction<MarcoZeroSchema>, threadId: string, targetSpecialUse: LabelSpecialUse) => Promise<
|
|
10
|
+
export declare const setSystemLabel: (tx: Transaction<MarcoZeroSchema>, threadId: string, targetSpecialUse: LabelSpecialUse) => Promise<void>;
|
|
11
11
|
export declare const createThreadMutators: (_authData: AuthData | undefined, callbacks?: ThreadMutatorCallbacks) => HandlerMap<ZeroMutatorSchemas["thread"]>;
|
|
12
12
|
//# 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,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,KAAK,CAAC,MAAM,SAAS,CAAA;AAEjC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"threadMutators.d.ts","sourceRoot":"","sources":["../../../../src/zero/mutators/threadMutators/threadMutators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,KAAK,CAAC,MAAM,SAAS,CAAA;AAEjC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAiB,MAAM,qBAAqB,CAAA;AAEnF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhE,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;AAKD,eAAO,MAAM,cAAc,OACrB,WAAW,CAAC,eAAe,CAAC,YACtB,MAAM,oBACE,eAAe,KAChC,OAAO,CAAC,IAAI,CAyFd,CAAA;AAED,eAAO,MAAM,oBAAoB,cACpB,QAAQ,GAAG,SAAS,cACnB,sBAAsB,KACjC,UAAU,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CA4PxC,CAAA"}
|
|
@@ -6,9 +6,9 @@ export const setSystemLabel = async (tx, threadId, targetSpecialUse) => {
|
|
|
6
6
|
if (!thread) {
|
|
7
7
|
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
8
8
|
}
|
|
9
|
-
const [targetLabel,
|
|
9
|
+
const [targetLabel, messages] = await Promise.all([
|
|
10
10
|
tx.query.accountLabel.where('accountId', thread.accountId).where('specialUse', targetSpecialUse).one().run(),
|
|
11
|
-
tx.query.
|
|
11
|
+
tx.query.threadMessage.where('threadId', threadId).run(),
|
|
12
12
|
]);
|
|
13
13
|
if (!targetLabel) {
|
|
14
14
|
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
@@ -17,25 +17,18 @@ export const setSystemLabel = async (tx, threadId, targetSpecialUse) => {
|
|
|
17
17
|
const hasTarget = currentLabelIds.has(targetLabel.id);
|
|
18
18
|
const labelIdsToRemove = new Set(currentLabelIds);
|
|
19
19
|
labelIdsToRemove.delete(targetLabel.id);
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
uidValidity: label.uidValidity,
|
|
30
|
-
});
|
|
31
|
-
threadLabelDeletePromises.push(tx.mutate.threadLabel.delete({
|
|
32
|
-
accountId: thread.accountId,
|
|
33
|
-
labelId: label.labelId,
|
|
34
|
-
threadMessageId: label.threadMessageId,
|
|
35
|
-
}));
|
|
20
|
+
const threadLabelDeletes = [];
|
|
21
|
+
for (const message of messages) {
|
|
22
|
+
for (const labelId of labelIdsToRemove) {
|
|
23
|
+
threadLabelDeletes.push(tx.mutate.threadLabel.delete({
|
|
24
|
+
accountId: thread.accountId,
|
|
25
|
+
labelId,
|
|
26
|
+
threadMessageId: message.id,
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
36
29
|
}
|
|
37
30
|
await Promise.all([
|
|
38
|
-
...
|
|
31
|
+
...threadLabelDeletes,
|
|
39
32
|
...[...labelIdsToRemove].map(labelId => tx.mutate.threadByLabel.delete({ labelId, threadId })),
|
|
40
33
|
]);
|
|
41
34
|
if (thread.seen === false && labelIdsToRemove.size > 0) {
|
|
@@ -46,7 +39,6 @@ export const setSystemLabel = async (tx, threadId, targetSpecialUse) => {
|
|
|
46
39
|
})));
|
|
47
40
|
}
|
|
48
41
|
if (!hasTarget) {
|
|
49
|
-
const messages = await tx.query.threadMessage.where('threadId', threadId).run();
|
|
50
42
|
const baseTimestamp = Date.now();
|
|
51
43
|
await Promise.all([
|
|
52
44
|
...messages.map((message, i) => tx.mutate.threadLabel.insert({
|
|
@@ -77,160 +69,160 @@ export const setSystemLabel = async (tx, threadId, targetSpecialUse) => {
|
|
|
77
69
|
id: threadId,
|
|
78
70
|
labelIdList: buildLabelIdList([targetLabel.id]),
|
|
79
71
|
});
|
|
80
|
-
return sourceLocations;
|
|
81
72
|
};
|
|
82
73
|
export const createThreadMutators = (_authData, callbacks) => ({
|
|
83
74
|
addLabel: async (tx, args) => {
|
|
84
|
-
for (const
|
|
85
|
-
const
|
|
86
|
-
if (!thread) {
|
|
87
|
-
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
88
|
-
}
|
|
89
|
-
const [label, messages] = await Promise.all([
|
|
90
|
-
tx.query.accountLabel.where('accountId', thread.accountId).where('path', args.labelPath).one().run(),
|
|
91
|
-
tx.query.threadMessage.where('threadId', threadId).run(),
|
|
92
|
-
]);
|
|
75
|
+
for (const [accountId, { threadIds }] of Object.entries(args.accounts)) {
|
|
76
|
+
const label = await tx.query.accountLabel.where('accountId', accountId).where('path', args.labelPath).one().run();
|
|
93
77
|
if (!label) {
|
|
94
78
|
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
95
79
|
}
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
tx.
|
|
80
|
+
for (const threadId of threadIds) {
|
|
81
|
+
const [thread, messages] = await Promise.all([
|
|
82
|
+
tx.query.thread.where('id', threadId).one().run(),
|
|
83
|
+
tx.query.threadMessage.where('threadId', threadId).run(),
|
|
84
|
+
]);
|
|
85
|
+
if (!thread) {
|
|
86
|
+
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
87
|
+
}
|
|
88
|
+
const currentLabelIds = new Set(threadsUtils.parseLabelIdList(thread.labelIdList));
|
|
89
|
+
if (!currentLabelIds.has(label.id)) {
|
|
90
|
+
await Promise.all([
|
|
91
|
+
tx.mutate.threadByLabel.insert({
|
|
92
|
+
labelId: label.id,
|
|
93
|
+
latestMessageDate: thread.latestMessageDate,
|
|
94
|
+
threadId,
|
|
95
|
+
}),
|
|
96
|
+
...(thread.seen === false
|
|
97
|
+
? [
|
|
98
|
+
tx.mutate.accountLabel.update({
|
|
99
|
+
id: label.id,
|
|
100
|
+
unreadCount: (label.unreadCount ?? 0) + 1,
|
|
101
|
+
}),
|
|
102
|
+
]
|
|
103
|
+
: []),
|
|
104
|
+
]);
|
|
105
|
+
}
|
|
106
|
+
const existingChecks = await Promise.all(messages.map(x => tx.query.threadLabel.where('threadMessageId', x.id).where('labelId', label.id).one().run()));
|
|
107
|
+
const messagesToInsert = messages.filter((_, i) => !existingChecks[i]);
|
|
108
|
+
const baseTimestamp = Date.now();
|
|
109
|
+
if (messagesToInsert.length > 0) {
|
|
110
|
+
await Promise.all(messagesToInsert.map((x, i) => tx.mutate.threadLabel.insert({
|
|
111
|
+
accountId,
|
|
100
112
|
labelId: label.id,
|
|
101
|
-
|
|
113
|
+
lastSyncedAt: 0,
|
|
102
114
|
threadId,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
const existingChecks = await Promise.all(messages.map(message => tx.query.threadLabel.where('threadMessageId', message.id).where('labelId', label.id).one().run()));
|
|
115
|
-
const messagesToInsert = messages.filter((_, i) => !existingChecks[i]);
|
|
116
|
-
const baseTimestamp = Date.now();
|
|
117
|
-
if (messagesToInsert.length > 0) {
|
|
118
|
-
await Promise.all(messagesToInsert.map((message, i) => tx.mutate.threadLabel.insert({
|
|
119
|
-
accountId: thread.accountId,
|
|
120
|
-
labelId: label.id,
|
|
121
|
-
lastSyncedAt: 0,
|
|
122
|
-
threadId,
|
|
123
|
-
threadMessageId: message.id,
|
|
124
|
-
uid: -(baseTimestamp + i),
|
|
125
|
-
uidValidity: label.uidValidity ?? 0,
|
|
126
|
-
})));
|
|
115
|
+
threadMessageId: x.id,
|
|
116
|
+
uid: -(baseTimestamp + i),
|
|
117
|
+
uidValidity: label.uidValidity ?? 0,
|
|
118
|
+
})));
|
|
119
|
+
}
|
|
120
|
+
currentLabelIds.add(label.id);
|
|
121
|
+
await tx.mutate.thread.update({
|
|
122
|
+
id: threadId,
|
|
123
|
+
labelIdList: buildLabelIdList([...currentLabelIds]),
|
|
124
|
+
});
|
|
127
125
|
}
|
|
128
|
-
const allLabels = await tx.query.threadLabel.where('threadId', threadId).run();
|
|
129
|
-
await tx.mutate.thread.update({
|
|
130
|
-
id: threadId,
|
|
131
|
-
labelIdList: buildLabelIdList([...new Set(allLabels.map(x => x.labelId))]),
|
|
132
|
-
});
|
|
133
126
|
}
|
|
134
|
-
callbacks?.addLabel?.(
|
|
127
|
+
callbacks?.addLabel?.(args);
|
|
135
128
|
},
|
|
136
129
|
delete: async (tx, args) => {
|
|
137
|
-
for (const
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
if (thread
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
130
|
+
for (const [, { threadIds }] of Object.entries(args.accounts)) {
|
|
131
|
+
for (const threadId of threadIds) {
|
|
132
|
+
const thread = await tx.query.thread.where('id', threadId).one().run();
|
|
133
|
+
if (thread) {
|
|
134
|
+
if (thread.seen === false) {
|
|
135
|
+
const labelIds = threadsUtils.parseLabelIdList(thread.labelIdList);
|
|
136
|
+
if (labelIds.length > 0) {
|
|
137
|
+
const labels = await tx.query.accountLabel.where('id', 'IN', labelIds).run();
|
|
138
|
+
await Promise.all(labels.map(x => tx.mutate.accountLabel.update({
|
|
139
|
+
id: x.id,
|
|
140
|
+
unreadCount: Math.max(0, (x.unreadCount ?? 0) - 1),
|
|
141
|
+
})));
|
|
142
|
+
}
|
|
148
143
|
}
|
|
144
|
+
await tx.mutate.thread.delete({
|
|
145
|
+
id: threadId,
|
|
146
|
+
});
|
|
149
147
|
}
|
|
150
|
-
await tx.mutate.thread.delete({
|
|
151
|
-
id: threadId,
|
|
152
|
-
});
|
|
153
148
|
}
|
|
154
149
|
}
|
|
155
150
|
callbacks?.delete?.(args);
|
|
156
151
|
},
|
|
157
152
|
removeLabel: async (tx, args) => {
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
const thread = await tx.query.thread.where('id', threadId).one().run();
|
|
161
|
-
if (!thread) {
|
|
162
|
-
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
163
|
-
}
|
|
164
|
-
const [label, existingLabels] = await Promise.all([
|
|
165
|
-
tx.query.accountLabel.where('accountId', thread.accountId).where('path', args.labelPath).one().run(),
|
|
166
|
-
tx.query.threadLabel.where('threadId', threadId).run(),
|
|
167
|
-
]);
|
|
153
|
+
for (const [accountId, { threadIds }] of Object.entries(args.accounts)) {
|
|
154
|
+
const label = await tx.query.accountLabel.where('accountId', accountId).where('path', args.labelPath).one().run();
|
|
168
155
|
if (!label) {
|
|
169
156
|
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
170
157
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
158
|
+
for (const threadId of threadIds) {
|
|
159
|
+
const [thread, messages] = await Promise.all([
|
|
160
|
+
tx.query.thread.where('id', threadId).one().run(),
|
|
161
|
+
tx.query.threadMessage.where('threadId', threadId).run(),
|
|
162
|
+
]);
|
|
163
|
+
if (!thread) {
|
|
164
|
+
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
165
|
+
}
|
|
166
|
+
const currentLabelIds = new Set(threadsUtils.parseLabelIdList(thread.labelIdList));
|
|
167
|
+
if (!currentLabelIds.has(label.id)) {
|
|
168
|
+
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
169
|
+
}
|
|
170
|
+
currentLabelIds.delete(label.id);
|
|
171
|
+
await Promise.all([
|
|
172
|
+
...messages.map(x => tx.mutate.threadLabel.delete({
|
|
173
|
+
accountId,
|
|
174
|
+
labelId: label.id,
|
|
175
|
+
threadMessageId: x.id,
|
|
176
|
+
})),
|
|
177
|
+
tx.mutate.threadByLabel.delete({
|
|
178
|
+
labelId: label.id,
|
|
179
|
+
threadId,
|
|
180
|
+
}),
|
|
181
|
+
...(thread.seen === false
|
|
182
|
+
? [
|
|
183
|
+
tx.mutate.accountLabel.update({
|
|
184
|
+
id: label.id,
|
|
185
|
+
unreadCount: Math.max(0, (label.unreadCount ?? 0) - 1),
|
|
186
|
+
}),
|
|
187
|
+
]
|
|
188
|
+
: []),
|
|
189
|
+
tx.mutate.thread.update({
|
|
190
|
+
id: threadId,
|
|
191
|
+
labelIdList: buildLabelIdList([...currentLabelIds]),
|
|
192
|
+
}),
|
|
193
|
+
]);
|
|
182
194
|
}
|
|
183
|
-
const currentLabelIds = new Set(threadsUtils.parseLabelIdList(thread.labelIdList));
|
|
184
|
-
currentLabelIds.delete(label.id);
|
|
185
|
-
await Promise.all([
|
|
186
|
-
...labelsForThisLabel.map(existing => tx.mutate.threadLabel.delete({
|
|
187
|
-
accountId: thread.accountId,
|
|
188
|
-
labelId: label.id,
|
|
189
|
-
threadMessageId: existing.threadMessageId,
|
|
190
|
-
})),
|
|
191
|
-
tx.mutate.threadByLabel.delete({
|
|
192
|
-
labelId: label.id,
|
|
193
|
-
threadId,
|
|
194
|
-
}),
|
|
195
|
-
...(thread.seen === false
|
|
196
|
-
? [
|
|
197
|
-
tx.mutate.accountLabel.update({
|
|
198
|
-
id: label.id,
|
|
199
|
-
unreadCount: Math.max(0, (label.unreadCount ?? 0) - 1),
|
|
200
|
-
}),
|
|
201
|
-
]
|
|
202
|
-
: []),
|
|
203
|
-
tx.mutate.thread.update({
|
|
204
|
-
id: threadId,
|
|
205
|
-
labelIdList: buildLabelIdList([...currentLabelIds]),
|
|
206
|
-
}),
|
|
207
|
-
]);
|
|
208
195
|
}
|
|
209
|
-
callbacks?.removeLabel?.(
|
|
196
|
+
callbacks?.removeLabel?.(args);
|
|
210
197
|
},
|
|
211
198
|
setArchive: async (tx, args) => {
|
|
212
|
-
const
|
|
213
|
-
|
|
214
|
-
|
|
199
|
+
for (const [, { threadIds }] of Object.entries(args.accounts)) {
|
|
200
|
+
for (const threadId of threadIds) {
|
|
201
|
+
await setSystemLabel(tx, threadId, 'ARCHIVE');
|
|
202
|
+
}
|
|
215
203
|
}
|
|
216
|
-
callbacks?.setArchive?.(
|
|
204
|
+
callbacks?.setArchive?.(args);
|
|
217
205
|
},
|
|
218
206
|
setFlagged: async (tx, args) => {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
207
|
+
for (const [, { threadIds }] of Object.entries(args.accounts)) {
|
|
208
|
+
await Promise.all(threadIds.map(threadId => tx.mutate.thread.update({
|
|
209
|
+
flagged: args.flagged,
|
|
210
|
+
id: threadId,
|
|
211
|
+
})));
|
|
212
|
+
}
|
|
223
213
|
callbacks?.setFlagged?.(args);
|
|
224
214
|
},
|
|
225
215
|
setInbox: async (tx, args) => {
|
|
226
|
-
const
|
|
227
|
-
|
|
228
|
-
|
|
216
|
+
for (const [, { threadIds }] of Object.entries(args.accounts)) {
|
|
217
|
+
for (const threadId of threadIds) {
|
|
218
|
+
await setSystemLabel(tx, threadId, 'INBOX');
|
|
219
|
+
}
|
|
229
220
|
}
|
|
230
|
-
callbacks?.setInbox?.(
|
|
221
|
+
callbacks?.setInbox?.(args);
|
|
231
222
|
},
|
|
232
223
|
setSeen: async (tx, args) => {
|
|
233
|
-
const
|
|
224
|
+
const allThreadIds = Object.values(args.accounts).flatMap(x => x.threadIds);
|
|
225
|
+
const threads = await tx.query.thread.where('id', 'IN', allThreadIds).run();
|
|
234
226
|
const labelCounts = new Map();
|
|
235
227
|
for (const thread of threads) {
|
|
236
228
|
if (thread.seen !== args.seen) {
|
|
@@ -243,30 +235,32 @@ export const createThreadMutators = (_authData, callbacks) => ({
|
|
|
243
235
|
const labels = await tx.query.accountLabel.where('id', 'IN', [...labelCounts.keys()]).run();
|
|
244
236
|
const delta = args.seen ? -1 : 1;
|
|
245
237
|
await Promise.all(labels
|
|
246
|
-
.filter(
|
|
247
|
-
.map(
|
|
248
|
-
id:
|
|
249
|
-
unreadCount: Math.max(0, (
|
|
238
|
+
.filter(x => labelCounts.has(x.id))
|
|
239
|
+
.map(x => tx.mutate.accountLabel.update({
|
|
240
|
+
id: x.id,
|
|
241
|
+
unreadCount: Math.max(0, (x.unreadCount ?? 0) + delta * (labelCounts.get(x.id) ?? 0)),
|
|
250
242
|
})));
|
|
251
243
|
}
|
|
252
|
-
await Promise.all(
|
|
244
|
+
await Promise.all(allThreadIds.map(threadId => tx.mutate.thread.update({
|
|
253
245
|
id: threadId,
|
|
254
246
|
seen: args.seen,
|
|
255
247
|
})));
|
|
256
248
|
callbacks?.setSeen?.(args);
|
|
257
249
|
},
|
|
258
250
|
setSpam: async (tx, args) => {
|
|
259
|
-
const
|
|
260
|
-
|
|
261
|
-
|
|
251
|
+
for (const [, { threadIds }] of Object.entries(args.accounts)) {
|
|
252
|
+
for (const threadId of threadIds) {
|
|
253
|
+
await setSystemLabel(tx, threadId, 'SPAM');
|
|
254
|
+
}
|
|
262
255
|
}
|
|
263
|
-
callbacks?.setSpam?.(
|
|
256
|
+
callbacks?.setSpam?.(args);
|
|
264
257
|
},
|
|
265
258
|
setTrash: async (tx, args) => {
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
|
|
259
|
+
for (const [, { threadIds }] of Object.entries(args.accounts)) {
|
|
260
|
+
for (const threadId of threadIds) {
|
|
261
|
+
await setSystemLabel(tx, threadId, 'TRASH');
|
|
262
|
+
}
|
|
269
263
|
}
|
|
270
|
-
callbacks?.setTrash?.(
|
|
264
|
+
callbacks?.setTrash?.(args);
|
|
271
265
|
},
|
|
272
266
|
});
|
|
@@ -79,9 +79,8 @@ describe('threadMutators', () => {
|
|
|
79
79
|
};
|
|
80
80
|
const mutators = createMutators();
|
|
81
81
|
await mutators.thread.addLabel(transaction, {
|
|
82
|
+
accounts: { 'test-account-id-1': { threadIds: ['test-thread-id-1'] } },
|
|
82
83
|
labelPath: 'Work',
|
|
83
|
-
sourceLocations: [],
|
|
84
|
-
threadIds: ['test-thread-id-1'],
|
|
85
84
|
});
|
|
86
85
|
expect(threadLabelInsert).toHaveBeenCalledTimes(2);
|
|
87
86
|
expect(threadLabelInsert).toHaveBeenCalledWith(expect.objectContaining({
|
|
@@ -140,7 +139,7 @@ describe('threadMutators', () => {
|
|
|
140
139
|
};
|
|
141
140
|
const mutators = createMutators();
|
|
142
141
|
await mutators.thread.delete(transaction, {
|
|
143
|
-
threadIds: ['test-thread-id-1', 'test-thread-id-2'],
|
|
142
|
+
accounts: { 'test-account-id-1': { threadIds: ['test-thread-id-1', 'test-thread-id-2'] } },
|
|
144
143
|
});
|
|
145
144
|
expect(threadDelete).toHaveBeenCalledTimes(2);
|
|
146
145
|
expect(threadDelete).toHaveBeenCalledWith({ id: 'test-thread-id-1' });
|
|
@@ -175,7 +174,7 @@ describe('threadMutators', () => {
|
|
|
175
174
|
};
|
|
176
175
|
const mutators = createMutators();
|
|
177
176
|
await mutators.thread.delete(transaction, {
|
|
178
|
-
threadIds: ['test-thread-id-1'],
|
|
177
|
+
accounts: { 'test-account-id-1': { threadIds: ['test-thread-id-1'] } },
|
|
179
178
|
});
|
|
180
179
|
expect(threadDelete).toHaveBeenCalledTimes(1);
|
|
181
180
|
expect(labelUpdate).not.toHaveBeenCalled();
|
|
@@ -199,7 +198,7 @@ describe('threadMutators', () => {
|
|
|
199
198
|
};
|
|
200
199
|
const mutators = createMutators();
|
|
201
200
|
await mutators.thread.delete(transaction, {
|
|
202
|
-
threadIds: ['non-existent-thread'],
|
|
201
|
+
accounts: { 'test-account-id-1': { threadIds: ['non-existent-thread'] } },
|
|
203
202
|
});
|
|
204
203
|
expect(threadDelete).not.toHaveBeenCalled();
|
|
205
204
|
});
|
|
@@ -209,24 +208,14 @@ describe('threadMutators', () => {
|
|
|
209
208
|
const threadRecord = {
|
|
210
209
|
accountId: 'test-account-id-1',
|
|
211
210
|
id: 'test-thread-id-1',
|
|
211
|
+
labelIdList: ' test-label-id-1 ',
|
|
212
212
|
};
|
|
213
213
|
const labelRecord = {
|
|
214
214
|
accountId: 'test-account-id-1',
|
|
215
215
|
id: 'test-label-id-1',
|
|
216
216
|
path: 'Work',
|
|
217
217
|
};
|
|
218
|
-
const
|
|
219
|
-
{
|
|
220
|
-
labelId: 'test-label-id-1',
|
|
221
|
-
threadId: 'test-thread-id-1',
|
|
222
|
-
threadMessageId: 'test-message-id-1',
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
labelId: 'test-label-id-1',
|
|
226
|
-
threadId: 'test-thread-id-1',
|
|
227
|
-
threadMessageId: 'test-message-id-2',
|
|
228
|
-
},
|
|
229
|
-
];
|
|
218
|
+
const messageRecords = [{ id: 'test-message-id-1' }, { id: 'test-message-id-2' }];
|
|
230
219
|
const runThread = mock(async () => threadRecord);
|
|
231
220
|
const oneThread = mock(() => ({ run: runThread }));
|
|
232
221
|
const whereThread = mock(() => ({ one: oneThread }));
|
|
@@ -234,25 +223,11 @@ describe('threadMutators', () => {
|
|
|
234
223
|
const oneLabel = mock(() => ({ run: runLabel }));
|
|
235
224
|
const whereLabelPath = mock(() => ({ one: oneLabel }));
|
|
236
225
|
const whereLabelAccount = mock(() => ({ where: whereLabelPath }));
|
|
237
|
-
const
|
|
238
|
-
const
|
|
239
|
-
const whereThreadLabel = mock((field) => {
|
|
240
|
-
if (field === 'threadId') {
|
|
241
|
-
return { run: runExisting, where: whereLabelId };
|
|
242
|
-
}
|
|
243
|
-
return { where: whereLabelId };
|
|
244
|
-
});
|
|
226
|
+
const runMessages = mock(async () => messageRecords);
|
|
227
|
+
const whereMessages = mock(() => ({ run: runMessages }));
|
|
245
228
|
const threadLabelDelete = mock(async () => { });
|
|
246
229
|
const threadUpdate = mock(async () => { });
|
|
247
230
|
const threadByLabelDelete = mock(async () => { });
|
|
248
|
-
const runThreadByLabel = mock(async () => ({
|
|
249
|
-
labelId: 'test-label-id-1',
|
|
250
|
-
latestMessageDate: 1234567890,
|
|
251
|
-
threadId: 'test-thread-id-1',
|
|
252
|
-
}));
|
|
253
|
-
const oneThreadByLabel = mock(() => ({ run: runThreadByLabel }));
|
|
254
|
-
const whereThreadByLabelThreadId = mock(() => ({ one: oneThreadByLabel }));
|
|
255
|
-
const whereThreadByLabel = mock(() => ({ where: whereThreadByLabelThreadId }));
|
|
256
231
|
const transaction = {
|
|
257
232
|
mutate: {
|
|
258
233
|
accountLabel: {
|
|
@@ -275,19 +250,15 @@ describe('threadMutators', () => {
|
|
|
275
250
|
thread: {
|
|
276
251
|
where: whereThread,
|
|
277
252
|
},
|
|
278
|
-
|
|
279
|
-
where:
|
|
280
|
-
},
|
|
281
|
-
threadLabel: {
|
|
282
|
-
where: whereThreadLabel,
|
|
253
|
+
threadMessage: {
|
|
254
|
+
where: whereMessages,
|
|
283
255
|
},
|
|
284
256
|
},
|
|
285
257
|
};
|
|
286
258
|
const mutators = createMutators();
|
|
287
259
|
await mutators.thread.removeLabel(transaction, {
|
|
260
|
+
accounts: { 'test-account-id-1': { threadIds: ['test-thread-id-1'] } },
|
|
288
261
|
labelPath: 'Work',
|
|
289
|
-
sourceLocations: [],
|
|
290
|
-
threadIds: ['test-thread-id-1'],
|
|
291
262
|
});
|
|
292
263
|
expect(threadLabelDelete).toHaveBeenCalledTimes(2);
|
|
293
264
|
expect(threadLabelDelete).toHaveBeenCalledWith({
|
|
@@ -311,6 +282,7 @@ describe('threadMutators', () => {
|
|
|
311
282
|
const threadRecord = {
|
|
312
283
|
accountId: 'test-account-id-1',
|
|
313
284
|
id: 'test-thread-id-1',
|
|
285
|
+
labelIdList: ' test-inbox-label-id ',
|
|
314
286
|
};
|
|
315
287
|
const archiveLabel = {
|
|
316
288
|
accountId: 'test-account-id-1',
|
|
@@ -331,10 +303,6 @@ describe('threadMutators', () => {
|
|
|
331
303
|
}
|
|
332
304
|
return { where: whereSpecialUse };
|
|
333
305
|
});
|
|
334
|
-
const runAllThreadLabels = mock(async () => [
|
|
335
|
-
{ labelId: 'test-inbox-label-id', threadId: 'test-thread-id-1', threadMessageId: 'test-message-id-1' },
|
|
336
|
-
]);
|
|
337
|
-
const whereThreadLabel = mock(() => ({ run: runAllThreadLabels }));
|
|
338
306
|
const runMessages = mock(async () => messageRecords);
|
|
339
307
|
const whereMessages = mock(() => ({ run: runMessages }));
|
|
340
308
|
const threadLabelDelete = mock(async () => { });
|
|
@@ -342,14 +310,6 @@ describe('threadMutators', () => {
|
|
|
342
310
|
const threadUpdate = mock(async () => { });
|
|
343
311
|
const threadByLabelDelete = mock(async () => { });
|
|
344
312
|
const threadByLabelInsert = mock(async () => { });
|
|
345
|
-
const runThreadByLabel = mock(async () => ({
|
|
346
|
-
labelId: 'test-inbox-label-id',
|
|
347
|
-
latestMessageDate: 1234567890,
|
|
348
|
-
threadId: 'test-thread-id-1',
|
|
349
|
-
}));
|
|
350
|
-
const oneThreadByLabel = mock(() => ({ run: runThreadByLabel }));
|
|
351
|
-
const whereThreadByLabelThreadId = mock(() => ({ one: oneThreadByLabel }));
|
|
352
|
-
const whereThreadByLabel = mock(() => ({ where: whereThreadByLabelThreadId }));
|
|
353
313
|
const transaction = {
|
|
354
314
|
mutate: {
|
|
355
315
|
accountLabel: {
|
|
@@ -374,12 +334,6 @@ describe('threadMutators', () => {
|
|
|
374
334
|
thread: {
|
|
375
335
|
where: whereThread,
|
|
376
336
|
},
|
|
377
|
-
threadByLabel: {
|
|
378
|
-
where: whereThreadByLabel,
|
|
379
|
-
},
|
|
380
|
-
threadLabel: {
|
|
381
|
-
where: whereThreadLabel,
|
|
382
|
-
},
|
|
383
337
|
threadMessage: {
|
|
384
338
|
where: whereMessages,
|
|
385
339
|
},
|
|
@@ -387,8 +341,7 @@ describe('threadMutators', () => {
|
|
|
387
341
|
};
|
|
388
342
|
const mutators = createMutators();
|
|
389
343
|
await mutators.thread.setArchive(transaction, {
|
|
390
|
-
|
|
391
|
-
threadIds: ['test-thread-id-1'],
|
|
344
|
+
accounts: { 'test-account-id-1': { threadIds: ['test-thread-id-1'] } },
|
|
392
345
|
});
|
|
393
346
|
expect(threadLabelDelete).toHaveBeenCalledWith({
|
|
394
347
|
accountId: 'test-account-id-1',
|
|
@@ -420,8 +373,8 @@ describe('threadMutators', () => {
|
|
|
420
373
|
};
|
|
421
374
|
const mutators = createMutators();
|
|
422
375
|
await mutators.thread.setFlagged(transaction, {
|
|
376
|
+
accounts: { 'test-account-id-1': { threadIds: ['test-thread-id-1'] } },
|
|
423
377
|
flagged: true,
|
|
424
|
-
threadIds: ['test-thread-id-1'],
|
|
425
378
|
});
|
|
426
379
|
expect(threadUpdate).toHaveBeenCalledWith({
|
|
427
380
|
flagged: true,
|
|
@@ -434,6 +387,7 @@ describe('threadMutators', () => {
|
|
|
434
387
|
const threadRecord = {
|
|
435
388
|
accountId: 'test-account-id-1',
|
|
436
389
|
id: 'test-thread-id-1',
|
|
390
|
+
labelIdList: ' test-archive-label-id ',
|
|
437
391
|
};
|
|
438
392
|
const inboxLabel = {
|
|
439
393
|
accountId: 'test-account-id-1',
|
|
@@ -454,10 +408,6 @@ describe('threadMutators', () => {
|
|
|
454
408
|
}
|
|
455
409
|
return { where: whereSpecialUse };
|
|
456
410
|
});
|
|
457
|
-
const runAllThreadLabels = mock(async () => [
|
|
458
|
-
{ labelId: 'test-archive-label-id', threadId: 'test-thread-id-1', threadMessageId: 'test-message-id-1' },
|
|
459
|
-
]);
|
|
460
|
-
const whereThreadLabel = mock(() => ({ run: runAllThreadLabels }));
|
|
461
411
|
const runMessages = mock(async () => messageRecords);
|
|
462
412
|
const whereMessages = mock(() => ({ run: runMessages }));
|
|
463
413
|
const threadLabelDelete = mock(async () => { });
|
|
@@ -465,14 +415,6 @@ describe('threadMutators', () => {
|
|
|
465
415
|
const threadUpdate = mock(async () => { });
|
|
466
416
|
const threadByLabelDelete = mock(async () => { });
|
|
467
417
|
const threadByLabelInsert = mock(async () => { });
|
|
468
|
-
const runThreadByLabel = mock(async () => ({
|
|
469
|
-
labelId: 'test-archive-label-id',
|
|
470
|
-
latestMessageDate: 1234567890,
|
|
471
|
-
threadId: 'test-thread-id-1',
|
|
472
|
-
}));
|
|
473
|
-
const oneThreadByLabel = mock(() => ({ run: runThreadByLabel }));
|
|
474
|
-
const whereThreadByLabelThreadId = mock(() => ({ one: oneThreadByLabel }));
|
|
475
|
-
const whereThreadByLabel = mock(() => ({ where: whereThreadByLabelThreadId }));
|
|
476
418
|
const transaction = {
|
|
477
419
|
mutate: {
|
|
478
420
|
accountLabel: {
|
|
@@ -497,12 +439,6 @@ describe('threadMutators', () => {
|
|
|
497
439
|
thread: {
|
|
498
440
|
where: whereThread,
|
|
499
441
|
},
|
|
500
|
-
threadByLabel: {
|
|
501
|
-
where: whereThreadByLabel,
|
|
502
|
-
},
|
|
503
|
-
threadLabel: {
|
|
504
|
-
where: whereThreadLabel,
|
|
505
|
-
},
|
|
506
442
|
threadMessage: {
|
|
507
443
|
where: whereMessages,
|
|
508
444
|
},
|
|
@@ -510,8 +446,7 @@ describe('threadMutators', () => {
|
|
|
510
446
|
};
|
|
511
447
|
const mutators = createMutators();
|
|
512
448
|
await mutators.thread.setInbox(transaction, {
|
|
513
|
-
|
|
514
|
-
threadIds: ['test-thread-id-1'],
|
|
449
|
+
accounts: { 'test-account-id-1': { threadIds: ['test-thread-id-1'] } },
|
|
515
450
|
});
|
|
516
451
|
expect(threadLabelDelete).toHaveBeenCalledWith({
|
|
517
452
|
accountId: 'test-account-id-1',
|
|
@@ -563,8 +498,8 @@ describe('threadMutators', () => {
|
|
|
563
498
|
};
|
|
564
499
|
const mutators = createMutators();
|
|
565
500
|
await mutators.thread.setSeen(transaction, {
|
|
501
|
+
accounts: { 'test-account-id-1': { threadIds: ['test-thread-id-1', 'test-thread-id-2'] } },
|
|
566
502
|
seen: true,
|
|
567
|
-
threadIds: ['test-thread-id-1', 'test-thread-id-2'],
|
|
568
503
|
});
|
|
569
504
|
expect(threadUpdate).toHaveBeenCalledTimes(2);
|
|
570
505
|
expect(labelUpdate).toHaveBeenCalledWith({
|
|
@@ -601,8 +536,8 @@ describe('threadMutators', () => {
|
|
|
601
536
|
};
|
|
602
537
|
const mutators = createMutators();
|
|
603
538
|
await mutators.thread.setSeen(transaction, {
|
|
539
|
+
accounts: { 'test-account-id-1': { threadIds: ['test-thread-id-1'] } },
|
|
604
540
|
seen: false,
|
|
605
|
-
threadIds: ['test-thread-id-1'],
|
|
606
541
|
});
|
|
607
542
|
expect(threadUpdate).toHaveBeenCalledTimes(1);
|
|
608
543
|
expect(labelUpdate).toHaveBeenCalledWith({
|
|
@@ -633,8 +568,8 @@ describe('threadMutators', () => {
|
|
|
633
568
|
};
|
|
634
569
|
const mutators = createMutators();
|
|
635
570
|
await mutators.thread.setSeen(transaction, {
|
|
571
|
+
accounts: { 'test-account-id-1': { threadIds: ['test-thread-id-1'] } },
|
|
636
572
|
seen: true,
|
|
637
|
-
threadIds: ['test-thread-id-1'],
|
|
638
573
|
});
|
|
639
574
|
expect(threadUpdate).toHaveBeenCalledTimes(1);
|
|
640
575
|
expect(labelUpdate).not.toHaveBeenCalled();
|
|
@@ -662,8 +597,8 @@ describe('threadMutators', () => {
|
|
|
662
597
|
};
|
|
663
598
|
const mutators = createMutators();
|
|
664
599
|
await mutators.thread.setSeen(transaction, {
|
|
600
|
+
accounts: { 'test-account-id-1': { threadIds: ['test-thread-id-1'] } },
|
|
665
601
|
seen: true,
|
|
666
|
-
threadIds: ['test-thread-id-1'],
|
|
667
602
|
});
|
|
668
603
|
expect(threadUpdate).toHaveBeenCalledTimes(1);
|
|
669
604
|
expect(labelUpdate).not.toHaveBeenCalled();
|
|
@@ -729,8 +664,7 @@ describe('threadMutators', () => {
|
|
|
729
664
|
};
|
|
730
665
|
const mutators = createMutators();
|
|
731
666
|
await mutators.thread.setSpam(transaction, {
|
|
732
|
-
|
|
733
|
-
threadIds: ['test-thread-id-1'],
|
|
667
|
+
accounts: { 'test-account-id-1': { threadIds: ['test-thread-id-1'] } },
|
|
734
668
|
});
|
|
735
669
|
expect(threadLabelInsert).toHaveBeenCalledWith(expect.objectContaining({
|
|
736
670
|
accountId: 'test-account-id-1',
|
|
@@ -804,8 +738,7 @@ describe('threadMutators', () => {
|
|
|
804
738
|
};
|
|
805
739
|
const mutators = createMutators();
|
|
806
740
|
await mutators.thread.setTrash(transaction, {
|
|
807
|
-
|
|
808
|
-
threadIds: ['test-thread-id-1'],
|
|
741
|
+
accounts: { 'test-account-id-1': { threadIds: ['test-thread-id-1'] } },
|
|
809
742
|
});
|
|
810
743
|
expect(threadLabelInsert).toHaveBeenCalledWith(expect.objectContaining({
|
|
811
744
|
accountId: 'test-account-id-1',
|