@dereekb/firebase 13.4.1 → 13.5.0

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 (73) hide show
  1. package/index.cjs.js +922 -385
  2. package/index.esm.js +920 -386
  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 +34 -7
  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.api.d.ts +5 -1
  60. package/src/lib/model/oidcmodel/oidcmodel.d.ts +6 -0
  61. package/src/lib/model/oidcmodel/oidcmodel.query.d.ts +18 -0
  62. package/src/lib/model/storagefile/storagefile.create.d.ts +4 -0
  63. package/src/lib/model/storagefile/storagefile.d.ts +16 -0
  64. package/src/lib/model/storagefile/storagefile.file.d.ts +2 -0
  65. package/src/lib/model/storagefile/storagefile.group.d.ts +4 -0
  66. package/src/lib/model/storagefile/storagefile.permission.d.ts +1 -0
  67. package/src/lib/model/storagefile/storagefile.query.d.ts +19 -0
  68. package/src/lib/model/storagefile/storagefile.task.d.ts +1 -0
  69. package/src/lib/model/storagefile/storagefile.upload.d.ts +6 -0
  70. package/src/lib/model/storagefile/storagefile.upload.determiner.d.ts +9 -0
  71. package/src/lib/model/storagefile/storagefile.util.d.ts +4 -0
  72. package/src/lib/model/system/system.d.ts +4 -0
  73. 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,13 +9734,36 @@ 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';
9611
- /** Error code when a phone number is already associated with another account. */ var FIREBASE_AUTH_PHONE_NUMBER_ALREADY_EXISTS_ERROR = 'auth/phone-number-already-exists';
9612
- /** Error code when an email is already associated with another account. */ var FIREBASE_AUTH_EMAIL_ALREADY_EXISTS_ERROR = 'auth/email-already-exists';
9613
- /** Error code when the provided phone number is not a valid E.164 string. */ var FIREBASE_AUTH_INVALID_PHONE_NUMBER_ERROR = 'auth/invalid-phone-number';
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';
9758
+ /**
9759
+ * Error code when a provider is already linked to the current user account.
9760
+ */ var FIREBASE_AUTH_PROVIDER_ALREADY_LINKED_ERROR = 'auth/provider-already-linked';
9761
+ /**
9762
+ * Error code when the credential is already associated with a different user account.
9763
+ */ var FIREBASE_AUTH_CREDENTIAL_ALREADY_IN_USE_ERROR = 'auth/credential-already-in-use';
9764
+ /**
9765
+ * Error code when an email address is already in use by another account during linking.
9766
+ */ var FIREBASE_AUTH_EMAIL_ALREADY_IN_USE_ERROR = 'auth/email-already-in-use';
9614
9767
  /**
9615
9768
  * Converts a {@link FirebaseAuthError} into a user-friendly {@link ReadableError} with a human-readable message.
9616
9769
  *
@@ -9618,6 +9771,7 @@ var FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY = 'resetCommunicationAt'
9618
9771
  * suitable for display in the UI.
9619
9772
  *
9620
9773
  * @param inputError - the Firebase Auth error to convert
9774
+ * @returns a {@link ReadableError} with a human-readable message suitable for display
9621
9775
  *
9622
9776
  * @example
9623
9777
  * ```ts
@@ -9651,6 +9805,24 @@ var FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY = 'resetCommunicationAt'
9651
9805
  message: 'Could not reach the server. Are you connected to the internet?'
9652
9806
  };
9653
9807
  break;
9808
+ case FIREBASE_AUTH_PROVIDER_ALREADY_LINKED_ERROR:
9809
+ error = {
9810
+ code: code,
9811
+ message: 'This provider is already linked to your account.'
9812
+ };
9813
+ break;
9814
+ case FIREBASE_AUTH_CREDENTIAL_ALREADY_IN_USE_ERROR:
9815
+ error = {
9816
+ code: code,
9817
+ message: 'These credentials are already associated with a different account.'
9818
+ };
9819
+ break;
9820
+ case FIREBASE_AUTH_EMAIL_ALREADY_IN_USE_ERROR:
9821
+ error = {
9822
+ code: code,
9823
+ message: 'This email address is already in use by another account.'
9824
+ };
9825
+ break;
9654
9826
  default:
9655
9827
  error = {
9656
9828
  code: code,
@@ -9721,6 +9893,7 @@ function _define_property$f(obj, key, value) {
9721
9893
  * Automatically uses a transaction accessor when the context has an active transaction.
9722
9894
  *
9723
9895
  * @param getFirestoreCollection - function to retrieve the Firestore collection from context
9896
+ * @returns a {@link FirebaseModelLoader} that loads document wrappers for given keys
9724
9897
  *
9725
9898
  * @example
9726
9899
  * ```ts
@@ -9737,8 +9910,7 @@ function _define_property$f(obj, key, value) {
9737
9910
  } else {
9738
9911
  documentAccessor = firestoreCollection.documentAccessor();
9739
9912
  }
9740
- var document = documentAccessor.loadDocumentForKey(key);
9741
- return document;
9913
+ return documentAccessor.loadDocumentForKey(key);
9742
9914
  }
9743
9915
  };
9744
9916
  }
@@ -9746,17 +9918,17 @@ function _define_property$f(obj, key, value) {
9746
9918
  /**
9747
9919
  * ArkType schema for a FirestoreModelKey (full path like "collection/12345").
9748
9920
  */ var firestoreModelKeyType = type('string > 0').narrow(function(val, ctx) {
9749
- return val != null && isFirestoreModelKey(val) || ctx.mustBe('a valid FirestoreModelKey');
9921
+ return isFirestoreModelKey(val) || ctx.mustBe('a valid FirestoreModelKey');
9750
9922
  });
9751
9923
  /**
9752
9924
  * ArkType schema for a FirestoreModelId (document ID like "12345").
9753
9925
  */ var firestoreModelIdType = type('string > 0').narrow(function(val, ctx) {
9754
- return val != null && isFirestoreModelId(val) || ctx.mustBe('a valid FirestoreModelId');
9926
+ return isFirestoreModelId(val) || ctx.mustBe('a valid FirestoreModelId');
9755
9927
  });
9756
9928
  /**
9757
9929
  * ArkType schema for a FirestoreModelId or FirestoreModelKey.
9758
9930
  */ var firestoreModelIdOrKeyType = type('string > 0').narrow(function(val, ctx) {
9759
- return val != null && isFirestoreModelIdOrKey(val) || ctx.mustBe('a valid FirestoreModelId or FirestoreModelKey');
9931
+ return isFirestoreModelIdOrKey(val) || ctx.mustBe('a valid FirestoreModelId or FirestoreModelKey');
9760
9932
  });
9761
9933
 
9762
9934
  /**
@@ -10065,6 +10237,7 @@ function _ts_generator$9(thisArg, body) {
10065
10237
  * Creates a {@link FirebaseModelPermissionServiceInstance} from a delegate.
10066
10238
  *
10067
10239
  * @param delegate - provides model loading and role computation
10240
+ * @returns a {@link FirebaseModelPermissionServiceInstance} configured with the given delegate
10068
10241
  */ function firebaseModelPermissionService(delegate) {
10069
10242
  return new FirebaseModelPermissionServiceInstance(delegate);
10070
10243
  }
@@ -10227,8 +10400,7 @@ function _define_property$d(obj, key, value) {
10227
10400
  value: function throwDoesNotExistError() {
10228
10401
  var _ref;
10229
10402
  var _this_contextGrantedModelRoles_context_makeDoesNotExistError, _this_contextGrantedModelRoles_context;
10230
- 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));
10231
- throw error;
10403
+ 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));
10232
10404
  }
10233
10405
  },
10234
10406
  {
@@ -10236,8 +10408,7 @@ function _define_property$d(obj, key, value) {
10236
10408
  value: function throwPermissionError(role) {
10237
10409
  var _ref;
10238
10410
  var _this_contextGrantedModelRoles_context_makePermissionError, _this_contextGrantedModelRoles_context;
10239
- 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));
10240
- throw error;
10411
+ 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));
10241
10412
  }
10242
10413
  }
10243
10414
  ]);
@@ -10245,6 +10416,9 @@ function _define_property$d(obj, key, value) {
10245
10416
  }();
10246
10417
  /**
10247
10418
  * Creates a new ContextGrantedModelRolesReader for the input model.
10419
+ *
10420
+ * @param service - the in-model-context permission service to read roles from
10421
+ * @returns a promise resolving to a {@link ContextGrantedModelRolesReader} for the model
10248
10422
  */ function contextGrantedModelRolesReader(service) {
10249
10423
  return service.roleMap().then(function(x) {
10250
10424
  return new ContextGrantedModelRolesReaderInstance(x);
@@ -10253,13 +10427,13 @@ function _define_property$d(obj, key, value) {
10253
10427
  /**
10254
10428
  * Creates the default permission error message.
10255
10429
  *
10256
- * @param contextGrantedModelRoles
10257
- * @param role
10258
- * @returns
10430
+ * @param contextGrantedModelRoles - the granted model roles context to generate the message from
10431
+ * @param roles - the required role(s) that were not satisfied
10432
+ * @returns a human-readable permission error message string
10259
10433
  */ function contextGrantedModelRolesReaderPermissionErrorMessage(contextGrantedModelRoles, roles) {
10260
10434
  var _contextGrantedModelRoles_data, _contextGrantedModelRoles_data1;
10261
10435
  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, '")');
10262
- if (roles && (roles === null || roles === void 0 ? void 0 : roles.length)) {
10436
+ if (roles === null || roles === void 0 ? void 0 : roles.length) {
10263
10437
  message = "".concat(message, ': required role(s) "').concat(roles, '"');
10264
10438
  }
10265
10439
  return message;
@@ -10267,13 +10441,11 @@ function _define_property$d(obj, key, value) {
10267
10441
  /**
10268
10442
  * Creates the default does not exist error message.
10269
10443
  *
10270
- * @param contextGrantedModelRoles
10271
- * @param role
10272
- * @returns
10444
+ * @param contextGrantedModelRoles - the granted model roles context to generate the message from
10445
+ * @returns a human-readable does-not-exist error message string
10273
10446
  */ function contextGrantedModelRolesReaderDoesNotExistErrorMessage(contextGrantedModelRoles) {
10274
10447
  var _contextGrantedModelRoles_data, _contextGrantedModelRoles_data1;
10275
- 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, '")');
10276
- return message;
10448
+ 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, '")');
10277
10449
  }
10278
10450
 
10279
10451
  function asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, key, arg) {
@@ -10409,6 +10581,9 @@ function _ts_generator$8(thisArg, body) {
10409
10581
  * Decision function that checks if the current user is an admin in the given context.
10410
10582
  *
10411
10583
  * Returns `false` if no auth is present.
10584
+ *
10585
+ * @param context - the Firebase model context to evaluate
10586
+ * @returns a promise resolving to `true` if the user is an admin, `false` otherwise
10412
10587
  */ var isAdminInFirebaseModelContext = function isAdminInFirebaseModelContext(context) {
10413
10588
  var _ref;
10414
10589
  var _context_auth;
@@ -10418,6 +10593,7 @@ function _ts_generator$8(thisArg, body) {
10418
10593
  * Creates a {@link GrantRolesIfFunction} that grants the specified roles when the user is an admin.
10419
10594
  *
10420
10595
  * @param rolesToGrantToAdmin - roles to grant if the user is an admin
10596
+ * @returns a {@link GrantRolesIfFunction} that grants the given roles when the user is an admin
10421
10597
  *
10422
10598
  * @example
10423
10599
  * ```ts
@@ -10436,6 +10612,7 @@ function _ts_generator$8(thisArg, body) {
10436
10612
  * @param context - the model context to check
10437
10613
  * @param rolesToGrantToAdmin - roles to grant if admin
10438
10614
  * @param otherwise - fallback role computation when not admin
10615
+ * @returns a promise or value resolving to the granted role map
10439
10616
  */ function grantModelRolesIfAdmin(context, rolesToGrantToAdmin, otherwise) {
10440
10617
  return grantModelRolesIfAdminFunction(rolesToGrantToAdmin)(context, otherwise);
10441
10618
  }
@@ -10445,6 +10622,7 @@ function _ts_generator$8(thisArg, body) {
10445
10622
  *
10446
10623
  * @param authRoles - the auth roles the user must have
10447
10624
  * @param rolesToGrantToAdmin - the model roles to grant if the auth roles are present
10625
+ * @returns a {@link GrantRolesIfFunction} that grants the given roles when the user has the required auth roles
10448
10626
  */ function grantModelRolesIfHasAuthRolesFunction(authRoles, rolesToGrantToAdmin) {
10449
10627
  return grantModelRolesIfFunction(function(context) {
10450
10628
  var _context_auth;
@@ -10460,6 +10638,7 @@ function _ts_generator$8(thisArg, body) {
10460
10638
  * Creates a reusable factory pre-configured with specific auth roles to check for.
10461
10639
  *
10462
10640
  * @param authRoles - the auth roles the user must have
10641
+ * @returns a {@link GrantModelRolesIfHasAuthRolesFactory} pre-configured to check the given auth roles
10463
10642
  */ function grantModelRolesIfHasAuthRolesFactory(authRoles) {
10464
10643
  var authRolesToHave = iterableToArray(authRoles);
10465
10644
  return function(context, rolesToGrantToMatch, otherwise) {
@@ -10518,6 +10697,7 @@ function _ts_generator$8(thisArg, body) {
10518
10697
  * Creates a {@link GrantRolesIfFunction} that grants roles when the authenticated user's UID matches the model's `uid` field.
10519
10698
  *
10520
10699
  * @param rolesToGrant - the roles to grant if the user owns the model
10700
+ * @returns a {@link GrantRolesIfFunction} that grants roles when the authenticated user is the model owner
10521
10701
  *
10522
10702
  * @example
10523
10703
  * ```ts
@@ -10535,6 +10715,7 @@ function _ts_generator$8(thisArg, body) {
10535
10715
  *
10536
10716
  * @param grantIf - decision function to evaluate
10537
10717
  * @param grantedRoles - roles to grant if the decision is `true`
10718
+ * @returns a {@link GrantRolesOnlyIfFunction} that grants roles or returns no-access with no fallback
10538
10719
  */ function grantModelRolesOnlyIfFunction(grantIf, grantedRoles) {
10539
10720
  var fn = grantModelRolesIfFunction(grantIf, grantedRoles);
10540
10721
  return function(context) {
@@ -10549,6 +10730,7 @@ function _ts_generator$8(thisArg, body) {
10549
10730
  *
10550
10731
  * @param grantIf - async decision function to evaluate
10551
10732
  * @param grantedRoles - roles to grant if the decision is `true`
10733
+ * @returns a {@link GrantRolesIfFunction} that evaluates the condition and grants roles or falls back
10552
10734
  * @throws {Error} When `grantIf` is not provided.
10553
10735
  *
10554
10736
  * @example
@@ -10560,9 +10742,6 @@ function _ts_generator$8(thisArg, body) {
10560
10742
  * const roles = await grantIfOwner(context, () => noAccessRoleMap());
10561
10743
  * ```
10562
10744
  */ function grantModelRolesIfFunction(grantIf, grantedRoles) {
10563
- if (!grantIf) {
10564
- throw new Error('missing grant if');
10565
- }
10566
10745
  return function(context) {
10567
10746
  var otherwise = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : noAccessRoleMap;
10568
10747
  return _async_to_generator$8(function() {
@@ -10661,6 +10840,7 @@ function _object_spread_props$a(target, source) {
10661
10840
  * Creates a {@link FirebaseModelService} that wires together model loading and permission evaluation.
10662
10841
  *
10663
10842
  * @param config - collection loader and role mapping functions
10843
+ * @returns a {@link FirebaseModelService} combining model loading and permission evaluation
10664
10844
  *
10665
10845
  * @example
10666
10846
  * ```ts
@@ -10693,6 +10873,7 @@ function _object_spread_props$a(target, source) {
10693
10873
  * Creates a {@link FirebaseModelServiceFactory} that lazily instantiates and caches the service.
10694
10874
  *
10695
10875
  * @param config - the service configuration
10876
+ * @returns a {@link FirebaseModelServiceFactory} that lazily creates and caches the service
10696
10877
  */ function firebaseModelServiceFactory(config) {
10697
10878
  return cachedGetter(function() {
10698
10879
  return firebaseModelService(config);
@@ -10705,6 +10886,7 @@ function _object_spread_props$a(target, source) {
10705
10886
  * with a model or key to perform permission-checked operations.
10706
10887
  *
10707
10888
  * @param factory - lazy getter for the underlying model service
10889
+ * @returns an {@link InContextFirebaseModelServiceFactory} that binds contexts to the service
10708
10890
  */ function inContextFirebaseModelServiceFactory(factory) {
10709
10891
  return function(context) {
10710
10892
  var firebaseModelService = factory();
@@ -10774,8 +10956,8 @@ function _object_spread_props$a(target, source) {
10774
10956
  * export const demoFirebaseModelServices = firebaseModelsService<typeof DEMO_FIREBASE_MODEL_SERVICE_FACTORIES, DemoFirebaseBaseContext, DemoFirebaseModelTypes>(DEMO_FIREBASE_MODEL_SERVICE_FACTORIES);
10775
10957
  * export type DemoFirebaseContext = DemoFirebaseBaseContext & { service: typeof demoFirebaseModelServices };
10776
10958
  *
10777
- * @param services
10778
- * @returns
10959
+ * @param services - the map of model service getter factories
10960
+ * @returns a {@link FirebaseModelsService} that dispatches to the appropriate model service by type
10779
10961
  */ function firebaseModelsService(services) {
10780
10962
  var firebaseModelsServiceFunction = function firebaseModelsServiceFunction1(type, context) {
10781
10963
  var firebaseModelService = services[type];
@@ -10796,6 +10978,7 @@ function _object_spread_props$a(target, source) {
10796
10978
  * The returned factory binds a context, so callers can then select individual model services by type.
10797
10979
  *
10798
10980
  * @param service - the multi-model service to wrap
10981
+ * @returns an {@link InContextFirebaseModelsServiceFactory} that binds a context to the service
10799
10982
  */ function inContextFirebaseModelsServiceFactory(service) {
10800
10983
  var newInContextFirebaseModelsServiceFactory = function newInContextFirebaseModelsServiceFactory(context) {
10801
10984
  var result = function result(type) {
@@ -10813,6 +10996,7 @@ function _object_spread_props$a(target, source) {
10813
10996
  * @param service - the multi-model service
10814
10997
  * @param type - the model type to select
10815
10998
  * @param select - selection params including context and key
10999
+ * @returns the {@link FirebaseModelsServiceSelectionResult} bound to the specified model
10816
11000
  */ function selectFromFirebaseModelsService(service, type, select) {
10817
11001
  var key = readFirestoreModelKey(select.key, true);
10818
11002
  return service(type, select.context).forKey(key);
@@ -10825,10 +11009,12 @@ function _object_spread_props$a(target, source) {
10825
11009
  * @param service - the multi-model service
10826
11010
  * @param type - the model type to select
10827
11011
  * @param select - selection params including context, key, and optional role requirements
11012
+ * @returns a {@link UsePromiseFunction} for the resolved roles reader
10828
11013
  */ function useFirebaseModelsService(service, type, select) {
11014
+ var _select_roles;
10829
11015
  var inContextModelService = selectFromFirebaseModelsService(service, type, select);
10830
11016
  var result;
10831
- if (select.roles && select.roles.length) {
11017
+ if ((_select_roles = select.roles) === null || _select_roles === void 0 ? void 0 : _select_roles.length) {
10832
11018
  result = inContextModelService.requireUse(select.roles, select.rolesSetIncludes);
10833
11019
  } else {
10834
11020
  result = inContextModelService.use;
@@ -10842,6 +11028,7 @@ function _object_spread_props$a(target, source) {
10842
11028
  * Useful for routing incoming requests to the correct model service by collection path.
10843
11029
  *
10844
11030
  * @param inContextFirebaseModelsService - context-bound multi-model service
11031
+ * @returns a map of collection type strings to their {@link FirestoreModelIdentity} objects
10845
11032
  */ function buildFirebaseCollectionTypeModelTypeMap(inContextFirebaseModelsService) {
10846
11033
  var allTypes = inContextFirebaseModelsService.allTypes();
10847
11034
  var modelIdentities = allTypes.map(function(type) {
@@ -10868,6 +11055,7 @@ function _object_spread_props$a(target, source) {
10868
11055
  * The generated paths follow the convention `/model/[basePath/]<modelKey>/[path]`.
10869
11056
  *
10870
11057
  * @param config - optional base path to nest under
11058
+ * @returns a {@link ModelStorageSlashPathFactory} that maps Firestore model keys to storage paths
10871
11059
  *
10872
11060
  * @example
10873
11061
  * ```ts
@@ -11068,6 +11256,7 @@ function _ts_generator$7(thisArg, body) {
11068
11256
  * Wraps the folder's `list()` API with cursor-based pagination via {@link fetchPageFactory}.
11069
11257
  *
11070
11258
  * @param config - default listing options (e.g., maxResults)
11259
+ * @returns an {@link IterateStorageListFilesFactory} for paginated file listing
11071
11260
  *
11072
11261
  * @example
11073
11262
  * ```ts
@@ -11078,25 +11267,16 @@ function _ts_generator$7(thisArg, body) {
11078
11267
  return fetchPageFactory({
11079
11268
  fetch: function fetch(input) {
11080
11269
  return _async_to_generator$7(function() {
11081
- var _input_maxResults, _input_pageToken, list;
11270
+ var _input_maxResults, _input_pageToken;
11082
11271
  return _ts_generator$7(this, function(_state) {
11083
- switch(_state.label){
11084
- case 0:
11085
- return [
11086
- 4,
11087
- input.folder.list({
11088
- includeNestedResults: input.includeNestedResults,
11089
- maxResults: (_input_maxResults = input.maxResults) !== null && _input_maxResults !== void 0 ? _input_maxResults : factoryDefaultMaxResults,
11090
- pageToken: (_input_pageToken = input.pageToken) !== null && _input_pageToken !== void 0 ? _input_pageToken : undefined
11091
- })
11092
- ];
11093
- case 1:
11094
- list = _state.sent();
11095
- return [
11096
- 2,
11097
- list
11098
- ];
11099
- }
11272
+ return [
11273
+ 2,
11274
+ input.folder.list({
11275
+ includeNestedResults: input.includeNestedResults,
11276
+ maxResults: (_input_maxResults = input.maxResults) !== null && _input_maxResults !== void 0 ? _input_maxResults : factoryDefaultMaxResults,
11277
+ pageToken: (_input_pageToken = input.pageToken) !== null && _input_pageToken !== void 0 ? _input_pageToken : undefined
11278
+ })
11279
+ ];
11100
11280
  });
11101
11281
  })();
11102
11282
  },
@@ -11110,7 +11290,7 @@ function _ts_generator$7(thisArg, body) {
11110
11290
  };
11111
11291
  return info;
11112
11292
  },
11113
- buildInputForNextPage: function buildInputForNextPage(pageResult, input, options) {
11293
+ buildInputForNextPage: function buildInputForNextPage(pageResult, input, _options) {
11114
11294
  var _pageResult_nextPageCursor;
11115
11295
  return _object_spread_props$9(_object_spread$b({}, input), {
11116
11296
  pageToken: (_pageResult_nextPageCursor = pageResult.nextPageCursor) !== null && _pageResult_nextPageCursor !== void 0 ? _pageResult_nextPageCursor : undefined
@@ -11122,6 +11302,9 @@ function _ts_generator$7(thisArg, body) {
11122
11302
  * Iterates through every file in a storage folder, invoking a callback for each individual file result.
11123
11303
  *
11124
11304
  * Convenience wrapper around {@link iterateFetchPagesByEachItem} pre-configured for storage listing.
11305
+ *
11306
+ * @param input - iteration configuration including folder, listing options, and per-item callback
11307
+ * @returns the result of the paginated per-item iteration
11125
11308
  */ function iterateStorageListFilesByEachFile(input) {
11126
11309
  var folder = input.folder, includeNestedResults = input.includeNestedResults, pageToken = input.pageToken;
11127
11310
  return iterateFetchPagesByEachItem(_object_spread_props$9(_object_spread$b({}, input), {
@@ -11137,6 +11320,9 @@ function _ts_generator$7(thisArg, body) {
11137
11320
  * Iterates through pages of file results in a storage folder, invoking a callback for each page.
11138
11321
  *
11139
11322
  * Convenience wrapper around {@link iterateFetchPages} pre-configured for storage listing.
11323
+ *
11324
+ * @param input - iteration configuration including folder, listing options, and per-page callback
11325
+ * @returns the result of the paginated page-level iteration
11140
11326
  */ function iterateStorageListFiles(input) {
11141
11327
  var folder = input.folder, includeNestedResults = input.includeNestedResults, pageToken = input.pageToken;
11142
11328
  return iterateFetchPages(_object_spread_props$9(_object_spread$b({}, input), {
@@ -11215,6 +11401,7 @@ function _is_native_reflect_construct$4() {
11215
11401
  * Required when the upload input is a string, since the format (raw, base64, etc.) must be explicit.
11216
11402
  *
11217
11403
  * @param options - the upload options to extract from
11404
+ * @returns the {@link StorageDataStringType} extracted from the options
11218
11405
  * @throws {Error} When `stringFormat` is not set in the options.
11219
11406
  */ function assertStorageUploadOptionsStringFormat(options) {
11220
11407
  var stringFormat = options === null || options === void 0 ? void 0 : options.stringFormat;
@@ -11225,6 +11412,8 @@ function _is_native_reflect_construct$4() {
11225
11412
  }
11226
11413
  /**
11227
11414
  * Creates an error indicating that `stringFormat` was missing from upload options.
11415
+ *
11416
+ * @returns an {@link Error} describing the missing `stringFormat` in upload options
11228
11417
  */ function noStringFormatInStorageUploadOptionsError() {
11229
11418
  return new Error('stringFormat was missing a value in the StorageUploadOptions.');
11230
11419
  }
@@ -11381,6 +11570,7 @@ function _ts_generator$6(thisArg, body) {
11381
11570
  * @param file - the target file accessor to upload to
11382
11571
  * @param readableStream - the source stream to pipe
11383
11572
  * @param options - optional upload configuration (content type, metadata, etc.)
11573
+ * @returns a promise that resolves when the upload stream has finished
11384
11574
  * @throws {StorageFileUploadStreamUnsupportedError} When the file accessor does not support stream uploads.
11385
11575
  *
11386
11576
  * @example
@@ -11418,15 +11608,16 @@ function _ts_generator$6(thisArg, body) {
11418
11608
  * provides cursor-based pagination through the `next()` method.
11419
11609
  *
11420
11610
  * @param delegate - platform-specific implementation for extracting results
11611
+ * @returns a {@link StorageListFilesResultFactory} that normalizes raw SDK list results
11421
11612
  *
11422
11613
  * @example
11423
11614
  * ```ts
11424
11615
  * const factory = storageListFilesResultFactory(myDelegate);
11425
- * const result = factory(storage, folder, { maxResults: 50 }, rawSdkResult);
11616
+ * const result = factory({ storage, folder, options: { maxResults: 50 } }, rawSdkResult);
11426
11617
  * const files = result.files();
11427
11618
  * ```
11428
11619
  */ function storageListFilesResultFactory(delegate) {
11429
- return function(storage, folder, options, result) {
11620
+ return function(input, result) {
11430
11621
  var fileResult = function fileResult(item) {
11431
11622
  item.file = function() {
11432
11623
  return delegate.file(storage, item);
@@ -11439,12 +11630,13 @@ function _ts_generator$6(thisArg, body) {
11439
11630
  };
11440
11631
  return item;
11441
11632
  };
11633
+ var storage = input.storage, folder = input.folder, options = input.options;
11442
11634
  var hasNext = delegate.hasNext(result);
11443
11635
  var next = cachedGetter(function() {
11444
11636
  if (!hasNext) {
11445
11637
  throw storageListFilesResultHasNoNextError();
11446
11638
  }
11447
- return delegate.next(storage, options, folder, result);
11639
+ return delegate.next(input, result);
11448
11640
  });
11449
11641
  var files = cachedGetter(function() {
11450
11642
  return delegate.filesFromResult(result, folder).map(fileResult);
@@ -11472,6 +11664,8 @@ function _ts_generator$6(thisArg, body) {
11472
11664
  }
11473
11665
  /**
11474
11666
  * Creates an error thrown when `next()` is called on a list result that has no more pages.
11667
+ *
11668
+ * @returns an {@link Error} indicating there are no more pages to fetch
11475
11669
  */ function storageListFilesResultHasNoNextError() {
11476
11670
  return new Error('hasNext is false, there are no more results available.');
11477
11671
  }
@@ -11483,6 +11677,7 @@ function _ts_generator$6(thisArg, body) {
11483
11677
  * a {@link StoragePathFactory} to normalize all path inputs.
11484
11678
  *
11485
11679
  * @param drivers - the storage driver implementations to use
11680
+ * @returns a {@link FirebaseStorageContextFactory} that creates storage contexts for a given storage instance
11486
11681
  * @throws {Error} When a default bucket ID cannot be resolved from the driver or config.
11487
11682
  *
11488
11683
  * @example
@@ -11493,9 +11688,10 @@ function _ts_generator$6(thisArg, body) {
11493
11688
  * ```
11494
11689
  */ function firebaseStorageContextFactory(drivers) {
11495
11690
  return function(firebaseStorage, config) {
11691
+ var _ref;
11496
11692
  var _drivers_storageAccessorDriver_getDefaultBucket, _drivers_storageAccessorDriver;
11497
- var _ref = config !== null && config !== void 0 ? config : {}, inputDefaultBucketId = _ref.defaultBucketId, _ref_forceBucket = _ref.forceBucket, forceBucket = _ref_forceBucket === void 0 ? false : _ref_forceBucket;
11498
- 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)) || '';
11693
+ var _ref1 = config !== null && config !== void 0 ? config : {}, inputDefaultBucketId = _ref1.defaultBucketId, _ref_forceBucket = _ref1.forceBucket, forceBucket = _ref_forceBucket === void 0 ? false : _ref_forceBucket;
11694
+ 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 : '';
11499
11695
  if (!defaultBucketId) {
11500
11696
  throw new Error('Could not resolve a default bucket id for the firebaseStorageContextFactory(). Supply a defaultBucketId.');
11501
11697
  }
@@ -11520,13 +11716,13 @@ function _ts_generator$6(thisArg, body) {
11520
11716
  };
11521
11717
  }
11522
11718
 
11523
- function _array_like_to_array$5(arr, len) {
11719
+ function _array_like_to_array$6(arr, len) {
11524
11720
  if (len == null || len > arr.length) len = arr.length;
11525
11721
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
11526
11722
  return arr2;
11527
11723
  }
11528
- function _array_without_holes$3(arr) {
11529
- if (Array.isArray(arr)) return _array_like_to_array$5(arr);
11724
+ function _array_without_holes$5(arr) {
11725
+ if (Array.isArray(arr)) return _array_like_to_array$6(arr);
11530
11726
  }
11531
11727
  function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
11532
11728
  try {
@@ -11570,10 +11766,10 @@ function _define_property$a(obj, key, value) {
11570
11766
  }
11571
11767
  return obj;
11572
11768
  }
11573
- function _iterable_to_array$3(iter) {
11769
+ function _iterable_to_array$5(iter) {
11574
11770
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
11575
11771
  }
11576
- function _non_iterable_spread$3() {
11772
+ function _non_iterable_spread$5() {
11577
11773
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11578
11774
  }
11579
11775
  function _object_spread$a(target) {
@@ -11610,16 +11806,16 @@ function _object_spread_props$8(target, source) {
11610
11806
  }
11611
11807
  return target;
11612
11808
  }
11613
- function _to_consumable_array$3(arr) {
11614
- return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$3();
11809
+ function _to_consumable_array$5(arr) {
11810
+ return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$5();
11615
11811
  }
11616
- function _unsupported_iterable_to_array$5(o, minLen) {
11812
+ function _unsupported_iterable_to_array$6(o, minLen) {
11617
11813
  if (!o) return;
11618
- if (typeof o === "string") return _array_like_to_array$5(o, minLen);
11814
+ if (typeof o === "string") return _array_like_to_array$6(o, minLen);
11619
11815
  var n = Object.prototype.toString.call(o).slice(8, -1);
11620
11816
  if (n === "Object" && o.constructor) n = o.constructor.name;
11621
11817
  if (n === "Map" || n === "Set") return Array.from(n);
11622
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
11818
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
11623
11819
  }
11624
11820
  function _ts_generator$5(thisArg, body) {
11625
11821
  var f, y, t, _ = {
@@ -11727,6 +11923,7 @@ function _ts_generator$5(thisArg, body) {
11727
11923
  * e.g., to silently handle deletion of already-deleted files.
11728
11924
  *
11729
11925
  * @param input - the error or error message to check
11926
+ * @returns `true` if the error message contains `'storage/object-not-found'`, `false` otherwise
11730
11927
  *
11731
11928
  * @example
11732
11929
  * ```ts
@@ -11746,6 +11943,7 @@ function _ts_generator$5(thisArg, body) {
11746
11943
  *
11747
11944
  * @param storage - the client Firebase Storage instance
11748
11945
  * @param path - abstract storage path to resolve
11946
+ * @returns a `StorageReference` pointing to the resolved storage path
11749
11947
  */ function firebaseStorageRefForStorageFilePath(storage, path) {
11750
11948
  return ref(storage, firebaseStorageFilePathFromStorageFilePath(path));
11751
11949
  }
@@ -11755,6 +11953,7 @@ function _ts_generator$5(thisArg, body) {
11755
11953
  * Returns `true` if metadata is successfully retrieved, `false` for any error (including permission errors).
11756
11954
  *
11757
11955
  * @param ref - the storage reference to check
11956
+ * @returns a promise that resolves to `true` if the file exists, `false` otherwise
11758
11957
  */ function firebaseStorageFileExists(ref) {
11759
11958
  return getMetadata(ref).then(function(_) {
11760
11959
  return true;
@@ -11770,6 +11969,7 @@ function _ts_generator$5(thisArg, body) {
11770
11969
  *
11771
11970
  * @param storage - the client Firebase Storage instance
11772
11971
  * @param storagePath - the abstract storage path for the file
11972
+ * @returns a {@link FirebaseStorageClientAccessorFile} providing CRUD and upload operations for the given path
11773
11973
  *
11774
11974
  * @example
11775
11975
  * ```ts
@@ -11786,7 +11986,7 @@ function _ts_generator$5(thisArg, body) {
11786
11986
  contentEncoding: (_options_metadata2 = options.metadata) === null || _options_metadata2 === void 0 ? void 0 : _options_metadata2.contentEncoding,
11787
11987
  contentLanguage: (_options_metadata3 = options.metadata) === null || _options_metadata3 === void 0 ? void 0 : _options_metadata3.contentLanguage,
11788
11988
  contentType: (_options_metadata4 = options.metadata) === null || _options_metadata4 === void 0 ? void 0 : _options_metadata4.contentType,
11789
- 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))
11989
+ customMetadata: filterUndefinedValues(_object_spread$a({}, (_options_metadata5 = options.metadata) === null || _options_metadata5 === void 0 ? void 0 : _options_metadata5.customMetadata, options.customMetadata))
11790
11990
  });
11791
11991
  }
11792
11992
  function uploadMetadataFromStorageUploadOptions(options) {
@@ -11915,7 +12115,8 @@ function _ts_generator$5(thisArg, body) {
11915
12115
  nextPageTokenFromResult: function nextPageTokenFromResult(result) {
11916
12116
  return result.listResult.nextPageToken;
11917
12117
  },
11918
- next: function next(storage, options, folder, result) {
12118
+ next: function next(param, result) {
12119
+ var options = param.options, folder = param.folder;
11919
12120
  return folder.list(_object_spread_props$8(_object_spread$a({}, options, result.options), {
11920
12121
  pageToken: result.listResult.nextPageToken
11921
12122
  }));
@@ -11957,6 +12158,7 @@ function _ts_generator$5(thisArg, body) {
11957
12158
  *
11958
12159
  * @param storage - the client Firebase Storage instance
11959
12160
  * @param storagePath - the abstract storage path for the folder
12161
+ * @returns a {@link FirebaseStorageClientAccessorFolder} providing listing and existence operations for the given path
11960
12162
  *
11961
12163
  * @example
11962
12164
  * ```ts
@@ -11985,7 +12187,11 @@ function _ts_generator$5(thisArg, body) {
11985
12187
  return [
11986
12188
  4,
11987
12189
  list(ref, options).then(function(listResult) {
11988
- return firebaseStorageClientListFilesResultFactory(storage, folder, options, {
12190
+ return firebaseStorageClientListFilesResultFactory({
12191
+ storage: storage,
12192
+ folder: folder,
12193
+ options: options
12194
+ }, {
11989
12195
  options: options,
11990
12196
  listResult: listResult
11991
12197
  });
@@ -12012,7 +12218,7 @@ function _ts_generator$5(thisArg, body) {
12012
12218
  case 2:
12013
12219
  allNestedFolderFileResults = _state.sent();
12014
12220
  allNestedFiles = allNestedFolderFileResults.flat();
12015
- allFiles = _to_consumable_array$3(allImmediateFiles).concat(_to_consumable_array$3(allNestedFiles));
12221
+ allFiles = _to_consumable_array$5(allImmediateFiles).concat(_to_consumable_array$5(allNestedFiles));
12016
12222
  result = _object_spread_props$8(_object_spread$a({}, rootResults), {
12017
12223
  files: function files() {
12018
12224
  return allFiles;
@@ -12048,6 +12254,8 @@ function _ts_generator$5(thisArg, body) {
12048
12254
  * Provides file and folder accessor factories and default bucket resolution.
12049
12255
  * Used internally by {@link firebaseStorageClientDrivers}.
12050
12256
  *
12257
+ * @returns a {@link FirebaseStorageAccessorDriver} backed by the `firebase/storage` client SDK
12258
+ *
12051
12259
  * @example
12052
12260
  * ```ts
12053
12261
  * const driver = firebaseStorageClientAccessorDriver();
@@ -12075,6 +12283,8 @@ function _ts_generator$5(thisArg, body) {
12075
12283
  *
12076
12284
  * Provides file and folder accessor operations for use with {@link clientFirebaseStorageContextFactory}.
12077
12285
  *
12286
+ * @returns the client-side {@link FirebaseStorageClientDrivers} for the `firebase/storage` SDK
12287
+ *
12078
12288
  * @example
12079
12289
  * ```ts
12080
12290
  * const drivers = firebaseStorageClientDrivers();
@@ -12133,6 +12343,7 @@ function _ts_generator$5(thisArg, body) {
12133
12343
  * by combining the given user model identity with the provided UID.
12134
12344
  *
12135
12345
  * @param userModelIdentity - the root identity for user models (e.g., `profileIdentity`)
12346
+ * @returns a function that generates a {@link NotificationSummaryId} for a given user UID
12136
12347
  *
12137
12348
  * @example
12138
12349
  * ```ts
@@ -12156,9 +12367,9 @@ function _ts_generator$5(thisArg, body) {
12156
12367
  /**
12157
12368
  * Creates a NotificationTaskUniqueId from the input model id and task type.
12158
12369
  *
12159
- * @param input model id input
12160
- * @param taskType task type
12161
- * @returns NotificationTaskUniqueId
12370
+ * @param input - model id input
12371
+ * @param taskType - task type
12372
+ * @returns the unique notification task id combining the model id and task type
12162
12373
  */ function notificationTaskUniqueId(input, taskType) {
12163
12374
  return "".concat(firestoreModelId(input), "_").concat(taskType); // combineation of model id and template type
12164
12375
  }
@@ -12213,6 +12424,10 @@ function _object_spread_props$7(target, source) {
12213
12424
  /**
12214
12425
  * Merges two {@link NotificationBoxRecipientTemplateConfig} objects, preferring values from `a` over `b`.
12215
12426
  *
12427
+ * @param a - primary config whose defined values take precedence
12428
+ * @param b - fallback config supplying values when `a` fields are undefined
12429
+ * @returns the merged template config with values from `a` preferred over `b`
12430
+ *
12216
12431
  * @example
12217
12432
  * ```ts
12218
12433
  * const merged = mergeNotificationBoxRecipientTemplateConfigs(
@@ -12237,6 +12452,9 @@ function _object_spread_props$7(target, source) {
12237
12452
  *
12238
12453
  * This produces the "effective" configuration used at send time, where each channel has a definite boolean.
12239
12454
  *
12455
+ * @param a - the template config to resolve
12456
+ * @returns the effective config with each channel flag filled in using the send-default fallback
12457
+ *
12240
12458
  * @example
12241
12459
  * ```ts
12242
12460
  * const effective = effectiveNotificationBoxRecipientTemplateConfig({ sd: true, se: false });
@@ -12256,6 +12474,10 @@ function _object_spread_props$7(target, source) {
12256
12474
  * Updates a {@link NotificationRecipient} with partial values, preserving existing fields where the update is undefined.
12257
12475
  *
12258
12476
  * Automatically clears the summary ID (`s`) when a `uid` is present.
12477
+ *
12478
+ * @param a - existing recipient to update
12479
+ * @param b - partial values to apply on top of the existing recipient
12480
+ * @returns the updated recipient with merged values
12259
12481
  */ function updateNotificationRecipient(a, b) {
12260
12482
  var inputUid = b.uid, inputN = b.n, inputE = b.e, inputT = b.t, inputS = b.s;
12261
12483
  var uid = updateMaybeValue(a.uid, inputUid);
@@ -12307,6 +12529,7 @@ function _object_spread_props$7(target, source) {
12307
12529
  *
12308
12530
  * @param uid - the user's Firebase auth UID
12309
12531
  * @param i - the recipient's index position in the box's recipient array
12532
+ * @returns a new recipient entry with the given uid and index and an empty template config record
12310
12533
  */ function newNotificationBoxRecipientForUid(uid, i) {
12311
12534
  return {
12312
12535
  c: {},
@@ -12316,6 +12539,10 @@ function _object_spread_props$7(target, source) {
12316
12539
  }
12317
12540
  /**
12318
12541
  * Merges two {@link NotificationUserDefaultNotificationBoxRecipientConfig} objects, preferring defined values from `a` over `b`.
12542
+ *
12543
+ * @param a - primary config whose defined values take precedence
12544
+ * @param b - fallback config supplying values when `a` fields are undefined
12545
+ * @returns the merged config
12319
12546
  */ function mergeNotificationUserDefaultNotificationBoxRecipientConfig(a, b) {
12320
12547
  var c = mergeNotificationBoxRecipientTemplateConfigRecords(a.c, b.c);
12321
12548
  var result = _object_spread_props$7(_object_spread$9({}, mergeObjects([
@@ -12346,6 +12573,10 @@ function _object_spread_props$7(target, source) {
12346
12573
  })(NotificationBoxRecipientTemplateConfigBoolean || (NotificationBoxRecipientTemplateConfigBoolean = {}));
12347
12574
  /**
12348
12575
  * Merges two {@link NotificationBoxRecipientTemplateConfigRecord} objects, preferring defined values from `a`.
12576
+ *
12577
+ * @param a - primary record whose defined values take precedence
12578
+ * @param b - fallback record supplying values when `a` entries are undefined
12579
+ * @returns the merged template config record
12349
12580
  */ function mergeNotificationBoxRecipientTemplateConfigRecords(a, b) {
12350
12581
  var mergeConfigs = mergeObjectsFunction(KeyValueTypleValueFilter.UNDEFINED);
12351
12582
  return mergeConfigs([
@@ -12407,6 +12638,8 @@ var notificationBoxRecipientTemplateConfigDencoder = bitwiseObjectDencoder({
12407
12638
  /**
12408
12639
  * Creates a Firestore field converter for {@link NotificationBoxRecipientTemplateConfigRecord},
12409
12640
  * using bitwise encoding for compact storage.
12641
+ *
12642
+ * @returns a Firestore field converter that encodes and decodes template config records using bitwise encoding
12410
12643
  */ function firestoreNotificationBoxRecipientTemplateConfigRecord() {
12411
12644
  return firestoreBitwiseObjectMap({
12412
12645
  dencoder: notificationBoxRecipientTemplateConfigDencoder
@@ -12496,6 +12729,9 @@ var notificationBoxRecipientTemplateConfigDencoder = bitwiseObjectDencoder({
12496
12729
  /**
12497
12730
  * Converts a {@link NotificationBoxRecipientTemplateConfigRecord} to an array of entries with their type keys.
12498
12731
  *
12732
+ * @param input - the template config record to convert
12733
+ * @returns an array of entries each containing a type key and the corresponding channel config
12734
+ *
12499
12735
  * @example
12500
12736
  * ```ts
12501
12737
  * const array = notificationBoxRecipientTemplateConfigRecordToArray({ 'comment': { se: true } });
@@ -12514,6 +12750,9 @@ var notificationBoxRecipientTemplateConfigDencoder = bitwiseObjectDencoder({
12514
12750
  }
12515
12751
  /**
12516
12752
  * Converts a {@link NotificationBoxRecipientTemplateConfigArray} back to a {@link NotificationBoxRecipientTemplateConfigRecord}.
12753
+ *
12754
+ * @param input - the array of typed config entries to convert
12755
+ * @returns a record keyed by template type
12517
12756
  */ function notificationBoxRecipientTemplateConfigArrayToRecord(input) {
12518
12757
  var map = {};
12519
12758
  input.forEach(function(x) {
@@ -12556,6 +12795,7 @@ var notificationBoxRecipientTemplateConfigDencoder = bitwiseObjectDencoder({
12556
12795
  *
12557
12796
  * @param items - notification items to classify
12558
12797
  * @param considerReadIfCreatedBefore - optional cutoff date; items created at or before this date are treated as read
12798
+ * @returns an object containing both the read and unread item arrays along with the input cutoff date
12559
12799
  *
12560
12800
  * @example
12561
12801
  * ```ts
@@ -12699,11 +12939,17 @@ var NotificationUserDocument = /*#__PURE__*/ function(AbstractFirestoreDocument)
12699
12939
  });
12700
12940
  /**
12701
12941
  * Creates a Firestore collection reference for {@link NotificationUser} documents.
12942
+ *
12943
+ * @param context - Firestore context to create the collection reference from
12944
+ * @returns a typed collection reference for NotificationUser documents
12702
12945
  */ function notificationUserCollectionReference(context) {
12703
12946
  return context.collection(notificationUserIdentity.collectionName);
12704
12947
  }
12705
12948
  /**
12706
12949
  * Creates a typed {@link NotificationUserFirestoreCollection} bound to the given Firestore context.
12950
+ *
12951
+ * @param firestoreContext - Firestore context to bind the collection to
12952
+ * @returns a typed Firestore collection for NotificationUser documents
12707
12953
  */ function notificationUserFirestoreCollection(firestoreContext) {
12708
12954
  return firestoreContext.firestoreCollection({
12709
12955
  modelIdentity: notificationUserIdentity,
@@ -12766,11 +13012,17 @@ var NotificationSummaryDocument = /*#__PURE__*/ function(AbstractFirestoreDocume
12766
13012
  });
12767
13013
  /**
12768
13014
  * Creates a Firestore collection reference for {@link NotificationSummary} documents.
13015
+ *
13016
+ * @param context - Firestore context to create the collection reference from
13017
+ * @returns a typed collection reference for NotificationSummary documents
12769
13018
  */ function notificationSummaryCollectionReference(context) {
12770
13019
  return context.collection(notificationSummaryIdentity.collectionName);
12771
13020
  }
12772
13021
  /**
12773
13022
  * Creates a typed {@link NotificationSummaryFirestoreCollection} bound to the given Firestore context.
13023
+ *
13024
+ * @param firestoreContext - Firestore context to bind the collection to
13025
+ * @returns a typed Firestore collection for NotificationSummary documents
12774
13026
  */ function notificationSummaryFirestoreCollection(firestoreContext) {
12775
13027
  return firestoreContext.firestoreCollection({
12776
13028
  modelIdentity: notificationSummaryIdentity,
@@ -12833,11 +13085,17 @@ var NotificationBoxDocument = /*#__PURE__*/ function(AbstractFirestoreDocument)
12833
13085
  });
12834
13086
  /**
12835
13087
  * Creates a Firestore collection reference for {@link NotificationBox} documents.
13088
+ *
13089
+ * @param context - Firestore context to create the collection reference from
13090
+ * @returns a typed collection reference for NotificationBox documents
12836
13091
  */ function notificationBoxCollectionReference(context) {
12837
13092
  return context.collection(notificationBoxIdentity.collectionName);
12838
13093
  }
12839
13094
  /**
12840
13095
  * Creates a typed {@link NotificationBoxFirestoreCollection} bound to the given Firestore context.
13096
+ *
13097
+ * @param firestoreContext - Firestore context to bind the collection to
13098
+ * @returns a typed Firestore collection for NotificationBox documents
12841
13099
  */ function notificationBoxFirestoreCollection(firestoreContext) {
12842
13100
  return firestoreContext.firestoreCollection({
12843
13101
  modelIdentity: notificationBoxIdentity,
@@ -13005,6 +13263,9 @@ var NotificationDocument = /*#__PURE__*/ function(AbstractFirestoreDocumentWithP
13005
13263
  });
13006
13264
  /**
13007
13265
  * Creates a factory that produces {@link Notification} subcollection references for a given {@link NotificationBoxDocument} parent.
13266
+ *
13267
+ * @param context - Firestore context to create subcollection references from
13268
+ * @returns a factory function that creates collection references for a given NotificationBox parent
13008
13269
  */ function notificationCollectionReferenceFactory(context) {
13009
13270
  return function(notificationBox) {
13010
13271
  return context.subcollection(notificationBox.documentRef, notificationIdentity.collectionName);
@@ -13012,6 +13273,9 @@ var NotificationDocument = /*#__PURE__*/ function(AbstractFirestoreDocumentWithP
13012
13273
  }
13013
13274
  /**
13014
13275
  * Creates a {@link NotificationFirestoreCollectionFactory} bound to the given Firestore context.
13276
+ *
13277
+ * @param firestoreContext - Firestore context to bind the collection factory to
13278
+ * @returns a factory that creates typed Firestore subcollections for Notification documents
13015
13279
  */ function notificationFirestoreCollectionFactory(firestoreContext) {
13016
13280
  var factory = notificationCollectionReferenceFactory(firestoreContext);
13017
13281
  return function(parent) {
@@ -13029,11 +13293,17 @@ var NotificationDocument = /*#__PURE__*/ function(AbstractFirestoreDocumentWithP
13029
13293
  }
13030
13294
  /**
13031
13295
  * Creates a collection group reference for querying all {@link Notification} documents across all {@link NotificationBox} parents.
13296
+ *
13297
+ * @param context - Firestore context to create the collection group reference from
13298
+ * @returns a typed collection group for querying Notification documents across all parents
13032
13299
  */ function notificationCollectionReference(context) {
13033
13300
  return context.collectionGroup(notificationIdentity.collectionName);
13034
13301
  }
13035
13302
  /**
13036
13303
  * Creates a typed {@link NotificationFirestoreCollectionGroup} bound to the given Firestore context.
13304
+ *
13305
+ * @param firestoreContext - Firestore context to bind the collection group to
13306
+ * @returns a typed Firestore collection group for querying Notification documents across all parents
13037
13307
  */ function notificationFirestoreCollectionGroup(firestoreContext) {
13038
13308
  return firestoreContext.firestoreCollectionGroup({
13039
13309
  modelIdentity: notificationIdentity,
@@ -13082,6 +13352,9 @@ var NotificationWeekDocument = /*#__PURE__*/ function(AbstractFirestoreDocumentW
13082
13352
  });
13083
13353
  /**
13084
13354
  * Creates a factory that produces {@link NotificationWeek} subcollection references for a given {@link NotificationBoxDocument} parent.
13355
+ *
13356
+ * @param context - Firestore context to create subcollection references from
13357
+ * @returns a factory function that creates collection references for a given NotificationBox parent
13085
13358
  */ function notificationWeekCollectionReferenceFactory(context) {
13086
13359
  return function(notificationBox) {
13087
13360
  return context.subcollection(notificationBox.documentRef, notificationWeekIdentity.collectionName);
@@ -13089,6 +13362,9 @@ var NotificationWeekDocument = /*#__PURE__*/ function(AbstractFirestoreDocumentW
13089
13362
  }
13090
13363
  /**
13091
13364
  * Creates a {@link NotificationWeekFirestoreCollectionFactory} bound to the given Firestore context.
13365
+ *
13366
+ * @param firestoreContext - Firestore context to bind the collection factory to
13367
+ * @returns a factory that creates typed Firestore subcollections for NotificationWeek documents
13092
13368
  */ function notificationWeekFirestoreCollectionFactory(firestoreContext) {
13093
13369
  var factory = notificationWeekCollectionReferenceFactory(firestoreContext);
13094
13370
  return function(parent) {
@@ -13106,11 +13382,17 @@ var NotificationWeekDocument = /*#__PURE__*/ function(AbstractFirestoreDocumentW
13106
13382
  }
13107
13383
  /**
13108
13384
  * Creates a collection group reference for querying all {@link NotificationWeek} documents across all {@link NotificationBox} parents.
13385
+ *
13386
+ * @param context - Firestore context to create the collection group reference from
13387
+ * @returns a typed collection group for querying NotificationWeek documents across all parents
13109
13388
  */ function notificationWeekCollectionReference(context) {
13110
13389
  return context.collectionGroup(notificationWeekIdentity.collectionName);
13111
13390
  }
13112
13391
  /**
13113
13392
  * Creates a typed {@link NotificationWeekFirestoreCollectionGroup} bound to the given Firestore context.
13393
+ *
13394
+ * @param firestoreContext - Firestore context to bind the collection group to
13395
+ * @returns a typed Firestore collection group for querying NotificationWeek documents across all parents
13114
13396
  */ function notificationWeekFirestoreCollectionGroup(firestoreContext) {
13115
13397
  return firestoreContext.firestoreCollectionGroup({
13116
13398
  modelIdentity: notificationWeekIdentity,
@@ -13255,16 +13537,42 @@ var notificationBoxModelCrudFunctionsConfig = {
13255
13537
  *
13256
13538
  * Error code constants thrown by the notification server action service.
13257
13539
  * These codes are returned in Firebase function error responses for client-side handling.
13258
- */ /** Thrown when a notification creation request is missing a required ID. */ var CREATE_NOTIFICATION_ID_REQUIRED_ERROR_CODE = 'CREATE_NOTIFICATION_ID_REQUIRED';
13259
- /** Thrown when attempting to initialize a NotificationBox or NotificationSummary that is already initialized. */ var NOTIFICATION_MODEL_ALREADY_INITIALIZED_ERROR_CODE = 'NOTIFICATION_MODEL_ALREADY_INITIALIZED';
13260
- /** Thrown when the target NotificationBox does not exist. */ var NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE = 'NOTIFICATION_BOX_DOES_NOT_EXIST';
13261
- /** 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';
13262
- /** 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';
13263
- /** 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';
13264
- /** 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';
13265
- /** 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';
13266
- /** 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';
13540
+ */ /**
13541
+ * Thrown when a notification creation request is missing a required ID.
13542
+ */ var CREATE_NOTIFICATION_ID_REQUIRED_ERROR_CODE = 'CREATE_NOTIFICATION_ID_REQUIRED';
13543
+ /**
13544
+ * Thrown when attempting to initialize a NotificationBox or NotificationSummary that is already initialized.
13545
+ */ var NOTIFICATION_MODEL_ALREADY_INITIALIZED_ERROR_CODE = 'NOTIFICATION_MODEL_ALREADY_INITIALIZED';
13546
+ /**
13547
+ * Thrown when the target NotificationBox does not exist.
13548
+ */ var NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE = 'NOTIFICATION_BOX_DOES_NOT_EXIST';
13549
+ /**
13550
+ * Thrown when attempting to create a NotificationBox for a model that already has one.
13551
+ */ var NOTIFICATION_BOX_EXISTS_FOR_MODEL_ERROR_CODE = 'NOTIFICATION_BOX_EXISTS_FOR_MODEL';
13552
+ /**
13553
+ * Thrown when the target recipient does not exist in the NotificationBox.
13554
+ */ var NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST_ERROR_CODE = 'NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST';
13555
+ /**
13556
+ * Thrown when an exclusion target is invalid (e.g., user not associated with the box).
13557
+ */ var NOTIFICATION_BOX_EXCLUSION_TARGET_INVALID_ERROR_CODE = 'NOTIFICATION_BOX_EXCLUSION_TARGET_INVALID';
13558
+ /**
13559
+ * Thrown when the UID provided for NotificationUser creation is invalid.
13560
+ */ var NOTIFICATION_USER_INVALID_UID_FOR_CREATE_ERROR_CODE = 'NOTIFICATION_USER_INVALID_UID_FOR_CREATE';
13561
+ /**
13562
+ * Thrown when attempting to add a user who has blocked themselves from being added as a recipient.
13563
+ */ var NOTIFICATION_USER_BLOCKED_FROM_BEING_ADD_TO_RECIPIENTS_ERROR_CODE = 'NOTIFICATION_USER_BLOCKED_FROM_BEING_ADD_TO_RECIPIENTS';
13564
+ /**
13565
+ * Thrown when attempting to update a recipient config that is locked by the user.
13566
+ */ var NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED_ERROR_CODE = 'NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED';
13267
13567
 
13568
+ function _array_like_to_array$5(arr, len) {
13569
+ if (len == null || len > arr.length) len = arr.length;
13570
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
13571
+ return arr2;
13572
+ }
13573
+ function _array_without_holes$4(arr) {
13574
+ if (Array.isArray(arr)) return _array_like_to_array$5(arr);
13575
+ }
13268
13576
  function _define_property$8(obj, key, value) {
13269
13577
  if (key in obj) {
13270
13578
  Object.defineProperty(obj, key, {
@@ -13278,6 +13586,12 @@ function _define_property$8(obj, key, value) {
13278
13586
  }
13279
13587
  return obj;
13280
13588
  }
13589
+ function _iterable_to_array$4(iter) {
13590
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
13591
+ }
13592
+ function _non_iterable_spread$4() {
13593
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
13594
+ }
13281
13595
  function _object_spread$8(target) {
13282
13596
  for(var i = 1; i < arguments.length; i++){
13283
13597
  var source = arguments[i] != null ? arguments[i] : {};
@@ -13312,6 +13626,17 @@ function _object_spread_props$6(target, source) {
13312
13626
  }
13313
13627
  return target;
13314
13628
  }
13629
+ function _to_consumable_array$4(arr) {
13630
+ return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$4();
13631
+ }
13632
+ function _unsupported_iterable_to_array$5(o, minLen) {
13633
+ if (!o) return;
13634
+ if (typeof o === "string") return _array_like_to_array$5(o, minLen);
13635
+ var n = Object.prototype.toString.call(o).slice(8, -1);
13636
+ if (n === "Object" && o.constructor) n = o.constructor.name;
13637
+ if (n === "Map" || n === "Set") return Array.from(n);
13638
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
13639
+ }
13315
13640
  /**
13316
13641
  * Applies an array of config entry params to a {@link NotificationBoxRecipientTemplateConfigRecord},
13317
13642
  * inserting new entries, merging updates, and removing entries marked with `remove: true`.
@@ -13319,31 +13644,29 @@ function _object_spread_props$6(target, source) {
13319
13644
  * @param a - existing config record
13320
13645
  * @param b - array of update params to apply
13321
13646
  * @param limitToAllowedConfigTypes - when provided, filters the result to only include these template types
13647
+ * @returns the updated config record, or undefined if no changes were made
13322
13648
  */ function updateNotificationBoxRecipientTemplateConfigRecord(a, b, limitToAllowedConfigTypes) {
13323
- var c;
13324
- if (b != null) {
13325
- var cArray = notificationBoxRecipientTemplateConfigRecordToArray(a);
13326
- var updatedC = ModelRelationUtility.insertCollection(cArray, b, {
13327
- readKey: function readKey(x) {
13328
- return x.type;
13329
- },
13330
- merge: function merge(x, y) {
13331
- return _object_spread$8({}, x, y);
13332
- }
13333
- });
13334
- // remove types marked as remove
13335
- updatedC = ModelRelationUtility.removeKeysFromCollection(updatedC, b.filter(function(x) {
13336
- return x.remove;
13337
- }).map(function(x) {
13338
- return x.type;
13339
- }), function(x) {
13649
+ var cArray = notificationBoxRecipientTemplateConfigRecordToArray(a);
13650
+ var updatedC = ModelRelationUtility.insertCollection(cArray, b, {
13651
+ readKey: function readKey(x) {
13340
13652
  return x.type;
13341
- });
13342
- c = notificationBoxRecipientTemplateConfigArrayToRecord(updatedC);
13343
- // if the config types are limited to specific types, then filter those only
13344
- if (limitToAllowedConfigTypes) {
13345
- c = filterKeysOnPOJOFunction(limitToAllowedConfigTypes)(c);
13653
+ },
13654
+ merge: function merge(x, y) {
13655
+ return _object_spread$8({}, x, y);
13346
13656
  }
13657
+ });
13658
+ // remove types marked as remove
13659
+ updatedC = ModelRelationUtility.removeKeysFromCollection(updatedC, b.filter(function(x) {
13660
+ return x.remove;
13661
+ }).map(function(x) {
13662
+ return x.type;
13663
+ }), function(x) {
13664
+ return x.type;
13665
+ });
13666
+ var c = notificationBoxRecipientTemplateConfigArrayToRecord(updatedC);
13667
+ // if the config types are limited to specific types, then filter those only
13668
+ if (limitToAllowedConfigTypes) {
13669
+ c = filterKeysOnPOJOFunction(limitToAllowedConfigTypes)(c);
13347
13670
  }
13348
13671
  return c;
13349
13672
  }
@@ -13354,6 +13677,7 @@ function _object_spread_props$6(target, source) {
13354
13677
  * @param a - existing config
13355
13678
  * @param b - update params to apply
13356
13679
  * @param limitToAllowedConfigTypes - when provided, filters config types to only allowed template types
13680
+ * @returns the updated default recipient config
13357
13681
  */ function updateNotificationUserDefaultNotificationBoxRecipientConfig(a, b, limitToAllowedConfigTypes) {
13358
13682
  var _ref;
13359
13683
  var inputC = b.configs, inputF = b.f, inputBk = b.bk, inputLk = b.lk;
@@ -13370,6 +13694,11 @@ function _object_spread_props$6(target, source) {
13370
13694
  * only if it actually changed. Returns `undefined` if no changes were detected.
13371
13695
  *
13372
13696
  * Automatically sets `ns = true` (needs sync) when changes are detected and the recipient has been indexed.
13697
+ *
13698
+ * @param a - existing per-box recipient config
13699
+ * @param b - update params to apply
13700
+ * @param limitToAllowedConfigTypes - when provided, filters template config types to only allowed types
13701
+ * @returns the updated config if changes were detected, or undefined if no changes occurred
13373
13702
  */ function updateNotificationUserNotificationBoxRecipientConfigIfChanged(a, b, limitToAllowedConfigTypes) {
13374
13703
  var _ref;
13375
13704
  var inputC = b.configs, inputRm = b.rm, inputLk = b.lk, inputBk = b.bk;
@@ -13400,6 +13729,11 @@ function _object_spread_props$6(target, source) {
13400
13729
  * through the optional {@link AppNotificationTemplateTypeInfoRecordService}.
13401
13730
  *
13402
13731
  * Returns `undefined` if no changes were made.
13732
+ *
13733
+ * @param a - existing per-box recipient config array
13734
+ * @param b - array of update params to apply to matching boxes
13735
+ * @param filterWithService - optional service used to filter template types to only those valid for each box's model
13736
+ * @returns the updated config array if any changes occurred, or undefined if nothing changed
13403
13737
  */ function updateNotificationUserNotificationBoxRecipientConfigs(a, b, filterWithService) {
13404
13738
  var boxesMap = makeModelMap(a, function(x) {
13405
13739
  return x.nb;
@@ -13429,7 +13763,7 @@ function _object_spread_props$6(target, source) {
13429
13763
  });
13430
13764
  var result;
13431
13765
  if (hasChanges) {
13432
- result = Array.from(boxesMap.values());
13766
+ result = _to_consumable_array$4(boxesMap.values());
13433
13767
  }
13434
13768
  return result;
13435
13769
  }
@@ -13568,6 +13902,9 @@ function _ts_generator$4(thisArg, body) {
13568
13902
  *
13569
13903
  * Maps friendly field names (`subject`, `message`, `createdBy`, etc.) to their Firestore abbreviations
13570
13904
  * and filters out null/undefined metadata values.
13905
+ *
13906
+ * @param input - friendly input with readable field names
13907
+ * @returns the low-level template using Firestore field abbreviations
13571
13908
  */ function createNotificationTemplate(input) {
13572
13909
  var _ref, _ref1;
13573
13910
  var inputNotificationModel = input.notificationModel, type = input.type, unique = input.unique, overrideExistingTask = input.overrideExistingTask, // notification
@@ -13614,6 +13951,9 @@ function _ts_generator$4(thisArg, body) {
13614
13951
  * Determines whether a notification should be created based on the explicit toggle and throttle settings.
13615
13952
  *
13616
13953
  * Returns false if `sendNotification` is explicitly false, or if the throttle window hasn't elapsed.
13954
+ *
13955
+ * @param input - the send control parameters including the toggle and throttle configuration
13956
+ * @returns true if the notification should be created and sent
13617
13957
  */ function shouldSendCreatedNotificationInput(input) {
13618
13958
  var sendNotification = input.sendNotification, sendNotificationThrottleDate = input.sendNotificationThrottleDate, inputSendNotificationThrottleTime = input.sendNotificationThrottleTime;
13619
13959
  var sendNotificationThrottleTime = inputSendNotificationThrottleTime !== null && inputSendNotificationThrottleTime !== void 0 ? inputSendNotificationThrottleTime : MS_IN_HOUR;
@@ -13627,6 +13967,8 @@ function _ts_generator$4(thisArg, body) {
13627
13967
  *
13628
13968
  * For unique task notifications, generates a deterministic document ID from the target model and task type.
13629
13969
  *
13970
+ * @param input - the creation parameters including template, context, and accessor
13971
+ * @returns the document reference and notification data pair, with `notificationCreated` set to false
13630
13972
  * @throws {Error} When neither an accessor nor sufficient context is provided
13631
13973
  * @throws {Error} When `unique=true` but no target model is specified
13632
13974
  */ function createNotificationDocumentPair(input) {
@@ -13635,15 +13977,13 @@ function _ts_generator$4(thisArg, body) {
13635
13977
  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;
13636
13978
  /**
13637
13979
  * Use the input, or default to true if inputUnique is true.
13638
- */ var overrideExistingTask = inputOverrideExistingTask != null ? inputOverrideExistingTask : inputUnique ? true : undefined;
13980
+ */ var overrideExistingTask = inputOverrideExistingTask !== null && inputOverrideExistingTask !== void 0 ? inputOverrideExistingTask : inputUnique ? true : undefined;
13639
13981
  var accessor = inputAccessor;
13640
13982
  var notificationBoxId = notificationBoxIdForModel(notificationModel);
13641
- if (!accessor && notificationBoxId) {
13642
- if (context) {
13643
- var notificationCollectionFactory = context.notificationCollectionFactory, notificationBoxCollection = context.notificationBoxCollection;
13644
- var notificationBoxDocument = notificationBoxCollection.documentAccessorForTransaction(transaction).loadDocumentForId(notificationBoxId);
13645
- accessor = notificationCollectionFactory(notificationBoxDocument).documentAccessorForTransaction(transaction);
13646
- }
13983
+ if (!accessor && notificationBoxId && context) {
13984
+ var notificationCollectionFactory = context.notificationCollectionFactory, notificationBoxCollection = context.notificationBoxCollection;
13985
+ var notificationBoxDocument = notificationBoxCollection.documentAccessorForTransaction(transaction).loadDocumentForId(notificationBoxId);
13986
+ accessor = notificationCollectionFactory(notificationBoxDocument).documentAccessorForTransaction(transaction);
13647
13987
  }
13648
13988
  if (!accessor) {
13649
13989
  throw new Error('createNotificationDocument() failed as neither an accessor nor sufficient information was provided about the target.');
@@ -13724,6 +14064,10 @@ function _ts_generator$4(thisArg, body) {
13724
14064
  }
13725
14065
  /**
13726
14066
  * Internal function used by createNotificationDocument().
14067
+ *
14068
+ * @param input - send control parameters (throttle settings, shouldCreateNotification flag)
14069
+ * @param pair - the document pair created by {@link createNotificationDocumentPair}
14070
+ * @returns the pair with `notificationCreated` updated to reflect whether the document was saved
13727
14071
  */ function _createNotificationDocumentFromPair(input, pair) {
13728
14072
  return _async_to_generator$4(function() {
13729
14073
  var notification, notificationDocument, isNotificationTask, overrideExistingTask;
@@ -13774,6 +14118,9 @@ function _ts_generator$4(thisArg, body) {
13774
14118
  *
13775
14119
  * For unique tasks with `overrideExistingTask`, uses `set()` to replace existing documents.
13776
14120
  * Otherwise uses `create()` which fails if the document already exists.
14121
+ *
14122
+ * @param input - the creation parameters including template, context, send control settings
14123
+ * @returns the document pair with `notificationCreated` reflecting whether the document was saved
13777
14124
  */ function createNotificationDocument(input) {
13778
14125
  return _async_to_generator$4(function() {
13779
14126
  var pair;
@@ -13790,6 +14137,9 @@ function _ts_generator$4(thisArg, body) {
13790
14137
  * Creates and saves a notification only if sending conditions are met (not throttled, not explicitly disabled).
13791
14138
  *
13792
14139
  * Returns `undefined` if the notification was not created.
14140
+ *
14141
+ * @param input - the creation parameters including template, context, and send control settings
14142
+ * @returns the document pair if the notification was created, or undefined if it was skipped
13793
14143
  */ function createNotificationDocumentIfSending(input) {
13794
14144
  return _async_to_generator$4(function() {
13795
14145
  var pair;
@@ -13868,6 +14218,8 @@ function _object_spread_props$5(target, source) {
13868
14218
  /**
13869
14219
  * Creates a {@link CreateNotificationTaskTemplate} with `TASK_NOTIFICATION` send type and no recipients.
13870
14220
  *
14221
+ * @param input - task template input parameters
14222
+ * @returns the configured task notification template
13871
14223
  * @throws {Error} When `unique=true` but no `notificationModel` or target model is specified.
13872
14224
  *
13873
14225
  * @example
@@ -13905,11 +14257,17 @@ function _array_like_to_array$4(arr, len) {
13905
14257
  function _array_with_holes$1(arr) {
13906
14258
  if (Array.isArray(arr)) return arr;
13907
14259
  }
14260
+ function _array_without_holes$3(arr) {
14261
+ if (Array.isArray(arr)) return _array_like_to_array$4(arr);
14262
+ }
13908
14263
  function _class_call_check$5(instance, Constructor) {
13909
14264
  if (!(instance instanceof Constructor)) {
13910
14265
  throw new TypeError("Cannot call a class as a function");
13911
14266
  }
13912
14267
  }
14268
+ function _iterable_to_array$3(iter) {
14269
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
14270
+ }
13913
14271
  function _iterable_to_array_limit$1(arr, i) {
13914
14272
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
13915
14273
  if (_i == null) return;
@@ -13937,9 +14295,15 @@ function _iterable_to_array_limit$1(arr, i) {
13937
14295
  function _non_iterable_rest$1() {
13938
14296
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
13939
14297
  }
14298
+ function _non_iterable_spread$3() {
14299
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14300
+ }
13940
14301
  function _sliced_to_array$1(arr, i) {
13941
14302
  return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$1();
13942
14303
  }
14304
+ function _to_consumable_array$3(arr) {
14305
+ return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread$3();
14306
+ }
13943
14307
  function _unsupported_iterable_to_array$4(o, minLen) {
13944
14308
  if (!o) return;
13945
14309
  if (typeof o === "string") return _array_like_to_array$4(o, minLen);
@@ -13951,6 +14315,8 @@ function _unsupported_iterable_to_array$4(o, minLen) {
13951
14315
  /**
13952
14316
  * Creates a {@link NotificationTemplateTypeInfoRecord} from an array of template type info entries.
13953
14317
  *
14318
+ * @param infoArray - array of template type info entries to index
14319
+ * @returns a record keyed by template type
13954
14320
  * @throws {Error} When duplicate template types are found in the input array.
13955
14321
  *
13956
14322
  * @example
@@ -13987,6 +14353,7 @@ function _unsupported_iterable_to_array$4(o, minLen) {
13987
14353
  * Handles alternative model identities defined in {@link NotificationTemplateTypeInfoIdentityInfoAlternativeModelIdentityPair}.
13988
14354
  *
13989
14355
  * @param appNotificationTemplateTypeInfoRecord - the complete template type registry for the application
14356
+ * @returns a fully initialized service with indexed lookups for fast template type discovery
13990
14357
  *
13991
14358
  * @example
13992
14359
  * ```ts
@@ -14021,10 +14388,10 @@ function _unsupported_iterable_to_array$4(o, minLen) {
14021
14388
  allKnownTemplateTypeInfo.push(info);
14022
14389
  allKnownTemplateTypes.push(info.type);
14023
14390
  });
14024
- var allNotificationModelIdentityValues = Array.from(allNotificationModelIdentityValuesSet);
14391
+ var allNotificationModelIdentityValues = _to_consumable_array$3(allNotificationModelIdentityValuesSet);
14025
14392
  var notificationModelTemplateInfoMap = notificationModelTypeInfoMapBuilder.map();
14026
14393
  var targetModelTemplateInfoMap = targetModelTypeInfoMapBuilder.map();
14027
- var notificationModelTemplateTypesMap = new Map(Array.from(notificationModelTemplateInfoMap.entries()).map(function(param) {
14394
+ var notificationModelTemplateTypesMap = new Map(_to_consumable_array$3(notificationModelTemplateInfoMap.entries()).map(function(param) {
14028
14395
  var _param = _sliced_to_array$1(param, 2), k = _param[0], x = _param[1];
14029
14396
  return [
14030
14397
  k,
@@ -14033,7 +14400,7 @@ function _unsupported_iterable_to_array$4(o, minLen) {
14033
14400
  })
14034
14401
  ];
14035
14402
  }));
14036
- var targetModelTemplateTypesMap = new Map(Array.from(targetModelTemplateInfoMap.entries()).map(function(param) {
14403
+ var targetModelTemplateTypesMap = new Map(_to_consumable_array$3(targetModelTemplateInfoMap.entries()).map(function(param) {
14037
14404
  var _param = _sliced_to_array$1(param, 2), k = _param[0], x = _param[1];
14038
14405
  return [
14039
14406
  k,
@@ -14237,6 +14604,7 @@ function _ts_generator$3(thisArg, body) {
14237
14604
  *
14238
14605
  * @param fn - base function that generates message content per recipient
14239
14606
  * @param extras - optional delivery customization (global recipients, send callbacks)
14607
+ * @returns a {@link NotificationMessageFunction} with the extras attached
14240
14608
  *
14241
14609
  * @example
14242
14610
  * ```ts
@@ -14264,6 +14632,8 @@ function _ts_generator$3(thisArg, body) {
14264
14632
  *
14265
14633
  * Useful as a placeholder factory for template types that should not produce deliverable content.
14266
14634
  *
14635
+ * @returns a factory that produces no-content message functions
14636
+ *
14267
14637
  * @example
14268
14638
  * ```ts
14269
14639
  * const factory = noContentNotificationMessageFunctionFactory();
@@ -14272,7 +14642,7 @@ function _ts_generator$3(thisArg, body) {
14272
14642
  * // msg.flag === NotificationMessageFlag.NO_CONTENT
14273
14643
  * ```
14274
14644
  */ function noContentNotificationMessageFunctionFactory() {
14275
- return function(config) {
14645
+ return function(_config) {
14276
14646
  return _async_to_generator$3(function() {
14277
14647
  return _ts_generator$3(this, function(_state) {
14278
14648
  // const { item } = config;
@@ -14307,6 +14677,8 @@ function _ts_generator$3(thisArg, body) {
14307
14677
  * Query constraints for finding {@link NotificationUser} documents that have pending config syncs (`ns == true`).
14308
14678
  *
14309
14679
  * Used by the server to discover users whose configs need to be synced to their NotificationBox recipients.
14680
+ *
14681
+ * @returns array of Firestore query constraints filtering for users needing sync
14310
14682
  */ function notificationUsersFlaggedForNeedsSyncQuery() {
14311
14683
  return [
14312
14684
  where('ns', '==', true)
@@ -14316,6 +14688,7 @@ function _ts_generator$3(thisArg, body) {
14316
14688
  * Query constraints for finding {@link NotificationUser} documents that have any of the given exclusion IDs in their `x` array.
14317
14689
  *
14318
14690
  * @param exclusionId - one or more box IDs or collection name prefixes to match against
14691
+ * @returns array of Firestore query constraints filtering for users with matching exclusions
14319
14692
  */ function notificationUserHasExclusionQuery(exclusionId) {
14320
14693
  return [
14321
14694
  where('x', 'array-contains-any', exclusionId)
@@ -14324,6 +14697,8 @@ function _ts_generator$3(thisArg, body) {
14324
14697
  // MARK: NotificationSummary
14325
14698
  /**
14326
14699
  * Query constraints for finding {@link NotificationSummary} documents that need server-side initialization (`s == true`).
14700
+ *
14701
+ * @returns array of Firestore query constraints filtering for summaries needing initialization
14327
14702
  */ function notificationSummariesFlaggedForNeedsInitializationQuery() {
14328
14703
  return [
14329
14704
  where('s', '==', true)
@@ -14333,6 +14708,8 @@ function _ts_generator$3(thisArg, body) {
14333
14708
  // MARK: NotificationBox
14334
14709
  /**
14335
14710
  * Query constraints for finding {@link NotificationBox} documents that need server-side initialization (`s == true`).
14711
+ *
14712
+ * @returns array of Firestore query constraints filtering for boxes needing initialization
14336
14713
  */ function notificationBoxesFlaggedForNeedsInitializationQuery() {
14337
14714
  return [
14338
14715
  where('s', '==', true)
@@ -14342,6 +14719,8 @@ function _ts_generator$3(thisArg, body) {
14342
14719
  * Query constraints for finding {@link NotificationBox} documents flagged as invalid (`fi == true`).
14343
14720
  *
14344
14721
  * Used by the server to clean up boxes that could not be initialized.
14722
+ *
14723
+ * @returns array of Firestore query constraints filtering for boxes flagged as invalid
14345
14724
  */ function notificationBoxesFlaggedInvalidQuery() {
14346
14725
  return [
14347
14726
  where('fi', '==', true)
@@ -14355,6 +14734,7 @@ function _ts_generator$3(thisArg, body) {
14355
14734
  * This is the primary query used by the send queue processor.
14356
14735
  *
14357
14736
  * @param now - reference time for the `sat` comparison (defaults to current time)
14737
+ * @returns array of Firestore query constraints filtering for notifications past their scheduled send time
14358
14738
  */ function notificationsPastSendAtTimeQuery() {
14359
14739
  var now = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : new Date();
14360
14740
  return [
@@ -14365,6 +14745,8 @@ function _ts_generator$3(thisArg, body) {
14365
14745
  /**
14366
14746
  * Query constraints for finding {@link Notification} documents marked as done (`d == true`)
14367
14747
  * and ready to be archived to {@link NotificationWeek} and then deleted.
14748
+ *
14749
+ * @returns array of Firestore query constraints filtering for completed notifications ready to archive
14368
14750
  */ function notificationsReadyForCleanupQuery() {
14369
14751
  return [
14370
14752
  where('d', '==', true)
@@ -14401,6 +14783,10 @@ function _unsupported_iterable_to_array$3(o, minLen) {
14401
14783
  *
14402
14784
  * Used when combining results from multiple send batches within the same channel.
14403
14785
  *
14786
+ * @param a - first result to merge
14787
+ * @param b - second result to merge
14788
+ * @returns a new result with all recipient lists concatenated from both inputs
14789
+ *
14404
14790
  * @example
14405
14791
  * ```ts
14406
14792
  * const combined = mergeNotificationSendMessagesResult(firstBatchResult, secondBatchResult);
@@ -14467,6 +14853,8 @@ function _object_spread_props$4(target, source) {
14467
14853
  * Use this when the handler needs more time but doesn't want to increment the failure counter.
14468
14854
  * The task will be re-queued without counting as an error attempt.
14469
14855
  *
14856
+ * @returns an empty checkpoint array signaling in-progress without failure
14857
+ *
14470
14858
  * @example
14471
14859
  * ```ts
14472
14860
  * // Waiting for an external process — delay without failing
@@ -14482,6 +14870,7 @@ function _object_spread_props$4(target, source) {
14482
14870
  *
14483
14871
  * @param delayUntil - absolute date or relative milliseconds from the task's run start time
14484
14872
  * @param updateMetadata - optional metadata updates to merge into the notification item
14873
+ * @returns a task result that re-queues the task after the specified delay without marking it failed
14485
14874
  *
14486
14875
  * @example
14487
14876
  * ```ts
@@ -14503,6 +14892,7 @@ function _object_spread_props$4(target, source) {
14503
14892
  *
14504
14893
  * @param completedParts - checkpoint string(s) that were just completed
14505
14894
  * @param updateMetadata - optional metadata updates to merge into the notification item
14895
+ * @returns a task result marking the given checkpoints complete while keeping the task running
14506
14896
  *
14507
14897
  * @example
14508
14898
  * ```ts
@@ -14519,6 +14909,7 @@ function _object_spread_props$4(target, source) {
14519
14909
  * Returns a result indicating the task completed successfully. The notification document will be deleted.
14520
14910
  *
14521
14911
  * @param updateMetadata - optional final metadata update (applied before deletion if subtasks need it)
14912
+ * @returns a task result signaling successful completion; the notification document will be deleted
14522
14913
  *
14523
14914
  * @example
14524
14915
  * ```ts
@@ -14538,6 +14929,7 @@ function _object_spread_props$4(target, source) {
14538
14929
  *
14539
14930
  * @param updateMetadata - optional metadata updates
14540
14931
  * @param removeFromCompletedCheckpoints - checkpoint(s) to remove from the completed set (e.g., to retry a checkpoint)
14932
+ * @returns a task result signaling failure; the error attempt counter is incremented
14541
14933
  *
14542
14934
  * @example
14543
14935
  * ```ts
@@ -14559,6 +14951,7 @@ function _object_spread_props$4(target, source) {
14559
14951
  *
14560
14952
  * @param result - the task result to wrap
14561
14953
  * @param force - when true, overrides any existing `canRunNextCheckpoint` value
14954
+ * @returns a copy of the result with `canRunNextCheckpoint` set to true
14562
14955
  */ function notificationTaskCanRunNextCheckpoint(result, force) {
14563
14956
  if (force || result.canRunNextCheckpoint == null) {
14564
14957
  result = _object_spread_props$4(_object_spread$6({}, result), {
@@ -14632,6 +15025,8 @@ function _object_spread_props$3(target, source) {
14632
15025
  * Internal helper that marks the `'processing'` checkpoint complete and schedules the `'cleanup'` phase.
14633
15026
  *
14634
15027
  * Prefer using {@link notificationSubtaskComplete} in subtask handlers instead of calling this directly.
15028
+ *
15029
+ * @returns a partially-complete task result with the processing checkpoint marked done
14635
15030
  */ function completeSubtaskProcessingAndScheduleCleanupTaskResult() {
14636
15031
  return notificationTaskPartiallyComplete([
14637
15032
  'processing'
@@ -14643,6 +15038,9 @@ function _object_spread_props$3(target, source) {
14643
15038
  * Unlike {@link notificationTaskComplete}, this signals that the cleanup checkpoint should still run.
14644
15039
  * Use `canRunNextCheckpoint: true` in options to run cleanup immediately in the same execution.
14645
15040
  *
15041
+ * @param options - optional metadata updates and flag to run cleanup immediately in the same execution
15042
+ * @returns a task result marking the subtask as complete while allowing cleanup to proceed
15043
+ *
14646
15044
  * @example
14647
15045
  * ```ts
14648
15046
  * // Processing done, schedule cleanup for next run
@@ -14735,6 +15133,9 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14735
15133
  *
14736
15134
  * Filters template configs to only include types applicable to the notification box's model.
14737
15135
  * Used during the server-side sync process to update box recipient entries from user configs.
15136
+ *
15137
+ * @param input - the merged config inputs including uid, global config, box config, and optional existing recipient
15138
+ * @returns the computed effective box recipient with merged config, contact info, and flags
14738
15139
  */ function effectiveNotificationBoxRecipientConfig(input) {
14739
15140
  var _ref, _ref1, _gc_f, _gc_lk, _gc_e, _gc_t;
14740
15141
  var uid = input.uid, inputM = input.m, appNotificationTemplateTypeInfoRecordService = input.appNotificationTemplateTypeInfoRecordService, gc = input.gc, notificationUserNotificationBoxConfig = input.boxConfig, recipient = input.recipient;
@@ -14766,6 +15167,9 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14766
15167
  * and propagates exclusion flags to the per-box configs.
14767
15168
  *
14768
15169
  * Exclusions not matching any associated notification box are automatically filtered out.
15170
+ *
15171
+ * @param input - the user, exclusions to add, and exclusions to remove
15172
+ * @returns the updated exclusion list and the partial user update to apply
14769
15173
  */ function updateNotificationUserNotificationSendExclusions(input) {
14770
15174
  var notificationUser = input.notificationUser, inputAddExclusions = input.addExclusions, inputRemoveExclusions = input.removeExclusions;
14771
15175
  var associatedNotificationBoxes = notificationUser.b, currentExclusions = notificationUser.x, notificationBoxConfigs = notificationUser.bc;
@@ -14803,6 +15207,9 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14803
15207
  /**
14804
15208
  * Applies the current exclusion list to per-box configs, setting/clearing the `x` flag and marking
14805
15209
  * changed configs as needing sync (`ns = true`).
15210
+ *
15211
+ * @param params - the exclusion list, per-box configs, and optional flag to recalculate the global ns flag
15212
+ * @returns the updated per-box configs and the recalculated needs-sync flag
14806
15213
  */ function applyExclusionsToNotificationUserNotificationBoxRecipientConfigs(params) {
14807
15214
  var _ref, _ref1;
14808
15215
  var inputX = params.x, inputBc = params.bc, notificationUser = params.notificationUser, recalculateNs = params.recalculateNs;
@@ -14830,6 +15237,9 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14830
15237
  }
14831
15238
  /**
14832
15239
  * Returns true if any of the per-box configs need syncing (`ns == true`).
15240
+ *
15241
+ * @param configs - array of per-box recipient configs to check
15242
+ * @returns true if at least one config has its needs-sync flag set
14833
15243
  */ function calculateNsForNotificationUserNotificationBoxRecipientConfigs(configs) {
14834
15244
  return configs.some(function(x) {
14835
15245
  return x.ns;
@@ -14838,11 +15248,14 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14838
15248
  /**
14839
15249
  * Creates a {@link NotificationSendExclusionCanSendFunction} from the given exclusion list.
14840
15250
  * Returns true for IDs that don't match any exclusion prefix.
15251
+ *
15252
+ * @param exclusions - the list of box IDs or prefixes that should be excluded from delivery
15253
+ * @returns a predicate function that returns true if the given notification/box ID is not excluded
14841
15254
  */ var notificationSendExclusionCanSendFunction = function notificationSendExclusionCanSendFunction(exclusions) {
14842
15255
  var fn = function fn(notification) {
14843
- return exclusions.findIndex(function(x) {
15256
+ return !exclusions.some(function(x) {
14844
15257
  return notification.startsWith(x);
14845
- }) === -1;
15258
+ });
14846
15259
  };
14847
15260
  fn._exclusions = exclusions;
14848
15261
  return fn;
@@ -14851,12 +15264,18 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14851
15264
  /**
14852
15265
  * Returns true if all channels on the notification have reached a terminal state
14853
15266
  * (NONE, NO_TRY, SENT, or SKIPPED). Used to determine if the notification can be marked done.
15267
+ *
15268
+ * @param input - the per-channel send flags to evaluate
15269
+ * @returns true if all channels are in a terminal send state
14854
15270
  */ function notificationSendFlagsImplyIsComplete(input) {
14855
15271
  return isCompleteNotificationSendState(input.es) && isCompleteNotificationSendState(input.ps) && isCompleteNotificationSendState(input.ts) && isCompleteNotificationSendState(input.ns);
14856
15272
  }
14857
15273
  /**
14858
15274
  * Returns true if the given send state is terminal — no further send attempts will be made.
14859
15275
  * Terminal states: NONE, NO_TRY, SENT, SKIPPED.
15276
+ *
15277
+ * @param input - the send state to evaluate
15278
+ * @returns true if the state is terminal and no further delivery will be attempted
14860
15279
  */ function isCompleteNotificationSendState(input) {
14861
15280
  var isComplete = false;
14862
15281
  switch(input){
@@ -14866,7 +15285,11 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14866
15285
  case NotificationSendState.SKIPPED:
14867
15286
  isComplete = true;
14868
15287
  break;
14869
- default:
15288
+ case NotificationSendState.QUEUED:
15289
+ case NotificationSendState.SENT_PARTIAL:
15290
+ case NotificationSendState.SEND_ERROR:
15291
+ case NotificationSendState.BUILD_ERROR:
15292
+ case NotificationSendState.CONFIG_ERROR:
14870
15293
  isComplete = false;
14871
15294
  break;
14872
15295
  }
@@ -14874,6 +15297,9 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14874
15297
  }
14875
15298
  /**
14876
15299
  * Resolves which recipient groups (global, box, explicit) are allowed based on the {@link NotificationRecipientSendFlag}.
15300
+ *
15301
+ * @param flag - the recipient send flag controlling which groups are included
15302
+ * @returns an object indicating which recipient groups are permitted for this notification
14877
15303
  */ function allowedNotificationRecipients(flag) {
14878
15304
  var canSendToGlobalRecipients = true;
14879
15305
  var canSendToBoxRecipients = true;
@@ -14907,6 +15333,9 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14907
15333
  *
14908
15334
  * Only notifications that can be sent to box recipients are archived (notifications restricted
14909
15335
  * to only explicit or only global recipients are not saved to the weekly archive).
15336
+ *
15337
+ * @param notification - the notification to check
15338
+ * @returns true if the notification should be saved to the weekly archive after delivery
14910
15339
  */ function shouldSaveNotificationToNotificationWeek(notification) {
14911
15340
  return allowedNotificationRecipients(notification.rf).canSendToBoxRecipients;
14912
15341
  }
@@ -14914,6 +15343,10 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14914
15343
  /**
14915
15344
  * Merges a partial update into a {@link NotificationUserNotificationBoxRecipientConfig},
14916
15345
  * preserving user-controlled fields (`nb`, `rm`, `ns`, `lk`, `bk`) and respecting OPT_OUT state.
15346
+ *
15347
+ * @param a - base user box recipient config to merge into
15348
+ * @param b - partial update to apply on top of the base
15349
+ * @returns the merged config with protected fields retained from `a`
14917
15350
  */ function mergeNotificationUserNotificationBoxRecipientConfigs(a, b) {
14918
15351
  var _b_f;
14919
15352
  return _object_spread_props$2(_object_spread$4({}, mergeNotificationBoxRecipients(a, b)), {
@@ -14928,6 +15361,10 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14928
15361
  }
14929
15362
  /**
14930
15363
  * Merges a partial update into a {@link NotificationBoxRecipient}, deeply merging the `c` (config record) field.
15364
+ *
15365
+ * @param a - base recipient to merge into
15366
+ * @param b - partial recipient update to apply on top of the base
15367
+ * @returns the merged recipient with deeply merged template config records
14931
15368
  */ function mergeNotificationBoxRecipients(a, b) {
14932
15369
  return _object_spread_props$2(_object_spread$4({}, a, b), {
14933
15370
  // configs should be merged/ovewritten
@@ -14937,6 +15374,9 @@ function _unsupported_iterable_to_array$2(o, minLen) {
14937
15374
  /**
14938
15375
  * Resolves a {@link NotificationBoxDocument} from a reference pair, loading by model key if no document is provided directly.
14939
15376
  *
15377
+ * @param input - reference pair containing either a direct document or a model key to load from
15378
+ * @param accessor - Firestore document accessor used to load the document by ID when needed
15379
+ * @returns the resolved NotificationBoxDocument
14940
15380
  * @throws {Error} When neither a document nor a model key is provided.
14941
15381
  */ function loadNotificationBoxDocumentForReferencePair(input, accessor) {
14942
15382
  var inputNotificationBoxDocument = input.notificationBoxDocument, inputNotificationBoxRelatedModelKey = input.notificationBoxRelatedModelKey;
@@ -15080,11 +15520,17 @@ function _is_native_reflect_construct$2() {
15080
15520
  });
15081
15521
  /**
15082
15522
  * Returns the Firestore {@link CollectionReference} for {@link OidcEntry} documents.
15523
+ *
15524
+ * @param context - the Firestore context to use
15525
+ * @returns the CollectionReference for OidcEntry documents
15083
15526
  */ function oidcEntryCollectionReference(context) {
15084
15527
  return context.collection(oidcEntryIdentity.collectionName);
15085
15528
  }
15086
15529
  /**
15087
15530
  * Creates an {@link OidcEntryFirestoreCollection} from the given configuration.
15531
+ *
15532
+ * @param config - the Firestore context and collection configuration
15533
+ * @returns a configured OidcEntryFirestoreCollection
15088
15534
  */ function oidcEntryFirestoreCollection(config) {
15089
15535
  var firestoreContext = config.firestoreContext;
15090
15536
  return firestoreContext.firestoreCollection({
@@ -15100,6 +15546,9 @@ function _is_native_reflect_construct$2() {
15100
15546
 
15101
15547
  /**
15102
15548
  * Query for OidcEntry documents with a specific type.
15549
+ *
15550
+ * @param type - the OIDC entry type to filter by
15551
+ * @returns Firestore query constraints for the given type
15103
15552
  */ function oidcEntriesWithTypeQuery(type) {
15104
15553
  return [
15105
15554
  where('type', '==', type)
@@ -15107,6 +15556,10 @@ function _is_native_reflect_construct$2() {
15107
15556
  }
15108
15557
  /**
15109
15558
  * Query for OidcEntry documents with a specific type and userCode.
15559
+ *
15560
+ * @param type - the OIDC entry type to filter by
15561
+ * @param userCode - the user code to match
15562
+ * @returns Firestore query constraints for the given type and userCode
15110
15563
  */ function oidcEntriesByUserCodeQuery(type, userCode) {
15111
15564
  return [
15112
15565
  where('type', '==', type),
@@ -15115,6 +15568,10 @@ function _is_native_reflect_construct$2() {
15115
15568
  }
15116
15569
  /**
15117
15570
  * Query for OidcEntry documents with a specific type and uid.
15571
+ *
15572
+ * @param type - the OIDC entry type to filter by
15573
+ * @param uid - the Firebase user ID to match
15574
+ * @returns Firestore query constraints for the given type and uid
15118
15575
  */ function oidcEntriesByUidQuery(type, uid) {
15119
15576
  return [
15120
15577
  where('type', '==', type),
@@ -15123,6 +15580,10 @@ function _is_native_reflect_construct$2() {
15123
15580
  }
15124
15581
  /**
15125
15582
  * Query for OidcEntry documents with a specific type and grantId.
15583
+ *
15584
+ * @param type - the OIDC entry type to filter by
15585
+ * @param grantId - the grant ID to match
15586
+ * @returns Firestore query constraints for the given type and grantId
15126
15587
  */ function oidcEntriesByGrantIdQuery(type, grantId) {
15127
15588
  return [
15128
15589
  where('type', '==', type),
@@ -15131,6 +15592,9 @@ function _is_native_reflect_construct$2() {
15131
15592
  }
15132
15593
  /**
15133
15594
  * Query for OidcEntry Client documents owned by a specific user.
15595
+ *
15596
+ * @param ownershipKey - the ownership key identifying the owner
15597
+ * @returns Firestore query constraints for Client entries matching the ownership key
15134
15598
  */ function oidcClientEntriesByOwnerQuery(ownershipKey) {
15135
15599
  return [
15136
15600
  where('type', '==', 'Client'),
@@ -15458,6 +15922,10 @@ function _is_native_reflect_construct$1() {
15458
15922
  var storageFileIdentity = firestoreModelIdentity('storageFile', 'sf');
15459
15923
  /**
15460
15924
  * Creates a StorageFileGroupCreatedStorageFileKey from the input StorageFileGroupId and purpose.
15925
+ *
15926
+ * @param purpose - the purpose identifying the type of file within the group
15927
+ * @param storageFileGroupId - the ID of the parent StorageFileGroup
15928
+ * @returns a deterministic FirestoreCollectionModelKey for the storage file
15461
15929
  */ function storageFileGroupCreatedStorageFileKey(purpose, storageFileGroupId) {
15462
15930
  return firestoreModelKey(storageFileIdentity, "".concat(purpose, "_").concat(storageFileGroupId));
15463
15931
  }
@@ -15652,6 +16120,9 @@ var storageFileIdentity = firestoreModelIdentity('storageFile', 'sf');
15652
16120
  * ```ts
15653
16121
  * const colRef = storageFileCollectionReference(firestoreContext);
15654
16122
  * ```
16123
+ *
16124
+ * @param context - the Firestore context to use
16125
+ * @returns the CollectionReference for StorageFile documents
15655
16126
  */ function storageFileCollectionReference(context) {
15656
16127
  return context.collection(storageFileIdentity.collectionName);
15657
16128
  }
@@ -15663,6 +16134,9 @@ var storageFileIdentity = firestoreModelIdentity('storageFile', 'sf');
15663
16134
  * const collection = storageFileFirestoreCollection(firestoreContext);
15664
16135
  * const doc = collection.documentAccessor().newDocument();
15665
16136
  * ```
16137
+ *
16138
+ * @param firestoreContext - the Firestore context to use
16139
+ * @returns a configured StorageFileFirestoreCollection
15666
16140
  */ function storageFileFirestoreCollection(firestoreContext) {
15667
16141
  return firestoreContext.firestoreCollection({
15668
16142
  modelIdentity: storageFileIdentity,
@@ -15755,6 +16229,9 @@ var storageFileIdentity = firestoreModelIdentity('storageFile', 'sf');
15755
16229
  * ```ts
15756
16230
  * const colRef = storageFileGroupCollectionReference(firestoreContext);
15757
16231
  * ```
16232
+ *
16233
+ * @param context - the Firestore context to use
16234
+ * @returns the CollectionReference for StorageFileGroup documents
15758
16235
  */ function storageFileGroupCollectionReference(context) {
15759
16236
  return context.collection(storageFileGroupIdentity.collectionName);
15760
16237
  }
@@ -15766,6 +16243,9 @@ var storageFileIdentity = firestoreModelIdentity('storageFile', 'sf');
15766
16243
  * const collection = storageFileGroupFirestoreCollection(firestoreContext);
15767
16244
  * const doc = collection.documentAccessor().loadDocumentForId(groupId);
15768
16245
  * ```
16246
+ *
16247
+ * @param firestoreContext - the Firestore context to use
16248
+ * @returns a configured StorageFileGroupFirestoreCollection
15769
16249
  */ function storageFileGroupFirestoreCollection(firestoreContext) {
15770
16250
  return firestoreContext.firestoreCollection({
15771
16251
  modelIdentity: storageFileGroupIdentity,
@@ -15961,6 +16441,7 @@ function _ts_generator$2(thisArg, body) {
15961
16441
  * initial state setup.
15962
16442
  *
15963
16443
  * @param config - optional defaults for creation type, subgroup, and processing state
16444
+ * @returns a factory function that creates StorageFile document pairs
15964
16445
  * @throws {Error} When neither accessor nor context is provided
15965
16446
  * @throws {Error} When no storage path can be resolved from the input
15966
16447
  * @throws {Error} When FOR_STORAGE_FILE_GROUP is used without parentStorageFileGroup or purpose
@@ -16058,6 +16539,9 @@ function _ts_generator$2(thisArg, body) {
16058
16539
  * Convenience function for creating a StorageFileDocumentPair.
16059
16540
  *
16060
16541
  * Calls createStorageFileDocumentPairFactory() with no arguments, then passes the input to the factory and returns the result.
16542
+ *
16543
+ * @param input - the creation input specifying the storage path, purpose, and context
16544
+ * @returns a promise resolving to the created StorageFileDocument and StorageFile data
16061
16545
  */ function createStorageFileDocumentPair(input) {
16062
16546
  return _async_to_generator$2(function() {
16063
16547
  return _ts_generator$2(this, function(_state) {
@@ -16104,6 +16588,7 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16104
16588
  *
16105
16589
  * @param storageFileGroupId - the group's document ID
16106
16590
  * @param subPath - optional sub-paths to append
16591
+ * @returns the folder path as a SlashPathFolder string
16107
16592
  *
16108
16593
  * @example
16109
16594
  * ```ts
@@ -16129,6 +16614,9 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16129
16614
  /**
16130
16615
  * Returns the full storage path for a StorageFileGroup's zip file.
16131
16616
  *
16617
+ * @param storageFileGroupId - the group's document ID
16618
+ * @returns the full SlashPath to the group's zip archive
16619
+ *
16132
16620
  * @example
16133
16621
  * ```ts
16134
16622
  * const zipPath = storageFileGroupZipFileStoragePath('abc123');
@@ -16166,6 +16654,8 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16166
16654
  * const constraints = storageFilesQueuedForProcessingQuery();
16167
16655
  * const results = await collection.query(constraints);
16168
16656
  * ```
16657
+ *
16658
+ * @returns Firestore query constraints for StorageFiles queued for processing
16169
16659
  */ function storageFilesQueuedForProcessingQuery() {
16170
16660
  return [
16171
16661
  where('ps', '==', StorageFileProcessingState.QUEUED_FOR_PROCESSING)
@@ -16177,6 +16667,7 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16177
16667
  * Used by the cleanup service to find files ready for permanent deletion.
16178
16668
  *
16179
16669
  * @param now - reference time for comparison; defaults to current time
16670
+ * @returns Firestore query constraints for StorageFiles whose scheduled delete date has passed
16180
16671
  *
16181
16672
  * @example
16182
16673
  * ```ts
@@ -16192,6 +16683,10 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16192
16683
  * with optional subgroup filtering.
16193
16684
  *
16194
16685
  * @example
16686
+ * @param input - the user, purpose, and optional subgroup to filter by
16687
+ * @returns Firestore query constraints for the given purpose and user
16688
+ *
16689
+ * @example
16195
16690
  * ```ts
16196
16691
  * const constraints = storageFilePurposeAndUserQuery({
16197
16692
  * user: 'user123',
@@ -16214,6 +16709,9 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16214
16709
  * Used by the sync service to find files whose group memberships need to be propagated.
16215
16710
  *
16216
16711
  * @example
16712
+ * @returns Firestore query constraints for StorageFiles flagged for group synchronization
16713
+ *
16714
+ * @example
16217
16715
  * ```ts
16218
16716
  * const constraints = storageFileFlaggedForSyncWithGroupsQuery();
16219
16717
  * ```
@@ -16229,6 +16727,9 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16229
16727
  * Used by the initialization service to find newly-created groups that haven't been synced yet.
16230
16728
  *
16231
16729
  * @example
16730
+ * @returns Firestore query constraints for StorageFileGroups needing initialization
16731
+ *
16732
+ * @example
16232
16733
  * ```ts
16233
16734
  * const constraints = storageFileGroupsFlaggedForNeedsInitializationQuery();
16234
16735
  * ```
@@ -16241,6 +16742,9 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16241
16742
  * Returns query constraints for StorageFileGroups flagged for content regeneration (`re == true`).
16242
16743
  *
16243
16744
  * @example
16745
+ * @returns Firestore query constraints for StorageFileGroups flagged for content regeneration
16746
+ *
16747
+ * @example
16244
16748
  * ```ts
16245
16749
  * const constraints = storageFileGroupsFlaggedForContentRegenerationQuery();
16246
16750
  * ```
@@ -16255,6 +16759,9 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16255
16759
  * Invalid groups are typically cleaned up (deleted along with their associated files).
16256
16760
  *
16257
16761
  * @example
16762
+ * @returns Firestore query constraints for StorageFileGroups flagged as invalid
16763
+ *
16764
+ * @example
16258
16765
  * ```ts
16259
16766
  * const constraints = storageFileGroupsFlaggedInvalidQuery();
16260
16767
  * ```
@@ -16277,6 +16784,7 @@ function _unsupported_iterable_to_array$1(o, minLen) {
16277
16784
  * The created task is unique per StorageFile (only one processing task at a time).
16278
16785
  *
16279
16786
  * @param input - the target StorageFileDocument and optional subtask data
16787
+ * @returns a CreateNotificationTaskTemplate for the StorageFile processing task
16280
16788
  *
16281
16789
  * @example
16282
16790
  * ```ts
@@ -16521,6 +17029,7 @@ function _ts_generator$1(thisArg, body) {
16521
17029
  * Use this within a permission service to define role-based access for StorageFile operations.
16522
17030
  *
16523
17031
  * @param config - the permission output, auth context, and target document
17032
+ * @returns a function that accepts role configuration and returns a GrantRolesOtherwiseFunction
16524
17033
  *
16525
17034
  * @example
16526
17035
  * ```ts
@@ -16531,7 +17040,7 @@ function _ts_generator$1(thisArg, body) {
16531
17040
  * });
16532
17041
  * ```
16533
17042
  */ function grantStorageFileRolesForUserAuthFunction(config) {
16534
- var output = config.output, context = config.context; config.model;
17043
+ var output = config.output, context = config.context;
16535
17044
  return function(input) {
16536
17045
  var rolesForStorageFileUser = input.rolesForStorageFileUser, rolesForStorageFileOwnershipKey = input.rolesForStorageFileOwnershipKey;
16537
17046
  var result = function result() {
@@ -16610,6 +17119,8 @@ function _object_spread$1(target) {
16610
17119
  *
16611
17120
  * Should only be used server-side, as `copy` may not be available on the client.
16612
17121
  *
17122
+ * @returns a factory function that wraps FirebaseStorageAccessorFile instances into StoredFileReader accessors
17123
+ *
16613
17124
  * @example
16614
17125
  * ```ts
16615
17126
  * const factory = storedFileReaderFactory();
@@ -16637,7 +17148,8 @@ function _object_spread$1(target) {
16637
17148
  loadFileStream: file.getStream,
16638
17149
  loadFileMetadata: loadFileMetadata,
16639
17150
  loadCustomMetadata: loadCustomMetadata,
16640
- copy: file.copy // copy is always available on the server-side
17151
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- copy is always available on the server-side
17152
+ copy: file.copy
16641
17153
  };
16642
17154
  return accessor;
16643
17155
  };
@@ -16663,6 +17175,7 @@ function _object_spread$1(target) {
16663
17175
  * Creates a {@link UserUploadsFolderSlashPathFactory} that generates per-user upload folder paths.
16664
17176
  *
16665
17177
  * @param inputBasePath - optional custom base path; defaults to {@link ALL_USER_UPLOADS_FOLDER_PATH}
17178
+ * @returns a factory function that generates per-user upload folder slash paths
16666
17179
  *
16667
17180
  * @example
16668
17181
  * ```ts
@@ -16679,6 +17192,11 @@ function _object_spread$1(target) {
16679
17192
  /**
16680
17193
  * Creates a {@link UserUploadsFolderStoragePathFactory} that includes the storage bucket ID.
16681
17194
  *
17195
+ * @param root0 - the configuration object
17196
+ * @param root0.bucketId - the storage bucket ID to include in each generated path
17197
+ * @param root0.basePath - optional custom base path; defaults to {@link ALL_USER_UPLOADS_FOLDER_PATH}
17198
+ * @returns a factory function that generates per-user StoragePath values including the bucket ID
17199
+ *
16682
17200
  * @example
16683
17201
  * ```ts
16684
17202
  * const factory = userUploadsFolderStoragePathFactory({ bucketId: 'my-bucket' });
@@ -16913,6 +17431,7 @@ function _ts_generator(thisArg, body) {
16913
17431
  * (e.g., `image` matches `image.png`, `image-test.jpg`) at {@link HIGH_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL}.
16914
17432
  *
16915
17433
  * @param config - file type, match string, and optional determination levels
17434
+ * @returns an UploadedFileTypeDeterminer that classifies by file name
16916
17435
  *
16917
17436
  * @example
16918
17437
  * ```ts
@@ -16962,6 +17481,7 @@ function _ts_generator(thisArg, body) {
16962
17481
  * exactly equals the configured match string.
16963
17482
  *
16964
17483
  * @param config - file type and folder name to match
17484
+ * @returns an UploadedFileTypeDeterminer that classifies by folder name
16965
17485
  *
16966
17486
  * @example
16967
17487
  * ```ts
@@ -17001,6 +17521,7 @@ function _ts_generator(thisArg, body) {
17001
17521
  * built-in determiners.
17002
17522
  *
17003
17523
  * @param config - file type, path match config, optional bucket/file filters
17524
+ * @returns an UploadedFileTypeDeterminer that classifies by storage path
17004
17525
  *
17005
17526
  * @example
17006
17527
  * ```ts
@@ -17047,6 +17568,7 @@ function _ts_generator(thisArg, body) {
17047
17568
  * If `requireUser` is true, the determination fails when no user can be detected.
17048
17569
  *
17049
17570
  * @param config - root folder, user prefix, and matching options
17571
+ * @returns a wrapper function that adds user detection to any UploadedFileTypeDeterminer
17050
17572
  *
17051
17573
  * @example
17052
17574
  * ```ts
@@ -17058,8 +17580,7 @@ function _ts_generator(thisArg, body) {
17058
17580
  * ```
17059
17581
  */ function determineUserByFolderWrapperFunction(config) {
17060
17582
  var _config_matchSubPath;
17061
- 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;
17062
- var allowSubPaths = inputAllowSubPaths !== null && inputAllowSubPaths !== void 0 ? inputAllowSubPaths : true;
17583
+ 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;
17063
17584
  var subPathMatcherConfig = (_config_matchSubPath = config.matchSubPath) !== null && _config_matchSubPath !== void 0 ? _config_matchSubPath : {
17064
17585
  basePath: mergeSlashPaths([
17065
17586
  rootFolder,
@@ -17121,6 +17642,9 @@ function _ts_generator(thisArg, body) {
17121
17642
  /**
17122
17643
  * Convenience wrapper pre-configured for the standard uploads folder structure (`uploads/u/{userId}/...`).
17123
17644
  *
17645
+ * @param config - optional matching options (rootFolder and userFolderPrefix are pre-configured)
17646
+ * @returns a wrapper function that adds user detection for the standard uploads folder structure
17647
+ *
17124
17648
  * @example
17125
17649
  * ```ts
17126
17650
  * const addUser = determineUserByUserUploadsFolderWrapperFunction();
@@ -17147,6 +17671,7 @@ function _ts_generator(thisArg, body) {
17147
17671
  *
17148
17672
  * @param determiner - the determiner to filter
17149
17673
  * @param types - allowed file type identifier(s)
17674
+ * @returns an UploadedFileTypeDeterminer that only returns results for the specified file types
17150
17675
  *
17151
17676
  * @example
17152
17677
  * ```ts
@@ -17190,6 +17715,7 @@ function _ts_generator(thisArg, body) {
17190
17715
  * short-circuited via `completeSearchOnFirstMatch` or `completeSearchAtLevel`.
17191
17716
  *
17192
17717
  * @param config - determiners to combine and optional early-exit settings
17718
+ * @returns a combined UploadedFileTypeDeterminer that returns the highest-confidence match
17193
17719
  *
17194
17720
  * @example
17195
17721
  * ```ts
@@ -17204,9 +17730,9 @@ function _ts_generator(thisArg, body) {
17204
17730
  if (determiners.length === 1) {
17205
17731
  result = determiners[0];
17206
17732
  } else {
17207
- var possibleFileTypes = unique(determiners.map(function(d) {
17733
+ var possibleFileTypes = unique(determiners.flatMap(function(d) {
17208
17734
  return d.getPossibleFileTypes();
17209
- }).flat());
17735
+ }));
17210
17736
  var completeSearchOnFirstMatch = Boolean(inputCompleteSearchOnFirstMatch);
17211
17737
  var completeSearchAtLevel = completeSearchOnFirstMatch ? LOW_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL : inputCompleteSearchAtLevel !== null && inputCompleteSearchAtLevel !== void 0 ? inputCompleteSearchAtLevel : EXACT_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL;
17212
17738
  result = {
@@ -17306,6 +17832,9 @@ function _ts_generator(thisArg, body) {
17306
17832
  * If a document is provided directly, it is returned as-is. Otherwise, the related model key
17307
17833
  * is converted to a group ID via {@link storageFileGroupIdForModel} and loaded from the accessor.
17308
17834
  *
17835
+ * @param input - reference pair containing either a document or a related model key
17836
+ * @param accessor - document accessor used to load the group document by ID
17837
+ * @returns the resolved StorageFileGroupDocument
17309
17838
  * @throws {Error} When neither storageFileGroupDocument nor storageFileGroupRelatedModelKey is provided
17310
17839
  *
17311
17840
  * @example
@@ -17369,7 +17898,7 @@ function _ts_generator(thisArg, body) {
17369
17898
  ]);
17370
17899
  }
17371
17900
  });
17372
- var re = currentRe || oneOrMoreItemsWereRemoved; // flag removed if any items were removed
17901
+ var re = currentRe !== null && currentRe !== void 0 ? currentRe : oneOrMoreItemsWereRemoved; // flag removed if any items were removed
17373
17902
  // recalculate re if it is false or the retain flag is false
17374
17903
  if (!re || allowRecalculateRegenerateFlag) {
17375
17904
  var flagRegenerate = calculateStorageFileGroupRegeneration({
@@ -17395,6 +17924,7 @@ function _ts_generator(thisArg, body) {
17395
17924
  * - Any embedded file has never been included in the zip (`zat` is unset on the entry)
17396
17925
  *
17397
17926
  * @param input - group state and optional force flag
17927
+ * @returns the regeneration result indicating whether the zip or other derived files need to be regenerated
17398
17928
  *
17399
17929
  * @example
17400
17930
  * ```ts
@@ -17562,6 +18092,9 @@ function _is_native_reflect_construct() {
17562
18092
  * ```ts
17563
18093
  * const colRef = systemStateCollectionReference(firestoreContext);
17564
18094
  * ```
18095
+ *
18096
+ * @param context - the Firestore context to use
18097
+ * @returns the CollectionReference for SystemState documents
17565
18098
  */ function systemStateCollectionReference(context) {
17566
18099
  return context.collection(systemStateIdentity.collectionName);
17567
18100
  }
@@ -17574,6 +18107,7 @@ function _is_native_reflect_construct() {
17574
18107
  *
17575
18108
  * @param firestoreContext - the Firestore context
17576
18109
  * @param converters - map of type identifiers to their data field converters
18110
+ * @returns a configured SystemStateFirestoreCollection with per-type data converters
17577
18111
  *
17578
18112
  * @example
17579
18113
  * ```ts
@@ -17607,4 +18141,4 @@ function _is_native_reflect_construct() {
17607
18141
  });
17608
18142
  }
17609
18143
 
17610
- 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 };
18144
+ 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_CREDENTIAL_ALREADY_IN_USE_ERROR, FIREBASE_AUTH_EMAIL_ALREADY_EXISTS_ERROR, FIREBASE_AUTH_EMAIL_ALREADY_IN_USE_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_PROVIDER_ALREADY_LINKED_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 };