@dereekb/dbx-components-mcp 14.5.0 → 14.5.1

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.
@@ -0,0 +1,1756 @@
1
+ {
2
+ "version": 1,
3
+ "source": "@dereekb/firebase",
4
+ "module": "@dereekb/firebase",
5
+ "generatedAt": "1970-01-01T00:00:00.000Z",
6
+ "generator": "@dereekb/dbx-components-mcp/scripts/generate-manifests.mjs",
7
+ "entries": [
8
+ {
9
+ "slug": "calendars-flagged-for-sync-query",
10
+ "name": "calendarsFlaggedForSyncQuery",
11
+ "module": "@dereekb/firebase",
12
+ "subpath": "model/calendar/calendar.query",
13
+ "signature": "calendarsFlaggedForSyncQuery(): FirestoreQueryConstraint[]",
14
+ "description": "Returns query constraints for Calendars flagged for sync (`s == true`).\n\nThis is what the hourly sweep iterates.",
15
+ "model": "Calendar",
16
+ "collection": "cal",
17
+ "isNested": false,
18
+ "scope": "COLLECTION",
19
+ "manual": false,
20
+ "skip": false,
21
+ "category": "sweep",
22
+ "params": [],
23
+ "returns": "Firestore query constraints for Calendars flagged for sync.",
24
+ "tags": [
25
+ "sweep",
26
+ "calendar",
27
+ "calendars",
28
+ "flagged",
29
+ "for",
30
+ "sync",
31
+ "query",
32
+ "calendarsflaggedforsyncquery",
33
+ "constraints",
34
+ "true",
35
+ "what",
36
+ "hourly",
37
+ "iterates"
38
+ ],
39
+ "constraintSequences": [
40
+ {
41
+ "pathLabel": "all",
42
+ "entries": [
43
+ {
44
+ "kind": "where",
45
+ "fieldPath": "s",
46
+ "operator": "=="
47
+ }
48
+ ]
49
+ }
50
+ ],
51
+ "derivedComposites": [],
52
+ "derivedFieldOverrides": [],
53
+ "example": "const constraints = calendarsFlaggedForSyncQuery();"
54
+ },
55
+ {
56
+ "slug": "calendars-due-for-resync-query",
57
+ "name": "calendarsDueForResyncQuery",
58
+ "module": "@dereekb/firebase",
59
+ "subpath": "model/calendar/calendar.query",
60
+ "signature": "calendarsDueForResyncQuery(input: CalendarsDueForResyncQueryInput): FirestoreQueryConstraint[]",
61
+ "description": "Returns query constraints for Calendars of a type whose last successful publish (`sat`) is older than the\ngiven instant.\n\nThis is the self-healing backstop: it catches a Calendar whose sweep cleared `s` but whose ICS never\nfinished publishing, and it keeps an `expand`-mode calendar from sliding off the end of its expansion\nwindow without any extra field or mechanism.\n\nNOTE: a Firestore inequality skips documents where the field is absent, so a Calendar that has NEVER\npublished is not matched here. That case is already covered — it still carries `s == true` until its first\nsuccessful sweep, and the ICS StorageFile's own retry / stuck-detection owns everything after that.",
62
+ "model": "Calendar",
63
+ "collection": "cal",
64
+ "isNested": false,
65
+ "scope": "COLLECTION",
66
+ "manual": false,
67
+ "skip": false,
68
+ "category": "maintenance",
69
+ "params": [
70
+ {
71
+ "name": "input",
72
+ "type": "CalendarsDueForResyncQueryInput",
73
+ "description": "- The type to sweep and the staleness cutoff.",
74
+ "optional": false
75
+ }
76
+ ],
77
+ "returns": "Firestore query constraints for Calendars due for a resync.",
78
+ "tags": [
79
+ "maintenance",
80
+ "calendar",
81
+ "calendars",
82
+ "due",
83
+ "for",
84
+ "resync",
85
+ "query",
86
+ "calendarsdueforresyncquery",
87
+ "constraints",
88
+ "type",
89
+ "whose",
90
+ "last",
91
+ "successful",
92
+ "publish",
93
+ "sat",
94
+ "older"
95
+ ],
96
+ "constraintSequences": [
97
+ {
98
+ "pathLabel": "all",
99
+ "entries": [
100
+ {
101
+ "kind": "where",
102
+ "fieldPath": "t",
103
+ "operator": "=="
104
+ },
105
+ {
106
+ "kind": "where",
107
+ "fieldPath": "sat",
108
+ "operator": "<",
109
+ "fromHelper": "whereDateIsBefore"
110
+ }
111
+ ]
112
+ }
113
+ ],
114
+ "derivedComposites": [
115
+ {
116
+ "collectionGroup": "cal",
117
+ "queryScope": "COLLECTION",
118
+ "fields": [
119
+ {
120
+ "fieldPath": "t",
121
+ "order": "ASCENDING"
122
+ },
123
+ {
124
+ "fieldPath": "sat",
125
+ "order": "ASCENDING"
126
+ }
127
+ ],
128
+ "density": "SPARSE_ALL"
129
+ }
130
+ ],
131
+ "derivedFieldOverrides": [],
132
+ "example": "const constraints = calendarsDueForResyncQuery({ calendarType: 'demo_profile', before: subDays(new Date(), 7) });"
133
+ },
134
+ {
135
+ "slug": "calendars-for-type-query",
136
+ "name": "calendarsForTypeQuery",
137
+ "module": "@dereekb/firebase",
138
+ "subpath": "model/calendar/calendar.query",
139
+ "signature": "calendarsForTypeQuery(calendarType: CalendarType): FirestoreQueryConstraint[]",
140
+ "description": "Returns query constraints for every Calendar of a given type.",
141
+ "model": "Calendar",
142
+ "collection": "cal",
143
+ "isNested": false,
144
+ "scope": "COLLECTION",
145
+ "manual": false,
146
+ "skip": false,
147
+ "category": "lookup",
148
+ "params": [
149
+ {
150
+ "name": "calendarType",
151
+ "type": "CalendarType",
152
+ "description": "- The type to filter by.",
153
+ "optional": false
154
+ }
155
+ ],
156
+ "returns": "Firestore query constraints for Calendars of the given type.",
157
+ "tags": [
158
+ "lookup",
159
+ "calendar",
160
+ "calendars",
161
+ "for",
162
+ "type",
163
+ "query",
164
+ "calendarsfortypequery",
165
+ "constraints",
166
+ "every",
167
+ "given"
168
+ ],
169
+ "constraintSequences": [
170
+ {
171
+ "pathLabel": "all",
172
+ "entries": [
173
+ {
174
+ "kind": "where",
175
+ "fieldPath": "t",
176
+ "operator": "=="
177
+ }
178
+ ]
179
+ }
180
+ ],
181
+ "derivedComposites": [],
182
+ "derivedFieldOverrides": [],
183
+ "example": "const constraints = calendarsForTypeQuery('demo_profile');"
184
+ },
185
+ {
186
+ "slug": "form-spaces-queued-for-processing-query",
187
+ "name": "formSpacesQueuedForProcessingQuery",
188
+ "module": "@dereekb/firebase",
189
+ "subpath": "model/formspace/formspace.query",
190
+ "signature": "formSpacesQueuedForProcessingQuery(limitCount?: Maybe<number>): FirestoreQueryConstraint[]",
191
+ "description": "Returns query constraints for FormSpaces awaiting a processing task (`ps == QUEUED_FOR_PROCESSING`).\n\nThis is the backstop sweep: submission normally creates the task inline, so a space that is still sitting\nhere is one whose task creation was lost.",
192
+ "model": "FormSpace",
193
+ "collection": "fsp",
194
+ "isNested": false,
195
+ "scope": "COLLECTION",
196
+ "manual": false,
197
+ "skip": false,
198
+ "category": "sweep",
199
+ "params": [
200
+ {
201
+ "name": "limitCount",
202
+ "type": "Maybe<number>",
203
+ "description": "- Maximum number of results. Omit for unbounded.",
204
+ "optional": true
205
+ }
206
+ ],
207
+ "returns": "Firestore query constraints for FormSpaces queued for processing.",
208
+ "tags": [
209
+ "sweep",
210
+ "formspace",
211
+ "form",
212
+ "spaces",
213
+ "queued",
214
+ "for",
215
+ "processing",
216
+ "query",
217
+ "formspacesqueuedforprocessingquery",
218
+ "space",
219
+ "constraints",
220
+ "formspaces",
221
+ "awaiting",
222
+ "task",
223
+ "backstop",
224
+ "submission",
225
+ "normally",
226
+ "creates"
227
+ ],
228
+ "constraintSequences": [],
229
+ "derivedComposites": [],
230
+ "derivedFieldOverrides": [],
231
+ "example": "const constraints = formSpacesQueuedForProcessingQuery(100);"
232
+ },
233
+ {
234
+ "slug": "form-spaces-due-for-expiration-query",
235
+ "name": "formSpacesDueForExpirationQuery",
236
+ "module": "@dereekb/firebase",
237
+ "subpath": "model/formspace/formspace.query",
238
+ "signature": "formSpacesDueForExpirationQuery(input: FormSpacesDueForExpirationQueryInput): FirestoreQueryConstraint[]",
239
+ "description": "Returns query constraints for FormSpaces whose expiration instant has arrived.\n\nNOTE: a Firestore inequality skips documents where the field is absent, so a space with no `eat` — one\nwhose type does not expire, or one that has already been submitted or expired and had `eat` cleared — is\nnot matched. That absence IS the exclusion mechanism; there is no second flag to keep in step.",
240
+ "model": "FormSpace",
241
+ "collection": "fsp",
242
+ "isNested": false,
243
+ "scope": "COLLECTION",
244
+ "manual": false,
245
+ "skip": false,
246
+ "category": "cleanup",
247
+ "params": [
248
+ {
249
+ "name": "input",
250
+ "type": "FormSpacesDueForExpirationQueryInput",
251
+ "description": "- The pinned cutoff and page size.",
252
+ "optional": false
253
+ }
254
+ ],
255
+ "returns": "Firestore query constraints for FormSpaces due for expiration.",
256
+ "tags": [
257
+ "cleanup",
258
+ "formspace",
259
+ "form",
260
+ "spaces",
261
+ "due",
262
+ "for",
263
+ "expiration",
264
+ "query",
265
+ "formspacesdueforexpirationquery",
266
+ "space",
267
+ "constraints",
268
+ "formspaces",
269
+ "whose",
270
+ "instant",
271
+ "has",
272
+ "arrived",
273
+ "note",
274
+ "firestore"
275
+ ],
276
+ "constraintSequences": [],
277
+ "derivedComposites": [],
278
+ "derivedFieldOverrides": [],
279
+ "example": "const constraints = formSpacesDueForExpirationQuery({ before: new Date(), limit: 50 });"
280
+ },
281
+ {
282
+ "slug": "storage-files-for-form-space-query",
283
+ "name": "storageFilesForFormSpaceQuery",
284
+ "module": "@dereekb/firebase",
285
+ "subpath": "model/formspace/formspace.query",
286
+ "signature": "storageFilesForFormSpaceQuery(formSpaceKey: FormSpaceKey): FirestoreQueryConstraint[]",
287
+ "description": "Returns query constraints for every StorageFile that belongs to a FormSpace.\n\nA single `array-contains` on the group id, which Firestore serves from its automatic array index — the\nFormSpace's own group id is the only handle needed, so nothing here requires a composite index.",
288
+ "model": "StorageFile",
289
+ "collection": "sf",
290
+ "isNested": false,
291
+ "scope": "COLLECTION",
292
+ "manual": false,
293
+ "skip": true,
294
+ "category": "lookup",
295
+ "params": [
296
+ {
297
+ "name": "formSpaceKey",
298
+ "type": "FormSpaceKey",
299
+ "description": "- The FormSpace whose files to select.",
300
+ "optional": false
301
+ }
302
+ ],
303
+ "returns": "Firestore query constraints for the space's StorageFiles.",
304
+ "tags": [
305
+ "lookup",
306
+ "storagefile",
307
+ "storage",
308
+ "files",
309
+ "for",
310
+ "form",
311
+ "space",
312
+ "query",
313
+ "storagefilesforformspacequery",
314
+ "file",
315
+ "constraints",
316
+ "every",
317
+ "belongs",
318
+ "formspace",
319
+ "single",
320
+ "array",
321
+ "contains",
322
+ "group"
323
+ ],
324
+ "constraintSequences": [],
325
+ "derivedComposites": [],
326
+ "derivedFieldOverrides": [],
327
+ "example": "const constraints = storageFilesForFormSpaceQuery('fsp/abc123');"
328
+ },
329
+ {
330
+ "slug": "form-spaces-for-owner-query",
331
+ "name": "formSpacesForOwnerQuery",
332
+ "module": "@dereekb/firebase",
333
+ "subpath": "model/formspace/formspace.query",
334
+ "signature": "formSpacesForOwnerQuery(ownerKey: FirebaseAuthOwnershipKey): FirestoreQueryConstraint[]",
335
+ "description": "Returns query constraints for every FormSpace carrying the given ownership key.\n\nOrdering is deliberately left to the caller/client: a second field here would need a composite index this\npackage has no way to declare.",
336
+ "model": "FormSpace",
337
+ "collection": "fsp",
338
+ "isNested": false,
339
+ "scope": "COLLECTION",
340
+ "manual": false,
341
+ "skip": false,
342
+ "category": "lookup",
343
+ "params": [
344
+ {
345
+ "name": "ownerKey",
346
+ "type": "FirebaseAuthOwnershipKey",
347
+ "description": "- The ownership key to filter by.",
348
+ "optional": false
349
+ }
350
+ ],
351
+ "returns": "Firestore query constraints for the owner's FormSpaces.",
352
+ "tags": [
353
+ "lookup",
354
+ "formspace",
355
+ "form",
356
+ "spaces",
357
+ "for",
358
+ "owner",
359
+ "query",
360
+ "formspacesforownerquery",
361
+ "space",
362
+ "constraints",
363
+ "every",
364
+ "carrying",
365
+ "given",
366
+ "ownership",
367
+ "key",
368
+ "ordering",
369
+ "deliberately"
370
+ ],
371
+ "constraintSequences": [
372
+ {
373
+ "pathLabel": "all",
374
+ "entries": [
375
+ {
376
+ "kind": "where",
377
+ "fieldPath": "o",
378
+ "operator": "=="
379
+ }
380
+ ]
381
+ }
382
+ ],
383
+ "derivedComposites": [],
384
+ "derivedFieldOverrides": [],
385
+ "example": "const constraints = formSpacesForOwnerQuery('pr/abc123');"
386
+ },
387
+ {
388
+ "slug": "notification-users-flagged-for-needs-sync-query",
389
+ "name": "notificationUsersFlaggedForNeedsSyncQuery",
390
+ "module": "@dereekb/firebase",
391
+ "subpath": "model/notification/notification.query",
392
+ "signature": "notificationUsersFlaggedForNeedsSyncQuery(): FirestoreQueryConstraint[]",
393
+ "description": "Query constraints for finding {@link NotificationUser} documents that have pending config syncs (`ns == true`).\n\nUsed by the server to discover users whose configs need to be synced to their NotificationBox recipients.",
394
+ "model": "NotificationUser",
395
+ "collection": "nu",
396
+ "isNested": false,
397
+ "scope": "COLLECTION",
398
+ "manual": false,
399
+ "skip": false,
400
+ "category": "sweep",
401
+ "params": [],
402
+ "returns": "Array of Firestore query constraints filtering for users needing sync.",
403
+ "tags": [
404
+ "sweep",
405
+ "notificationuser",
406
+ "notification",
407
+ "users",
408
+ "flagged",
409
+ "for",
410
+ "needs",
411
+ "sync",
412
+ "query",
413
+ "notificationusersflaggedforneedssyncquery",
414
+ "user",
415
+ "constraints",
416
+ "finding",
417
+ "link",
418
+ "documents",
419
+ "have",
420
+ "pending",
421
+ "config",
422
+ "syncs"
423
+ ],
424
+ "constraintSequences": [
425
+ {
426
+ "pathLabel": "all",
427
+ "entries": [
428
+ {
429
+ "kind": "where",
430
+ "fieldPath": "ns",
431
+ "operator": "=="
432
+ }
433
+ ]
434
+ }
435
+ ],
436
+ "derivedComposites": [],
437
+ "derivedFieldOverrides": []
438
+ },
439
+ {
440
+ "slug": "notification-user-has-exclusion-query",
441
+ "name": "notificationUserHasExclusionQuery",
442
+ "module": "@dereekb/firebase",
443
+ "subpath": "model/notification/notification.query",
444
+ "signature": "notificationUserHasExclusionQuery(exclusionId: ArrayOrValue<NotificationBoxSendExclusion>): FirestoreQueryConstraint[]",
445
+ "description": "Query constraints for finding {@link NotificationUser} documents that have any of the given exclusion IDs in their `x` array.",
446
+ "model": "NotificationUser",
447
+ "collection": "nu",
448
+ "isNested": false,
449
+ "scope": "COLLECTION",
450
+ "manual": false,
451
+ "skip": false,
452
+ "category": "lookup",
453
+ "params": [
454
+ {
455
+ "name": "exclusionId",
456
+ "type": "ArrayOrValue<NotificationBoxSendExclusion>",
457
+ "description": "- One or more box IDs or collection name prefixes to match against.",
458
+ "optional": false
459
+ }
460
+ ],
461
+ "returns": "Array of Firestore query constraints filtering for users with matching exclusions.",
462
+ "tags": [
463
+ "lookup",
464
+ "notificationuser",
465
+ "notification",
466
+ "user",
467
+ "has",
468
+ "exclusion",
469
+ "query",
470
+ "notificationuserhasexclusionquery",
471
+ "constraints",
472
+ "finding",
473
+ "link",
474
+ "documents",
475
+ "have",
476
+ "any",
477
+ "given",
478
+ "ids"
479
+ ],
480
+ "constraintSequences": [
481
+ {
482
+ "pathLabel": "all",
483
+ "entries": [
484
+ {
485
+ "kind": "where",
486
+ "fieldPath": "x",
487
+ "operator": "array-contains-any"
488
+ }
489
+ ]
490
+ }
491
+ ],
492
+ "derivedComposites": [],
493
+ "derivedFieldOverrides": []
494
+ },
495
+ {
496
+ "slug": "notification-summaries-flagged-for-needs-initialization-query",
497
+ "name": "notificationSummariesFlaggedForNeedsInitializationQuery",
498
+ "module": "@dereekb/firebase",
499
+ "subpath": "model/notification/notification.query",
500
+ "signature": "notificationSummariesFlaggedForNeedsInitializationQuery(): FirestoreQueryConstraint[]",
501
+ "description": "Query constraints for finding {@link NotificationSummary} documents that need server-side initialization (`s == true`).",
502
+ "model": "NotificationSummary",
503
+ "collection": "ns",
504
+ "isNested": false,
505
+ "scope": "COLLECTION",
506
+ "manual": false,
507
+ "skip": false,
508
+ "category": "init",
509
+ "params": [],
510
+ "returns": "Array of Firestore query constraints filtering for summaries needing initialization.",
511
+ "tags": [
512
+ "init",
513
+ "notificationsummary",
514
+ "notification",
515
+ "summaries",
516
+ "flagged",
517
+ "for",
518
+ "needs",
519
+ "initialization",
520
+ "query",
521
+ "notificationsummariesflaggedforneedsinitializationquery",
522
+ "summary",
523
+ "constraints",
524
+ "finding",
525
+ "link",
526
+ "documents",
527
+ "need",
528
+ "server",
529
+ "side",
530
+ "true"
531
+ ],
532
+ "constraintSequences": [
533
+ {
534
+ "pathLabel": "all",
535
+ "entries": [
536
+ {
537
+ "kind": "where",
538
+ "fieldPath": "s",
539
+ "operator": "=="
540
+ }
541
+ ]
542
+ }
543
+ ],
544
+ "derivedComposites": [],
545
+ "derivedFieldOverrides": []
546
+ },
547
+ {
548
+ "slug": "notification-boxes-flagged-for-needs-initialization-query",
549
+ "name": "notificationBoxesFlaggedForNeedsInitializationQuery",
550
+ "module": "@dereekb/firebase",
551
+ "subpath": "model/notification/notification.query",
552
+ "signature": "notificationBoxesFlaggedForNeedsInitializationQuery(): FirestoreQueryConstraint[]",
553
+ "description": "Query constraints for finding {@link NotificationBox} documents that need server-side initialization (`s == true`).",
554
+ "model": "NotificationBox",
555
+ "collection": "nb",
556
+ "isNested": false,
557
+ "scope": "COLLECTION",
558
+ "manual": false,
559
+ "skip": false,
560
+ "category": "init",
561
+ "params": [],
562
+ "returns": "Array of Firestore query constraints filtering for boxes needing initialization.",
563
+ "tags": [
564
+ "init",
565
+ "notificationbox",
566
+ "notification",
567
+ "boxes",
568
+ "flagged",
569
+ "for",
570
+ "needs",
571
+ "initialization",
572
+ "query",
573
+ "notificationboxesflaggedforneedsinitializationquery",
574
+ "box",
575
+ "constraints",
576
+ "finding",
577
+ "link",
578
+ "documents",
579
+ "need",
580
+ "server",
581
+ "side",
582
+ "true"
583
+ ],
584
+ "constraintSequences": [
585
+ {
586
+ "pathLabel": "all",
587
+ "entries": [
588
+ {
589
+ "kind": "where",
590
+ "fieldPath": "s",
591
+ "operator": "=="
592
+ }
593
+ ]
594
+ }
595
+ ],
596
+ "derivedComposites": [],
597
+ "derivedFieldOverrides": []
598
+ },
599
+ {
600
+ "slug": "notification-boxes-flagged-invalid-query",
601
+ "name": "notificationBoxesFlaggedInvalidQuery",
602
+ "module": "@dereekb/firebase",
603
+ "subpath": "model/notification/notification.query",
604
+ "signature": "notificationBoxesFlaggedInvalidQuery(): FirestoreQueryConstraint[]",
605
+ "description": "Query constraints for finding {@link NotificationBox} documents flagged as invalid (`fi == true`).\n\nUsed by the server to clean up boxes that could not be initialized.",
606
+ "model": "NotificationBox",
607
+ "collection": "nb",
608
+ "isNested": false,
609
+ "scope": "COLLECTION",
610
+ "manual": false,
611
+ "skip": false,
612
+ "category": "cleanup",
613
+ "params": [],
614
+ "returns": "Array of Firestore query constraints filtering for boxes flagged as invalid.",
615
+ "tags": [
616
+ "cleanup",
617
+ "notificationbox",
618
+ "notification",
619
+ "boxes",
620
+ "flagged",
621
+ "invalid",
622
+ "query",
623
+ "notificationboxesflaggedinvalidquery",
624
+ "box",
625
+ "constraints",
626
+ "finding",
627
+ "link",
628
+ "documents",
629
+ "true",
630
+ "used",
631
+ "server",
632
+ "clean"
633
+ ],
634
+ "constraintSequences": [
635
+ {
636
+ "pathLabel": "all",
637
+ "entries": [
638
+ {
639
+ "kind": "where",
640
+ "fieldPath": "fi",
641
+ "operator": "=="
642
+ }
643
+ ]
644
+ }
645
+ ],
646
+ "derivedComposites": [],
647
+ "derivedFieldOverrides": []
648
+ },
649
+ {
650
+ "slug": "notifications-past-send-at-time-query",
651
+ "name": "notificationsPastSendAtTimeQuery",
652
+ "module": "@dereekb/firebase",
653
+ "subpath": "model/notification/notification.query",
654
+ "signature": "notificationsPastSendAtTimeQuery(now?: Date): FirestoreQueryConstraint[]",
655
+ "description": "Query constraints for finding {@link Notification} documents that are ready to be sent\n(not done and `sat` is in the past).\n\nThis is the primary query used by the send queue processor.",
656
+ "model": "Notification",
657
+ "collection": "nbn",
658
+ "isNested": true,
659
+ "scope": "COLLECTION_GROUP",
660
+ "manual": false,
661
+ "skip": false,
662
+ "category": "sweep",
663
+ "params": [
664
+ {
665
+ "name": "now",
666
+ "type": "Date",
667
+ "description": "- Reference time for the `sat` comparison (defaults to current time)",
668
+ "optional": true
669
+ }
670
+ ],
671
+ "returns": "Array of Firestore query constraints filtering for notifications past their scheduled send time.",
672
+ "tags": [
673
+ "sweep",
674
+ "notification",
675
+ "notifications",
676
+ "past",
677
+ "send",
678
+ "at",
679
+ "time",
680
+ "query",
681
+ "notificationspastsendattimequery",
682
+ "constraints",
683
+ "finding",
684
+ "link",
685
+ "documents",
686
+ "ready",
687
+ "sent",
688
+ "not",
689
+ "done"
690
+ ],
691
+ "constraintSequences": [
692
+ {
693
+ "pathLabel": "all",
694
+ "entries": [
695
+ {
696
+ "kind": "where",
697
+ "fieldPath": "d",
698
+ "operator": "=="
699
+ },
700
+ {
701
+ "kind": "where",
702
+ "fieldPath": "sat",
703
+ "operator": "<="
704
+ }
705
+ ]
706
+ }
707
+ ],
708
+ "derivedComposites": [
709
+ {
710
+ "collectionGroup": "nbn",
711
+ "queryScope": "COLLECTION_GROUP",
712
+ "fields": [
713
+ {
714
+ "fieldPath": "d",
715
+ "order": "ASCENDING"
716
+ },
717
+ {
718
+ "fieldPath": "sat",
719
+ "order": "ASCENDING"
720
+ }
721
+ ],
722
+ "density": "SPARSE_ALL"
723
+ }
724
+ ],
725
+ "derivedFieldOverrides": []
726
+ },
727
+ {
728
+ "slug": "notifications-ready-for-cleanup-query",
729
+ "name": "notificationsReadyForCleanupQuery",
730
+ "module": "@dereekb/firebase",
731
+ "subpath": "model/notification/notification.query",
732
+ "signature": "notificationsReadyForCleanupQuery(): FirestoreQueryConstraint[]",
733
+ "description": "Query constraints for finding {@link Notification} documents marked as done (`d == true`)\nand ready to be archived to {@link NotificationWeek} and then deleted.",
734
+ "model": "Notification",
735
+ "collection": "nbn",
736
+ "isNested": true,
737
+ "scope": "COLLECTION_GROUP",
738
+ "manual": false,
739
+ "skip": false,
740
+ "category": "cleanup",
741
+ "params": [],
742
+ "returns": "Array of Firestore query constraints filtering for completed notifications ready to archive.",
743
+ "tags": [
744
+ "cleanup",
745
+ "notification",
746
+ "notifications",
747
+ "ready",
748
+ "for",
749
+ "query",
750
+ "notificationsreadyforcleanupquery",
751
+ "constraints",
752
+ "finding",
753
+ "link",
754
+ "documents",
755
+ "marked",
756
+ "done",
757
+ "true",
758
+ "archived"
759
+ ],
760
+ "constraintSequences": [
761
+ {
762
+ "pathLabel": "all",
763
+ "entries": [
764
+ {
765
+ "kind": "where",
766
+ "fieldPath": "d",
767
+ "operator": "=="
768
+ }
769
+ ]
770
+ }
771
+ ],
772
+ "derivedComposites": [],
773
+ "derivedFieldOverrides": [
774
+ {
775
+ "collectionGroup": "nbn",
776
+ "fieldPath": "d",
777
+ "variants": [
778
+ {
779
+ "queryScope": "COLLECTION_GROUP",
780
+ "order": "ASCENDING"
781
+ }
782
+ ]
783
+ }
784
+ ]
785
+ },
786
+ {
787
+ "slug": "notification-logged-event-days-older-than-query",
788
+ "name": "notificationLoggedEventDaysOlderThanQuery",
789
+ "module": "@dereekb/firebase",
790
+ "subpath": "model/notification/notification.query",
791
+ "signature": "notificationLoggedEventDaysOlderThanQuery(retentionDays: number, now?: Date): FirestoreQueryConstraint[]",
792
+ "description": "Query constraints for finding {@link NotificationLoggedEventDay} documents whose ISO day string\nis older than `now - retentionDays`.\n\nIntended for use against the {@link NotificationLoggedEventDayFirestoreCollectionGroup} during\nscheduled retention cleanup. Documents older than the cutoff (and their nested page subcollection\ncontents) should be deleted.\n\nUses the `d` field rather than document ID — Firestore collection-group queries cannot filter on\n`FieldPath.documentId()` with a bare day string (it requires a full path). The `d` field stores\nthe same ISO 8601 day string as the document ID and supports a plain inequality.",
793
+ "model": "NotificationLoggedEventDay",
794
+ "collection": "nbnle",
795
+ "isNested": true,
796
+ "scope": "COLLECTION_GROUP",
797
+ "manual": false,
798
+ "skip": false,
799
+ "category": "cleanup",
800
+ "params": [
801
+ {
802
+ "name": "retentionDays",
803
+ "type": "number",
804
+ "description": "- Number of days of history to retain; days strictly older than `now - retentionDays` match.",
805
+ "optional": false
806
+ },
807
+ {
808
+ "name": "now",
809
+ "type": "Date",
810
+ "description": "- Reference time for the cutoff (defaults to current time)",
811
+ "optional": true
812
+ }
813
+ ],
814
+ "returns": "Array of Firestore query constraints filtering by the day string.",
815
+ "tags": [
816
+ "cleanup",
817
+ "notificationloggedeventday",
818
+ "notification",
819
+ "logged",
820
+ "event",
821
+ "days",
822
+ "older",
823
+ "than",
824
+ "query",
825
+ "notificationloggedeventdaysolderthanquery",
826
+ "day",
827
+ "constraints",
828
+ "finding",
829
+ "link",
830
+ "documents",
831
+ "whose",
832
+ "iso",
833
+ "string",
834
+ "now"
835
+ ],
836
+ "constraintSequences": [
837
+ {
838
+ "pathLabel": "all",
839
+ "entries": [
840
+ {
841
+ "kind": "where",
842
+ "fieldPath": "d",
843
+ "operator": "<"
844
+ }
845
+ ]
846
+ }
847
+ ],
848
+ "derivedComposites": [],
849
+ "derivedFieldOverrides": [
850
+ {
851
+ "collectionGroup": "nbnle",
852
+ "fieldPath": "d",
853
+ "variants": [
854
+ {
855
+ "queryScope": "COLLECTION_GROUP",
856
+ "order": "ASCENDING"
857
+ }
858
+ ]
859
+ }
860
+ ]
861
+ },
862
+ {
863
+ "slug": "oidc-entries-with-type-query",
864
+ "name": "oidcEntriesWithTypeQuery",
865
+ "module": "@dereekb/firebase",
866
+ "subpath": "model/oidcmodel/oidcmodel.query",
867
+ "signature": "oidcEntriesWithTypeQuery(type: OidcEntryType): FirestoreQueryConstraint[]",
868
+ "description": "Query for OidcEntry documents with a specific type.",
869
+ "model": "OidcEntry",
870
+ "collection": "oidc_e",
871
+ "isNested": false,
872
+ "scope": "COLLECTION",
873
+ "manual": false,
874
+ "skip": false,
875
+ "category": "lookup",
876
+ "params": [
877
+ {
878
+ "name": "type",
879
+ "type": "OidcEntryType",
880
+ "description": "- The OIDC entry type to filter by.",
881
+ "optional": false
882
+ }
883
+ ],
884
+ "returns": "Firestore query constraints for the given type.",
885
+ "tags": [
886
+ "lookup",
887
+ "oidcentry",
888
+ "oidc",
889
+ "entries",
890
+ "with",
891
+ "type",
892
+ "query",
893
+ "oidcentrieswithtypequery",
894
+ "entry",
895
+ "documents",
896
+ "specific"
897
+ ],
898
+ "constraintSequences": [
899
+ {
900
+ "pathLabel": "all",
901
+ "entries": [
902
+ {
903
+ "kind": "where",
904
+ "fieldPath": "type",
905
+ "operator": "=="
906
+ }
907
+ ]
908
+ }
909
+ ],
910
+ "derivedComposites": [],
911
+ "derivedFieldOverrides": []
912
+ },
913
+ {
914
+ "slug": "oidc-entries-by-user-code-query",
915
+ "name": "oidcEntriesByUserCodeQuery",
916
+ "module": "@dereekb/firebase",
917
+ "subpath": "model/oidcmodel/oidcmodel.query",
918
+ "signature": "oidcEntriesByUserCodeQuery(type: OidcEntryType, userCode: string): FirestoreQueryConstraint[]",
919
+ "description": "Query for OidcEntry documents with a specific type and userCode.",
920
+ "model": "OidcEntry",
921
+ "collection": "oidc_e",
922
+ "isNested": false,
923
+ "scope": "COLLECTION",
924
+ "manual": false,
925
+ "skip": false,
926
+ "category": "lookup",
927
+ "params": [
928
+ {
929
+ "name": "type",
930
+ "type": "OidcEntryType",
931
+ "description": "- The OIDC entry type to filter by.",
932
+ "optional": false
933
+ },
934
+ {
935
+ "name": "userCode",
936
+ "type": "string",
937
+ "description": "- The user code to match.",
938
+ "optional": false
939
+ }
940
+ ],
941
+ "returns": "Firestore query constraints for the given type and userCode.",
942
+ "tags": [
943
+ "lookup",
944
+ "oidcentry",
945
+ "oidc",
946
+ "entries",
947
+ "by",
948
+ "user",
949
+ "code",
950
+ "query",
951
+ "oidcentriesbyusercodequery",
952
+ "entry",
953
+ "documents",
954
+ "specific",
955
+ "type",
956
+ "usercode"
957
+ ],
958
+ "constraintSequences": [
959
+ {
960
+ "pathLabel": "all",
961
+ "entries": [
962
+ {
963
+ "kind": "where",
964
+ "fieldPath": "type",
965
+ "operator": "=="
966
+ },
967
+ {
968
+ "kind": "where",
969
+ "fieldPath": "userCode",
970
+ "operator": "=="
971
+ }
972
+ ]
973
+ }
974
+ ],
975
+ "derivedComposites": [],
976
+ "derivedFieldOverrides": []
977
+ },
978
+ {
979
+ "slug": "oidc-entries-by-uid-query",
980
+ "name": "oidcEntriesByUidQuery",
981
+ "module": "@dereekb/firebase",
982
+ "subpath": "model/oidcmodel/oidcmodel.query",
983
+ "signature": "oidcEntriesByUidQuery(type: OidcEntryType, uid: FirebaseAuthUserId): FirestoreQueryConstraint[]",
984
+ "description": "Query for OidcEntry documents with a specific type and uid.",
985
+ "model": "OidcEntry",
986
+ "collection": "oidc_e",
987
+ "isNested": false,
988
+ "scope": "COLLECTION",
989
+ "manual": false,
990
+ "skip": false,
991
+ "category": "lookup",
992
+ "params": [
993
+ {
994
+ "name": "type",
995
+ "type": "OidcEntryType",
996
+ "description": "- The OIDC entry type to filter by.",
997
+ "optional": false
998
+ },
999
+ {
1000
+ "name": "uid",
1001
+ "type": "FirebaseAuthUserId",
1002
+ "description": "- The Firebase user ID to match.",
1003
+ "optional": false
1004
+ }
1005
+ ],
1006
+ "returns": "Firestore query constraints for the given type and uid.",
1007
+ "tags": [
1008
+ "lookup",
1009
+ "oidcentry",
1010
+ "oidc",
1011
+ "entries",
1012
+ "by",
1013
+ "uid",
1014
+ "query",
1015
+ "oidcentriesbyuidquery",
1016
+ "entry",
1017
+ "documents",
1018
+ "specific",
1019
+ "type"
1020
+ ],
1021
+ "constraintSequences": [
1022
+ {
1023
+ "pathLabel": "all",
1024
+ "entries": [
1025
+ {
1026
+ "kind": "where",
1027
+ "fieldPath": "type",
1028
+ "operator": "=="
1029
+ },
1030
+ {
1031
+ "kind": "where",
1032
+ "fieldPath": "uid",
1033
+ "operator": "=="
1034
+ }
1035
+ ]
1036
+ }
1037
+ ],
1038
+ "derivedComposites": [],
1039
+ "derivedFieldOverrides": []
1040
+ },
1041
+ {
1042
+ "slug": "oidc-entries-by-grant-id-query",
1043
+ "name": "oidcEntriesByGrantIdQuery",
1044
+ "module": "@dereekb/firebase",
1045
+ "subpath": "model/oidcmodel/oidcmodel.query",
1046
+ "signature": "oidcEntriesByGrantIdQuery(type: OidcEntryType, grantId: string): FirestoreQueryConstraint[]",
1047
+ "description": "Query for OidcEntry documents with a specific type and grantId.",
1048
+ "model": "OidcEntry",
1049
+ "collection": "oidc_e",
1050
+ "isNested": false,
1051
+ "scope": "COLLECTION",
1052
+ "manual": false,
1053
+ "skip": false,
1054
+ "category": "lookup",
1055
+ "params": [
1056
+ {
1057
+ "name": "type",
1058
+ "type": "OidcEntryType",
1059
+ "description": "- The OIDC entry type to filter by.",
1060
+ "optional": false
1061
+ },
1062
+ {
1063
+ "name": "grantId",
1064
+ "type": "string",
1065
+ "description": "- The grant ID to match.",
1066
+ "optional": false
1067
+ }
1068
+ ],
1069
+ "returns": "Firestore query constraints for the given type and grantId.",
1070
+ "tags": [
1071
+ "lookup",
1072
+ "oidcentry",
1073
+ "oidc",
1074
+ "entries",
1075
+ "by",
1076
+ "grant",
1077
+ "id",
1078
+ "query",
1079
+ "oidcentriesbygrantidquery",
1080
+ "entry",
1081
+ "documents",
1082
+ "specific",
1083
+ "type",
1084
+ "grantid"
1085
+ ],
1086
+ "constraintSequences": [
1087
+ {
1088
+ "pathLabel": "all",
1089
+ "entries": [
1090
+ {
1091
+ "kind": "where",
1092
+ "fieldPath": "type",
1093
+ "operator": "=="
1094
+ },
1095
+ {
1096
+ "kind": "where",
1097
+ "fieldPath": "grantId",
1098
+ "operator": "=="
1099
+ }
1100
+ ]
1101
+ }
1102
+ ],
1103
+ "derivedComposites": [],
1104
+ "derivedFieldOverrides": []
1105
+ },
1106
+ {
1107
+ "slug": "oidc-entries-by-client-id-query",
1108
+ "name": "oidcEntriesByClientIdQuery",
1109
+ "module": "@dereekb/firebase",
1110
+ "subpath": "model/oidcmodel/oidcmodel.query",
1111
+ "signature": "oidcEntriesByClientIdQuery(type: OidcEntryType, clientId: string): FirestoreQueryConstraint[]",
1112
+ "description": "Query for OidcEntry documents with a specific type and clientId.",
1113
+ "model": "OidcEntry",
1114
+ "collection": "oidc_e",
1115
+ "isNested": false,
1116
+ "scope": "COLLECTION",
1117
+ "manual": false,
1118
+ "skip": false,
1119
+ "category": "lookup",
1120
+ "params": [
1121
+ {
1122
+ "name": "type",
1123
+ "type": "OidcEntryType",
1124
+ "description": "- The OIDC entry type to filter by.",
1125
+ "optional": false
1126
+ },
1127
+ {
1128
+ "name": "clientId",
1129
+ "type": "string",
1130
+ "description": "- The OAuth client ID to match.",
1131
+ "optional": false
1132
+ }
1133
+ ],
1134
+ "returns": "Firestore query constraints for the given type and clientId.",
1135
+ "tags": [
1136
+ "lookup",
1137
+ "oidcentry",
1138
+ "oidc",
1139
+ "entries",
1140
+ "by",
1141
+ "client",
1142
+ "id",
1143
+ "query",
1144
+ "oidcentriesbyclientidquery",
1145
+ "entry",
1146
+ "documents",
1147
+ "specific",
1148
+ "type",
1149
+ "clientid"
1150
+ ],
1151
+ "constraintSequences": [
1152
+ {
1153
+ "pathLabel": "all",
1154
+ "entries": [
1155
+ {
1156
+ "kind": "where",
1157
+ "fieldPath": "type",
1158
+ "operator": "=="
1159
+ },
1160
+ {
1161
+ "kind": "where",
1162
+ "fieldPath": "clientId",
1163
+ "operator": "=="
1164
+ }
1165
+ ]
1166
+ }
1167
+ ],
1168
+ "derivedComposites": [],
1169
+ "derivedFieldOverrides": []
1170
+ },
1171
+ {
1172
+ "slug": "oidc-client-entries-by-owner-query",
1173
+ "name": "oidcClientEntriesByOwnerQuery",
1174
+ "module": "@dereekb/firebase",
1175
+ "subpath": "model/oidcmodel/oidcmodel.query",
1176
+ "signature": "oidcClientEntriesByOwnerQuery(ownershipKey: FirebaseAuthOwnershipKey): FirestoreQueryConstraint[]",
1177
+ "description": "Query for OidcEntry Client documents owned by a specific user.",
1178
+ "model": "OidcEntry",
1179
+ "collection": "oidc_e",
1180
+ "isNested": false,
1181
+ "scope": "COLLECTION",
1182
+ "manual": false,
1183
+ "skip": false,
1184
+ "category": "lookup",
1185
+ "params": [
1186
+ {
1187
+ "name": "ownershipKey",
1188
+ "type": "FirebaseAuthOwnershipKey",
1189
+ "description": "- The ownership key identifying the owner.",
1190
+ "optional": false
1191
+ }
1192
+ ],
1193
+ "returns": "Firestore query constraints for Client entries matching the ownership key.",
1194
+ "tags": [
1195
+ "lookup",
1196
+ "oidcentry",
1197
+ "oidc",
1198
+ "client",
1199
+ "entries",
1200
+ "by",
1201
+ "owner",
1202
+ "query",
1203
+ "oidccliententriesbyownerquery",
1204
+ "entry",
1205
+ "documents",
1206
+ "owned",
1207
+ "specific",
1208
+ "user"
1209
+ ],
1210
+ "constraintSequences": [
1211
+ {
1212
+ "pathLabel": "all",
1213
+ "entries": [
1214
+ {
1215
+ "kind": "where",
1216
+ "fieldPath": "type",
1217
+ "operator": "=="
1218
+ },
1219
+ {
1220
+ "kind": "where",
1221
+ "fieldPath": "o",
1222
+ "operator": "=="
1223
+ }
1224
+ ]
1225
+ }
1226
+ ],
1227
+ "derivedComposites": [],
1228
+ "derivedFieldOverrides": []
1229
+ },
1230
+ {
1231
+ "slug": "oidc-grant-entries-by-uid-query",
1232
+ "name": "oidcGrantEntriesByUidQuery",
1233
+ "module": "@dereekb/firebase",
1234
+ "subpath": "model/oidcmodel/oidcmodel.query",
1235
+ "signature": "oidcGrantEntriesByUidQuery(uid: FirebaseAuthUserId): FirestoreQueryConstraint[]",
1236
+ "description": "Query for OidcEntry Grant documents issued to a specific user.\n\nUsed by the \"apps with access to my account\" UI to list every outstanding\ngrant the signed-in user has authorized.",
1237
+ "model": "OidcEntry",
1238
+ "collection": "oidc_e",
1239
+ "isNested": false,
1240
+ "scope": "COLLECTION",
1241
+ "manual": false,
1242
+ "skip": false,
1243
+ "category": "lookup",
1244
+ "params": [
1245
+ {
1246
+ "name": "uid",
1247
+ "type": "FirebaseAuthUserId",
1248
+ "description": "- The Firebase user id the grants were issued to.",
1249
+ "optional": false
1250
+ }
1251
+ ],
1252
+ "returns": "Firestore query constraints for Grant entries matching the uid.",
1253
+ "tags": [
1254
+ "lookup",
1255
+ "oidcentry",
1256
+ "oidc",
1257
+ "grant",
1258
+ "entries",
1259
+ "by",
1260
+ "uid",
1261
+ "query",
1262
+ "oidcgrantentriesbyuidquery",
1263
+ "entry",
1264
+ "documents",
1265
+ "issued",
1266
+ "specific",
1267
+ "user",
1268
+ "used",
1269
+ "apps",
1270
+ "access",
1271
+ "account"
1272
+ ],
1273
+ "constraintSequences": [],
1274
+ "derivedComposites": [],
1275
+ "derivedFieldOverrides": []
1276
+ },
1277
+ {
1278
+ "slug": "storage-files-queued-for-processing-query",
1279
+ "name": "storageFilesQueuedForProcessingQuery",
1280
+ "module": "@dereekb/firebase",
1281
+ "subpath": "model/storagefile/storagefile.query",
1282
+ "signature": "storageFilesQueuedForProcessingQuery(): FirestoreQueryConstraint[]",
1283
+ "description": "Returns query constraints for StorageFiles with `ps == QUEUED_FOR_PROCESSING`.\n\nUsed by the server action service to find files awaiting processing task creation.",
1284
+ "model": "StorageFile",
1285
+ "collection": "sf",
1286
+ "isNested": false,
1287
+ "scope": "COLLECTION",
1288
+ "manual": false,
1289
+ "skip": false,
1290
+ "category": "sweep",
1291
+ "params": [],
1292
+ "returns": "Firestore query constraints for StorageFiles queued for processing.",
1293
+ "tags": [
1294
+ "sweep",
1295
+ "storagefile",
1296
+ "storage",
1297
+ "files",
1298
+ "queued",
1299
+ "for",
1300
+ "processing",
1301
+ "query",
1302
+ "storagefilesqueuedforprocessingquery",
1303
+ "file",
1304
+ "constraints",
1305
+ "storagefiles",
1306
+ "used",
1307
+ "server",
1308
+ "action",
1309
+ "service",
1310
+ "find",
1311
+ "awaiting"
1312
+ ],
1313
+ "constraintSequences": [
1314
+ {
1315
+ "pathLabel": "all",
1316
+ "entries": [
1317
+ {
1318
+ "kind": "where",
1319
+ "fieldPath": "ps",
1320
+ "operator": "=="
1321
+ }
1322
+ ]
1323
+ }
1324
+ ],
1325
+ "derivedComposites": [],
1326
+ "derivedFieldOverrides": [],
1327
+ "example": "const constraints = storageFilesQueuedForProcessingQuery();\nconst results = await collection.query(constraints);"
1328
+ },
1329
+ {
1330
+ "slug": "storage-files-queued-for-delete-query",
1331
+ "name": "storageFilesQueuedForDeleteQuery",
1332
+ "module": "@dereekb/firebase",
1333
+ "subpath": "model/storagefile/storagefile.query",
1334
+ "signature": "storageFilesQueuedForDeleteQuery(now?: Maybe<Date>): FirestoreQueryConstraint[]",
1335
+ "description": "Returns query constraints for StorageFiles whose scheduled delete date (`sdat`) has passed.\n\nUsed by the cleanup service to find files ready for permanent deletion.",
1336
+ "model": "StorageFile",
1337
+ "collection": "sf",
1338
+ "isNested": false,
1339
+ "scope": "COLLECTION",
1340
+ "manual": false,
1341
+ "skip": false,
1342
+ "category": "cleanup",
1343
+ "params": [
1344
+ {
1345
+ "name": "now",
1346
+ "type": "Maybe<Date>",
1347
+ "description": "- Reference time for comparison; defaults to current time.",
1348
+ "optional": true
1349
+ }
1350
+ ],
1351
+ "returns": "Firestore query constraints for StorageFiles whose scheduled delete date has passed.",
1352
+ "tags": [
1353
+ "cleanup",
1354
+ "storagefile",
1355
+ "storage",
1356
+ "files",
1357
+ "queued",
1358
+ "for",
1359
+ "delete",
1360
+ "query",
1361
+ "storagefilesqueuedfordeletequery",
1362
+ "file",
1363
+ "constraints",
1364
+ "storagefiles",
1365
+ "whose",
1366
+ "scheduled",
1367
+ "date",
1368
+ "sdat",
1369
+ "has",
1370
+ "passed"
1371
+ ],
1372
+ "constraintSequences": [
1373
+ {
1374
+ "pathLabel": "all",
1375
+ "entries": [
1376
+ {
1377
+ "kind": "where",
1378
+ "fieldPath": "sdat",
1379
+ "operator": "<",
1380
+ "fromHelper": "whereDateIsBefore"
1381
+ }
1382
+ ]
1383
+ }
1384
+ ],
1385
+ "derivedComposites": [],
1386
+ "derivedFieldOverrides": [],
1387
+ "example": "const constraints = storageFilesQueuedForDeleteQuery();"
1388
+ },
1389
+ {
1390
+ "slug": "storage-file-purpose-and-user-query",
1391
+ "name": "storageFilePurposeAndUserQuery",
1392
+ "module": "@dereekb/firebase",
1393
+ "subpath": "model/storagefile/storagefile.query",
1394
+ "signature": "storageFilePurposeAndUserQuery(input: StorageFilePurposeAndUserQueryInput): FirestoreQueryConstraint[]",
1395
+ "description": "Returns query constraints for StorageFiles matching a specific purpose and user,\nwith optional subgroup filtering.",
1396
+ "model": "StorageFile",
1397
+ "collection": "sf",
1398
+ "isNested": false,
1399
+ "scope": "COLLECTION",
1400
+ "manual": false,
1401
+ "skip": true,
1402
+ "category": "lookup",
1403
+ "params": [
1404
+ {
1405
+ "name": "input",
1406
+ "type": "StorageFilePurposeAndUserQueryInput",
1407
+ "description": "- The user, purpose, and optional subgroup to filter by.",
1408
+ "optional": false
1409
+ }
1410
+ ],
1411
+ "returns": "Firestore query constraints for the given purpose and user.",
1412
+ "tags": [
1413
+ "lookup",
1414
+ "storagefile",
1415
+ "storage",
1416
+ "file",
1417
+ "purpose",
1418
+ "and",
1419
+ "user",
1420
+ "query",
1421
+ "storagefilepurposeanduserquery",
1422
+ "constraints",
1423
+ "storagefiles",
1424
+ "matching",
1425
+ "specific",
1426
+ "optional",
1427
+ "subgroup",
1428
+ "filtering"
1429
+ ],
1430
+ "constraintSequences": [],
1431
+ "derivedComposites": [],
1432
+ "derivedFieldOverrides": []
1433
+ },
1434
+ {
1435
+ "slug": "storage-file-flagged-for-sync-with-groups-query",
1436
+ "name": "storageFileFlaggedForSyncWithGroupsQuery",
1437
+ "module": "@dereekb/firebase",
1438
+ "subpath": "model/storagefile/storagefile.query",
1439
+ "signature": "storageFileFlaggedForSyncWithGroupsQuery(): FirestoreQueryConstraint[]",
1440
+ "description": "Returns query constraints for StorageFiles flagged for group synchronization (`gs == true`).\n\nUsed by the sync service to find files whose group memberships need to be propagated.",
1441
+ "model": "StorageFile",
1442
+ "collection": "sf",
1443
+ "isNested": false,
1444
+ "scope": "COLLECTION",
1445
+ "manual": false,
1446
+ "skip": false,
1447
+ "category": "sweep",
1448
+ "params": [],
1449
+ "returns": "Firestore query constraints for StorageFiles flagged for group synchronization.",
1450
+ "tags": [
1451
+ "sweep",
1452
+ "storagefile",
1453
+ "storage",
1454
+ "file",
1455
+ "flagged",
1456
+ "for",
1457
+ "sync",
1458
+ "with",
1459
+ "groups",
1460
+ "query",
1461
+ "storagefileflaggedforsyncwithgroupsquery",
1462
+ "constraints",
1463
+ "storagefiles",
1464
+ "group",
1465
+ "synchronization",
1466
+ "true",
1467
+ "used",
1468
+ "service",
1469
+ "find"
1470
+ ],
1471
+ "constraintSequences": [
1472
+ {
1473
+ "pathLabel": "all",
1474
+ "entries": [
1475
+ {
1476
+ "kind": "where",
1477
+ "fieldPath": "gs",
1478
+ "operator": "=="
1479
+ }
1480
+ ]
1481
+ }
1482
+ ],
1483
+ "derivedComposites": [],
1484
+ "derivedFieldOverrides": []
1485
+ },
1486
+ {
1487
+ "slug": "storage-file-groups-flagged-for-needs-initialization-query",
1488
+ "name": "storageFileGroupsFlaggedForNeedsInitializationQuery",
1489
+ "module": "@dereekb/firebase",
1490
+ "subpath": "model/storagefile/storagefile.query",
1491
+ "signature": "storageFileGroupsFlaggedForNeedsInitializationQuery(): FirestoreQueryConstraint[]",
1492
+ "description": "Returns query constraints for StorageFileGroups that need initialization (`s == true`).\n\nUsed by the initialization service to find newly-created groups that haven't been synced yet.",
1493
+ "model": "StorageFileGroup",
1494
+ "collection": "sfg",
1495
+ "isNested": false,
1496
+ "scope": "COLLECTION",
1497
+ "manual": false,
1498
+ "skip": false,
1499
+ "category": "init",
1500
+ "params": [],
1501
+ "returns": "Firestore query constraints for StorageFileGroups needing initialization.",
1502
+ "tags": [
1503
+ "init",
1504
+ "storagefilegroup",
1505
+ "storage",
1506
+ "file",
1507
+ "groups",
1508
+ "flagged",
1509
+ "for",
1510
+ "needs",
1511
+ "initialization",
1512
+ "query",
1513
+ "storagefilegroupsflaggedforneedsinitializationquery",
1514
+ "group",
1515
+ "constraints",
1516
+ "storagefilegroups",
1517
+ "need",
1518
+ "true",
1519
+ "used",
1520
+ "service",
1521
+ "find",
1522
+ "newly"
1523
+ ],
1524
+ "constraintSequences": [
1525
+ {
1526
+ "pathLabel": "all",
1527
+ "entries": [
1528
+ {
1529
+ "kind": "where",
1530
+ "fieldPath": "s",
1531
+ "operator": "=="
1532
+ }
1533
+ ]
1534
+ }
1535
+ ],
1536
+ "derivedComposites": [],
1537
+ "derivedFieldOverrides": []
1538
+ },
1539
+ {
1540
+ "slug": "storage-file-groups-flagged-for-content-regeneration-query",
1541
+ "name": "storageFileGroupsFlaggedForContentRegenerationQuery",
1542
+ "module": "@dereekb/firebase",
1543
+ "subpath": "model/storagefile/storagefile.query",
1544
+ "signature": "storageFileGroupsFlaggedForContentRegenerationQuery(): FirestoreQueryConstraint[]",
1545
+ "description": "Returns query constraints for StorageFileGroups flagged for content regeneration (`re == true`).",
1546
+ "model": "StorageFileGroup",
1547
+ "collection": "sfg",
1548
+ "isNested": false,
1549
+ "scope": "COLLECTION",
1550
+ "manual": false,
1551
+ "skip": false,
1552
+ "category": "sweep",
1553
+ "params": [],
1554
+ "returns": "Firestore query constraints for StorageFileGroups flagged for content regeneration.",
1555
+ "tags": [
1556
+ "sweep",
1557
+ "storagefilegroup",
1558
+ "storage",
1559
+ "file",
1560
+ "groups",
1561
+ "flagged",
1562
+ "for",
1563
+ "content",
1564
+ "regeneration",
1565
+ "query",
1566
+ "storagefilegroupsflaggedforcontentregenerationquery",
1567
+ "group",
1568
+ "constraints",
1569
+ "storagefilegroups",
1570
+ "true"
1571
+ ],
1572
+ "constraintSequences": [
1573
+ {
1574
+ "pathLabel": "all",
1575
+ "entries": [
1576
+ {
1577
+ "kind": "where",
1578
+ "fieldPath": "re",
1579
+ "operator": "=="
1580
+ }
1581
+ ]
1582
+ }
1583
+ ],
1584
+ "derivedComposites": [],
1585
+ "derivedFieldOverrides": []
1586
+ },
1587
+ {
1588
+ "slug": "storage-file-groups-flagged-invalid-query",
1589
+ "name": "storageFileGroupsFlaggedInvalidQuery",
1590
+ "module": "@dereekb/firebase",
1591
+ "subpath": "model/storagefile/storagefile.query",
1592
+ "signature": "storageFileGroupsFlaggedInvalidQuery(): FirestoreQueryConstraint[]",
1593
+ "description": "Returns query constraints for StorageFileGroups flagged as invalid (`fi == true`).\n\nInvalid groups are typically cleaned up (deleted along with their associated files).",
1594
+ "model": "StorageFileGroup",
1595
+ "collection": "sfg",
1596
+ "isNested": false,
1597
+ "scope": "COLLECTION",
1598
+ "manual": false,
1599
+ "skip": false,
1600
+ "category": "cleanup",
1601
+ "params": [],
1602
+ "returns": "Firestore query constraints for StorageFileGroups flagged as invalid.",
1603
+ "tags": [
1604
+ "cleanup",
1605
+ "storagefilegroup",
1606
+ "storage",
1607
+ "file",
1608
+ "groups",
1609
+ "flagged",
1610
+ "invalid",
1611
+ "query",
1612
+ "storagefilegroupsflaggedinvalidquery",
1613
+ "group",
1614
+ "constraints",
1615
+ "storagefilegroups",
1616
+ "true",
1617
+ "typically",
1618
+ "cleaned",
1619
+ "deleted",
1620
+ "along",
1621
+ "their"
1622
+ ],
1623
+ "constraintSequences": [
1624
+ {
1625
+ "pathLabel": "all",
1626
+ "entries": [
1627
+ {
1628
+ "kind": "where",
1629
+ "fieldPath": "fi",
1630
+ "operator": "=="
1631
+ }
1632
+ ]
1633
+ }
1634
+ ],
1635
+ "derivedComposites": [],
1636
+ "derivedFieldOverrides": []
1637
+ },
1638
+ {
1639
+ "slug": "user-external-connections-with-connected-provider-query",
1640
+ "name": "userExternalConnectionsWithConnectedProviderQuery",
1641
+ "module": "@dereekb/firebase",
1642
+ "subpath": "model/userexternalconnection/userexternalconnection.query",
1643
+ "signature": "userExternalConnectionsWithConnectedProviderQuery(providerType: UserExternalConnectionProviderType): FirestoreQueryConstraint[]",
1644
+ "description": "Query for the UserExternalConnection documents that are currently connected to the given provider.\n\nThis is the single reason the derived `c` array exists: with one document per user, provider ids\nare map keys, and Firestore cannot query across map keys.\n\nOnly `connected` entries are members of `c`, so this never returns a user whose credentials are in\nthe `error` or `disconnected` state.",
1645
+ "model": "UserExternalConnection",
1646
+ "collection": "uec",
1647
+ "isNested": false,
1648
+ "scope": "COLLECTION",
1649
+ "manual": false,
1650
+ "skip": false,
1651
+ "category": "misc",
1652
+ "params": [
1653
+ {
1654
+ "name": "providerType",
1655
+ "type": "UserExternalConnectionProviderType",
1656
+ "description": "- The provider type to search for.",
1657
+ "optional": false
1658
+ }
1659
+ ],
1660
+ "returns": "Firestore query constraints matching users connected to that provider.",
1661
+ "tags": [
1662
+ "misc",
1663
+ "userexternalconnection",
1664
+ "user",
1665
+ "external",
1666
+ "connections",
1667
+ "with",
1668
+ "connected",
1669
+ "provider",
1670
+ "query",
1671
+ "userexternalconnectionswithconnectedproviderquery",
1672
+ "connection",
1673
+ "documents",
1674
+ "currently",
1675
+ "given",
1676
+ "single",
1677
+ "reason",
1678
+ "derived",
1679
+ "array",
1680
+ "exists"
1681
+ ],
1682
+ "constraintSequences": [
1683
+ {
1684
+ "pathLabel": "all",
1685
+ "entries": [
1686
+ {
1687
+ "kind": "where",
1688
+ "fieldPath": "c",
1689
+ "operator": "array-contains"
1690
+ }
1691
+ ]
1692
+ }
1693
+ ],
1694
+ "derivedComposites": [],
1695
+ "derivedFieldOverrides": []
1696
+ },
1697
+ {
1698
+ "slug": "user-external-connections-with-external-account-query",
1699
+ "name": "userExternalConnectionsWithExternalAccountQuery",
1700
+ "module": "@dereekb/firebase",
1701
+ "subpath": "model/userexternalconnection/userexternalconnection.query",
1702
+ "signature": "userExternalConnectionsWithExternalAccountQuery(input: UserExternalConnectionExternalAccountKeyInput): FirestoreQueryConstraint[]",
1703
+ "description": "Query for the UserExternalConnection document holding the given third-party account.\n\nThe sign-in counterpart of {@link userExternalConnectionsWithConnectedProviderQuery}: that one\nasks \"which users are connected to this provider?\", this one asks \"which user IS this account?\".\nBoth exist because a per-user document makes `e.<provider>.ea` unqueryable.\n\nMatches at ANY entry status — see the `ec` field docs. Expect at most one result when the\nprovider's policy declares the connection unique, but the caller must still handle more than one:\nuniqueness is enforced at write time and a provider may only have started enforcing it recently.",
1704
+ "model": "UserExternalConnection",
1705
+ "collection": "uec",
1706
+ "isNested": false,
1707
+ "scope": "COLLECTION",
1708
+ "manual": false,
1709
+ "skip": false,
1710
+ "category": "misc",
1711
+ "params": [
1712
+ {
1713
+ "name": "input",
1714
+ "type": "UserExternalConnectionExternalAccountKeyInput",
1715
+ "description": "- The provider type and external account id to search for.",
1716
+ "optional": false
1717
+ }
1718
+ ],
1719
+ "returns": "Firestore query constraints matching the user holding that external account.",
1720
+ "tags": [
1721
+ "misc",
1722
+ "userexternalconnection",
1723
+ "user",
1724
+ "external",
1725
+ "connections",
1726
+ "with",
1727
+ "account",
1728
+ "query",
1729
+ "userexternalconnectionswithexternalaccountquery",
1730
+ "connection",
1731
+ "document",
1732
+ "holding",
1733
+ "given",
1734
+ "third",
1735
+ "party",
1736
+ "sign",
1737
+ "counterpart",
1738
+ "link"
1739
+ ],
1740
+ "constraintSequences": [
1741
+ {
1742
+ "pathLabel": "all",
1743
+ "entries": [
1744
+ {
1745
+ "kind": "where",
1746
+ "fieldPath": "ec",
1747
+ "operator": "array-contains"
1748
+ }
1749
+ ]
1750
+ }
1751
+ ],
1752
+ "derivedComposites": [],
1753
+ "derivedFieldOverrides": []
1754
+ }
1755
+ ]
1756
+ }