@dereekb/firebase 13.6.13 → 13.6.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -765,11 +765,17 @@ function _ts_generator$l(thisArg, body) {
765
765
  get: function get() {
766
766
  return undefined;
767
767
  },
768
- set: function set() {},
769
- invalidate: function invalidate() {}
768
+ set: function set() {
769
+ // noop
770
+ },
771
+ invalidate: function invalidate() {
772
+ // noop
773
+ }
770
774
  };
771
775
  /**
772
776
  * Returns the singleton noop {@link FirestoreCollectionDocumentCache}.
777
+ *
778
+ * @returns A noop document cache that discards all operations.
773
779
  */ function noopFirestoreCollectionDocumentCache() {
774
780
  return NOOP_FIRESTORE_COLLECTION_DOCUMENT_CACHE;
775
781
  }
@@ -794,13 +800,21 @@ function _ts_generator$l(thisArg, body) {
794
800
  get: function get() {
795
801
  return undefined;
796
802
  },
797
- set: function set() {},
798
- invalidate: function invalidate() {},
799
- clear: function clear() {},
803
+ set: function set() {
804
+ // noop
805
+ },
806
+ invalidate: function invalidate() {
807
+ // noop
808
+ },
809
+ clear: function clear() {
810
+ // noop
811
+ },
800
812
  instance: function instance() {
801
813
  return NOOP_FIRESTORE_COLLECTION_CACHE_INSTANCE;
802
814
  },
803
- destroy: function destroy() {}
815
+ destroy: function destroy() {
816
+ // noop
817
+ }
804
818
  };
805
819
  /**
806
820
  * Returns the singleton noop {@link FirestoreCollectionCache} that discards all operations.
@@ -813,6 +827,8 @@ function _ts_generator$l(thisArg, body) {
813
827
  * cache.get('path/to/doc'); // always returns undefined
814
828
  * cache.set('path/to/doc', { data }); // no-op
815
829
  * ```
830
+ *
831
+ * @returns The singleton noop collection cache.
816
832
  */ function noopFirestoreCollectionCache() {
817
833
  return NOOP_FIRESTORE_COLLECTION_CACHE;
818
834
  }
@@ -829,14 +845,24 @@ function _ts_generator$l(thisArg, body) {
829
845
  isEnabled: function isEnabled() {
830
846
  return false;
831
847
  },
832
- setEnabled: function setEnabled() {},
833
- clearAll: function clearAll() {},
848
+ setEnabled: function setEnabled() {
849
+ // noop
850
+ },
851
+ clearAll: function clearAll() {
852
+ // noop
853
+ },
834
854
  isEnabledForType: function isEnabledForType() {
835
855
  return false;
836
856
  },
837
- setEnabledForType: function setEnabledForType() {},
838
- clearForType: function clearForType() {},
839
- destroy: function destroy() {}
857
+ setEnabledForType: function setEnabledForType() {
858
+ // noop
859
+ },
860
+ clearForType: function clearForType() {
861
+ // noop
862
+ },
863
+ destroy: function destroy() {
864
+ // noop
865
+ }
840
866
  };
841
867
  /**
842
868
  * Returns the singleton noop {@link FirestoreContextCache}.
@@ -850,6 +876,8 @@ function _ts_generator$l(thisArg, body) {
850
876
  * cache.cacheForCollection('user', { defaultTtl: 0 }); // returns noop collection cache
851
877
  * cache.isEnabled(); // false
852
878
  * ```
879
+ *
880
+ * @returns The singleton noop context cache.
853
881
  */ function noopFirestoreContextCache() {
854
882
  return NOOP_FIRESTORE_CONTEXT_CACHE;
855
883
  }
@@ -2637,6 +2665,8 @@ function _ts_generator$h(thisArg, body) {
2637
2665
  /**
2638
2666
  * Creates an in-memory {@link FirestoreCollectionCacheDelegate} backed by a Map.
2639
2667
  *
2668
+ * @returns A Map-backed delegate instance.
2669
+ *
2640
2670
  * @example
2641
2671
  * ```ts
2642
2672
  * const delegate = inMemoryFirestoreCollectionCacheDelegate<UserData>();
@@ -2663,6 +2693,8 @@ function _ts_generator$h(thisArg, body) {
2663
2693
  *
2664
2694
  * Used by {@link readLoggingFirestoreContextCache} where only event emission matters.
2665
2695
  *
2696
+ * @returns A no-storage delegate that discards all data.
2697
+ *
2666
2698
  * @example
2667
2699
  * ```ts
2668
2700
  * const delegate = noopFirestoreCollectionCacheDelegate<UserData>();
@@ -2672,9 +2704,15 @@ function _ts_generator$h(thisArg, body) {
2672
2704
  get: function get() {
2673
2705
  return undefined;
2674
2706
  },
2675
- set: function set() {},
2676
- delete: function _delete() {},
2677
- clear: function clear() {}
2707
+ set: function set() {
2708
+ // noop
2709
+ },
2710
+ delete: function _delete() {
2711
+ // noop
2712
+ },
2713
+ clear: function clear() {
2714
+ // noop
2715
+ }
2678
2716
  };
2679
2717
  }
2680
2718
  /**
@@ -16398,7 +16436,7 @@ var initializeAllStorageFilesFromUploadsParamsType = arktype.type({
16398
16436
  var initializeStorageFileFromUploadParamsType = arktype.type({
16399
16437
  'bucketId?': model.clearable('string'),
16400
16438
  pathString: 'string > 0',
16401
- 'expediteProcessing?': 'boolean'
16439
+ 'expediteProcessing?': model.clearable('boolean')
16402
16440
  });
16403
16441
  var processStorageFileParamsType = targetModelParamsType.merge({
16404
16442
  'runImmediately?': model.clearable('boolean'),
@@ -16441,7 +16479,7 @@ var createStorageFileGroupParamsType = arktype.type({
16441
16479
  'storageFileId?': model.clearable(firestoreModelIdType)
16442
16480
  });
16443
16481
  var syncStorageFileWithGroupsParamsType = targetModelParamsType.merge({
16444
- 'force?': 'boolean'
16482
+ 'force?': model.clearable('boolean')
16445
16483
  });
16446
16484
  var syncAllFlaggedStorageFilesWithGroupsParamsType = arktype.type({});
16447
16485
  var updateStorageFileGroupEntryParamsType = arktype.type({
@@ -16452,11 +16490,11 @@ var updateStorageFileGroupParamsType = targetModelParamsType.merge({
16452
16490
  'entries?': model.clearable(updateStorageFileGroupEntryParamsType.array())
16453
16491
  });
16454
16492
  var regenerateStorageFileGroupContentParamsType = targetModelParamsType.merge({
16455
- 'force?': 'boolean'
16493
+ 'force?': model.clearable('boolean')
16456
16494
  });
16457
16495
  var regenerateAllFlaggedStorageFileGroupsContentParamsType = arktype.type({});
16458
16496
  var initializeStorageFileModelParamsType = targetModelParamsType.merge({
16459
- 'throwErrorIfAlreadyInitialized?': 'boolean'
16497
+ 'throwErrorIfAlreadyInitialized?': model.clearable('boolean')
16460
16498
  });
16461
16499
  var initializeAllApplicableStorageFileGroupsParamsType = arktype.type({});
16462
16500
  var storageFileFunctionTypeConfigMap = {};
package/index.esm.js CHANGED
@@ -763,11 +763,17 @@ function _ts_generator$l(thisArg, body) {
763
763
  get: function get() {
764
764
  return undefined;
765
765
  },
766
- set: function set() {},
767
- invalidate: function invalidate() {}
766
+ set: function set() {
767
+ // noop
768
+ },
769
+ invalidate: function invalidate() {
770
+ // noop
771
+ }
768
772
  };
769
773
  /**
770
774
  * Returns the singleton noop {@link FirestoreCollectionDocumentCache}.
775
+ *
776
+ * @returns A noop document cache that discards all operations.
771
777
  */ function noopFirestoreCollectionDocumentCache() {
772
778
  return NOOP_FIRESTORE_COLLECTION_DOCUMENT_CACHE;
773
779
  }
@@ -792,13 +798,21 @@ function _ts_generator$l(thisArg, body) {
792
798
  get: function get() {
793
799
  return undefined;
794
800
  },
795
- set: function set() {},
796
- invalidate: function invalidate() {},
797
- clear: function clear() {},
801
+ set: function set() {
802
+ // noop
803
+ },
804
+ invalidate: function invalidate() {
805
+ // noop
806
+ },
807
+ clear: function clear() {
808
+ // noop
809
+ },
798
810
  instance: function instance() {
799
811
  return NOOP_FIRESTORE_COLLECTION_CACHE_INSTANCE;
800
812
  },
801
- destroy: function destroy() {}
813
+ destroy: function destroy() {
814
+ // noop
815
+ }
802
816
  };
803
817
  /**
804
818
  * Returns the singleton noop {@link FirestoreCollectionCache} that discards all operations.
@@ -811,6 +825,8 @@ function _ts_generator$l(thisArg, body) {
811
825
  * cache.get('path/to/doc'); // always returns undefined
812
826
  * cache.set('path/to/doc', { data }); // no-op
813
827
  * ```
828
+ *
829
+ * @returns The singleton noop collection cache.
814
830
  */ function noopFirestoreCollectionCache() {
815
831
  return NOOP_FIRESTORE_COLLECTION_CACHE;
816
832
  }
@@ -827,14 +843,24 @@ function _ts_generator$l(thisArg, body) {
827
843
  isEnabled: function isEnabled() {
828
844
  return false;
829
845
  },
830
- setEnabled: function setEnabled() {},
831
- clearAll: function clearAll() {},
846
+ setEnabled: function setEnabled() {
847
+ // noop
848
+ },
849
+ clearAll: function clearAll() {
850
+ // noop
851
+ },
832
852
  isEnabledForType: function isEnabledForType() {
833
853
  return false;
834
854
  },
835
- setEnabledForType: function setEnabledForType() {},
836
- clearForType: function clearForType() {},
837
- destroy: function destroy() {}
855
+ setEnabledForType: function setEnabledForType() {
856
+ // noop
857
+ },
858
+ clearForType: function clearForType() {
859
+ // noop
860
+ },
861
+ destroy: function destroy() {
862
+ // noop
863
+ }
838
864
  };
839
865
  /**
840
866
  * Returns the singleton noop {@link FirestoreContextCache}.
@@ -848,6 +874,8 @@ function _ts_generator$l(thisArg, body) {
848
874
  * cache.cacheForCollection('user', { defaultTtl: 0 }); // returns noop collection cache
849
875
  * cache.isEnabled(); // false
850
876
  * ```
877
+ *
878
+ * @returns The singleton noop context cache.
851
879
  */ function noopFirestoreContextCache() {
852
880
  return NOOP_FIRESTORE_CONTEXT_CACHE;
853
881
  }
@@ -2635,6 +2663,8 @@ function _ts_generator$h(thisArg, body) {
2635
2663
  /**
2636
2664
  * Creates an in-memory {@link FirestoreCollectionCacheDelegate} backed by a Map.
2637
2665
  *
2666
+ * @returns A Map-backed delegate instance.
2667
+ *
2638
2668
  * @example
2639
2669
  * ```ts
2640
2670
  * const delegate = inMemoryFirestoreCollectionCacheDelegate<UserData>();
@@ -2661,6 +2691,8 @@ function _ts_generator$h(thisArg, body) {
2661
2691
  *
2662
2692
  * Used by {@link readLoggingFirestoreContextCache} where only event emission matters.
2663
2693
  *
2694
+ * @returns A no-storage delegate that discards all data.
2695
+ *
2664
2696
  * @example
2665
2697
  * ```ts
2666
2698
  * const delegate = noopFirestoreCollectionCacheDelegate<UserData>();
@@ -2670,9 +2702,15 @@ function _ts_generator$h(thisArg, body) {
2670
2702
  get: function get() {
2671
2703
  return undefined;
2672
2704
  },
2673
- set: function set() {},
2674
- delete: function _delete() {},
2675
- clear: function clear() {}
2705
+ set: function set() {
2706
+ // noop
2707
+ },
2708
+ delete: function _delete() {
2709
+ // noop
2710
+ },
2711
+ clear: function clear() {
2712
+ // noop
2713
+ }
2676
2714
  };
2677
2715
  }
2678
2716
  /**
@@ -16396,7 +16434,7 @@ var initializeAllStorageFilesFromUploadsParamsType = type({
16396
16434
  var initializeStorageFileFromUploadParamsType = type({
16397
16435
  'bucketId?': clearable('string'),
16398
16436
  pathString: 'string > 0',
16399
- 'expediteProcessing?': 'boolean'
16437
+ 'expediteProcessing?': clearable('boolean')
16400
16438
  });
16401
16439
  var processStorageFileParamsType = targetModelParamsType.merge({
16402
16440
  'runImmediately?': clearable('boolean'),
@@ -16439,7 +16477,7 @@ var createStorageFileGroupParamsType = type({
16439
16477
  'storageFileId?': clearable(firestoreModelIdType)
16440
16478
  });
16441
16479
  var syncStorageFileWithGroupsParamsType = targetModelParamsType.merge({
16442
- 'force?': 'boolean'
16480
+ 'force?': clearable('boolean')
16443
16481
  });
16444
16482
  var syncAllFlaggedStorageFilesWithGroupsParamsType = type({});
16445
16483
  var updateStorageFileGroupEntryParamsType = type({
@@ -16450,11 +16488,11 @@ var updateStorageFileGroupParamsType = targetModelParamsType.merge({
16450
16488
  'entries?': clearable(updateStorageFileGroupEntryParamsType.array())
16451
16489
  });
16452
16490
  var regenerateStorageFileGroupContentParamsType = targetModelParamsType.merge({
16453
- 'force?': 'boolean'
16491
+ 'force?': clearable('boolean')
16454
16492
  });
16455
16493
  var regenerateAllFlaggedStorageFileGroupsContentParamsType = type({});
16456
16494
  var initializeStorageFileModelParamsType = targetModelParamsType.merge({
16457
- 'throwErrorIfAlreadyInitialized?': 'boolean'
16495
+ 'throwErrorIfAlreadyInitialized?': clearable('boolean')
16458
16496
  });
16459
16497
  var initializeAllApplicableStorageFileGroupsParamsType = type({});
16460
16498
  var storageFileFunctionTypeConfigMap = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/firebase",
3
- "version": "13.6.13",
3
+ "version": "13.6.15",
4
4
  "exports": {
5
5
  "./test": {
6
6
  "module": "./test/index.esm.js",
@@ -17,10 +17,10 @@
17
17
  }
18
18
  },
19
19
  "peerDependencies": {
20
- "@dereekb/util": "13.6.13",
21
- "@dereekb/date": "13.6.13",
22
- "@dereekb/model": "13.6.13",
23
- "@dereekb/rxjs": "13.6.13",
20
+ "@dereekb/util": "13.6.15",
21
+ "@dereekb/date": "13.6.15",
22
+ "@dereekb/model": "13.6.15",
23
+ "@dereekb/rxjs": "13.6.15",
24
24
  "@firebase/rules-unit-testing": "5.0.0",
25
25
  "arktype": "^2.2.0",
26
26
  "date-fns": "^4.0.0",
@@ -287,6 +287,8 @@ export interface FirestoreCollectionDocumentCache<T = unknown> {
287
287
  export declare function firestoreCollectionDocumentCache<T>(collectionCache: FirestoreCollectionCache<T>, key: FirestoreModelKey): FirestoreCollectionDocumentCache<T>;
288
288
  /**
289
289
  * Returns the singleton noop {@link FirestoreCollectionDocumentCache}.
290
+ *
291
+ * @returns A noop document cache that discards all operations.
290
292
  */
291
293
  export declare function noopFirestoreCollectionDocumentCache<T>(): FirestoreCollectionDocumentCache<T>;
292
294
  /**
@@ -346,6 +348,8 @@ export interface FirestoreContextCacheFactoryRef {
346
348
  * cache.get('path/to/doc'); // always returns undefined
347
349
  * cache.set('path/to/doc', { data }); // no-op
348
350
  * ```
351
+ *
352
+ * @returns The singleton noop collection cache.
349
353
  */
350
354
  export declare function noopFirestoreCollectionCache<T>(): FirestoreCollectionCache<T>;
351
355
  /**
@@ -360,5 +364,7 @@ export declare function noopFirestoreCollectionCache<T>(): FirestoreCollectionCa
360
364
  * cache.cacheForCollection('user', { defaultTtl: 0 }); // returns noop collection cache
361
365
  * cache.isEnabled(); // false
362
366
  * ```
367
+ *
368
+ * @returns The singleton noop context cache.
363
369
  */
364
370
  export declare function noopFirestoreContextCache(): FirestoreContextCache;
@@ -38,6 +38,8 @@ export interface FirestoreCollectionCacheDelegate<T> {
38
38
  /**
39
39
  * Creates an in-memory {@link FirestoreCollectionCacheDelegate} backed by a Map.
40
40
  *
41
+ * @returns A Map-backed delegate instance.
42
+ *
41
43
  * @example
42
44
  * ```ts
43
45
  * const delegate = inMemoryFirestoreCollectionCacheDelegate<UserData>();
@@ -49,6 +51,8 @@ export declare function inMemoryFirestoreCollectionCacheDelegate<T>(): Firestore
49
51
  *
50
52
  * Used by {@link readLoggingFirestoreContextCache} where only event emission matters.
51
53
  *
54
+ * @returns A no-storage delegate that discards all data.
55
+ *
52
56
  * @example
53
57
  * ```ts
54
58
  * const delegate = noopFirestoreCollectionCacheDelegate<UserData>();
@@ -43,7 +43,7 @@ export interface InitializeAllStorageFilesFromUploadsResult extends OnCallCreate
43
43
  export interface InitializeStorageFileFromUploadParams extends Pick<StoragePath, 'pathString'> {
44
44
  readonly bucketId?: Maybe<StorageBucketId>;
45
45
  readonly pathString: StorageSlashPath;
46
- readonly expediteProcessing?: boolean;
46
+ readonly expediteProcessing?: Maybe<boolean>;
47
47
  }
48
48
  export declare const initializeStorageFileFromUploadParamsType: Type<InitializeStorageFileFromUploadParams>;
49
49
  /**
@@ -198,7 +198,7 @@ export interface CreateStorageFileGroupParams {
198
198
  }
199
199
  export declare const createStorageFileGroupParamsType: Type<CreateStorageFileGroupParams>;
200
200
  export interface SyncStorageFileWithGroupsParams extends TargetModelParams {
201
- readonly force?: boolean;
201
+ readonly force?: Maybe<boolean>;
202
202
  }
203
203
  export declare const syncStorageFileWithGroupsParamsType: Type<SyncStorageFileWithGroupsParams>;
204
204
  export interface SyncStorageFileWithGroupsResult {
@@ -223,7 +223,7 @@ export interface UpdateStorageFileGroupParams extends TargetModelParams {
223
223
  }
224
224
  export declare const updateStorageFileGroupParamsType: Type<UpdateStorageFileGroupParams>;
225
225
  export interface RegenerateStorageFileGroupContentParams extends TargetModelParams {
226
- readonly force?: boolean;
226
+ readonly force?: Maybe<boolean>;
227
227
  }
228
228
  export declare const regenerateStorageFileGroupContentParamsType: Type<RegenerateStorageFileGroupContentParams>;
229
229
  export interface RegenerateStorageFileGroupContentResult {
@@ -240,7 +240,7 @@ export interface RegenerateAllFlaggedStorageFileGroupsContentResult {
240
240
  * Used for initializing an uninitialized model like NotificationBox or NotificationSummary.
241
241
  */
242
242
  export interface InitializeStorageFileModelParams extends TargetModelParams {
243
- readonly throwErrorIfAlreadyInitialized?: boolean;
243
+ readonly throwErrorIfAlreadyInitialized?: Maybe<boolean>;
244
244
  }
245
245
  export declare const initializeStorageFileModelParamsType: Type<InitializeStorageFileModelParams>;
246
246
  export interface InitializeAllApplicableStorageFileGroupsParams {
package/test/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@dereekb/firebase/test",
3
- "version": "13.6.13",
3
+ "version": "13.6.15",
4
4
  "peerDependencies": {
5
- "@dereekb/date": "13.6.13",
6
- "@dereekb/firebase": "13.6.13",
7
- "@dereekb/model": "13.6.13",
8
- "@dereekb/rxjs": "13.6.13",
9
- "@dereekb/util": "13.6.13",
5
+ "@dereekb/date": "13.6.15",
6
+ "@dereekb/firebase": "13.6.15",
7
+ "@dereekb/model": "13.6.15",
8
+ "@dereekb/rxjs": "13.6.15",
9
+ "@dereekb/util": "13.6.15",
10
10
  "@firebase/rules-unit-testing": "5.0.0",
11
11
  "date-fns": "^4.0.0",
12
12
  "firebase": "^12.0.0",