@dereekb/firebase 13.4.0 → 13.4.2

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 (72) hide show
  1. package/index.cjs.js +895 -382
  2. package/index.esm.js +893 -383
  3. package/package.json +5 -5
  4. package/src/lib/client/error/error.d.ts +1 -1
  5. package/src/lib/client/firestore/driver.accessor.batch.d.ts +2 -0
  6. package/src/lib/client/firestore/driver.accessor.create.d.ts +1 -0
  7. package/src/lib/client/firestore/driver.accessor.d.ts +2 -0
  8. package/src/lib/client/firestore/driver.accessor.default.d.ts +4 -0
  9. package/src/lib/client/firestore/driver.accessor.transaction.d.ts +2 -0
  10. package/src/lib/client/firestore/driver.d.ts +2 -0
  11. package/src/lib/client/firestore/driver.query.d.ts +5 -0
  12. package/src/lib/client/function/development.function.factory.d.ts +1 -0
  13. package/src/lib/client/function/error.d.ts +1 -0
  14. package/src/lib/client/function/function.callable.d.ts +9 -2
  15. package/src/lib/client/function/function.factory.d.ts +2 -0
  16. package/src/lib/client/function/model.function.factory.d.ts +11 -4
  17. package/src/lib/client/storage/driver.accessor.d.ts +7 -0
  18. package/src/lib/client/storage/driver.d.ts +2 -0
  19. package/src/lib/common/auth/auth.error.d.ts +25 -4
  20. package/src/lib/common/development/function.d.ts +1 -0
  21. package/src/lib/common/development/function.schedule.d.ts +3 -1
  22. package/src/lib/common/firestore/accessor/accessor.wrap.modify.d.ts +9 -0
  23. package/src/lib/common/firestore/accessor/context.d.ts +9 -3
  24. package/src/lib/common/firestore/accessor/document.d.ts +49 -7
  25. package/src/lib/common/firestore/accessor/document.utility.d.ts +18 -6
  26. package/src/lib/common/firestore/collection/collection.d.ts +76 -11
  27. package/src/lib/common/firestore/driver/query.handler.d.ts +9 -3
  28. package/src/lib/common/firestore/snapshot/snapshot.field.d.ts +32 -1
  29. package/src/lib/common/model/function.d.ts +8 -3
  30. package/src/lib/common/model/model/model.loader.d.ts +1 -0
  31. package/src/lib/common/model/model.service.d.ts +9 -2
  32. package/src/lib/common/model/permission/permission.d.ts +12 -4
  33. package/src/lib/common/model/permission/permission.service.d.ts +1 -0
  34. package/src/lib/common/model/permission/permission.service.grant.d.ts +10 -0
  35. package/src/lib/common/model/permission/permission.service.role.d.ts +9 -7
  36. package/src/lib/common/storage/accessor/path.model.d.ts +1 -0
  37. package/src/lib/common/storage/context.d.ts +1 -0
  38. package/src/lib/common/storage/driver/accessor.iterate.d.ts +7 -0
  39. package/src/lib/common/storage/driver/accessor.util.d.ts +1 -0
  40. package/src/lib/common/storage/driver/error.d.ts +3 -0
  41. package/src/lib/common/storage/driver/list.d.ts +18 -3
  42. package/src/lib/common/storage/storage.d.ts +4 -0
  43. package/src/lib/common/storage/types.d.ts +3 -0
  44. package/src/lib/model/notification/notification.api.error.d.ts +27 -9
  45. package/src/lib/model/notification/notification.api.util.d.ts +12 -0
  46. package/src/lib/model/notification/notification.config.d.ts +28 -0
  47. package/src/lib/model/notification/notification.create.d.ts +24 -0
  48. package/src/lib/model/notification/notification.create.task.d.ts +2 -0
  49. package/src/lib/model/notification/notification.d.ts +42 -0
  50. package/src/lib/model/notification/notification.details.d.ts +3 -0
  51. package/src/lib/model/notification/notification.id.d.ts +4 -3
  52. package/src/lib/model/notification/notification.item.d.ts +2 -1
  53. package/src/lib/model/notification/notification.message.d.ts +6 -3
  54. package/src/lib/model/notification/notification.query.d.ts +12 -0
  55. package/src/lib/model/notification/notification.send.d.ts +4 -0
  56. package/src/lib/model/notification/notification.task.d.ts +7 -0
  57. package/src/lib/model/notification/notification.task.subtask.d.ts +5 -0
  58. package/src/lib/model/notification/notification.util.d.ts +38 -0
  59. package/src/lib/model/oidcmodel/oidcmodel.d.ts +6 -0
  60. package/src/lib/model/oidcmodel/oidcmodel.query.d.ts +18 -0
  61. package/src/lib/model/storagefile/storagefile.create.d.ts +4 -0
  62. package/src/lib/model/storagefile/storagefile.d.ts +16 -0
  63. package/src/lib/model/storagefile/storagefile.file.d.ts +2 -0
  64. package/src/lib/model/storagefile/storagefile.group.d.ts +4 -0
  65. package/src/lib/model/storagefile/storagefile.permission.d.ts +1 -0
  66. package/src/lib/model/storagefile/storagefile.query.d.ts +19 -0
  67. package/src/lib/model/storagefile/storagefile.task.d.ts +1 -0
  68. package/src/lib/model/storagefile/storagefile.upload.d.ts +6 -0
  69. package/src/lib/model/storagefile/storagefile.upload.determiner.d.ts +9 -0
  70. package/src/lib/model/storagefile/storagefile.util.d.ts +4 -0
  71. package/src/lib/model/system/system.d.ts +4 -0
  72. package/test/package.json +6 -6
package/index.esm.js CHANGED
@@ -439,13 +439,15 @@ function _is_native_reflect_construct$9() {
439
439
  */ function copyDocumentIdToFieldModifierFunction(fieldName) {
440
440
  return function(param) {
441
441
  var data = param.data, documentRef = param.documentRef;
442
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
443
442
  data[fieldName] = documentRef.id; // copy the id to the target field
444
443
  };
445
444
  }
446
445
  /**
447
446
  * Creates an {@link InterceptAccessorFactoryFunction} that wraps all created accessors with
448
447
  * {@link ModifyBeforeSetFirestoreDocumentDataAccessorWrapper} using the provided config.
448
+ *
449
+ * @param config - The ModifyBeforeSetConfig defining when and how to modify documents
450
+ * @returns An InterceptAccessorFactoryFunction that wraps accessors with the modify-before-set behavior
449
451
  */ function modifyBeforeSetInterceptAccessorFactoryFunction(config) {
450
452
  return interceptAccessorFactoryFunction(function(accessor) {
451
453
  return new ModifyBeforeSetFirestoreDocumentDataAccessorWrapper(accessor, config);
@@ -454,12 +456,16 @@ function _is_native_reflect_construct$9() {
454
456
  // MARK: Templates
455
457
  /**
456
458
  * Creates a modifier that copies the document ID to the `uid` field for {@link UserRelated} models.
459
+ *
460
+ * @returns A ModifyBeforeSetModifierFunction that sets the `uid` field to the document's ID
457
461
  */ function copyDocumentIdForUserRelatedModifierFunction() {
458
462
  return copyDocumentIdToFieldModifierFunction('uid');
459
463
  }
460
464
  /**
461
465
  * Returns a pre-configured {@link ModifyBeforeSetConfig} for {@link UserRelated} models
462
466
  * that copies the document ID to the `uid` field on set operations (new document creation).
467
+ *
468
+ * @returns A ModifyBeforeSetConfig configured to copy the document ID to the `uid` field on set
463
469
  */ function copyUserRelatedDataModifierConfig() {
464
470
  return {
465
471
  when: 'set',
@@ -474,6 +480,8 @@ function _is_native_reflect_construct$9() {
474
480
  /**
475
481
  * Returns a typed {@link InterceptAccessorFactoryFunction} that applies the UserRelated
476
482
  * document ID copy modifier to all accessors created by the factory.
483
+ *
484
+ * @returns A typed InterceptAccessorFactoryFunction with the UserRelated document ID copy modifier applied
477
485
  */ function copyUserRelatedDataAccessorFactoryFunction() {
478
486
  return COPY_USER_RELATED_DATA_ACCESSOR_FACTORY_FUNCTION();
479
487
  }
@@ -711,9 +719,15 @@ function _ts_generator$k(thisArg, body) {
711
719
  * - BATCH: Operations within a Firestore write batch (atomic writes only, no reads)
712
720
  */ var FirestoreDocumentContextType;
713
721
  (function(FirestoreDocumentContextType) {
714
- /** Standard context with no special transactional semantics */ FirestoreDocumentContextType["NONE"] = "none";
715
- /** Operations within a Firestore transaction (atomic reads and writes) */ FirestoreDocumentContextType["TRANSACTION"] = "transaction";
716
- /** Operations within a Firestore write batch (atomic writes only) */ FirestoreDocumentContextType["BATCH"] = "batch";
722
+ /**
723
+ * Standard context with no special transactional semantics
724
+ */ FirestoreDocumentContextType["NONE"] = "none";
725
+ /**
726
+ * Operations within a Firestore transaction (atomic reads and writes)
727
+ */ FirestoreDocumentContextType["TRANSACTION"] = "transaction";
728
+ /**
729
+ * Operations within a Firestore write batch (atomic writes only)
730
+ */ FirestoreDocumentContextType["BATCH"] = "batch";
717
731
  })(FirestoreDocumentContextType || (FirestoreDocumentContextType = {}));
718
732
 
719
733
  function asyncGeneratorStep$j(gen, resolve, reject, _next, _throw, key, arg) {
@@ -1210,7 +1224,8 @@ function _is_native_reflect_construct$8() {
1210
1224
  /**
1211
1225
  * Retrieves a DocumentSnapshot of the document as an Observable. Streams based on the input mode.
1212
1226
  *
1213
- * @returns
1227
+ * @param mode - The stream mode controlling how the Observable emits snapshot updates
1228
+ * @returns An Observable that emits DocumentSnapshot values based on the given mode
1214
1229
  */ key: "snapshotStream",
1215
1230
  value: function snapshotStream(mode) {
1216
1231
  return snapshotStreamForAccessor(this.accessor, mode);
@@ -1220,8 +1235,9 @@ function _is_native_reflect_construct$8() {
1220
1235
  /**
1221
1236
  * Retrieves the data of the DocumentSnapshot of the document as an Observable. Streams based on the input mode.
1222
1237
  *
1223
- * @param options
1224
- * @returns
1238
+ * @param mode - The stream mode controlling how the Observable emits snapshot data updates
1239
+ * @param options - Optional SnapshotOptions for reading the document data
1240
+ * @returns An Observable that emits the document data or undefined based on the given mode
1225
1241
  */ key: "snapshotDataStream",
1226
1242
  value: function snapshotDataStream(mode, options) {
1227
1243
  return snapshotStreamDataForAccessor(this.accessor, mode, options);
@@ -1230,6 +1246,7 @@ function _is_native_reflect_construct$8() {
1230
1246
  {
1231
1247
  /**
1232
1248
  * Retrieves a DocumentSnapshot of the document.
1249
+ *
1233
1250
  * @returns
1234
1251
  */ key: "snapshot",
1235
1252
  value: function snapshot() {
@@ -1239,6 +1256,7 @@ function _is_native_reflect_construct$8() {
1239
1256
  {
1240
1257
  /**
1241
1258
  * Retrieves the data of the DocumentSnapshot of the document.
1259
+ *
1242
1260
  * @param options
1243
1261
  * @returns
1244
1262
  */ key: "snapshotData",
@@ -1278,8 +1296,9 @@ function _is_native_reflect_construct$8() {
1278
1296
  *
1279
1297
  * Throws an exception when it does not exist.
1280
1298
  *
1281
- * @param data
1282
- * @returns
1299
+ * @param data - Partial document data to update
1300
+ * @param params - Optional update parameters
1301
+ * @returns A Promise that resolves when the update completes
1283
1302
  */ key: "update",
1284
1303
  value: function update(data, params) {
1285
1304
  return updateWithAccessorUpdateAndConverterFunction(this.accessor, this.converter)(data, params);
@@ -1289,7 +1308,8 @@ function _is_native_reflect_construct$8() {
1289
1308
  /**
1290
1309
  * Updates the document using the accessor's increment functionality.
1291
1310
  *
1292
- * @param data
1311
+ * @param data - The increment update to apply to numeric fields
1312
+ * @returns A Promise that resolves when the increment update completes
1293
1313
  */ key: "increment",
1294
1314
  value: function increment(data) {
1295
1315
  return incrementUpdateWithAccessorFunction(this.accessor)(data);
@@ -1299,7 +1319,8 @@ function _is_native_reflect_construct$8() {
1299
1319
  /**
1300
1320
  * Updates the document using the accessor's array field update functionality.
1301
1321
  *
1302
- * @param data
1322
+ * @param data - The array field update to apply (union or remove elements)
1323
+ * @returns A Promise that resolves when the array update completes
1303
1324
  */ key: "arrayUpdate",
1304
1325
  value: function arrayUpdate(data) {
1305
1326
  return arrayUpdateWithAccessorFunction(this.accessor)(data);
@@ -1308,7 +1329,12 @@ function _is_native_reflect_construct$8() {
1308
1329
  ]);
1309
1330
  return AbstractFirestoreDocument;
1310
1331
  }();
1311
- function limitedFirestoreDocumentAccessorFactory(config) {
1332
+ /**
1333
+ * Creates a {@link LimitedFirestoreDocumentAccessorFactoryFunction} from the provided configuration.
1334
+ *
1335
+ * @param config - Configuration including converter, accessor factory, and document factory
1336
+ * @returns A factory function for creating LimitedFirestoreDocumentAccessor instances
1337
+ */ function limitedFirestoreDocumentAccessorFactory(config) {
1312
1338
  var firestoreContext = config.firestoreContext, firestoreAccessorDriver = config.firestoreAccessorDriver, makeDocument = config.makeDocument, interceptAccessorFactory = config.accessorFactory, inputDefaultConverter = config.converter, inputConverterFactory = config.converterFactory, modelIdentity = config.modelIdentity;
1313
1339
  var expectedCollectionName = firestoreAccessorDriver.fuzzedPathForPath ? firestoreAccessorDriver.fuzzedPathForPath(modelIdentity.collectionName) : modelIdentity.collectionName;
1314
1340
  var converterFactory = inputConverterFactory ? function(ref) {
@@ -1319,9 +1345,6 @@ function limitedFirestoreDocumentAccessorFactory(config) {
1319
1345
  };
1320
1346
  var result = function result(context) {
1321
1347
  var loadDocument = function loadDocument(ref) {
1322
- if (!ref) {
1323
- throw new Error('ref must be defined.');
1324
- }
1325
1348
  var converter = converterFactory(ref);
1326
1349
  var accessor = dataAccessorFactory.accessorFor(ref.withConverter(converter));
1327
1350
  return makeDocument(accessor, documentAccessor);
@@ -1359,7 +1382,15 @@ function limitedFirestoreDocumentAccessorFactory(config) {
1359
1382
  result.converterFactory = converterFactory;
1360
1383
  return result;
1361
1384
  }
1362
- function firestoreDocumentAccessorFactory(config) {
1385
+ /**
1386
+ * Creates a {@link FirestoreDocumentAccessorFactoryFunction} from the provided configuration.
1387
+ *
1388
+ * Extends the limited accessor factory with collection-level operations such as creating new documents
1389
+ * and loading documents by ID.
1390
+ *
1391
+ * @param config - Configuration including the collection reference and document factory
1392
+ * @returns A factory function for creating FirestoreDocumentAccessor instances
1393
+ */ function firestoreDocumentAccessorFactory(config) {
1363
1394
  var firestoreAccessorDriver = config.firestoreAccessorDriver, collection = config.collection;
1364
1395
  var limitedFirestoreDocumentAccessor = limitedFirestoreDocumentAccessorFactory(config);
1365
1396
  function documentRefForId(path) {
@@ -1423,7 +1454,12 @@ var AbstractFirestoreDocumentWithParent = /*#__PURE__*/ function(AbstractFiresto
1423
1454
  ]);
1424
1455
  return AbstractFirestoreDocumentWithParent;
1425
1456
  }(AbstractFirestoreDocument);
1426
- function firestoreSingleDocumentAccessor(config) {
1457
+ /**
1458
+ * Creates a {@link FirestoreSingleDocumentAccessor} for a collection that contains a single known document.
1459
+ *
1460
+ * @param config - Configuration specifying the single item identifier and the document accessor context extension
1461
+ * @returns A FirestoreSingleDocumentAccessor providing convenient access to the single document
1462
+ */ function firestoreSingleDocumentAccessor(config) {
1427
1463
  var singleItemIdentifier = config.singleItemIdentifier, accessors = config.accessors;
1428
1464
  var defaultAccessor = accessors.documentAccessor();
1429
1465
  return {
@@ -1445,10 +1481,15 @@ function firestoreSingleDocumentAccessor(config) {
1445
1481
  /**
1446
1482
  * Default document ID used for single-document collections. The document is stored at path `<collection>/0`.
1447
1483
  */ var DEFAULT_SINGLE_ITEM_FIRESTORE_COLLECTION_DOCUMENT_IDENTIFIER = '0';
1448
- function extendFirestoreCollectionWithSingleDocumentAccessor(x, singleItemIdentifier) {
1484
+ /**
1485
+ * Extends a Firestore collection object in-place with single-document accessor methods.
1486
+ *
1487
+ * @param x - The collection object to extend with single-document accessor methods
1488
+ * @param singleItemIdentifier - Optional identifier for the single document; defaults to {@link DEFAULT_SINGLE_ITEM_FIRESTORE_COLLECTION_DOCUMENT_IDENTIFIER}
1489
+ */ function extendFirestoreCollectionWithSingleDocumentAccessor(x, singleItemIdentifier) {
1449
1490
  var singleAccessor = firestoreSingleDocumentAccessor({
1450
1491
  accessors: x,
1451
- singleItemIdentifier: singleItemIdentifier || DEFAULT_SINGLE_ITEM_FIRESTORE_COLLECTION_DOCUMENT_IDENTIFIER
1492
+ singleItemIdentifier: singleItemIdentifier !== null && singleItemIdentifier !== void 0 ? singleItemIdentifier : DEFAULT_SINGLE_ITEM_FIRESTORE_COLLECTION_DOCUMENT_IDENTIFIER
1452
1493
  });
1453
1494
  x.singleItemIdentifier = singleAccessor.singleItemIdentifier;
1454
1495
  x.documentRef = singleAccessor.documentRef;
@@ -1927,8 +1968,7 @@ function getDataFromDocumentSnapshots(snapshots) {
1927
1968
  */ var firestoreQueryDocumentSnapshotPairsLoader = firestoreDocumentSnapshotPairsLoader;
1928
1969
  function documentData(snapshot) {
1929
1970
  var withId = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
1930
- var result = withId ? documentDataWithIdAndKey(snapshot) : snapshot.data();
1931
- return result;
1971
+ return withId ? documentDataWithIdAndKey(snapshot) : snapshot.data();
1932
1972
  }
1933
1973
  function documentDataFunction(withId) {
1934
1974
  return withId ? documentDataWithIdAndKey : function(snapshot) {
@@ -2445,12 +2485,20 @@ function _object_spread_props$j(target, source) {
2445
2485
  /**
2446
2486
  * Implementation of FirestoreDataConverter.fromFirestore
2447
2487
  * Converts Firestore data to the application model type
2488
+ *
2489
+ * @param snapshot - The DocumentSnapshot containing raw Firestore data
2490
+ * @param options - Optional SnapshotOptions for reading data
2491
+ * @returns The converted application model instance
2448
2492
  */ fromFirestore: function fromFirestore(snapshot, options) {
2449
2493
  return from(snapshot, undefined);
2450
2494
  },
2451
2495
  /**
2452
2496
  * Implementation of FirestoreDataConverter.toFirestore
2453
2497
  * Converts the application model to Firestore data format
2498
+ *
2499
+ * @param modelObject - The model object to convert to Firestore data
2500
+ * @param options - Optional SetOptions controlling how data is written
2501
+ * @returns The converted Firestore data object
2454
2502
  */ toFirestore: function toFirestore(modelObject, options) {
2455
2503
  return to(modelObject, undefined, options);
2456
2504
  }
@@ -2576,7 +2624,7 @@ function _object_spread_props$i(target, source) {
2576
2624
  function optionalFirestoreField(config) {
2577
2625
  // NOTE: Typings for this function internally is weird due to the support for both the one and two type transforms.
2578
2626
  if (config) {
2579
- var inputConfig = config !== null && config !== void 0 ? config : {};
2627
+ var inputConfig = config;
2580
2628
  var dontStoreDefaultReadValue = inputConfig.dontStoreDefaultReadValue, inputDontStoreValueIf = inputConfig.dontStoreValueIf, inputTransformData = inputConfig.transformData; // might be defined.
2581
2629
  var inputDefaultReadValue = inputConfig.defaultReadValue, inputDontStoreIf = inputConfig.dontStoreIf, transformFromData = inputConfig.transformFromData, transformToData = inputConfig.transformToData;
2582
2630
  var transformData = inputTransformData !== null && inputTransformData !== void 0 ? inputTransformData : passThrough;
@@ -2624,8 +2672,7 @@ function optionalFirestoreField(config) {
2624
2672
  toData = function toData(x) {
2625
2673
  if (x != null) {
2626
2674
  var transformedValue = transformTo(x);
2627
- var finalValue = transformedValue != null && !dontStoreValue(transformedValue) ? transformedValue : null;
2628
- return finalValue;
2675
+ return transformedValue != null && !dontStoreValue(transformedValue) ? transformedValue : null;
2629
2676
  } else {
2630
2677
  return x;
2631
2678
  }
@@ -2957,8 +3004,7 @@ function optionalFirestoreField(config) {
2957
3004
  }
2958
3005
  var inputFilterUnique = (config === null || config === void 0 ? void 0 : config.filterUnique) === true ? unique : config === null || config === void 0 ? void 0 : config.filterUnique;
2959
3006
  var filterUniqueValuesFn = inputFilterUnique != null ? function(x) {
2960
- var result = inputFilterUnique(x);
2961
- return result;
3007
+ return inputFilterUnique(x);
2962
3008
  } : undefined;
2963
3009
  var inputTransformData = config === null || config === void 0 ? void 0 : config.transformData;
2964
3010
  var sortArrayFn = isMapIdentityFunction(sortFn) ? undefined : function(x) {
@@ -3048,7 +3094,8 @@ function optionalFirestoreField(config) {
3048
3094
  * @template S - Number type (defaults to number)
3049
3095
  * @param config - Configuration for the unique number array field
3050
3096
  * @returns A field mapping configuration for unique number array values
3051
- */ function firestoreUniqueNumberArray(config) {
3097
+ */ // eslint-disable-next-line sonarjs/no-identical-functions -- intentionally separate for distinct type constraints (number vs string|number)
3098
+ function firestoreUniqueNumberArray(config) {
3052
3099
  return firestoreUniqueArray(_object_spread_props$i(_object_spread$m({}, config), {
3053
3100
  filterUnique: unique
3054
3101
  }));
@@ -3166,6 +3213,8 @@ function optionalFirestoreField(config) {
3166
3213
  * FirestoreField configuration for a map of granted roles, keyed by model keys.
3167
3214
  *
3168
3215
  * Filters out models with no/null roles by default.
3216
+ *
3217
+ * @returns A field mapping configuration for a map of granted roles keyed by FirestoreModelKey
3169
3218
  */ function firestoreModelKeyGrantedRoleMap() {
3170
3219
  return firestoreMap({
3171
3220
  mapFilter: KeyValueTypleValueFilter.EMPTY
@@ -3200,13 +3249,11 @@ function optionalFirestoreField(config) {
3200
3249
  },
3201
3250
  fromData: function fromData(input) {
3202
3251
  var copy = copyObject(input);
3203
- var result = mapObjectMap(copy, decoder);
3204
- return result;
3252
+ return mapObjectMap(copy, decoder);
3205
3253
  },
3206
3254
  toData: function toData(input) {
3207
3255
  var encodedMap = mapObjectMap(input, encoder);
3208
- var result = filterFinalMapValuesFn(encodedMap);
3209
- return result;
3256
+ return filterFinalMapValuesFn(encodedMap);
3210
3257
  }
3211
3258
  });
3212
3259
  }
@@ -3232,6 +3279,9 @@ function optionalFirestoreField(config) {
3232
3279
  * FirestoreField configuration for a map of encoded granted roles, keyed by model keys.
3233
3280
  *
3234
3281
  * Filters out models with empty/no roles by default.
3282
+ *
3283
+ * @param dencoder - The dencoder function used to encode and decode the role values
3284
+ * @returns A field mapping configuration for an encoded granted role map keyed by FirestoreModelKey
3235
3285
  */ function firestoreModelKeyEncodedGrantedRoleMap(dencoder) {
3236
3286
  return firestoreDencoderMap({
3237
3287
  dencoder: dencoder
@@ -3257,6 +3307,8 @@ function optionalFirestoreField(config) {
3257
3307
  * FirestoreField configuration for a map of granted roles, keyed by models keys.
3258
3308
  *
3259
3309
  * Filters empty roles/arrays by default.
3310
+ *
3311
+ * @returns A field mapping configuration for a map of granted role arrays keyed by FirestoreModelKey
3260
3312
  */ function firestoreModelKeyGrantedRoleArrayMap() {
3261
3313
  return firestoreArrayMap({
3262
3314
  mapFieldValues: filterEmptyArrayValues
@@ -3272,6 +3324,9 @@ function optionalFirestoreField(config) {
3272
3324
  *
3273
3325
  * Used internally by {@link firestoreObjectArray} to adapt field configs into the map functions
3274
3326
  * format needed for array element conversion.
3327
+ *
3328
+ * @param config - The FirestoreModelFieldMapFunctionsConfig to convert
3329
+ * @returns A ModelMapFunctionsRef wrapping the derived map functions
3275
3330
  */ function firestoreFieldConfigToModelMapFunctionsRef(config) {
3276
3331
  var mapFunctions = modelFieldMapFunctions(config);
3277
3332
  return {
@@ -3322,8 +3377,7 @@ function optionalFirestoreField(config) {
3322
3377
  var to = function to(x) {
3323
3378
  // remove null/undefined values from each field when converting to in order to mirror firestore usage (undefined is treated like null)
3324
3379
  var base = baseTo(x);
3325
- var nullishfilteredOut = filterNullAndUndefinedValues(base);
3326
- return nullishfilteredOut;
3380
+ return filterNullAndUndefinedValues(base);
3327
3381
  };
3328
3382
  return firestoreField({
3329
3383
  default: (_config_default = config.default) !== null && _config_default !== void 0 ? _config_default : function() {
@@ -3376,7 +3430,7 @@ function optionalFirestoreField(config) {
3376
3430
  var defaultBeforeSave = (_config_defaultBeforeSave = config.defaultBeforeSave) !== null && _config_defaultBeforeSave !== void 0 ? _config_defaultBeforeSave : config.saveDefaultObject ? function() {
3377
3431
  return toData({});
3378
3432
  } : null;
3379
- var mapFunctionsConfig = build({
3433
+ return build({
3380
3434
  base: firestoreField({
3381
3435
  default: (_config_default = config.default) !== null && _config_default !== void 0 ? _config_default : defaultWithFields,
3382
3436
  defaultBeforeSave: defaultBeforeSave,
@@ -3387,7 +3441,6 @@ function optionalFirestoreField(config) {
3387
3441
  x.mapFunctions = mapFunctions;
3388
3442
  }
3389
3443
  });
3390
- return mapFunctionsConfig;
3391
3444
  }
3392
3445
  /**
3393
3446
  * Creates a field mapping configuration for Firestore latitude/longitude string fields.
@@ -3417,7 +3470,10 @@ function optionalFirestoreField(config) {
3417
3470
  /**
3418
3471
  * Default configuration for a TimezoneString.
3419
3472
  *
3420
- * The value defaults to UTC
3473
+ * The value defaults to UTC.
3474
+ *
3475
+ * @param config - Optional configuration for the timezone string field, including default value and pre-save default.
3476
+ * @returns A configured Firestore field that stores a TimezoneString value.
3421
3477
  */ function firestoreTimezoneString(config) {
3422
3478
  var _ref = config !== null && config !== void 0 ? config : {}, defaultValue = _ref.default, defaultBeforeSave = _ref.defaultBeforeSave;
3423
3479
  return firestoreString({
@@ -3438,8 +3494,7 @@ var assignWebsiteLinkFunction = assignValuesToPOJOFunction({
3438
3494
  valueFilter: KeyValueTypleValueFilter.EMPTY
3439
3495
  });
3440
3496
  var firestoreWebsiteLinkAssignFn = function firestoreWebsiteLinkAssignFn(input) {
3441
- var behavior = assignWebsiteLinkFunction(DEFAULT_WEBSITE_LINK, input);
3442
- return behavior;
3497
+ return assignWebsiteLinkFunction(DEFAULT_WEBSITE_LINK, input);
3443
3498
  };
3444
3499
  /**
3445
3500
  * Creates a field mapping configuration for Firestore website link fields.
@@ -3455,7 +3510,11 @@ var firestoreWebsiteLinkAssignFn = function firestoreWebsiteLinkAssignFn(input)
3455
3510
  });
3456
3511
  }
3457
3512
  // MARK: WebsiteLink Array
3458
- function firestoreWebsiteLinkArray() {
3513
+ /**
3514
+ * Creates a field mapping configuration for Firestore arrays of WebsiteLink values.
3515
+ *
3516
+ * @returns A field mapping configuration for WebsiteLink array values
3517
+ */ function firestoreWebsiteLinkArray() {
3459
3518
  return firestoreObjectArray({
3460
3519
  firestoreField: firestoreWebsiteLink()
3461
3520
  });
@@ -3473,8 +3532,7 @@ var assignWebsiteFileLinkFunction = assignValuesToPOJOFunction({
3473
3532
  valueFilter: KeyValueTypleValueFilter.EMPTY
3474
3533
  });
3475
3534
  var firestoreWebsiteFileLinkAssignFn = function firestoreWebsiteFileLinkAssignFn(input) {
3476
- var behavior = assignWebsiteFileLinkFunction(DEFAULT_FIRESTORE_WEBSITE_FILE_LINK_VALUE, input);
3477
- return behavior;
3535
+ return assignWebsiteFileLinkFunction(DEFAULT_FIRESTORE_WEBSITE_FILE_LINK_VALUE, input);
3478
3536
  };
3479
3537
  /**
3480
3538
  * Creates a field mapping configuration for Firestore website file link fields.
@@ -3492,6 +3550,8 @@ var firestoreWebsiteFileLinkAssignFn = function firestoreWebsiteFileLinkAssignFn
3492
3550
  // MARK: WebsiteFileLink Array
3493
3551
  /**
3494
3552
  * Stores the array of WebsiteFileLink values as an array of objects.
3553
+ *
3554
+ * @returns A field mapping configuration for WebsiteFileLink array values stored as objects
3495
3555
  */ function firestoreWebsiteFileLinkObjectArray() {
3496
3556
  return firestoreObjectArray({
3497
3557
  firestoreField: firestoreWebsiteFileLink()
@@ -3499,6 +3559,8 @@ var firestoreWebsiteFileLinkAssignFn = function firestoreWebsiteFileLinkAssignFn
3499
3559
  }
3500
3560
  /**
3501
3561
  * Stores the array of WebsiteFileLink values as an array of EncodedWebsiteFileLink values.
3562
+ *
3563
+ * @returns A field mapping configuration for WebsiteFileLink array values stored in encoded form
3502
3564
  */ function firestoreWebsiteFileLinkEncodedArray() {
3503
3565
  return firestoreEncodedArray({
3504
3566
  convert: {
@@ -3537,7 +3599,12 @@ var firestoreDateCellRangeAssignFn = function firestoreDateCellRangeAssignFn(inp
3537
3599
  });
3538
3600
  }
3539
3601
  // MARK: DateCellRange Array
3540
- function firestoreDateCellRangeArray() {
3602
+ /**
3603
+ * Creates a field mapping configuration for Firestore arrays of DateCellRange values.
3604
+ *
3605
+ * @param sort - Whether to sort the array by index number; defaults to true
3606
+ * @returns A field mapping configuration for DateCellRange array values
3607
+ */ function firestoreDateCellRangeArray() {
3541
3608
  var sort = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
3542
3609
  return firestoreObjectArray({
3543
3610
  sortWith: sort ? sortAscendingIndexNumberRefFunction() : undefined,
@@ -3557,8 +3624,7 @@ var assignDateCellScheduleFunction = assignValuesToPOJOFunction({
3557
3624
  valueFilter: KeyValueTypleValueFilter.NULL
3558
3625
  });
3559
3626
  var firestoreDateCellScheduleAssignFn = function firestoreDateCellScheduleAssignFn(input) {
3560
- var block = assignDateCellScheduleFunction(DEFAULT_FIRESTORE_DATE_CELL_SCHEDULE_VALUE, input);
3561
- return block;
3627
+ return assignDateCellScheduleFunction(DEFAULT_FIRESTORE_DATE_CELL_SCHEDULE_VALUE, input);
3562
3628
  };
3563
3629
  /**
3564
3630
  * Creates a field mapping configuration for Firestore date cell schedule fields.
@@ -3592,6 +3658,9 @@ var DEFAULT_FIRESTORE_UNITED_STATES_ADDRESS_VALUE = {
3592
3658
  });
3593
3659
  /**
3594
3660
  * Function to assign values from an input UnitedStatesAddress to a default UnitedStatesAddress.
3661
+ *
3662
+ * @param input - The source UnitedStatesAddress to copy values from
3663
+ * @returns A new UnitedStatesAddress with values assigned from the input
3595
3664
  */ var firestoreUnitedStatesAddressAssignFn = function firestoreUnitedStatesAddressAssignFn(input) {
3596
3665
  return assignUnitedStatesAddressFunction(DEFAULT_FIRESTORE_UNITED_STATES_ADDRESS_VALUE, input);
3597
3666
  };
@@ -3729,37 +3798,37 @@ function firebaseQueryItemAccumulator(iteration, mapItem) {
3729
3798
  var mapFn = function mapFn(x) {
3730
3799
  var result = filterMaybeArrayValues(x.map(function(y) {
3731
3800
  var data = snapshotData(y);
3732
- return data ? mapItem(data) : undefined;
3801
+ return mapItem(data);
3733
3802
  }));
3734
3803
  return result;
3735
3804
  };
3736
3805
  return firebaseQuerySnapshotAccumulator(iteration, mapFn);
3737
3806
  }
3738
3807
 
3739
- function _array_like_to_array$f(arr, len) {
3808
+ function _array_like_to_array$g(arr, len) {
3740
3809
  if (len == null || len > arr.length) len = arr.length;
3741
3810
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3742
3811
  return arr2;
3743
3812
  }
3744
- function _array_without_holes$b(arr) {
3745
- if (Array.isArray(arr)) return _array_like_to_array$f(arr);
3813
+ function _array_without_holes$d(arr) {
3814
+ if (Array.isArray(arr)) return _array_like_to_array$g(arr);
3746
3815
  }
3747
- function _iterable_to_array$b(iter) {
3816
+ function _iterable_to_array$d(iter) {
3748
3817
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
3749
3818
  }
3750
- function _non_iterable_spread$b() {
3819
+ function _non_iterable_spread$d() {
3751
3820
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3752
3821
  }
3753
- function _to_consumable_array$b(arr) {
3754
- return _array_without_holes$b(arr) || _iterable_to_array$b(arr) || _unsupported_iterable_to_array$f(arr) || _non_iterable_spread$b();
3822
+ function _to_consumable_array$d(arr) {
3823
+ return _array_without_holes$d(arr) || _iterable_to_array$d(arr) || _unsupported_iterable_to_array$g(arr) || _non_iterable_spread$d();
3755
3824
  }
3756
- function _unsupported_iterable_to_array$f(o, minLen) {
3825
+ function _unsupported_iterable_to_array$g(o, minLen) {
3757
3826
  if (!o) return;
3758
- if (typeof o === "string") return _array_like_to_array$f(o, minLen);
3827
+ if (typeof o === "string") return _array_like_to_array$g(o, minLen);
3759
3828
  var n = Object.prototype.toString.call(o).slice(8, -1);
3760
3829
  if (n === "Object" && o.constructor) n = o.constructor.name;
3761
3830
  if (n === "Map" || n === "Set") return Array.from(n);
3762
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$f(o, minLen);
3831
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$g(o, minLen);
3763
3832
  }
3764
3833
  /**
3765
3834
  * Creates a {@link FirestoreQueryConstraint} with the given type identifier and data.
@@ -4058,7 +4127,7 @@ function orderBy(fieldPath, directionStr) {
4058
4127
  * const newConstraints = withLastLimit10(existingConstraints);
4059
4128
  */ function addOrReplaceLimitInConstraints(limit) {
4060
4129
  var addedLimitType = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : FIRESTORE_LIMIT_QUERY_CONSTRAINT_TYPE;
4061
- var replace = replaceConstraints(function(constraints) {
4130
+ return replaceConstraints(function(constraints) {
4062
4131
  var type;
4063
4132
  if (constraints.length) {
4064
4133
  type = constraints[0].type;
@@ -4075,7 +4144,6 @@ function orderBy(fieldPath, directionStr) {
4075
4144
  FIRESTORE_LIMIT_QUERY_CONSTRAINT_TYPE,
4076
4145
  FIRESTORE_LIMIT_TO_LAST_QUERY_CONSTRAINT_TYPE
4077
4146
  ]);
4078
- return replace;
4079
4147
  }
4080
4148
  /**
4081
4149
  * Creates a function that filters out constraints of specific types.
@@ -4120,11 +4188,11 @@ function orderBy(fieldPath, directionStr) {
4120
4188
  * );
4121
4189
  * const newConstraints = replaceLimit(existingConstraints);
4122
4190
  */ function replaceConstraints(replaceFn, types) {
4123
- var separateFn = separateConstraints.apply(void 0, _to_consumable_array$b(types));
4191
+ var separateFn = separateConstraints.apply(void 0, _to_consumable_array$d(types));
4124
4192
  return function(constraints) {
4125
4193
  var separated = separateFn(constraints);
4126
4194
  var replacements = asArray(replaceFn(separated.excluded));
4127
- return replacements ? pushItemOrArrayItemsIntoArray(separated.included, replacements) : separated.included;
4195
+ return pushItemOrArrayItemsIntoArray(separated.included, replacements);
4128
4196
  };
4129
4197
  }
4130
4198
  /**
@@ -4149,10 +4217,9 @@ function orderBy(fieldPath, directionStr) {
4149
4217
  }
4150
4218
  return function(constraints) {
4151
4219
  var typesToFilterOut = new Set(types);
4152
- var separated = separateValues(constraints, function(x) {
4220
+ return separateValues(constraints, function(x) {
4153
4221
  return !typesToFilterOut.has(x.type);
4154
4222
  });
4155
- return separated;
4156
4223
  };
4157
4224
  }
4158
4225
 
@@ -4307,13 +4374,13 @@ function whereDateIsBeforeWithSort(fieldPath) {
4307
4374
  ];
4308
4375
  }
4309
4376
 
4310
- function _array_like_to_array$e(arr, len) {
4377
+ function _array_like_to_array$f(arr, len) {
4311
4378
  if (len == null || len > arr.length) len = arr.length;
4312
4379
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4313
4380
  return arr2;
4314
4381
  }
4315
- function _array_without_holes$a(arr) {
4316
- if (Array.isArray(arr)) return _array_like_to_array$e(arr);
4382
+ function _array_without_holes$c(arr) {
4383
+ if (Array.isArray(arr)) return _array_like_to_array$f(arr);
4317
4384
  }
4318
4385
  function _define_property$r(obj, key, value) {
4319
4386
  if (key in obj) {
@@ -4328,10 +4395,10 @@ function _define_property$r(obj, key, value) {
4328
4395
  }
4329
4396
  return obj;
4330
4397
  }
4331
- function _iterable_to_array$a(iter) {
4398
+ function _iterable_to_array$c(iter) {
4332
4399
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
4333
4400
  }
4334
- function _non_iterable_spread$a() {
4401
+ function _non_iterable_spread$c() {
4335
4402
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4336
4403
  }
4337
4404
  function _object_spread$l(target) {
@@ -4368,16 +4435,16 @@ function _object_spread_props$h(target, source) {
4368
4435
  }
4369
4436
  return target;
4370
4437
  }
4371
- function _to_consumable_array$a(arr) {
4372
- return _array_without_holes$a(arr) || _iterable_to_array$a(arr) || _unsupported_iterable_to_array$e(arr) || _non_iterable_spread$a();
4438
+ function _to_consumable_array$c(arr) {
4439
+ return _array_without_holes$c(arr) || _iterable_to_array$c(arr) || _unsupported_iterable_to_array$f(arr) || _non_iterable_spread$c();
4373
4440
  }
4374
- function _unsupported_iterable_to_array$e(o, minLen) {
4441
+ function _unsupported_iterable_to_array$f(o, minLen) {
4375
4442
  if (!o) return;
4376
- if (typeof o === "string") return _array_like_to_array$e(o, minLen);
4443
+ if (typeof o === "string") return _array_like_to_array$f(o, minLen);
4377
4444
  var n = Object.prototype.toString.call(o).slice(8, -1);
4378
4445
  if (n === "Object" && o.constructor) n = o.constructor.name;
4379
4446
  if (n === "Map" || n === "Set") return Array.from(n);
4380
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
4447
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$f(o, minLen);
4381
4448
  }
4382
4449
  /**
4383
4450
  * Filters out constraints that should not be directly specified in pagination queries.
@@ -4440,13 +4507,13 @@ function _unsupported_iterable_to_array$e(o, minLen) {
4440
4507
  // Add Limit
4441
4508
  var limitCount = filterLimit !== null && filterLimit !== void 0 ? filterLimit : itemsPerPage + (startAfterFilter ? 1 : 0); // todo: may not be needed.
4442
4509
  var limitConstraint = limit(limitCount);
4443
- var constraintsWithLimit = _to_consumable_array$a(constraints).concat([
4510
+ var constraintsWithLimit = _to_consumable_array$c(constraints).concat([
4444
4511
  limitConstraint
4445
4512
  ]);
4446
4513
  // make query
4447
4514
  var batchQuery = (_driver = driver).query.apply(_driver, [
4448
4515
  queryLike
4449
- ].concat(_to_consumable_array$a(constraintsWithLimit)));
4516
+ ].concat(_to_consumable_array$c(constraintsWithLimit)));
4450
4517
  var resultPromise = driver.getDocs(batchQuery).then(function(snapshot) {
4451
4518
  var time = new Date();
4452
4519
  var docs = snapshot.docs;
@@ -4675,7 +4742,7 @@ function _firestoreItemPageIterationWithSnapshotIteration(snapshotIteration) {
4675
4742
  return snapshot;
4676
4743
  });
4677
4744
  };
4678
- var resultPromise = _loadFakeQuerySnapshot().then(function(snapshot) {
4745
+ return _loadFakeQuerySnapshot().then(function(snapshot) {
4679
4746
  var result = {
4680
4747
  value: {
4681
4748
  time: time,
@@ -4684,7 +4751,7 @@ function _firestoreItemPageIterationWithSnapshotIteration(snapshotIteration) {
4684
4751
  reload: function reload() {
4685
4752
  return _loadFakeQuerySnapshot();
4686
4753
  },
4687
- stream: function stream(options) {
4754
+ stream: function stream(_options) {
4688
4755
  // TODO: Count potentially stream to fully implement, but might not be used anyways.
4689
4756
  return of(snapshot);
4690
4757
  }
@@ -4693,7 +4760,6 @@ function _firestoreItemPageIterationWithSnapshotIteration(snapshotIteration) {
4693
4760
  };
4694
4761
  return result;
4695
4762
  });
4696
- return resultPromise;
4697
4763
  }
4698
4764
  }));
4699
4765
  }
@@ -4703,13 +4769,13 @@ function _firestoreItemPageIterationWithSnapshotIteration(snapshotIteration) {
4703
4769
  return _firestoreItemPageIterationWithSnapshotIteration(snapshotIteration);
4704
4770
  }
4705
4771
 
4706
- function _array_like_to_array$d(arr, len) {
4772
+ function _array_like_to_array$e(arr, len) {
4707
4773
  if (len == null || len > arr.length) len = arr.length;
4708
4774
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4709
4775
  return arr2;
4710
4776
  }
4711
- function _array_without_holes$9(arr) {
4712
- if (Array.isArray(arr)) return _array_like_to_array$d(arr);
4777
+ function _array_without_holes$b(arr) {
4778
+ if (Array.isArray(arr)) return _array_like_to_array$e(arr);
4713
4779
  }
4714
4780
  function asyncGeneratorStep$g(gen, resolve, reject, _next, _throw, key, arg) {
4715
4781
  try {
@@ -4740,22 +4806,22 @@ function _async_to_generator$g(fn) {
4740
4806
  });
4741
4807
  };
4742
4808
  }
4743
- function _iterable_to_array$9(iter) {
4809
+ function _iterable_to_array$b(iter) {
4744
4810
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
4745
4811
  }
4746
- function _non_iterable_spread$9() {
4812
+ function _non_iterable_spread$b() {
4747
4813
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4748
4814
  }
4749
- function _to_consumable_array$9(arr) {
4750
- return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$d(arr) || _non_iterable_spread$9();
4815
+ function _to_consumable_array$b(arr) {
4816
+ return _array_without_holes$b(arr) || _iterable_to_array$b(arr) || _unsupported_iterable_to_array$e(arr) || _non_iterable_spread$b();
4751
4817
  }
4752
- function _unsupported_iterable_to_array$d(o, minLen) {
4818
+ function _unsupported_iterable_to_array$e(o, minLen) {
4753
4819
  if (!o) return;
4754
- if (typeof o === "string") return _array_like_to_array$d(o, minLen);
4820
+ if (typeof o === "string") return _array_like_to_array$e(o, minLen);
4755
4821
  var n = Object.prototype.toString.call(o).slice(8, -1);
4756
4822
  if (n === "Object" && o.constructor) n = o.constructor.name;
4757
4823
  if (n === "Map" || n === "Set") return Array.from(n);
4758
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
4824
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
4759
4825
  }
4760
4826
  function _ts_generator$g(thisArg, body) {
4761
4827
  var f, y, t, _ = {
@@ -4893,7 +4959,7 @@ function _ts_generator$g(thisArg, body) {
4893
4959
  var allConstraints = flattenArrayOrValueArray(queryConstraints);
4894
4960
  var query = makeQuery.apply(void 0, [
4895
4961
  inputQuery
4896
- ].concat(_to_consumable_array$9(allConstraints)));
4962
+ ].concat(_to_consumable_array$b(allConstraints)));
4897
4963
  var result = {
4898
4964
  query: query,
4899
4965
  countDocs: function countDocs1() {
@@ -4915,7 +4981,7 @@ function _ts_generator$g(thisArg, body) {
4915
4981
  constraintsForOneDoc = addOrReplaceLimitInConstraints(1)(allConstraints);
4916
4982
  query = makeQuery.apply(void 0, [
4917
4983
  inputQuery
4918
- ].concat(_to_consumable_array$9(constraintsForOneDoc)));
4984
+ ].concat(_to_consumable_array$b(constraintsForOneDoc)));
4919
4985
  return [
4920
4986
  4,
4921
4987
  getDocs(query, transaction)
@@ -5019,7 +5085,7 @@ function _ts_generator$g(thisArg, body) {
5019
5085
  return snapshot.ref.path;
5020
5086
  }
5021
5087
 
5022
- function _array_like_to_array$c(arr, len) {
5088
+ function _array_like_to_array$d(arr, len) {
5023
5089
  if (len == null || len > arr.length) len = arr.length;
5024
5090
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
5025
5091
  return arr2;
@@ -5131,15 +5197,15 @@ function _object_spread_props$g(target, source) {
5131
5197
  return target;
5132
5198
  }
5133
5199
  function _sliced_to_array$3(arr, i) {
5134
- return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$c(arr, i) || _non_iterable_rest$3();
5200
+ return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$d(arr, i) || _non_iterable_rest$3();
5135
5201
  }
5136
- function _unsupported_iterable_to_array$c(o, minLen) {
5202
+ function _unsupported_iterable_to_array$d(o, minLen) {
5137
5203
  if (!o) return;
5138
- if (typeof o === "string") return _array_like_to_array$c(o, minLen);
5204
+ if (typeof o === "string") return _array_like_to_array$d(o, minLen);
5139
5205
  var n = Object.prototype.toString.call(o).slice(8, -1);
5140
5206
  if (n === "Object" && o.constructor) n = o.constructor.name;
5141
5207
  if (n === "Map" || n === "Set") return Array.from(n);
5142
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
5208
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
5143
5209
  }
5144
5210
  function _ts_generator$f(thisArg, body) {
5145
5211
  var f, y, t, _ = {
@@ -5329,27 +5395,17 @@ function _ts_generator$f(thisArg, body) {
5329
5395
  maxParallelCheckpoints: 1,
5330
5396
  iterateSnapshotBatch: function iterateSnapshotBatch(docSnapshots) {
5331
5397
  return _async_to_generator$f(function() {
5332
- var performTasksResult;
5333
5398
  return _ts_generator$f(this, function(_state) {
5334
- switch(_state.label){
5335
- case 0:
5336
- return [
5337
- 4,
5338
- performAsyncTasks(docSnapshots, iterateSnapshot, _object_spread$k({
5339
- sequential: true
5340
- }, snapshotsPerformTasksConfig !== null && snapshotsPerformTasksConfig !== void 0 ? snapshotsPerformTasksConfig : _object_spread_props$g(_object_spread$k({}, performTasksConfig), {
5341
- nonConcurrentTaskKeyFactory: undefined,
5342
- beforeRetry: undefined
5343
- }) // don't pass the nonConcurrentTaskKeyFactory
5344
- ))
5345
- ];
5346
- case 1:
5347
- performTasksResult = _state.sent();
5348
- return [
5349
- 2,
5350
- performTasksResult
5351
- ];
5352
- }
5399
+ return [
5400
+ 2,
5401
+ performAsyncTasks(docSnapshots, iterateSnapshot, _object_spread$k({
5402
+ sequential: true
5403
+ }, snapshotsPerformTasksConfig !== null && snapshotsPerformTasksConfig !== void 0 ? snapshotsPerformTasksConfig : _object_spread_props$g(_object_spread$k({}, performTasksConfig), {
5404
+ nonConcurrentTaskKeyFactory: undefined,
5405
+ beforeRetry: undefined
5406
+ }) // don't pass the nonConcurrentTaskKeyFactory
5407
+ ))
5408
+ ];
5353
5409
  });
5354
5410
  })();
5355
5411
  }
@@ -5464,14 +5520,9 @@ function _ts_generator$f(thisArg, body) {
5464
5520
  case 0:
5465
5521
  if (!(docSnapshots.length > 0)) return [
5466
5522
  3,
5467
- 3
5468
- ];
5469
- return [
5470
- 4,
5471
- batchSizeForSnapshots(docSnapshots)
5523
+ 2
5472
5524
  ];
5473
- case 1:
5474
- batchSizeForSnapshotsResult = _state.sent();
5525
+ batchSizeForSnapshotsResult = batchSizeForSnapshots(docSnapshots);
5475
5526
  batches = batchSizeForSnapshotsResult === null ? [
5476
5527
  docSnapshots
5477
5528
  ] : batch(docSnapshots, batchSizeForSnapshotsResult);
@@ -5484,7 +5535,7 @@ function _ts_generator$f(thisArg, body) {
5484
5535
  sequential: true
5485
5536
  }, performTasksConfig))
5486
5537
  ];
5487
- case 2:
5538
+ case 1:
5488
5539
  performTasksResult = _state.sent();
5489
5540
  return [
5490
5541
  2,
@@ -5497,12 +5548,12 @@ function _ts_generator$f(thisArg, body) {
5497
5548
  };
5498
5549
  })
5499
5550
  ];
5500
- case 3:
5551
+ case 2:
5501
5552
  return [
5502
5553
  2,
5503
5554
  []
5504
5555
  ];
5505
- case 4:
5556
+ case 3:
5506
5557
  return [
5507
5558
  2
5508
5559
  ];
@@ -5599,6 +5650,7 @@ function _ts_generator$f(thisArg, body) {
5599
5650
  */ function iterateFirestoreDocumentSnapshotCheckpoints(config) {
5600
5651
  return _async_to_generator$f(function() {
5601
5652
  var iterateCheckpoint, inputFilterCheckpointSnapshot, inputHandleRepeatCursor, waitBetweenCheckpoints, useCheckpointResult, inputConstraintsFactory, inputDynamicConstraints, queryFactory, _config_maxParallelCheckpoints, maxParallelCheckpoints, inputLimitPerCheckpoint, inputTotalSnapshotsLimit, constraintsInputIsFactory, constraintsFactory, limitPerCheckpoint, totalSnapshotsLimit, currentIndex, hasReachedEnd, totalSnapshotsLimitReached, totalSnapshotsVisited, cursorDocument, visitedCursorPaths, handleRepeatCursor, filterCheckpointSnapshot, performTaskFn, result;
5653
+ // eslint-disable-next-line sonarjs/cognitive-complexity -- cursor-based pagination logic with repeat detection is inherently complex
5602
5654
  function taskInputFactory() {
5603
5655
  return _async_to_generator$f(function() {
5604
5656
  var result, constraints, startAfterFilter, shouldContinue, totalPossibleNumberOfItemsLeftToLoad, nextLimit, query, docQuerySnapshot, docSnapshots, nextCursorDocument, cursorPath, repeatResult, newSnapshotsVisited, i;
@@ -6164,7 +6216,7 @@ function _ts_generator$e(thisArg, body) {
6164
6216
  }), shareReplay(1));
6165
6217
  var event$ = stream$.pipe(map(function(event) {
6166
6218
  var changes = event.docChanges();
6167
- var results = build({
6219
+ return build({
6168
6220
  base: groupValues(changes, function(x) {
6169
6221
  return x.type;
6170
6222
  }),
@@ -6178,7 +6230,6 @@ function _ts_generator$e(thisArg, body) {
6178
6230
  x.type = iterationQueryDocChangeWatcherChangeTypeForGroup(x);
6179
6231
  }
6180
6232
  });
6181
- return results;
6182
6233
  }), shareReplay(1));
6183
6234
  return {
6184
6235
  stream$: stream$,
@@ -6217,13 +6268,13 @@ function _ts_generator$e(thisArg, body) {
6217
6268
  return type;
6218
6269
  }
6219
6270
 
6220
- function _array_like_to_array$b(arr, len) {
6271
+ function _array_like_to_array$c(arr, len) {
6221
6272
  if (len == null || len > arr.length) len = arr.length;
6222
6273
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
6223
6274
  return arr2;
6224
6275
  }
6225
- function _array_without_holes$8(arr) {
6226
- if (Array.isArray(arr)) return _array_like_to_array$b(arr);
6276
+ function _array_without_holes$a(arr) {
6277
+ if (Array.isArray(arr)) return _array_like_to_array$c(arr);
6227
6278
  }
6228
6279
  function asyncGeneratorStep$d(gen, resolve, reject, _next, _throw, key, arg) {
6229
6280
  try {
@@ -6254,22 +6305,22 @@ function _async_to_generator$d(fn) {
6254
6305
  });
6255
6306
  };
6256
6307
  }
6257
- function _iterable_to_array$8(iter) {
6308
+ function _iterable_to_array$a(iter) {
6258
6309
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
6259
6310
  }
6260
- function _non_iterable_spread$8() {
6311
+ function _non_iterable_spread$a() {
6261
6312
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6262
6313
  }
6263
- function _to_consumable_array$8(arr) {
6264
- return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$b(arr) || _non_iterable_spread$8();
6314
+ function _to_consumable_array$a(arr) {
6315
+ return _array_without_holes$a(arr) || _iterable_to_array$a(arr) || _unsupported_iterable_to_array$c(arr) || _non_iterable_spread$a();
6265
6316
  }
6266
- function _unsupported_iterable_to_array$b(o, minLen) {
6317
+ function _unsupported_iterable_to_array$c(o, minLen) {
6267
6318
  if (!o) return;
6268
- if (typeof o === "string") return _array_like_to_array$b(o, minLen);
6319
+ if (typeof o === "string") return _array_like_to_array$c(o, minLen);
6269
6320
  var n = Object.prototype.toString.call(o).slice(8, -1);
6270
6321
  if (n === "Object" && o.constructor) n = o.constructor.name;
6271
6322
  if (n === "Map" || n === "Set") return Array.from(n);
6272
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
6323
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
6273
6324
  }
6274
6325
  function _ts_generator$d(thisArg, body) {
6275
6326
  var f, y, t, _ = {
@@ -6487,7 +6538,7 @@ function _ts_generator$d(thisArg, body) {
6487
6538
  for(var _len = arguments.length, queryConstraints = new Array(_len), _key = 0; _key < _len; _key++){
6488
6539
  queryConstraints[_key] = arguments[_key];
6489
6540
  }
6490
- return wrapQuery((_baseQuery = baseQuery).filter.apply(_baseQuery, _to_consumable_array$8(queryConstraints)));
6541
+ return wrapQuery((_baseQuery = baseQuery).filter.apply(_baseQuery, _to_consumable_array$a(queryConstraints)));
6491
6542
  }
6492
6543
  };
6493
6544
  };
@@ -6497,18 +6548,18 @@ function _ts_generator$d(thisArg, body) {
6497
6548
  for(var _len = arguments.length, queryConstraints = new Array(_len), _key = 0; _key < _len; _key++){
6498
6549
  queryConstraints[_key] = arguments[_key];
6499
6550
  }
6500
- return wrapQuery((_queryFactory = queryFactory).query.apply(_queryFactory, _to_consumable_array$8(queryConstraints)));
6551
+ return wrapQuery((_queryFactory = queryFactory).query.apply(_queryFactory, _to_consumable_array$a(queryConstraints)));
6501
6552
  }
6502
6553
  };
6503
6554
  }
6504
6555
 
6505
- function _array_like_to_array$a(arr, len) {
6556
+ function _array_like_to_array$b(arr, len) {
6506
6557
  if (len == null || len > arr.length) len = arr.length;
6507
6558
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
6508
6559
  return arr2;
6509
6560
  }
6510
- function _array_without_holes$7(arr) {
6511
- if (Array.isArray(arr)) return _array_like_to_array$a(arr);
6561
+ function _array_without_holes$9(arr) {
6562
+ if (Array.isArray(arr)) return _array_like_to_array$b(arr);
6512
6563
  }
6513
6564
  function _define_property$p(obj, key, value) {
6514
6565
  if (key in obj) {
@@ -6523,10 +6574,10 @@ function _define_property$p(obj, key, value) {
6523
6574
  }
6524
6575
  return obj;
6525
6576
  }
6526
- function _iterable_to_array$7(iter) {
6577
+ function _iterable_to_array$9(iter) {
6527
6578
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
6528
6579
  }
6529
- function _non_iterable_spread$7() {
6580
+ function _non_iterable_spread$9() {
6530
6581
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6531
6582
  }
6532
6583
  function _object_spread$j(target) {
@@ -6563,20 +6614,20 @@ function _object_spread_props$f(target, source) {
6563
6614
  }
6564
6615
  return target;
6565
6616
  }
6566
- function _to_consumable_array$7(arr) {
6567
- return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$a(arr) || _non_iterable_spread$7();
6617
+ function _to_consumable_array$9(arr) {
6618
+ return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$b(arr) || _non_iterable_spread$9();
6568
6619
  }
6569
6620
  function _type_of$9(obj) {
6570
6621
  "@swc/helpers - typeof";
6571
6622
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
6572
6623
  }
6573
- function _unsupported_iterable_to_array$a(o, minLen) {
6624
+ function _unsupported_iterable_to_array$b(o, minLen) {
6574
6625
  if (!o) return;
6575
- if (typeof o === "string") return _array_like_to_array$a(o, minLen);
6626
+ if (typeof o === "string") return _array_like_to_array$b(o, minLen);
6576
6627
  var n = Object.prototype.toString.call(o).slice(8, -1);
6577
6628
  if (n === "Object" && o.constructor) n = o.constructor.name;
6578
6629
  if (n === "Map" || n === "Set") return Array.from(n);
6579
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
6630
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
6580
6631
  }
6581
6632
  /**
6582
6633
  * Separator used in Firestore paths to separate collection and document IDs.
@@ -6606,6 +6657,7 @@ function firestoreModelIdentity(parentOrModelName, collectionNameOrModelName, in
6606
6657
  }
6607
6658
  /**
6608
6659
  * Creates a FirestoreModelIdentityTypeMap from the input identities.
6660
+ *
6609
6661
  * @param identities
6610
6662
  * @returns
6611
6663
  */ function firestoreModelIdentityTypeMap(identities) {
@@ -6649,8 +6701,7 @@ function firestoreModelIdentity(parentOrModelName, collectionNameOrModelName, in
6649
6701
  } else {
6650
6702
  key = input;
6651
6703
  }
6652
- var result = id ? id : lastValue(key.split(FIRESTORE_COLLECTION_NAME_SEPARATOR));
6653
- return result;
6704
+ return id !== null && id !== void 0 ? id : lastValue(key.split(FIRESTORE_COLLECTION_NAME_SEPARATOR));
6654
6705
  }
6655
6706
  /**
6656
6707
  * Returns the array of ids within a FirestoreModelKey.
@@ -6686,7 +6737,7 @@ function firestoreModelIdentity(parentOrModelName, collectionNameOrModelName, in
6686
6737
  * @param key
6687
6738
  * @returns
6688
6739
  */ function inferKeyFromTwoWayFlatFirestoreModelKey(key) {
6689
- return key.replace(/\_/g, FIRESTORE_COLLECTION_NAME_SEPARATOR);
6740
+ return key.replace(/_/g, FIRESTORE_COLLECTION_NAME_SEPARATOR);
6690
6741
  }
6691
6742
  /**
6692
6743
  * Firestore Model Id Regex
@@ -6696,7 +6747,8 @@ function firestoreModelIdentity(parentOrModelName, collectionNameOrModelName, in
6696
6747
  /**
6697
6748
  * Returns true if the input string is a FirestoreModelId.
6698
6749
  *
6699
- * @param input
6750
+ * @param input - The string to test
6751
+ * @returns True if the input is a valid FirestoreModelId
6700
6752
  */ function isFirestoreModelId(input) {
6701
6753
  return FIRESTORE_MODEL_ID_REGEX.test(input);
6702
6754
  }
@@ -6720,14 +6772,16 @@ function firestoreModelIdentity(parentOrModelName, collectionNameOrModelName, in
6720
6772
  /**
6721
6773
  * Returns true if the input string is a FirestoreModelKey.
6722
6774
  *
6723
- * @param input
6775
+ * @param input - The string to test
6776
+ * @returns True if the input is a valid FirestoreModelKey
6724
6777
  */ function isFirestoreModelKey(input) {
6725
6778
  return FIRESTORE_MODEL_KEY_REGEX.test(input);
6726
6779
  }
6727
6780
  /**
6728
- * Returns true if the input string is a FirestoreModelId.
6781
+ * Returns true if the input string is a FirestoreModelId or a FirestoreModelKey.
6729
6782
  *
6730
- * @param input
6783
+ * @param input - The string to test
6784
+ * @returns True if the input is a valid FirestoreModelId or FirestoreModelKey
6731
6785
  */ function isFirestoreModelIdOrKey(input) {
6732
6786
  return stringContains(input, '/') ? FIRESTORE_MODEL_KEY_REGEX.test(input) : FIRESTORE_MODEL_ID_REGEX.test(input);
6733
6787
  }
@@ -6749,6 +6803,9 @@ function firestoreModelIdentity(parentOrModelName, collectionNameOrModelName, in
6749
6803
  */ var firestoreModelKey = firestoreModelKeyPart;
6750
6804
  /**
6751
6805
  * Creates a FirestoreModelKeyFactory for the input root identity.
6806
+ *
6807
+ * @param identity - The root FirestoreModelIdentity to bind the factory to
6808
+ * @returns A factory function that creates FirestoreModelKey values for the given identity and a provided id
6752
6809
  */ function firestoreModelKeyFactory(identity) {
6753
6810
  return function(id) {
6754
6811
  return firestoreModelKey(identity, id);
@@ -6812,7 +6869,12 @@ function firestoreModelIdentity(parentOrModelName, collectionNameOrModelName, in
6812
6869
  return "".concat(parent).concat(FIRESTORE_COLLECTION_NAME_SEPARATOR).concat(childPath);
6813
6870
  });
6814
6871
  }
6815
- function firestoreModelKeyPairObject(input) {
6872
+ /**
6873
+ * Converts a FirestoreModelKey or reference into a record mapping each collection name to its document id.
6874
+ *
6875
+ * @param input - The FirestoreModelKey, DocumentReferenceRef, or FirestoreModelKeyRef to convert
6876
+ * @returns An object mapping collection names to document ids, or undefined if the key is unavailable
6877
+ */ function firestoreModelKeyPairObject(input) {
6816
6878
  var pairs = firestoreModelKeyPartPairs(input);
6817
6879
  var object;
6818
6880
  if (pairs) {
@@ -6824,22 +6886,44 @@ function firestoreModelKeyPairObject(input) {
6824
6886
  }
6825
6887
  return object;
6826
6888
  }
6827
- function firestoreModelKeyCollectionType(input) {
6889
+ /**
6890
+ * Returns the FirestoreCollectionType derived from the input FirestoreModelKey.
6891
+ *
6892
+ * @param input - The key or reference to extract the collection type from
6893
+ * @returns The FirestoreCollectionType string, or undefined if the key is unavailable
6894
+ */ function firestoreModelKeyCollectionType(input) {
6828
6895
  return firestoreModelKeyCollectionTypeArrayName(input, FIRESTORE_COLLECTION_NAME_SEPARATOR);
6829
6896
  }
6830
- function firestoreModelKeyCollectionTypeArrayName(input) {
6897
+ /**
6898
+ * Returns the collection type array name string derived from the input key, joined by the given separator.
6899
+ *
6900
+ * @param input - The key or reference to extract collection names from
6901
+ * @param separator - The separator to join collection names with; defaults to the Firestore collection name separator
6902
+ * @returns The joined collection type array name string, or undefined if the key is unavailable
6903
+ */ function firestoreModelKeyCollectionTypeArrayName(input) {
6831
6904
  var separator = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : FIRESTORE_COLLECTION_NAME_SEPARATOR;
6832
6905
  var _firestoreModelKeyCollectionTypeArray;
6833
6906
  return (_firestoreModelKeyCollectionTypeArray = firestoreModelKeyCollectionTypeArray(input)) === null || _firestoreModelKeyCollectionTypeArray === void 0 ? void 0 : _firestoreModelKeyCollectionTypeArray.join(separator);
6834
6907
  }
6835
- function firestoreIdentityTypeArrayName(input) {
6908
+ /**
6909
+ * Returns the collection type array name string derived from a FirestoreModelIdentity, joined by the given separator.
6910
+ *
6911
+ * @param input - The FirestoreModelIdentity to derive collection names from
6912
+ * @param separator - The separator to join collection names with; defaults to the Firestore collection name separator
6913
+ * @returns The joined collection type array name string
6914
+ */ function firestoreIdentityTypeArrayName(input) {
6836
6915
  var separator = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : FIRESTORE_COLLECTION_NAME_SEPARATOR;
6837
6916
  return firestoreIdentityTypeArray(input).join(separator);
6838
6917
  }
6839
- function firestoreIdentityTypeArray(input) {
6918
+ /**
6919
+ * Returns an ordered array of collection names derived from a FirestoreModelIdentity, from root to leaf.
6920
+ *
6921
+ * @param input - The FirestoreModelIdentity to traverse
6922
+ * @returns An array of FirestoreCollectionName values ordered from root to leaf
6923
+ */ function firestoreIdentityTypeArray(input) {
6840
6924
  var array = [];
6841
6925
  var current = input;
6842
- while(true){
6926
+ for(;;){
6843
6927
  array.push(current.collectionName);
6844
6928
  if (current.type === 'nested') {
6845
6929
  current = current.parent;
@@ -6849,11 +6933,16 @@ function firestoreIdentityTypeArray(input) {
6849
6933
  }
6850
6934
  return array.reverse();
6851
6935
  }
6852
- function firestoreModelKeyCollectionTypeArray(input) {
6936
+ /**
6937
+ * Returns an ordered array of collection names derived from the input FirestoreModelKey.
6938
+ *
6939
+ * @param input - The key or reference to extract collection names from
6940
+ * @returns An array of FirestoreCollectionName values, or undefined if the key is unavailable
6941
+ */ function firestoreModelKeyCollectionTypeArray(input) {
6853
6942
  var key = readFirestoreModelKey(input);
6854
6943
  var array;
6855
6944
  if (key) {
6856
- var pieces = key === null || key === void 0 ? void 0 : key.split(FIRESTORE_COLLECTION_NAME_SEPARATOR);
6945
+ var pieces = key.split(FIRESTORE_COLLECTION_NAME_SEPARATOR);
6857
6946
  if (isOddNumber(pieces.length)) {
6858
6947
  throw new Error('input key source was a collection ref or unavailable.');
6859
6948
  }
@@ -6868,8 +6957,8 @@ function firestoreModelKeyCollectionTypeArray(input) {
6868
6957
  /**
6869
6958
  * Returns the collection name of the input key.
6870
6959
  *
6871
- * @param input
6872
- * @returns
6960
+ * @param input - The key or reference to extract the collection name from
6961
+ * @returns The FirestoreCollectionName from the deepest key pair, or undefined if unavailable
6873
6962
  */ function firestoreModelKeyCollectionName(input) {
6874
6963
  var _firestoreModelKeyTypePair;
6875
6964
  return (_firestoreModelKeyTypePair = firestoreModelKeyTypePair(input)) === null || _firestoreModelKeyTypePair === void 0 ? void 0 : _firestoreModelKeyTypePair.collectionName;
@@ -6877,8 +6966,9 @@ function firestoreModelKeyCollectionTypeArray(input) {
6877
6966
  /**
6878
6967
  * Returns the parent model key from up the specified amount of levels.
6879
6968
  *
6880
- * @param input
6881
- * @param maxLevelsUp
6969
+ * @param input - The key or reference to extract the parent key from
6970
+ * @param maxLevelsUp - The number of levels to traverse up the key hierarchy; defaults to 1
6971
+ * @returns The parent FirestoreModelKey, or undefined if no parent exists
6882
6972
  */ function firestoreModelKeyParentKey(input) {
6883
6973
  var maxLevelsUp = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
6884
6974
  var keyParts = firestoreModelKeyParentKeyPartPairs(input, maxLevelsUp);
@@ -6888,7 +6978,13 @@ function firestoreModelKeyCollectionTypeArray(input) {
6888
6978
  }
6889
6979
  return result;
6890
6980
  }
6891
- function firestoreModelKeyParentKeyPartPairs(input) {
6981
+ /**
6982
+ * Returns the collection/id pair array truncated by the specified number of levels from the end.
6983
+ *
6984
+ * @param input - The key or reference to extract pairs from
6985
+ * @param maxLevelsUp - The number of levels to remove from the end; defaults to 1
6986
+ * @returns An array of FirestoreModelCollectionAndIdPair values up to the parent level, or undefined if unavailable
6987
+ */ function firestoreModelKeyParentKeyPartPairs(input) {
6892
6988
  var maxLevelsUp = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
6893
6989
  var allParts = firestoreModelKeyPartPairs(input);
6894
6990
  var parentParts = undefined;
@@ -6906,11 +7002,16 @@ function firestoreModelKeyParentKeyPartPairs(input) {
6906
7002
  */ function firestoreModelKeyTypePair(input) {
6907
7003
  return lastValue(firestoreModelKeyPartPairs(input));
6908
7004
  }
6909
- function firestoreModelKeyPartPairs(input) {
7005
+ /**
7006
+ * Parses a FirestoreModelKey into an ordered array of collection/id pair objects.
7007
+ *
7008
+ * @param input - The key or reference to parse
7009
+ * @returns An array of FirestoreModelCollectionAndIdPair values, or undefined if the key is unavailable
7010
+ */ function firestoreModelKeyPartPairs(input) {
6910
7011
  var key = readFirestoreModelKey(input);
6911
7012
  var pairs;
6912
7013
  if (key) {
6913
- var pieces = key === null || key === void 0 ? void 0 : key.split(FIRESTORE_COLLECTION_NAME_SEPARATOR);
7014
+ var pieces = key.split(FIRESTORE_COLLECTION_NAME_SEPARATOR);
6914
7015
  if (isOddNumber(pieces.length)) {
6915
7016
  throw new Error('input key source was a collection ref or unavailable.');
6916
7017
  }
@@ -6932,7 +7033,7 @@ function firestoreModelKeyPartPairs(input) {
6932
7033
  * @param input
6933
7034
  * @returns
6934
7035
  */ function firestoreModelKeyPartPairsKeyPath(input) {
6935
- return firestoreModelKeyPath.apply(void 0, _to_consumable_array$7(firestoreModelKeyPartPairsPaths(input)));
7036
+ return firestoreModelKeyPath.apply(void 0, _to_consumable_array$9(firestoreModelKeyPartPairsPaths(input)));
6936
7037
  }
6937
7038
  /**
6938
7039
  * Maps the input FirestoreModelCollectionAndIdPair[] values to FirestoreModelKeyPart[] values.
@@ -6987,7 +7088,7 @@ var FIRESTORE_DUMMY_MODEL_KEY = 'dummymodel/dummykey';
6987
7088
  *
6988
7089
  * @template T - The data type of documents in the collection
6989
7090
  * @template D - The FirestoreDocument type that wraps the data
6990
- * @param config - Configuration for the collection
7091
+ * @param inputConfig - Configuration for the collection
6991
7092
  * @returns A fully configured FirestoreCollection instance
6992
7093
  */ function makeFirestoreCollection(inputConfig) {
6993
7094
  var config = inputConfig;
@@ -7030,13 +7131,12 @@ var FIRESTORE_DUMMY_MODEL_KEY = 'dummymodel/dummykey';
7030
7131
  * @param config - Configuration for the single document collection
7031
7132
  * @returns A RootSingleItemFirestoreCollection instance configured for the specified document
7032
7133
  */ function makeRootSingleItemFirestoreCollection(config) {
7033
- var collection = build({
7134
+ return build({
7034
7135
  base: makeFirestoreCollection(config),
7035
7136
  build: function build(x) {
7036
7137
  extendFirestoreCollectionWithSingleDocumentAccessor(x, config.singleItemIdentifier);
7037
7138
  }
7038
7139
  });
7039
- return collection;
7040
7140
  }
7041
7141
 
7042
7142
  function _define_property$o(obj, key, value) {
@@ -7187,23 +7287,22 @@ function _object_spread_props$e(target, source) {
7187
7287
  * @param config - Configuration for the single document subcollection
7188
7288
  * @returns A subcollection instance with specialized accessors for the single document
7189
7289
  */ function makeSingleItemFirestoreCollection(config) {
7190
- var collection = build({
7290
+ return build({
7191
7291
  base: makeFirestoreCollectionWithParent(config),
7192
7292
  build: function build(x) {
7193
7293
  // Extend the collection with single document accessor capabilities
7194
7294
  extendFirestoreCollectionWithSingleDocumentAccessor(x, config.singleItemIdentifier);
7195
7295
  }
7196
7296
  });
7197
- return collection;
7198
7297
  }
7199
7298
 
7200
- function _array_like_to_array$9(arr, len) {
7299
+ function _array_like_to_array$a(arr, len) {
7201
7300
  if (len == null || len > arr.length) len = arr.length;
7202
7301
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
7203
7302
  return arr2;
7204
7303
  }
7205
- function _array_without_holes$6(arr) {
7206
- if (Array.isArray(arr)) return _array_like_to_array$9(arr);
7304
+ function _array_without_holes$8(arr) {
7305
+ if (Array.isArray(arr)) return _array_like_to_array$a(arr);
7207
7306
  }
7208
7307
  function _define_property$n(obj, key, value) {
7209
7308
  if (key in obj) {
@@ -7218,10 +7317,10 @@ function _define_property$n(obj, key, value) {
7218
7317
  }
7219
7318
  return obj;
7220
7319
  }
7221
- function _iterable_to_array$6(iter) {
7320
+ function _iterable_to_array$8(iter) {
7222
7321
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
7223
7322
  }
7224
- function _non_iterable_spread$6() {
7323
+ function _non_iterable_spread$8() {
7225
7324
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
7226
7325
  }
7227
7326
  function _object_spread$h(target) {
@@ -7258,16 +7357,16 @@ function _object_spread_props$d(target, source) {
7258
7357
  }
7259
7358
  return target;
7260
7359
  }
7261
- function _to_consumable_array$6(arr) {
7262
- return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$9(arr) || _non_iterable_spread$6();
7360
+ function _to_consumable_array$8(arr) {
7361
+ return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$a(arr) || _non_iterable_spread$8();
7263
7362
  }
7264
- function _unsupported_iterable_to_array$9(o, minLen) {
7363
+ function _unsupported_iterable_to_array$a(o, minLen) {
7265
7364
  if (!o) return;
7266
- if (typeof o === "string") return _array_like_to_array$9(o, minLen);
7365
+ if (typeof o === "string") return _array_like_to_array$a(o, minLen);
7267
7366
  var n = Object.prototype.toString.call(o).slice(8, -1);
7268
7367
  if (n === "Object" && o.constructor) n = o.constructor.name;
7269
7368
  if (n === "Map" || n === "Set") return Array.from(n);
7270
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
7369
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
7271
7370
  }
7272
7371
  /**
7273
7372
  * Creates a factory function for generating FirestoreContext instances.
@@ -7283,11 +7382,10 @@ function _unsupported_iterable_to_array$9(o, minLen) {
7283
7382
  return function(firestore) {
7284
7383
  var _drivers_firestoreAccessorDriver;
7285
7384
  var makeFirestoreCollectionConfig = function makeFirestoreCollectionConfig(config) {
7286
- var _config_collection;
7287
- var _config_collection1;
7288
- var queryLike = (_config_collection = config.collection) !== null && _config_collection !== void 0 ? _config_collection : config.queryLike;
7385
+ var collection = config.collection;
7386
+ var queryLike = collection !== null && collection !== void 0 ? collection : config.queryLike;
7289
7387
  return _object_spread_props$d(_object_spread$h({}, config), {
7290
- collection: config.converter ? (_config_collection1 = config.collection) === null || _config_collection1 === void 0 ? void 0 : _config_collection1.withConverter(config.converter) : config.collection,
7388
+ collection: config.converter ? collection === null || collection === void 0 ? void 0 : collection.withConverter(config.converter) : collection,
7291
7389
  queryLike: config.converter ? queryLike.withConverter(config.converter) : queryLike,
7292
7390
  firestoreContext: context,
7293
7391
  firestoreDriverIdentifier: drivers.firestoreDriverIdentifier,
@@ -7315,7 +7413,7 @@ function _unsupported_iterable_to_array$9(o, minLen) {
7315
7413
  return (_drivers_firestoreAccessorDriver = drivers.firestoreAccessorDriver).collection.apply(_drivers_firestoreAccessorDriver, [
7316
7414
  firestore,
7317
7415
  path
7318
- ].concat(_to_consumable_array$6(pathSegments)));
7416
+ ].concat(_to_consumable_array$8(pathSegments)));
7319
7417
  },
7320
7418
  subcollection: drivers.firestoreAccessorDriver.subcollection,
7321
7419
  runTransaction: drivers.firestoreAccessorDriver.transactionFactoryForFirestore(firestore),
@@ -7527,9 +7625,10 @@ function _ts_generator$c(thisArg, body) {
7527
7625
  * // verifier can now check batches of IDs for uniqueness
7528
7626
  * ```
7529
7627
  */ function firestoreIdBatchVerifierFactory(config) {
7628
+ var _config_makeQueryConstraints;
7530
7629
  var readKeys = config.readKeys;
7531
7630
  var fieldToQuery = config.fieldToQuery;
7532
- var makeQueryConstraints = config.makeQueryConstraints ? config.makeQueryConstraints : fieldToQuery === '_id' ? function(ids) {
7631
+ var makeQueryConstraints = (_config_makeQueryConstraints = config.makeQueryConstraints) !== null && _config_makeQueryConstraints !== void 0 ? _config_makeQueryConstraints : fieldToQuery === '_id' ? function(ids) {
7533
7632
  return whereDocumentId('in', ids);
7534
7633
  } : function(ids) {
7535
7634
  return where(fieldToQuery, 'in', ids);
@@ -7537,7 +7636,7 @@ function _ts_generator$c(thisArg, body) {
7537
7636
  return function(collection) {
7538
7637
  var verify = function verify(keys) {
7539
7638
  return _async_to_generator$c(function() {
7540
- var constraints, results, keysInResults, unusedKeys;
7639
+ var constraints, results, keysInResults;
7541
7640
  return _ts_generator$c(this, function(_state) {
7542
7641
  switch(_state.label){
7543
7642
  case 0:
@@ -7548,13 +7647,12 @@ function _ts_generator$c(thisArg, body) {
7548
7647
  ];
7549
7648
  case 1:
7550
7649
  results = _state.sent();
7551
- keysInResults = results.docs.map(function(x) {
7650
+ keysInResults = results.docs.flatMap(function(x) {
7552
7651
  return readKeys(x);
7553
- }).flat();
7554
- unusedKeys = unique(keys, keysInResults);
7652
+ });
7555
7653
  return [
7556
7654
  2,
7557
- unusedKeys
7655
+ unique(keys, keysInResults)
7558
7656
  ];
7559
7657
  }
7560
7658
  });
@@ -7576,6 +7674,7 @@ function _ts_generator$c(thisArg, body) {
7576
7674
  * Checks for document existence first, then calls `set()` if the document is absent.
7577
7675
  *
7578
7676
  * @param accessor - the accessor to perform the existence check and set operation on
7677
+ * @returns a function that creates the document if it does not exist, or throws if it does
7579
7678
  * @throws {Error} When the document already exists at the reference path
7580
7679
  *
7581
7680
  * @example
@@ -7615,13 +7714,13 @@ function _ts_generator$c(thisArg, body) {
7615
7714
  });
7616
7715
  }
7617
7716
 
7618
- function _array_like_to_array$8(arr, len) {
7717
+ function _array_like_to_array$9(arr, len) {
7619
7718
  if (len == null || len > arr.length) len = arr.length;
7620
7719
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
7621
7720
  return arr2;
7622
7721
  }
7623
- function _array_without_holes$5(arr) {
7624
- if (Array.isArray(arr)) return _array_like_to_array$8(arr);
7722
+ function _array_without_holes$7(arr) {
7723
+ if (Array.isArray(arr)) return _array_like_to_array$9(arr);
7625
7724
  }
7626
7725
  function _define_property$m(obj, key, value) {
7627
7726
  if (key in obj) {
@@ -7636,10 +7735,10 @@ function _define_property$m(obj, key, value) {
7636
7735
  }
7637
7736
  return obj;
7638
7737
  }
7639
- function _iterable_to_array$5(iter) {
7738
+ function _iterable_to_array$7(iter) {
7640
7739
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
7641
7740
  }
7642
- function _non_iterable_spread$5() {
7741
+ function _non_iterable_spread$7() {
7643
7742
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
7644
7743
  }
7645
7744
  function _object_spread$g(target) {
@@ -7657,16 +7756,16 @@ function _object_spread$g(target) {
7657
7756
  }
7658
7757
  return target;
7659
7758
  }
7660
- function _to_consumable_array$5(arr) {
7661
- return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$5();
7759
+ function _to_consumable_array$7(arr) {
7760
+ return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$9(arr) || _non_iterable_spread$7();
7662
7761
  }
7663
- function _unsupported_iterable_to_array$8(o, minLen) {
7762
+ function _unsupported_iterable_to_array$9(o, minLen) {
7664
7763
  if (!o) return;
7665
- if (typeof o === "string") return _array_like_to_array$8(o, minLen);
7764
+ if (typeof o === "string") return _array_like_to_array$9(o, minLen);
7666
7765
  var n = Object.prototype.toString.call(o).slice(8, -1);
7667
7766
  if (n === "Object" && o.constructor) n = o.constructor.name;
7668
7767
  if (n === "Map" || n === "Set") return Array.from(n);
7669
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
7768
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
7670
7769
  }
7671
7770
  /**
7672
7771
  * Converts a {@link FirestoreAccessorArrayUpdate} into Firestore `UpdateData` using the
@@ -7687,15 +7786,15 @@ function _unsupported_iterable_to_array$8(o, minLen) {
7687
7786
  * await updateDoc(docRef, updateData);
7688
7787
  * ```
7689
7788
  */ function firestoreClientArrayUpdateToUpdateData(input) {
7690
- var union = input === null || input === void 0 ? void 0 : input.union;
7691
- var remove = input === null || input === void 0 ? void 0 : input.remove;
7789
+ var union = input.union;
7790
+ var remove = input.remove;
7692
7791
  function createUpdatesWithArrayFunction(fieldUpdate, arrayUpdateFunction) {
7693
7792
  var result;
7694
7793
  if (fieldUpdate) {
7695
7794
  result = mapObjectMap(fieldUpdate, function(arrayUpdate) {
7696
7795
  var result;
7697
7796
  if (arrayUpdate) {
7698
- result = arrayUpdateFunction.apply(void 0, _to_consumable_array$5(arrayUpdate)); // use spread operator to insert each value as an argument, as "nested arrays" are not allowed in the Firestore
7797
+ result = arrayUpdateFunction.apply(void 0, _to_consumable_array$7(arrayUpdate)); // use spread operator to insert each value as an argument, as "nested arrays" are not allowed in the Firestore
7699
7798
  }
7700
7799
  return result;
7701
7800
  });
@@ -7834,6 +7933,8 @@ function _define_property$l(obj, key, value) {
7834
7933
  * Creates a {@link FirestoreDocumentDataAccessorFactory} that produces {@link DefaultFirestoreDocumentDataAccessor} instances
7835
7934
  * for direct (non-batched, non-transactional) Firestore operations.
7836
7935
  *
7936
+ * @returns a factory that creates default (non-transactional) document data accessors
7937
+ *
7837
7938
  * @example
7838
7939
  * ```ts
7839
7940
  * const factory = defaultFirestoreAccessorFactory<MyModel>();
@@ -7854,6 +7955,8 @@ function _define_property$l(obj, key, value) {
7854
7955
  * The context type is {@link FirestoreDocumentContextType.NONE}, meaning operations execute immediately
7855
7956
  * against Firestore without transaction or batch grouping.
7856
7957
  *
7958
+ * @returns a default {@link FirestoreDocumentContext} with no transaction or batch semantics
7959
+ *
7857
7960
  * @example
7858
7961
  * ```ts
7859
7962
  * const context = defaultFirestoreDocumentContext<MyModel>();
@@ -8007,6 +8110,7 @@ function _is_native_reflect_construct$7() {
8007
8110
  * into the same batch.
8008
8111
  *
8009
8112
  * @param writeBatch - the Firestore `WriteBatch` to queue operations into
8113
+ * @returns a factory that creates write-batch-backed document data accessors for any document reference
8010
8114
  *
8011
8115
  * @example
8012
8116
  * ```ts
@@ -8052,6 +8156,7 @@ function _is_native_reflect_construct$7() {
8052
8156
  * Factory function that creates a {@link WriteBatchFirestoreDocumentContext} for the given batch.
8053
8157
  *
8054
8158
  * @param batch - the Firestore `WriteBatch` to use for all document operations
8159
+ * @returns a new {@link WriteBatchFirestoreDocumentContext} bound to the given batch
8055
8160
  *
8056
8161
  * @example
8057
8162
  * ```ts
@@ -8196,6 +8301,7 @@ function _define_property$j(obj, key, value) {
8196
8301
  * instances bound to the given transaction. All operations from these accessors participate in the same transaction.
8197
8302
  *
8198
8303
  * @param transaction - the Firestore `Transaction` to bind operations to
8304
+ * @returns a factory that creates transaction-backed document data accessors for any document reference
8199
8305
  *
8200
8306
  * @example
8201
8307
  * ```ts
@@ -8242,6 +8348,7 @@ function _define_property$j(obj, key, value) {
8242
8348
  * Factory function that creates a {@link TransactionFirestoreDocumentContext} for the given transaction.
8243
8349
  *
8244
8350
  * @param transaction - the Firestore `Transaction` to use for all document operations
8351
+ * @returns a new {@link TransactionFirestoreDocumentContext} bound to the given transaction
8245
8352
  *
8246
8353
  * @example
8247
8354
  * ```ts
@@ -8389,6 +8496,8 @@ function _ts_generator$b(thisArg, body) {
8389
8496
  * - Transaction and write batch context factories for atomic operations
8390
8497
  * - A default (non-transactional) document context
8391
8498
  *
8499
+ * @returns a {@link FirestoreAccessorDriver} backed by the `firebase/firestore` client SDK
8500
+ *
8392
8501
  * @example
8393
8502
  * ```ts
8394
8503
  * const driver = firestoreClientAccessorDriver();
@@ -8405,18 +8514,10 @@ function _ts_generator$b(thisArg, body) {
8405
8514
  return function(fn) {
8406
8515
  return _async_to_generator$b(function() {
8407
8516
  return _ts_generator$b(this, function(_state) {
8408
- switch(_state.label){
8409
- case 0:
8410
- return [
8411
- 4,
8412
- runTransaction(firestore, fn)
8413
- ];
8414
- case 1:
8415
- return [
8416
- 2,
8417
- _state.sent()
8418
- ];
8419
- }
8517
+ return [
8518
+ 2,
8519
+ runTransaction(firestore, fn)
8520
+ ];
8420
8521
  });
8421
8522
  })();
8422
8523
  };
@@ -8432,13 +8533,13 @@ function _ts_generator$b(thisArg, body) {
8432
8533
  };
8433
8534
  }
8434
8535
 
8435
- function _array_like_to_array$7(arr, len) {
8536
+ function _array_like_to_array$8(arr, len) {
8436
8537
  if (len == null || len > arr.length) len = arr.length;
8437
8538
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
8438
8539
  return arr2;
8439
8540
  }
8440
- function _array_without_holes$4(arr) {
8441
- if (Array.isArray(arr)) return _array_like_to_array$7(arr);
8541
+ function _array_without_holes$6(arr) {
8542
+ if (Array.isArray(arr)) return _array_like_to_array$8(arr);
8442
8543
  }
8443
8544
  function _define_property$i(obj, key, value) {
8444
8545
  if (key in obj) {
@@ -8453,10 +8554,10 @@ function _define_property$i(obj, key, value) {
8453
8554
  }
8454
8555
  return obj;
8455
8556
  }
8456
- function _iterable_to_array$4(iter) {
8557
+ function _iterable_to_array$6(iter) {
8457
8558
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
8458
8559
  }
8459
- function _non_iterable_spread$4() {
8560
+ function _non_iterable_spread$6() {
8460
8561
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
8461
8562
  }
8462
8563
  function _object_spread$f(target) {
@@ -8493,26 +8594,29 @@ function _object_spread_props$c(target, source) {
8493
8594
  }
8494
8595
  return target;
8495
8596
  }
8496
- function _to_consumable_array$4(arr) {
8497
- return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$4();
8597
+ function _to_consumable_array$6(arr) {
8598
+ return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$6();
8498
8599
  }
8499
- function _unsupported_iterable_to_array$7(o, minLen) {
8600
+ function _unsupported_iterable_to_array$8(o, minLen) {
8500
8601
  if (!o) return;
8501
- if (typeof o === "string") return _array_like_to_array$7(o, minLen);
8602
+ if (typeof o === "string") return _array_like_to_array$8(o, minLen);
8502
8603
  var n = Object.prototype.toString.call(o).slice(8, -1);
8503
8604
  if (n === "Object" && o.constructor) n = o.constructor.name;
8504
8605
  if (n === "Map" || n === "Set") return Array.from(n);
8505
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
8606
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
8506
8607
  }
8507
8608
  /**
8508
8609
  * Appends one or more `QueryConstraint` values to the builder, returning a new builder instance.
8509
8610
  *
8510
8611
  * @param builder - current query builder state
8511
8612
  * @param constraint - constraint(s) to append
8613
+ * @returns a new {@link FirebaseFirestoreQueryBuilder} with the added constraint(s)
8512
8614
  */ function addConstraintToBuilder(builder, constraint) {
8513
8615
  return {
8514
8616
  query: builder.query,
8515
- constraints: builder.constraints.concat(constraint)
8617
+ constraints: _to_consumable_array$6(builder.constraints).concat(_to_consumable_array$6(Array.isArray(constraint) ? constraint : [
8618
+ constraint
8619
+ ]))
8516
8620
  };
8517
8621
  }
8518
8622
  var _obj;
@@ -8535,13 +8639,13 @@ var _obj;
8535
8639
  }), _define_property$i(_obj, FIRESTORE_OFFSET_QUERY_CONSTRAINT_TYPE, undefined), _define_property$i(_obj, FIRESTORE_START_AT_QUERY_CONSTRAINT_TYPE, function(builder, data) {
8536
8640
  return addConstraintToBuilder(builder, startAt$1(data.snapshot));
8537
8641
  }), _define_property$i(_obj, FIRESTORE_START_AT_VALUE_QUERY_CONSTRAINT_TYPE, function(builder, data) {
8538
- return addConstraintToBuilder(builder, startAt$1.apply(void 0, _to_consumable_array$4(data.fieldValues)));
8642
+ return addConstraintToBuilder(builder, startAt$1.apply(void 0, _to_consumable_array$6(data.fieldValues)));
8539
8643
  }), _define_property$i(_obj, FIRESTORE_START_AFTER_QUERY_CONSTRAINT_TYPE, function(builder, data) {
8540
8644
  return addConstraintToBuilder(builder, startAfter$1(data.snapshot));
8541
8645
  }), _define_property$i(_obj, FIRESTORE_END_AT_QUERY_CONSTRAINT_TYPE, function(builder, data) {
8542
8646
  return addConstraintToBuilder(builder, endAt$1(data.snapshot));
8543
8647
  }), _define_property$i(_obj, FIRESTORE_END_AT_VALUE_QUERY_CONSTRAINT_TYPE, function(builder, data) {
8544
- return addConstraintToBuilder(builder, endAt$1.apply(void 0, _to_consumable_array$4(data.fieldValues)));
8648
+ return addConstraintToBuilder(builder, endAt$1.apply(void 0, _to_consumable_array$6(data.fieldValues)));
8545
8649
  }), _define_property$i(_obj, FIRESTORE_END_BEFORE_QUERY_CONSTRAINT_TYPE, function(builder, data) {
8546
8650
  return addConstraintToBuilder(builder, endBefore$1(data.snapshot));
8547
8651
  }), _obj);
@@ -8550,6 +8654,8 @@ var _obj;
8550
8654
  *
8551
8655
  * Converts abstract query constraints into `firebase/firestore` `QueryConstraint` objects
8552
8656
  * and composes them into an executable `Query`.
8657
+ *
8658
+ * @returns a {@link FirestoreQueryConstraintFunctionsDriver} backed by the `firebase/firestore` client SDK
8553
8659
  */ function firebaseFirestoreQueryConstraintFunctionsDriver() {
8554
8660
  return makeFirestoreQueryConstraintFunctionsDriver({
8555
8661
  mapping: FIRESTORE_CLIENT_QUERY_CONSTRAINT_HANDLER_MAPPING,
@@ -8563,7 +8669,7 @@ var _obj;
8563
8669
  var initialQuery = param.query, constraints = param.constraints;
8564
8670
  return query.apply(void 0, [
8565
8671
  initialQuery
8566
- ].concat(_to_consumable_array$4(constraints)));
8672
+ ].concat(_to_consumable_array$6(constraints)));
8567
8673
  },
8568
8674
  documentIdFieldPath: function documentIdFieldPath() {
8569
8675
  return documentId();
@@ -8577,6 +8683,8 @@ var _obj;
8577
8683
  * Note: Transactions are not supported for queries on the client; passing a `transaction` to `getDocs`
8578
8684
  * will throw an error.
8579
8685
  *
8686
+ * @returns a {@link FirestoreQueryDriver} backed by the `firebase/firestore` client SDK
8687
+ *
8580
8688
  * @example
8581
8689
  * ```ts
8582
8690
  * const queryDriver = firebaseFirestoreQueryDriver();
@@ -8611,6 +8719,8 @@ var _obj;
8611
8719
  * Provides accessor drivers (default, batch, transaction) and query drivers for use
8612
8720
  * with {@link clientFirebaseFirestoreContextFactory}.
8613
8721
  *
8722
+ * @returns the client-side {@link FirebaseFirestoreClientDrivers} for the `firebase/firestore` SDK
8723
+ *
8614
8724
  * @example
8615
8725
  * ```ts
8616
8726
  * const drivers = firebaseFirestoreClientDrivers();
@@ -8790,6 +8900,7 @@ function _is_native_reflect_construct$6() {
8790
8900
  * structured error details from the error's `details` property if available.
8791
8901
  *
8792
8902
  * @param error - the Firebase error from an `HttpsCallable` failure
8903
+ * @returns a new {@link FirebaseServerError} wrapping the given Firebase error with structured server error details
8793
8904
  */ function fromFirebaseError(error) {
8794
8905
  var details = error.details;
8795
8906
  details = _object_spread$e({
@@ -9055,6 +9166,7 @@ function mapHttpsCallable(callable, wrap) {
9055
9166
  * Errors are converted to readable errors via {@link convertHttpsCallableErrorToReadableError}.
9056
9167
  *
9057
9168
  * @param callable - the `HttpsCallable` to wrap
9169
+ * @returns a {@link DirectDataHttpsCallable} that resolves to the response data directly
9058
9170
  *
9059
9171
  * @example
9060
9172
  * ```ts
@@ -9077,6 +9189,7 @@ function mapHttpsCallable(callable, wrap) {
9077
9189
  * to preserve server-side error context. Otherwise, converts it to a generic readable error via `toReadableError`.
9078
9190
  *
9079
9191
  * @param error - the caught error from an `HttpsCallable` invocation
9192
+ * @returns a {@link FirebaseServerError} if the error has structured details, or a generic readable error otherwise
9080
9193
  */ function convertHttpsCallableErrorToReadableError(error) {
9081
9194
  var result;
9082
9195
  if ((typeof error === "undefined" ? "undefined" : _type_of$6(error)) === 'object') {
@@ -9091,7 +9204,7 @@ function mapHttpsCallable(callable, wrap) {
9091
9204
  return result;
9092
9205
  }
9093
9206
 
9094
- /* eslint-disable @typescript-eslint/no-explicit-any */ // The use of any here does not degrade the type-safety. The correct type is inferred in most cases.
9207
+ // The use of any here does not degrade the type-safety. The correct type is inferred in most cases.
9095
9208
  /**
9096
9209
  * Creates a {@link FirebaseFunctionMapFactory} from a configuration map.
9097
9210
  *
@@ -9099,6 +9212,7 @@ function mapHttpsCallable(callable, wrap) {
9099
9212
  * for direct data access. Per-key options (e.g., timeout) are applied if provided.
9100
9213
  *
9101
9214
  * @param configMap - maps function keys to their optional configuration
9215
+ * @returns a {@link FirebaseFunctionMapFactory} that creates a typed callable function map for a given `Functions` instance
9102
9216
  *
9103
9217
  * @example
9104
9218
  * ```ts
@@ -9119,8 +9233,7 @@ function mapHttpsCallable(callable, wrap) {
9119
9233
  var fn = directDataHttpsCallable(httpsCallable(functionsInstance, key, httpCallableOptions));
9120
9234
  return fn;
9121
9235
  };
9122
- var result = mapObjectMap(configMap, mapFn);
9123
- return result;
9236
+ return mapObjectMap(configMap, mapFn);
9124
9237
  };
9125
9238
  }
9126
9239
  /**
@@ -9130,6 +9243,7 @@ function mapHttpsCallable(callable, wrap) {
9130
9243
  * so `httpsCallable` instances are only created when actually needed.
9131
9244
  *
9132
9245
  * @param configMap - maps each function group key to its `[ClassType, Factory]` tuple
9246
+ * @returns a {@link LazyFirebaseFunctionsFactory} that creates a lazy-loaded function map for a given `Functions` instance
9133
9247
  *
9134
9248
  * @example
9135
9249
  * ```ts
@@ -9164,6 +9278,7 @@ function mapHttpsCallable(callable, wrap) {
9164
9278
  * The returned function builds {@link OnCallTypedModelParams} for any model type.
9165
9279
  *
9166
9280
  * @param call - the CRUD call type to embed in generated params
9281
+ * @returns an {@link OnCallTypeModelParamsFunction} pre-configured with the given call type
9167
9282
  * @throws {Error} When `modelType` is not provided or empty.
9168
9283
  *
9169
9284
  * @example
@@ -9196,10 +9311,13 @@ function mapHttpsCallable(callable, wrap) {
9196
9311
  *
9197
9312
  * @deprecated Move towards using onCallTypedModelParamsFunction directly with the call type instead of using this function. Will not be removed in the future.
9198
9313
  *
9199
- * @param modelType
9200
- * @param data
9201
- * @returns
9202
- */ function onCallTypedModelParams(modelTypeInput, data, specifier, call) {
9314
+ * @param modelTypeInput - the model type string or ref
9315
+ * @param data - the call payload
9316
+ * @param specifier - optional sub-function specifier
9317
+ * @param call - the CRUD call type
9318
+ * @returns the constructed {@link OnCallTypedModelParams}
9319
+ */ // eslint-disable-next-line @typescript-eslint/max-params -- deprecated function, not worth refactoring
9320
+ function onCallTypedModelParams(modelTypeInput, data, specifier, call) {
9203
9321
  return onCallTypedModelParamsFunction(call)(modelTypeInput, data, specifier);
9204
9322
  }
9205
9323
  /**
@@ -9221,6 +9339,7 @@ function mapHttpsCallable(callable, wrap) {
9221
9339
  * Creates an {@link OnCallCreateModelResult} from document references by extracting their paths as model keys.
9222
9340
  *
9223
9341
  * @param result - document reference(s) from a create operation
9342
+ * @returns an {@link OnCallCreateModelResult} with model keys extracted from document paths
9224
9343
  *
9225
9344
  * @example
9226
9345
  * ```ts
@@ -9236,13 +9355,14 @@ function mapHttpsCallable(callable, wrap) {
9236
9355
  * Creates an {@link OnCallCreateModelResult} from model key(s), normalizing to an array.
9237
9356
  *
9238
9357
  * @param modelKeys - the model key(s) of the created document(s)
9358
+ * @returns an {@link OnCallCreateModelResult} containing the keys as an array
9239
9359
  */ function onCallCreateModelResult(modelKeys) {
9240
9360
  return {
9241
9361
  modelKeys: asArray(modelKeys)
9242
9362
  };
9243
9363
  }
9244
9364
 
9245
- function _array_like_to_array$6(arr, len) {
9365
+ function _array_like_to_array$7(arr, len) {
9246
9366
  if (len == null || len > arr.length) len = arr.length;
9247
9367
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
9248
9368
  return arr2;
@@ -9278,15 +9398,15 @@ function _non_iterable_rest$2() {
9278
9398
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
9279
9399
  }
9280
9400
  function _sliced_to_array$2(arr, i) {
9281
- return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$2();
9401
+ return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$2();
9282
9402
  }
9283
- function _unsupported_iterable_to_array$6(o, minLen) {
9403
+ function _unsupported_iterable_to_array$7(o, minLen) {
9284
9404
  if (!o) return;
9285
- if (typeof o === "string") return _array_like_to_array$6(o, minLen);
9405
+ if (typeof o === "string") return _array_like_to_array$7(o, minLen);
9286
9406
  var n = Object.prototype.toString.call(o).slice(8, -1);
9287
9407
  if (n === "Object" && o.constructor) n = o.constructor.name;
9288
9408
  if (n === "Map" || n === "Set") return Array.from(n);
9289
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
9409
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
9290
9410
  }
9291
9411
  /**
9292
9412
  * Default specifier string (`'_'`) used when a CRUD operation has specifiers but one
@@ -9309,6 +9429,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
9309
9429
  *
9310
9430
  * @param configMap - configuration for custom (non-CRUD) functions
9311
9431
  * @param crudConfigMap - configuration for model CRUD functions with optional specifiers
9432
+ * @returns a {@link ModelFirebaseFunctionMapFactory} that creates a combined custom and CRUD function map for a given `Functions` instance
9312
9433
  *
9313
9434
  * @example
9314
9435
  * ```ts
@@ -9323,22 +9444,22 @@ function _unsupported_iterable_to_array$6(o, minLen) {
9323
9444
  */ function callModelFirebaseFunctionMapFactory(configMap, crudConfigMap) {
9324
9445
  var functionFactory = firebaseFunctionMapFactory(configMap);
9325
9446
  return function(functionsInstance) {
9326
- var makeCallFunction = function makeCallFunction(call, fn, modelType, specifier) {
9327
- return mapHttpsCallable(fn(), {
9447
+ var makeCallFunction = function makeCallFunction(callFn, modelType, specifier) {
9448
+ return mapHttpsCallable(callFn.fn(), {
9328
9449
  mapInput: function mapInput(data) {
9329
- return onCallTypedModelParamsFunction(call)(modelType, data, specifier);
9450
+ return onCallTypedModelParamsFunction(callFn.call)(modelType, data, specifier);
9330
9451
  }
9331
9452
  }, true);
9332
9453
  };
9333
- var makeCallSpecifiers = function makeCallSpecifiers(call, fn, modelType, specifierKeys) {
9454
+ var makeCallSpecifiers = function makeCallSpecifiers(callFn, modelType, specifierKeys) {
9334
9455
  var modelTypeSuffix = capitalizeFirstLetter(modelType);
9335
9456
  var specifiers = {};
9336
9457
  specifierKeys.forEach(function(inputSpecifier) {
9337
9458
  var specifier = inputSpecifier === MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_DEFAULT ? '' : inputSpecifier;
9338
- var specifierFn = makeCallFunction(call, fn, modelType, inputSpecifier);
9339
- var fullSpecifierName = "".concat(call).concat(modelTypeSuffix).concat(capitalizeFirstLetter(specifier));
9459
+ var specifierFn = makeCallFunction(callFn, modelType, inputSpecifier);
9460
+ var fullSpecifierName = "".concat(callFn.call).concat(modelTypeSuffix).concat(capitalizeFirstLetter(specifier));
9340
9461
  specifiers[fullSpecifierName] = specifierFn;
9341
- var shortSpecifierName = lowercaseFirstLetter(specifier) || call;
9462
+ var shortSpecifierName = lowercaseFirstLetter(specifier) || callFn.call;
9342
9463
  specifiers[shortSpecifierName] = specifierFn;
9343
9464
  });
9344
9465
  return specifiers;
@@ -9347,7 +9468,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
9347
9468
  var _callFn = cachedGetter(function() {
9348
9469
  return httpsCallable(functionsInstance, CALL_MODEL_APP_FUNCTION_KEY);
9349
9470
  });
9350
- var result = build({
9471
+ return build({
9351
9472
  base: functionMap,
9352
9473
  build: function build(x) {
9353
9474
  Object.entries(crudConfigMap).forEach(function(param) {
@@ -9361,10 +9482,14 @@ function _unsupported_iterable_to_array$6(o, minLen) {
9361
9482
  };
9362
9483
  var addCallFunctions = function addCallFunctions(crud, fn, modelType) {
9363
9484
  var crudFns;
9485
+ var callFn = {
9486
+ call: crud,
9487
+ fn: fn
9488
+ };
9364
9489
  if (crudFunctions.has(crud)) {
9365
- crudFns = makeCallFunction(crud, fn, modelType);
9490
+ crudFns = makeCallFunction(callFn, modelType);
9366
9491
  } else if (specifierFunctions.has(crud)) {
9367
- crudFns = makeCallSpecifiers(crud, fn, modelType, specifierFunctions.get(crud));
9492
+ crudFns = makeCallSpecifiers(callFn, modelType, specifierFunctions.get(crud));
9368
9493
  }
9369
9494
  if (crudFns) {
9370
9495
  modelTypeCalls["".concat(crud).concat(modelTypeSuffix)] = crudFns;
@@ -9372,7 +9497,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
9372
9497
  };
9373
9498
  var modelTypeSuffix = capitalizeFirstLetter(modelType);
9374
9499
  var _separateValues = separateValues(config, function(x) {
9375
- return x.indexOf(':') === -1;
9500
+ return !x.includes(':');
9376
9501
  }), crudFunctionKeys = _separateValues.included, specifiedCallFunctionKeys = _separateValues.excluded;
9377
9502
  var crudFunctions = new Set(crudFunctionKeys);
9378
9503
  var specifiedCallFunctionTuples = specifiedCallFunctionKeys.map(function(x) {
@@ -9403,7 +9528,6 @@ function _unsupported_iterable_to_array$6(o, minLen) {
9403
9528
  });
9404
9529
  }
9405
9530
  });
9406
- return result;
9407
9531
  };
9408
9532
  }
9409
9533
 
@@ -9412,6 +9536,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
9412
9536
  *
9413
9537
  * @param specifier - the development function to invoke
9414
9538
  * @param data - the call payload
9539
+ * @returns an {@link OnCallDevelopmentParams} envelope ready to send to the dev endpoint
9415
9540
  *
9416
9541
  * @example
9417
9542
  * ```ts
@@ -9437,6 +9562,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
9437
9562
  * through a single endpoint. The function specifier and data are wrapped via {@link onCallDevelopmentParams}.
9438
9563
  *
9439
9564
  * @param configMap - maps each development function key to optional configuration
9565
+ * @returns a factory that creates a {@link DevelopmentFirebaseFunctionMap} for a given `Functions` instance
9440
9566
  *
9441
9567
  * @example
9442
9568
  * ```ts
@@ -9489,6 +9615,7 @@ function _class_call_check$c(instance, Constructor) {
9489
9615
  * Useful when you need an independent reference that won't be affected by mutations to the original.
9490
9616
  *
9491
9617
  * @param path - the storage path to copy
9618
+ * @returns a new {@link StoragePath} with the same `bucketId` and `pathString`
9492
9619
  *
9493
9620
  * @example
9494
9621
  * ```ts
@@ -9505,6 +9632,7 @@ function _class_call_check$c(instance, Constructor) {
9505
9632
  * with a consistent bucket assignment.
9506
9633
  *
9507
9634
  * @param config - bucket and replacement behavior
9635
+ * @returns a {@link StoragePathFactory} that normalizes path inputs with the configured bucket
9508
9636
  *
9509
9637
  * @example
9510
9638
  * ```ts
@@ -9527,7 +9655,7 @@ function _class_call_check$c(instance, Constructor) {
9527
9655
  } else {
9528
9656
  return {
9529
9657
  pathString: pathString,
9530
- bucketId: inputBucketId || bucketId
9658
+ bucketId: inputBucketId !== null && inputBucketId !== void 0 ? inputBucketId : bucketId
9531
9659
  };
9532
9660
  }
9533
9661
  };
@@ -9539,6 +9667,7 @@ function _class_call_check$c(instance, Constructor) {
9539
9667
  * (implying the default bucket).
9540
9668
  *
9541
9669
  * @param path - the storage path to convert
9670
+ * @returns a {@link GoogleCloudStorageFilePath} string (`gs://bucket/path` or a relative path)
9542
9671
  *
9543
9672
  * @example
9544
9673
  * ```ts
@@ -9561,6 +9690,7 @@ function _class_call_check$c(instance, Constructor) {
9561
9690
  * Returns the `gs://` bucket prefix URI for the given bucket identifier or ref.
9562
9691
  *
9563
9692
  * @param storage - bucket ID string or a {@link StorageBucketIdRef}
9693
+ * @returns the `gs://bucket` prefix URI as a {@link GoogleCloudStorageBucketPrefix}
9564
9694
  *
9565
9695
  * @example
9566
9696
  * ```ts
@@ -9604,10 +9734,27 @@ var FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY = 'resetCommunicationAt'
9604
9734
  return (_x_auth = x.auth) === null || _x_auth === void 0 ? void 0 : _x_auth.uid;
9605
9735
  });
9606
9736
 
9607
- /** Error code when the user account is not found. */ var FIREBASE_AUTH_USER_NOT_FOUND_ERROR = 'auth/user-not-found';
9608
- /** Error code when the password is incorrect. */ var FIREBASE_AUTH_WRONG_PASSWORD = 'auth/wrong-password';
9609
- /** Error code for a network request error (client SDK). */ var FIREBASE_AUTH_NETWORK_REQUEST_ERROR = 'auth/network-request-error';
9610
- /** Error code for a failed network request (client SDK). */ var FIREBASE_AUTH_NETWORK_REQUEST_FAILED = 'auth/network-request-failed';
9737
+ /**
9738
+ * Error code when the user account is not found.
9739
+ */ var FIREBASE_AUTH_USER_NOT_FOUND_ERROR = 'auth/user-not-found';
9740
+ /**
9741
+ * Error code when the password is incorrect.
9742
+ */ var FIREBASE_AUTH_WRONG_PASSWORD = 'auth/wrong-password';
9743
+ /**
9744
+ * Error code for a network request error (client SDK).
9745
+ */ var FIREBASE_AUTH_NETWORK_REQUEST_ERROR = 'auth/network-request-error';
9746
+ /**
9747
+ * Error code for a failed network request (client SDK).
9748
+ */ var FIREBASE_AUTH_NETWORK_REQUEST_FAILED = 'auth/network-request-failed';
9749
+ /**
9750
+ * Error code when a phone number is already associated with another account.
9751
+ */ var FIREBASE_AUTH_PHONE_NUMBER_ALREADY_EXISTS_ERROR = 'auth/phone-number-already-exists';
9752
+ /**
9753
+ * Error code when an email is already associated with another account.
9754
+ */ var FIREBASE_AUTH_EMAIL_ALREADY_EXISTS_ERROR = 'auth/email-already-exists';
9755
+ /**
9756
+ * Error code when the provided phone number is not a valid E.164 string.
9757
+ */ var FIREBASE_AUTH_INVALID_PHONE_NUMBER_ERROR = 'auth/invalid-phone-number';
9611
9758
  /**
9612
9759
  * Converts a {@link FirebaseAuthError} into a user-friendly {@link ReadableError} with a human-readable message.
9613
9760
  *
@@ -9615,6 +9762,7 @@ var FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY = 'resetCommunicationAt'
9615
9762
  * suitable for display in the UI.
9616
9763
  *
9617
9764
  * @param inputError - the Firebase Auth error to convert
9765
+ * @returns a {@link ReadableError} with a human-readable message suitable for display
9618
9766
  *
9619
9767
  * @example
9620
9768
  * ```ts
@@ -9718,6 +9866,7 @@ function _define_property$f(obj, key, value) {
9718
9866
  * Automatically uses a transaction accessor when the context has an active transaction.
9719
9867
  *
9720
9868
  * @param getFirestoreCollection - function to retrieve the Firestore collection from context
9869
+ * @returns a {@link FirebaseModelLoader} that loads document wrappers for given keys
9721
9870
  *
9722
9871
  * @example
9723
9872
  * ```ts
@@ -9734,8 +9883,7 @@ function _define_property$f(obj, key, value) {
9734
9883
  } else {
9735
9884
  documentAccessor = firestoreCollection.documentAccessor();
9736
9885
  }
9737
- var document = documentAccessor.loadDocumentForKey(key);
9738
- return document;
9886
+ return documentAccessor.loadDocumentForKey(key);
9739
9887
  }
9740
9888
  };
9741
9889
  }
@@ -9743,17 +9891,17 @@ function _define_property$f(obj, key, value) {
9743
9891
  /**
9744
9892
  * ArkType schema for a FirestoreModelKey (full path like "collection/12345").
9745
9893
  */ var firestoreModelKeyType = type('string > 0').narrow(function(val, ctx) {
9746
- return val != null && isFirestoreModelKey(val) || ctx.mustBe('a valid FirestoreModelKey');
9894
+ return isFirestoreModelKey(val) || ctx.mustBe('a valid FirestoreModelKey');
9747
9895
  });
9748
9896
  /**
9749
9897
  * ArkType schema for a FirestoreModelId (document ID like "12345").
9750
9898
  */ var firestoreModelIdType = type('string > 0').narrow(function(val, ctx) {
9751
- return val != null && isFirestoreModelId(val) || ctx.mustBe('a valid FirestoreModelId');
9899
+ return isFirestoreModelId(val) || ctx.mustBe('a valid FirestoreModelId');
9752
9900
  });
9753
9901
  /**
9754
9902
  * ArkType schema for a FirestoreModelId or FirestoreModelKey.
9755
9903
  */ var firestoreModelIdOrKeyType = type('string > 0').narrow(function(val, ctx) {
9756
- return val != null && isFirestoreModelIdOrKey(val) || ctx.mustBe('a valid FirestoreModelId or FirestoreModelKey');
9904
+ return isFirestoreModelIdOrKey(val) || ctx.mustBe('a valid FirestoreModelId or FirestoreModelKey');
9757
9905
  });
9758
9906
 
9759
9907
  /**
@@ -10062,6 +10210,7 @@ function _ts_generator$9(thisArg, body) {
10062
10210
  * Creates a {@link FirebaseModelPermissionServiceInstance} from a delegate.
10063
10211
  *
10064
10212
  * @param delegate - provides model loading and role computation
10213
+ * @returns a {@link FirebaseModelPermissionServiceInstance} configured with the given delegate
10065
10214
  */ function firebaseModelPermissionService(delegate) {
10066
10215
  return new FirebaseModelPermissionServiceInstance(delegate);
10067
10216
  }
@@ -10224,8 +10373,7 @@ function _define_property$d(obj, key, value) {
10224
10373
  value: function throwDoesNotExistError() {
10225
10374
  var _ref;
10226
10375
  var _this_contextGrantedModelRoles_context_makeDoesNotExistError, _this_contextGrantedModelRoles_context;
10227
- var error = (_ref = (_this_contextGrantedModelRoles_context_makeDoesNotExistError = (_this_contextGrantedModelRoles_context = this.contextGrantedModelRoles.context).makeDoesNotExistError) === null || _this_contextGrantedModelRoles_context_makeDoesNotExistError === void 0 ? void 0 : _this_contextGrantedModelRoles_context_makeDoesNotExistError.call(_this_contextGrantedModelRoles_context, this.contextGrantedModelRoles)) !== null && _ref !== void 0 ? _ref : new Error(contextGrantedModelRolesReaderDoesNotExistErrorMessage(this.contextGrantedModelRoles));
10228
- throw error;
10376
+ throw (_ref = (_this_contextGrantedModelRoles_context_makeDoesNotExistError = (_this_contextGrantedModelRoles_context = this.contextGrantedModelRoles.context).makeDoesNotExistError) === null || _this_contextGrantedModelRoles_context_makeDoesNotExistError === void 0 ? void 0 : _this_contextGrantedModelRoles_context_makeDoesNotExistError.call(_this_contextGrantedModelRoles_context, this.contextGrantedModelRoles)) !== null && _ref !== void 0 ? _ref : new Error(contextGrantedModelRolesReaderDoesNotExistErrorMessage(this.contextGrantedModelRoles));
10229
10377
  }
10230
10378
  },
10231
10379
  {
@@ -10233,8 +10381,7 @@ function _define_property$d(obj, key, value) {
10233
10381
  value: function throwPermissionError(role) {
10234
10382
  var _ref;
10235
10383
  var _this_contextGrantedModelRoles_context_makePermissionError, _this_contextGrantedModelRoles_context;
10236
- var error = (_ref = (_this_contextGrantedModelRoles_context_makePermissionError = (_this_contextGrantedModelRoles_context = this.contextGrantedModelRoles.context).makePermissionError) === null || _this_contextGrantedModelRoles_context_makePermissionError === void 0 ? void 0 : _this_contextGrantedModelRoles_context_makePermissionError.call(_this_contextGrantedModelRoles_context, this.contextGrantedModelRoles, role)) !== null && _ref !== void 0 ? _ref : new Error(contextGrantedModelRolesReaderPermissionErrorMessage(this.contextGrantedModelRoles, role));
10237
- throw error;
10384
+ throw (_ref = (_this_contextGrantedModelRoles_context_makePermissionError = (_this_contextGrantedModelRoles_context = this.contextGrantedModelRoles.context).makePermissionError) === null || _this_contextGrantedModelRoles_context_makePermissionError === void 0 ? void 0 : _this_contextGrantedModelRoles_context_makePermissionError.call(_this_contextGrantedModelRoles_context, this.contextGrantedModelRoles, role)) !== null && _ref !== void 0 ? _ref : new Error(contextGrantedModelRolesReaderPermissionErrorMessage(this.contextGrantedModelRoles, role));
10238
10385
  }
10239
10386
  }
10240
10387
  ]);
@@ -10242,6 +10389,9 @@ function _define_property$d(obj, key, value) {
10242
10389
  }();
10243
10390
  /**
10244
10391
  * Creates a new ContextGrantedModelRolesReader for the input model.
10392
+ *
10393
+ * @param service - the in-model-context permission service to read roles from
10394
+ * @returns a promise resolving to a {@link ContextGrantedModelRolesReader} for the model
10245
10395
  */ function contextGrantedModelRolesReader(service) {
10246
10396
  return service.roleMap().then(function(x) {
10247
10397
  return new ContextGrantedModelRolesReaderInstance(x);
@@ -10250,13 +10400,13 @@ function _define_property$d(obj, key, value) {
10250
10400
  /**
10251
10401
  * Creates the default permission error message.
10252
10402
  *
10253
- * @param contextGrantedModelRoles
10254
- * @param role
10255
- * @returns
10403
+ * @param contextGrantedModelRoles - the granted model roles context to generate the message from
10404
+ * @param roles - the required role(s) that were not satisfied
10405
+ * @returns a human-readable permission error message string
10256
10406
  */ function contextGrantedModelRolesReaderPermissionErrorMessage(contextGrantedModelRoles, roles) {
10257
10407
  var _contextGrantedModelRoles_data, _contextGrantedModelRoles_data1;
10258
10408
  var message = 'Permissions Error ("'.concat((_contextGrantedModelRoles_data = contextGrantedModelRoles.data) === null || _contextGrantedModelRoles_data === void 0 ? void 0 : _contextGrantedModelRoles_data.document.modelType, '":"').concat((_contextGrantedModelRoles_data1 = contextGrantedModelRoles.data) === null || _contextGrantedModelRoles_data1 === void 0 ? void 0 : _contextGrantedModelRoles_data1.document.id, '")');
10259
- if (roles && (roles === null || roles === void 0 ? void 0 : roles.length)) {
10409
+ if (roles === null || roles === void 0 ? void 0 : roles.length) {
10260
10410
  message = "".concat(message, ': required role(s) "').concat(roles, '"');
10261
10411
  }
10262
10412
  return message;
@@ -10264,13 +10414,11 @@ function _define_property$d(obj, key, value) {
10264
10414
  /**
10265
10415
  * Creates the default does not exist error message.
10266
10416
  *
10267
- * @param contextGrantedModelRoles
10268
- * @param role
10269
- * @returns
10417
+ * @param contextGrantedModelRoles - the granted model roles context to generate the message from
10418
+ * @returns a human-readable does-not-exist error message string
10270
10419
  */ function contextGrantedModelRolesReaderDoesNotExistErrorMessage(contextGrantedModelRoles) {
10271
10420
  var _contextGrantedModelRoles_data, _contextGrantedModelRoles_data1;
10272
- var message = 'Does Not Exist ("'.concat((_contextGrantedModelRoles_data = contextGrantedModelRoles.data) === null || _contextGrantedModelRoles_data === void 0 ? void 0 : _contextGrantedModelRoles_data.document.modelType, '":"').concat((_contextGrantedModelRoles_data1 = contextGrantedModelRoles.data) === null || _contextGrantedModelRoles_data1 === void 0 ? void 0 : _contextGrantedModelRoles_data1.document.id, '")');
10273
- return message;
10421
+ return 'Does Not Exist ("'.concat((_contextGrantedModelRoles_data = contextGrantedModelRoles.data) === null || _contextGrantedModelRoles_data === void 0 ? void 0 : _contextGrantedModelRoles_data.document.modelType, '":"').concat((_contextGrantedModelRoles_data1 = contextGrantedModelRoles.data) === null || _contextGrantedModelRoles_data1 === void 0 ? void 0 : _contextGrantedModelRoles_data1.document.id, '")');
10274
10422
  }
10275
10423
 
10276
10424
  function asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, key, arg) {
@@ -10406,6 +10554,9 @@ function _ts_generator$8(thisArg, body) {
10406
10554
  * Decision function that checks if the current user is an admin in the given context.
10407
10555
  *
10408
10556
  * Returns `false` if no auth is present.
10557
+ *
10558
+ * @param context - the Firebase model context to evaluate
10559
+ * @returns a promise resolving to `true` if the user is an admin, `false` otherwise
10409
10560
  */ var isAdminInFirebaseModelContext = function isAdminInFirebaseModelContext(context) {
10410
10561
  var _ref;
10411
10562
  var _context_auth;
@@ -10415,6 +10566,7 @@ function _ts_generator$8(thisArg, body) {
10415
10566
  * Creates a {@link GrantRolesIfFunction} that grants the specified roles when the user is an admin.
10416
10567
  *
10417
10568
  * @param rolesToGrantToAdmin - roles to grant if the user is an admin
10569
+ * @returns a {@link GrantRolesIfFunction} that grants the given roles when the user is an admin
10418
10570
  *
10419
10571
  * @example
10420
10572
  * ```ts
@@ -10433,6 +10585,7 @@ function _ts_generator$8(thisArg, body) {
10433
10585
  * @param context - the model context to check
10434
10586
  * @param rolesToGrantToAdmin - roles to grant if admin
10435
10587
  * @param otherwise - fallback role computation when not admin
10588
+ * @returns a promise or value resolving to the granted role map
10436
10589
  */ function grantModelRolesIfAdmin(context, rolesToGrantToAdmin, otherwise) {
10437
10590
  return grantModelRolesIfAdminFunction(rolesToGrantToAdmin)(context, otherwise);
10438
10591
  }
@@ -10442,6 +10595,7 @@ function _ts_generator$8(thisArg, body) {
10442
10595
  *
10443
10596
  * @param authRoles - the auth roles the user must have
10444
10597
  * @param rolesToGrantToAdmin - the model roles to grant if the auth roles are present
10598
+ * @returns a {@link GrantRolesIfFunction} that grants the given roles when the user has the required auth roles
10445
10599
  */ function grantModelRolesIfHasAuthRolesFunction(authRoles, rolesToGrantToAdmin) {
10446
10600
  return grantModelRolesIfFunction(function(context) {
10447
10601
  var _context_auth;
@@ -10457,6 +10611,7 @@ function _ts_generator$8(thisArg, body) {
10457
10611
  * Creates a reusable factory pre-configured with specific auth roles to check for.
10458
10612
  *
10459
10613
  * @param authRoles - the auth roles the user must have
10614
+ * @returns a {@link GrantModelRolesIfHasAuthRolesFactory} pre-configured to check the given auth roles
10460
10615
  */ function grantModelRolesIfHasAuthRolesFactory(authRoles) {
10461
10616
  var authRolesToHave = iterableToArray(authRoles);
10462
10617
  return function(context, rolesToGrantToMatch, otherwise) {
@@ -10515,6 +10670,7 @@ function _ts_generator$8(thisArg, body) {
10515
10670
  * Creates a {@link GrantRolesIfFunction} that grants roles when the authenticated user's UID matches the model's `uid` field.
10516
10671
  *
10517
10672
  * @param rolesToGrant - the roles to grant if the user owns the model
10673
+ * @returns a {@link GrantRolesIfFunction} that grants roles when the authenticated user is the model owner
10518
10674
  *
10519
10675
  * @example
10520
10676
  * ```ts
@@ -10532,6 +10688,7 @@ function _ts_generator$8(thisArg, body) {
10532
10688
  *
10533
10689
  * @param grantIf - decision function to evaluate
10534
10690
  * @param grantedRoles - roles to grant if the decision is `true`
10691
+ * @returns a {@link GrantRolesOnlyIfFunction} that grants roles or returns no-access with no fallback
10535
10692
  */ function grantModelRolesOnlyIfFunction(grantIf, grantedRoles) {
10536
10693
  var fn = grantModelRolesIfFunction(grantIf, grantedRoles);
10537
10694
  return function(context) {
@@ -10546,6 +10703,7 @@ function _ts_generator$8(thisArg, body) {
10546
10703
  *
10547
10704
  * @param grantIf - async decision function to evaluate
10548
10705
  * @param grantedRoles - roles to grant if the decision is `true`
10706
+ * @returns a {@link GrantRolesIfFunction} that evaluates the condition and grants roles or falls back
10549
10707
  * @throws {Error} When `grantIf` is not provided.
10550
10708
  *
10551
10709
  * @example
@@ -10557,9 +10715,6 @@ function _ts_generator$8(thisArg, body) {
10557
10715
  * const roles = await grantIfOwner(context, () => noAccessRoleMap());
10558
10716
  * ```
10559
10717
  */ function grantModelRolesIfFunction(grantIf, grantedRoles) {
10560
- if (!grantIf) {
10561
- throw new Error('missing grant if');
10562
- }
10563
10718
  return function(context) {
10564
10719
  var otherwise = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : noAccessRoleMap;
10565
10720
  return _async_to_generator$8(function() {
@@ -10658,6 +10813,7 @@ function _object_spread_props$a(target, source) {
10658
10813
  * Creates a {@link FirebaseModelService} that wires together model loading and permission evaluation.
10659
10814
  *
10660
10815
  * @param config - collection loader and role mapping functions
10816
+ * @returns a {@link FirebaseModelService} combining model loading and permission evaluation
10661
10817
  *
10662
10818
  * @example
10663
10819
  * ```ts
@@ -10690,6 +10846,7 @@ function _object_spread_props$a(target, source) {
10690
10846
  * Creates a {@link FirebaseModelServiceFactory} that lazily instantiates and caches the service.
10691
10847
  *
10692
10848
  * @param config - the service configuration
10849
+ * @returns a {@link FirebaseModelServiceFactory} that lazily creates and caches the service
10693
10850
  */ function firebaseModelServiceFactory(config) {
10694
10851
  return cachedGetter(function() {
10695
10852
  return firebaseModelService(config);
@@ -10702,6 +10859,7 @@ function _object_spread_props$a(target, source) {
10702
10859
  * with a model or key to perform permission-checked operations.
10703
10860
  *
10704
10861
  * @param factory - lazy getter for the underlying model service
10862
+ * @returns an {@link InContextFirebaseModelServiceFactory} that binds contexts to the service
10705
10863
  */ function inContextFirebaseModelServiceFactory(factory) {
10706
10864
  return function(context) {
10707
10865
  var firebaseModelService = factory();
@@ -10771,8 +10929,8 @@ function _object_spread_props$a(target, source) {
10771
10929
  * export const demoFirebaseModelServices = firebaseModelsService<typeof DEMO_FIREBASE_MODEL_SERVICE_FACTORIES, DemoFirebaseBaseContext, DemoFirebaseModelTypes>(DEMO_FIREBASE_MODEL_SERVICE_FACTORIES);
10772
10930
  * export type DemoFirebaseContext = DemoFirebaseBaseContext & { service: typeof demoFirebaseModelServices };
10773
10931
  *
10774
- * @param services
10775
- * @returns
10932
+ * @param services - the map of model service getter factories
10933
+ * @returns a {@link FirebaseModelsService} that dispatches to the appropriate model service by type
10776
10934
  */ function firebaseModelsService(services) {
10777
10935
  var firebaseModelsServiceFunction = function firebaseModelsServiceFunction1(type, context) {
10778
10936
  var firebaseModelService = services[type];
@@ -10793,6 +10951,7 @@ function _object_spread_props$a(target, source) {
10793
10951
  * The returned factory binds a context, so callers can then select individual model services by type.
10794
10952
  *
10795
10953
  * @param service - the multi-model service to wrap
10954
+ * @returns an {@link InContextFirebaseModelsServiceFactory} that binds a context to the service
10796
10955
  */ function inContextFirebaseModelsServiceFactory(service) {
10797
10956
  var newInContextFirebaseModelsServiceFactory = function newInContextFirebaseModelsServiceFactory(context) {
10798
10957
  var result = function result(type) {
@@ -10810,6 +10969,7 @@ function _object_spread_props$a(target, source) {
10810
10969
  * @param service - the multi-model service
10811
10970
  * @param type - the model type to select
10812
10971
  * @param select - selection params including context and key
10972
+ * @returns the {@link FirebaseModelsServiceSelectionResult} bound to the specified model
10813
10973
  */ function selectFromFirebaseModelsService(service, type, select) {
10814
10974
  var key = readFirestoreModelKey(select.key, true);
10815
10975
  return service(type, select.context).forKey(key);
@@ -10822,10 +10982,12 @@ function _object_spread_props$a(target, source) {
10822
10982
  * @param service - the multi-model service
10823
10983
  * @param type - the model type to select
10824
10984
  * @param select - selection params including context, key, and optional role requirements
10985
+ * @returns a {@link UsePromiseFunction} for the resolved roles reader
10825
10986
  */ function useFirebaseModelsService(service, type, select) {
10987
+ var _select_roles;
10826
10988
  var inContextModelService = selectFromFirebaseModelsService(service, type, select);
10827
10989
  var result;
10828
- if (select.roles && select.roles.length) {
10990
+ if ((_select_roles = select.roles) === null || _select_roles === void 0 ? void 0 : _select_roles.length) {
10829
10991
  result = inContextModelService.requireUse(select.roles, select.rolesSetIncludes);
10830
10992
  } else {
10831
10993
  result = inContextModelService.use;
@@ -10839,6 +11001,7 @@ function _object_spread_props$a(target, source) {
10839
11001
  * Useful for routing incoming requests to the correct model service by collection path.
10840
11002
  *
10841
11003
  * @param inContextFirebaseModelsService - context-bound multi-model service
11004
+ * @returns a map of collection type strings to their {@link FirestoreModelIdentity} objects
10842
11005
  */ function buildFirebaseCollectionTypeModelTypeMap(inContextFirebaseModelsService) {
10843
11006
  var allTypes = inContextFirebaseModelsService.allTypes();
10844
11007
  var modelIdentities = allTypes.map(function(type) {
@@ -10865,6 +11028,7 @@ function _object_spread_props$a(target, source) {
10865
11028
  * The generated paths follow the convention `/model/[basePath/]<modelKey>/[path]`.
10866
11029
  *
10867
11030
  * @param config - optional base path to nest under
11031
+ * @returns a {@link ModelStorageSlashPathFactory} that maps Firestore model keys to storage paths
10868
11032
  *
10869
11033
  * @example
10870
11034
  * ```ts
@@ -11065,6 +11229,7 @@ function _ts_generator$7(thisArg, body) {
11065
11229
  * Wraps the folder's `list()` API with cursor-based pagination via {@link fetchPageFactory}.
11066
11230
  *
11067
11231
  * @param config - default listing options (e.g., maxResults)
11232
+ * @returns an {@link IterateStorageListFilesFactory} for paginated file listing
11068
11233
  *
11069
11234
  * @example
11070
11235
  * ```ts
@@ -11075,25 +11240,16 @@ function _ts_generator$7(thisArg, body) {
11075
11240
  return fetchPageFactory({
11076
11241
  fetch: function fetch(input) {
11077
11242
  return _async_to_generator$7(function() {
11078
- var _input_maxResults, _input_pageToken, list;
11243
+ var _input_maxResults, _input_pageToken;
11079
11244
  return _ts_generator$7(this, function(_state) {
11080
- switch(_state.label){
11081
- case 0:
11082
- return [
11083
- 4,
11084
- input.folder.list({
11085
- includeNestedResults: input.includeNestedResults,
11086
- maxResults: (_input_maxResults = input.maxResults) !== null && _input_maxResults !== void 0 ? _input_maxResults : factoryDefaultMaxResults,
11087
- pageToken: (_input_pageToken = input.pageToken) !== null && _input_pageToken !== void 0 ? _input_pageToken : undefined
11088
- })
11089
- ];
11090
- case 1:
11091
- list = _state.sent();
11092
- return [
11093
- 2,
11094
- list
11095
- ];
11096
- }
11245
+ return [
11246
+ 2,
11247
+ input.folder.list({
11248
+ includeNestedResults: input.includeNestedResults,
11249
+ maxResults: (_input_maxResults = input.maxResults) !== null && _input_maxResults !== void 0 ? _input_maxResults : factoryDefaultMaxResults,
11250
+ pageToken: (_input_pageToken = input.pageToken) !== null && _input_pageToken !== void 0 ? _input_pageToken : undefined
11251
+ })
11252
+ ];
11097
11253
  });
11098
11254
  })();
11099
11255
  },
@@ -11107,7 +11263,7 @@ function _ts_generator$7(thisArg, body) {
11107
11263
  };
11108
11264
  return info;
11109
11265
  },
11110
- buildInputForNextPage: function buildInputForNextPage(pageResult, input, options) {
11266
+ buildInputForNextPage: function buildInputForNextPage(pageResult, input, _options) {
11111
11267
  var _pageResult_nextPageCursor;
11112
11268
  return _object_spread_props$9(_object_spread$b({}, input), {
11113
11269
  pageToken: (_pageResult_nextPageCursor = pageResult.nextPageCursor) !== null && _pageResult_nextPageCursor !== void 0 ? _pageResult_nextPageCursor : undefined
@@ -11119,6 +11275,9 @@ function _ts_generator$7(thisArg, body) {
11119
11275
  * Iterates through every file in a storage folder, invoking a callback for each individual file result.
11120
11276
  *
11121
11277
  * Convenience wrapper around {@link iterateFetchPagesByEachItem} pre-configured for storage listing.
11278
+ *
11279
+ * @param input - iteration configuration including folder, listing options, and per-item callback
11280
+ * @returns the result of the paginated per-item iteration
11122
11281
  */ function iterateStorageListFilesByEachFile(input) {
11123
11282
  var folder = input.folder, includeNestedResults = input.includeNestedResults, pageToken = input.pageToken;
11124
11283
  return iterateFetchPagesByEachItem(_object_spread_props$9(_object_spread$b({}, input), {
@@ -11134,6 +11293,9 @@ function _ts_generator$7(thisArg, body) {
11134
11293
  * Iterates through pages of file results in a storage folder, invoking a callback for each page.
11135
11294
  *
11136
11295
  * Convenience wrapper around {@link iterateFetchPages} pre-configured for storage listing.
11296
+ *
11297
+ * @param input - iteration configuration including folder, listing options, and per-page callback
11298
+ * @returns the result of the paginated page-level iteration
11137
11299
  */ function iterateStorageListFiles(input) {
11138
11300
  var folder = input.folder, includeNestedResults = input.includeNestedResults, pageToken = input.pageToken;
11139
11301
  return iterateFetchPages(_object_spread_props$9(_object_spread$b({}, input), {
@@ -11212,6 +11374,7 @@ function _is_native_reflect_construct$4() {
11212
11374
  * Required when the upload input is a string, since the format (raw, base64, etc.) must be explicit.
11213
11375
  *
11214
11376
  * @param options - the upload options to extract from
11377
+ * @returns the {@link StorageDataStringType} extracted from the options
11215
11378
  * @throws {Error} When `stringFormat` is not set in the options.
11216
11379
  */ function assertStorageUploadOptionsStringFormat(options) {
11217
11380
  var stringFormat = options === null || options === void 0 ? void 0 : options.stringFormat;
@@ -11222,6 +11385,8 @@ function _is_native_reflect_construct$4() {
11222
11385
  }
11223
11386
  /**
11224
11387
  * Creates an error indicating that `stringFormat` was missing from upload options.
11388
+ *
11389
+ * @returns an {@link Error} describing the missing `stringFormat` in upload options
11225
11390
  */ function noStringFormatInStorageUploadOptionsError() {
11226
11391
  return new Error('stringFormat was missing a value in the StorageUploadOptions.');
11227
11392
  }
@@ -11378,6 +11543,7 @@ function _ts_generator$6(thisArg, body) {
11378
11543
  * @param file - the target file accessor to upload to
11379
11544
  * @param readableStream - the source stream to pipe
11380
11545
  * @param options - optional upload configuration (content type, metadata, etc.)
11546
+ * @returns a promise that resolves when the upload stream has finished
11381
11547
  * @throws {StorageFileUploadStreamUnsupportedError} When the file accessor does not support stream uploads.
11382
11548
  *
11383
11549
  * @example
@@ -11415,15 +11581,16 @@ function _ts_generator$6(thisArg, body) {
11415
11581
  * provides cursor-based pagination through the `next()` method.
11416
11582
  *
11417
11583
  * @param delegate - platform-specific implementation for extracting results
11584
+ * @returns a {@link StorageListFilesResultFactory} that normalizes raw SDK list results
11418
11585
  *
11419
11586
  * @example
11420
11587
  * ```ts
11421
11588
  * const factory = storageListFilesResultFactory(myDelegate);
11422
- * const result = factory(storage, folder, { maxResults: 50 }, rawSdkResult);
11589
+ * const result = factory({ storage, folder, options: { maxResults: 50 } }, rawSdkResult);
11423
11590
  * const files = result.files();
11424
11591
  * ```
11425
11592
  */ function storageListFilesResultFactory(delegate) {
11426
- return function(storage, folder, options, result) {
11593
+ return function(input, result) {
11427
11594
  var fileResult = function fileResult(item) {
11428
11595
  item.file = function() {
11429
11596
  return delegate.file(storage, item);
@@ -11436,12 +11603,13 @@ function _ts_generator$6(thisArg, body) {
11436
11603
  };
11437
11604
  return item;
11438
11605
  };
11606
+ var storage = input.storage, folder = input.folder, options = input.options;
11439
11607
  var hasNext = delegate.hasNext(result);
11440
11608
  var next = cachedGetter(function() {
11441
11609
  if (!hasNext) {
11442
11610
  throw storageListFilesResultHasNoNextError();
11443
11611
  }
11444
- return delegate.next(storage, options, folder, result);
11612
+ return delegate.next(input, result);
11445
11613
  });
11446
11614
  var files = cachedGetter(function() {
11447
11615
  return delegate.filesFromResult(result, folder).map(fileResult);
@@ -11469,6 +11637,8 @@ function _ts_generator$6(thisArg, body) {
11469
11637
  }
11470
11638
  /**
11471
11639
  * Creates an error thrown when `next()` is called on a list result that has no more pages.
11640
+ *
11641
+ * @returns an {@link Error} indicating there are no more pages to fetch
11472
11642
  */ function storageListFilesResultHasNoNextError() {
11473
11643
  return new Error('hasNext is false, there are no more results available.');
11474
11644
  }
@@ -11480,6 +11650,7 @@ function _ts_generator$6(thisArg, body) {
11480
11650
  * a {@link StoragePathFactory} to normalize all path inputs.
11481
11651
  *
11482
11652
  * @param drivers - the storage driver implementations to use
11653
+ * @returns a {@link FirebaseStorageContextFactory} that creates storage contexts for a given storage instance
11483
11654
  * @throws {Error} When a default bucket ID cannot be resolved from the driver or config.
11484
11655
  *
11485
11656
  * @example
@@ -11490,9 +11661,10 @@ function _ts_generator$6(thisArg, body) {
11490
11661
  * ```
11491
11662
  */ function firebaseStorageContextFactory(drivers) {
11492
11663
  return function(firebaseStorage, config) {
11664
+ var _ref;
11493
11665
  var _drivers_storageAccessorDriver_getDefaultBucket, _drivers_storageAccessorDriver;
11494
- var _ref = config !== null && config !== void 0 ? config : {}, inputDefaultBucketId = _ref.defaultBucketId, _ref_forceBucket = _ref.forceBucket, forceBucket = _ref_forceBucket === void 0 ? false : _ref_forceBucket;
11495
- var defaultBucketId = inputDefaultBucketId || ((_drivers_storageAccessorDriver_getDefaultBucket = (_drivers_storageAccessorDriver = drivers.storageAccessorDriver).getDefaultBucket) === null || _drivers_storageAccessorDriver_getDefaultBucket === void 0 ? void 0 : _drivers_storageAccessorDriver_getDefaultBucket.call(_drivers_storageAccessorDriver, firebaseStorage)) || '';
11666
+ var _ref1 = config !== null && config !== void 0 ? config : {}, inputDefaultBucketId = _ref1.defaultBucketId, _ref_forceBucket = _ref1.forceBucket, forceBucket = _ref_forceBucket === void 0 ? false : _ref_forceBucket;
11667
+ var defaultBucketId = (_ref = inputDefaultBucketId !== null && inputDefaultBucketId !== void 0 ? inputDefaultBucketId : (_drivers_storageAccessorDriver_getDefaultBucket = (_drivers_storageAccessorDriver = drivers.storageAccessorDriver).getDefaultBucket) === null || _drivers_storageAccessorDriver_getDefaultBucket === void 0 ? void 0 : _drivers_storageAccessorDriver_getDefaultBucket.call(_drivers_storageAccessorDriver, firebaseStorage)) !== null && _ref !== void 0 ? _ref : '';
11496
11668
  if (!defaultBucketId) {
11497
11669
  throw new Error('Could not resolve a default bucket id for the firebaseStorageContextFactory(). Supply a defaultBucketId.');
11498
11670
  }
@@ -11517,13 +11689,13 @@ function _ts_generator$6(thisArg, body) {
11517
11689
  };
11518
11690
  }
11519
11691
 
11520
- function _array_like_to_array$5(arr, len) {
11692
+ function _array_like_to_array$6(arr, len) {
11521
11693
  if (len == null || len > arr.length) len = arr.length;
11522
11694
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
11523
11695
  return arr2;
11524
11696
  }
11525
- function _array_without_holes$3(arr) {
11526
- if (Array.isArray(arr)) return _array_like_to_array$5(arr);
11697
+ function _array_without_holes$5(arr) {
11698
+ if (Array.isArray(arr)) return _array_like_to_array$6(arr);
11527
11699
  }
11528
11700
  function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
11529
11701
  try {
@@ -11567,10 +11739,10 @@ function _define_property$a(obj, key, value) {
11567
11739
  }
11568
11740
  return obj;
11569
11741
  }
11570
- function _iterable_to_array$3(iter) {
11742
+ function _iterable_to_array$5(iter) {
11571
11743
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
11572
11744
  }
11573
- function _non_iterable_spread$3() {
11745
+ function _non_iterable_spread$5() {
11574
11746
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11575
11747
  }
11576
11748
  function _object_spread$a(target) {
@@ -11607,16 +11779,16 @@ function _object_spread_props$8(target, source) {
11607
11779
  }
11608
11780
  return target;
11609
11781
  }
11610
- function _to_consumable_array$3(arr) {
11611
- return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$3();
11782
+ function _to_consumable_array$5(arr) {
11783
+ return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$5();
11612
11784
  }
11613
- function _unsupported_iterable_to_array$5(o, minLen) {
11785
+ function _unsupported_iterable_to_array$6(o, minLen) {
11614
11786
  if (!o) return;
11615
- if (typeof o === "string") return _array_like_to_array$5(o, minLen);
11787
+ if (typeof o === "string") return _array_like_to_array$6(o, minLen);
11616
11788
  var n = Object.prototype.toString.call(o).slice(8, -1);
11617
11789
  if (n === "Object" && o.constructor) n = o.constructor.name;
11618
11790
  if (n === "Map" || n === "Set") return Array.from(n);
11619
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
11791
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
11620
11792
  }
11621
11793
  function _ts_generator$5(thisArg, body) {
11622
11794
  var f, y, t, _ = {
@@ -11724,6 +11896,7 @@ function _ts_generator$5(thisArg, body) {
11724
11896
  * e.g., to silently handle deletion of already-deleted files.
11725
11897
  *
11726
11898
  * @param input - the error or error message to check
11899
+ * @returns `true` if the error message contains `'storage/object-not-found'`, `false` otherwise
11727
11900
  *
11728
11901
  * @example
11729
11902
  * ```ts
@@ -11743,6 +11916,7 @@ function _ts_generator$5(thisArg, body) {
11743
11916
  *
11744
11917
  * @param storage - the client Firebase Storage instance
11745
11918
  * @param path - abstract storage path to resolve
11919
+ * @returns a `StorageReference` pointing to the resolved storage path
11746
11920
  */ function firebaseStorageRefForStorageFilePath(storage, path) {
11747
11921
  return ref(storage, firebaseStorageFilePathFromStorageFilePath(path));
11748
11922
  }
@@ -11752,6 +11926,7 @@ function _ts_generator$5(thisArg, body) {
11752
11926
  * Returns `true` if metadata is successfully retrieved, `false` for any error (including permission errors).
11753
11927
  *
11754
11928
  * @param ref - the storage reference to check
11929
+ * @returns a promise that resolves to `true` if the file exists, `false` otherwise
11755
11930
  */ function firebaseStorageFileExists(ref) {
11756
11931
  return getMetadata(ref).then(function(_) {
11757
11932
  return true;
@@ -11767,6 +11942,7 @@ function _ts_generator$5(thisArg, body) {
11767
11942
  *
11768
11943
  * @param storage - the client Firebase Storage instance
11769
11944
  * @param storagePath - the abstract storage path for the file
11945
+ * @returns a {@link FirebaseStorageClientAccessorFile} providing CRUD and upload operations for the given path
11770
11946
  *
11771
11947
  * @example
11772
11948
  * ```ts
@@ -11783,7 +11959,7 @@ function _ts_generator$5(thisArg, body) {
11783
11959
  contentEncoding: (_options_metadata2 = options.metadata) === null || _options_metadata2 === void 0 ? void 0 : _options_metadata2.contentEncoding,
11784
11960
  contentLanguage: (_options_metadata3 = options.metadata) === null || _options_metadata3 === void 0 ? void 0 : _options_metadata3.contentLanguage,
11785
11961
  contentType: (_options_metadata4 = options.metadata) === null || _options_metadata4 === void 0 ? void 0 : _options_metadata4.contentType,
11786
- customMetadata: filterUndefinedValues(_object_spread$a({}, (_options_metadata5 = options.metadata) === null || _options_metadata5 === void 0 ? void 0 : _options_metadata5.customMetadata, options === null || options === void 0 ? void 0 : options.customMetadata))
11962
+ customMetadata: filterUndefinedValues(_object_spread$a({}, (_options_metadata5 = options.metadata) === null || _options_metadata5 === void 0 ? void 0 : _options_metadata5.customMetadata, options.customMetadata))
11787
11963
  });
11788
11964
  }
11789
11965
  function uploadMetadataFromStorageUploadOptions(options) {
@@ -11912,7 +12088,8 @@ function _ts_generator$5(thisArg, body) {
11912
12088
  nextPageTokenFromResult: function nextPageTokenFromResult(result) {
11913
12089
  return result.listResult.nextPageToken;
11914
12090
  },
11915
- next: function next(storage, options, folder, result) {
12091
+ next: function next(param, result) {
12092
+ var options = param.options, folder = param.folder;
11916
12093
  return folder.list(_object_spread_props$8(_object_spread$a({}, options, result.options), {
11917
12094
  pageToken: result.listResult.nextPageToken
11918
12095
  }));
@@ -11954,6 +12131,7 @@ function _ts_generator$5(thisArg, body) {
11954
12131
  *
11955
12132
  * @param storage - the client Firebase Storage instance
11956
12133
  * @param storagePath - the abstract storage path for the folder
12134
+ * @returns a {@link FirebaseStorageClientAccessorFolder} providing listing and existence operations for the given path
11957
12135
  *
11958
12136
  * @example
11959
12137
  * ```ts
@@ -11982,7 +12160,11 @@ function _ts_generator$5(thisArg, body) {
11982
12160
  return [
11983
12161
  4,
11984
12162
  list(ref, options).then(function(listResult) {
11985
- return firebaseStorageClientListFilesResultFactory(storage, folder, options, {
12163
+ return firebaseStorageClientListFilesResultFactory({
12164
+ storage: storage,
12165
+ folder: folder,
12166
+ options: options
12167
+ }, {
11986
12168
  options: options,
11987
12169
  listResult: listResult
11988
12170
  });
@@ -12009,7 +12191,7 @@ function _ts_generator$5(thisArg, body) {
12009
12191
  case 2:
12010
12192
  allNestedFolderFileResults = _state.sent();
12011
12193
  allNestedFiles = allNestedFolderFileResults.flat();
12012
- allFiles = _to_consumable_array$3(allImmediateFiles).concat(_to_consumable_array$3(allNestedFiles));
12194
+ allFiles = _to_consumable_array$5(allImmediateFiles).concat(_to_consumable_array$5(allNestedFiles));
12013
12195
  result = _object_spread_props$8(_object_spread$a({}, rootResults), {
12014
12196
  files: function files() {
12015
12197
  return allFiles;
@@ -12045,6 +12227,8 @@ function _ts_generator$5(thisArg, body) {
12045
12227
  * Provides file and folder accessor factories and default bucket resolution.
12046
12228
  * Used internally by {@link firebaseStorageClientDrivers}.
12047
12229
  *
12230
+ * @returns a {@link FirebaseStorageAccessorDriver} backed by the `firebase/storage` client SDK
12231
+ *
12048
12232
  * @example
12049
12233
  * ```ts
12050
12234
  * const driver = firebaseStorageClientAccessorDriver();
@@ -12072,6 +12256,8 @@ function _ts_generator$5(thisArg, body) {
12072
12256
  *
12073
12257
  * Provides file and folder accessor operations for use with {@link clientFirebaseStorageContextFactory}.
12074
12258
  *
12259
+ * @returns the client-side {@link FirebaseStorageClientDrivers} for the `firebase/storage` SDK
12260
+ *
12075
12261
  * @example
12076
12262
  * ```ts
12077
12263
  * const drivers = firebaseStorageClientDrivers();
@@ -12130,6 +12316,7 @@ function _ts_generator$5(thisArg, body) {
12130
12316
  * by combining the given user model identity with the provided UID.
12131
12317
  *
12132
12318
  * @param userModelIdentity - the root identity for user models (e.g., `profileIdentity`)
12319
+ * @returns a function that generates a {@link NotificationSummaryId} for a given user UID
12133
12320
  *
12134
12321
  * @example
12135
12322
  * ```ts
@@ -12153,9 +12340,9 @@ function _ts_generator$5(thisArg, body) {
12153
12340
  /**
12154
12341
  * Creates a NotificationTaskUniqueId from the input model id and task type.
12155
12342
  *
12156
- * @param input model id input
12157
- * @param taskType task type
12158
- * @returns NotificationTaskUniqueId
12343
+ * @param input - model id input
12344
+ * @param taskType - task type
12345
+ * @returns the unique notification task id combining the model id and task type
12159
12346
  */ function notificationTaskUniqueId(input, taskType) {
12160
12347
  return "".concat(firestoreModelId(input), "_").concat(taskType); // combineation of model id and template type
12161
12348
  }
@@ -12210,6 +12397,10 @@ function _object_spread_props$7(target, source) {
12210
12397
  /**
12211
12398
  * Merges two {@link NotificationBoxRecipientTemplateConfig} objects, preferring values from `a` over `b`.
12212
12399
  *
12400
+ * @param a - primary config whose defined values take precedence
12401
+ * @param b - fallback config supplying values when `a` fields are undefined
12402
+ * @returns the merged template config with values from `a` preferred over `b`
12403
+ *
12213
12404
  * @example
12214
12405
  * ```ts
12215
12406
  * const merged = mergeNotificationBoxRecipientTemplateConfigs(
@@ -12234,6 +12425,9 @@ function _object_spread_props$7(target, source) {
12234
12425
  *
12235
12426
  * This produces the "effective" configuration used at send time, where each channel has a definite boolean.
12236
12427
  *
12428
+ * @param a - the template config to resolve
12429
+ * @returns the effective config with each channel flag filled in using the send-default fallback
12430
+ *
12237
12431
  * @example
12238
12432
  * ```ts
12239
12433
  * const effective = effectiveNotificationBoxRecipientTemplateConfig({ sd: true, se: false });
@@ -12253,6 +12447,10 @@ function _object_spread_props$7(target, source) {
12253
12447
  * Updates a {@link NotificationRecipient} with partial values, preserving existing fields where the update is undefined.
12254
12448
  *
12255
12449
  * Automatically clears the summary ID (`s`) when a `uid` is present.
12450
+ *
12451
+ * @param a - existing recipient to update
12452
+ * @param b - partial values to apply on top of the existing recipient
12453
+ * @returns the updated recipient with merged values
12256
12454
  */ function updateNotificationRecipient(a, b) {
12257
12455
  var inputUid = b.uid, inputN = b.n, inputE = b.e, inputT = b.t, inputS = b.s;
12258
12456
  var uid = updateMaybeValue(a.uid, inputUid);
@@ -12304,6 +12502,7 @@ function _object_spread_props$7(target, source) {
12304
12502
  *
12305
12503
  * @param uid - the user's Firebase auth UID
12306
12504
  * @param i - the recipient's index position in the box's recipient array
12505
+ * @returns a new recipient entry with the given uid and index and an empty template config record
12307
12506
  */ function newNotificationBoxRecipientForUid(uid, i) {
12308
12507
  return {
12309
12508
  c: {},
@@ -12313,6 +12512,10 @@ function _object_spread_props$7(target, source) {
12313
12512
  }
12314
12513
  /**
12315
12514
  * Merges two {@link NotificationUserDefaultNotificationBoxRecipientConfig} objects, preferring defined values from `a` over `b`.
12515
+ *
12516
+ * @param a - primary config whose defined values take precedence
12517
+ * @param b - fallback config supplying values when `a` fields are undefined
12518
+ * @returns the merged config
12316
12519
  */ function mergeNotificationUserDefaultNotificationBoxRecipientConfig(a, b) {
12317
12520
  var c = mergeNotificationBoxRecipientTemplateConfigRecords(a.c, b.c);
12318
12521
  var result = _object_spread_props$7(_object_spread$9({}, mergeObjects([
@@ -12343,6 +12546,10 @@ function _object_spread_props$7(target, source) {
12343
12546
  })(NotificationBoxRecipientTemplateConfigBoolean || (NotificationBoxRecipientTemplateConfigBoolean = {}));
12344
12547
  /**
12345
12548
  * Merges two {@link NotificationBoxRecipientTemplateConfigRecord} objects, preferring defined values from `a`.
12549
+ *
12550
+ * @param a - primary record whose defined values take precedence
12551
+ * @param b - fallback record supplying values when `a` entries are undefined
12552
+ * @returns the merged template config record
12346
12553
  */ function mergeNotificationBoxRecipientTemplateConfigRecords(a, b) {
12347
12554
  var mergeConfigs = mergeObjectsFunction(KeyValueTypleValueFilter.UNDEFINED);
12348
12555
  return mergeConfigs([
@@ -12404,6 +12611,8 @@ var notificationBoxRecipientTemplateConfigDencoder = bitwiseObjectDencoder({
12404
12611
  /**
12405
12612
  * Creates a Firestore field converter for {@link NotificationBoxRecipientTemplateConfigRecord},
12406
12613
  * using bitwise encoding for compact storage.
12614
+ *
12615
+ * @returns a Firestore field converter that encodes and decodes template config records using bitwise encoding
12407
12616
  */ function firestoreNotificationBoxRecipientTemplateConfigRecord() {
12408
12617
  return firestoreBitwiseObjectMap({
12409
12618
  dencoder: notificationBoxRecipientTemplateConfigDencoder
@@ -12493,6 +12702,9 @@ var notificationBoxRecipientTemplateConfigDencoder = bitwiseObjectDencoder({
12493
12702
  /**
12494
12703
  * Converts a {@link NotificationBoxRecipientTemplateConfigRecord} to an array of entries with their type keys.
12495
12704
  *
12705
+ * @param input - the template config record to convert
12706
+ * @returns an array of entries each containing a type key and the corresponding channel config
12707
+ *
12496
12708
  * @example
12497
12709
  * ```ts
12498
12710
  * const array = notificationBoxRecipientTemplateConfigRecordToArray({ 'comment': { se: true } });
@@ -12511,6 +12723,9 @@ var notificationBoxRecipientTemplateConfigDencoder = bitwiseObjectDencoder({
12511
12723
  }
12512
12724
  /**
12513
12725
  * Converts a {@link NotificationBoxRecipientTemplateConfigArray} back to a {@link NotificationBoxRecipientTemplateConfigRecord}.
12726
+ *
12727
+ * @param input - the array of typed config entries to convert
12728
+ * @returns a record keyed by template type
12514
12729
  */ function notificationBoxRecipientTemplateConfigArrayToRecord(input) {
12515
12730
  var map = {};
12516
12731
  input.forEach(function(x) {
@@ -12553,6 +12768,7 @@ var notificationBoxRecipientTemplateConfigDencoder = bitwiseObjectDencoder({
12553
12768
  *
12554
12769
  * @param items - notification items to classify
12555
12770
  * @param considerReadIfCreatedBefore - optional cutoff date; items created at or before this date are treated as read
12771
+ * @returns an object containing both the read and unread item arrays along with the input cutoff date
12556
12772
  *
12557
12773
  * @example
12558
12774
  * ```ts
@@ -12696,11 +12912,17 @@ var NotificationUserDocument = /*#__PURE__*/ function(AbstractFirestoreDocument)
12696
12912
  });
12697
12913
  /**
12698
12914
  * Creates a Firestore collection reference for {@link NotificationUser} documents.
12915
+ *
12916
+ * @param context - Firestore context to create the collection reference from
12917
+ * @returns a typed collection reference for NotificationUser documents
12699
12918
  */ function notificationUserCollectionReference(context) {
12700
12919
  return context.collection(notificationUserIdentity.collectionName);
12701
12920
  }
12702
12921
  /**
12703
12922
  * Creates a typed {@link NotificationUserFirestoreCollection} bound to the given Firestore context.
12923
+ *
12924
+ * @param firestoreContext - Firestore context to bind the collection to
12925
+ * @returns a typed Firestore collection for NotificationUser documents
12704
12926
  */ function notificationUserFirestoreCollection(firestoreContext) {
12705
12927
  return firestoreContext.firestoreCollection({
12706
12928
  modelIdentity: notificationUserIdentity,
@@ -12763,11 +12985,17 @@ var NotificationSummaryDocument = /*#__PURE__*/ function(AbstractFirestoreDocume
12763
12985
  });
12764
12986
  /**
12765
12987
  * Creates a Firestore collection reference for {@link NotificationSummary} documents.
12988
+ *
12989
+ * @param context - Firestore context to create the collection reference from
12990
+ * @returns a typed collection reference for NotificationSummary documents
12766
12991
  */ function notificationSummaryCollectionReference(context) {
12767
12992
  return context.collection(notificationSummaryIdentity.collectionName);
12768
12993
  }
12769
12994
  /**
12770
12995
  * Creates a typed {@link NotificationSummaryFirestoreCollection} bound to the given Firestore context.
12996
+ *
12997
+ * @param firestoreContext - Firestore context to bind the collection to
12998
+ * @returns a typed Firestore collection for NotificationSummary documents
12771
12999
  */ function notificationSummaryFirestoreCollection(firestoreContext) {
12772
13000
  return firestoreContext.firestoreCollection({
12773
13001
  modelIdentity: notificationSummaryIdentity,
@@ -12830,11 +13058,17 @@ var NotificationBoxDocument = /*#__PURE__*/ function(AbstractFirestoreDocument)
12830
13058
  });
12831
13059
  /**
12832
13060
  * Creates a Firestore collection reference for {@link NotificationBox} documents.
13061
+ *
13062
+ * @param context - Firestore context to create the collection reference from
13063
+ * @returns a typed collection reference for NotificationBox documents
12833
13064
  */ function notificationBoxCollectionReference(context) {
12834
13065
  return context.collection(notificationBoxIdentity.collectionName);
12835
13066
  }
12836
13067
  /**
12837
13068
  * Creates a typed {@link NotificationBoxFirestoreCollection} bound to the given Firestore context.
13069
+ *
13070
+ * @param firestoreContext - Firestore context to bind the collection to
13071
+ * @returns a typed Firestore collection for NotificationBox documents
12838
13072
  */ function notificationBoxFirestoreCollection(firestoreContext) {
12839
13073
  return firestoreContext.firestoreCollection({
12840
13074
  modelIdentity: notificationBoxIdentity,
@@ -13002,6 +13236,9 @@ var NotificationDocument = /*#__PURE__*/ function(AbstractFirestoreDocumentWithP
13002
13236
  });
13003
13237
  /**
13004
13238
  * Creates a factory that produces {@link Notification} subcollection references for a given {@link NotificationBoxDocument} parent.
13239
+ *
13240
+ * @param context - Firestore context to create subcollection references from
13241
+ * @returns a factory function that creates collection references for a given NotificationBox parent
13005
13242
  */ function notificationCollectionReferenceFactory(context) {
13006
13243
  return function(notificationBox) {
13007
13244
  return context.subcollection(notificationBox.documentRef, notificationIdentity.collectionName);
@@ -13009,6 +13246,9 @@ var NotificationDocument = /*#__PURE__*/ function(AbstractFirestoreDocumentWithP
13009
13246
  }
13010
13247
  /**
13011
13248
  * Creates a {@link NotificationFirestoreCollectionFactory} bound to the given Firestore context.
13249
+ *
13250
+ * @param firestoreContext - Firestore context to bind the collection factory to
13251
+ * @returns a factory that creates typed Firestore subcollections for Notification documents
13012
13252
  */ function notificationFirestoreCollectionFactory(firestoreContext) {
13013
13253
  var factory = notificationCollectionReferenceFactory(firestoreContext);
13014
13254
  return function(parent) {
@@ -13026,11 +13266,17 @@ var NotificationDocument = /*#__PURE__*/ function(AbstractFirestoreDocumentWithP
13026
13266
  }
13027
13267
  /**
13028
13268
  * Creates a collection group reference for querying all {@link Notification} documents across all {@link NotificationBox} parents.
13269
+ *
13270
+ * @param context - Firestore context to create the collection group reference from
13271
+ * @returns a typed collection group for querying Notification documents across all parents
13029
13272
  */ function notificationCollectionReference(context) {
13030
13273
  return context.collectionGroup(notificationIdentity.collectionName);
13031
13274
  }
13032
13275
  /**
13033
13276
  * Creates a typed {@link NotificationFirestoreCollectionGroup} bound to the given Firestore context.
13277
+ *
13278
+ * @param firestoreContext - Firestore context to bind the collection group to
13279
+ * @returns a typed Firestore collection group for querying Notification documents across all parents
13034
13280
  */ function notificationFirestoreCollectionGroup(firestoreContext) {
13035
13281
  return firestoreContext.firestoreCollectionGroup({
13036
13282
  modelIdentity: notificationIdentity,
@@ -13079,6 +13325,9 @@ var NotificationWeekDocument = /*#__PURE__*/ function(AbstractFirestoreDocumentW
13079
13325
  });
13080
13326
  /**
13081
13327
  * Creates a factory that produces {@link NotificationWeek} subcollection references for a given {@link NotificationBoxDocument} parent.
13328
+ *
13329
+ * @param context - Firestore context to create subcollection references from
13330
+ * @returns a factory function that creates collection references for a given NotificationBox parent
13082
13331
  */ function notificationWeekCollectionReferenceFactory(context) {
13083
13332
  return function(notificationBox) {
13084
13333
  return context.subcollection(notificationBox.documentRef, notificationWeekIdentity.collectionName);
@@ -13086,6 +13335,9 @@ var NotificationWeekDocument = /*#__PURE__*/ function(AbstractFirestoreDocumentW
13086
13335
  }
13087
13336
  /**
13088
13337
  * Creates a {@link NotificationWeekFirestoreCollectionFactory} bound to the given Firestore context.
13338
+ *
13339
+ * @param firestoreContext - Firestore context to bind the collection factory to
13340
+ * @returns a factory that creates typed Firestore subcollections for NotificationWeek documents
13089
13341
  */ function notificationWeekFirestoreCollectionFactory(firestoreContext) {
13090
13342
  var factory = notificationWeekCollectionReferenceFactory(firestoreContext);
13091
13343
  return function(parent) {
@@ -13103,11 +13355,17 @@ var NotificationWeekDocument = /*#__PURE__*/ function(AbstractFirestoreDocumentW
13103
13355
  }
13104
13356
  /**
13105
13357
  * Creates a collection group reference for querying all {@link NotificationWeek} documents across all {@link NotificationBox} parents.
13358
+ *
13359
+ * @param context - Firestore context to create the collection group reference from
13360
+ * @returns a typed collection group for querying NotificationWeek documents across all parents
13106
13361
  */ function notificationWeekCollectionReference(context) {
13107
13362
  return context.collectionGroup(notificationWeekIdentity.collectionName);
13108
13363
  }
13109
13364
  /**
13110
13365
  * Creates a typed {@link NotificationWeekFirestoreCollectionGroup} bound to the given Firestore context.
13366
+ *
13367
+ * @param firestoreContext - Firestore context to bind the collection group to
13368
+ * @returns a typed Firestore collection group for querying NotificationWeek documents across all parents
13111
13369
  */ function notificationWeekFirestoreCollectionGroup(firestoreContext) {
13112
13370
  return firestoreContext.firestoreCollectionGroup({
13113
13371
  modelIdentity: notificationWeekIdentity,
@@ -13252,16 +13510,42 @@ var notificationBoxModelCrudFunctionsConfig = {
13252
13510
  *
13253
13511
  * Error code constants thrown by the notification server action service.
13254
13512
  * These codes are returned in Firebase function error responses for client-side handling.
13255
- */ /** Thrown when a notification creation request is missing a required ID. */ var CREATE_NOTIFICATION_ID_REQUIRED_ERROR_CODE = 'CREATE_NOTIFICATION_ID_REQUIRED';
13256
- /** Thrown when attempting to initialize a NotificationBox or NotificationSummary that is already initialized. */ var NOTIFICATION_MODEL_ALREADY_INITIALIZED_ERROR_CODE = 'NOTIFICATION_MODEL_ALREADY_INITIALIZED';
13257
- /** Thrown when the target NotificationBox does not exist. */ var NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE = 'NOTIFICATION_BOX_DOES_NOT_EXIST';
13258
- /** Thrown when attempting to create a NotificationBox for a model that already has one. */ var NOTIFICATION_BOX_EXISTS_FOR_MODEL_ERROR_CODE = 'NOTIFICATION_BOX_EXISTS_FOR_MODEL';
13259
- /** Thrown when the target recipient does not exist in the NotificationBox. */ var NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST_ERROR_CODE = 'NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST';
13260
- /** Thrown when an exclusion target is invalid (e.g., user not associated with the box). */ var NOTIFICATION_BOX_EXCLUSION_TARGET_INVALID_ERROR_CODE = 'NOTIFICATION_BOX_EXCLUSION_TARGET_INVALID';
13261
- /** Thrown when the UID provided for NotificationUser creation is invalid. */ var NOTIFICATION_USER_INVALID_UID_FOR_CREATE_ERROR_CODE = 'NOTIFICATION_USER_INVALID_UID_FOR_CREATE';
13262
- /** Thrown when attempting to add a user who has blocked themselves from being added as a recipient. */ var NOTIFICATION_USER_BLOCKED_FROM_BEING_ADD_TO_RECIPIENTS_ERROR_CODE = 'NOTIFICATION_USER_BLOCKED_FROM_BEING_ADD_TO_RECIPIENTS';
13263
- /** Thrown when attempting to update a recipient config that is locked by the user. */ var NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED_ERROR_CODE = 'NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED';
13513
+ */ /**
13514
+ * Thrown when a notification creation request is missing a required ID.
13515
+ */ var CREATE_NOTIFICATION_ID_REQUIRED_ERROR_CODE = 'CREATE_NOTIFICATION_ID_REQUIRED';
13516
+ /**
13517
+ * Thrown when attempting to initialize a NotificationBox or NotificationSummary that is already initialized.
13518
+ */ var NOTIFICATION_MODEL_ALREADY_INITIALIZED_ERROR_CODE = 'NOTIFICATION_MODEL_ALREADY_INITIALIZED';
13519
+ /**
13520
+ * Thrown when the target NotificationBox does not exist.
13521
+ */ var NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE = 'NOTIFICATION_BOX_DOES_NOT_EXIST';
13522
+ /**
13523
+ * Thrown when attempting to create a NotificationBox for a model that already has one.
13524
+ */ var NOTIFICATION_BOX_EXISTS_FOR_MODEL_ERROR_CODE = 'NOTIFICATION_BOX_EXISTS_FOR_MODEL';
13525
+ /**
13526
+ * Thrown when the target recipient does not exist in the NotificationBox.
13527
+ */ var NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST_ERROR_CODE = 'NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST';
13528
+ /**
13529
+ * Thrown when an exclusion target is invalid (e.g., user not associated with the box).
13530
+ */ var NOTIFICATION_BOX_EXCLUSION_TARGET_INVALID_ERROR_CODE = 'NOTIFICATION_BOX_EXCLUSION_TARGET_INVALID';
13531
+ /**
13532
+ * Thrown when the UID provided for NotificationUser creation is invalid.
13533
+ */ var NOTIFICATION_USER_INVALID_UID_FOR_CREATE_ERROR_CODE = 'NOTIFICATION_USER_INVALID_UID_FOR_CREATE';
13534
+ /**
13535
+ * Thrown when attempting to add a user who has blocked themselves from being added as a recipient.
13536
+ */ var NOTIFICATION_USER_BLOCKED_FROM_BEING_ADD_TO_RECIPIENTS_ERROR_CODE = 'NOTIFICATION_USER_BLOCKED_FROM_BEING_ADD_TO_RECIPIENTS';
13537
+ /**
13538
+ * Thrown when attempting to update a recipient config that is locked by the user.
13539
+ */ var NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED_ERROR_CODE = 'NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED';
13264
13540
 
13541
+ function _array_like_to_array$5(arr, len) {
13542
+ if (len == null || len > arr.length) len = arr.length;
13543
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
13544
+ return arr2;
13545
+ }
13546
+ function _array_without_holes$4(arr) {
13547
+ if (Array.isArray(arr)) return _array_like_to_array$5(arr);
13548
+ }
13265
13549
  function _define_property$8(obj, key, value) {
13266
13550
  if (key in obj) {
13267
13551
  Object.defineProperty(obj, key, {
@@ -13275,6 +13559,12 @@ function _define_property$8(obj, key, value) {
13275
13559
  }
13276
13560
  return obj;
13277
13561
  }
13562
+ function _iterable_to_array$4(iter) {
13563
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
13564
+ }
13565
+ function _non_iterable_spread$4() {
13566
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
13567
+ }
13278
13568
  function _object_spread$8(target) {
13279
13569
  for(var i = 1; i < arguments.length; i++){
13280
13570
  var source = arguments[i] != null ? arguments[i] : {};
@@ -13309,6 +13599,17 @@ function _object_spread_props$6(target, source) {
13309
13599
  }
13310
13600
  return target;
13311
13601
  }
13602
+ function _to_consumable_array$4(arr) {
13603
+ return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$4();
13604
+ }
13605
+ function _unsupported_iterable_to_array$5(o, minLen) {
13606
+ if (!o) return;
13607
+ if (typeof o === "string") return _array_like_to_array$5(o, minLen);
13608
+ var n = Object.prototype.toString.call(o).slice(8, -1);
13609
+ if (n === "Object" && o.constructor) n = o.constructor.name;
13610
+ if (n === "Map" || n === "Set") return Array.from(n);
13611
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
13612
+ }
13312
13613
  /**
13313
13614
  * Applies an array of config entry params to a {@link NotificationBoxRecipientTemplateConfigRecord},
13314
13615
  * inserting new entries, merging updates, and removing entries marked with `remove: true`.
@@ -13316,31 +13617,29 @@ function _object_spread_props$6(target, source) {
13316
13617
  * @param a - existing config record
13317
13618
  * @param b - array of update params to apply
13318
13619
  * @param limitToAllowedConfigTypes - when provided, filters the result to only include these template types
13620
+ * @returns the updated config record, or undefined if no changes were made
13319
13621
  */ function updateNotificationBoxRecipientTemplateConfigRecord(a, b, limitToAllowedConfigTypes) {
13320
- var c;
13321
- if (b != null) {
13322
- var cArray = notificationBoxRecipientTemplateConfigRecordToArray(a);
13323
- var updatedC = ModelRelationUtility.insertCollection(cArray, b, {
13324
- readKey: function readKey(x) {
13325
- return x.type;
13326
- },
13327
- merge: function merge(x, y) {
13328
- return _object_spread$8({}, x, y);
13329
- }
13330
- });
13331
- // remove types marked as remove
13332
- updatedC = ModelRelationUtility.removeKeysFromCollection(updatedC, b.filter(function(x) {
13333
- return x.remove;
13334
- }).map(function(x) {
13335
- return x.type;
13336
- }), function(x) {
13622
+ var cArray = notificationBoxRecipientTemplateConfigRecordToArray(a);
13623
+ var updatedC = ModelRelationUtility.insertCollection(cArray, b, {
13624
+ readKey: function readKey(x) {
13337
13625
  return x.type;
13338
- });
13339
- c = notificationBoxRecipientTemplateConfigArrayToRecord(updatedC);
13340
- // if the config types are limited to specific types, then filter those only
13341
- if (limitToAllowedConfigTypes) {
13342
- c = filterKeysOnPOJOFunction(limitToAllowedConfigTypes)(c);
13626
+ },
13627
+ merge: function merge(x, y) {
13628
+ return _object_spread$8({}, x, y);
13343
13629
  }
13630
+ });
13631
+ // remove types marked as remove
13632
+ updatedC = ModelRelationUtility.removeKeysFromCollection(updatedC, b.filter(function(x) {
13633
+ return x.remove;
13634
+ }).map(function(x) {
13635
+ return x.type;
13636
+ }), function(x) {
13637
+ return x.type;
13638
+ });
13639
+ var c = notificationBoxRecipientTemplateConfigArrayToRecord(updatedC);
13640
+ // if the config types are limited to specific types, then filter those only
13641
+ if (limitToAllowedConfigTypes) {
13642
+ c = filterKeysOnPOJOFunction(limitToAllowedConfigTypes)(c);
13344
13643
  }
13345
13644
  return c;
13346
13645
  }
@@ -13351,6 +13650,7 @@ function _object_spread_props$6(target, source) {
13351
13650
  * @param a - existing config
13352
13651
  * @param b - update params to apply
13353
13652
  * @param limitToAllowedConfigTypes - when provided, filters config types to only allowed template types
13653
+ * @returns the updated default recipient config
13354
13654
  */ function updateNotificationUserDefaultNotificationBoxRecipientConfig(a, b, limitToAllowedConfigTypes) {
13355
13655
  var _ref;
13356
13656
  var inputC = b.configs, inputF = b.f, inputBk = b.bk, inputLk = b.lk;
@@ -13367,6 +13667,11 @@ function _object_spread_props$6(target, source) {
13367
13667
  * only if it actually changed. Returns `undefined` if no changes were detected.
13368
13668
  *
13369
13669
  * Automatically sets `ns = true` (needs sync) when changes are detected and the recipient has been indexed.
13670
+ *
13671
+ * @param a - existing per-box recipient config
13672
+ * @param b - update params to apply
13673
+ * @param limitToAllowedConfigTypes - when provided, filters template config types to only allowed types
13674
+ * @returns the updated config if changes were detected, or undefined if no changes occurred
13370
13675
  */ function updateNotificationUserNotificationBoxRecipientConfigIfChanged(a, b, limitToAllowedConfigTypes) {
13371
13676
  var _ref;
13372
13677
  var inputC = b.configs, inputRm = b.rm, inputLk = b.lk, inputBk = b.bk;
@@ -13397,6 +13702,11 @@ function _object_spread_props$6(target, source) {
13397
13702
  * through the optional {@link AppNotificationTemplateTypeInfoRecordService}.
13398
13703
  *
13399
13704
  * Returns `undefined` if no changes were made.
13705
+ *
13706
+ * @param a - existing per-box recipient config array
13707
+ * @param b - array of update params to apply to matching boxes
13708
+ * @param filterWithService - optional service used to filter template types to only those valid for each box's model
13709
+ * @returns the updated config array if any changes occurred, or undefined if nothing changed
13400
13710
  */ function updateNotificationUserNotificationBoxRecipientConfigs(a, b, filterWithService) {
13401
13711
  var boxesMap = makeModelMap(a, function(x) {
13402
13712
  return x.nb;
@@ -13426,7 +13736,7 @@ function _object_spread_props$6(target, source) {
13426
13736
  });
13427
13737
  var result;
13428
13738
  if (hasChanges) {
13429
- result = Array.from(boxesMap.values());
13739
+ result = _to_consumable_array$4(boxesMap.values());
13430
13740
  }
13431
13741
  return result;
13432
13742
  }
@@ -13565,6 +13875,9 @@ function _ts_generator$4(thisArg, body) {
13565
13875
  *
13566
13876
  * Maps friendly field names (`subject`, `message`, `createdBy`, etc.) to their Firestore abbreviations
13567
13877
  * and filters out null/undefined metadata values.
13878
+ *
13879
+ * @param input - friendly input with readable field names
13880
+ * @returns the low-level template using Firestore field abbreviations
13568
13881
  */ function createNotificationTemplate(input) {
13569
13882
  var _ref, _ref1;
13570
13883
  var inputNotificationModel = input.notificationModel, type = input.type, unique = input.unique, overrideExistingTask = input.overrideExistingTask, // notification
@@ -13611,6 +13924,9 @@ function _ts_generator$4(thisArg, body) {
13611
13924
  * Determines whether a notification should be created based on the explicit toggle and throttle settings.
13612
13925
  *
13613
13926
  * Returns false if `sendNotification` is explicitly false, or if the throttle window hasn't elapsed.
13927
+ *
13928
+ * @param input - the send control parameters including the toggle and throttle configuration
13929
+ * @returns true if the notification should be created and sent
13614
13930
  */ function shouldSendCreatedNotificationInput(input) {
13615
13931
  var sendNotification = input.sendNotification, sendNotificationThrottleDate = input.sendNotificationThrottleDate, inputSendNotificationThrottleTime = input.sendNotificationThrottleTime;
13616
13932
  var sendNotificationThrottleTime = inputSendNotificationThrottleTime !== null && inputSendNotificationThrottleTime !== void 0 ? inputSendNotificationThrottleTime : MS_IN_HOUR;
@@ -13624,6 +13940,8 @@ function _ts_generator$4(thisArg, body) {
13624
13940
  *
13625
13941
  * For unique task notifications, generates a deterministic document ID from the target model and task type.
13626
13942
  *
13943
+ * @param input - the creation parameters including template, context, and accessor
13944
+ * @returns the document reference and notification data pair, with `notificationCreated` set to false
13627
13945
  * @throws {Error} When neither an accessor nor sufficient context is provided
13628
13946
  * @throws {Error} When `unique=true` but no target model is specified
13629
13947
  */ function createNotificationDocumentPair(input) {
@@ -13632,15 +13950,13 @@ function _ts_generator$4(thisArg, body) {
13632
13950
  var notificationModel = template.notificationModel, inputCat = template.cat, st = template.st, sat = template.sat, r = template.r, rf = template.rf, n = template.n, ts = template.ts, es = template.es, ps = template.ps, ns = template.ns, ois = template.ois, ots = template.ots, tpr = template.tpr, inputUnique = template.unique, inputOverrideExistingTask = template.overrideExistingTask;
13633
13951
  /**
13634
13952
  * Use the input, or default to true if inputUnique is true.
13635
- */ var overrideExistingTask = inputOverrideExistingTask != null ? inputOverrideExistingTask : inputUnique ? true : undefined;
13953
+ */ var overrideExistingTask = inputOverrideExistingTask !== null && inputOverrideExistingTask !== void 0 ? inputOverrideExistingTask : inputUnique ? true : undefined;
13636
13954
  var accessor = inputAccessor;
13637
13955
  var notificationBoxId = notificationBoxIdForModel(notificationModel);
13638
- if (!accessor && notificationBoxId) {
13639
- if (context) {
13640
- var notificationCollectionFactory = context.notificationCollectionFactory, notificationBoxCollection = context.notificationBoxCollection;
13641
- var notificationBoxDocument = notificationBoxCollection.documentAccessorForTransaction(transaction).loadDocumentForId(notificationBoxId);
13642
- accessor = notificationCollectionFactory(notificationBoxDocument).documentAccessorForTransaction(transaction);
13643
- }
13956
+ if (!accessor && notificationBoxId && context) {
13957
+ var notificationCollectionFactory = context.notificationCollectionFactory, notificationBoxCollection = context.notificationBoxCollection;
13958
+ var notificationBoxDocument = notificationBoxCollection.documentAccessorForTransaction(transaction).loadDocumentForId(notificationBoxId);
13959
+ accessor = notificationCollectionFactory(notificationBoxDocument).documentAccessorForTransaction(transaction);
13644
13960
  }
13645
13961
  if (!accessor) {
13646
13962
  throw new Error('createNotificationDocument() failed as neither an accessor nor sufficient information was provided about the target.');
@@ -13721,6 +14037,10 @@ function _ts_generator$4(thisArg, body) {
13721
14037
  }
13722
14038
  /**
13723
14039
  * Internal function used by createNotificationDocument().
14040
+ *
14041
+ * @param input - send control parameters (throttle settings, shouldCreateNotification flag)
14042
+ * @param pair - the document pair created by {@link createNotificationDocumentPair}
14043
+ * @returns the pair with `notificationCreated` updated to reflect whether the document was saved
13724
14044
  */ function _createNotificationDocumentFromPair(input, pair) {
13725
14045
  return _async_to_generator$4(function() {
13726
14046
  var notification, notificationDocument, isNotificationTask, overrideExistingTask;
@@ -13771,6 +14091,9 @@ function _ts_generator$4(thisArg, body) {
13771
14091
  *
13772
14092
  * For unique tasks with `overrideExistingTask`, uses `set()` to replace existing documents.
13773
14093
  * Otherwise uses `create()` which fails if the document already exists.
14094
+ *
14095
+ * @param input - the creation parameters including template, context, send control settings
14096
+ * @returns the document pair with `notificationCreated` reflecting whether the document was saved
13774
14097
  */ function createNotificationDocument(input) {
13775
14098
  return _async_to_generator$4(function() {
13776
14099
  var pair;
@@ -13787,6 +14110,9 @@ function _ts_generator$4(thisArg, body) {
13787
14110
  * Creates and saves a notification only if sending conditions are met (not throttled, not explicitly disabled).
13788
14111
  *
13789
14112
  * Returns `undefined` if the notification was not created.
14113
+ *
14114
+ * @param input - the creation parameters including template, context, and send control settings
14115
+ * @returns the document pair if the notification was created, or undefined if it was skipped
13790
14116
  */ function createNotificationDocumentIfSending(input) {
13791
14117
  return _async_to_generator$4(function() {
13792
14118
  var pair;
@@ -13865,6 +14191,8 @@ function _object_spread_props$5(target, source) {
13865
14191
  /**
13866
14192
  * Creates a {@link CreateNotificationTaskTemplate} with `TASK_NOTIFICATION` send type and no recipients.
13867
14193
  *
14194
+ * @param input - task template input parameters
14195
+ * @returns the configured task notification template
13868
14196
  * @throws {Error} When `unique=true` but no `notificationModel` or target model is specified.
13869
14197
  *
13870
14198
  * @example
@@ -13902,11 +14230,17 @@ function _array_like_to_array$4(arr, len) {
13902
14230
  function _array_with_holes$1(arr) {
13903
14231
  if (Array.isArray(arr)) return arr;
13904
14232
  }
14233
+ function _array_without_holes$3(arr) {
14234
+ if (Array.isArray(arr)) return _array_like_to_array$4(arr);
14235
+ }
13905
14236
  function _class_call_check$5(instance, Constructor) {
13906
14237
  if (!(instance instanceof Constructor)) {
13907
14238
  throw new TypeError("Cannot call a class as a function");
13908
14239
  }
13909
14240
  }
14241
+ function _iterable_to_array$3(iter) {
14242
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
14243
+ }
13910
14244
  function _iterable_to_array_limit$1(arr, i) {
13911
14245
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
13912
14246
  if (_i == null) return;
@@ -13934,9 +14268,15 @@ function _iterable_to_array_limit$1(arr, i) {
13934
14268
  function _non_iterable_rest$1() {
13935
14269
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
13936
14270
  }
14271
+ function _non_iterable_spread$3() {
14272
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14273
+ }
13937
14274
  function _sliced_to_array$1(arr, i) {
13938
14275
  return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$1();
13939
14276
  }
14277
+ function _to_consumable_array$3(arr) {
14278
+ return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread$3();
14279
+ }
13940
14280
  function _unsupported_iterable_to_array$4(o, minLen) {
13941
14281
  if (!o) return;
13942
14282
  if (typeof o === "string") return _array_like_to_array$4(o, minLen);
@@ -13948,6 +14288,8 @@ function _unsupported_iterable_to_array$4(o, minLen) {
13948
14288
  /**
13949
14289
  * Creates a {@link NotificationTemplateTypeInfoRecord} from an array of template type info entries.
13950
14290
  *
14291
+ * @param infoArray - array of template type info entries to index
14292
+ * @returns a record keyed by template type
13951
14293
  * @throws {Error} When duplicate template types are found in the input array.
13952
14294
  *
13953
14295
  * @example
@@ -13984,6 +14326,7 @@ function _unsupported_iterable_to_array$4(o, minLen) {
13984
14326
  * Handles alternative model identities defined in {@link NotificationTemplateTypeInfoIdentityInfoAlternativeModelIdentityPair}.
13985
14327
  *
13986
14328
  * @param appNotificationTemplateTypeInfoRecord - the complete template type registry for the application
14329
+ * @returns a fully initialized service with indexed lookups for fast template type discovery
13987
14330
  *
13988
14331
  * @example
13989
14332
  * ```ts
@@ -14018,10 +14361,10 @@ function _unsupported_iterable_to_array$4(o, minLen) {
14018
14361
  allKnownTemplateTypeInfo.push(info);
14019
14362
  allKnownTemplateTypes.push(info.type);
14020
14363
  });
14021
- var allNotificationModelIdentityValues = Array.from(allNotificationModelIdentityValuesSet);
14364
+ var allNotificationModelIdentityValues = _to_consumable_array$3(allNotificationModelIdentityValuesSet);
14022
14365
  var notificationModelTemplateInfoMap = notificationModelTypeInfoMapBuilder.map();
14023
14366
  var targetModelTemplateInfoMap = targetModelTypeInfoMapBuilder.map();
14024
- var notificationModelTemplateTypesMap = new Map(Array.from(notificationModelTemplateInfoMap.entries()).map(function(param) {
14367
+ var notificationModelTemplateTypesMap = new Map(_to_consumable_array$3(notificationModelTemplateInfoMap.entries()).map(function(param) {
14025
14368
  var _param = _sliced_to_array$1(param, 2), k = _param[0], x = _param[1];
14026
14369
  return [
14027
14370
  k,
@@ -14030,7 +14373,7 @@ function _unsupported_iterable_to_array$4(o, minLen) {
14030
14373
  })
14031
14374
  ];
14032
14375
  }));
14033
- var targetModelTemplateTypesMap = new Map(Array.from(targetModelTemplateInfoMap.entries()).map(function(param) {
14376
+ var targetModelTemplateTypesMap = new Map(_to_consumable_array$3(targetModelTemplateInfoMap.entries()).map(function(param) {
14034
14377
  var _param = _sliced_to_array$1(param, 2), k = _param[0], x = _param[1];
14035
14378
  return [
14036
14379
  k,
@@ -14234,6 +14577,7 @@ function _ts_generator$3(thisArg, body) {
14234
14577
  *
14235
14578
  * @param fn - base function that generates message content per recipient
14236
14579
  * @param extras - optional delivery customization (global recipients, send callbacks)
14580
+ * @returns a {@link NotificationMessageFunction} with the extras attached
14237
14581
  *
14238
14582
  * @example
14239
14583
  * ```ts
@@ -14261,6 +14605,8 @@ function _ts_generator$3(thisArg, body) {
14261
14605
  *
14262
14606
  * Useful as a placeholder factory for template types that should not produce deliverable content.
14263
14607
  *
14608
+ * @returns a factory that produces no-content message functions
14609
+ *
14264
14610
  * @example
14265
14611
  * ```ts
14266
14612
  * const factory = noContentNotificationMessageFunctionFactory();
@@ -14269,7 +14615,7 @@ function _ts_generator$3(thisArg, body) {
14269
14615
  * // msg.flag === NotificationMessageFlag.NO_CONTENT
14270
14616
  * ```
14271
14617
  */ function noContentNotificationMessageFunctionFactory() {
14272
- return function(config) {
14618
+ return function(_config) {
14273
14619
  return _async_to_generator$3(function() {
14274
14620
  return _ts_generator$3(this, function(_state) {
14275
14621
  // const { item } = config;
@@ -14304,6 +14650,8 @@ function _ts_generator$3(thisArg, body) {
14304
14650
  * Query constraints for finding {@link NotificationUser} documents that have pending config syncs (`ns == true`).
14305
14651
  *
14306
14652
  * Used by the server to discover users whose configs need to be synced to their NotificationBox recipients.
14653
+ *
14654
+ * @returns array of Firestore query constraints filtering for users needing sync
14307
14655
  */ function notificationUsersFlaggedForNeedsSyncQuery() {
14308
14656
  return [
14309
14657
  where('ns', '==', true)
@@ -14313,6 +14661,7 @@ function _ts_generator$3(thisArg, body) {
14313
14661
  * Query constraints for finding {@link NotificationUser} documents that have any of the given exclusion IDs in their `x` array.
14314
14662
  *
14315
14663
  * @param exclusionId - one or more box IDs or collection name prefixes to match against
14664
+ * @returns array of Firestore query constraints filtering for users with matching exclusions
14316
14665
  */ function notificationUserHasExclusionQuery(exclusionId) {
14317
14666
  return [
14318
14667
  where('x', 'array-contains-any', exclusionId)
@@ -14321,6 +14670,8 @@ function _ts_generator$3(thisArg, body) {
14321
14670
  // MARK: NotificationSummary
14322
14671
  /**
14323
14672
  * Query constraints for finding {@link NotificationSummary} documents that need server-side initialization (`s == true`).
14673
+ *
14674
+ * @returns array of Firestore query constraints filtering for summaries needing initialization
14324
14675
  */ function notificationSummariesFlaggedForNeedsInitializationQuery() {
14325
14676
  return [
14326
14677
  where('s', '==', true)
@@ -14330,6 +14681,8 @@ function _ts_generator$3(thisArg, body) {
14330
14681
  // MARK: NotificationBox
14331
14682
  /**
14332
14683
  * Query constraints for finding {@link NotificationBox} documents that need server-side initialization (`s == true`).
14684
+ *
14685
+ * @returns array of Firestore query constraints filtering for boxes needing initialization
14333
14686
  */ function notificationBoxesFlaggedForNeedsInitializationQuery() {
14334
14687
  return [
14335
14688
  where('s', '==', true)
@@ -14339,6 +14692,8 @@ function _ts_generator$3(thisArg, body) {
14339
14692
  * Query constraints for finding {@link NotificationBox} documents flagged as invalid (`fi == true`).
14340
14693
  *
14341
14694
  * Used by the server to clean up boxes that could not be initialized.
14695
+ *
14696
+ * @returns array of Firestore query constraints filtering for boxes flagged as invalid
14342
14697
  */ function notificationBoxesFlaggedInvalidQuery() {
14343
14698
  return [
14344
14699
  where('fi', '==', true)
@@ -14352,6 +14707,7 @@ function _ts_generator$3(thisArg, body) {
14352
14707
  * This is the primary query used by the send queue processor.
14353
14708
  *
14354
14709
  * @param now - reference time for the `sat` comparison (defaults to current time)
14710
+ * @returns array of Firestore query constraints filtering for notifications past their scheduled send time
14355
14711
  */ function notificationsPastSendAtTimeQuery() {
14356
14712
  var now = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : new Date();
14357
14713
  return [
@@ -14362,6 +14718,8 @@ function _ts_generator$3(thisArg, body) {
14362
14718
  /**
14363
14719
  * Query constraints for finding {@link Notification} documents marked as done (`d == true`)
14364
14720
  * and ready to be archived to {@link NotificationWeek} and then deleted.
14721
+ *
14722
+ * @returns array of Firestore query constraints filtering for completed notifications ready to archive
14365
14723
  */ function notificationsReadyForCleanupQuery() {
14366
14724
  return [
14367
14725
  where('d', '==', true)
@@ -14398,6 +14756,10 @@ function _unsupported_iterable_to_array$3(o, minLen) {
14398
14756
  *
14399
14757
  * Used when combining results from multiple send batches within the same channel.
14400
14758
  *
14759
+ * @param a - first result to merge
14760
+ * @param b - second result to merge
14761
+ * @returns a new result with all recipient lists concatenated from both inputs
14762
+ *
14401
14763
  * @example
14402
14764
  * ```ts
14403
14765
  * const combined = mergeNotificationSendMessagesResult(firstBatchResult, secondBatchResult);
@@ -14464,6 +14826,8 @@ function _object_spread_props$4(target, source) {
14464
14826
  * Use this when the handler needs more time but doesn't want to increment the failure counter.
14465
14827
  * The task will be re-queued without counting as an error attempt.
14466
14828
  *
14829
+ * @returns an empty checkpoint array signaling in-progress without failure
14830
+ *
14467
14831
  * @example
14468
14832
  * ```ts
14469
14833
  * // Waiting for an external process — delay without failing
@@ -14479,6 +14843,7 @@ function _object_spread_props$4(target, source) {
14479
14843
  *
14480
14844
  * @param delayUntil - absolute date or relative milliseconds from the task's run start time
14481
14845
  * @param updateMetadata - optional metadata updates to merge into the notification item
14846
+ * @returns a task result that re-queues the task after the specified delay without marking it failed
14482
14847
  *
14483
14848
  * @example
14484
14849
  * ```ts
@@ -14500,6 +14865,7 @@ function _object_spread_props$4(target, source) {
14500
14865
  *
14501
14866
  * @param completedParts - checkpoint string(s) that were just completed
14502
14867
  * @param updateMetadata - optional metadata updates to merge into the notification item
14868
+ * @returns a task result marking the given checkpoints complete while keeping the task running
14503
14869
  *
14504
14870
  * @example
14505
14871
  * ```ts
@@ -14516,6 +14882,7 @@ function _object_spread_props$4(target, source) {
14516
14882
  * Returns a result indicating the task completed successfully. The notification document will be deleted.
14517
14883
  *
14518
14884
  * @param updateMetadata - optional final metadata update (applied before deletion if subtasks need it)
14885
+ * @returns a task result signaling successful completion; the notification document will be deleted
14519
14886
  *
14520
14887
  * @example
14521
14888
  * ```ts
@@ -14535,6 +14902,7 @@ function _object_spread_props$4(target, source) {
14535
14902
  *
14536
14903
  * @param updateMetadata - optional metadata updates
14537
14904
  * @param removeFromCompletedCheckpoints - checkpoint(s) to remove from the completed set (e.g., to retry a checkpoint)
14905
+ * @returns a task result signaling failure; the error attempt counter is incremented
14538
14906
  *
14539
14907
  * @example
14540
14908
  * ```ts
@@ -14556,6 +14924,7 @@ function _object_spread_props$4(target, source) {
14556
14924
  *
14557
14925
  * @param result - the task result to wrap
14558
14926
  * @param force - when true, overrides any existing `canRunNextCheckpoint` value
14927
+ * @returns a copy of the result with `canRunNextCheckpoint` set to true
14559
14928
  */ function notificationTaskCanRunNextCheckpoint(result, force) {
14560
14929
  if (force || result.canRunNextCheckpoint == null) {
14561
14930
  result = _object_spread_props$4(_object_spread$6({}, result), {
@@ -14629,6 +14998,8 @@ function _object_spread_props$3(target, source) {
14629
14998
  * Internal helper that marks the `'processing'` checkpoint complete and schedules the `'cleanup'` phase.
14630
14999
  *
14631
15000
  * Prefer using {@link notificationSubtaskComplete} in subtask handlers instead of calling this directly.
15001
+ *
15002
+ * @returns a partially-complete task result with the processing checkpoint marked done
14632
15003
  */ function completeSubtaskProcessingAndScheduleCleanupTaskResult() {
14633
15004
  return notificationTaskPartiallyComplete([
14634
15005
  'processing'
@@ -14640,6 +15011,9 @@ function _object_spread_props$3(target, source) {
14640
15011
  * Unlike {@link notificationTaskComplete}, this signals that the cleanup checkpoint should still run.
14641
15012
  * Use `canRunNextCheckpoint: true` in options to run cleanup immediately in the same execution.
14642
15013
  *
15014
+ * @param options - optional metadata updates and flag to run cleanup immediately in the same execution
15015
+ * @returns a task result marking the subtask as complete while allowing cleanup to proceed
15016
+ *
14643
15017
  * @example
14644
15018
  * ```ts
14645
15019
  * // Processing done, schedule cleanup for next run
@@ -14732,6 +15106,9 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14732
15106
  *
14733
15107
  * Filters template configs to only include types applicable to the notification box's model.
14734
15108
  * Used during the server-side sync process to update box recipient entries from user configs.
15109
+ *
15110
+ * @param input - the merged config inputs including uid, global config, box config, and optional existing recipient
15111
+ * @returns the computed effective box recipient with merged config, contact info, and flags
14735
15112
  */ function effectiveNotificationBoxRecipientConfig(input) {
14736
15113
  var _ref, _ref1, _gc_f, _gc_lk, _gc_e, _gc_t;
14737
15114
  var uid = input.uid, inputM = input.m, appNotificationTemplateTypeInfoRecordService = input.appNotificationTemplateTypeInfoRecordService, gc = input.gc, notificationUserNotificationBoxConfig = input.boxConfig, recipient = input.recipient;
@@ -14763,6 +15140,9 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14763
15140
  * and propagates exclusion flags to the per-box configs.
14764
15141
  *
14765
15142
  * Exclusions not matching any associated notification box are automatically filtered out.
15143
+ *
15144
+ * @param input - the user, exclusions to add, and exclusions to remove
15145
+ * @returns the updated exclusion list and the partial user update to apply
14766
15146
  */ function updateNotificationUserNotificationSendExclusions(input) {
14767
15147
  var notificationUser = input.notificationUser, inputAddExclusions = input.addExclusions, inputRemoveExclusions = input.removeExclusions;
14768
15148
  var associatedNotificationBoxes = notificationUser.b, currentExclusions = notificationUser.x, notificationBoxConfigs = notificationUser.bc;
@@ -14800,6 +15180,9 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14800
15180
  /**
14801
15181
  * Applies the current exclusion list to per-box configs, setting/clearing the `x` flag and marking
14802
15182
  * changed configs as needing sync (`ns = true`).
15183
+ *
15184
+ * @param params - the exclusion list, per-box configs, and optional flag to recalculate the global ns flag
15185
+ * @returns the updated per-box configs and the recalculated needs-sync flag
14803
15186
  */ function applyExclusionsToNotificationUserNotificationBoxRecipientConfigs(params) {
14804
15187
  var _ref, _ref1;
14805
15188
  var inputX = params.x, inputBc = params.bc, notificationUser = params.notificationUser, recalculateNs = params.recalculateNs;
@@ -14827,6 +15210,9 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14827
15210
  }
14828
15211
  /**
14829
15212
  * Returns true if any of the per-box configs need syncing (`ns == true`).
15213
+ *
15214
+ * @param configs - array of per-box recipient configs to check
15215
+ * @returns true if at least one config has its needs-sync flag set
14830
15216
  */ function calculateNsForNotificationUserNotificationBoxRecipientConfigs(configs) {
14831
15217
  return configs.some(function(x) {
14832
15218
  return x.ns;
@@ -14835,11 +15221,14 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14835
15221
  /**
14836
15222
  * Creates a {@link NotificationSendExclusionCanSendFunction} from the given exclusion list.
14837
15223
  * Returns true for IDs that don't match any exclusion prefix.
15224
+ *
15225
+ * @param exclusions - the list of box IDs or prefixes that should be excluded from delivery
15226
+ * @returns a predicate function that returns true if the given notification/box ID is not excluded
14838
15227
  */ var notificationSendExclusionCanSendFunction = function notificationSendExclusionCanSendFunction(exclusions) {
14839
15228
  var fn = function fn(notification) {
14840
- return exclusions.findIndex(function(x) {
15229
+ return !exclusions.some(function(x) {
14841
15230
  return notification.startsWith(x);
14842
- }) === -1;
15231
+ });
14843
15232
  };
14844
15233
  fn._exclusions = exclusions;
14845
15234
  return fn;
@@ -14848,12 +15237,18 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14848
15237
  /**
14849
15238
  * Returns true if all channels on the notification have reached a terminal state
14850
15239
  * (NONE, NO_TRY, SENT, or SKIPPED). Used to determine if the notification can be marked done.
15240
+ *
15241
+ * @param input - the per-channel send flags to evaluate
15242
+ * @returns true if all channels are in a terminal send state
14851
15243
  */ function notificationSendFlagsImplyIsComplete(input) {
14852
15244
  return isCompleteNotificationSendState(input.es) && isCompleteNotificationSendState(input.ps) && isCompleteNotificationSendState(input.ts) && isCompleteNotificationSendState(input.ns);
14853
15245
  }
14854
15246
  /**
14855
15247
  * Returns true if the given send state is terminal — no further send attempts will be made.
14856
15248
  * Terminal states: NONE, NO_TRY, SENT, SKIPPED.
15249
+ *
15250
+ * @param input - the send state to evaluate
15251
+ * @returns true if the state is terminal and no further delivery will be attempted
14857
15252
  */ function isCompleteNotificationSendState(input) {
14858
15253
  var isComplete = false;
14859
15254
  switch(input){
@@ -14863,7 +15258,11 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14863
15258
  case NotificationSendState.SKIPPED:
14864
15259
  isComplete = true;
14865
15260
  break;
14866
- default:
15261
+ case NotificationSendState.QUEUED:
15262
+ case NotificationSendState.SENT_PARTIAL:
15263
+ case NotificationSendState.SEND_ERROR:
15264
+ case NotificationSendState.BUILD_ERROR:
15265
+ case NotificationSendState.CONFIG_ERROR:
14867
15266
  isComplete = false;
14868
15267
  break;
14869
15268
  }
@@ -14871,6 +15270,9 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14871
15270
  }
14872
15271
  /**
14873
15272
  * Resolves which recipient groups (global, box, explicit) are allowed based on the {@link NotificationRecipientSendFlag}.
15273
+ *
15274
+ * @param flag - the recipient send flag controlling which groups are included
15275
+ * @returns an object indicating which recipient groups are permitted for this notification
14874
15276
  */ function allowedNotificationRecipients(flag) {
14875
15277
  var canSendToGlobalRecipients = true;
14876
15278
  var canSendToBoxRecipients = true;
@@ -14904,6 +15306,9 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14904
15306
  *
14905
15307
  * Only notifications that can be sent to box recipients are archived (notifications restricted
14906
15308
  * to only explicit or only global recipients are not saved to the weekly archive).
15309
+ *
15310
+ * @param notification - the notification to check
15311
+ * @returns true if the notification should be saved to the weekly archive after delivery
14907
15312
  */ function shouldSaveNotificationToNotificationWeek(notification) {
14908
15313
  return allowedNotificationRecipients(notification.rf).canSendToBoxRecipients;
14909
15314
  }
@@ -14911,6 +15316,10 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14911
15316
  /**
14912
15317
  * Merges a partial update into a {@link NotificationUserNotificationBoxRecipientConfig},
14913
15318
  * preserving user-controlled fields (`nb`, `rm`, `ns`, `lk`, `bk`) and respecting OPT_OUT state.
15319
+ *
15320
+ * @param a - base user box recipient config to merge into
15321
+ * @param b - partial update to apply on top of the base
15322
+ * @returns the merged config with protected fields retained from `a`
14914
15323
  */ function mergeNotificationUserNotificationBoxRecipientConfigs(a, b) {
14915
15324
  var _b_f;
14916
15325
  return _object_spread_props$2(_object_spread$4({}, mergeNotificationBoxRecipients(a, b)), {
@@ -14925,6 +15334,10 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14925
15334
  }
14926
15335
  /**
14927
15336
  * Merges a partial update into a {@link NotificationBoxRecipient}, deeply merging the `c` (config record) field.
15337
+ *
15338
+ * @param a - base recipient to merge into
15339
+ * @param b - partial recipient update to apply on top of the base
15340
+ * @returns the merged recipient with deeply merged template config records
14928
15341
  */ function mergeNotificationBoxRecipients(a, b) {
14929
15342
  return _object_spread_props$2(_object_spread$4({}, a, b), {
14930
15343
  // configs should be merged/ovewritten
@@ -14934,6 +15347,9 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14934
15347
  /**
14935
15348
  * Resolves a {@link NotificationBoxDocument} from a reference pair, loading by model key if no document is provided directly.
14936
15349
  *
15350
+ * @param input - reference pair containing either a direct document or a model key to load from
15351
+ * @param accessor - Firestore document accessor used to load the document by ID when needed
15352
+ * @returns the resolved NotificationBoxDocument
14937
15353
  * @throws {Error} When neither a document nor a model key is provided.
14938
15354
  */ function loadNotificationBoxDocumentForReferencePair(input, accessor) {
14939
15355
  var inputNotificationBoxDocument = input.notificationBoxDocument, inputNotificationBoxRelatedModelKey = input.notificationBoxRelatedModelKey;
@@ -15077,11 +15493,17 @@ function _is_native_reflect_construct$2() {
15077
15493
  });
15078
15494
  /**
15079
15495
  * Returns the Firestore {@link CollectionReference} for {@link OidcEntry} documents.
15496
+ *
15497
+ * @param context - the Firestore context to use
15498
+ * @returns the CollectionReference for OidcEntry documents
15080
15499
  */ function oidcEntryCollectionReference(context) {
15081
15500
  return context.collection(oidcEntryIdentity.collectionName);
15082
15501
  }
15083
15502
  /**
15084
15503
  * Creates an {@link OidcEntryFirestoreCollection} from the given configuration.
15504
+ *
15505
+ * @param config - the Firestore context and collection configuration
15506
+ * @returns a configured OidcEntryFirestoreCollection
15085
15507
  */ function oidcEntryFirestoreCollection(config) {
15086
15508
  var firestoreContext = config.firestoreContext;
15087
15509
  return firestoreContext.firestoreCollection({
@@ -15097,6 +15519,9 @@ function _is_native_reflect_construct$2() {
15097
15519
 
15098
15520
  /**
15099
15521
  * Query for OidcEntry documents with a specific type.
15522
+ *
15523
+ * @param type - the OIDC entry type to filter by
15524
+ * @returns Firestore query constraints for the given type
15100
15525
  */ function oidcEntriesWithTypeQuery(type) {
15101
15526
  return [
15102
15527
  where('type', '==', type)
@@ -15104,6 +15529,10 @@ function _is_native_reflect_construct$2() {
15104
15529
  }
15105
15530
  /**
15106
15531
  * Query for OidcEntry documents with a specific type and userCode.
15532
+ *
15533
+ * @param type - the OIDC entry type to filter by
15534
+ * @param userCode - the user code to match
15535
+ * @returns Firestore query constraints for the given type and userCode
15107
15536
  */ function oidcEntriesByUserCodeQuery(type, userCode) {
15108
15537
  return [
15109
15538
  where('type', '==', type),
@@ -15112,6 +15541,10 @@ function _is_native_reflect_construct$2() {
15112
15541
  }
15113
15542
  /**
15114
15543
  * Query for OidcEntry documents with a specific type and uid.
15544
+ *
15545
+ * @param type - the OIDC entry type to filter by
15546
+ * @param uid - the Firebase user ID to match
15547
+ * @returns Firestore query constraints for the given type and uid
15115
15548
  */ function oidcEntriesByUidQuery(type, uid) {
15116
15549
  return [
15117
15550
  where('type', '==', type),
@@ -15120,6 +15553,10 @@ function _is_native_reflect_construct$2() {
15120
15553
  }
15121
15554
  /**
15122
15555
  * Query for OidcEntry documents with a specific type and grantId.
15556
+ *
15557
+ * @param type - the OIDC entry type to filter by
15558
+ * @param grantId - the grant ID to match
15559
+ * @returns Firestore query constraints for the given type and grantId
15123
15560
  */ function oidcEntriesByGrantIdQuery(type, grantId) {
15124
15561
  return [
15125
15562
  where('type', '==', type),
@@ -15128,6 +15565,9 @@ function _is_native_reflect_construct$2() {
15128
15565
  }
15129
15566
  /**
15130
15567
  * Query for OidcEntry Client documents owned by a specific user.
15568
+ *
15569
+ * @param ownershipKey - the ownership key identifying the owner
15570
+ * @returns Firestore query constraints for Client entries matching the ownership key
15131
15571
  */ function oidcClientEntriesByOwnerQuery(ownershipKey) {
15132
15572
  return [
15133
15573
  where('type', '==', 'Client'),
@@ -15455,6 +15895,10 @@ function _is_native_reflect_construct$1() {
15455
15895
  var storageFileIdentity = firestoreModelIdentity('storageFile', 'sf');
15456
15896
  /**
15457
15897
  * Creates a StorageFileGroupCreatedStorageFileKey from the input StorageFileGroupId and purpose.
15898
+ *
15899
+ * @param purpose - the purpose identifying the type of file within the group
15900
+ * @param storageFileGroupId - the ID of the parent StorageFileGroup
15901
+ * @returns a deterministic FirestoreCollectionModelKey for the storage file
15458
15902
  */ function storageFileGroupCreatedStorageFileKey(purpose, storageFileGroupId) {
15459
15903
  return firestoreModelKey(storageFileIdentity, "".concat(purpose, "_").concat(storageFileGroupId));
15460
15904
  }
@@ -15649,6 +16093,9 @@ var storageFileIdentity = firestoreModelIdentity('storageFile', 'sf');
15649
16093
  * ```ts
15650
16094
  * const colRef = storageFileCollectionReference(firestoreContext);
15651
16095
  * ```
16096
+ *
16097
+ * @param context - the Firestore context to use
16098
+ * @returns the CollectionReference for StorageFile documents
15652
16099
  */ function storageFileCollectionReference(context) {
15653
16100
  return context.collection(storageFileIdentity.collectionName);
15654
16101
  }
@@ -15660,6 +16107,9 @@ var storageFileIdentity = firestoreModelIdentity('storageFile', 'sf');
15660
16107
  * const collection = storageFileFirestoreCollection(firestoreContext);
15661
16108
  * const doc = collection.documentAccessor().newDocument();
15662
16109
  * ```
16110
+ *
16111
+ * @param firestoreContext - the Firestore context to use
16112
+ * @returns a configured StorageFileFirestoreCollection
15663
16113
  */ function storageFileFirestoreCollection(firestoreContext) {
15664
16114
  return firestoreContext.firestoreCollection({
15665
16115
  modelIdentity: storageFileIdentity,
@@ -15752,6 +16202,9 @@ var storageFileIdentity = firestoreModelIdentity('storageFile', 'sf');
15752
16202
  * ```ts
15753
16203
  * const colRef = storageFileGroupCollectionReference(firestoreContext);
15754
16204
  * ```
16205
+ *
16206
+ * @param context - the Firestore context to use
16207
+ * @returns the CollectionReference for StorageFileGroup documents
15755
16208
  */ function storageFileGroupCollectionReference(context) {
15756
16209
  return context.collection(storageFileGroupIdentity.collectionName);
15757
16210
  }
@@ -15763,6 +16216,9 @@ var storageFileIdentity = firestoreModelIdentity('storageFile', 'sf');
15763
16216
  * const collection = storageFileGroupFirestoreCollection(firestoreContext);
15764
16217
  * const doc = collection.documentAccessor().loadDocumentForId(groupId);
15765
16218
  * ```
16219
+ *
16220
+ * @param firestoreContext - the Firestore context to use
16221
+ * @returns a configured StorageFileGroupFirestoreCollection
15766
16222
  */ function storageFileGroupFirestoreCollection(firestoreContext) {
15767
16223
  return firestoreContext.firestoreCollection({
15768
16224
  modelIdentity: storageFileGroupIdentity,
@@ -15958,6 +16414,7 @@ function _ts_generator$2(thisArg, body) {
15958
16414
  * initial state setup.
15959
16415
  *
15960
16416
  * @param config - optional defaults for creation type, subgroup, and processing state
16417
+ * @returns a factory function that creates StorageFile document pairs
15961
16418
  * @throws {Error} When neither accessor nor context is provided
15962
16419
  * @throws {Error} When no storage path can be resolved from the input
15963
16420
  * @throws {Error} When FOR_STORAGE_FILE_GROUP is used without parentStorageFileGroup or purpose
@@ -16055,6 +16512,9 @@ function _ts_generator$2(thisArg, body) {
16055
16512
  * Convenience function for creating a StorageFileDocumentPair.
16056
16513
  *
16057
16514
  * Calls createStorageFileDocumentPairFactory() with no arguments, then passes the input to the factory and returns the result.
16515
+ *
16516
+ * @param input - the creation input specifying the storage path, purpose, and context
16517
+ * @returns a promise resolving to the created StorageFileDocument and StorageFile data
16058
16518
  */ function createStorageFileDocumentPair(input) {
16059
16519
  return _async_to_generator$2(function() {
16060
16520
  return _ts_generator$2(this, function(_state) {
@@ -16101,6 +16561,7 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16101
16561
  *
16102
16562
  * @param storageFileGroupId - the group's document ID
16103
16563
  * @param subPath - optional sub-paths to append
16564
+ * @returns the folder path as a SlashPathFolder string
16104
16565
  *
16105
16566
  * @example
16106
16567
  * ```ts
@@ -16126,6 +16587,9 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16126
16587
  /**
16127
16588
  * Returns the full storage path for a StorageFileGroup's zip file.
16128
16589
  *
16590
+ * @param storageFileGroupId - the group's document ID
16591
+ * @returns the full SlashPath to the group's zip archive
16592
+ *
16129
16593
  * @example
16130
16594
  * ```ts
16131
16595
  * const zipPath = storageFileGroupZipFileStoragePath('abc123');
@@ -16163,6 +16627,8 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16163
16627
  * const constraints = storageFilesQueuedForProcessingQuery();
16164
16628
  * const results = await collection.query(constraints);
16165
16629
  * ```
16630
+ *
16631
+ * @returns Firestore query constraints for StorageFiles queued for processing
16166
16632
  */ function storageFilesQueuedForProcessingQuery() {
16167
16633
  return [
16168
16634
  where('ps', '==', StorageFileProcessingState.QUEUED_FOR_PROCESSING)
@@ -16174,6 +16640,7 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16174
16640
  * Used by the cleanup service to find files ready for permanent deletion.
16175
16641
  *
16176
16642
  * @param now - reference time for comparison; defaults to current time
16643
+ * @returns Firestore query constraints for StorageFiles whose scheduled delete date has passed
16177
16644
  *
16178
16645
  * @example
16179
16646
  * ```ts
@@ -16189,6 +16656,10 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16189
16656
  * with optional subgroup filtering.
16190
16657
  *
16191
16658
  * @example
16659
+ * @param input - the user, purpose, and optional subgroup to filter by
16660
+ * @returns Firestore query constraints for the given purpose and user
16661
+ *
16662
+ * @example
16192
16663
  * ```ts
16193
16664
  * const constraints = storageFilePurposeAndUserQuery({
16194
16665
  * user: 'user123',
@@ -16211,6 +16682,9 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16211
16682
  * Used by the sync service to find files whose group memberships need to be propagated.
16212
16683
  *
16213
16684
  * @example
16685
+ * @returns Firestore query constraints for StorageFiles flagged for group synchronization
16686
+ *
16687
+ * @example
16214
16688
  * ```ts
16215
16689
  * const constraints = storageFileFlaggedForSyncWithGroupsQuery();
16216
16690
  * ```
@@ -16226,6 +16700,9 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16226
16700
  * Used by the initialization service to find newly-created groups that haven't been synced yet.
16227
16701
  *
16228
16702
  * @example
16703
+ * @returns Firestore query constraints for StorageFileGroups needing initialization
16704
+ *
16705
+ * @example
16229
16706
  * ```ts
16230
16707
  * const constraints = storageFileGroupsFlaggedForNeedsInitializationQuery();
16231
16708
  * ```
@@ -16238,6 +16715,9 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16238
16715
  * Returns query constraints for StorageFileGroups flagged for content regeneration (`re == true`).
16239
16716
  *
16240
16717
  * @example
16718
+ * @returns Firestore query constraints for StorageFileGroups flagged for content regeneration
16719
+ *
16720
+ * @example
16241
16721
  * ```ts
16242
16722
  * const constraints = storageFileGroupsFlaggedForContentRegenerationQuery();
16243
16723
  * ```
@@ -16252,6 +16732,9 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16252
16732
  * Invalid groups are typically cleaned up (deleted along with their associated files).
16253
16733
  *
16254
16734
  * @example
16735
+ * @returns Firestore query constraints for StorageFileGroups flagged as invalid
16736
+ *
16737
+ * @example
16255
16738
  * ```ts
16256
16739
  * const constraints = storageFileGroupsFlaggedInvalidQuery();
16257
16740
  * ```
@@ -16274,6 +16757,7 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16274
16757
  * The created task is unique per StorageFile (only one processing task at a time).
16275
16758
  *
16276
16759
  * @param input - the target StorageFileDocument and optional subtask data
16760
+ * @returns a CreateNotificationTaskTemplate for the StorageFile processing task
16277
16761
  *
16278
16762
  * @example
16279
16763
  * ```ts
@@ -16518,6 +17002,7 @@ function _ts_generator$1(thisArg, body) {
16518
17002
  * Use this within a permission service to define role-based access for StorageFile operations.
16519
17003
  *
16520
17004
  * @param config - the permission output, auth context, and target document
17005
+ * @returns a function that accepts role configuration and returns a GrantRolesOtherwiseFunction
16521
17006
  *
16522
17007
  * @example
16523
17008
  * ```ts
@@ -16528,7 +17013,7 @@ function _ts_generator$1(thisArg, body) {
16528
17013
  * });
16529
17014
  * ```
16530
17015
  */ function grantStorageFileRolesForUserAuthFunction(config) {
16531
- var output = config.output, context = config.context; config.model;
17016
+ var output = config.output, context = config.context;
16532
17017
  return function(input) {
16533
17018
  var rolesForStorageFileUser = input.rolesForStorageFileUser, rolesForStorageFileOwnershipKey = input.rolesForStorageFileOwnershipKey;
16534
17019
  var result = function result() {
@@ -16607,6 +17092,8 @@ function _object_spread$1(target) {
16607
17092
  *
16608
17093
  * Should only be used server-side, as `copy` may not be available on the client.
16609
17094
  *
17095
+ * @returns a factory function that wraps FirebaseStorageAccessorFile instances into StoredFileReader accessors
17096
+ *
16610
17097
  * @example
16611
17098
  * ```ts
16612
17099
  * const factory = storedFileReaderFactory();
@@ -16634,7 +17121,8 @@ function _object_spread$1(target) {
16634
17121
  loadFileStream: file.getStream,
16635
17122
  loadFileMetadata: loadFileMetadata,
16636
17123
  loadCustomMetadata: loadCustomMetadata,
16637
- copy: file.copy // copy is always available on the server-side
17124
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- copy is always available on the server-side
17125
+ copy: file.copy
16638
17126
  };
16639
17127
  return accessor;
16640
17128
  };
@@ -16660,6 +17148,7 @@ function _object_spread$1(target) {
16660
17148
  * Creates a {@link UserUploadsFolderSlashPathFactory} that generates per-user upload folder paths.
16661
17149
  *
16662
17150
  * @param inputBasePath - optional custom base path; defaults to {@link ALL_USER_UPLOADS_FOLDER_PATH}
17151
+ * @returns a factory function that generates per-user upload folder slash paths
16663
17152
  *
16664
17153
  * @example
16665
17154
  * ```ts
@@ -16676,6 +17165,11 @@ function _object_spread$1(target) {
16676
17165
  /**
16677
17166
  * Creates a {@link UserUploadsFolderStoragePathFactory} that includes the storage bucket ID.
16678
17167
  *
17168
+ * @param root0 - the configuration object
17169
+ * @param root0.bucketId - the storage bucket ID to include in each generated path
17170
+ * @param root0.basePath - optional custom base path; defaults to {@link ALL_USER_UPLOADS_FOLDER_PATH}
17171
+ * @returns a factory function that generates per-user StoragePath values including the bucket ID
17172
+ *
16679
17173
  * @example
16680
17174
  * ```ts
16681
17175
  * const factory = userUploadsFolderStoragePathFactory({ bucketId: 'my-bucket' });
@@ -16910,6 +17404,7 @@ function _ts_generator(thisArg, body) {
16910
17404
  * (e.g., `image` matches `image.png`, `image-test.jpg`) at {@link HIGH_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL}.
16911
17405
  *
16912
17406
  * @param config - file type, match string, and optional determination levels
17407
+ * @returns an UploadedFileTypeDeterminer that classifies by file name
16913
17408
  *
16914
17409
  * @example
16915
17410
  * ```ts
@@ -16959,6 +17454,7 @@ function _ts_generator(thisArg, body) {
16959
17454
  * exactly equals the configured match string.
16960
17455
  *
16961
17456
  * @param config - file type and folder name to match
17457
+ * @returns an UploadedFileTypeDeterminer that classifies by folder name
16962
17458
  *
16963
17459
  * @example
16964
17460
  * ```ts
@@ -16998,6 +17494,7 @@ function _ts_generator(thisArg, body) {
16998
17494
  * built-in determiners.
16999
17495
  *
17000
17496
  * @param config - file type, path match config, optional bucket/file filters
17497
+ * @returns an UploadedFileTypeDeterminer that classifies by storage path
17001
17498
  *
17002
17499
  * @example
17003
17500
  * ```ts
@@ -17044,6 +17541,7 @@ function _ts_generator(thisArg, body) {
17044
17541
  * If `requireUser` is true, the determination fails when no user can be detected.
17045
17542
  *
17046
17543
  * @param config - root folder, user prefix, and matching options
17544
+ * @returns a wrapper function that adds user detection to any UploadedFileTypeDeterminer
17047
17545
  *
17048
17546
  * @example
17049
17547
  * ```ts
@@ -17055,8 +17553,7 @@ function _ts_generator(thisArg, body) {
17055
17553
  * ```
17056
17554
  */ function determineUserByFolderWrapperFunction(config) {
17057
17555
  var _config_matchSubPath;
17058
- var rootFolder = config.rootFolder, userFolderPrefix = config.userFolderPrefix, _config_requireUser = config.requireUser, requireUser = _config_requireUser === void 0 ? false : _config_requireUser, tmp = config.allowSubPaths, inputAllowSubPaths = tmp === void 0 ? true : tmp;
17059
- var allowSubPaths = inputAllowSubPaths !== null && inputAllowSubPaths !== void 0 ? inputAllowSubPaths : true;
17556
+ var rootFolder = config.rootFolder, userFolderPrefix = config.userFolderPrefix, _config_requireUser = config.requireUser, requireUser = _config_requireUser === void 0 ? false : _config_requireUser, _config_allowSubPaths = config.allowSubPaths, allowSubPaths = _config_allowSubPaths === void 0 ? true : _config_allowSubPaths;
17060
17557
  var subPathMatcherConfig = (_config_matchSubPath = config.matchSubPath) !== null && _config_matchSubPath !== void 0 ? _config_matchSubPath : {
17061
17558
  basePath: mergeSlashPaths([
17062
17559
  rootFolder,
@@ -17118,6 +17615,9 @@ function _ts_generator(thisArg, body) {
17118
17615
  /**
17119
17616
  * Convenience wrapper pre-configured for the standard uploads folder structure (`uploads/u/{userId}/...`).
17120
17617
  *
17618
+ * @param config - optional matching options (rootFolder and userFolderPrefix are pre-configured)
17619
+ * @returns a wrapper function that adds user detection for the standard uploads folder structure
17620
+ *
17121
17621
  * @example
17122
17622
  * ```ts
17123
17623
  * const addUser = determineUserByUserUploadsFolderWrapperFunction();
@@ -17144,6 +17644,7 @@ function _ts_generator(thisArg, body) {
17144
17644
  *
17145
17645
  * @param determiner - the determiner to filter
17146
17646
  * @param types - allowed file type identifier(s)
17647
+ * @returns an UploadedFileTypeDeterminer that only returns results for the specified file types
17147
17648
  *
17148
17649
  * @example
17149
17650
  * ```ts
@@ -17187,6 +17688,7 @@ function _ts_generator(thisArg, body) {
17187
17688
  * short-circuited via `completeSearchOnFirstMatch` or `completeSearchAtLevel`.
17188
17689
  *
17189
17690
  * @param config - determiners to combine and optional early-exit settings
17691
+ * @returns a combined UploadedFileTypeDeterminer that returns the highest-confidence match
17190
17692
  *
17191
17693
  * @example
17192
17694
  * ```ts
@@ -17201,9 +17703,9 @@ function _ts_generator(thisArg, body) {
17201
17703
  if (determiners.length === 1) {
17202
17704
  result = determiners[0];
17203
17705
  } else {
17204
- var possibleFileTypes = unique(determiners.map(function(d) {
17706
+ var possibleFileTypes = unique(determiners.flatMap(function(d) {
17205
17707
  return d.getPossibleFileTypes();
17206
- }).flat());
17708
+ }));
17207
17709
  var completeSearchOnFirstMatch = Boolean(inputCompleteSearchOnFirstMatch);
17208
17710
  var completeSearchAtLevel = completeSearchOnFirstMatch ? LOW_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL : inputCompleteSearchAtLevel !== null && inputCompleteSearchAtLevel !== void 0 ? inputCompleteSearchAtLevel : EXACT_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL;
17209
17711
  result = {
@@ -17303,6 +17805,9 @@ function _ts_generator(thisArg, body) {
17303
17805
  * If a document is provided directly, it is returned as-is. Otherwise, the related model key
17304
17806
  * is converted to a group ID via {@link storageFileGroupIdForModel} and loaded from the accessor.
17305
17807
  *
17808
+ * @param input - reference pair containing either a document or a related model key
17809
+ * @param accessor - document accessor used to load the group document by ID
17810
+ * @returns the resolved StorageFileGroupDocument
17306
17811
  * @throws {Error} When neither storageFileGroupDocument nor storageFileGroupRelatedModelKey is provided
17307
17812
  *
17308
17813
  * @example
@@ -17366,7 +17871,7 @@ function _ts_generator(thisArg, body) {
17366
17871
  ]);
17367
17872
  }
17368
17873
  });
17369
- var re = currentRe || oneOrMoreItemsWereRemoved; // flag removed if any items were removed
17874
+ var re = currentRe !== null && currentRe !== void 0 ? currentRe : oneOrMoreItemsWereRemoved; // flag removed if any items were removed
17370
17875
  // recalculate re if it is false or the retain flag is false
17371
17876
  if (!re || allowRecalculateRegenerateFlag) {
17372
17877
  var flagRegenerate = calculateStorageFileGroupRegeneration({
@@ -17392,6 +17897,7 @@ function _ts_generator(thisArg, body) {
17392
17897
  * - Any embedded file has never been included in the zip (`zat` is unset on the entry)
17393
17898
  *
17394
17899
  * @param input - group state and optional force flag
17900
+ * @returns the regeneration result indicating whether the zip or other derived files need to be regenerated
17395
17901
  *
17396
17902
  * @example
17397
17903
  * ```ts
@@ -17559,6 +18065,9 @@ function _is_native_reflect_construct() {
17559
18065
  * ```ts
17560
18066
  * const colRef = systemStateCollectionReference(firestoreContext);
17561
18067
  * ```
18068
+ *
18069
+ * @param context - the Firestore context to use
18070
+ * @returns the CollectionReference for SystemState documents
17562
18071
  */ function systemStateCollectionReference(context) {
17563
18072
  return context.collection(systemStateIdentity.collectionName);
17564
18073
  }
@@ -17571,6 +18080,7 @@ function _is_native_reflect_construct() {
17571
18080
  *
17572
18081
  * @param firestoreContext - the Firestore context
17573
18082
  * @param converters - map of type identifiers to their data field converters
18083
+ * @returns a configured SystemStateFirestoreCollection with per-type data converters
17574
18084
  *
17575
18085
  * @example
17576
18086
  * ```ts
@@ -17604,4 +18114,4 @@ function _is_native_reflect_construct() {
17604
18114
  });
17605
18115
  }
17606
18116
 
17607
- export { ALL_OIDC_TOKEN_ENDPOINT_AUTH_METHOD_OPTIONS, ALL_STORAGE_FILE_NOTIFICATION_TASK_TYPES, ALL_USER_UPLOADS_FOLDER_NAME, ALL_USER_UPLOADS_FOLDER_PATH, AbstractFirestoreDocument, AbstractFirestoreDocumentDataAccessorWrapper, AbstractFirestoreDocumentWithParent, AppNotificationTemplateTypeInfoRecordService, BASE_MODEL_STORAGE_FILE_PATH, CALL_MODEL_APP_FUNCTION_KEY, COPY_USER_RELATED_DATA_ACCESSOR_FACTORY_FUNCTION, CREATE_NOTIFICATION_ID_REQUIRED_ERROR_CODE, ContextGrantedModelRolesReaderInstance, DBX_FIREBASE_SERVER_NO_AUTH_ERROR_CODE, DBX_FIREBASE_SERVER_NO_UID_ERROR_CODE, DEFAULT_DATE_CELL_RANGE_VALUE, DEFAULT_FIRESTORE_DATE_CELL_SCHEDULE_VALUE, DEFAULT_FIRESTORE_ITEM_PAGE_ITERATOR_ITEMS_PER_PAGE, DEFAULT_FIRESTORE_STRING_FIELD_VALUE, DEFAULT_FIRESTORE_UNITED_STATES_ADDRESS_VALUE, DEFAULT_FIRESTORE_WEBSITE_FILE_LINK_VALUE, DEFAULT_ITERATE_FIRESTORE_DOCUMENT_SNAPSHOT_BATCHES_BATCH_SIZE, DEFAULT_NOTIFICATION_TASK_NOTIFICATION_MODEL_KEY, DEFAULT_NOTIFICATION_TASK_SUBTASK_CLEANUP_RETRY_ATTEMPTS, DEFAULT_NOTIFICATION_TASK_SUBTASK_CLEANUP_RETRY_DELAY, DEFAULT_NOTIFICATION_TEMPLATE_TYPE, DEFAULT_QUERY_CHANGE_WATCHER_DELAY, DEFAULT_SINGLE_ITEM_FIRESTORE_COLLECTION_DOCUMENT_IDENTIFIER, DEFAULT_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, DEFAULT_WEBSITE_LINK, EMPTY_STORAGE_FILE_PURPOSE_SUBGROUP, EXACT_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, FIREBASE_AUTH_NETWORK_REQUEST_ERROR, FIREBASE_AUTH_NETWORK_REQUEST_FAILED, FIREBASE_AUTH_PASSWORD_MAX_LENGTH, FIREBASE_AUTH_PASSWORD_MIN_LENGTH, FIREBASE_AUTH_USER_NOT_FOUND_ERROR, FIREBASE_AUTH_WRONG_PASSWORD, FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY, FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY, FIREBASE_SERVER_AUTH_CLAIMS_RESET_PASSWORD_KEY, FIREBASE_SERVER_AUTH_CLAIMS_SETUP_LAST_COM_DATE_KEY, FIREBASE_SERVER_AUTH_CLAIMS_SETUP_PASSWORD_KEY, FIRESTORE_CLIENT_QUERY_CONSTRAINT_HANDLER_MAPPING, FIRESTORE_COLLECTION_NAME_SEPARATOR, FIRESTORE_DUMMY_MODEL_KEY, FIRESTORE_EMPTY_VALUE, FIRESTORE_END_AT_QUERY_CONSTRAINT_TYPE, FIRESTORE_END_AT_VALUE_QUERY_CONSTRAINT_TYPE, FIRESTORE_END_BEFORE_QUERY_CONSTRAINT_TYPE, FIRESTORE_ITEM_PAGE_ITERATOR, FIRESTORE_ITEM_PAGE_ITERATOR_DELEGATE, FIRESTORE_LIMIT_QUERY_CONSTRAINT_TYPE, FIRESTORE_LIMIT_TO_LAST_QUERY_CONSTRAINT_TYPE, FIRESTORE_MAX_WHERE_IN_FILTER_ARGS_COUNT, FIRESTORE_MODEL_ID_REGEX, FIRESTORE_MODEL_KEY_REGEX, FIRESTORE_MODEL_KEY_REGEX_STRICT, FIRESTORE_OFFSET_QUERY_CONSTRAINT_TYPE, FIRESTORE_ORDER_BY_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, FIRESTORE_ORDER_BY_QUERY_CONSTRAINT_TYPE, FIRESTORE_PASSTHROUGH_FIELD, FIRESTORE_PERMISSION_DENIED_ERROR_CODE, FIRESTORE_START_AFTER_QUERY_CONSTRAINT_TYPE, FIRESTORE_START_AT_QUERY_CONSTRAINT_TYPE, FIRESTORE_START_AT_VALUE_QUERY_CONSTRAINT_TYPE, FIRESTORE_WHERE_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, FIRESTORE_WHERE_QUERY_CONSTRAINT_TYPE, FirebaseDevelopmentFunctions, FirebaseModelPermissionServiceInstance, FirebaseServerError, FirestoreAccessorStreamMode, FirestoreDocumentContextType, HIGH_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, LOW_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, MAX_FIRESTORE_MAP_ZOOM_LEVEL_VALUE, MIN_FIRESTORE_MAP_ZOOM_LEVEL_VALUE, MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_DEFAULT, MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_SPLITTER, MODEL_STORAGE_FILE_SLASH_PATH_FACTORY, ModifyBeforeSetFirestoreDocumentDataAccessorWrapper, NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE, NOTIFICATION_BOX_EXCLUSION_TARGET_INVALID_ERROR_CODE, NOTIFICATION_BOX_EXISTS_FOR_MODEL_ERROR_CODE, NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST_ERROR_CODE, NOTIFICATION_MESSAGE_MAX_LENGTH, NOTIFICATION_MESSAGE_MIN_LENGTH, NOTIFICATION_MODEL_ALREADY_INITIALIZED_ERROR_CODE, NOTIFICATION_RECIPIENT_NAME_MAX_LENGTH, NOTIFICATION_RECIPIENT_NAME_MIN_LENGTH, NOTIFICATION_SUBJECT_MAX_LENGTH, NOTIFICATION_SUBJECT_MIN_LENGTH, NOTIFICATION_SUMMARY_EMBEDDED_NOTIFICATION_ITEM_MESSAGE_MAX_LENGTH, NOTIFICATION_SUMMARY_EMBEDDED_NOTIFICATION_ITEM_SUBJECT_MAX_LENGTH, NOTIFICATION_SUMMARY_ITEM_LIMIT, NOTIFICATION_TASK_SUBTASK_CHECKPOINT_CLEANUP, NOTIFICATION_TASK_SUBTASK_CHECKPOINT_PROCESSING, NOTIFICATION_USER_BLOCKED_FROM_BEING_ADD_TO_RECIPIENTS_ERROR_CODE, NOTIFICATION_USER_INVALID_UID_FOR_CREATE_ERROR_CODE, NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED_ERROR_CODE, NOTIFICATION_WEEK_NOTIFICATION_ITEM_LIMIT, NotificationBoxDocument, NotificationBoxRecipientFlag, NotificationBoxRecipientTemplateConfigBoolean, NotificationDocument, NotificationFirestoreCollections, NotificationFunctions, NotificationMessageFlag, NotificationRecipientSendFlag, NotificationSendState, NotificationSendType, NotificationSummaryDocument, NotificationUserDocument, NotificationWeekDocument, OIDC_ENTRY_CLIENT_TYPE, OidcEntryDocument, OidcModelFirestoreCollections, OidcModelFunctions, PRIVATE_KEY_JWT_TOKEN_ENDPOINT_AUTH_METHOD, RUN_DEV_FUNCTION_APP_FUNCTION_KEY, SCHEDULED_FUNCTION_DEV_FUNCTION_SPECIFIER, STORAGEFILE_RELATED_FILE_METADATA_KEY, STORAGE_FILE_ALREADY_PROCESSED_ERROR_CODE, STORAGE_FILE_CANNOT_BE_DELETED_YET_ERROR_CODE, STORAGE_FILE_GROUP_CREATE_INPUT_ERROR_CODE, STORAGE_FILE_GROUP_QUEUED_FOR_INITIALIZATION_ERROR_CODE, STORAGE_FILE_GROUP_ROOT_FOLDER_PATH, STORAGE_FILE_GROUP_ZIP_FILE_PATH, STORAGE_FILE_GROUP_ZIP_INFO_JSON_FILE_NAME, STORAGE_FILE_GROUP_ZIP_STORAGE_FILE_PURPOSE, STORAGE_FILE_GROUP_ZIP_STORAGE_FILE_PURPOSE_CREATE_ZIP_SUBTASK, STORAGE_FILE_MODEL_ALREADY_INITIALIZED_ERROR_CODE, STORAGE_FILE_NOT_FLAGGED_FOR_DELETION_ERROR_CODE, STORAGE_FILE_NOT_FLAGGED_FOR_GROUPS_SYNC_ERROR_CODE, STORAGE_FILE_PROCESSING_NOTIFICATION_TASK_TYPE, STORAGE_FILE_PROCESSING_NOT_ALLOWED_FOR_INVALID_STATE_ERROR_CODE, STORAGE_FILE_PROCESSING_NOT_AVAILABLE_FOR_TYPE_ERROR_CODE, STORAGE_FILE_PROCESSING_NOT_QUEUED_FOR_PROCESSING_ERROR_CODE, STORAGE_FILE_PROCESSING_STUCK_THROTTLE_CHECK_MS, STORAGE_FILE_UPLOAD_USER_ROLE, ScheduledFunctionDevelopmentFirebaseFunctionListEntry, ScheduledFunctionDevelopmentFunctionTypeEnum, StorageFileCreationType, StorageFileDocument, StorageFileFirestoreCollections, StorageFileFunctions, StorageFileGroupDocument, StorageFileProcessingState, StorageFileState, StorageFileUploadStreamUnsupportedError, SystemStateDocument, SystemStateFirestoreCollections, UPLOADED_FILE_DOES_NOT_EXIST_ERROR_CODE, UPLOADED_FILE_INITIALIZATION_DISCARDED_ERROR_CODE, UPLOADED_FILE_INITIALIZATION_FAILED_ERROR_CODE, UPLOADED_FILE_NOT_ALLOWED_TO_BE_INITIALIZED_ERROR_CODE, UPLOADS_FOLDER_PATH, _createNotificationDocumentFromPair, abstractSubscribeOrUnsubscribeToNotificationBoxParamsType, abstractSubscribeToNotificationBoxParamsType, addConstraintToBuilder, addOrReplaceLimitInConstraints, allChildDocumentsUnderParent, allChildDocumentsUnderParentPath, allChildDocumentsUnderRelativePath, allowDocumentSnapshotWithPathOnceFilter, allowedNotificationRecipients, appNotificationTemplateTypeInfoRecordService, applyExclusionsToNotificationUserNotificationBoxRecipientConfigs, arrayUpdateWithAccessorFunction, asTopLevelFieldPath, asTopLevelFieldPaths, assertFirestoreUpdateHasData, assertStorageUploadOptionsStringFormat, assignDateCellRangeFunction, assignDateCellScheduleFunction, assignUnitedStatesAddressFunction, assignWebsiteFileLinkFunction, assignWebsiteLinkFunction, buildFirebaseCollectionTypeModelTypeMap, calculateNsForNotificationUserNotificationBoxRecipientConfigs, calculateStorageFileGroupEmbeddedFileUpdate, calculateStorageFileGroupRegeneration, callModelFirebaseFunctionMapFactory, canQueueStorageFileForProcessing, childFirestoreModelKey, childFirestoreModelKeyPath, childFirestoreModelKeys, cleanupSentNotificationsParamsType, clientFirebaseFirestoreContextFactory, clientFirebaseStorageContextFactory, combineUploadFileTypeDeterminers, completeSubtaskProcessingAndScheduleCleanupTaskResult, contextGrantedModelRolesReader, contextGrantedModelRolesReaderDoesNotExistErrorMessage, contextGrantedModelRolesReaderPermissionErrorMessage, convertHttpsCallableErrorToReadableError, copyDocumentIdForUserRelatedModifierFunction, copyDocumentIdToFieldModifierFunction, copyStoragePath, copyUserRelatedDataAccessorFactoryFunction, copyUserRelatedDataModifierConfig, createNotificationBoxParamsType, createNotificationDocument, createNotificationDocumentIfSending, createNotificationDocumentPair, createNotificationSummaryParamsType, createNotificationTaskTemplate, createNotificationTemplate, createNotificationUserParamsType, createOidcClientFieldParamsType, createOidcClientParamsType, createStorageFileDocumentPair, createStorageFileDocumentPairFactory, createStorageFileGroupParamsType, createStorageFileParamsType, dataFromDocumentSnapshots, dataFromSnapshotStream, delayCompletion, deleteAllQueuedStorageFilesParamsType, deleteOidcClientParamsType, deleteStorageFileParamsType, determineByFileName, determineByFilePath, determineByFolderName, determineUserByFolder, determineUserByFolderWrapperFunction, determineUserByUserUploadsFolderWrapperFunction, developmentFirebaseFunctionMapFactory, directDataHttpsCallable, documentData, documentDataFunction, documentDataWithIdAndKey, documentReferenceFromDocument, documentReferencesFromDocuments, documentReferencesFromSnapshot, downloadStorageFileParamsType, effectiveNotificationBoxRecipientConfig, effectiveNotificationBoxRecipientTemplateConfig, endAt, endAtValue, endBefore, extendFirestoreCollectionWithSingleDocumentAccessor, filterConstraintsOfType, filterDisallowedFirestoreItemPageIteratorInputConstraints, filterRepeatCheckpointSnapshots, filterWithDateRange, firebaseAuthErrorToReadableError, firebaseFirestoreClientDrivers, firebaseFirestoreQueryConstraintFunctionsDriver, firebaseFirestoreQueryDriver, firebaseFunctionMapFactory, firebaseModelLoader, firebaseModelPermissionService, firebaseModelService, firebaseModelServiceFactory, firebaseModelsService, firebaseQueryItemAccumulator, firebaseQuerySnapshotAccumulator, firebaseStorageBucketFolderPath, firebaseStorageClientAccessorDriver, firebaseStorageClientAccessorFile, firebaseStorageClientAccessorFolder, firebaseStorageClientDrivers, firebaseStorageClientListFilesResultFactory, firebaseStorageContextFactory, firebaseStorageFileExists, firebaseStorageFilePathFromStorageFilePath, firebaseStorageRefForStorageFilePath, firestoreArray, firestoreArrayMap, firestoreBitwiseObjectMap, firestoreBitwiseSet, firestoreBitwiseSetMap, firestoreBoolean, firestoreClientAccessorDriver, firestoreClientArrayUpdateToUpdateData, firestoreClientIncrementUpdateToUpdateData, firestoreCollectionQueryFactory, firestoreContextFactory, firestoreDate, firestoreDateCellRange, firestoreDateCellRangeArray, firestoreDateCellRangeAssignFn, firestoreDateCellSchedule, firestoreDateCellScheduleAssignFn, firestoreDateNumber, firestoreDencoderArray, firestoreDencoderMap, firestoreDencoderStringArray, firestoreDocumentAccessorContextExtension, firestoreDocumentAccessorFactory, firestoreDocumentLoader, firestoreDocumentSnapshotPairsLoader, firestoreDocumentSnapshotPairsLoaderInstance, firestoreDummyKey, firestoreEncodedArray, firestoreEncodedObjectMap, firestoreEnum, firestoreEnumArray, firestoreField, firestoreFieldConfigToModelMapFunctionsRef, firestoreFixedItemPageIteration, firestoreFixedItemPageIterationFactory, firestoreIdBatchVerifierFactory, firestoreIdentityTypeArray, firestoreIdentityTypeArrayName, firestoreItemPageIteration, firestoreItemPageIterationFactory, firestoreLatLngString, firestoreMap, firestoreMapZoomLevel, firestoreModelId, firestoreModelIdArrayField, firestoreModelIdFromDocument, firestoreModelIdFromEmail, firestoreModelIdGrantedRoleArrayMap, firestoreModelIdGrantedRoleMap, firestoreModelIdOrKeyType, firestoreModelIdString, firestoreModelIdType, firestoreModelIdentity, firestoreModelIdentityTypeMap, firestoreModelIdsFromDocuments, firestoreModelIdsFromKey, firestoreModelKey, firestoreModelKeyArrayField, firestoreModelKeyCollectionName, firestoreModelKeyCollectionType, firestoreModelKeyCollectionTypeArray, firestoreModelKeyCollectionTypeArrayName, firestoreModelKeyCollectionTypePair, firestoreModelKeyEncodedGrantedRoleMap, firestoreModelKeyFactory, firestoreModelKeyFromDocument, firestoreModelKeyGrantedRoleArrayMap, firestoreModelKeyGrantedRoleMap, firestoreModelKeyPairObject, firestoreModelKeyParentKey, firestoreModelKeyParentKeyPartPairs, firestoreModelKeyPart, firestoreModelKeyPartPairs, firestoreModelKeyPartPairsKeyPath, firestoreModelKeyPartPairsPaths, firestoreModelKeyPath, firestoreModelKeyString, firestoreModelKeyType, firestoreModelKeyTypePair, firestoreModelKeys, firestoreModelKeysFromDocuments, firestoreModelType, firestoreNotificationBoxRecipient, firestoreNotificationBoxRecipientTemplateConfigRecord, firestoreNotificationItem, firestoreNotificationRecipientWithConfig, firestoreNotificationUserDefaultNotificationBoxRecipientConfig, firestoreNotificationUserNotificationBoxRecipientConfig, firestoreNumber, firestoreObjectArray, firestorePassThroughField, firestoreQueryConstraint, firestoreQueryConstraintFactory, firestoreQueryDocumentSnapshotPairsLoader, firestoreQueryFactory, firestoreSingleDocumentAccessor, firestoreString, firestoreSubObject, firestoreTimezoneString, firestoreUID, firestoreUniqueArray, firestoreUniqueKeyedArray, firestoreUniqueNumberArray, firestoreUniqueStringArray, firestoreUnitedStatesAddress, firestoreUnitedStatesAddressAssignFn, firestoreUnixDateTimeSecondsNumber, firestoreUpdateWithNoDataError, firestoreWebsiteFileLink, firestoreWebsiteFileLinkAssignFn, firestoreWebsiteFileLinkEncodedArray, firestoreWebsiteFileLinkObjectArray, firestoreWebsiteLink, firestoreWebsiteLinkArray, firestoreWebsiteLinkAssignFn, flatFirestoreModelKey, getDataFromDocumentSnapshots, getDocumentSnapshotData, getDocumentSnapshotDataPair, getDocumentSnapshotDataPairs, getDocumentSnapshotDataPairsWithData, getDocumentSnapshotDataTuples, getDocumentSnapshotPair, getDocumentSnapshotPairs, getDocumentSnapshots, getDocumentSnapshotsData, grantFullAccessIfAdmin, grantFullAccessIfAuthUserRelated, grantModelRolesIfAdmin, grantModelRolesIfAdminFunction, grantModelRolesIfAuthUserRelatedModelFunction, grantModelRolesIfFunction, grantModelRolesIfHasAuthRolesFactory, grantModelRolesIfHasAuthRolesFunction, grantModelRolesOnlyIfFunction, grantStorageFileRolesForUserAuthFunction, inContextFirebaseModelServiceFactory, inContextFirebaseModelsServiceFactory, incrementUpdateWithAccessorFunction, inferKeyFromTwoWayFlatFirestoreModelKey, inferNotificationBoxRelatedModelKey, inferStorageFileGroupRelatedModelKey, inferredTargetModelIdParamsType, inferredTargetModelParamsType, initializeAllApplicableNotificationBoxesParamsType, initializeAllApplicableNotificationSummariesParamsType, initializeAllApplicableStorageFileGroupsParamsType, initializeAllStorageFilesFromUploadsParamsType, initializeNotificationModelParamsType, initializeStorageFileFromUploadParamsType, initializeStorageFileModelParamsType, interceptAccessorFactoryFunction, isAdminInFirebaseModelContext, isClientFirebaseError, isCompleteNotificationSendState, isFirebaseStorageObjectNotFoundError, isFirestoreModelId, isFirestoreModelIdOrKey, isFirestoreModelKey, isOwnerOfUserRelatedModelInFirebaseModelContext, iterateFirestoreDocumentSnapshotBatches, iterateFirestoreDocumentSnapshotCheckpoints, iterateFirestoreDocumentSnapshotPairBatches, iterateFirestoreDocumentSnapshotPairs, iterateFirestoreDocumentSnapshots, iterateStorageListFiles, iterateStorageListFilesByEachFile, iterateStorageListFilesFactory, iterationQueryDocChangeWatcher, iterationQueryDocChangeWatcherChangeTypeForGroup, latestDataFromDocuments, latestSnapshotsFromDocuments, lazyFirebaseFunctionsFactory, limit, limitToLast, limitUploadFileTypeDeterminer, limitedFirestoreDocumentAccessorFactory, limitedFirestoreDocumentAccessorSnapshotCache, loadAllFirestoreDocumentSnapshot, loadAllFirestoreDocumentSnapshotPairs, loadDocumentsForDocumentReferences, loadDocumentsForDocumentReferencesFromValues, loadDocumentsForIds, loadDocumentsForIdsFromValues, loadDocumentsForKeys, loadDocumentsForKeysFromValues, loadDocumentsForSnapshots, loadDocumentsForValues, loadNotificationBoxDocumentForReferencePair, loadStorageFileGroupDocumentForReferencePair, makeDocuments, makeFirestoreCollection, makeFirestoreCollectionGroup, makeFirestoreCollectionWithParent, makeFirestoreItemPageIteratorDelegate, makeFirestoreQueryConstraintFunctionsDriver, makeRootSingleItemFirestoreCollection, makeSingleItemFirestoreCollection, mapDataFromSnapshot, mapHttpsCallable, mapLatestSnapshotsFromDocuments, mergeNotificationBoxRecipientTemplateConfigRecords, mergeNotificationBoxRecipientTemplateConfigs, mergeNotificationBoxRecipients, mergeNotificationSendMessagesResult, mergeNotificationUserDefaultNotificationBoxRecipientConfig, mergeNotificationUserNotificationBoxRecipientConfigs, modelStorageSlashPathFactory, modifyBeforeSetInterceptAccessorFactoryFunction, newDocuments, newNotificationBoxRecipientForUid, noContentNotificationMessageFunctionFactory, noStringFormatInStorageUploadOptionsError, notificationBoxCollectionReference, notificationBoxConverter, notificationBoxFirestoreCollection, notificationBoxIdForModel, notificationBoxIdentity, notificationBoxModelCrudFunctionsConfig, notificationBoxRecipientTemplateConfigArrayEntryParamType, notificationBoxRecipientTemplateConfigArrayToRecord, notificationBoxRecipientTemplateConfigRecordToArray, notificationBoxesFlaggedForNeedsInitializationQuery, notificationBoxesFlaggedInvalidQuery, notificationCollectionReference, notificationCollectionReferenceFactory, notificationConverter, notificationFirestoreCollectionFactory, notificationFirestoreCollectionGroup, notificationFunctionMap, notificationFunctionTypeConfigMap, notificationIdentity, notificationMessageFunction, notificationRecipientParamsType, notificationSendExclusionCanSendFunction, notificationSendFlagsImplyIsComplete, notificationSubtaskComplete, notificationSummariesFlaggedForNeedsInitializationQuery, notificationSummaryCollectionReference, notificationSummaryConverter, notificationSummaryFirestoreCollection, notificationSummaryIdForModel, notificationSummaryIdForUidFunctionForRootFirestoreModelIdentity, notificationSummaryIdentity, notificationTaskCanRunNextCheckpoint, notificationTaskComplete, notificationTaskDelayRetry, notificationTaskFailed, notificationTaskPartiallyComplete, notificationTaskUniqueId, notificationTemplateTypeInfoRecord, notificationUserCollectionReference, notificationUserConverter, notificationUserFirestoreCollection, notificationUserHasExclusionQuery, notificationUserIdentity, notificationUsersFlaggedForNeedsSyncQuery, notificationWeekCollectionReference, notificationWeekCollectionReferenceFactory, notificationWeekConverter, notificationWeekFirestoreCollectionFactory, notificationWeekFirestoreCollectionGroup, notificationWeekIdentity, notificationsPastSendAtTimeQuery, notificationsReadyForCleanupQuery, offset, oidcClientEntriesByOwnerQuery, oidcEntriesByGrantIdQuery, oidcEntriesByUidQuery, oidcEntriesByUserCodeQuery, oidcEntriesWithTypeQuery, oidcEntryCollectionReference, oidcEntryConverter, oidcEntryFirestoreCollection, oidcEntryIdentity, oidcFunctionTypeConfigMap, oidcModelCrudFunctionsConfig, oidcModelFunctionMap, onCallCreateModelParams, onCallCreateModelResult, onCallCreateModelResultWithDocs, onCallDeleteModelParams, onCallDevelopmentParams, onCallReadModelParams, onCallTypedModelParams, onCallTypedModelParamsFunction, onCallUpdateModelParams, optionalFirestoreArray, optionalFirestoreBoolean, optionalFirestoreDate, optionalFirestoreDateNumber, optionalFirestoreEnum, optionalFirestoreField, optionalFirestoreNumber, optionalFirestoreString, optionalFirestoreUID, optionalFirestoreUnitedStatesAddress, optionalFirestoreUnixDateTimeSecondsNumber, orderBy, orderByDocumentId, processAllQueuedStorageFilesParamsType, processStorageFileParamsType, readFirestoreModelKey, readFirestoreModelKeyFromDocumentSnapshot, regenerateAllFlaggedStorageFileGroupsContentParamsType, regenerateStorageFileGroupContentParamsType, replaceConstraints, resyncAllNotificationUserParamsType, resyncNotificationUserParamsType, rotateOidcClientSecretParamsType, scheduledFunctionDevelopmentFirebaseFunctionParamsType, selectFromFirebaseModelsService, sendNotificationParamsType, sendQueuedNotificationsParamsType, separateConstraints, setIdAndKeyFromKeyIdRefOnDocumentData, setIdAndKeyFromSnapshotOnDocumentData, shouldSaveNotificationToNotificationWeek, shouldSendCreatedNotificationInput, snapshotConverterFunctions, snapshotStreamDataForAccessor, snapshotStreamForAccessor, sortNotificationItemsFunction, startAfter, startAt, startAtValue, storageFileCollectionReference, storageFileConverter, storageFileFirestoreCollection, storageFileFlaggedForSyncWithGroupsQuery, storageFileFunctionMap, storageFileFunctionTypeConfigMap, storageFileGroupCollectionReference, storageFileGroupConverter, storageFileGroupCreateStorageFileKeyFactory, storageFileGroupCreatedStorageFileKey, storageFileGroupEmbeddedFile, storageFileGroupFirestoreCollection, storageFileGroupFolderPath, storageFileGroupIdForModel, storageFileGroupIdentity, storageFileGroupZipFileStoragePath, storageFileGroupZipStorageFileKey, storageFileGroupsFlaggedForContentRegenerationQuery, storageFileGroupsFlaggedForNeedsInitializationQuery, storageFileGroupsFlaggedInvalidQuery, storageFileIdentity, storageFileModelCrudFunctionsConfig, storageFileProcessingNotificationTaskTemplate, storageFilePurposeAndUserQuery, storageFileUploadUserSimpleClaimsConfiguration, storageFilesQueuedForDeleteQuery, storageFilesQueuedForProcessingQuery, storageListFilesResultFactory, storageListFilesResultHasNoNextError, storagePathFactory, storedFileReaderFactory, streamDocumentSnapshotDataPairs, streamDocumentSnapshotDataPairsWithData, streamDocumentSnapshotsData, streamFromOnSnapshot, syncAllFlaggedStorageFilesWithGroupsParamsType, syncStorageFileWithGroupsParamsType, systemStateCollectionReference, systemStateConverter, systemStateFirestoreCollection, systemStateIdentity, targetModelIdParamsType, targetModelParamsType, twoWayFlatFirestoreModelKey, unreadNotificationItems, unsupportedFirestoreDriverFunctionError, updateNotificationBoxParamsType, updateNotificationBoxRecipientLikeParamsType, updateNotificationBoxRecipientParamsType, updateNotificationBoxRecipientTemplateConfigRecord, updateNotificationRecipient, updateNotificationSummaryParamsType, updateNotificationUserDefaultNotificationBoxRecipientConfig, updateNotificationUserDefaultNotificationBoxRecipientConfigParamsType, updateNotificationUserNotificationBoxRecipientConfigIfChanged, updateNotificationUserNotificationBoxRecipientConfigs, updateNotificationUserNotificationBoxRecipientParamsType, updateNotificationUserNotificationSendExclusions, updateNotificationUserParamsType, updateOidcClientFieldParamsType, updateOidcClientParamsType, updateStorageFileGroupEntryParamsType, updateStorageFileGroupParamsType, updateStorageFileParamsType, updateWithAccessorUpdateAndConverterFunction, uploadFileWithStream, useContextAuth, useContextAuthUid, useDocumentSnapshot, useDocumentSnapshotData, useFirebaseModelsService, userUploadsFolderSlashPathFactory, userUploadsFolderStoragePathFactory, where, whereDateIsAfter, whereDateIsAfterWithSort, whereDateIsBefore, whereDateIsBeforeWithSort, whereDateIsBetween, whereDateIsInRange, whereDateIsOnOrAfter, whereDateIsOnOrAfterWithSort, whereDateIsOnOrBefore, whereDateIsOnOrBeforeWithSort, whereDocumentId, whereStringHasRootIdentityModelKey, whereStringValueHasPrefix };
18117
+ export { ALL_OIDC_TOKEN_ENDPOINT_AUTH_METHOD_OPTIONS, ALL_STORAGE_FILE_NOTIFICATION_TASK_TYPES, ALL_USER_UPLOADS_FOLDER_NAME, ALL_USER_UPLOADS_FOLDER_PATH, AbstractFirestoreDocument, AbstractFirestoreDocumentDataAccessorWrapper, AbstractFirestoreDocumentWithParent, AppNotificationTemplateTypeInfoRecordService, BASE_MODEL_STORAGE_FILE_PATH, CALL_MODEL_APP_FUNCTION_KEY, COPY_USER_RELATED_DATA_ACCESSOR_FACTORY_FUNCTION, CREATE_NOTIFICATION_ID_REQUIRED_ERROR_CODE, ContextGrantedModelRolesReaderInstance, DBX_FIREBASE_SERVER_NO_AUTH_ERROR_CODE, DBX_FIREBASE_SERVER_NO_UID_ERROR_CODE, DEFAULT_DATE_CELL_RANGE_VALUE, DEFAULT_FIRESTORE_DATE_CELL_SCHEDULE_VALUE, DEFAULT_FIRESTORE_ITEM_PAGE_ITERATOR_ITEMS_PER_PAGE, DEFAULT_FIRESTORE_STRING_FIELD_VALUE, DEFAULT_FIRESTORE_UNITED_STATES_ADDRESS_VALUE, DEFAULT_FIRESTORE_WEBSITE_FILE_LINK_VALUE, DEFAULT_ITERATE_FIRESTORE_DOCUMENT_SNAPSHOT_BATCHES_BATCH_SIZE, DEFAULT_NOTIFICATION_TASK_NOTIFICATION_MODEL_KEY, DEFAULT_NOTIFICATION_TASK_SUBTASK_CLEANUP_RETRY_ATTEMPTS, DEFAULT_NOTIFICATION_TASK_SUBTASK_CLEANUP_RETRY_DELAY, DEFAULT_NOTIFICATION_TEMPLATE_TYPE, DEFAULT_QUERY_CHANGE_WATCHER_DELAY, DEFAULT_SINGLE_ITEM_FIRESTORE_COLLECTION_DOCUMENT_IDENTIFIER, DEFAULT_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, DEFAULT_WEBSITE_LINK, EMPTY_STORAGE_FILE_PURPOSE_SUBGROUP, EXACT_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, FIREBASE_AUTH_EMAIL_ALREADY_EXISTS_ERROR, FIREBASE_AUTH_INVALID_PHONE_NUMBER_ERROR, FIREBASE_AUTH_NETWORK_REQUEST_ERROR, FIREBASE_AUTH_NETWORK_REQUEST_FAILED, FIREBASE_AUTH_PASSWORD_MAX_LENGTH, FIREBASE_AUTH_PASSWORD_MIN_LENGTH, FIREBASE_AUTH_PHONE_NUMBER_ALREADY_EXISTS_ERROR, FIREBASE_AUTH_USER_NOT_FOUND_ERROR, FIREBASE_AUTH_WRONG_PASSWORD, FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY, FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY, FIREBASE_SERVER_AUTH_CLAIMS_RESET_PASSWORD_KEY, FIREBASE_SERVER_AUTH_CLAIMS_SETUP_LAST_COM_DATE_KEY, FIREBASE_SERVER_AUTH_CLAIMS_SETUP_PASSWORD_KEY, FIRESTORE_CLIENT_QUERY_CONSTRAINT_HANDLER_MAPPING, FIRESTORE_COLLECTION_NAME_SEPARATOR, FIRESTORE_DUMMY_MODEL_KEY, FIRESTORE_EMPTY_VALUE, FIRESTORE_END_AT_QUERY_CONSTRAINT_TYPE, FIRESTORE_END_AT_VALUE_QUERY_CONSTRAINT_TYPE, FIRESTORE_END_BEFORE_QUERY_CONSTRAINT_TYPE, FIRESTORE_ITEM_PAGE_ITERATOR, FIRESTORE_ITEM_PAGE_ITERATOR_DELEGATE, FIRESTORE_LIMIT_QUERY_CONSTRAINT_TYPE, FIRESTORE_LIMIT_TO_LAST_QUERY_CONSTRAINT_TYPE, FIRESTORE_MAX_WHERE_IN_FILTER_ARGS_COUNT, FIRESTORE_MODEL_ID_REGEX, FIRESTORE_MODEL_KEY_REGEX, FIRESTORE_MODEL_KEY_REGEX_STRICT, FIRESTORE_OFFSET_QUERY_CONSTRAINT_TYPE, FIRESTORE_ORDER_BY_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, FIRESTORE_ORDER_BY_QUERY_CONSTRAINT_TYPE, FIRESTORE_PASSTHROUGH_FIELD, FIRESTORE_PERMISSION_DENIED_ERROR_CODE, FIRESTORE_START_AFTER_QUERY_CONSTRAINT_TYPE, FIRESTORE_START_AT_QUERY_CONSTRAINT_TYPE, FIRESTORE_START_AT_VALUE_QUERY_CONSTRAINT_TYPE, FIRESTORE_WHERE_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, FIRESTORE_WHERE_QUERY_CONSTRAINT_TYPE, FirebaseDevelopmentFunctions, FirebaseModelPermissionServiceInstance, FirebaseServerError, FirestoreAccessorStreamMode, FirestoreDocumentContextType, HIGH_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, LOW_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, MAX_FIRESTORE_MAP_ZOOM_LEVEL_VALUE, MIN_FIRESTORE_MAP_ZOOM_LEVEL_VALUE, MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_DEFAULT, MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_SPLITTER, MODEL_STORAGE_FILE_SLASH_PATH_FACTORY, ModifyBeforeSetFirestoreDocumentDataAccessorWrapper, NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE, NOTIFICATION_BOX_EXCLUSION_TARGET_INVALID_ERROR_CODE, NOTIFICATION_BOX_EXISTS_FOR_MODEL_ERROR_CODE, NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST_ERROR_CODE, NOTIFICATION_MESSAGE_MAX_LENGTH, NOTIFICATION_MESSAGE_MIN_LENGTH, NOTIFICATION_MODEL_ALREADY_INITIALIZED_ERROR_CODE, NOTIFICATION_RECIPIENT_NAME_MAX_LENGTH, NOTIFICATION_RECIPIENT_NAME_MIN_LENGTH, NOTIFICATION_SUBJECT_MAX_LENGTH, NOTIFICATION_SUBJECT_MIN_LENGTH, NOTIFICATION_SUMMARY_EMBEDDED_NOTIFICATION_ITEM_MESSAGE_MAX_LENGTH, NOTIFICATION_SUMMARY_EMBEDDED_NOTIFICATION_ITEM_SUBJECT_MAX_LENGTH, NOTIFICATION_SUMMARY_ITEM_LIMIT, NOTIFICATION_TASK_SUBTASK_CHECKPOINT_CLEANUP, NOTIFICATION_TASK_SUBTASK_CHECKPOINT_PROCESSING, NOTIFICATION_USER_BLOCKED_FROM_BEING_ADD_TO_RECIPIENTS_ERROR_CODE, NOTIFICATION_USER_INVALID_UID_FOR_CREATE_ERROR_CODE, NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED_ERROR_CODE, NOTIFICATION_WEEK_NOTIFICATION_ITEM_LIMIT, NotificationBoxDocument, NotificationBoxRecipientFlag, NotificationBoxRecipientTemplateConfigBoolean, NotificationDocument, NotificationFirestoreCollections, NotificationFunctions, NotificationMessageFlag, NotificationRecipientSendFlag, NotificationSendState, NotificationSendType, NotificationSummaryDocument, NotificationUserDocument, NotificationWeekDocument, OIDC_ENTRY_CLIENT_TYPE, OidcEntryDocument, OidcModelFirestoreCollections, OidcModelFunctions, PRIVATE_KEY_JWT_TOKEN_ENDPOINT_AUTH_METHOD, RUN_DEV_FUNCTION_APP_FUNCTION_KEY, SCHEDULED_FUNCTION_DEV_FUNCTION_SPECIFIER, STORAGEFILE_RELATED_FILE_METADATA_KEY, STORAGE_FILE_ALREADY_PROCESSED_ERROR_CODE, STORAGE_FILE_CANNOT_BE_DELETED_YET_ERROR_CODE, STORAGE_FILE_GROUP_CREATE_INPUT_ERROR_CODE, STORAGE_FILE_GROUP_QUEUED_FOR_INITIALIZATION_ERROR_CODE, STORAGE_FILE_GROUP_ROOT_FOLDER_PATH, STORAGE_FILE_GROUP_ZIP_FILE_PATH, STORAGE_FILE_GROUP_ZIP_INFO_JSON_FILE_NAME, STORAGE_FILE_GROUP_ZIP_STORAGE_FILE_PURPOSE, STORAGE_FILE_GROUP_ZIP_STORAGE_FILE_PURPOSE_CREATE_ZIP_SUBTASK, STORAGE_FILE_MODEL_ALREADY_INITIALIZED_ERROR_CODE, STORAGE_FILE_NOT_FLAGGED_FOR_DELETION_ERROR_CODE, STORAGE_FILE_NOT_FLAGGED_FOR_GROUPS_SYNC_ERROR_CODE, STORAGE_FILE_PROCESSING_NOTIFICATION_TASK_TYPE, STORAGE_FILE_PROCESSING_NOT_ALLOWED_FOR_INVALID_STATE_ERROR_CODE, STORAGE_FILE_PROCESSING_NOT_AVAILABLE_FOR_TYPE_ERROR_CODE, STORAGE_FILE_PROCESSING_NOT_QUEUED_FOR_PROCESSING_ERROR_CODE, STORAGE_FILE_PROCESSING_STUCK_THROTTLE_CHECK_MS, STORAGE_FILE_UPLOAD_USER_ROLE, ScheduledFunctionDevelopmentFirebaseFunctionListEntry, ScheduledFunctionDevelopmentFunctionTypeEnum, StorageFileCreationType, StorageFileDocument, StorageFileFirestoreCollections, StorageFileFunctions, StorageFileGroupDocument, StorageFileProcessingState, StorageFileState, StorageFileUploadStreamUnsupportedError, SystemStateDocument, SystemStateFirestoreCollections, UPLOADED_FILE_DOES_NOT_EXIST_ERROR_CODE, UPLOADED_FILE_INITIALIZATION_DISCARDED_ERROR_CODE, UPLOADED_FILE_INITIALIZATION_FAILED_ERROR_CODE, UPLOADED_FILE_NOT_ALLOWED_TO_BE_INITIALIZED_ERROR_CODE, UPLOADS_FOLDER_PATH, _createNotificationDocumentFromPair, abstractSubscribeOrUnsubscribeToNotificationBoxParamsType, abstractSubscribeToNotificationBoxParamsType, addConstraintToBuilder, addOrReplaceLimitInConstraints, allChildDocumentsUnderParent, allChildDocumentsUnderParentPath, allChildDocumentsUnderRelativePath, allowDocumentSnapshotWithPathOnceFilter, allowedNotificationRecipients, appNotificationTemplateTypeInfoRecordService, applyExclusionsToNotificationUserNotificationBoxRecipientConfigs, arrayUpdateWithAccessorFunction, asTopLevelFieldPath, asTopLevelFieldPaths, assertFirestoreUpdateHasData, assertStorageUploadOptionsStringFormat, assignDateCellRangeFunction, assignDateCellScheduleFunction, assignUnitedStatesAddressFunction, assignWebsiteFileLinkFunction, assignWebsiteLinkFunction, buildFirebaseCollectionTypeModelTypeMap, calculateNsForNotificationUserNotificationBoxRecipientConfigs, calculateStorageFileGroupEmbeddedFileUpdate, calculateStorageFileGroupRegeneration, callModelFirebaseFunctionMapFactory, canQueueStorageFileForProcessing, childFirestoreModelKey, childFirestoreModelKeyPath, childFirestoreModelKeys, cleanupSentNotificationsParamsType, clientFirebaseFirestoreContextFactory, clientFirebaseStorageContextFactory, combineUploadFileTypeDeterminers, completeSubtaskProcessingAndScheduleCleanupTaskResult, contextGrantedModelRolesReader, contextGrantedModelRolesReaderDoesNotExistErrorMessage, contextGrantedModelRolesReaderPermissionErrorMessage, convertHttpsCallableErrorToReadableError, copyDocumentIdForUserRelatedModifierFunction, copyDocumentIdToFieldModifierFunction, copyStoragePath, copyUserRelatedDataAccessorFactoryFunction, copyUserRelatedDataModifierConfig, createNotificationBoxParamsType, createNotificationDocument, createNotificationDocumentIfSending, createNotificationDocumentPair, createNotificationSummaryParamsType, createNotificationTaskTemplate, createNotificationTemplate, createNotificationUserParamsType, createOidcClientFieldParamsType, createOidcClientParamsType, createStorageFileDocumentPair, createStorageFileDocumentPairFactory, createStorageFileGroupParamsType, createStorageFileParamsType, dataFromDocumentSnapshots, dataFromSnapshotStream, delayCompletion, deleteAllQueuedStorageFilesParamsType, deleteOidcClientParamsType, deleteStorageFileParamsType, determineByFileName, determineByFilePath, determineByFolderName, determineUserByFolder, determineUserByFolderWrapperFunction, determineUserByUserUploadsFolderWrapperFunction, developmentFirebaseFunctionMapFactory, directDataHttpsCallable, documentData, documentDataFunction, documentDataWithIdAndKey, documentReferenceFromDocument, documentReferencesFromDocuments, documentReferencesFromSnapshot, downloadStorageFileParamsType, effectiveNotificationBoxRecipientConfig, effectiveNotificationBoxRecipientTemplateConfig, endAt, endAtValue, endBefore, extendFirestoreCollectionWithSingleDocumentAccessor, filterConstraintsOfType, filterDisallowedFirestoreItemPageIteratorInputConstraints, filterRepeatCheckpointSnapshots, filterWithDateRange, firebaseAuthErrorToReadableError, firebaseFirestoreClientDrivers, firebaseFirestoreQueryConstraintFunctionsDriver, firebaseFirestoreQueryDriver, firebaseFunctionMapFactory, firebaseModelLoader, firebaseModelPermissionService, firebaseModelService, firebaseModelServiceFactory, firebaseModelsService, firebaseQueryItemAccumulator, firebaseQuerySnapshotAccumulator, firebaseStorageBucketFolderPath, firebaseStorageClientAccessorDriver, firebaseStorageClientAccessorFile, firebaseStorageClientAccessorFolder, firebaseStorageClientDrivers, firebaseStorageClientListFilesResultFactory, firebaseStorageContextFactory, firebaseStorageFileExists, firebaseStorageFilePathFromStorageFilePath, firebaseStorageRefForStorageFilePath, firestoreArray, firestoreArrayMap, firestoreBitwiseObjectMap, firestoreBitwiseSet, firestoreBitwiseSetMap, firestoreBoolean, firestoreClientAccessorDriver, firestoreClientArrayUpdateToUpdateData, firestoreClientIncrementUpdateToUpdateData, firestoreCollectionQueryFactory, firestoreContextFactory, firestoreDate, firestoreDateCellRange, firestoreDateCellRangeArray, firestoreDateCellRangeAssignFn, firestoreDateCellSchedule, firestoreDateCellScheduleAssignFn, firestoreDateNumber, firestoreDencoderArray, firestoreDencoderMap, firestoreDencoderStringArray, firestoreDocumentAccessorContextExtension, firestoreDocumentAccessorFactory, firestoreDocumentLoader, firestoreDocumentSnapshotPairsLoader, firestoreDocumentSnapshotPairsLoaderInstance, firestoreDummyKey, firestoreEncodedArray, firestoreEncodedObjectMap, firestoreEnum, firestoreEnumArray, firestoreField, firestoreFieldConfigToModelMapFunctionsRef, firestoreFixedItemPageIteration, firestoreFixedItemPageIterationFactory, firestoreIdBatchVerifierFactory, firestoreIdentityTypeArray, firestoreIdentityTypeArrayName, firestoreItemPageIteration, firestoreItemPageIterationFactory, firestoreLatLngString, firestoreMap, firestoreMapZoomLevel, firestoreModelId, firestoreModelIdArrayField, firestoreModelIdFromDocument, firestoreModelIdFromEmail, firestoreModelIdGrantedRoleArrayMap, firestoreModelIdGrantedRoleMap, firestoreModelIdOrKeyType, firestoreModelIdString, firestoreModelIdType, firestoreModelIdentity, firestoreModelIdentityTypeMap, firestoreModelIdsFromDocuments, firestoreModelIdsFromKey, firestoreModelKey, firestoreModelKeyArrayField, firestoreModelKeyCollectionName, firestoreModelKeyCollectionType, firestoreModelKeyCollectionTypeArray, firestoreModelKeyCollectionTypeArrayName, firestoreModelKeyCollectionTypePair, firestoreModelKeyEncodedGrantedRoleMap, firestoreModelKeyFactory, firestoreModelKeyFromDocument, firestoreModelKeyGrantedRoleArrayMap, firestoreModelKeyGrantedRoleMap, firestoreModelKeyPairObject, firestoreModelKeyParentKey, firestoreModelKeyParentKeyPartPairs, firestoreModelKeyPart, firestoreModelKeyPartPairs, firestoreModelKeyPartPairsKeyPath, firestoreModelKeyPartPairsPaths, firestoreModelKeyPath, firestoreModelKeyString, firestoreModelKeyType, firestoreModelKeyTypePair, firestoreModelKeys, firestoreModelKeysFromDocuments, firestoreModelType, firestoreNotificationBoxRecipient, firestoreNotificationBoxRecipientTemplateConfigRecord, firestoreNotificationItem, firestoreNotificationRecipientWithConfig, firestoreNotificationUserDefaultNotificationBoxRecipientConfig, firestoreNotificationUserNotificationBoxRecipientConfig, firestoreNumber, firestoreObjectArray, firestorePassThroughField, firestoreQueryConstraint, firestoreQueryConstraintFactory, firestoreQueryDocumentSnapshotPairsLoader, firestoreQueryFactory, firestoreSingleDocumentAccessor, firestoreString, firestoreSubObject, firestoreTimezoneString, firestoreUID, firestoreUniqueArray, firestoreUniqueKeyedArray, firestoreUniqueNumberArray, firestoreUniqueStringArray, firestoreUnitedStatesAddress, firestoreUnitedStatesAddressAssignFn, firestoreUnixDateTimeSecondsNumber, firestoreUpdateWithNoDataError, firestoreWebsiteFileLink, firestoreWebsiteFileLinkAssignFn, firestoreWebsiteFileLinkEncodedArray, firestoreWebsiteFileLinkObjectArray, firestoreWebsiteLink, firestoreWebsiteLinkArray, firestoreWebsiteLinkAssignFn, flatFirestoreModelKey, getDataFromDocumentSnapshots, getDocumentSnapshotData, getDocumentSnapshotDataPair, getDocumentSnapshotDataPairs, getDocumentSnapshotDataPairsWithData, getDocumentSnapshotDataTuples, getDocumentSnapshotPair, getDocumentSnapshotPairs, getDocumentSnapshots, getDocumentSnapshotsData, grantFullAccessIfAdmin, grantFullAccessIfAuthUserRelated, grantModelRolesIfAdmin, grantModelRolesIfAdminFunction, grantModelRolesIfAuthUserRelatedModelFunction, grantModelRolesIfFunction, grantModelRolesIfHasAuthRolesFactory, grantModelRolesIfHasAuthRolesFunction, grantModelRolesOnlyIfFunction, grantStorageFileRolesForUserAuthFunction, inContextFirebaseModelServiceFactory, inContextFirebaseModelsServiceFactory, incrementUpdateWithAccessorFunction, inferKeyFromTwoWayFlatFirestoreModelKey, inferNotificationBoxRelatedModelKey, inferStorageFileGroupRelatedModelKey, inferredTargetModelIdParamsType, inferredTargetModelParamsType, initializeAllApplicableNotificationBoxesParamsType, initializeAllApplicableNotificationSummariesParamsType, initializeAllApplicableStorageFileGroupsParamsType, initializeAllStorageFilesFromUploadsParamsType, initializeNotificationModelParamsType, initializeStorageFileFromUploadParamsType, initializeStorageFileModelParamsType, interceptAccessorFactoryFunction, isAdminInFirebaseModelContext, isClientFirebaseError, isCompleteNotificationSendState, isFirebaseStorageObjectNotFoundError, isFirestoreModelId, isFirestoreModelIdOrKey, isFirestoreModelKey, isOwnerOfUserRelatedModelInFirebaseModelContext, iterateFirestoreDocumentSnapshotBatches, iterateFirestoreDocumentSnapshotCheckpoints, iterateFirestoreDocumentSnapshotPairBatches, iterateFirestoreDocumentSnapshotPairs, iterateFirestoreDocumentSnapshots, iterateStorageListFiles, iterateStorageListFilesByEachFile, iterateStorageListFilesFactory, iterationQueryDocChangeWatcher, iterationQueryDocChangeWatcherChangeTypeForGroup, latestDataFromDocuments, latestSnapshotsFromDocuments, lazyFirebaseFunctionsFactory, limit, limitToLast, limitUploadFileTypeDeterminer, limitedFirestoreDocumentAccessorFactory, limitedFirestoreDocumentAccessorSnapshotCache, loadAllFirestoreDocumentSnapshot, loadAllFirestoreDocumentSnapshotPairs, loadDocumentsForDocumentReferences, loadDocumentsForDocumentReferencesFromValues, loadDocumentsForIds, loadDocumentsForIdsFromValues, loadDocumentsForKeys, loadDocumentsForKeysFromValues, loadDocumentsForSnapshots, loadDocumentsForValues, loadNotificationBoxDocumentForReferencePair, loadStorageFileGroupDocumentForReferencePair, makeDocuments, makeFirestoreCollection, makeFirestoreCollectionGroup, makeFirestoreCollectionWithParent, makeFirestoreItemPageIteratorDelegate, makeFirestoreQueryConstraintFunctionsDriver, makeRootSingleItemFirestoreCollection, makeSingleItemFirestoreCollection, mapDataFromSnapshot, mapHttpsCallable, mapLatestSnapshotsFromDocuments, mergeNotificationBoxRecipientTemplateConfigRecords, mergeNotificationBoxRecipientTemplateConfigs, mergeNotificationBoxRecipients, mergeNotificationSendMessagesResult, mergeNotificationUserDefaultNotificationBoxRecipientConfig, mergeNotificationUserNotificationBoxRecipientConfigs, modelStorageSlashPathFactory, modifyBeforeSetInterceptAccessorFactoryFunction, newDocuments, newNotificationBoxRecipientForUid, noContentNotificationMessageFunctionFactory, noStringFormatInStorageUploadOptionsError, notificationBoxCollectionReference, notificationBoxConverter, notificationBoxFirestoreCollection, notificationBoxIdForModel, notificationBoxIdentity, notificationBoxModelCrudFunctionsConfig, notificationBoxRecipientTemplateConfigArrayEntryParamType, notificationBoxRecipientTemplateConfigArrayToRecord, notificationBoxRecipientTemplateConfigRecordToArray, notificationBoxesFlaggedForNeedsInitializationQuery, notificationBoxesFlaggedInvalidQuery, notificationCollectionReference, notificationCollectionReferenceFactory, notificationConverter, notificationFirestoreCollectionFactory, notificationFirestoreCollectionGroup, notificationFunctionMap, notificationFunctionTypeConfigMap, notificationIdentity, notificationMessageFunction, notificationRecipientParamsType, notificationSendExclusionCanSendFunction, notificationSendFlagsImplyIsComplete, notificationSubtaskComplete, notificationSummariesFlaggedForNeedsInitializationQuery, notificationSummaryCollectionReference, notificationSummaryConverter, notificationSummaryFirestoreCollection, notificationSummaryIdForModel, notificationSummaryIdForUidFunctionForRootFirestoreModelIdentity, notificationSummaryIdentity, notificationTaskCanRunNextCheckpoint, notificationTaskComplete, notificationTaskDelayRetry, notificationTaskFailed, notificationTaskPartiallyComplete, notificationTaskUniqueId, notificationTemplateTypeInfoRecord, notificationUserCollectionReference, notificationUserConverter, notificationUserFirestoreCollection, notificationUserHasExclusionQuery, notificationUserIdentity, notificationUsersFlaggedForNeedsSyncQuery, notificationWeekCollectionReference, notificationWeekCollectionReferenceFactory, notificationWeekConverter, notificationWeekFirestoreCollectionFactory, notificationWeekFirestoreCollectionGroup, notificationWeekIdentity, notificationsPastSendAtTimeQuery, notificationsReadyForCleanupQuery, offset, oidcClientEntriesByOwnerQuery, oidcEntriesByGrantIdQuery, oidcEntriesByUidQuery, oidcEntriesByUserCodeQuery, oidcEntriesWithTypeQuery, oidcEntryCollectionReference, oidcEntryConverter, oidcEntryFirestoreCollection, oidcEntryIdentity, oidcFunctionTypeConfigMap, oidcModelCrudFunctionsConfig, oidcModelFunctionMap, onCallCreateModelParams, onCallCreateModelResult, onCallCreateModelResultWithDocs, onCallDeleteModelParams, onCallDevelopmentParams, onCallReadModelParams, onCallTypedModelParams, onCallTypedModelParamsFunction, onCallUpdateModelParams, optionalFirestoreArray, optionalFirestoreBoolean, optionalFirestoreDate, optionalFirestoreDateNumber, optionalFirestoreEnum, optionalFirestoreField, optionalFirestoreNumber, optionalFirestoreString, optionalFirestoreUID, optionalFirestoreUnitedStatesAddress, optionalFirestoreUnixDateTimeSecondsNumber, orderBy, orderByDocumentId, processAllQueuedStorageFilesParamsType, processStorageFileParamsType, readFirestoreModelKey, readFirestoreModelKeyFromDocumentSnapshot, regenerateAllFlaggedStorageFileGroupsContentParamsType, regenerateStorageFileGroupContentParamsType, replaceConstraints, resyncAllNotificationUserParamsType, resyncNotificationUserParamsType, rotateOidcClientSecretParamsType, scheduledFunctionDevelopmentFirebaseFunctionParamsType, selectFromFirebaseModelsService, sendNotificationParamsType, sendQueuedNotificationsParamsType, separateConstraints, setIdAndKeyFromKeyIdRefOnDocumentData, setIdAndKeyFromSnapshotOnDocumentData, shouldSaveNotificationToNotificationWeek, shouldSendCreatedNotificationInput, snapshotConverterFunctions, snapshotStreamDataForAccessor, snapshotStreamForAccessor, sortNotificationItemsFunction, startAfter, startAt, startAtValue, storageFileCollectionReference, storageFileConverter, storageFileFirestoreCollection, storageFileFlaggedForSyncWithGroupsQuery, storageFileFunctionMap, storageFileFunctionTypeConfigMap, storageFileGroupCollectionReference, storageFileGroupConverter, storageFileGroupCreateStorageFileKeyFactory, storageFileGroupCreatedStorageFileKey, storageFileGroupEmbeddedFile, storageFileGroupFirestoreCollection, storageFileGroupFolderPath, storageFileGroupIdForModel, storageFileGroupIdentity, storageFileGroupZipFileStoragePath, storageFileGroupZipStorageFileKey, storageFileGroupsFlaggedForContentRegenerationQuery, storageFileGroupsFlaggedForNeedsInitializationQuery, storageFileGroupsFlaggedInvalidQuery, storageFileIdentity, storageFileModelCrudFunctionsConfig, storageFileProcessingNotificationTaskTemplate, storageFilePurposeAndUserQuery, storageFileUploadUserSimpleClaimsConfiguration, storageFilesQueuedForDeleteQuery, storageFilesQueuedForProcessingQuery, storageListFilesResultFactory, storageListFilesResultHasNoNextError, storagePathFactory, storedFileReaderFactory, streamDocumentSnapshotDataPairs, streamDocumentSnapshotDataPairsWithData, streamDocumentSnapshotsData, streamFromOnSnapshot, syncAllFlaggedStorageFilesWithGroupsParamsType, syncStorageFileWithGroupsParamsType, systemStateCollectionReference, systemStateConverter, systemStateFirestoreCollection, systemStateIdentity, targetModelIdParamsType, targetModelParamsType, twoWayFlatFirestoreModelKey, unreadNotificationItems, unsupportedFirestoreDriverFunctionError, updateNotificationBoxParamsType, updateNotificationBoxRecipientLikeParamsType, updateNotificationBoxRecipientParamsType, updateNotificationBoxRecipientTemplateConfigRecord, updateNotificationRecipient, updateNotificationSummaryParamsType, updateNotificationUserDefaultNotificationBoxRecipientConfig, updateNotificationUserDefaultNotificationBoxRecipientConfigParamsType, updateNotificationUserNotificationBoxRecipientConfigIfChanged, updateNotificationUserNotificationBoxRecipientConfigs, updateNotificationUserNotificationBoxRecipientParamsType, updateNotificationUserNotificationSendExclusions, updateNotificationUserParamsType, updateOidcClientFieldParamsType, updateOidcClientParamsType, updateStorageFileGroupEntryParamsType, updateStorageFileGroupParamsType, updateStorageFileParamsType, updateWithAccessorUpdateAndConverterFunction, uploadFileWithStream, useContextAuth, useContextAuthUid, useDocumentSnapshot, useDocumentSnapshotData, useFirebaseModelsService, userUploadsFolderSlashPathFactory, userUploadsFolderStoragePathFactory, where, whereDateIsAfter, whereDateIsAfterWithSort, whereDateIsBefore, whereDateIsBeforeWithSort, whereDateIsBetween, whereDateIsInRange, whereDateIsOnOrAfter, whereDateIsOnOrAfterWithSort, whereDateIsOnOrBefore, whereDateIsOnOrBeforeWithSort, whereDocumentId, whereStringHasRootIdentityModelKey, whereStringValueHasPrefix };