@dereekb/firebase 13.11.14 → 13.11.16

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 (129) hide show
  1. package/eslint/index.cjs.default.js +1 -0
  2. package/eslint/index.cjs.js +2290 -0
  3. package/eslint/index.cjs.mjs +2 -0
  4. package/eslint/index.d.ts +1 -0
  5. package/eslint/index.esm.js +2277 -0
  6. package/eslint/package.json +24 -0
  7. package/eslint/src/index.d.ts +1 -0
  8. package/eslint/src/lib/comments.d.ts +112 -0
  9. package/eslint/src/lib/dbx-tag-families.d.ts +280 -0
  10. package/eslint/src/lib/index.d.ts +6 -0
  11. package/eslint/src/lib/jsdoc-parser.d.ts +116 -0
  12. package/eslint/src/lib/plugin.d.ts +28 -0
  13. package/eslint/src/lib/require-dbx-model-firebase-index-companion-tags.rule.d.ts +47 -0
  14. package/eslint/src/lib/require-dbx-model-firebase-index-query-suffix.rule.d.ts +44 -0
  15. package/eslint/src/lib/require-dbx-model-firebase-index-valid-dispatcher.rule.d.ts +54 -0
  16. package/eslint/src/lib/require-tagged-firestore-constraints.rule.d.ts +46 -0
  17. package/eslint/src/lib/util.d.ts +107 -0
  18. package/index.cjs.js +1446 -1137
  19. package/index.esm.js +1437 -1128
  20. package/package.json +11 -5
  21. package/src/lib/client/error/error.d.ts +1 -1
  22. package/src/lib/client/firestore/array.d.ts +3 -2
  23. package/src/lib/client/firestore/driver.accessor.batch.d.ts +5 -4
  24. package/src/lib/client/firestore/driver.accessor.create.d.ts +4 -3
  25. package/src/lib/client/firestore/driver.accessor.d.ts +2 -1
  26. package/src/lib/client/firestore/driver.accessor.default.d.ts +5 -3
  27. package/src/lib/client/firestore/driver.accessor.transaction.d.ts +7 -5
  28. package/src/lib/client/firestore/driver.d.ts +1 -1
  29. package/src/lib/client/firestore/driver.query.d.ts +5 -5
  30. package/src/lib/client/firestore/increment.d.ts +3 -2
  31. package/src/lib/client/function/development.function.factory.d.ts +3 -2
  32. package/src/lib/client/function/error.d.ts +2 -2
  33. package/src/lib/client/function/function.callable.d.ts +5 -5
  34. package/src/lib/client/function/function.factory.d.ts +6 -4
  35. package/src/lib/client/function/model.function.factory.d.ts +9 -8
  36. package/src/lib/client/storage/driver.accessor.d.ts +14 -14
  37. package/src/lib/client/storage/driver.d.ts +1 -1
  38. package/src/lib/common/auth/auth.error.d.ts +2 -2
  39. package/src/lib/common/development/function.d.ts +5 -5
  40. package/src/lib/common/firestore/accessor/accessor.d.ts +22 -16
  41. package/src/lib/common/firestore/accessor/accessor.wrap.d.ts +33 -29
  42. package/src/lib/common/firestore/accessor/accessor.wrap.modify.d.ts +11 -7
  43. package/src/lib/common/firestore/accessor/array.d.ts +3 -2
  44. package/src/lib/common/firestore/accessor/document.d.ts +27 -24
  45. package/src/lib/common/firestore/accessor/document.paged.d.ts +2 -2
  46. package/src/lib/common/firestore/accessor/document.rxjs.d.ts +15 -12
  47. package/src/lib/common/firestore/accessor/document.utility.d.ts +81 -72
  48. package/src/lib/common/firestore/accessor/increment.d.ts +3 -2
  49. package/src/lib/common/firestore/cache/cache.d.ts +8 -7
  50. package/src/lib/common/firestore/cache/cache.memory.d.ts +13 -10
  51. package/src/lib/common/firestore/collection/collection.d.ts +62 -42
  52. package/src/lib/common/firestore/collection/collection.group.d.ts +4 -2
  53. package/src/lib/common/firestore/collection/collection.query.d.ts +7 -4
  54. package/src/lib/common/firestore/collection/collection.single.d.ts +4 -2
  55. package/src/lib/common/firestore/collection/collection.util.d.ts +3 -2
  56. package/src/lib/common/firestore/collection/subcollection.d.ts +4 -2
  57. package/src/lib/common/firestore/collection/subcollection.paged.d.ts +7 -3
  58. package/src/lib/common/firestore/collection/subcollection.single.d.ts +4 -2
  59. package/src/lib/common/firestore/context.d.ts +4 -2
  60. package/src/lib/common/firestore/driver/query.handler.d.ts +4 -3
  61. package/src/lib/common/firestore/error.d.ts +6 -5
  62. package/src/lib/common/firestore/query/constraint.d.ts +56 -36
  63. package/src/lib/common/firestore/query/constraint.template.d.ts +15 -7
  64. package/src/lib/common/firestore/query/iterator.d.ts +20 -13
  65. package/src/lib/common/firestore/query/query.d.ts +6 -4
  66. package/src/lib/common/firestore/query/query.iterate.array.d.ts +10 -6
  67. package/src/lib/common/firestore/query/query.iterate.d.ts +8 -8
  68. package/src/lib/common/firestore/query/query.util.d.ts +11 -7
  69. package/src/lib/common/firestore/query/watcher.d.ts +9 -7
  70. package/src/lib/common/firestore/snapshot/snapshot.d.ts +6 -3
  71. package/src/lib/common/firestore/snapshot/snapshot.field.d.ts +230 -132
  72. package/src/lib/common/firestore/util/id.batch.d.ts +4 -2
  73. package/src/lib/common/model/function.d.ts +21 -20
  74. package/src/lib/common/model/model/model.loader.d.ts +2 -2
  75. package/src/lib/common/model/model.service.d.ts +28 -20
  76. package/src/lib/common/model/permission/permission.service.d.ts +3 -2
  77. package/src/lib/common/model/permission/permission.service.grant.d.ts +27 -21
  78. package/src/lib/common/model/permission/permission.service.role.d.ts +7 -7
  79. package/src/lib/common/storage/accessor/path.model.d.ts +3 -2
  80. package/src/lib/common/storage/context.d.ts +3 -2
  81. package/src/lib/common/storage/driver/accessor.iterate.d.ts +7 -6
  82. package/src/lib/common/storage/driver/accessor.util.d.ts +4 -4
  83. package/src/lib/common/storage/driver/error.d.ts +3 -3
  84. package/src/lib/common/storage/driver/list.d.ts +4 -3
  85. package/src/lib/common/storage/storage.d.ts +9 -8
  86. package/src/lib/common/storage/types.d.ts +1 -1
  87. package/src/lib/model/notification/notification.api.d.ts +2 -2
  88. package/src/lib/model/notification/notification.api.util.d.ts +16 -16
  89. package/src/lib/model/notification/notification.config.d.ts +35 -34
  90. package/src/lib/model/notification/notification.create.d.ts +17 -15
  91. package/src/lib/model/notification/notification.create.loggedevent.d.ts +3 -2
  92. package/src/lib/model/notification/notification.create.task.d.ts +3 -2
  93. package/src/lib/model/notification/notification.d.ts +53 -45
  94. package/src/lib/model/notification/notification.details.d.ts +5 -4
  95. package/src/lib/model/notification/notification.id.d.ts +8 -8
  96. package/src/lib/model/notification/notification.item.d.ts +3 -3
  97. package/src/lib/model/notification/notification.loggedevent.loader.d.ts +2 -2
  98. package/src/lib/model/notification/notification.message.d.ts +6 -4
  99. package/src/lib/model/notification/notification.query.d.ts +12 -12
  100. package/src/lib/model/notification/notification.send.d.ts +3 -3
  101. package/src/lib/model/notification/notification.task.d.ts +15 -15
  102. package/src/lib/model/notification/notification.task.subtask.d.ts +3 -3
  103. package/src/lib/model/notification/notification.util.d.ts +29 -29
  104. package/src/lib/model/oidcmodel/oidcmodel.api.d.ts +2 -2
  105. package/src/lib/model/oidcmodel/oidcmodel.d.ts +6 -6
  106. package/src/lib/model/oidcmodel/oidcmodel.query.d.ts +18 -18
  107. package/src/lib/model/storagefile/storagefile.api.d.ts +2 -2
  108. package/src/lib/model/storagefile/storagefile.create.d.ts +8 -7
  109. package/src/lib/model/storagefile/storagefile.d.ts +19 -18
  110. package/src/lib/model/storagefile/storagefile.file.d.ts +2 -1
  111. package/src/lib/model/storagefile/storagefile.group.d.ts +5 -5
  112. package/src/lib/model/storagefile/storagefile.permission.d.ts +3 -2
  113. package/src/lib/model/storagefile/storagefile.query.d.ts +15 -15
  114. package/src/lib/model/storagefile/storagefile.task.d.ts +2 -2
  115. package/src/lib/model/storagefile/storagefile.upload.claims.d.ts +4 -4
  116. package/src/lib/model/storagefile/storagefile.upload.d.ts +8 -6
  117. package/src/lib/model/storagefile/storagefile.upload.determiner.d.ts +18 -16
  118. package/src/lib/model/storagefile/storagefile.util.d.ts +8 -8
  119. package/src/lib/model/system/system.d.ts +6 -6
  120. package/test/index.cjs.js +43 -43
  121. package/test/index.esm.js +38 -38
  122. package/test/package.json +6 -6
  123. package/test/src/lib/client/firebase.d.ts +1 -1
  124. package/test/src/lib/common/firestore/firestore.d.ts +3 -3
  125. package/test/src/lib/common/mock/mock.item.collection.fixture.d.ts +3 -3
  126. package/test/src/lib/common/mock/mock.item.d.ts +16 -16
  127. package/test/src/lib/common/mock/mock.item.query.d.ts +4 -4
  128. package/test/src/lib/common/mock/mock.item.storage.fixture.d.ts +3 -3
  129. package/test/src/lib/common/storage/storage.d.ts +1 -1
package/test/index.cjs.js CHANGED
@@ -253,14 +253,14 @@ function _ts_generator$6(thisArg, body) {
253
253
  * each other's documents. The mapping from original to fuzzed names is retrievable via
254
254
  * {@link TestingFirestoreAccessorDriver.getFuzzedCollectionsNameMap}.
255
255
  *
256
+ * @param driver - The base driver to wrap with fuzzing behavior.
257
+ * @returns A {@link TestingFirestoreAccessorDriver} with `collection`, `subcollection`, and `collectionGroup` rewired to use fuzzed paths, plus helpers to inspect the fuzz map.
258
+ *
256
259
  * @example
257
260
  * ```ts
258
261
  * const testDriver = makeTestingFirestoreAccesorDriver(productionDriver);
259
262
  * // "mockItems" -> "1678901234_42_mockItems_1"
260
263
  * ```
261
- *
262
- * @param driver - The base driver to wrap with fuzzing behavior.
263
- * @returns A {@link TestingFirestoreAccessorDriver} with `collection`, `subcollection`, and `collectionGroup` rewired to use fuzzed paths, plus helpers to inspect the fuzz map.
264
264
  */ function makeTestingFirestoreAccesorDriver(driver) {
265
265
  var fuzzerKey = 0;
266
266
  var time = new Date().getTime();
@@ -959,7 +959,7 @@ function _ts_generator$5(thisArg, body) {
959
959
  * can momentarily leave the emulator in a transitional state that causes `storage/unauthorized` errors.
960
960
  *
961
961
  * @param inputConfig - Optional partial config; `testEnvironment` defaults to an empty object and `rulesContext` defaults to undefined (unauthenticated).
962
- * @returns A function that, given a `buildTests` callback, registers Vitest hooks (`beforeAll`/`afterAll`/`beforeEach`/`afterEach`) and invokes the callback with a {@link RulesUnitTestFirebaseTestingContextFixture}.
962
+ * @returns Function that, given a `buildTests` callback, registers Vitest hooks (`beforeAll`/`afterAll`/`beforeEach`/`afterEach`) and invokes the callback with a {@link RulesUnitTestFirebaseTestingContextFixture}.
963
963
  */ var firebaseRulesUnitTestBuilder = function firebaseRulesUnitTestBuilder(inputConfig) {
964
964
  var _ref;
965
965
  var config = {
@@ -1279,14 +1279,14 @@ function _is_native_reflect_construct$4() {
1279
1279
  /**
1280
1280
  * Creates a {@link MockItemFirestoreCollection} bound to the given {@link FirestoreContext}.
1281
1281
  *
1282
+ * @param firestoreContext - The Firestore context (test or production) used to resolve the underlying collection reference.
1283
+ * @returns A {@link MockItemFirestoreCollection} wired with the {@link mockItemConverter} and {@link mockItemIdentity}.
1284
+ *
1282
1285
  * @example
1283
1286
  * ```ts
1284
1287
  * const collection = mockItemFirestoreCollection(firestoreContext);
1285
1288
  * const doc = collection.documentAccessor().newDocument();
1286
1289
  * ```
1287
- *
1288
- * @param firestoreContext - The Firestore context (test or production) used to resolve the underlying collection reference.
1289
- * @returns A {@link MockItemFirestoreCollection} wired with the {@link mockItemConverter} and {@link mockItemIdentity}.
1290
1290
  */ function mockItemFirestoreCollection(firestoreContext) {
1291
1291
  return firestoreContext.firestoreCollection({
1292
1292
  converter: mockItemConverter,
@@ -1395,7 +1395,7 @@ function _is_native_reflect_construct$4() {
1395
1395
  * subcollections under a given {@link MockItemDocument} parent.
1396
1396
  *
1397
1397
  * @param context - The Firestore context used to resolve subcollections.
1398
- * @returns A function that, given a parent {@link MockItemDocument}, returns a typed {@link CollectionReference} for that parent's MockItemPrivate subcollection.
1398
+ * @returns Function that, given a parent {@link MockItemDocument}, returns a typed {@link CollectionReference} for that parent's MockItemPrivate subcollection.
1399
1399
  */ function mockItemPrivateCollectionReferenceFactory(context) {
1400
1400
  return function(parent) {
1401
1401
  return context.subcollection(parent.documentRef, mockItemPrivateIdentity.collectionName);
@@ -1472,11 +1472,11 @@ function _is_native_reflect_construct$4() {
1472
1472
  /**
1473
1473
  * Firestore collection path name.
1474
1474
  */ // eslint-disable-next-line @typescript-eslint/naming-convention -- camelCase chosen to match neighboring mock exports in this test fixture
1475
- var mockItemUserCollectionName = 'mockItemUser';
1475
+ var MOCK_ITEM_USER_COLLECTION_NAME = 'mockItemUser';
1476
1476
  /**
1477
1477
  * Default document identifier used for MockItemUser in tests.
1478
1478
  */ // eslint-disable-next-line @typescript-eslint/naming-convention -- camelCase chosen to match neighboring mock exports in this test fixture
1479
- var mockItemUserIdentifier = '0';
1479
+ var MOCK_ITEM_USER_IDENTIFIER = '0';
1480
1480
  /**
1481
1481
  * Used to build a FirestoreDataConverter. Fields are configured via configuration. See the SnapshotConverterFunctions for more info.
1482
1482
  */ var mockItemUserConverter = firebase.snapshotConverterFunctions({
@@ -1490,10 +1490,10 @@ var mockItemUserIdentifier = '0';
1490
1490
  * subcollections under a given {@link MockItemDocument} parent.
1491
1491
  *
1492
1492
  * @param context - The Firestore context used to resolve subcollections.
1493
- * @returns A function that, given a parent {@link MockItemDocument}, returns a typed {@link CollectionReference} for that parent's MockItemUser subcollection.
1493
+ * @returns Function that, given a parent {@link MockItemDocument}, returns a typed {@link CollectionReference} for that parent's MockItemUser subcollection.
1494
1494
  */ function mockItemUserCollectionReferenceFactory(context) {
1495
1495
  return function(parent) {
1496
- return context.subcollection(parent.documentRef, mockItemUserCollectionName);
1496
+ return context.subcollection(parent.documentRef, MOCK_ITEM_USER_COLLECTION_NAME);
1497
1497
  };
1498
1498
  }
1499
1499
  /**
@@ -1526,7 +1526,7 @@ var mockItemUserIdentifier = '0';
1526
1526
  * @param context - The Firestore context used to resolve the collection group.
1527
1527
  * @returns A typed {@link CollectionGroup} reference for the MockItemUser collection name.
1528
1528
  */ function mockItemUserCollectionReference(context) {
1529
- return context.collectionGroup(mockItemUserCollectionName);
1529
+ return context.collectionGroup(MOCK_ITEM_USER_COLLECTION_NAME);
1530
1530
  }
1531
1531
  /**
1532
1532
  * Creates a {@link MockItemUserFirestoreCollectionGroup} for cross-parent queries on {@link MockItemUser}.
@@ -1584,7 +1584,7 @@ var mockItemUserIdentifier = '0';
1584
1584
  * subcollections under a given {@link MockItemDocument} parent.
1585
1585
  *
1586
1586
  * @param context - The Firestore context used to resolve subcollections.
1587
- * @returns A function that, given a parent {@link MockItemDocument}, returns a typed {@link CollectionReference} for that parent's MockItemSubItem subcollection.
1587
+ * @returns Function that, given a parent {@link MockItemDocument}, returns a typed {@link CollectionReference} for that parent's MockItemSubItem subcollection.
1588
1588
  */ function mockItemSubItemCollectionReferenceFactory(context) {
1589
1589
  return function(parent) {
1590
1590
  return context.subcollection(parent.documentRef, mockItemSubItemIdentity.collectionName);
@@ -1673,7 +1673,7 @@ var mockItemUserIdentifier = '0';
1673
1673
  * subcollections under a given {@link MockItemSubItemDocument} parent.
1674
1674
  *
1675
1675
  * @param context - The Firestore context used to resolve subcollections.
1676
- * @returns A function that, given a parent {@link MockItemSubItemDocument}, returns a typed {@link CollectionReference} for that parent's MockItemSubItemDeep subcollection.
1676
+ * @returns Function that, given a parent {@link MockItemSubItemDocument}, returns a typed {@link CollectionReference} for that parent's MockItemSubItemDeep subcollection.
1677
1677
  */ function mockItemSubItemDeepCollectionReferenceFactory(context) {
1678
1678
  return function(parent) {
1679
1679
  return context.subcollection(parent.documentRef, mockItemSubItemDeepIdentity.collectionName);
@@ -1756,7 +1756,7 @@ var mockItemUserIdentifier = '0';
1756
1756
  *
1757
1757
  * The mock entry shape is already Firestore-safe, so the converter is an identity
1758
1758
  * pass-through. Production usage may wrap a real converter (e.g. for date fields).
1759
- */ var mockItemPagedEntryConverter = {
1759
+ */ var MOCK_ITEM_PAGED_ENTRY_CONVERTER = {
1760
1760
  fromData: function fromData(data) {
1761
1761
  return data;
1762
1762
  },
@@ -1767,7 +1767,7 @@ var mockItemUserIdentifier = '0';
1767
1767
  /**
1768
1768
  * Static distribution scheme for {@link MockItemPagedEntry} that buckets items by their
1769
1769
  * {@link MockItemPagedEntry.group} field across three page IDs (`a`, `b`, `c`).
1770
- */ var mockItemPagedAlphaDistributionScheme = {
1770
+ */ var MOCK_ITEM_PAGED_ALPHA_DISTRIBUTION_SCHEME = {
1771
1771
  pageIds: [
1772
1772
  'a',
1773
1773
  'b',
@@ -1780,7 +1780,7 @@ var mockItemUserIdentifier = '0';
1780
1780
  /**
1781
1781
  * Default `maxItemsPerPage` used by the dynamic mock paged collection factory. Kept small to
1782
1782
  * exercise multi-page boundary conditions in tests without writing many entries.
1783
- */ var MOCK_ITEM_PAGED_DEFAULT_MAX_ITEMS_PER_PAGE = 3;
1783
+ */ var DEFAULT_MOCK_ITEM_PAGED_MAX_ITEMS_PER_PAGE = 3;
1784
1784
  /**
1785
1785
  * Creates a factory for producing {@link MockItemPagedFirestoreCollection} instances bound to a
1786
1786
  * parent {@link MockItemDocument}.
@@ -1788,9 +1788,9 @@ var mockItemUserIdentifier = '0';
1788
1788
  * @param firestoreContext - The Firestore context used to resolve the underlying subcollection.
1789
1789
  * @param config - Optional config selecting between dynamic (default) and static distribution.
1790
1790
  * @returns A factory that, given a parent {@link MockItemDocument}, returns a paged subcollection
1791
- * wired with {@link mockItemPagedEntryConverter}.
1791
+ * wired with {@link MOCK_ITEM_PAGED_ENTRY_CONVERTER}.
1792
1792
  */ function mockItemPagedFirestoreCollection(firestoreContext, config) {
1793
- var _ref = config !== null && config !== void 0 ? config : {}, distributionScheme = _ref.distributionScheme, _ref_maxItemsPerPage = _ref.maxItemsPerPage, maxItemsPerPage = _ref_maxItemsPerPage === void 0 ? MOCK_ITEM_PAGED_DEFAULT_MAX_ITEMS_PER_PAGE : _ref_maxItemsPerPage;
1793
+ var _ref = config !== null && config !== void 0 ? config : {}, distributionScheme = _ref.distributionScheme, _ref_maxItemsPerPage = _ref.maxItemsPerPage, maxItemsPerPage = _ref_maxItemsPerPage === void 0 ? DEFAULT_MOCK_ITEM_PAGED_MAX_ITEMS_PER_PAGE : _ref_maxItemsPerPage;
1794
1794
  return function(parent) {
1795
1795
  return firestoreContext.pagedItemFirestoreCollection({
1796
1796
  modelIdentity: mockItemPagedIdentity,
@@ -1802,7 +1802,7 @@ var mockItemUserIdentifier = '0';
1802
1802
  firestoreContext: firestoreContext,
1803
1803
  maxItemsPerPage: maxItemsPerPage,
1804
1804
  distributionScheme: distributionScheme,
1805
- itemConverter: mockItemPagedEntryConverter
1805
+ itemConverter: MOCK_ITEM_PAGED_ENTRY_CONVERTER
1806
1806
  });
1807
1807
  };
1808
1808
  }
@@ -1840,7 +1840,7 @@ var mockItemUserIdentifier = '0';
1840
1840
  /**
1841
1841
  * System state type identifier for mock system state data.
1842
1842
  *
1843
- * Used as the key in {@link mockItemSystemStateStoredDataConverterMap}.
1843
+ * Used as the key in {@link MOCK_ITEM_SYSTEM_STATE_STORED_DATA_CONVERTER_MAP}.
1844
1844
  */ var MOCK_SYSTEM_STATE_TYPE = 'mockitemsystemstate';
1845
1845
  /**
1846
1846
  * Field converter config for {@link MockSystemData}, handling the `lat` date field conversion.
@@ -1858,7 +1858,7 @@ var mockItemUserIdentifier = '0';
1858
1858
  *
1859
1859
  * Used when creating the mock system state Firestore collection to register
1860
1860
  * the {@link MockSystemData} converter under the {@link MOCK_SYSTEM_STATE_TYPE} key.
1861
- */ var mockItemSystemStateStoredDataConverterMap = _define_property$5({}, MOCK_SYSTEM_STATE_TYPE, mockItemSystemDataConverter);
1861
+ */ var MOCK_ITEM_SYSTEM_STATE_STORED_DATA_CONVERTER_MAP = _define_property$5({}, MOCK_SYSTEM_STATE_TYPE, mockItemSystemDataConverter);
1862
1862
 
1863
1863
  function _class_call_check$4(instance, Constructor) {
1864
1864
  if (!(instance instanceof Constructor)) {
@@ -1895,13 +1895,13 @@ function _class_call_check$4(instance, Constructor) {
1895
1895
  mockItemSubItemDeepCollectionGroup: mockItemSubItemDeepFirestoreCollectionGroup(firestoreContext),
1896
1896
  mockItemPagedCollectionFactory: mockItemPagedFirestoreCollection(firestoreContext),
1897
1897
  mockItemPagedStaticCollectionFactory: mockItemPagedFirestoreCollection(firestoreContext, {
1898
- distributionScheme: mockItemPagedAlphaDistributionScheme
1898
+ distributionScheme: MOCK_ITEM_PAGED_ALPHA_DISTRIBUTION_SCHEME
1899
1899
  }),
1900
1900
  mockItemPagedCollectionFactoryWithConfig: function mockItemPagedCollectionFactoryWithConfig(config) {
1901
1901
  return mockItemPagedFirestoreCollection(firestoreContext, config);
1902
1902
  },
1903
1903
  mockItemPagedCollectionGroup: mockItemPagedFirestoreCollectionGroup(firestoreContext),
1904
- mockItemSystemStateCollection: firebase.systemStateFirestoreCollection(firestoreContext, mockItemSystemStateStoredDataConverterMap)
1904
+ mockItemSystemStateCollection: firebase.systemStateFirestoreCollection(firestoreContext, MOCK_ITEM_SYSTEM_STATE_STORED_DATA_CONVERTER_MAP)
1905
1905
  };
1906
1906
  }
1907
1907
  // MARK: Models
@@ -2218,6 +2218,9 @@ function _is_native_reflect_construct$3() {
2218
2218
  *
2219
2219
  * Compose with a Firebase test context factory to get a fully wired test environment:
2220
2220
  *
2221
+ * @param _config - Reserved for future setup/teardown configuration; currently unused.
2222
+ * @returns A factory builder that wraps a parent {@link TestFirestoreContextFixture} with a {@link MockItemCollectionFixture} per test.
2223
+ *
2221
2224
  * @example
2222
2225
  * ```ts
2223
2226
  * const f = testWithMockItemCollectionFixture()(authorizedFirebaseFactory);
@@ -2225,9 +2228,6 @@ function _is_native_reflect_construct$3() {
2225
2228
  * it('should work', () => { ... });
2226
2229
  * }));
2227
2230
  * ```
2228
- *
2229
- * @param _config - Reserved for future setup/teardown configuration; currently unused.
2230
- * @returns A factory builder that wraps a parent {@link TestFirestoreContextFixture} with a {@link MockItemCollectionFixture} per test.
2231
2231
  */ function testWithMockItemCollectionFixture(_config) {
2232
2232
  return test.instanceWrapTestContextFactory({
2233
2233
  wrapFixture: function wrapFixture(fixture) {
@@ -2387,6 +2387,9 @@ function _is_native_reflect_construct$2() {
2387
2387
  *
2388
2388
  * Compose with a Firebase test context factory to get a fully wired storage test environment:
2389
2389
  *
2390
+ * @param _config - Reserved for future setup/teardown configuration; currently unused.
2391
+ * @returns A factory builder that wraps a parent {@link TestFirebaseStorageContextFixture} with a {@link MockItemStorageFixture} per test.
2392
+ *
2390
2393
  * @example
2391
2394
  * ```ts
2392
2395
  * const f = testWithMockItemStorageFixture()(authorizedFirebaseFactory);
@@ -2394,9 +2397,6 @@ function _is_native_reflect_construct$2() {
2394
2397
  * it('should upload', () => { ... });
2395
2398
  * }));
2396
2399
  * ```
2397
- *
2398
- * @param _config - Reserved for future setup/teardown configuration; currently unused.
2399
- * @returns A factory builder that wraps a parent {@link TestFirebaseStorageContextFixture} with a {@link MockItemStorageFixture} per test.
2400
2400
  */ function testWithMockItemStorageFixture(_config) {
2401
2401
  return test.instanceWrapTestContextFactory({
2402
2402
  wrapFixture: function wrapFixture(fixture) {
@@ -2564,14 +2564,14 @@ function _is_native_reflect_construct$1() {
2564
2564
  /**
2565
2565
  * Creates a Firestore query constraint that filters {@link MockItem} documents by their `value` field.
2566
2566
  *
2567
+ * @param value - The exact `value` to match.
2568
+ * @returns A `where('value', '==', value)` constraint typed for {@link MockItem}.
2569
+ *
2567
2570
  * @example
2568
2571
  * ```ts
2569
2572
  * const constraint = mockItemWithValue('hello');
2570
2573
  * const results = await collection.query(constraint);
2571
2574
  * ```
2572
- *
2573
- * @param value - The exact `value` to match.
2574
- * @returns A `where('value', '==', value)` constraint typed for {@link MockItem}.
2575
2575
  */ function mockItemWithValue(value) {
2576
2576
  return firebase.where('value', '==', value);
2577
2577
  }
@@ -2598,7 +2598,7 @@ function _is_native_reflect_construct$1() {
2598
2598
  * https://medium.com/firebase-developers/how-to-query-collections-in-firestore-under-a-certain-path-6a0d686cebd2
2599
2599
  *
2600
2600
  * @param mockItem - The parent {@link MockItem} document reference whose descendant documents the constraint should bound to.
2601
- * @returns An array of constraints (suitable for use on a collection group query) that restricts results to documents under the given parent path.
2601
+ * @returns The constraints (suitable for use on a collection group query) that restricts results to documents under the given parent path.
2602
2602
  */ function allChildMockItemSubItemDeepsWithinMockItem(mockItem) {
2603
2603
  return firebase.allChildDocumentsUnderParent(mockItem);
2604
2604
  }
@@ -3885,8 +3885,8 @@ function _ts_generator$4(thisArg, body) {
3885
3885
  '1'
3886
3886
  ]);
3887
3887
  expect(index === null || index === void 0 ? void 0 : index.pc).toEqual({
3888
- '0': MOCK_ITEM_PAGED_DEFAULT_MAX_ITEMS_PER_PAGE,
3889
- '1': items.length - MOCK_ITEM_PAGED_DEFAULT_MAX_ITEMS_PER_PAGE
3888
+ '0': DEFAULT_MOCK_ITEM_PAGED_MAX_ITEMS_PER_PAGE,
3889
+ '1': items.length - DEFAULT_MOCK_ITEM_PAGED_MAX_ITEMS_PER_PAGE
3890
3890
  });
3891
3891
  expect(index === null || index === void 0 ? void 0 : index.u).toBeGreaterThan(0);
3892
3892
  return [
@@ -13691,8 +13691,13 @@ function _ts_generator(thisArg, body) {
13691
13691
 
13692
13692
  exports.AUTHORIZED_FIRESTORE_RULES = AUTHORIZED_FIRESTORE_RULES;
13693
13693
  exports.AUTHORIZED_STORAGE_RULES = AUTHORIZED_STORAGE_RULES;
13694
+ exports.DEFAULT_MOCK_ITEM_PAGED_MAX_ITEMS_PER_PAGE = DEFAULT_MOCK_ITEM_PAGED_MAX_ITEMS_PER_PAGE;
13694
13695
  exports.MOCK_FIREBASE_MODEL_SERVICE_FACTORIES = MOCK_FIREBASE_MODEL_SERVICE_FACTORIES;
13695
- exports.MOCK_ITEM_PAGED_DEFAULT_MAX_ITEMS_PER_PAGE = MOCK_ITEM_PAGED_DEFAULT_MAX_ITEMS_PER_PAGE;
13696
+ exports.MOCK_ITEM_PAGED_ALPHA_DISTRIBUTION_SCHEME = MOCK_ITEM_PAGED_ALPHA_DISTRIBUTION_SCHEME;
13697
+ exports.MOCK_ITEM_PAGED_ENTRY_CONVERTER = MOCK_ITEM_PAGED_ENTRY_CONVERTER;
13698
+ exports.MOCK_ITEM_SYSTEM_STATE_STORED_DATA_CONVERTER_MAP = MOCK_ITEM_SYSTEM_STATE_STORED_DATA_CONVERTER_MAP;
13699
+ exports.MOCK_ITEM_USER_COLLECTION_NAME = MOCK_ITEM_USER_COLLECTION_NAME;
13700
+ exports.MOCK_ITEM_USER_IDENTIFIER = MOCK_ITEM_USER_IDENTIFIER;
13696
13701
  exports.MOCK_SYSTEM_STATE_TYPE = MOCK_SYSTEM_STATE_TYPE;
13697
13702
  exports.MockItemCollectionFixture = MockItemCollectionFixture;
13698
13703
  exports.MockItemCollectionFixtureInstance = MockItemCollectionFixtureInstance;
@@ -13741,9 +13746,7 @@ exports.mockItemConverter = mockItemConverter;
13741
13746
  exports.mockItemFirebaseModelServiceFactory = mockItemFirebaseModelServiceFactory;
13742
13747
  exports.mockItemFirestoreCollection = mockItemFirestoreCollection;
13743
13748
  exports.mockItemIdentity = mockItemIdentity;
13744
- exports.mockItemPagedAlphaDistributionScheme = mockItemPagedAlphaDistributionScheme;
13745
13749
  exports.mockItemPagedCollectionReference = mockItemPagedCollectionReference;
13746
- exports.mockItemPagedEntryConverter = mockItemPagedEntryConverter;
13747
13750
  exports.mockItemPagedFirebaseModelServiceFactory = mockItemPagedFirebaseModelServiceFactory;
13748
13751
  exports.mockItemPagedFirestoreCollection = mockItemPagedFirestoreCollection;
13749
13752
  exports.mockItemPagedFirestoreCollectionGroup = mockItemPagedFirestoreCollectionGroup;
@@ -13772,16 +13775,13 @@ exports.mockItemSubItemFirestoreCollectionGroup = mockItemSubItemFirestoreCollec
13772
13775
  exports.mockItemSubItemIdentity = mockItemSubItemIdentity;
13773
13776
  exports.mockItemSystemDataConverter = mockItemSystemDataConverter;
13774
13777
  exports.mockItemSystemStateFirebaseModelServiceFactory = mockItemSystemStateFirebaseModelServiceFactory;
13775
- exports.mockItemSystemStateStoredDataConverterMap = mockItemSystemStateStoredDataConverterMap;
13776
13778
  exports.mockItemUserAccessorFactory = mockItemUserAccessorFactory;
13777
- exports.mockItemUserCollectionName = mockItemUserCollectionName;
13778
13779
  exports.mockItemUserCollectionReference = mockItemUserCollectionReference;
13779
13780
  exports.mockItemUserCollectionReferenceFactory = mockItemUserCollectionReferenceFactory;
13780
13781
  exports.mockItemUserConverter = mockItemUserConverter;
13781
13782
  exports.mockItemUserFirebaseModelServiceFactory = mockItemUserFirebaseModelServiceFactory;
13782
13783
  exports.mockItemUserFirestoreCollection = mockItemUserFirestoreCollection;
13783
13784
  exports.mockItemUserFirestoreCollectionGroup = mockItemUserFirestoreCollectionGroup;
13784
- exports.mockItemUserIdentifier = mockItemUserIdentifier;
13785
13785
  exports.mockItemUserIdentity = mockItemUserIdentity;
13786
13786
  exports.mockItemWithTestValue = mockItemWithTestValue;
13787
13787
  exports.mockItemWithValue = mockItemWithValue;
package/test/index.esm.js CHANGED
@@ -251,14 +251,14 @@ function _ts_generator$6(thisArg, body) {
251
251
  * each other's documents. The mapping from original to fuzzed names is retrievable via
252
252
  * {@link TestingFirestoreAccessorDriver.getFuzzedCollectionsNameMap}.
253
253
  *
254
+ * @param driver - The base driver to wrap with fuzzing behavior.
255
+ * @returns A {@link TestingFirestoreAccessorDriver} with `collection`, `subcollection`, and `collectionGroup` rewired to use fuzzed paths, plus helpers to inspect the fuzz map.
256
+ *
254
257
  * @example
255
258
  * ```ts
256
259
  * const testDriver = makeTestingFirestoreAccesorDriver(productionDriver);
257
260
  * // "mockItems" -> "1678901234_42_mockItems_1"
258
261
  * ```
259
- *
260
- * @param driver - The base driver to wrap with fuzzing behavior.
261
- * @returns A {@link TestingFirestoreAccessorDriver} with `collection`, `subcollection`, and `collectionGroup` rewired to use fuzzed paths, plus helpers to inspect the fuzz map.
262
262
  */ function makeTestingFirestoreAccesorDriver(driver) {
263
263
  var fuzzerKey = 0;
264
264
  var time = new Date().getTime();
@@ -957,7 +957,7 @@ function _ts_generator$5(thisArg, body) {
957
957
  * can momentarily leave the emulator in a transitional state that causes `storage/unauthorized` errors.
958
958
  *
959
959
  * @param inputConfig - Optional partial config; `testEnvironment` defaults to an empty object and `rulesContext` defaults to undefined (unauthenticated).
960
- * @returns A function that, given a `buildTests` callback, registers Vitest hooks (`beforeAll`/`afterAll`/`beforeEach`/`afterEach`) and invokes the callback with a {@link RulesUnitTestFirebaseTestingContextFixture}.
960
+ * @returns Function that, given a `buildTests` callback, registers Vitest hooks (`beforeAll`/`afterAll`/`beforeEach`/`afterEach`) and invokes the callback with a {@link RulesUnitTestFirebaseTestingContextFixture}.
961
961
  */ var firebaseRulesUnitTestBuilder = function firebaseRulesUnitTestBuilder(inputConfig) {
962
962
  var _ref;
963
963
  var config = {
@@ -1277,14 +1277,14 @@ function _is_native_reflect_construct$4() {
1277
1277
  /**
1278
1278
  * Creates a {@link MockItemFirestoreCollection} bound to the given {@link FirestoreContext}.
1279
1279
  *
1280
+ * @param firestoreContext - The Firestore context (test or production) used to resolve the underlying collection reference.
1281
+ * @returns A {@link MockItemFirestoreCollection} wired with the {@link mockItemConverter} and {@link mockItemIdentity}.
1282
+ *
1280
1283
  * @example
1281
1284
  * ```ts
1282
1285
  * const collection = mockItemFirestoreCollection(firestoreContext);
1283
1286
  * const doc = collection.documentAccessor().newDocument();
1284
1287
  * ```
1285
- *
1286
- * @param firestoreContext - The Firestore context (test or production) used to resolve the underlying collection reference.
1287
- * @returns A {@link MockItemFirestoreCollection} wired with the {@link mockItemConverter} and {@link mockItemIdentity}.
1288
1288
  */ function mockItemFirestoreCollection(firestoreContext) {
1289
1289
  return firestoreContext.firestoreCollection({
1290
1290
  converter: mockItemConverter,
@@ -1393,7 +1393,7 @@ function _is_native_reflect_construct$4() {
1393
1393
  * subcollections under a given {@link MockItemDocument} parent.
1394
1394
  *
1395
1395
  * @param context - The Firestore context used to resolve subcollections.
1396
- * @returns A function that, given a parent {@link MockItemDocument}, returns a typed {@link CollectionReference} for that parent's MockItemPrivate subcollection.
1396
+ * @returns Function that, given a parent {@link MockItemDocument}, returns a typed {@link CollectionReference} for that parent's MockItemPrivate subcollection.
1397
1397
  */ function mockItemPrivateCollectionReferenceFactory(context) {
1398
1398
  return function(parent) {
1399
1399
  return context.subcollection(parent.documentRef, mockItemPrivateIdentity.collectionName);
@@ -1470,11 +1470,11 @@ function _is_native_reflect_construct$4() {
1470
1470
  /**
1471
1471
  * Firestore collection path name.
1472
1472
  */ // eslint-disable-next-line @typescript-eslint/naming-convention -- camelCase chosen to match neighboring mock exports in this test fixture
1473
- var mockItemUserCollectionName = 'mockItemUser';
1473
+ var MOCK_ITEM_USER_COLLECTION_NAME = 'mockItemUser';
1474
1474
  /**
1475
1475
  * Default document identifier used for MockItemUser in tests.
1476
1476
  */ // eslint-disable-next-line @typescript-eslint/naming-convention -- camelCase chosen to match neighboring mock exports in this test fixture
1477
- var mockItemUserIdentifier = '0';
1477
+ var MOCK_ITEM_USER_IDENTIFIER = '0';
1478
1478
  /**
1479
1479
  * Used to build a FirestoreDataConverter. Fields are configured via configuration. See the SnapshotConverterFunctions for more info.
1480
1480
  */ var mockItemUserConverter = snapshotConverterFunctions({
@@ -1488,10 +1488,10 @@ var mockItemUserIdentifier = '0';
1488
1488
  * subcollections under a given {@link MockItemDocument} parent.
1489
1489
  *
1490
1490
  * @param context - The Firestore context used to resolve subcollections.
1491
- * @returns A function that, given a parent {@link MockItemDocument}, returns a typed {@link CollectionReference} for that parent's MockItemUser subcollection.
1491
+ * @returns Function that, given a parent {@link MockItemDocument}, returns a typed {@link CollectionReference} for that parent's MockItemUser subcollection.
1492
1492
  */ function mockItemUserCollectionReferenceFactory(context) {
1493
1493
  return function(parent) {
1494
- return context.subcollection(parent.documentRef, mockItemUserCollectionName);
1494
+ return context.subcollection(parent.documentRef, MOCK_ITEM_USER_COLLECTION_NAME);
1495
1495
  };
1496
1496
  }
1497
1497
  /**
@@ -1524,7 +1524,7 @@ var mockItemUserIdentifier = '0';
1524
1524
  * @param context - The Firestore context used to resolve the collection group.
1525
1525
  * @returns A typed {@link CollectionGroup} reference for the MockItemUser collection name.
1526
1526
  */ function mockItemUserCollectionReference(context) {
1527
- return context.collectionGroup(mockItemUserCollectionName);
1527
+ return context.collectionGroup(MOCK_ITEM_USER_COLLECTION_NAME);
1528
1528
  }
1529
1529
  /**
1530
1530
  * Creates a {@link MockItemUserFirestoreCollectionGroup} for cross-parent queries on {@link MockItemUser}.
@@ -1582,7 +1582,7 @@ var mockItemUserIdentifier = '0';
1582
1582
  * subcollections under a given {@link MockItemDocument} parent.
1583
1583
  *
1584
1584
  * @param context - The Firestore context used to resolve subcollections.
1585
- * @returns A function that, given a parent {@link MockItemDocument}, returns a typed {@link CollectionReference} for that parent's MockItemSubItem subcollection.
1585
+ * @returns Function that, given a parent {@link MockItemDocument}, returns a typed {@link CollectionReference} for that parent's MockItemSubItem subcollection.
1586
1586
  */ function mockItemSubItemCollectionReferenceFactory(context) {
1587
1587
  return function(parent) {
1588
1588
  return context.subcollection(parent.documentRef, mockItemSubItemIdentity.collectionName);
@@ -1671,7 +1671,7 @@ var mockItemUserIdentifier = '0';
1671
1671
  * subcollections under a given {@link MockItemSubItemDocument} parent.
1672
1672
  *
1673
1673
  * @param context - The Firestore context used to resolve subcollections.
1674
- * @returns A function that, given a parent {@link MockItemSubItemDocument}, returns a typed {@link CollectionReference} for that parent's MockItemSubItemDeep subcollection.
1674
+ * @returns Function that, given a parent {@link MockItemSubItemDocument}, returns a typed {@link CollectionReference} for that parent's MockItemSubItemDeep subcollection.
1675
1675
  */ function mockItemSubItemDeepCollectionReferenceFactory(context) {
1676
1676
  return function(parent) {
1677
1677
  return context.subcollection(parent.documentRef, mockItemSubItemDeepIdentity.collectionName);
@@ -1754,7 +1754,7 @@ var mockItemUserIdentifier = '0';
1754
1754
  *
1755
1755
  * The mock entry shape is already Firestore-safe, so the converter is an identity
1756
1756
  * pass-through. Production usage may wrap a real converter (e.g. for date fields).
1757
- */ var mockItemPagedEntryConverter = {
1757
+ */ var MOCK_ITEM_PAGED_ENTRY_CONVERTER = {
1758
1758
  fromData: function fromData(data) {
1759
1759
  return data;
1760
1760
  },
@@ -1765,7 +1765,7 @@ var mockItemUserIdentifier = '0';
1765
1765
  /**
1766
1766
  * Static distribution scheme for {@link MockItemPagedEntry} that buckets items by their
1767
1767
  * {@link MockItemPagedEntry.group} field across three page IDs (`a`, `b`, `c`).
1768
- */ var mockItemPagedAlphaDistributionScheme = {
1768
+ */ var MOCK_ITEM_PAGED_ALPHA_DISTRIBUTION_SCHEME = {
1769
1769
  pageIds: [
1770
1770
  'a',
1771
1771
  'b',
@@ -1778,7 +1778,7 @@ var mockItemUserIdentifier = '0';
1778
1778
  /**
1779
1779
  * Default `maxItemsPerPage` used by the dynamic mock paged collection factory. Kept small to
1780
1780
  * exercise multi-page boundary conditions in tests without writing many entries.
1781
- */ var MOCK_ITEM_PAGED_DEFAULT_MAX_ITEMS_PER_PAGE = 3;
1781
+ */ var DEFAULT_MOCK_ITEM_PAGED_MAX_ITEMS_PER_PAGE = 3;
1782
1782
  /**
1783
1783
  * Creates a factory for producing {@link MockItemPagedFirestoreCollection} instances bound to a
1784
1784
  * parent {@link MockItemDocument}.
@@ -1786,9 +1786,9 @@ var mockItemUserIdentifier = '0';
1786
1786
  * @param firestoreContext - The Firestore context used to resolve the underlying subcollection.
1787
1787
  * @param config - Optional config selecting between dynamic (default) and static distribution.
1788
1788
  * @returns A factory that, given a parent {@link MockItemDocument}, returns a paged subcollection
1789
- * wired with {@link mockItemPagedEntryConverter}.
1789
+ * wired with {@link MOCK_ITEM_PAGED_ENTRY_CONVERTER}.
1790
1790
  */ function mockItemPagedFirestoreCollection(firestoreContext, config) {
1791
- var _ref = config !== null && config !== void 0 ? config : {}, distributionScheme = _ref.distributionScheme, _ref_maxItemsPerPage = _ref.maxItemsPerPage, maxItemsPerPage = _ref_maxItemsPerPage === void 0 ? MOCK_ITEM_PAGED_DEFAULT_MAX_ITEMS_PER_PAGE : _ref_maxItemsPerPage;
1791
+ var _ref = config !== null && config !== void 0 ? config : {}, distributionScheme = _ref.distributionScheme, _ref_maxItemsPerPage = _ref.maxItemsPerPage, maxItemsPerPage = _ref_maxItemsPerPage === void 0 ? DEFAULT_MOCK_ITEM_PAGED_MAX_ITEMS_PER_PAGE : _ref_maxItemsPerPage;
1792
1792
  return function(parent) {
1793
1793
  return firestoreContext.pagedItemFirestoreCollection({
1794
1794
  modelIdentity: mockItemPagedIdentity,
@@ -1800,7 +1800,7 @@ var mockItemUserIdentifier = '0';
1800
1800
  firestoreContext: firestoreContext,
1801
1801
  maxItemsPerPage: maxItemsPerPage,
1802
1802
  distributionScheme: distributionScheme,
1803
- itemConverter: mockItemPagedEntryConverter
1803
+ itemConverter: MOCK_ITEM_PAGED_ENTRY_CONVERTER
1804
1804
  });
1805
1805
  };
1806
1806
  }
@@ -1838,7 +1838,7 @@ var mockItemUserIdentifier = '0';
1838
1838
  /**
1839
1839
  * System state type identifier for mock system state data.
1840
1840
  *
1841
- * Used as the key in {@link mockItemSystemStateStoredDataConverterMap}.
1841
+ * Used as the key in {@link MOCK_ITEM_SYSTEM_STATE_STORED_DATA_CONVERTER_MAP}.
1842
1842
  */ var MOCK_SYSTEM_STATE_TYPE = 'mockitemsystemstate';
1843
1843
  /**
1844
1844
  * Field converter config for {@link MockSystemData}, handling the `lat` date field conversion.
@@ -1856,7 +1856,7 @@ var mockItemUserIdentifier = '0';
1856
1856
  *
1857
1857
  * Used when creating the mock system state Firestore collection to register
1858
1858
  * the {@link MockSystemData} converter under the {@link MOCK_SYSTEM_STATE_TYPE} key.
1859
- */ var mockItemSystemStateStoredDataConverterMap = _define_property$5({}, MOCK_SYSTEM_STATE_TYPE, mockItemSystemDataConverter);
1859
+ */ var MOCK_ITEM_SYSTEM_STATE_STORED_DATA_CONVERTER_MAP = _define_property$5({}, MOCK_SYSTEM_STATE_TYPE, mockItemSystemDataConverter);
1860
1860
 
1861
1861
  function _class_call_check$4(instance, Constructor) {
1862
1862
  if (!(instance instanceof Constructor)) {
@@ -1893,13 +1893,13 @@ function _class_call_check$4(instance, Constructor) {
1893
1893
  mockItemSubItemDeepCollectionGroup: mockItemSubItemDeepFirestoreCollectionGroup(firestoreContext),
1894
1894
  mockItemPagedCollectionFactory: mockItemPagedFirestoreCollection(firestoreContext),
1895
1895
  mockItemPagedStaticCollectionFactory: mockItemPagedFirestoreCollection(firestoreContext, {
1896
- distributionScheme: mockItemPagedAlphaDistributionScheme
1896
+ distributionScheme: MOCK_ITEM_PAGED_ALPHA_DISTRIBUTION_SCHEME
1897
1897
  }),
1898
1898
  mockItemPagedCollectionFactoryWithConfig: function mockItemPagedCollectionFactoryWithConfig(config) {
1899
1899
  return mockItemPagedFirestoreCollection(firestoreContext, config);
1900
1900
  },
1901
1901
  mockItemPagedCollectionGroup: mockItemPagedFirestoreCollectionGroup(firestoreContext),
1902
- mockItemSystemStateCollection: systemStateFirestoreCollection(firestoreContext, mockItemSystemStateStoredDataConverterMap)
1902
+ mockItemSystemStateCollection: systemStateFirestoreCollection(firestoreContext, MOCK_ITEM_SYSTEM_STATE_STORED_DATA_CONVERTER_MAP)
1903
1903
  };
1904
1904
  }
1905
1905
  // MARK: Models
@@ -2216,6 +2216,9 @@ function _is_native_reflect_construct$3() {
2216
2216
  *
2217
2217
  * Compose with a Firebase test context factory to get a fully wired test environment:
2218
2218
  *
2219
+ * @param _config - Reserved for future setup/teardown configuration; currently unused.
2220
+ * @returns A factory builder that wraps a parent {@link TestFirestoreContextFixture} with a {@link MockItemCollectionFixture} per test.
2221
+ *
2219
2222
  * @example
2220
2223
  * ```ts
2221
2224
  * const f = testWithMockItemCollectionFixture()(authorizedFirebaseFactory);
@@ -2223,9 +2226,6 @@ function _is_native_reflect_construct$3() {
2223
2226
  * it('should work', () => { ... });
2224
2227
  * }));
2225
2228
  * ```
2226
- *
2227
- * @param _config - Reserved for future setup/teardown configuration; currently unused.
2228
- * @returns A factory builder that wraps a parent {@link TestFirestoreContextFixture} with a {@link MockItemCollectionFixture} per test.
2229
2229
  */ function testWithMockItemCollectionFixture(_config) {
2230
2230
  return instanceWrapTestContextFactory({
2231
2231
  wrapFixture: function wrapFixture(fixture) {
@@ -2385,6 +2385,9 @@ function _is_native_reflect_construct$2() {
2385
2385
  *
2386
2386
  * Compose with a Firebase test context factory to get a fully wired storage test environment:
2387
2387
  *
2388
+ * @param _config - Reserved for future setup/teardown configuration; currently unused.
2389
+ * @returns A factory builder that wraps a parent {@link TestFirebaseStorageContextFixture} with a {@link MockItemStorageFixture} per test.
2390
+ *
2388
2391
  * @example
2389
2392
  * ```ts
2390
2393
  * const f = testWithMockItemStorageFixture()(authorizedFirebaseFactory);
@@ -2392,9 +2395,6 @@ function _is_native_reflect_construct$2() {
2392
2395
  * it('should upload', () => { ... });
2393
2396
  * }));
2394
2397
  * ```
2395
- *
2396
- * @param _config - Reserved for future setup/teardown configuration; currently unused.
2397
- * @returns A factory builder that wraps a parent {@link TestFirebaseStorageContextFixture} with a {@link MockItemStorageFixture} per test.
2398
2398
  */ function testWithMockItemStorageFixture(_config) {
2399
2399
  return instanceWrapTestContextFactory({
2400
2400
  wrapFixture: function wrapFixture(fixture) {
@@ -2562,14 +2562,14 @@ function _is_native_reflect_construct$1() {
2562
2562
  /**
2563
2563
  * Creates a Firestore query constraint that filters {@link MockItem} documents by their `value` field.
2564
2564
  *
2565
+ * @param value - The exact `value` to match.
2566
+ * @returns A `where('value', '==', value)` constraint typed for {@link MockItem}.
2567
+ *
2565
2568
  * @example
2566
2569
  * ```ts
2567
2570
  * const constraint = mockItemWithValue('hello');
2568
2571
  * const results = await collection.query(constraint);
2569
2572
  * ```
2570
- *
2571
- * @param value - The exact `value` to match.
2572
- * @returns A `where('value', '==', value)` constraint typed for {@link MockItem}.
2573
2573
  */ function mockItemWithValue(value) {
2574
2574
  return where('value', '==', value);
2575
2575
  }
@@ -2596,7 +2596,7 @@ function _is_native_reflect_construct$1() {
2596
2596
  * https://medium.com/firebase-developers/how-to-query-collections-in-firestore-under-a-certain-path-6a0d686cebd2
2597
2597
  *
2598
2598
  * @param mockItem - The parent {@link MockItem} document reference whose descendant documents the constraint should bound to.
2599
- * @returns An array of constraints (suitable for use on a collection group query) that restricts results to documents under the given parent path.
2599
+ * @returns The constraints (suitable for use on a collection group query) that restricts results to documents under the given parent path.
2600
2600
  */ function allChildMockItemSubItemDeepsWithinMockItem(mockItem) {
2601
2601
  return allChildDocumentsUnderParent(mockItem);
2602
2602
  }
@@ -3883,8 +3883,8 @@ function _ts_generator$4(thisArg, body) {
3883
3883
  '1'
3884
3884
  ]);
3885
3885
  expect(index === null || index === void 0 ? void 0 : index.pc).toEqual({
3886
- '0': MOCK_ITEM_PAGED_DEFAULT_MAX_ITEMS_PER_PAGE,
3887
- '1': items.length - MOCK_ITEM_PAGED_DEFAULT_MAX_ITEMS_PER_PAGE
3886
+ '0': DEFAULT_MOCK_ITEM_PAGED_MAX_ITEMS_PER_PAGE,
3887
+ '1': items.length - DEFAULT_MOCK_ITEM_PAGED_MAX_ITEMS_PER_PAGE
3888
3888
  });
3889
3889
  expect(index === null || index === void 0 ? void 0 : index.u).toBeGreaterThan(0);
3890
3890
  return [
@@ -13687,4 +13687,4 @@ function _ts_generator(thisArg, body) {
13687
13687
  });
13688
13688
  }
13689
13689
 
13690
- export { AUTHORIZED_FIRESTORE_RULES, AUTHORIZED_STORAGE_RULES, MOCK_FIREBASE_MODEL_SERVICE_FACTORIES, MOCK_ITEM_PAGED_DEFAULT_MAX_ITEMS_PER_PAGE, MOCK_SYSTEM_STATE_TYPE, MockItemCollectionFixture, MockItemCollectionFixtureInstance, MockItemCollections, MockItemDocument, MockItemPagedDocument, MockItemPrivateDocument, MockItemSettingsItemEnum, MockItemStorageFixture, MockItemStorageFixtureInstance, MockItemSubItemDeepDocument, MockItemSubItemDocument, MockItemUserDocument, RulesUnitTestFirebaseTestingContextFixture, RulesUnitTestTestFirebaseInstance, TESTING_AUTHORIZED_FIREBASE_USER_ID, TestFirebaseContextFixture, TestFirebaseInstance, TestFirebaseStorageContextFixture, TestFirebaseStorageInstance, TestFirestoreContextFixture, TestFirestoreInstance, allChildMockItemSubItemDeepsWithinMockItem, authorizedFirebaseFactory, authorizedFirestoreOnlyFactory, authorizedTestWithMockItemCollection, authorizedTestWithMockItemStorage, changeFirestoreLogLevelBeforeAndAfterTests, clearTestFirestoreContextCollections, describeFirebaseStorageAccessorDriverTests, describeFirestoreAccessorDriverTests, describeFirestoreDocumentAccessorTests, describeFirestoreDocumentUtilityTests, describeFirestoreIterationTests, describeFirestoreQueryDriverTests, firebaseRulesUnitTestBuilder, makeMockItemCollections, makeRulesTestFirebaseStorageContext, makeRulesTestFirestoreContext, makeTestingFirebaseStorageAccesorDriver, makeTestingFirebaseStorageDrivers, makeTestingFirestoreAccesorDriver, makeTestingFirestoreDrivers, mockFirebaseModelServices, mockItemCollectionReference, mockItemConverter, mockItemFirebaseModelServiceFactory, mockItemFirestoreCollection, mockItemIdentity, mockItemPagedAlphaDistributionScheme, mockItemPagedCollectionReference, mockItemPagedEntryConverter, mockItemPagedFirebaseModelServiceFactory, mockItemPagedFirestoreCollection, mockItemPagedFirestoreCollectionGroup, mockItemPagedIdentity, mockItemPrivateCollectionReference, mockItemPrivateCollectionReferenceFactory, mockItemPrivateConverter, mockItemPrivateFirebaseModelServiceFactory, mockItemPrivateFirestoreCollection, mockItemPrivateFirestoreCollectionGroup, mockItemPrivateIdentity, mockItemSettingsItemDencoder, mockItemSubItemCollectionReference, mockItemSubItemCollectionReferenceFactory, mockItemSubItemConverter, mockItemSubItemDeepCollectionReference, mockItemSubItemDeepCollectionReferenceFactory, mockItemSubItemDeepConverter, mockItemSubItemDeepFirebaseModelServiceFactory, mockItemSubItemDeepFirestoreCollection, mockItemSubItemDeepFirestoreCollectionGroup, mockItemSubItemDeepIdentity, mockItemSubItemFirebaseModelServiceFactory, mockItemSubItemFirestoreCollection, mockItemSubItemFirestoreCollectionGroup, mockItemSubItemIdentity, mockItemSystemDataConverter, mockItemSystemStateFirebaseModelServiceFactory, mockItemSystemStateStoredDataConverterMap, mockItemUserAccessorFactory, mockItemUserCollectionName, mockItemUserCollectionReference, mockItemUserCollectionReferenceFactory, mockItemUserConverter, mockItemUserFirebaseModelServiceFactory, mockItemUserFirestoreCollection, mockItemUserFirestoreCollectionGroup, mockItemUserIdentifier, mockItemUserIdentity, mockItemWithTestValue, mockItemWithValue, testWithMockItemCollectionFixture, testWithMockItemStorageFixture };
13690
+ export { AUTHORIZED_FIRESTORE_RULES, AUTHORIZED_STORAGE_RULES, DEFAULT_MOCK_ITEM_PAGED_MAX_ITEMS_PER_PAGE, MOCK_FIREBASE_MODEL_SERVICE_FACTORIES, MOCK_ITEM_PAGED_ALPHA_DISTRIBUTION_SCHEME, MOCK_ITEM_PAGED_ENTRY_CONVERTER, MOCK_ITEM_SYSTEM_STATE_STORED_DATA_CONVERTER_MAP, MOCK_ITEM_USER_COLLECTION_NAME, MOCK_ITEM_USER_IDENTIFIER, MOCK_SYSTEM_STATE_TYPE, MockItemCollectionFixture, MockItemCollectionFixtureInstance, MockItemCollections, MockItemDocument, MockItemPagedDocument, MockItemPrivateDocument, MockItemSettingsItemEnum, MockItemStorageFixture, MockItemStorageFixtureInstance, MockItemSubItemDeepDocument, MockItemSubItemDocument, MockItemUserDocument, RulesUnitTestFirebaseTestingContextFixture, RulesUnitTestTestFirebaseInstance, TESTING_AUTHORIZED_FIREBASE_USER_ID, TestFirebaseContextFixture, TestFirebaseInstance, TestFirebaseStorageContextFixture, TestFirebaseStorageInstance, TestFirestoreContextFixture, TestFirestoreInstance, allChildMockItemSubItemDeepsWithinMockItem, authorizedFirebaseFactory, authorizedFirestoreOnlyFactory, authorizedTestWithMockItemCollection, authorizedTestWithMockItemStorage, changeFirestoreLogLevelBeforeAndAfterTests, clearTestFirestoreContextCollections, describeFirebaseStorageAccessorDriverTests, describeFirestoreAccessorDriverTests, describeFirestoreDocumentAccessorTests, describeFirestoreDocumentUtilityTests, describeFirestoreIterationTests, describeFirestoreQueryDriverTests, firebaseRulesUnitTestBuilder, makeMockItemCollections, makeRulesTestFirebaseStorageContext, makeRulesTestFirestoreContext, makeTestingFirebaseStorageAccesorDriver, makeTestingFirebaseStorageDrivers, makeTestingFirestoreAccesorDriver, makeTestingFirestoreDrivers, mockFirebaseModelServices, mockItemCollectionReference, mockItemConverter, mockItemFirebaseModelServiceFactory, mockItemFirestoreCollection, mockItemIdentity, mockItemPagedCollectionReference, mockItemPagedFirebaseModelServiceFactory, mockItemPagedFirestoreCollection, mockItemPagedFirestoreCollectionGroup, mockItemPagedIdentity, mockItemPrivateCollectionReference, mockItemPrivateCollectionReferenceFactory, mockItemPrivateConverter, mockItemPrivateFirebaseModelServiceFactory, mockItemPrivateFirestoreCollection, mockItemPrivateFirestoreCollectionGroup, mockItemPrivateIdentity, mockItemSettingsItemDencoder, mockItemSubItemCollectionReference, mockItemSubItemCollectionReferenceFactory, mockItemSubItemConverter, mockItemSubItemDeepCollectionReference, mockItemSubItemDeepCollectionReferenceFactory, mockItemSubItemDeepConverter, mockItemSubItemDeepFirebaseModelServiceFactory, mockItemSubItemDeepFirestoreCollection, mockItemSubItemDeepFirestoreCollectionGroup, mockItemSubItemDeepIdentity, mockItemSubItemFirebaseModelServiceFactory, mockItemSubItemFirestoreCollection, mockItemSubItemFirestoreCollectionGroup, mockItemSubItemIdentity, mockItemSystemDataConverter, mockItemSystemStateFirebaseModelServiceFactory, mockItemUserAccessorFactory, mockItemUserCollectionReference, mockItemUserCollectionReferenceFactory, mockItemUserConverter, mockItemUserFirebaseModelServiceFactory, mockItemUserFirestoreCollection, mockItemUserFirestoreCollectionGroup, mockItemUserIdentity, mockItemWithTestValue, mockItemWithValue, testWithMockItemCollectionFixture, testWithMockItemStorageFixture };
package/test/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@dereekb/firebase/test",
3
- "version": "13.11.14",
3
+ "version": "13.11.16",
4
4
  "peerDependencies": {
5
- "@dereekb/date": "13.11.14",
6
- "@dereekb/firebase": "13.11.14",
7
- "@dereekb/model": "13.11.14",
8
- "@dereekb/rxjs": "13.11.14",
9
- "@dereekb/util": "13.11.14",
5
+ "@dereekb/date": "13.11.16",
6
+ "@dereekb/firebase": "13.11.16",
7
+ "@dereekb/model": "13.11.16",
8
+ "@dereekb/rxjs": "13.11.16",
9
+ "@dereekb/util": "13.11.16",
10
10
  "@firebase/rules-unit-testing": "5.0.0",
11
11
  "date-fns": "^4.1.0",
12
12
  "firebase": "^12.12.1",
@@ -124,7 +124,7 @@ export declare class RulesUnitTestFirebaseTestingContextFixture extends TestFire
124
124
  * can momentarily leave the emulator in a transitional state that causes `storage/unauthorized` errors.
125
125
  *
126
126
  * @param inputConfig - Optional partial config; `testEnvironment` defaults to an empty object and `rulesContext` defaults to undefined (unauthenticated).
127
- * @returns A function that, given a `buildTests` callback, registers Vitest hooks (`beforeAll`/`afterAll`/`beforeEach`/`afterEach`) and invokes the callback with a {@link RulesUnitTestFirebaseTestingContextFixture}.
127
+ * @returns Function that, given a `buildTests` callback, registers Vitest hooks (`beforeAll`/`afterAll`/`beforeEach`/`afterEach`) and invokes the callback with a {@link RulesUnitTestFirebaseTestingContextFixture}.
128
128
  */
129
129
  export declare const firebaseRulesUnitTestBuilder: TestContextBuilderFunction<RulesUnitTestTestFirebaseInstance, RulesUnitTestFirebaseTestingContextFixture, RulesUnitTestingConfig>;
130
130
  /**
@@ -25,14 +25,14 @@ export interface TestingFirestoreAccessorDriver extends FirestoreAccessorDriver
25
25
  * each other's documents. The mapping from original to fuzzed names is retrievable via
26
26
  * {@link TestingFirestoreAccessorDriver.getFuzzedCollectionsNameMap}.
27
27
  *
28
+ * @param driver - The base driver to wrap with fuzzing behavior.
29
+ * @returns A {@link TestingFirestoreAccessorDriver} with `collection`, `subcollection`, and `collectionGroup` rewired to use fuzzed paths, plus helpers to inspect the fuzz map.
30
+ *
28
31
  * @example
29
32
  * ```ts
30
33
  * const testDriver = makeTestingFirestoreAccesorDriver(productionDriver);
31
34
  * // "mockItems" -> "1678901234_42_mockItems_1"
32
35
  * ```
33
- *
34
- * @param driver - The base driver to wrap with fuzzing behavior.
35
- * @returns A {@link TestingFirestoreAccessorDriver} with `collection`, `subcollection`, and `collectionGroup` rewired to use fuzzed paths, plus helpers to inspect the fuzz map.
36
36
  */
37
37
  export declare function makeTestingFirestoreAccesorDriver(driver: FirestoreAccessorDriver): TestingFirestoreAccessorDriver;
38
38
  /**