@dereekb/firebase 13.11.13 → 13.11.15

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.
Files changed (112) hide show
  1. package/index.cjs.js +1446 -1137
  2. package/index.esm.js +1437 -1128
  3. package/package.json +5 -5
  4. package/src/lib/client/error/error.d.ts +1 -1
  5. package/src/lib/client/firestore/array.d.ts +3 -2
  6. package/src/lib/client/firestore/driver.accessor.batch.d.ts +5 -4
  7. package/src/lib/client/firestore/driver.accessor.create.d.ts +4 -3
  8. package/src/lib/client/firestore/driver.accessor.d.ts +2 -1
  9. package/src/lib/client/firestore/driver.accessor.default.d.ts +5 -3
  10. package/src/lib/client/firestore/driver.accessor.transaction.d.ts +7 -5
  11. package/src/lib/client/firestore/driver.d.ts +1 -1
  12. package/src/lib/client/firestore/driver.query.d.ts +5 -5
  13. package/src/lib/client/firestore/increment.d.ts +3 -2
  14. package/src/lib/client/function/development.function.factory.d.ts +3 -2
  15. package/src/lib/client/function/error.d.ts +2 -2
  16. package/src/lib/client/function/function.callable.d.ts +5 -5
  17. package/src/lib/client/function/function.factory.d.ts +6 -4
  18. package/src/lib/client/function/model.function.factory.d.ts +9 -8
  19. package/src/lib/client/storage/driver.accessor.d.ts +14 -14
  20. package/src/lib/client/storage/driver.d.ts +1 -1
  21. package/src/lib/common/auth/auth.error.d.ts +2 -2
  22. package/src/lib/common/development/function.d.ts +5 -5
  23. package/src/lib/common/firestore/accessor/accessor.d.ts +22 -16
  24. package/src/lib/common/firestore/accessor/accessor.wrap.d.ts +33 -29
  25. package/src/lib/common/firestore/accessor/accessor.wrap.modify.d.ts +11 -7
  26. package/src/lib/common/firestore/accessor/array.d.ts +3 -2
  27. package/src/lib/common/firestore/accessor/document.d.ts +27 -24
  28. package/src/lib/common/firestore/accessor/document.paged.d.ts +2 -2
  29. package/src/lib/common/firestore/accessor/document.rxjs.d.ts +15 -12
  30. package/src/lib/common/firestore/accessor/document.utility.d.ts +81 -72
  31. package/src/lib/common/firestore/accessor/increment.d.ts +3 -2
  32. package/src/lib/common/firestore/cache/cache.d.ts +8 -7
  33. package/src/lib/common/firestore/cache/cache.memory.d.ts +13 -10
  34. package/src/lib/common/firestore/collection/collection.d.ts +62 -42
  35. package/src/lib/common/firestore/collection/collection.group.d.ts +4 -2
  36. package/src/lib/common/firestore/collection/collection.query.d.ts +7 -4
  37. package/src/lib/common/firestore/collection/collection.single.d.ts +4 -2
  38. package/src/lib/common/firestore/collection/collection.util.d.ts +3 -2
  39. package/src/lib/common/firestore/collection/subcollection.d.ts +4 -2
  40. package/src/lib/common/firestore/collection/subcollection.paged.d.ts +7 -3
  41. package/src/lib/common/firestore/collection/subcollection.single.d.ts +4 -2
  42. package/src/lib/common/firestore/context.d.ts +4 -2
  43. package/src/lib/common/firestore/driver/query.handler.d.ts +4 -3
  44. package/src/lib/common/firestore/error.d.ts +6 -5
  45. package/src/lib/common/firestore/query/constraint.d.ts +56 -36
  46. package/src/lib/common/firestore/query/constraint.template.d.ts +15 -7
  47. package/src/lib/common/firestore/query/iterator.d.ts +20 -13
  48. package/src/lib/common/firestore/query/query.d.ts +6 -4
  49. package/src/lib/common/firestore/query/query.iterate.array.d.ts +10 -6
  50. package/src/lib/common/firestore/query/query.iterate.d.ts +8 -8
  51. package/src/lib/common/firestore/query/query.util.d.ts +11 -7
  52. package/src/lib/common/firestore/query/watcher.d.ts +9 -7
  53. package/src/lib/common/firestore/snapshot/snapshot.d.ts +6 -3
  54. package/src/lib/common/firestore/snapshot/snapshot.field.d.ts +230 -132
  55. package/src/lib/common/firestore/util/id.batch.d.ts +4 -2
  56. package/src/lib/common/model/function.d.ts +21 -20
  57. package/src/lib/common/model/model/model.loader.d.ts +2 -2
  58. package/src/lib/common/model/model.service.d.ts +28 -20
  59. package/src/lib/common/model/permission/permission.service.d.ts +3 -2
  60. package/src/lib/common/model/permission/permission.service.grant.d.ts +27 -21
  61. package/src/lib/common/model/permission/permission.service.role.d.ts +7 -7
  62. package/src/lib/common/storage/accessor/path.model.d.ts +3 -2
  63. package/src/lib/common/storage/context.d.ts +3 -2
  64. package/src/lib/common/storage/driver/accessor.iterate.d.ts +7 -6
  65. package/src/lib/common/storage/driver/accessor.util.d.ts +4 -4
  66. package/src/lib/common/storage/driver/error.d.ts +3 -3
  67. package/src/lib/common/storage/driver/list.d.ts +4 -3
  68. package/src/lib/common/storage/storage.d.ts +9 -8
  69. package/src/lib/common/storage/types.d.ts +1 -1
  70. package/src/lib/model/notification/notification.api.d.ts +2 -2
  71. package/src/lib/model/notification/notification.api.util.d.ts +16 -16
  72. package/src/lib/model/notification/notification.config.d.ts +35 -34
  73. package/src/lib/model/notification/notification.create.d.ts +17 -15
  74. package/src/lib/model/notification/notification.create.loggedevent.d.ts +3 -2
  75. package/src/lib/model/notification/notification.create.task.d.ts +3 -2
  76. package/src/lib/model/notification/notification.d.ts +53 -45
  77. package/src/lib/model/notification/notification.details.d.ts +5 -4
  78. package/src/lib/model/notification/notification.id.d.ts +8 -8
  79. package/src/lib/model/notification/notification.item.d.ts +3 -3
  80. package/src/lib/model/notification/notification.loggedevent.loader.d.ts +2 -2
  81. package/src/lib/model/notification/notification.message.d.ts +6 -4
  82. package/src/lib/model/notification/notification.query.d.ts +12 -12
  83. package/src/lib/model/notification/notification.send.d.ts +3 -3
  84. package/src/lib/model/notification/notification.task.d.ts +15 -15
  85. package/src/lib/model/notification/notification.task.subtask.d.ts +3 -3
  86. package/src/lib/model/notification/notification.util.d.ts +29 -29
  87. package/src/lib/model/oidcmodel/oidcmodel.api.d.ts +2 -2
  88. package/src/lib/model/oidcmodel/oidcmodel.d.ts +6 -6
  89. package/src/lib/model/oidcmodel/oidcmodel.query.d.ts +18 -18
  90. package/src/lib/model/storagefile/storagefile.api.d.ts +2 -2
  91. package/src/lib/model/storagefile/storagefile.create.d.ts +8 -7
  92. package/src/lib/model/storagefile/storagefile.d.ts +19 -18
  93. package/src/lib/model/storagefile/storagefile.file.d.ts +2 -1
  94. package/src/lib/model/storagefile/storagefile.group.d.ts +5 -5
  95. package/src/lib/model/storagefile/storagefile.permission.d.ts +3 -2
  96. package/src/lib/model/storagefile/storagefile.query.d.ts +15 -15
  97. package/src/lib/model/storagefile/storagefile.task.d.ts +2 -2
  98. package/src/lib/model/storagefile/storagefile.upload.claims.d.ts +4 -4
  99. package/src/lib/model/storagefile/storagefile.upload.d.ts +8 -6
  100. package/src/lib/model/storagefile/storagefile.upload.determiner.d.ts +18 -16
  101. package/src/lib/model/storagefile/storagefile.util.d.ts +8 -8
  102. package/src/lib/model/system/system.d.ts +6 -6
  103. package/test/index.cjs.js +43 -43
  104. package/test/index.esm.js +38 -38
  105. package/test/package.json +6 -6
  106. package/test/src/lib/client/firebase.d.ts +1 -1
  107. package/test/src/lib/common/firestore/firestore.d.ts +3 -3
  108. package/test/src/lib/common/mock/mock.item.collection.fixture.d.ts +3 -3
  109. package/test/src/lib/common/mock/mock.item.d.ts +16 -16
  110. package/test/src/lib/common/mock/mock.item.query.d.ts +4 -4
  111. package/test/src/lib/common/mock/mock.item.storage.fixture.d.ts +3 -3
  112. package/test/src/lib/common/storage/storage.d.ts +1 -1
@@ -13,20 +13,20 @@ import { type NotificationTemplateType } from './notification.id';
13
13
  * Applies an array of config entry params to a {@link NotificationBoxRecipientTemplateConfigRecord},
14
14
  * inserting new entries, merging updates, and removing entries marked with `remove: true`.
15
15
  *
16
- * @param a - existing config record
17
- * @param b - array of update params to apply
18
- * @param limitToAllowedConfigTypes - when provided, filters the result to only include these template types
19
- * @returns the updated config record, or undefined if no changes were made
16
+ * @param a - Existing config record.
17
+ * @param b - Array of update params to apply.
18
+ * @param limitToAllowedConfigTypes - When provided, filters the result to only include these template types.
19
+ * @returns The updated config record, or undefined if no changes were made.
20
20
  */
21
21
  export declare function updateNotificationBoxRecipientTemplateConfigRecord(a: NotificationBoxRecipientTemplateConfigRecord, b: NotificationBoxRecipientTemplateConfigArrayEntryParam[], limitToAllowedConfigTypes?: Maybe<Iterable<NotificationTemplateType>>): Maybe<NotificationBoxRecipientTemplateConfigRecord>;
22
22
  /**
23
23
  * Applies {@link UpdateNotificationUserDefaultNotificationBoxRecipientConfigParams} to an existing
24
24
  * {@link NotificationUserDefaultNotificationBoxRecipientConfig}, producing an updated config.
25
25
  *
26
- * @param a - existing config
27
- * @param b - update params to apply
28
- * @param limitToAllowedConfigTypes - when provided, filters config types to only allowed template types
29
- * @returns the updated default recipient config
26
+ * @param a - Existing config.
27
+ * @param b - Update params to apply.
28
+ * @param limitToAllowedConfigTypes - When provided, filters config types to only allowed template types.
29
+ * @returns The updated default recipient config.
30
30
  */
31
31
  export declare function updateNotificationUserDefaultNotificationBoxRecipientConfig(a: NotificationUserDefaultNotificationBoxRecipientConfig, b: UpdateNotificationUserDefaultNotificationBoxRecipientConfigParams, limitToAllowedConfigTypes?: Maybe<Iterable<NotificationTemplateType>>): NotificationUserDefaultNotificationBoxRecipientConfig;
32
32
  /**
@@ -35,10 +35,10 @@ export declare function updateNotificationUserDefaultNotificationBoxRecipientCon
35
35
  *
36
36
  * Automatically sets `ns = true` (needs sync) when changes are detected and the recipient has been indexed.
37
37
  *
38
- * @param a - existing per-box recipient config
39
- * @param b - update params to apply
40
- * @param limitToAllowedConfigTypes - when provided, filters template config types to only allowed types
41
- * @returns the updated config if changes were detected, or undefined if no changes occurred
38
+ * @param a - Existing per-box recipient config.
39
+ * @param b - Update params to apply.
40
+ * @param limitToAllowedConfigTypes - When provided, filters template config types to only allowed types.
41
+ * @returns The updated config if changes were detected, or undefined if no changes occurred.
42
42
  */
43
43
  export declare function updateNotificationUserNotificationBoxRecipientConfigIfChanged(a: NotificationUserNotificationBoxRecipientConfig, b: UpdateNotificationUserNotificationBoxRecipientParams, limitToAllowedConfigTypes?: Maybe<Iterable<NotificationTemplateType>>): Maybe<NotificationUserNotificationBoxRecipientConfig>;
44
44
  /**
@@ -50,9 +50,9 @@ export declare function updateNotificationUserNotificationBoxRecipientConfigIfCh
50
50
  *
51
51
  * Returns `undefined` if no changes were made.
52
52
  *
53
- * @param a - existing per-box recipient config array
54
- * @param b - array of update params to apply to matching boxes
55
- * @param filterWithService - optional service used to filter template types to only those valid for each box's model
56
- * @returns the updated config array if any changes occurred, or undefined if nothing changed
53
+ * @param a - Existing per-box recipient config array.
54
+ * @param b - Array of update params to apply to matching boxes.
55
+ * @param filterWithService - Optional service used to filter template types to only those valid for each box's model.
56
+ * @returns The updated config array if any changes occurred, or undefined if nothing changed.
57
57
  */
58
58
  export declare function updateNotificationUserNotificationBoxRecipientConfigs(a: NotificationUserNotificationBoxRecipientConfig[], b: UpdateNotificationUserNotificationBoxRecipientParams[], filterWithService?: AppNotificationTemplateTypeInfoRecordService): Maybe<NotificationUserNotificationBoxRecipientConfig[]>;
@@ -31,30 +31,30 @@ export interface NotificationBoxRecipientTemplateConfig {
31
31
  /**
32
32
  * Master toggle. When set, acts as the default for all channels that aren't individually configured.
33
33
  */
34
- sd?: Maybe<boolean>;
34
+ readonly sd?: Maybe<boolean>;
35
35
  /**
36
36
  * Email channel enabled/disabled.
37
37
  */
38
- se?: Maybe<boolean>;
38
+ readonly se?: Maybe<boolean>;
39
39
  /**
40
40
  * Text/SMS channel enabled/disabled.
41
41
  */
42
- st?: Maybe<boolean>;
42
+ readonly st?: Maybe<boolean>;
43
43
  /**
44
44
  * Push notification channel enabled/disabled.
45
45
  */
46
- sp?: Maybe<boolean>;
46
+ readonly sp?: Maybe<boolean>;
47
47
  /**
48
48
  * In-app notification summary channel enabled/disabled.
49
49
  */
50
- sn?: Maybe<boolean>;
50
+ readonly sn?: Maybe<boolean>;
51
51
  }
52
52
  /**
53
53
  * Merges two {@link NotificationBoxRecipientTemplateConfig} objects, preferring values from `a` over `b`.
54
54
  *
55
- * @param a - primary config whose defined values take precedence
56
- * @param b - fallback config supplying values when `a` fields are undefined
57
- * @returns the merged template config with values from `a` preferred over `b`
55
+ * @param a - Primary config whose defined values take precedence.
56
+ * @param b - Fallback config supplying values when `a` fields are undefined.
57
+ * @returns The merged template config with values from `a` preferred over `b`
58
58
  *
59
59
  * @example
60
60
  * ```ts
@@ -71,8 +71,8 @@ export declare function mergeNotificationBoxRecipientTemplateConfigs(a?: Maybe<N
71
71
  *
72
72
  * This produces the "effective" configuration used at send time, where each channel has a definite boolean.
73
73
  *
74
- * @param a - the template config to resolve
75
- * @returns the effective config with each channel flag filled in using the send-default fallback
74
+ * @param a - The template config to resolve.
75
+ * @returns The effective config with each channel flag filled in using the send-default fallback.
76
76
  *
77
77
  * @example
78
78
  * ```ts
@@ -121,9 +121,9 @@ export interface NotificationRecipient {
121
121
  *
122
122
  * Automatically clears the summary ID (`s`) when a `uid` is present.
123
123
  *
124
- * @param a - existing recipient to update
125
- * @param b - partial values to apply on top of the existing recipient
126
- * @returns the updated recipient with merged values
124
+ * @param a - Existing recipient to update.
125
+ * @param b - Partial values to apply on top of the existing recipient.
126
+ * @returns The updated recipient with merged values.
127
127
  */
128
128
  export declare function updateNotificationRecipient(a: NotificationRecipient, b: Partial<NotificationRecipient>): NotificationRecipient;
129
129
  /**
@@ -192,9 +192,9 @@ export interface NotificationBoxRecipient extends NotificationRecipient, IndexRe
192
192
  /**
193
193
  * Creates a new {@link NotificationBoxRecipient} for a user with an empty config record.
194
194
  *
195
- * @param uid - the user's Firebase auth UID
196
- * @param i - the recipient's index position in the box's recipient array
197
- * @returns a new recipient entry with the given uid and index and an empty template config record
195
+ * @param uid - The user's Firebase auth UID.
196
+ * @param i - The recipient's index position in the box's recipient array.
197
+ * @returns A new recipient entry with the given uid and index and an empty template config record.
198
198
  */
199
199
  export declare function newNotificationBoxRecipientForUid(uid: FirebaseAuthUserId, i: number): NotificationBoxRecipient;
200
200
  /**
@@ -211,18 +211,18 @@ export interface NotificationUserDefaultNotificationBoxRecipientConfig extends O
211
211
  /**
212
212
  * Locked flag. Prevents the NotificationBox from modifying this user's recipient config.
213
213
  */
214
- lk?: Maybe<SavedToFirestoreIfTrue>;
214
+ readonly lk?: Maybe<SavedToFirestoreIfTrue>;
215
215
  /**
216
216
  * Blocked flag. Prevents the NotificationBox from re-adding this user as a recipient.
217
217
  */
218
- bk?: Maybe<SavedToFirestoreIfTrue>;
218
+ readonly bk?: Maybe<SavedToFirestoreIfTrue>;
219
219
  }
220
220
  /**
221
221
  * Merges two {@link NotificationUserDefaultNotificationBoxRecipientConfig} objects, preferring defined values from `a` over `b`.
222
222
  *
223
- * @param a - primary config whose defined values take precedence
224
- * @param b - fallback config supplying values when `a` fields are undefined
225
- * @returns the merged config
223
+ * @param a - Primary config whose defined values take precedence.
224
+ * @param b - Fallback config supplying values when `a` fields are undefined.
225
+ * @returns The merged config.
226
226
  */
227
227
  export declare function mergeNotificationUserDefaultNotificationBoxRecipientConfig(a: NotificationUserDefaultNotificationBoxRecipientConfig, b: NotificationUserDefaultNotificationBoxRecipientConfig): NotificationUserDefaultNotificationBoxRecipientConfig;
228
228
  /**
@@ -242,26 +242,26 @@ export interface NotificationUserNotificationBoxRecipientConfig extends Omit<Not
242
242
  /**
243
243
  * ID of the {@link NotificationBox} this config mirrors. The related model key can be inferred via {@link inferNotificationBoxRelatedModelKey}.
244
244
  */
245
- nb: NotificationBoxId;
245
+ readonly nb: NotificationBoxId;
246
246
  /**
247
247
  * Self-removal flag. When set, the user has removed themselves from this box.
248
248
  *
249
249
  * Only the box owner can restore a removed user. Users typically prefer the `f` (opt-out) flag instead,
250
250
  * which stops delivery without removing the subscription. The config is retained unless the user explicitly deletes it.
251
251
  */
252
- rm?: Maybe<SavedToFirestoreIfTrue>;
252
+ readonly rm?: Maybe<SavedToFirestoreIfTrue>;
253
253
  /**
254
254
  * Whether this config needs to be synced with the corresponding {@link NotificationBox} recipient entry.
255
255
  */
256
- ns?: Maybe<NeedsSyncBoolean>;
256
+ readonly ns?: Maybe<NeedsSyncBoolean>;
257
257
  /**
258
258
  * Locked flag. Prevents the box from modifying this user's recipient config.
259
259
  */
260
- lk?: Maybe<SavedToFirestoreIfTrue>;
260
+ readonly lk?: Maybe<SavedToFirestoreIfTrue>;
261
261
  /**
262
262
  * Blocked flag. Prevents the box from re-adding this user as a recipient.
263
263
  */
264
- bk?: Maybe<SavedToFirestoreIfTrue>;
264
+ readonly bk?: Maybe<SavedToFirestoreIfTrue>;
265
265
  }
266
266
  /**
267
267
  * Bit positions for encoding {@link NotificationBoxRecipientTemplateConfig} as a {@link BitwiseEncodedSet}.
@@ -296,9 +296,9 @@ export type NotificationBoxRecipientTemplateConfigRecord = Record<NotificationTe
296
296
  /**
297
297
  * Merges two {@link NotificationBoxRecipientTemplateConfigRecord} objects, preferring defined values from `a`.
298
298
  *
299
- * @param a - primary record whose defined values take precedence
300
- * @param b - fallback record supplying values when `a` entries are undefined
301
- * @returns the merged template config record
299
+ * @param a - Primary record whose defined values take precedence.
300
+ * @param b - Fallback record supplying values when `a` entries are undefined.
301
+ * @returns The merged template config record.
302
302
  */
303
303
  export declare function mergeNotificationBoxRecipientTemplateConfigRecords(a: NotificationBoxRecipientTemplateConfigRecord, b: NotificationBoxRecipientTemplateConfigRecord): NotificationBoxRecipientTemplateConfigRecord;
304
304
  /**
@@ -310,7 +310,8 @@ export type EncodedNotificationBoxRecipientTemplateConfigRecord = Record<Notific
310
310
  * Creates a Firestore field converter for {@link NotificationBoxRecipientTemplateConfigRecord},
311
311
  * using bitwise encoding for compact storage.
312
312
  *
313
- * @returns a Firestore field converter that encodes and decodes template config records using bitwise encoding
313
+ * @returns A Firestore field converter that encodes and decodes template config records using bitwise encoding.
314
+ *
314
315
  * @__NO_SIDE_EFFECTS__
315
316
  */
316
317
  export declare function firestoreNotificationBoxRecipientTemplateConfigRecord(): import("../..").FirestoreModelFieldMapFunctionsConfig<import("../..").FirestoreEncodedObjectMapFieldValueType<NotificationBoxRecipientTemplateConfig, string>, import("../..").FirestoreMapFieldType<number, string>>;
@@ -344,8 +345,8 @@ export type NotificationBoxRecipientTemplateConfigArray = NotificationBoxRecipie
344
345
  /**
345
346
  * Converts a {@link NotificationBoxRecipientTemplateConfigRecord} to an array of entries with their type keys.
346
347
  *
347
- * @param input - the template config record to convert
348
- * @returns an array of entries each containing a type key and the corresponding channel config
348
+ * @param input - Template config record keyed by template type.
349
+ * @returns Flattened entries combining each template type with its channel config.
349
350
  *
350
351
  * @example
351
352
  * ```ts
@@ -357,8 +358,8 @@ export declare function notificationBoxRecipientTemplateConfigRecordToArray(inpu
357
358
  /**
358
359
  * Converts a {@link NotificationBoxRecipientTemplateConfigArray} back to a {@link NotificationBoxRecipientTemplateConfigRecord}.
359
360
  *
360
- * @param input - the array of typed config entries to convert
361
- * @returns a record keyed by template type
361
+ * @param input - Flattened entries that include the template type and channel config.
362
+ * @returns Template config record keyed by template type.
362
363
  */
363
364
  export declare function notificationBoxRecipientTemplateConfigArrayToRecord(input: NotificationBoxRecipientTemplateConfigArray): NotificationBoxRecipientTemplateConfigRecord;
364
365
  /**
@@ -124,8 +124,9 @@ export interface CreateNotificationTemplateInput extends Partial<Omit<CreateNoti
124
124
  * Maps friendly field names (`subject`, `message`, `createdBy`, etc.) to their Firestore abbreviations
125
125
  * and filters out null/undefined metadata values.
126
126
  *
127
- * @param input - friendly input with readable field names
128
- * @returns the low-level template using Firestore field abbreviations
127
+ * @param input - Friendly input with readable field names.
128
+ * @returns The low-level template using Firestore field abbreviations.
129
+ *
129
130
  * @__NO_SIDE_EFFECTS__
130
131
  */
131
132
  export declare function createNotificationTemplate(input: CreateNotificationTemplateInput): CreateNotificationTemplate;
@@ -154,8 +155,8 @@ export interface ShouldSendCreatedNotificationInput {
154
155
  *
155
156
  * Returns false if `sendNotification` is explicitly false, or if the throttle window hasn't elapsed.
156
157
  *
157
- * @param input - the send control parameters including the toggle and throttle configuration
158
- * @returns true if the notification should be created and sent
158
+ * @param input - The send control parameters including the toggle and throttle configuration.
159
+ * @returns True if the notification should be created and sent.
159
160
  */
160
161
  export declare function shouldSendCreatedNotificationInput(input: ShouldSendCreatedNotificationInput): boolean;
161
162
  /**
@@ -218,19 +219,20 @@ export interface CreateNotificationDocumentPairResult extends Pick<CreateNotific
218
219
  *
219
220
  * For unique task notifications, generates a deterministic document ID from the target model and task type.
220
221
  *
221
- * @param input - the creation parameters including template, context, and accessor
222
- * @returns the document reference and notification data pair, with `notificationCreated` set to false
223
- * @throws {Error} When neither an accessor nor sufficient context is provided
224
- * @throws {Error} When `unique=true` but no target model is specified
222
+ * @param input - The creation parameters including template, context, and accessor.
223
+ * @returns The document reference and notification data pair, with `notificationCreated` set to false.
224
+ * @throws {Error} When neither an accessor nor sufficient context is provided.
225
+ * @throws {Error} When `unique=true` but no target model is specified.
226
+ *
225
227
  * @__NO_SIDE_EFFECTS__
226
228
  */
227
229
  export declare function createNotificationDocumentPair(input: CreateNotificationDocumentPairInput): CreateNotificationDocumentPairResult;
228
230
  /**
229
231
  * Internal function used by createNotificationDocument().
230
232
  *
231
- * @param input - send control parameters (throttle settings, shouldCreateNotification flag)
232
- * @param pair - the document pair created by {@link createNotificationDocumentPair}
233
- * @returns the pair with `notificationCreated` updated to reflect whether the document was saved
233
+ * @param input - Send control parameters (throttle settings, shouldCreateNotification flag)
234
+ * @param pair - The document pair created by {@link createNotificationDocumentPair}
235
+ * @returns The pair with `notificationCreated` updated to reflect whether the document was saved.
234
236
  */
235
237
  export declare function _createNotificationDocumentFromPair(input: Pick<CreateNotificationDocumentPairInput, 'shouldCreateNotification' | keyof ShouldSendCreatedNotificationInput>, pair: CreateNotificationDocumentPairResult): Promise<CreateNotificationDocumentPairResult>;
236
238
  /**
@@ -239,8 +241,8 @@ export declare function _createNotificationDocumentFromPair(input: Pick<CreateNo
239
241
  * For unique tasks with `overrideExistingTask`, uses `set()` to replace existing documents.
240
242
  * Otherwise uses `create()` which fails if the document already exists.
241
243
  *
242
- * @param input - the creation parameters including template, context, send control settings
243
- * @returns the document pair with `notificationCreated` reflecting whether the document was saved
244
+ * @param input - The creation parameters including template, context, send control settings.
245
+ * @returns The document pair with `notificationCreated` reflecting whether the document was saved.
244
246
  */
245
247
  export declare function createNotificationDocument(input: CreateNotificationDocumentPairInput): Promise<CreateNotificationDocumentPairResult>;
246
248
  /**
@@ -248,7 +250,7 @@ export declare function createNotificationDocument(input: CreateNotificationDocu
248
250
  *
249
251
  * Returns `undefined` if the notification was not created.
250
252
  *
251
- * @param input - the creation parameters including template, context, and send control settings
252
- * @returns the document pair if the notification was created, or undefined if it was skipped
253
+ * @param input - The creation parameters including template, context, and send control settings.
254
+ * @returns The document pair if the notification was created, or undefined if it was skipped.
253
255
  */
254
256
  export declare function createNotificationDocumentIfSending(input: CreateNotificationDocumentPairInput): Promise<Maybe<CreateNotificationDocumentPairResult>>;
@@ -16,8 +16,8 @@ export type CreateNotificationLoggedEventTemplateInput = Omit<CreateNotification
16
16
  * {@link createNotificationDocumentPair}), so it is invisible to the send loop and is archived to
17
17
  * {@link NotificationLoggedEventDay} during cleanup.
18
18
  *
19
- * @param input - logged-event template input parameters
20
- * @returns the configured logged-event notification template
19
+ * @param input - Logged-event template input parameters.
20
+ * @returns The configured logged-event notification template.
21
21
  * @throws {Error} When `notificationModel` is not provided.
22
22
  *
23
23
  * @example
@@ -28,6 +28,7 @@ export type CreateNotificationLoggedEventTemplateInput = Omit<CreateNotification
28
28
  * data: { workerId: 'w_001', at: new Date().toISOString() }
29
29
  * });
30
30
  * ```
31
+ *
31
32
  * @__NO_SIDE_EFFECTS__
32
33
  */
33
34
  export declare function createNotificationLoggedEventTemplate(input: CreateNotificationLoggedEventTemplateInput): CreateNotificationLoggedEventTemplate;
@@ -28,8 +28,8 @@ export interface CreateNotificationTaskTemplateInput extends Omit<CreateNotifica
28
28
  /**
29
29
  * Creates a {@link CreateNotificationTaskTemplate} with `TASK_NOTIFICATION` send type and no recipients.
30
30
  *
31
- * @param input - task template input parameters
32
- * @returns the configured task notification template
31
+ * @param input - Task template input parameters.
32
+ * @returns The configured task notification template.
33
33
  * @throws {Error} When `unique=true` but no `notificationModel` or target model is specified.
34
34
  *
35
35
  * @example
@@ -41,6 +41,7 @@ export interface CreateNotificationTaskTemplateInput extends Omit<CreateNotifica
41
41
  * data: { reportType: 'monthly' }
42
42
  * });
43
43
  * ```
44
+ *
44
45
  * @__NO_SIDE_EFFECTS__
45
46
  */
46
47
  export declare function createNotificationTaskTemplate(input: CreateNotificationTaskTemplateInput): CreateNotificationTaskTemplate;
@@ -153,8 +153,8 @@ export declare const notificationUserConverter: import("../..").SnapshotConverte
153
153
  /**
154
154
  * Creates a Firestore collection reference for {@link NotificationUser} documents.
155
155
  *
156
- * @param context - Firestore context to create the collection reference from
157
- * @returns a typed collection reference for NotificationUser documents
156
+ * @param context - Firestore context to create the collection reference from.
157
+ * @returns A typed collection reference for NotificationUser documents.
158
158
  */
159
159
  export declare function notificationUserCollectionReference(context: FirestoreContext): CollectionReference<NotificationUser>;
160
160
  /**
@@ -164,8 +164,8 @@ export type NotificationUserFirestoreCollection = FirestoreCollection<Notificati
164
164
  /**
165
165
  * Creates a typed {@link NotificationUserFirestoreCollection} bound to the given Firestore context.
166
166
  *
167
- * @param firestoreContext - Firestore context to bind the collection to
168
- * @returns a typed Firestore collection for NotificationUser documents
167
+ * @param firestoreContext - Firestore context to bind the collection to.
168
+ * @returns A typed Firestore collection for NotificationUser documents.
169
169
  */
170
170
  export declare function notificationUserFirestoreCollection(firestoreContext: FirestoreContext): NotificationUserFirestoreCollection;
171
171
  /**
@@ -256,8 +256,8 @@ export declare const notificationSummaryConverter: import("../..").SnapshotConve
256
256
  /**
257
257
  * Creates a Firestore collection reference for {@link NotificationSummary} documents.
258
258
  *
259
- * @param context - Firestore context to create the collection reference from
260
- * @returns a typed collection reference for NotificationSummary documents
259
+ * @param context - Firestore context to create the collection reference from.
260
+ * @returns A typed collection reference for NotificationSummary documents.
261
261
  */
262
262
  export declare function notificationSummaryCollectionReference(context: FirestoreContext): CollectionReference<NotificationSummary>;
263
263
  /**
@@ -267,8 +267,8 @@ export type NotificationSummaryFirestoreCollection = FirestoreCollection<Notific
267
267
  /**
268
268
  * Creates a typed {@link NotificationSummaryFirestoreCollection} bound to the given Firestore context.
269
269
  *
270
- * @param firestoreContext - Firestore context to bind the collection to
271
- * @returns a typed Firestore collection for NotificationSummary documents
270
+ * @param firestoreContext - Firestore context to bind the collection to.
271
+ * @returns A typed Firestore collection for NotificationSummary documents.
272
272
  */
273
273
  export declare function notificationSummaryFirestoreCollection(firestoreContext: FirestoreContext): NotificationSummaryFirestoreCollection;
274
274
  /**
@@ -361,8 +361,8 @@ export declare const notificationBoxConverter: import("../..").SnapshotConverter
361
361
  /**
362
362
  * Creates a Firestore collection reference for {@link NotificationBox} documents.
363
363
  *
364
- * @param context - Firestore context to create the collection reference from
365
- * @returns a typed collection reference for NotificationBox documents
364
+ * @param context - Firestore context to create the collection reference from.
365
+ * @returns A typed collection reference for NotificationBox documents.
366
366
  */
367
367
  export declare function notificationBoxCollectionReference(context: FirestoreContext): CollectionReference<NotificationBox>;
368
368
  /**
@@ -372,8 +372,8 @@ export type NotificationBoxFirestoreCollection = FirestoreCollection<Notificatio
372
372
  /**
373
373
  * Creates a typed {@link NotificationBoxFirestoreCollection} bound to the given Firestore context.
374
374
  *
375
- * @param firestoreContext - Firestore context to bind the collection to
376
- * @returns a typed Firestore collection for NotificationBox documents
375
+ * @param firestoreContext - Firestore context to bind the collection to.
376
+ * @returns A typed Firestore collection for NotificationBox documents.
377
377
  */
378
378
  export declare function notificationBoxFirestoreCollection(firestoreContext: FirestoreContext): NotificationBoxFirestoreCollection;
379
379
  /**
@@ -679,8 +679,9 @@ export declare const notificationConverter: import("../..").SnapshotConverterFun
679
679
  /**
680
680
  * Creates a factory that produces {@link Notification} subcollection references for a given {@link NotificationBoxDocument} parent.
681
681
  *
682
- * @param context - Firestore context to create subcollection references from
683
- * @returns a factory function that creates collection references for a given NotificationBox parent
682
+ * @param context - Firestore context to create subcollection references from.
683
+ * @returns A factory function that creates collection references for a given NotificationBox parent.
684
+ *
684
685
  * @__NO_SIDE_EFFECTS__
685
686
  */
686
687
  export declare function notificationCollectionReferenceFactory(context: FirestoreContext): (notificationBox: NotificationBoxDocument) => CollectionReference<Notification>;
@@ -695,16 +696,17 @@ export type NotificationFirestoreCollectionFactory = (parent: NotificationBoxDoc
695
696
  /**
696
697
  * Creates a {@link NotificationFirestoreCollectionFactory} bound to the given Firestore context.
697
698
  *
698
- * @param firestoreContext - Firestore context to bind the collection factory to
699
- * @returns a factory that creates typed Firestore subcollections for Notification documents
699
+ * @param firestoreContext - Firestore context to bind the collection factory to.
700
+ * @returns A factory that creates typed Firestore subcollections for Notification documents.
701
+ *
700
702
  * @__NO_SIDE_EFFECTS__
701
703
  */
702
704
  export declare function notificationFirestoreCollectionFactory(firestoreContext: FirestoreContext): NotificationFirestoreCollectionFactory;
703
705
  /**
704
706
  * Creates a collection group reference for querying all {@link Notification} documents across all {@link NotificationBox} parents.
705
707
  *
706
- * @param context - Firestore context to create the collection group reference from
707
- * @returns a typed collection group for querying Notification documents across all parents
708
+ * @param context - Firestore context to create the collection group reference from.
709
+ * @returns A typed collection group for querying Notification documents across all parents.
708
710
  */
709
711
  export declare function notificationCollectionReference(context: FirestoreContext): CollectionGroup<Notification>;
710
712
  /**
@@ -714,8 +716,8 @@ export type NotificationFirestoreCollectionGroup = FirestoreCollectionGroup<Noti
714
716
  /**
715
717
  * Creates a typed {@link NotificationFirestoreCollectionGroup} bound to the given Firestore context.
716
718
  *
717
- * @param firestoreContext - Firestore context to bind the collection group to
718
- * @returns a typed Firestore collection group for querying Notification documents across all parents
719
+ * @param firestoreContext - Firestore context to bind the collection group to.
720
+ * @returns A typed Firestore collection group for querying Notification documents across all parents.
719
721
  */
720
722
  export declare function notificationFirestoreCollectionGroup(firestoreContext: FirestoreContext): NotificationFirestoreCollectionGroup;
721
723
  /**
@@ -761,8 +763,9 @@ export declare const notificationWeekConverter: import("../..").SnapshotConverte
761
763
  /**
762
764
  * Creates a factory that produces {@link NotificationWeek} subcollection references for a given {@link NotificationBoxDocument} parent.
763
765
  *
764
- * @param context - Firestore context to create subcollection references from
765
- * @returns a factory function that creates collection references for a given NotificationBox parent
766
+ * @param context - Firestore context to create subcollection references from.
767
+ * @returns A factory function that creates collection references for a given NotificationBox parent.
768
+ *
766
769
  * @__NO_SIDE_EFFECTS__
767
770
  */
768
771
  export declare function notificationWeekCollectionReferenceFactory(context: FirestoreContext): (notificationBox: NotificationBoxDocument) => CollectionReference<NotificationWeek>;
@@ -777,16 +780,17 @@ export type NotificationWeekFirestoreCollectionFactory = (parent: NotificationBo
777
780
  /**
778
781
  * Creates a {@link NotificationWeekFirestoreCollectionFactory} bound to the given Firestore context.
779
782
  *
780
- * @param firestoreContext - Firestore context to bind the collection factory to
781
- * @returns a factory that creates typed Firestore subcollections for NotificationWeek documents
783
+ * @param firestoreContext - Firestore context to bind the collection factory to.
784
+ * @returns A factory that creates typed Firestore subcollections for NotificationWeek documents.
785
+ *
782
786
  * @__NO_SIDE_EFFECTS__
783
787
  */
784
788
  export declare function notificationWeekFirestoreCollectionFactory(firestoreContext: FirestoreContext): NotificationWeekFirestoreCollectionFactory;
785
789
  /**
786
790
  * Creates a collection group reference for querying all {@link NotificationWeek} documents across all {@link NotificationBox} parents.
787
791
  *
788
- * @param context - Firestore context to create the collection group reference from
789
- * @returns a typed collection group for querying NotificationWeek documents across all parents
792
+ * @param context - Firestore context to create the collection group reference from.
793
+ * @returns A typed collection group for querying NotificationWeek documents across all parents.
790
794
  */
791
795
  export declare function notificationWeekCollectionReference(context: FirestoreContext): CollectionGroup<NotificationWeek>;
792
796
  /**
@@ -796,8 +800,8 @@ export type NotificationWeekFirestoreCollectionGroup = FirestoreCollectionGroup<
796
800
  /**
797
801
  * Creates a typed {@link NotificationWeekFirestoreCollectionGroup} bound to the given Firestore context.
798
802
  *
799
- * @param firestoreContext - Firestore context to bind the collection group to
800
- * @returns a typed Firestore collection group for querying NotificationWeek documents across all parents
803
+ * @param firestoreContext - Firestore context to bind the collection group to.
804
+ * @returns A typed Firestore collection group for querying NotificationWeek documents across all parents.
801
805
  */
802
806
  export declare function notificationWeekFirestoreCollectionGroup(firestoreContext: FirestoreContext): NotificationWeekFirestoreCollectionGroup;
803
807
  /**
@@ -821,7 +825,7 @@ export declare const notificationLoggedEventDayPageIdentity: import("../..").Fir
821
825
  * day pages. Wraps the existing {@link firestoreNotificationItem} sub-object converter so individual
822
826
  * items round-trip through the same field rules used everywhere else NotificationItems are persisted.
823
827
  */
824
- export declare const notificationLoggedEventDayItemConverter: PagedItemConverter<NotificationItem>;
828
+ export declare const NOTIFICATION_LOGGED_EVENT_DAY_ITEM_CONVERTER: PagedItemConverter<NotificationItem>;
825
829
  /**
826
830
  * Day-keyed wrapper document for a single day's worth of archived logged-event notifications under a
827
831
  * {@link NotificationBox}.
@@ -853,8 +857,9 @@ export declare const notificationLoggedEventDayConverter: import("../..").Snapsh
853
857
  /**
854
858
  * Creates a factory that produces {@link NotificationLoggedEventDay} subcollection references for a given {@link NotificationBoxDocument} parent.
855
859
  *
856
- * @param context - Firestore context to create subcollection references from
857
- * @returns a factory function that creates collection references for a given NotificationBox parent
860
+ * @param context - Firestore context to create subcollection references from.
861
+ * @returns A factory function that creates collection references for a given NotificationBox parent.
862
+ *
858
863
  * @__NO_SIDE_EFFECTS__
859
864
  */
860
865
  export declare function notificationLoggedEventDayCollectionReferenceFactory(context: FirestoreContext): (notificationBox: NotificationBoxDocument) => CollectionReference<NotificationLoggedEventDay>;
@@ -869,16 +874,17 @@ export type NotificationLoggedEventDayFirestoreCollectionFactory = (parent: Noti
869
874
  /**
870
875
  * Creates a {@link NotificationLoggedEventDayFirestoreCollectionFactory} bound to the given Firestore context.
871
876
  *
872
- * @param firestoreContext - Firestore context to bind the collection factory to
873
- * @returns a factory that creates typed Firestore subcollections for NotificationLoggedEventDay wrapper documents
877
+ * @param firestoreContext - Firestore context to bind the collection factory to.
878
+ * @returns A factory that creates typed Firestore subcollections for NotificationLoggedEventDay wrapper documents.
879
+ *
874
880
  * @__NO_SIDE_EFFECTS__
875
881
  */
876
882
  export declare function notificationLoggedEventDayFirestoreCollectionFactory(firestoreContext: FirestoreContext): NotificationLoggedEventDayFirestoreCollectionFactory;
877
883
  /**
878
884
  * Creates a collection group reference for querying all {@link NotificationLoggedEventDay} documents across all {@link NotificationBox} parents.
879
885
  *
880
- * @param context - Firestore context to create the collection group reference from
881
- * @returns a typed collection group for querying NotificationLoggedEventDay documents across all parents
886
+ * @param context - Firestore context to create the collection group reference from.
887
+ * @returns A typed collection group for querying NotificationLoggedEventDay documents across all parents.
882
888
  */
883
889
  export declare function notificationLoggedEventDayCollectionReference(context: FirestoreContext): CollectionGroup<NotificationLoggedEventDay>;
884
890
  /**
@@ -888,8 +894,8 @@ export type NotificationLoggedEventDayFirestoreCollectionGroup = FirestoreCollec
888
894
  /**
889
895
  * Creates a typed {@link NotificationLoggedEventDayFirestoreCollectionGroup} bound to the given Firestore context.
890
896
  *
891
- * @param firestoreContext - Firestore context to bind the collection group to
892
- * @returns a typed Firestore collection group for querying NotificationLoggedEventDay documents across all parents
897
+ * @param firestoreContext - Firestore context to bind the collection group to.
898
+ * @returns A typed Firestore collection group for querying NotificationLoggedEventDay documents across all parents.
893
899
  */
894
900
  export declare function notificationLoggedEventDayFirestoreCollectionGroup(firestoreContext: FirestoreContext): NotificationLoggedEventDayFirestoreCollectionGroup;
895
901
  /**
@@ -909,8 +915,9 @@ export declare class NotificationLoggedEventDayPageDocument extends AbstractFire
909
915
  /**
910
916
  * Creates a factory that produces page subcollection references for a given {@link NotificationLoggedEventDayDocument} parent.
911
917
  *
912
- * @param context - Firestore context to create subcollection references from
913
- * @returns a factory function that creates collection references for a given NotificationLoggedEventDayDocument parent
918
+ * @param context - Firestore context to create subcollection references from.
919
+ * @returns A factory function that creates collection references for a given NotificationLoggedEventDayDocument parent.
920
+ *
914
921
  * @__NO_SIDE_EFFECTS__
915
922
  */
916
923
  export declare function notificationLoggedEventDayPagedItemsCollectionReferenceFactory(context: FirestoreContext): (day: NotificationLoggedEventDayDocument) => CollectionReference<NotificationLoggedEventDayPageDocumentData>;
@@ -933,16 +940,17 @@ export type NotificationLoggedEventDayPagedItemsFirestoreCollectionFactory = (pa
933
940
  * Uses the framework's default count-based dynamic page distribution; consumers do not need to provide
934
941
  * a {@link PagedItemDistributionScheme}. The per-item converter delegates to {@link firestoreNotificationItem}.
935
942
  *
936
- * @param firestoreContext - Firestore context to bind the collection factory to
937
- * @returns a factory that creates paged Firestore subcollections of NotificationItem for a given day
943
+ * @param firestoreContext - Firestore context to bind the collection factory to.
944
+ * @returns A factory that creates paged Firestore subcollections of NotificationItem for a given day.
945
+ *
938
946
  * @__NO_SIDE_EFFECTS__
939
947
  */
940
948
  export declare function notificationLoggedEventDayPagedItemsCollectionFactory(firestoreContext: FirestoreContext): NotificationLoggedEventDayPagedItemsFirestoreCollectionFactory;
941
949
  /**
942
950
  * Creates a collection group reference for querying all logged-event page documents across every {@link NotificationLoggedEventDay} parent.
943
951
  *
944
- * @param context - Firestore context to create the collection group reference from
945
- * @returns a typed collection group for querying logged-event page documents
952
+ * @param context - Firestore context to create the collection group reference from.
953
+ * @returns A typed collection group for querying logged-event page documents.
946
954
  */
947
955
  export declare function notificationLoggedEventDayPageCollectionReference(context: FirestoreContext): CollectionGroup<NotificationLoggedEventDayPageDocumentData>;
948
956
  /**
@@ -954,7 +962,7 @@ export type NotificationLoggedEventDayPageFirestoreCollectionGroup = FirestoreCo
954
962
  /**
955
963
  * Creates a typed {@link NotificationLoggedEventDayPageFirestoreCollectionGroup} bound to the given Firestore context.
956
964
  *
957
- * @param firestoreContext - Firestore context to bind the collection group to
958
- * @returns a typed Firestore collection group for querying logged-event page documents across all parents
965
+ * @param firestoreContext - Firestore context to bind the collection group to.
966
+ * @returns A typed Firestore collection group for querying logged-event page documents across all parents.
959
967
  */
960
968
  export declare function notificationLoggedEventDayPageFirestoreCollectionGroup(firestoreContext: FirestoreContext): NotificationLoggedEventDayPageFirestoreCollectionGroup;
@@ -99,8 +99,8 @@ export type NotificationTemplateTypeInfoRecord = Record<NotificationTemplateType
99
99
  /**
100
100
  * Creates a {@link NotificationTemplateTypeInfoRecord} from an array of template type info entries.
101
101
  *
102
- * @param infoArray - array of template type info entries to index
103
- * @returns a record keyed by template type
102
+ * @param infoArray - Array of template type info entries to index.
103
+ * @returns A record keyed by template type.
104
104
  * @throws {Error} When duplicate template types are found in the input array.
105
105
  *
106
106
  * @example
@@ -187,8 +187,8 @@ export declare abstract class AppNotificationTemplateTypeInfoRecordService {
187
187
  * Builds internal indexes for fast lookup by notification model identity and target model identity.
188
188
  * Handles alternative model identities defined in {@link NotificationTemplateTypeInfoIdentityInfoAlternativeModelIdentityPair}.
189
189
  *
190
- * @param appNotificationTemplateTypeInfoRecord - the complete template type registry for the application
191
- * @returns a fully initialized service with indexed lookups for fast template type discovery
190
+ * @param appNotificationTemplateTypeInfoRecord - The complete template type registry for the application.
191
+ * @returns A fully initialized service with indexed lookups for fast template type discovery.
192
192
  *
193
193
  * @example
194
194
  * ```ts
@@ -197,6 +197,7 @@ export declare abstract class AppNotificationTemplateTypeInfoRecordService {
197
197
  * );
198
198
  * const types = service.getTemplateTypesForNotificationModel('project/abc123');
199
199
  * ```
200
+ *
200
201
  * @__NO_SIDE_EFFECTS__
201
202
  */
202
203
  export declare function appNotificationTemplateTypeInfoRecordService(appNotificationTemplateTypeInfoRecord: NotificationTemplateTypeInfoRecord): AppNotificationTemplateTypeInfoRecordService;