@dereekb/firebase 11.1.3 → 11.1.5

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
@@ -5456,14 +5456,16 @@ function iterationQueryDocChangeWatcher(config) {
5456
5456
  delay: timeUntilActive = DEFAULT_QUERY_CHANGE_WATCHER_DELAY
5457
5457
  } = config;
5458
5458
  const stream$ = instance.snapshotIteration.firstSuccessfulPageResults$.pipe(rxjs.switchMap(first => {
5459
- var _beginCheckingAt$expi;
5460
5459
  const {
5461
5460
  time,
5462
5461
  stream
5463
5462
  } = first.value.value;
5464
- const beginCheckingAt = date.toExpires(time, timeUntilActive);
5463
+ const beginCheckingAt = util.calculateExpirationDate({
5464
+ expiresFromDate: time,
5465
+ expiresIn: timeUntilActive
5466
+ });
5465
5467
  // don't start streaming until the given moment.
5466
- return rxjs.timer((_beginCheckingAt$expi = beginCheckingAt.expiresAt) != null ? _beginCheckingAt$expi : new Date()).pipe(rxjs.switchMap(() => stream().pipe(rxjs.skip(1) // skip the first value, as it should be equivalent to the query results given.
5468
+ return rxjs.timer(beginCheckingAt).pipe(rxjs.switchMap(() => stream().pipe(rxjs.skip(1) // skip the first value, as it should be equivalent to the query results given.
5467
5469
  )));
5468
5470
  }), rxjs.shareReplay(1));
5469
5471
  const event$ = stream$.pipe(rxjs.map(event => {
@@ -8526,6 +8528,29 @@ function firebaseStorageClientDrivers() {
8526
8528
  */
8527
8529
  const clientFirebaseStorageContextFactory = firebaseStorageContextFactory(firebaseStorageClientDrivers());
8528
8530
 
8531
+ /**
8532
+ * Creates a NotificationBoxId from the input FirestoreModelKey.
8533
+ *
8534
+ * @param modelKey
8535
+ * @returns
8536
+ */
8537
+ const notificationBoxIdForModel = twoWayFlatFirestoreModelKey;
8538
+ const inferNotificationBoxRelatedModelKey = inferKeyFromTwoWayFlatFirestoreModelKey;
8539
+ /**
8540
+ * Creates a NotificationSummaryId from the input FirestoreModelKey.
8541
+ *
8542
+ * @param modelKey
8543
+ * @returns
8544
+ */
8545
+ const notificationSummaryIdForModel = twoWayFlatFirestoreModelKey;
8546
+ function notificationSummaryIdForUidFunctionForRootFirestoreModelIdentity(userModelIdentity) {
8547
+ return uid => twoWayFlatFirestoreModelKey(firestoreModelKey(userModelIdentity, uid));
8548
+ }
8549
+ /**
8550
+ * The default notification template type that can be provided to subscribe to notifications not specified in the configurations.
8551
+ */
8552
+ const DEFAULT_NOTIFICATION_TEMPLATE_TYPE = 'D';
8553
+
8529
8554
  function mergeNotificationBoxRecipientTemplateConfigs(a, b) {
8530
8555
  const {
8531
8556
  sd,
@@ -8922,6 +8947,9 @@ class NotificationBoxDocument extends AbstractFirestoreDocument {
8922
8947
  get modelIdentity() {
8923
8948
  return notificationBoxIdentity;
8924
8949
  }
8950
+ get notificationBoxRelatedModelKey() {
8951
+ return inferNotificationBoxRelatedModelKey(this.id);
8952
+ }
8925
8953
  }
8926
8954
  const notificationBoxConverter = snapshotConverterFunctions({
8927
8955
  fields: {
@@ -9403,7 +9431,7 @@ class UpdateNotificationBoxRecipientParams extends UpdateNotificationBoxRecipien
9403
9431
  */
9404
9432
  this.uid = void 0;
9405
9433
  /**
9406
- * Whether or not to insert the user if they currently do not exist. Defaults to false.
9434
+ * Whether or not to create the user if they currently do not exist. Defaults to false.
9407
9435
  */
9408
9436
  this.insert = void 0;
9409
9437
  /**
@@ -9464,6 +9492,19 @@ class SendNotificationParams extends TargetModelParams {
9464
9492
  }
9465
9493
  __decorate([classTransformer.Expose(), classValidator.IsOptional(), classValidator.IsBoolean(), __metadata("design:type", Object)], SendNotificationParams.prototype, "ignoreSendAtThrottle", void 0);
9466
9494
  __decorate([classTransformer.Expose(), classValidator.IsOptional(), classValidator.IsBoolean(), __metadata("design:type", Object)], SendNotificationParams.prototype, "throwErrorIfSent", void 0);
9495
+ /**
9496
+ * Params class used for subscribing a system user to a NotificationBox for a model.
9497
+ */
9498
+ class AbstractSubscribeToNotificationBoxParams extends TargetModelParams {
9499
+ constructor(...args) {
9500
+ super(...args);
9501
+ /**
9502
+ * Notification recipient to subscribe to notifications
9503
+ */
9504
+ this.uid = void 0;
9505
+ }
9506
+ }
9507
+ __decorate([classTransformer.Expose(), IsFirestoreModelId(), __metadata("design:type", String)], AbstractSubscribeToNotificationBoxParams.prototype, "uid", void 0);
9467
9508
  /**
9468
9509
  * Used for sending queued notifications in the system.
9469
9510
  */
@@ -9483,35 +9524,13 @@ const notificationFunctionMap = callModelFirebaseFunctionMapFactory(notification
9483
9524
 
9484
9525
  const CREATE_NOTIFICATION_ID_REQUIRED_ERROR_CODE = 'CREATE_NOTIFICATION_ID_REQUIRED';
9485
9526
  const NOTIFICATION_MODEL_ALREADY_INITIALIZED_ERROR_CODE = 'NOTIFICATION_MODEL_ALREADY_INITIALIZED';
9527
+ const NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE = 'NOTIFICATION_BOX_DOES_NOT_EXIST';
9486
9528
  const NOTIFICATION_BOX_EXISTS_FOR_MODEL_ERROR_CODE = 'NOTIFICATION_BOX_EXISTS_FOR_MODEL';
9487
9529
  const NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST_ERROR_CODE = 'NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST';
9488
9530
  const NOTIFICATION_USER_INVALID_UID_FOR_CREATE_ERROR_CODE = 'NOTIFICATION_USER_INVALID_UID_FOR_CREATE';
9489
9531
  const NOTIFICATION_USER_BLOCKED_FROM_BEING_ADD_TO_RECIPIENTS_ERROR_CODE = 'NOTIFICATION_USER_BLOCKED_FROM_BEING_ADD_TO_RECIPIENTS';
9490
9532
  const NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED_ERROR_CODE = 'NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED';
9491
9533
 
9492
- /**
9493
- * Creates a NotificationBoxId from the input FirestoreModelKey.
9494
- *
9495
- * @param modelKey
9496
- * @returns
9497
- */
9498
- const notificationBoxIdForModel = twoWayFlatFirestoreModelKey;
9499
- const inferNotificationBoxRelatedModelKey = inferKeyFromTwoWayFlatFirestoreModelKey;
9500
- /**
9501
- * Creates a NotificationSummaryId from the input FirestoreModelKey.
9502
- *
9503
- * @param modelKey
9504
- * @returns
9505
- */
9506
- const notificationSummaryIdForModel = twoWayFlatFirestoreModelKey;
9507
- function notificationSummaryIdForUidFunctionForRootFirestoreModelIdentity(userModelIdentity) {
9508
- return uid => twoWayFlatFirestoreModelKey(firestoreModelKey(userModelIdentity, uid));
9509
- }
9510
- /**
9511
- * The default notification template type that can be provided to subscribe to notifications not specified in the configurations.
9512
- */
9513
- const DEFAULT_NOTIFICATION_TEMPLATE_TYPE = 'D';
9514
-
9515
9534
  /**
9516
9535
  * Updates a NotificationUserDefaultNotificationBoxRecipientConfig with the input UpdateNotificationUserDefaultNotificationBoxRecipientConfigParams.
9517
9536
  *
@@ -9758,7 +9777,7 @@ function shouldSendCreatedNotificationInput(input) {
9758
9777
  sendNotificationThrottleTime: inputSendNotificationThrottleTime
9759
9778
  } = input;
9760
9779
  const sendNotificationThrottleTime = inputSendNotificationThrottleTime != null ? inputSendNotificationThrottleTime : util.MS_IN_HOUR;
9761
- const isNotThrottled = sendNotificationThrottleDate ? date.timeHasExpired(sendNotificationThrottleDate, sendNotificationThrottleTime) : true;
9780
+ const isNotThrottled = sendNotificationThrottleDate ? !util.isThrottled(sendNotificationThrottleTime, sendNotificationThrottleDate) : true;
9762
9781
  return sendNotification !== false && isNotThrottled;
9763
9782
  }
9764
9783
  /**
@@ -10209,6 +10228,22 @@ function mergeNotificationBoxRecipients(a, b) {
10209
10228
  c: Object.assign({}, a.c, b.c)
10210
10229
  });
10211
10230
  }
10231
+ function loadNotificationBoxDocumentForReferencePair(input, accessor) {
10232
+ const {
10233
+ notificationBoxDocument: inputNotificationBoxDocument,
10234
+ notificationBoxRelatedModelKey: inputNotificationBoxRelatedModelKey
10235
+ } = input;
10236
+ let notificationBoxDocument;
10237
+ if (inputNotificationBoxDocument != null) {
10238
+ notificationBoxDocument = inputNotificationBoxDocument;
10239
+ } else if (inputNotificationBoxRelatedModelKey) {
10240
+ const notificationBoxId = notificationBoxIdForModel(inputNotificationBoxRelatedModelKey);
10241
+ notificationBoxDocument = accessor.loadDocumentForId(notificationBoxId);
10242
+ } else {
10243
+ throw new Error('NotificationBoxDocument or NotificationBoxRelatedModelKey is required');
10244
+ }
10245
+ return notificationBoxDocument;
10246
+ }
10212
10247
 
10213
10248
  // MARK: Collection
10214
10249
  class SystemStateFirestoreCollections {}
@@ -10256,6 +10291,7 @@ function systemStateFirestoreCollection(firestoreContext, converters) {
10256
10291
  exports.AbstractFirestoreDocument = AbstractFirestoreDocument;
10257
10292
  exports.AbstractFirestoreDocumentDataAccessorWrapper = AbstractFirestoreDocumentDataAccessorWrapper;
10258
10293
  exports.AbstractFirestoreDocumentWithParent = AbstractFirestoreDocumentWithParent;
10294
+ exports.AbstractSubscribeToNotificationBoxParams = AbstractSubscribeToNotificationBoxParams;
10259
10295
  exports.AppNotificationTemplateTypeInfoRecordService = AppNotificationTemplateTypeInfoRecordService;
10260
10296
  exports.BASE_MODEL_STORAGE_FILE_PATH = BASE_MODEL_STORAGE_FILE_PATH;
10261
10297
  exports.CALL_MODEL_APP_FUNCTION_KEY = CALL_MODEL_APP_FUNCTION_KEY;
@@ -10330,6 +10366,7 @@ exports.MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_DEFAULT = MODEL_FUNCTION
10330
10366
  exports.MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_SPLITTER = MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_SPLITTER;
10331
10367
  exports.MODEL_STORAGE_FILE_SLASH_PATH_FACTORY = MODEL_STORAGE_FILE_SLASH_PATH_FACTORY;
10332
10368
  exports.ModifyBeforeSetFirestoreDocumentDataAccessorWrapper = ModifyBeforeSetFirestoreDocumentDataAccessorWrapper;
10369
+ exports.NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE = NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE;
10333
10370
  exports.NOTIFICATION_BOX_EXISTS_FOR_MODEL_ERROR_CODE = NOTIFICATION_BOX_EXISTS_FOR_MODEL_ERROR_CODE;
10334
10371
  exports.NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST_ERROR_CODE = NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST_ERROR_CODE;
10335
10372
  exports.NOTIFICATION_MESSAGE_MAX_LENGTH = NOTIFICATION_MESSAGE_MAX_LENGTH;
@@ -10614,6 +10651,7 @@ exports.loadDocumentsForKeys = loadDocumentsForKeys;
10614
10651
  exports.loadDocumentsForKeysFromValues = loadDocumentsForKeysFromValues;
10615
10652
  exports.loadDocumentsForSnapshots = loadDocumentsForSnapshots;
10616
10653
  exports.loadDocumentsForValues = loadDocumentsForValues;
10654
+ exports.loadNotificationBoxDocumentForReferencePair = loadNotificationBoxDocumentForReferencePair;
10617
10655
  exports.makeDocuments = makeDocuments;
10618
10656
  exports.makeFirestoreCollection = makeFirestoreCollection;
10619
10657
  exports.makeFirestoreCollectionGroup = makeFirestoreCollectionGroup;
package/index.esm.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { increment, onSnapshot, getDoc, deleteDoc, setDoc, updateDoc, doc, collectionGroup, collection, runTransaction, writeBatch, limit as limit$1, limitToLast as limitToLast$1, orderBy as orderBy$1, documentId, where as where$1, startAt as startAt$1, startAfter as startAfter$1, endAt as endAt$1, endBefore as endBefore$1, getCountFromServer, getDocs, query } from 'firebase/firestore';
2
- import { cachedGetter, mergeModifiers, asArray, filterUndefinedValues, objectHasNoKeys, filterFalsyAndEmptyValues, build, wrapUseAsyncFunction, makeWithFactory, performMakeLoop, runAsyncTasksForValues, filterMaybeArrayValues, useAsync, toModelFieldConversions, makeModelMapFunctions, modifyModelMapFunctions, assignValuesToPOJOFunction, KeyValueTypleValueFilter, asObjectCopyFactory, passThrough, isEqualToValueDecisionFunction, transformStringFunctionConfig, transformStringFunction, isDate, transformNumberFunction, sortValuesFunctionOrMapIdentityWithSortRef, unique, isMapIdentityFunction, chainMapSameFunctions, filterUniqueFunction, filterUniqueTransform, filterFromPOJOFunction, mapObjectMapFunction, copyObject, mapObjectMap, filterEmptyArrayValues, modelFieldMapFunctions, toModelMapFunctions, latLngStringFunction, DEFAULT_LAT_LNG_STRING_VALUE, sortAscendingIndexNumberRefFunction, bitwiseSetDencoder, MAP_IDENTITY, filterNullAndUndefinedValues, convertToArray, pushItemOrArrayItemsIntoArray, separateValues, UTF_8_START_CHARACTER, UTF_PRIVATE_USAGE_AREA_START, mergeArraysIntoArray, lastValue, flattenArrayOrValueArray, performAsyncTasks, batch, allowValueOnceFilter, asGetter, getValueFromGetter, mapIdentityFunction, performTasksFromFactoryInParallelFunction, flattenArray, groupValues, forEachInIterable, stringContains, arrayToObject, takeFront, isOddNumber, objectToMap, ServerErrorResponse, toReadableError, capitalizeFirstLetter, lowercaseFirstLetter, toRelativeSlashPathStartType, mappedUseFunction, iterableToArray, setContainsAllValues, usePromise, slashPathFactory, errorMessageContainsString, bitwiseObjectDencoder, updateMaybeValue, mergeObjects, mergeObjectsFunction, UNSET_INDEX_NUMBER, forEachKeyValue, ModelRelationUtility, filterKeysOnPOJOFunction, areEqualPOJOValuesUsingPojoFilter, filterOnlyUndefinedValues, makeModelMap, MS_IN_HOUR, multiValueMapBuilder } from '@dereekb/util';
2
+ import { cachedGetter, mergeModifiers, asArray, filterUndefinedValues, objectHasNoKeys, filterFalsyAndEmptyValues, build, wrapUseAsyncFunction, makeWithFactory, performMakeLoop, runAsyncTasksForValues, filterMaybeArrayValues, useAsync, toModelFieldConversions, makeModelMapFunctions, modifyModelMapFunctions, assignValuesToPOJOFunction, KeyValueTypleValueFilter, asObjectCopyFactory, passThrough, isEqualToValueDecisionFunction, transformStringFunctionConfig, transformStringFunction, isDate, transformNumberFunction, sortValuesFunctionOrMapIdentityWithSortRef, unique, isMapIdentityFunction, chainMapSameFunctions, filterUniqueFunction, filterUniqueTransform, filterFromPOJOFunction, mapObjectMapFunction, copyObject, mapObjectMap, filterEmptyArrayValues, modelFieldMapFunctions, toModelMapFunctions, latLngStringFunction, DEFAULT_LAT_LNG_STRING_VALUE, sortAscendingIndexNumberRefFunction, bitwiseSetDencoder, MAP_IDENTITY, filterNullAndUndefinedValues, convertToArray, pushItemOrArrayItemsIntoArray, separateValues, UTF_8_START_CHARACTER, UTF_PRIVATE_USAGE_AREA_START, mergeArraysIntoArray, lastValue, flattenArrayOrValueArray, performAsyncTasks, batch, allowValueOnceFilter, asGetter, getValueFromGetter, mapIdentityFunction, performTasksFromFactoryInParallelFunction, flattenArray, calculateExpirationDate, groupValues, forEachInIterable, stringContains, arrayToObject, takeFront, isOddNumber, objectToMap, ServerErrorResponse, toReadableError, capitalizeFirstLetter, lowercaseFirstLetter, toRelativeSlashPathStartType, mappedUseFunction, iterableToArray, setContainsAllValues, usePromise, slashPathFactory, errorMessageContainsString, bitwiseObjectDencoder, updateMaybeValue, mergeObjects, mergeObjectsFunction, UNSET_INDEX_NUMBER, forEachKeyValue, ModelRelationUtility, filterKeysOnPOJOFunction, areEqualPOJOValuesUsingPojoFilter, filterOnlyUndefinedValues, makeModelMap, isThrottled, MS_IN_HOUR, multiValueMapBuilder } from '@dereekb/util';
3
3
  import { filterMaybe, lazyFrom, itemAccumulator, ItemPageIterator, mappedPageItemIteration } from '@dereekb/rxjs';
4
4
  import { from, map, combineLatest, shareReplay, of, exhaustMap, Observable, switchMap, timer, skip } from 'rxjs';
5
5
  import { UNKNOWN_WEBSITE_LINK_TYPE, decodeWebsiteLinkEncodedDataToWebsiteFileLink, encodeWebsiteFileLinkToWebsiteLinkEncodedData, AbstractModelPermissionService, grantedRoleMapReader, noAccessRoleMap, fullAccessRoleMap, IsE164PhoneNumber } from '@dereekb/model';
6
- import { formatToISO8601DateString, toJsDate, toISODateString, isSameDate, dateRange, toExpires, sortByDateFunction, yearWeekCode, UNKNOWN_YEAR_WEEK_CODE, timeHasExpired } from '@dereekb/date';
6
+ import { formatToISO8601DateString, toJsDate, toISODateString, isSameDate, dateRange, sortByDateFunction, yearWeekCode, UNKNOWN_YEAR_WEEK_CODE } from '@dereekb/date';
7
7
  import { httpsCallable } from 'firebase/functions';
8
8
  import { ref, getMetadata, getDownloadURL, uploadString, uploadBytes, getBytes, getBlob, uploadBytesResumable, deleteObject, list } from 'firebase/storage';
9
9
  import { Expose, Type } from 'class-transformer';
@@ -5859,15 +5859,17 @@ function iterationQueryDocChangeWatcher(config) {
5859
5859
  delay: timeUntilActive = DEFAULT_QUERY_CHANGE_WATCHER_DELAY
5860
5860
  } = config;
5861
5861
  const stream$ = instance.snapshotIteration.firstSuccessfulPageResults$.pipe(switchMap(first => {
5862
- var _beginCheckingAt$expi;
5863
5862
  const {
5864
5863
  time,
5865
5864
  stream
5866
5865
  } = first.value.value;
5867
- const beginCheckingAt = toExpires(time, timeUntilActive);
5866
+ const beginCheckingAt = calculateExpirationDate({
5867
+ expiresFromDate: time,
5868
+ expiresIn: timeUntilActive
5869
+ });
5868
5870
 
5869
5871
  // don't start streaming until the given moment.
5870
- return timer((_beginCheckingAt$expi = beginCheckingAt.expiresAt) != null ? _beginCheckingAt$expi : new Date()).pipe(switchMap(() => stream().pipe(skip(1) // skip the first value, as it should be equivalent to the query results given.
5872
+ return timer(beginCheckingAt).pipe(switchMap(() => stream().pipe(skip(1) // skip the first value, as it should be equivalent to the query results given.
5871
5873
  )));
5872
5874
  }), shareReplay(1));
5873
5875
  const event$ = stream$.pipe(map(event => {
@@ -9297,6 +9299,48 @@ function firebaseStorageClientDrivers() {
9297
9299
  */
9298
9300
  const clientFirebaseStorageContextFactory = firebaseStorageContextFactory(firebaseStorageClientDrivers());
9299
9301
 
9302
+ /**
9303
+ * The NotificationBox's id is the two way flat firestore model key of the object that it represents.
9304
+ */
9305
+
9306
+ /**
9307
+ * Creates a NotificationBoxId from the input FirestoreModelKey.
9308
+ *
9309
+ * @param modelKey
9310
+ * @returns
9311
+ */
9312
+ const notificationBoxIdForModel = twoWayFlatFirestoreModelKey;
9313
+ const inferNotificationBoxRelatedModelKey = inferKeyFromTwoWayFlatFirestoreModelKey;
9314
+ /**
9315
+ * Creates a NotificationSummaryId from the input FirestoreModelKey.
9316
+ *
9317
+ * @param modelKey
9318
+ * @returns
9319
+ */
9320
+ const notificationSummaryIdForModel = twoWayFlatFirestoreModelKey;
9321
+
9322
+ /**
9323
+ * Function used to retrieve a NotificationSummaryId given the input FirestoreAuthUserId.
9324
+ */
9325
+
9326
+ function notificationSummaryIdForUidFunctionForRootFirestoreModelIdentity(userModelIdentity) {
9327
+ return uid => twoWayFlatFirestoreModelKey(firestoreModelKey(userModelIdentity, uid));
9328
+ }
9329
+ /**
9330
+ * The default notification template type that can be provided to subscribe to notifications not specified in the configurations.
9331
+ */
9332
+ const DEFAULT_NOTIFICATION_TEMPLATE_TYPE = 'D';
9333
+
9334
+ /**
9335
+ * Template type identifier of the notification.
9336
+ *
9337
+ * Provides default information for the notification.
9338
+ *
9339
+ * Types are generally intended to be handled case-insensitively by notification services.
9340
+ *
9341
+ * Ideally type type values are shorter to reduce database size impact.
9342
+ */
9343
+
9300
9344
  /**
9301
9345
  * Notification configuration state for a template.
9302
9346
  *
@@ -9804,6 +9848,9 @@ class NotificationBoxDocument extends AbstractFirestoreDocument {
9804
9848
  get modelIdentity() {
9805
9849
  return notificationBoxIdentity;
9806
9850
  }
9851
+ get notificationBoxRelatedModelKey() {
9852
+ return inferNotificationBoxRelatedModelKey(this.id);
9853
+ }
9807
9854
  }
9808
9855
  const notificationBoxConverter = snapshotConverterFunctions({
9809
9856
  fields: {
@@ -10008,7 +10055,7 @@ function notificationWeekFirestoreCollectionGroup(firestoreContext) {
10008
10055
  });
10009
10056
  }
10010
10057
 
10011
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _dec28, _dec29, _dec30, _dec31, _class2, _descriptor8, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41, _dec42, _dec43, _dec44, _dec45, _dec46, _dec47, _dec48, _dec49, _dec50, _dec51, _dec52, _dec53, _dec54, _dec55, _dec56, _dec57, _dec58, _dec59, _dec60, _dec61, _class3, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _dec62, _dec63, _dec64, _dec65, _dec66, _dec67, _dec68, _dec69, _dec70, _dec71, _dec72, _dec73, _dec74, _dec75, _dec76, _dec77, _dec78, _dec79, _class4, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _dec80, _dec81, _dec82, _dec83, _dec84, _dec85, _dec86, _dec87, _dec88, _dec89, _dec90, _dec91, _dec92, _dec93, _dec94, _dec95, _dec96, _dec97, _dec98, _dec99, _dec100, _dec101, _dec102, _class5, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _dec103, _dec104, _dec105, _dec106, _dec107, _dec108, _dec109, _dec110, _dec111, _dec112, _dec113, _dec114, _dec115, _dec116, _dec117, _dec118, _class6, _descriptor26, _descriptor27, _descriptor28, _dec119, _dec120, _dec121, _dec122, _class7, _descriptor29, _dec123, _dec124, _dec125, _dec126, _dec127, _dec128, _dec129, _dec130, _dec131, _class8, _descriptor30, _descriptor31, _dec132, _dec133, _dec134, _dec135, _class9, _descriptor32, _dec136, _dec137, _dec138, _dec139, _class10, _descriptor33, _dec140, _dec141, _dec142, _dec143, _dec144, _dec145, _dec146, _dec147, _dec148, _dec149, _dec150, _dec151, _dec152, _dec153, _dec154, _dec155, _dec156, _dec157, _dec158, _dec159, _dec160, _dec161, _dec162, _dec163, _class11, _descriptor34, _descriptor35, _descriptor36, _descriptor37, _descriptor38, _descriptor39, _dec164, _dec165, _dec166, _dec167, _dec168, _dec169, _dec170, _dec171, _dec172, _dec173, _dec174, _dec175, _dec176, _dec177, _dec178, _dec179, _dec180, _dec181, _class12, _descriptor40, _descriptor41, _descriptor42, _descriptor43, _dec182, _dec183, _dec184, _dec185, _dec186, _dec187, _dec188, _dec189, _class13, _descriptor44, _descriptor45;
10058
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _dec28, _dec29, _dec30, _dec31, _class2, _descriptor8, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41, _dec42, _dec43, _dec44, _dec45, _dec46, _dec47, _dec48, _dec49, _dec50, _dec51, _dec52, _dec53, _dec54, _dec55, _dec56, _dec57, _dec58, _dec59, _dec60, _dec61, _class3, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _dec62, _dec63, _dec64, _dec65, _dec66, _dec67, _dec68, _dec69, _dec70, _dec71, _dec72, _dec73, _dec74, _dec75, _dec76, _dec77, _dec78, _dec79, _class4, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _dec80, _dec81, _dec82, _dec83, _dec84, _dec85, _dec86, _dec87, _dec88, _dec89, _dec90, _dec91, _dec92, _dec93, _dec94, _dec95, _dec96, _dec97, _dec98, _dec99, _dec100, _dec101, _dec102, _class5, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _dec103, _dec104, _dec105, _dec106, _dec107, _dec108, _dec109, _dec110, _dec111, _dec112, _dec113, _dec114, _dec115, _dec116, _dec117, _dec118, _class6, _descriptor26, _descriptor27, _descriptor28, _dec119, _dec120, _dec121, _dec122, _class7, _descriptor29, _dec123, _dec124, _dec125, _dec126, _dec127, _dec128, _dec129, _dec130, _dec131, _class8, _descriptor30, _descriptor31, _dec132, _dec133, _dec134, _dec135, _class9, _descriptor32, _dec136, _dec137, _dec138, _dec139, _class10, _descriptor33, _dec140, _dec141, _dec142, _dec143, _dec144, _dec145, _dec146, _dec147, _dec148, _dec149, _dec150, _dec151, _dec152, _dec153, _dec154, _dec155, _dec156, _dec157, _dec158, _dec159, _dec160, _dec161, _dec162, _dec163, _class11, _descriptor34, _descriptor35, _descriptor36, _descriptor37, _descriptor38, _descriptor39, _dec164, _dec165, _dec166, _dec167, _dec168, _dec169, _dec170, _dec171, _dec172, _dec173, _dec174, _dec175, _dec176, _dec177, _dec178, _dec179, _dec180, _dec181, _class12, _descriptor40, _descriptor41, _descriptor42, _descriptor43, _dec182, _dec183, _dec184, _dec185, _dec186, _dec187, _dec188, _dec189, _class13, _descriptor44, _descriptor45, _dec190, _dec191, _dec192, _class14, _descriptor46;
10012
10059
  const NOTIFICATION_RECIPIENT_NAME_MIN_LENGTH = 0;
10013
10060
  const NOTIFICATION_RECIPIENT_NAME_MAX_LENGTH = 42;
10014
10061
  const NOTIFICATION_SUBJECT_MIN_LENGTH = 2;
@@ -10381,7 +10428,7 @@ let UpdateNotificationBoxRecipientParams = (_dec140 = Expose(), _dec141 = IsNotE
10381
10428
  */
10382
10429
  _initializerDefineProperty(this, "uid", _descriptor36, this);
10383
10430
  /**
10384
- * Whether or not to insert the user if they currently do not exist. Defaults to false.
10431
+ * Whether or not to create the user if they currently do not exist. Defaults to false.
10385
10432
  */
10386
10433
  _initializerDefineProperty(this, "insert", _descriptor37, this);
10387
10434
  /**
@@ -10491,6 +10538,24 @@ let SendNotificationParams = (_dec182 = Expose(), _dec183 = IsOptional(), _dec18
10491
10538
  writable: true,
10492
10539
  initializer: null
10493
10540
  })), _class13));
10541
+
10542
+ /**
10543
+ * Params class used for subscribing a system user to a NotificationBox for a model.
10544
+ */
10545
+ let AbstractSubscribeToNotificationBoxParams = (_dec190 = Expose(), _dec191 = IsFirestoreModelId(), _dec192 = Reflect.metadata("design:type", typeof FirebaseAuthUserId === "undefined" ? Object : FirebaseAuthUserId), (_class14 = class AbstractSubscribeToNotificationBoxParams extends TargetModelParams {
10546
+ constructor(...args) {
10547
+ super(...args);
10548
+ /**
10549
+ * Notification recipient to subscribe to notifications
10550
+ */
10551
+ _initializerDefineProperty(this, "uid", _descriptor46, this);
10552
+ }
10553
+ }, (_descriptor46 = _applyDecoratedDescriptor(_class14.prototype, "uid", [_dec190, _dec191, _dec192], {
10554
+ configurable: true,
10555
+ enumerable: true,
10556
+ writable: true,
10557
+ initializer: null
10558
+ })), _class14));
10494
10559
  /**
10495
10560
  * Used for sending queued notifications in the system.
10496
10561
  */
@@ -10519,54 +10584,13 @@ const notificationFunctionMap = callModelFirebaseFunctionMapFactory(notification
10519
10584
 
10520
10585
  const CREATE_NOTIFICATION_ID_REQUIRED_ERROR_CODE = 'CREATE_NOTIFICATION_ID_REQUIRED';
10521
10586
  const NOTIFICATION_MODEL_ALREADY_INITIALIZED_ERROR_CODE = 'NOTIFICATION_MODEL_ALREADY_INITIALIZED';
10587
+ const NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE = 'NOTIFICATION_BOX_DOES_NOT_EXIST';
10522
10588
  const NOTIFICATION_BOX_EXISTS_FOR_MODEL_ERROR_CODE = 'NOTIFICATION_BOX_EXISTS_FOR_MODEL';
10523
10589
  const NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST_ERROR_CODE = 'NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST';
10524
10590
  const NOTIFICATION_USER_INVALID_UID_FOR_CREATE_ERROR_CODE = 'NOTIFICATION_USER_INVALID_UID_FOR_CREATE';
10525
10591
  const NOTIFICATION_USER_BLOCKED_FROM_BEING_ADD_TO_RECIPIENTS_ERROR_CODE = 'NOTIFICATION_USER_BLOCKED_FROM_BEING_ADD_TO_RECIPIENTS';
10526
10592
  const NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED_ERROR_CODE = 'NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED';
10527
10593
 
10528
- /**
10529
- * The NotificationBox's id is the two way flat firestore model key of the object that it represents.
10530
- */
10531
-
10532
- /**
10533
- * Creates a NotificationBoxId from the input FirestoreModelKey.
10534
- *
10535
- * @param modelKey
10536
- * @returns
10537
- */
10538
- const notificationBoxIdForModel = twoWayFlatFirestoreModelKey;
10539
- const inferNotificationBoxRelatedModelKey = inferKeyFromTwoWayFlatFirestoreModelKey;
10540
- /**
10541
- * Creates a NotificationSummaryId from the input FirestoreModelKey.
10542
- *
10543
- * @param modelKey
10544
- * @returns
10545
- */
10546
- const notificationSummaryIdForModel = twoWayFlatFirestoreModelKey;
10547
-
10548
- /**
10549
- * Function used to retrieve a NotificationSummaryId given the input FirestoreAuthUserId.
10550
- */
10551
-
10552
- function notificationSummaryIdForUidFunctionForRootFirestoreModelIdentity(userModelIdentity) {
10553
- return uid => twoWayFlatFirestoreModelKey(firestoreModelKey(userModelIdentity, uid));
10554
- }
10555
- /**
10556
- * The default notification template type that can be provided to subscribe to notifications not specified in the configurations.
10557
- */
10558
- const DEFAULT_NOTIFICATION_TEMPLATE_TYPE = 'D';
10559
-
10560
- /**
10561
- * Template type identifier of the notification.
10562
- *
10563
- * Provides default information for the notification.
10564
- *
10565
- * Types are generally intended to be handled case-insensitively by notification services.
10566
- *
10567
- * Ideally type type values are shorter to reduce database size impact.
10568
- */
10569
-
10570
10594
  /**
10571
10595
  * Updates a NotificationUserDefaultNotificationBoxRecipientConfig with the input UpdateNotificationUserDefaultNotificationBoxRecipientConfigParams.
10572
10596
  *
@@ -10766,7 +10790,7 @@ function shouldSendCreatedNotificationInput(input) {
10766
10790
  sendNotificationThrottleTime: inputSendNotificationThrottleTime
10767
10791
  } = input;
10768
10792
  const sendNotificationThrottleTime = inputSendNotificationThrottleTime != null ? inputSendNotificationThrottleTime : MS_IN_HOUR;
10769
- const isNotThrottled = sendNotificationThrottleDate ? timeHasExpired(sendNotificationThrottleDate, sendNotificationThrottleTime) : true;
10793
+ const isNotThrottled = sendNotificationThrottleDate ? !isThrottled(sendNotificationThrottleTime, sendNotificationThrottleDate) : true;
10770
10794
  return sendNotification !== false && isNotThrottled;
10771
10795
  }
10772
10796
  /**
@@ -11337,6 +11361,25 @@ function mergeNotificationBoxRecipients(a, b) {
11337
11361
  });
11338
11362
  }
11339
11363
 
11364
+ // MARK: NotificationBox
11365
+
11366
+ function loadNotificationBoxDocumentForReferencePair(input, accessor) {
11367
+ const {
11368
+ notificationBoxDocument: inputNotificationBoxDocument,
11369
+ notificationBoxRelatedModelKey: inputNotificationBoxRelatedModelKey
11370
+ } = input;
11371
+ let notificationBoxDocument;
11372
+ if (inputNotificationBoxDocument != null) {
11373
+ notificationBoxDocument = inputNotificationBoxDocument;
11374
+ } else if (inputNotificationBoxRelatedModelKey) {
11375
+ const notificationBoxId = notificationBoxIdForModel(inputNotificationBoxRelatedModelKey);
11376
+ notificationBoxDocument = accessor.loadDocumentForId(notificationBoxId);
11377
+ } else {
11378
+ throw new Error('NotificationBoxDocument or NotificationBoxRelatedModelKey is required');
11379
+ }
11380
+ return notificationBoxDocument;
11381
+ }
11382
+
11340
11383
  // MARK: Collection
11341
11384
  class SystemStateFirestoreCollections {
11342
11385
  constructor() {
@@ -11408,4 +11451,4 @@ function systemStateFirestoreCollection(firestoreContext, converters) {
11408
11451
  });
11409
11452
  }
11410
11453
 
11411
- export { 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, CleanupSentNotificationsParams, ContextGrantedModelRolesReaderInstance, CreateNotificationBoxParams, CreateNotificationSummaryParams, CreateNotificationUserParams, 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_TEMPLATE_TYPE, DEFAULT_QUERY_CHANGE_WATCHER_DELAY, DEFAULT_SINGLE_ITEM_FIRESTORE_COLLECTION_DOCUMENT_IDENTIFIER, DEFAULT_WEBSITE_LINK, FIREBASE_AUTH_NETWORK_REQUEST_ERROR, FIREBASE_AUTH_NETWORK_REQUEST_FAILED, FIREBASE_AUTH_PASSWORD_MAX_LENGTH, FIREBASE_AUTH_PASSWORD_MIN_LENGTH, FIREBASE_AUTH_USER_NOT_FOUND_ERROR, FIREBASE_AUTH_WRONG_PASSWORD, FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY, FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY, FIREBASE_SERVER_AUTH_CLAIMS_RESET_PASSWORD_KEY, FIREBASE_SERVER_AUTH_CLAIMS_SETUP_LAST_COM_DATE_KEY, FIREBASE_SERVER_AUTH_CLAIMS_SETUP_PASSWORD_KEY, FIRESTORE_CLIENT_QUERY_CONSTRAINT_HANDLER_MAPPING, FIRESTORE_COLLECTION_NAME_SEPARATOR, FIRESTORE_DUMMY_MODEL_KEY, FIRESTORE_EMPTY_VALUE, FIRESTORE_END_AT_QUERY_CONSTRAINT_TYPE, FIRESTORE_END_AT_VALUE_QUERY_CONSTRAINT_TYPE, FIRESTORE_END_BEFORE_QUERY_CONSTRAINT_TYPE, FIRESTORE_ITEM_PAGE_ITERATOR, FIRESTORE_ITEM_PAGE_ITERATOR_DELEGATE, FIRESTORE_LIMIT_QUERY_CONSTRAINT_TYPE, FIRESTORE_LIMIT_TO_LAST_QUERY_CONSTRAINT_TYPE, FIRESTORE_MAX_WHERE_IN_FILTER_ARGS_COUNT, FIRESTORE_MODEL_ID_REGEX, FIRESTORE_MODEL_KEY_REGEX, FIRESTORE_MODEL_KEY_REGEX_STRICT, FIRESTORE_OFFSET_QUERY_CONSTRAINT_TYPE, FIRESTORE_ORDER_BY_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, FIRESTORE_ORDER_BY_QUERY_CONSTRAINT_TYPE, FIRESTORE_PASSTHROUGH_FIELD, FIRESTORE_PERMISSION_DENIED_ERROR_CODE, FIRESTORE_START_AFTER_QUERY_CONSTRAINT_TYPE, FIRESTORE_START_AT_QUERY_CONSTRAINT_TYPE, FIRESTORE_START_AT_VALUE_QUERY_CONSTRAINT_TYPE, FIRESTORE_WHERE_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, FIRESTORE_WHERE_QUERY_CONSTRAINT_TYPE, FirebaseDevelopmentFunctions, FirebaseModelPermissionServiceInstance, FirebaseServerError, FirestoreAccessorStreamMode, FirestoreDocumentContextType, InferredTargetModelIdParams, InferredTargetModelParams, InitializeAllApplicableNotificationBoxesParams, InitializeAllApplicableNotificationSummariesParams, InitializeNotificationModelParams, IsFirestoreModelId, IsFirestoreModelIdOrKey, IsFirestoreModelKey, 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_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_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, NotificationBoxRecipientTemplateConfigArrayEntryParam, NotificationBoxRecipientTemplateConfigBoolean, NotificationDocument, NotificationFirestoreCollections, NotificationFunctions, NotificationMessageFlag, NotificationRecipientParams, NotificationRecipientSendFlag, NotificationSendState, NotificationSendType, NotificationSummaryDocument, NotificationType, NotificationUserDocument, NotificationWeekDocument, RUN_DEV_FUNCTION_APP_FUNCTION_KEY, ResyncAllNotificationUserParams, ResyncNotificationUserParams, SCHEDULED_FUNCTION_DEV_FUNCTION_SPECIFIER, ScheduledFunctionDevelopmentFirebaseFunctionListEntry, ScheduledFunctionDevelopmentFirebaseFunctionParams, ScheduledFunctionDevelopmentFunctionTypeEnum, SendNotificationParams, SendQueuedNotificationsParams, SystemStateDocument, SystemStateFirestoreCollections, TargetModelIdParams, TargetModelParams, UpdateNotificationBoxParams, UpdateNotificationBoxRecipientLikeParams, UpdateNotificationBoxRecipientParams, UpdateNotificationSummaryParams, UpdateNotificationUserDefaultNotificationBoxRecipientConfigParams, UpdateNotificationUserNotificationBoxRecipientParams, UpdateNotificationUserParams, addConstraintToBuilder, addOrReplaceLimitInConstraints, allChildDocumentsUnderParent, allChildDocumentsUnderParentPath, allChildDocumentsUnderRelativePath, allowDocumentSnapshotWithPathOnceFilter, allowedNotificationRecipients, appNotificationTemplateTypeInfoRecordService, asTopLevelFieldPath, asTopLevelFieldPaths, assertFirestoreUpdateHasData, assertStorageUploadOptionsStringFormat, assignDateCellRangeFunction, assignDateCellScheduleFunction, assignUnitedStatesAddressFunction, assignWebsiteFileLinkFunction, assignWebsiteLinkFunction, buildFirebaseCollectionTypeModelTypeMap, callModelFirebaseFunctionMapFactory, childFirestoreModelKey, childFirestoreModelKeyPath, childFirestoreModelKeys, clientFirebaseFirestoreContextFactory, clientFirebaseStorageContextFactory, contextGrantedModelRolesReader, contextGrantedModelRolesReaderDoesNotExistErrorMessage, contextGrantedModelRolesReaderPermissionErrorMessage, convertHttpsCallableErrorToReadableError, copyDocumentIdForUserRelatedModifierFunction, copyDocumentIdToFieldModifierFunction, copyUserRelatedDataAccessorFactoryFunction, copyUserRelatedDataModifierConfig, createNotificationDocument, createNotificationDocumentIfSending, createNotificationDocumentPair, createNotificationTemplate, dataFromDocumentSnapshots, dataFromSnapshotStream, developmentFirebaseFunctionMapFactory, directDataHttpsCallable, documentData, documentDataFunction, documentDataWithIdAndKey, documentReferenceFromDocument, documentReferencesFromDocuments, documentReferencesFromSnapshot, effectiveNotificationBoxRecipientConfig, effectiveNotificationBoxRecipientTemplateConfig, endAt, endAtValue, endBefore, extendFirestoreCollectionWithSingleDocumentAccessor, filterConstraintsOfType, filterDisallowedFirestoreItemPageIteratorInputContraints, 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, firestoreClientIncrementUpdateToUpdateData, firestoreCollectionQueryFactory, firestoreContextFactory, firestoreDate, firestoreDateCellRange, firestoreDateCellRangeArray, firestoreDateCellRangeAssignFn, firestoreDateCellSchedule, firestoreDateCellScheduleAssignFn, firestoreDencoderArray, firestoreDencoderMap, firestoreDencoderStringArray, firestoreDocumentAccessorContextExtension, firestoreDocumentAccessorFactory, firestoreDocumentLoader, firestoreDocumentSnapshotPairsLoader, firestoreDocumentSnapshotPairsLoaderInstance, firestoreDummyKey, firestoreEncodedArray, firestoreEncodedObjectMap, firestoreEnum, firestoreEnumArray, firestoreField, firestoreFieldConfigToModelMapFunctionsRef, firestoreIdBatchVerifierFactory, firestoreIdentityTypeArray, firestoreIdentityTypeArrayName, firestoreItemPageIteration, firestoreItemPageIterationFactory, firestoreLatLngString, firestoreMap, firestoreMapZoomLevel, firestoreModelId, firestoreModelIdArrayField, firestoreModelIdFromDocument, firestoreModelIdGrantedRoleArrayMap, firestoreModelIdGrantedRoleMap, firestoreModelIdString, firestoreModelIdentity, firestoreModelIdentityTypeMap, firestoreModelIdsFromDocuments, firestoreModelIdsFromKey, firestoreModelKey, firestoreModelKeyArrayField, firestoreModelKeyCollectionName, firestoreModelKeyCollectionType, firestoreModelKeyCollectionTypeArray, firestoreModelKeyCollectionTypeArrayName, firestoreModelKeyCollectionTypePair, firestoreModelKeyEncodedGrantedRoleMap, firestoreModelKeyFromDocument, firestoreModelKeyGrantedRoleArrayMap, firestoreModelKeyGrantedRoleMap, firestoreModelKeyPairObject, firestoreModelKeyParentKey, firestoreModelKeyParentKeyPartPairs, firestoreModelKeyPart, firestoreModelKeyPartPairs, firestoreModelKeyPartPairsKeyPath, firestoreModelKeyPartPairsPaths, firestoreModelKeyPath, firestoreModelKeyString, 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, 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, inContextFirebaseModelServiceFactory, inContextFirebaseModelsServiceFactory, incrementUpdateWithAccessorFunction, inferKeyFromTwoWayFlatFirestoreModelKey, inferNotificationBoxRelatedModelKey, interceptAccessorFactoryFunction, isAdminInFirebaseModelContext, isClientFirebaseError, isCompleteNotificationSendState, isFirebaseStorageObjectNotFoundError, isFirestoreModelId, isFirestoreModelIdOrKey, isFirestoreModelKey, isOwnerOfUserRelatedModelInFirebaseModelContext, iterateFirestoreDocumentSnapshotBatches, iterateFirestoreDocumentSnapshotCheckpoints, iterateFirestoreDocumentSnapshotPairBatches, iterateFirestoreDocumentSnapshotPairs, iterateFirestoreDocumentSnapshots, iterationQueryDocChangeWatcher, iterationQueryDocChangeWatcherChangeTypeForGroup, latestDataFromDocuments, latestSnapshotsFromDocuments, lazyFirebaseFunctionsFactory, limit, limitToLast, limitedFirestoreDocumentAccessorFactory, loadAllFirestoreDocumentSnapshot, loadAllFirestoreDocumentSnapshotPairs, loadDocumentsForDocumentReferences, loadDocumentsForDocumentReferencesFromValues, loadDocumentsForIds, loadDocumentsForIdsFromValues, loadDocumentsForKeys, loadDocumentsForKeysFromValues, loadDocumentsForSnapshots, loadDocumentsForValues, makeDocuments, makeFirestoreCollection, makeFirestoreCollectionGroup, makeFirestoreCollectionWithParent, makeFirestoreItemPageIteratorDelegate, makeFirestoreQueryConstraintFunctionsDriver, makeRootSingleItemFirestoreCollection, makeSingleItemFirestoreCollection, mapDataFromSnapshot, mapHttpsCallable, mergeNotificationBoxRecipientTemplateConfigRecords, mergeNotificationBoxRecipientTemplateConfigs, mergeNotificationBoxRecipients, mergeNotificationSendMessagesResult, mergeNotificationUserDefaultNotificationBoxRecipientConfig, mergeNotificationUserNotificationBoxRecipientConfigs, modelStorageSlashPathFactory, modifyBeforeSetInterceptAccessorFactoryFunction, newDocuments, newNotificationBoxRecipientForUid, noContentNotificationMessageFunctionFactory, noStringFormatInStorageUploadOptionsError, notificationBoxCollectionReference, notificationBoxConverter, notificationBoxFirestoreCollection, notificationBoxIdForModel, notificationBoxIdentity, notificationBoxModelCrudFunctionsConfig, notificationBoxRecipientTemplateConfigArrayToRecord, notificationBoxRecipientTemplateConfigRecordToArray, notificationBoxesFlaggedForNeedsInitializationQuery, notificationBoxesFlaggedInvalidQuery, notificationCollectionReference, notificationCollectionReferenceFactory, notificationConverter, notificationFirestoreCollectionFactory, notificationFirestoreCollectionGroup, notificationFunctionMap, notificationFunctionTypeConfigMap, notificationIdentity, notificationMessageFunction, notificationSendFlagsImplyIsComplete, notificationSummariesFlaggedForNeedsInitializationQuery, notificationSummaryCollectionReference, notificationSummaryConverter, notificationSummaryFirestoreCollection, notificationSummaryIdForModel, notificationSummaryIdForUidFunctionForRootFirestoreModelIdentity, notificationSummaryIdentity, notificationTemplateTypeDetailsRecord, notificationTemplateTypeInfoRecord, notificationUserCollectionReference, notificationUserConverter, notificationUserFirestoreCollection, notificationUserIdentity, notificationUsersFlaggedForNeedsSyncQuery, notificationWeekCollectionReference, notificationWeekCollectionReferenceFactory, notificationWeekConverter, notificationWeekFirestoreCollectionFactory, notificationWeekFirestoreCollectionGroup, notificationWeekIdentity, notificationsPastSendAtTimeQuery, notificationsReadyForCleanupQuery, offset, onCallCreateModelParams, onCallCreateModelResult, onCallCreateModelResultWithDocs, onCallDeleteModelParams, onCallDevelopmentParams, onCallReadModelParams, onCallTypedModelParams, onCallTypedModelParamsFunction, onCallUpdateModelParams, optionalFirestoreArray, optionalFirestoreBoolean, optionalFirestoreDate, optionalFirestoreEnum, optionalFirestoreField, optionalFirestoreNumber, optionalFirestoreString, optionalFirestoreUID, optionalFirestoreUnitedStatesAddress, orderBy, orderByDocumentId, readFirestoreModelKey, readFirestoreModelKeyFromDocumentSnapshot, replaceConstraints, selectFromFirebaseModelsService, separateConstraints, setIdAndKeyFromKeyIdRefOnDocumentData, setIdAndKeyFromSnapshotOnDocumentData, shouldSaveNotificationToNotificationWeek, shouldSendCreatedNotificationInput, snapshotConverterFunctions, snapshotStreamDataForAccessor, snapshotStreamForAccessor, sortNotificationItemsFunction, startAfter, startAt, startAtValue, storageListFilesResultFactory, storageListFilesResultHasNoNextError, storagePathFactory, streamFromOnSnapshot, systemStateCollectionReference, systemStateConverter, systemStateFirestoreCollection, systemStateIdentity, twoWayFlatFirestoreModelKey, unreadNotificationItems, unsupportedFirestoreDriverFunctionError, updateNotificationBoxRecipientTemplateConfigRecord, updateNotificationRecipient, updateNotificationUserDefaultNotificationBoxRecipientConfig, updateNotificationUserNotificationBoxRecipientConfigIfChanged, updateNotificationUserNotificationBoxRecipientConfigs, updateWithAccessorUpdateAndConverterFunction, useContextAuth, useContextAuthUid, useDocumentSnapshot, useDocumentSnapshotData, useFirebaseModelsService, where, whereDateIsAfter, whereDateIsAfterWithSort, whereDateIsBefore, whereDateIsBeforeWithSort, whereDateIsBetween, whereDateIsInRange, whereDateIsOnOrAfter, whereDateIsOnOrAfterWithSort, whereDateIsOnOrBefore, whereDateIsOnOrBeforeWithSort, whereDocumentId, whereStringHasRootIdentityModelKey, whereStringValueHasPrefix };
11454
+ export { AbstractFirestoreDocument, AbstractFirestoreDocumentDataAccessorWrapper, AbstractFirestoreDocumentWithParent, AbstractSubscribeToNotificationBoxParams, AppNotificationTemplateTypeInfoRecordService, BASE_MODEL_STORAGE_FILE_PATH, CALL_MODEL_APP_FUNCTION_KEY, COPY_USER_RELATED_DATA_ACCESSOR_FACTORY_FUNCTION, CREATE_NOTIFICATION_ID_REQUIRED_ERROR_CODE, CleanupSentNotificationsParams, ContextGrantedModelRolesReaderInstance, CreateNotificationBoxParams, CreateNotificationSummaryParams, CreateNotificationUserParams, 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_TEMPLATE_TYPE, DEFAULT_QUERY_CHANGE_WATCHER_DELAY, DEFAULT_SINGLE_ITEM_FIRESTORE_COLLECTION_DOCUMENT_IDENTIFIER, DEFAULT_WEBSITE_LINK, FIREBASE_AUTH_NETWORK_REQUEST_ERROR, FIREBASE_AUTH_NETWORK_REQUEST_FAILED, FIREBASE_AUTH_PASSWORD_MAX_LENGTH, FIREBASE_AUTH_PASSWORD_MIN_LENGTH, FIREBASE_AUTH_USER_NOT_FOUND_ERROR, FIREBASE_AUTH_WRONG_PASSWORD, FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY, FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY, FIREBASE_SERVER_AUTH_CLAIMS_RESET_PASSWORD_KEY, FIREBASE_SERVER_AUTH_CLAIMS_SETUP_LAST_COM_DATE_KEY, FIREBASE_SERVER_AUTH_CLAIMS_SETUP_PASSWORD_KEY, FIRESTORE_CLIENT_QUERY_CONSTRAINT_HANDLER_MAPPING, FIRESTORE_COLLECTION_NAME_SEPARATOR, FIRESTORE_DUMMY_MODEL_KEY, FIRESTORE_EMPTY_VALUE, FIRESTORE_END_AT_QUERY_CONSTRAINT_TYPE, FIRESTORE_END_AT_VALUE_QUERY_CONSTRAINT_TYPE, FIRESTORE_END_BEFORE_QUERY_CONSTRAINT_TYPE, FIRESTORE_ITEM_PAGE_ITERATOR, FIRESTORE_ITEM_PAGE_ITERATOR_DELEGATE, FIRESTORE_LIMIT_QUERY_CONSTRAINT_TYPE, FIRESTORE_LIMIT_TO_LAST_QUERY_CONSTRAINT_TYPE, FIRESTORE_MAX_WHERE_IN_FILTER_ARGS_COUNT, FIRESTORE_MODEL_ID_REGEX, FIRESTORE_MODEL_KEY_REGEX, FIRESTORE_MODEL_KEY_REGEX_STRICT, FIRESTORE_OFFSET_QUERY_CONSTRAINT_TYPE, FIRESTORE_ORDER_BY_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, FIRESTORE_ORDER_BY_QUERY_CONSTRAINT_TYPE, FIRESTORE_PASSTHROUGH_FIELD, FIRESTORE_PERMISSION_DENIED_ERROR_CODE, FIRESTORE_START_AFTER_QUERY_CONSTRAINT_TYPE, FIRESTORE_START_AT_QUERY_CONSTRAINT_TYPE, FIRESTORE_START_AT_VALUE_QUERY_CONSTRAINT_TYPE, FIRESTORE_WHERE_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, FIRESTORE_WHERE_QUERY_CONSTRAINT_TYPE, FirebaseDevelopmentFunctions, FirebaseModelPermissionServiceInstance, FirebaseServerError, FirestoreAccessorStreamMode, FirestoreDocumentContextType, InferredTargetModelIdParams, InferredTargetModelParams, InitializeAllApplicableNotificationBoxesParams, InitializeAllApplicableNotificationSummariesParams, InitializeNotificationModelParams, IsFirestoreModelId, IsFirestoreModelIdOrKey, IsFirestoreModelKey, 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_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_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, NotificationBoxRecipientTemplateConfigArrayEntryParam, NotificationBoxRecipientTemplateConfigBoolean, NotificationDocument, NotificationFirestoreCollections, NotificationFunctions, NotificationMessageFlag, NotificationRecipientParams, NotificationRecipientSendFlag, NotificationSendState, NotificationSendType, NotificationSummaryDocument, NotificationType, NotificationUserDocument, NotificationWeekDocument, RUN_DEV_FUNCTION_APP_FUNCTION_KEY, ResyncAllNotificationUserParams, ResyncNotificationUserParams, SCHEDULED_FUNCTION_DEV_FUNCTION_SPECIFIER, ScheduledFunctionDevelopmentFirebaseFunctionListEntry, ScheduledFunctionDevelopmentFirebaseFunctionParams, ScheduledFunctionDevelopmentFunctionTypeEnum, SendNotificationParams, SendQueuedNotificationsParams, SystemStateDocument, SystemStateFirestoreCollections, TargetModelIdParams, TargetModelParams, UpdateNotificationBoxParams, UpdateNotificationBoxRecipientLikeParams, UpdateNotificationBoxRecipientParams, UpdateNotificationSummaryParams, UpdateNotificationUserDefaultNotificationBoxRecipientConfigParams, UpdateNotificationUserNotificationBoxRecipientParams, UpdateNotificationUserParams, addConstraintToBuilder, addOrReplaceLimitInConstraints, allChildDocumentsUnderParent, allChildDocumentsUnderParentPath, allChildDocumentsUnderRelativePath, allowDocumentSnapshotWithPathOnceFilter, allowedNotificationRecipients, appNotificationTemplateTypeInfoRecordService, asTopLevelFieldPath, asTopLevelFieldPaths, assertFirestoreUpdateHasData, assertStorageUploadOptionsStringFormat, assignDateCellRangeFunction, assignDateCellScheduleFunction, assignUnitedStatesAddressFunction, assignWebsiteFileLinkFunction, assignWebsiteLinkFunction, buildFirebaseCollectionTypeModelTypeMap, callModelFirebaseFunctionMapFactory, childFirestoreModelKey, childFirestoreModelKeyPath, childFirestoreModelKeys, clientFirebaseFirestoreContextFactory, clientFirebaseStorageContextFactory, contextGrantedModelRolesReader, contextGrantedModelRolesReaderDoesNotExistErrorMessage, contextGrantedModelRolesReaderPermissionErrorMessage, convertHttpsCallableErrorToReadableError, copyDocumentIdForUserRelatedModifierFunction, copyDocumentIdToFieldModifierFunction, copyUserRelatedDataAccessorFactoryFunction, copyUserRelatedDataModifierConfig, createNotificationDocument, createNotificationDocumentIfSending, createNotificationDocumentPair, createNotificationTemplate, dataFromDocumentSnapshots, dataFromSnapshotStream, developmentFirebaseFunctionMapFactory, directDataHttpsCallable, documentData, documentDataFunction, documentDataWithIdAndKey, documentReferenceFromDocument, documentReferencesFromDocuments, documentReferencesFromSnapshot, effectiveNotificationBoxRecipientConfig, effectiveNotificationBoxRecipientTemplateConfig, endAt, endAtValue, endBefore, extendFirestoreCollectionWithSingleDocumentAccessor, filterConstraintsOfType, filterDisallowedFirestoreItemPageIteratorInputContraints, 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, firestoreClientIncrementUpdateToUpdateData, firestoreCollectionQueryFactory, firestoreContextFactory, firestoreDate, firestoreDateCellRange, firestoreDateCellRangeArray, firestoreDateCellRangeAssignFn, firestoreDateCellSchedule, firestoreDateCellScheduleAssignFn, firestoreDencoderArray, firestoreDencoderMap, firestoreDencoderStringArray, firestoreDocumentAccessorContextExtension, firestoreDocumentAccessorFactory, firestoreDocumentLoader, firestoreDocumentSnapshotPairsLoader, firestoreDocumentSnapshotPairsLoaderInstance, firestoreDummyKey, firestoreEncodedArray, firestoreEncodedObjectMap, firestoreEnum, firestoreEnumArray, firestoreField, firestoreFieldConfigToModelMapFunctionsRef, firestoreIdBatchVerifierFactory, firestoreIdentityTypeArray, firestoreIdentityTypeArrayName, firestoreItemPageIteration, firestoreItemPageIterationFactory, firestoreLatLngString, firestoreMap, firestoreMapZoomLevel, firestoreModelId, firestoreModelIdArrayField, firestoreModelIdFromDocument, firestoreModelIdGrantedRoleArrayMap, firestoreModelIdGrantedRoleMap, firestoreModelIdString, firestoreModelIdentity, firestoreModelIdentityTypeMap, firestoreModelIdsFromDocuments, firestoreModelIdsFromKey, firestoreModelKey, firestoreModelKeyArrayField, firestoreModelKeyCollectionName, firestoreModelKeyCollectionType, firestoreModelKeyCollectionTypeArray, firestoreModelKeyCollectionTypeArrayName, firestoreModelKeyCollectionTypePair, firestoreModelKeyEncodedGrantedRoleMap, firestoreModelKeyFromDocument, firestoreModelKeyGrantedRoleArrayMap, firestoreModelKeyGrantedRoleMap, firestoreModelKeyPairObject, firestoreModelKeyParentKey, firestoreModelKeyParentKeyPartPairs, firestoreModelKeyPart, firestoreModelKeyPartPairs, firestoreModelKeyPartPairsKeyPath, firestoreModelKeyPartPairsPaths, firestoreModelKeyPath, firestoreModelKeyString, 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, 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, inContextFirebaseModelServiceFactory, inContextFirebaseModelsServiceFactory, incrementUpdateWithAccessorFunction, inferKeyFromTwoWayFlatFirestoreModelKey, inferNotificationBoxRelatedModelKey, interceptAccessorFactoryFunction, isAdminInFirebaseModelContext, isClientFirebaseError, isCompleteNotificationSendState, isFirebaseStorageObjectNotFoundError, isFirestoreModelId, isFirestoreModelIdOrKey, isFirestoreModelKey, isOwnerOfUserRelatedModelInFirebaseModelContext, iterateFirestoreDocumentSnapshotBatches, iterateFirestoreDocumentSnapshotCheckpoints, iterateFirestoreDocumentSnapshotPairBatches, iterateFirestoreDocumentSnapshotPairs, iterateFirestoreDocumentSnapshots, iterationQueryDocChangeWatcher, iterationQueryDocChangeWatcherChangeTypeForGroup, latestDataFromDocuments, latestSnapshotsFromDocuments, lazyFirebaseFunctionsFactory, limit, limitToLast, limitedFirestoreDocumentAccessorFactory, loadAllFirestoreDocumentSnapshot, loadAllFirestoreDocumentSnapshotPairs, loadDocumentsForDocumentReferences, loadDocumentsForDocumentReferencesFromValues, loadDocumentsForIds, loadDocumentsForIdsFromValues, loadDocumentsForKeys, loadDocumentsForKeysFromValues, loadDocumentsForSnapshots, loadDocumentsForValues, loadNotificationBoxDocumentForReferencePair, makeDocuments, makeFirestoreCollection, makeFirestoreCollectionGroup, makeFirestoreCollectionWithParent, makeFirestoreItemPageIteratorDelegate, makeFirestoreQueryConstraintFunctionsDriver, makeRootSingleItemFirestoreCollection, makeSingleItemFirestoreCollection, mapDataFromSnapshot, mapHttpsCallable, mergeNotificationBoxRecipientTemplateConfigRecords, mergeNotificationBoxRecipientTemplateConfigs, mergeNotificationBoxRecipients, mergeNotificationSendMessagesResult, mergeNotificationUserDefaultNotificationBoxRecipientConfig, mergeNotificationUserNotificationBoxRecipientConfigs, modelStorageSlashPathFactory, modifyBeforeSetInterceptAccessorFactoryFunction, newDocuments, newNotificationBoxRecipientForUid, noContentNotificationMessageFunctionFactory, noStringFormatInStorageUploadOptionsError, notificationBoxCollectionReference, notificationBoxConverter, notificationBoxFirestoreCollection, notificationBoxIdForModel, notificationBoxIdentity, notificationBoxModelCrudFunctionsConfig, notificationBoxRecipientTemplateConfigArrayToRecord, notificationBoxRecipientTemplateConfigRecordToArray, notificationBoxesFlaggedForNeedsInitializationQuery, notificationBoxesFlaggedInvalidQuery, notificationCollectionReference, notificationCollectionReferenceFactory, notificationConverter, notificationFirestoreCollectionFactory, notificationFirestoreCollectionGroup, notificationFunctionMap, notificationFunctionTypeConfigMap, notificationIdentity, notificationMessageFunction, notificationSendFlagsImplyIsComplete, notificationSummariesFlaggedForNeedsInitializationQuery, notificationSummaryCollectionReference, notificationSummaryConverter, notificationSummaryFirestoreCollection, notificationSummaryIdForModel, notificationSummaryIdForUidFunctionForRootFirestoreModelIdentity, notificationSummaryIdentity, notificationTemplateTypeDetailsRecord, notificationTemplateTypeInfoRecord, notificationUserCollectionReference, notificationUserConverter, notificationUserFirestoreCollection, notificationUserIdentity, notificationUsersFlaggedForNeedsSyncQuery, notificationWeekCollectionReference, notificationWeekCollectionReferenceFactory, notificationWeekConverter, notificationWeekFirestoreCollectionFactory, notificationWeekFirestoreCollectionGroup, notificationWeekIdentity, notificationsPastSendAtTimeQuery, notificationsReadyForCleanupQuery, offset, onCallCreateModelParams, onCallCreateModelResult, onCallCreateModelResultWithDocs, onCallDeleteModelParams, onCallDevelopmentParams, onCallReadModelParams, onCallTypedModelParams, onCallTypedModelParamsFunction, onCallUpdateModelParams, optionalFirestoreArray, optionalFirestoreBoolean, optionalFirestoreDate, optionalFirestoreEnum, optionalFirestoreField, optionalFirestoreNumber, optionalFirestoreString, optionalFirestoreUID, optionalFirestoreUnitedStatesAddress, orderBy, orderByDocumentId, readFirestoreModelKey, readFirestoreModelKeyFromDocumentSnapshot, replaceConstraints, selectFromFirebaseModelsService, separateConstraints, setIdAndKeyFromKeyIdRefOnDocumentData, setIdAndKeyFromSnapshotOnDocumentData, shouldSaveNotificationToNotificationWeek, shouldSendCreatedNotificationInput, snapshotConverterFunctions, snapshotStreamDataForAccessor, snapshotStreamForAccessor, sortNotificationItemsFunction, startAfter, startAt, startAtValue, storageListFilesResultFactory, storageListFilesResultHasNoNextError, storagePathFactory, streamFromOnSnapshot, systemStateCollectionReference, systemStateConverter, systemStateFirestoreCollection, systemStateIdentity, twoWayFlatFirestoreModelKey, unreadNotificationItems, unsupportedFirestoreDriverFunctionError, updateNotificationBoxRecipientTemplateConfigRecord, updateNotificationRecipient, updateNotificationUserDefaultNotificationBoxRecipientConfig, updateNotificationUserNotificationBoxRecipientConfigIfChanged, updateNotificationUserNotificationBoxRecipientConfigs, updateWithAccessorUpdateAndConverterFunction, useContextAuth, useContextAuthUid, useDocumentSnapshot, useDocumentSnapshotData, useFirebaseModelsService, where, whereDateIsAfter, whereDateIsAfterWithSort, whereDateIsBefore, whereDateIsBeforeWithSort, whereDateIsBetween, whereDateIsInRange, whereDateIsOnOrAfter, whereDateIsOnOrAfterWithSort, whereDateIsOnOrBefore, whereDateIsOnOrBeforeWithSort, whereDocumentId, whereStringHasRootIdentityModelKey, whereStringValueHasPrefix };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/firebase",
3
- "version": "11.1.3",
3
+ "version": "11.1.5",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./src/index.d.ts",
@@ -199,7 +199,7 @@ export declare class UpdateNotificationBoxRecipientParams extends UpdateNotifica
199
199
  */
200
200
  uid?: Maybe<FirebaseAuthUserId>;
201
201
  /**
202
- * Whether or not to insert the user if they currently do not exist. Defaults to false.
202
+ * Whether or not to create the user if they currently do not exist. Defaults to false.
203
203
  */
204
204
  insert?: Maybe<boolean>;
205
205
  /**
@@ -242,6 +242,15 @@ export declare class SendNotificationParams extends TargetModelParams {
242
242
  */
243
243
  throwErrorIfSent?: Maybe<boolean>;
244
244
  }
245
+ /**
246
+ * Params class used for subscribing a system user to a NotificationBox for a model.
247
+ */
248
+ export declare abstract class AbstractSubscribeToNotificationBoxParams extends TargetModelParams {
249
+ /**
250
+ * Notification recipient to subscribe to notifications
251
+ */
252
+ uid: FirebaseAuthUserId;
253
+ }
245
254
  export interface SendNotificationResult {
246
255
  /**
247
256
  * Attempted notification type
@@ -1,5 +1,6 @@
1
1
  export declare const CREATE_NOTIFICATION_ID_REQUIRED_ERROR_CODE = "CREATE_NOTIFICATION_ID_REQUIRED";
2
2
  export declare const NOTIFICATION_MODEL_ALREADY_INITIALIZED_ERROR_CODE = "NOTIFICATION_MODEL_ALREADY_INITIALIZED";
3
+ export declare const NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE = "NOTIFICATION_BOX_DOES_NOT_EXIST";
3
4
  export declare const NOTIFICATION_BOX_EXISTS_FOR_MODEL_ERROR_CODE = "NOTIFICATION_BOX_EXISTS_FOR_MODEL";
4
5
  export declare const NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST_ERROR_CODE = "NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST";
5
6
  export declare const NOTIFICATION_USER_INVALID_UID_FOR_CREATE_ERROR_CODE = "NOTIFICATION_USER_INVALID_UID_FOR_CREATE";
@@ -1,4 +1,4 @@
1
- import { type Maybe, type ModelKey } from '@dereekb/util';
1
+ import { type Maybe, type Milliseconds, type ModelKey } from '@dereekb/util';
2
2
  import { type Notification, type NotificationDocument, type NotificationFirestoreCollections, NotificationSendType } from './notification';
3
3
  import { type NotificationRecipientWithConfig } from './notification.config';
4
4
  import { type NotificationTemplateType } from './notification.id';
@@ -77,7 +77,7 @@ export interface ShouldSendCreatedNotificationInput {
77
77
  /**
78
78
  * Amount of time to throttle notifications. Only used if sendNotificationThrottleDate is provided. Defaults to 1 hour.
79
79
  */
80
- readonly sendNotificationThrottleTime?: Maybe<number>;
80
+ readonly sendNotificationThrottleTime?: Maybe<Milliseconds>;
81
81
  }
82
82
  /**
83
83
  * Returns true if the notification should be created/sent, given the input.
@@ -202,6 +202,7 @@ export interface NotificationBox {
202
202
  export type NotificationBoxRoles = 'subscribe' | 'manageRecipients' | 'createNotification' | GrantedReadRole | GrantedUpdateRole;
203
203
  export declare class NotificationBoxDocument extends AbstractFirestoreDocument<NotificationBox, NotificationBoxDocument, typeof notificationBoxIdentity> {
204
204
  get modelIdentity(): import("../../common").RootFirestoreModelIdentity<"notificationBox", "nb">;
205
+ get notificationBoxRelatedModelKey(): string;
205
206
  }
206
207
  export declare const notificationBoxConverter: import("../../common").SnapshotConverterFunctions<NotificationBox, Partial<import("@dereekb/util").ReplaceType<NotificationBox, import("@dereekb/util").MaybeMap<object>, any>>>;
207
208
  export declare function notificationBoxCollectionReference(context: FirestoreContext): CollectionReference<NotificationBox>;
@@ -1,8 +1,8 @@
1
1
  import { type Maybe } from '@dereekb/util';
2
- import { type Notification, NotificationRecipientSendFlag, type NotificationSendFlags, NotificationSendState } from './notification';
2
+ import { type Notification, type NotificationBox, type NotificationBoxDocument, NotificationRecipientSendFlag, type NotificationSendFlags, NotificationSendState } from './notification';
3
3
  import { type NotificationUserNotificationBoxRecipientConfig, type NotificationBoxRecipient, type NotificationUserDefaultNotificationBoxRecipientConfig } from './notification.config';
4
4
  import { type AppNotificationTemplateTypeInfoRecordService } from './notification.details';
5
- import { type FirebaseAuthUserId, type FirestoreModelKey } from '../../common';
5
+ import { type FirebaseAuthUserId, type FirestoreDocumentAccessor, type FirestoreModelKey } from '../../common';
6
6
  export interface EffectiveNotificationBoxRecipientConfigInput {
7
7
  readonly uid: FirebaseAuthUserId;
8
8
  readonly m?: FirestoreModelKey;
@@ -49,3 +49,16 @@ export declare function allowedNotificationRecipients(flag?: Maybe<NotificationR
49
49
  export declare function shouldSaveNotificationToNotificationWeek(notification: Notification): boolean;
50
50
  export declare function mergeNotificationUserNotificationBoxRecipientConfigs(a: NotificationUserNotificationBoxRecipientConfig, b: Partial<NotificationUserNotificationBoxRecipientConfig>): NotificationUserNotificationBoxRecipientConfig;
51
51
  export declare function mergeNotificationBoxRecipients<T extends NotificationBoxRecipient>(a: T, b: Partial<T>): T;
52
+ export interface NotificationBoxDocumentReferencePair {
53
+ /**
54
+ * NotificationBoxDocument to update.
55
+ *
56
+ * If not provided, please provide the notificationBoxRelatedModelKey. If neither value is provided, an error will be thrown.
57
+ */
58
+ readonly notificationBoxDocument?: Maybe<NotificationBoxDocument>;
59
+ /**
60
+ * Key of the model the notification box is expected to be associated with. Used if NotificationBoxDocument is not provided already.
61
+ */
62
+ readonly notificationBoxRelatedModelKey?: Maybe<FirestoreModelKey>;
63
+ }
64
+ export declare function loadNotificationBoxDocumentForReferencePair(input: NotificationBoxDocumentReferencePair, accessor: FirestoreDocumentAccessor<NotificationBox, NotificationBoxDocument>): NotificationBoxDocument;
package/test/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [11.1.5](https://github.com/dereekb/dbx-components/compare/v11.1.4-dev...v11.1.5) (2025-03-20)
6
+
7
+
8
+
9
+ ## [11.1.4](https://github.com/dereekb/dbx-components/compare/v11.1.3-dev...v11.1.4) (2025-03-17)
10
+
11
+
12
+
5
13
  ## [11.1.3](https://github.com/dereekb/dbx-components/compare/v11.1.2-dev...v11.1.3) (2025-03-07)
6
14
 
7
15
 
package/test/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/firebase/test",
3
- "version": "11.1.3",
3
+ "version": "11.1.5",
4
4
  "type": "commonjs",
5
5
  "peerDependencies": {
6
6
  "@dereekb/util": "*",