@dereekb/firebase 13.0.6 → 13.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js CHANGED
@@ -1,13 +1,12 @@
1
1
  import { increment, arrayRemove, arrayUnion, onSnapshot, getDoc, deleteDoc, setDoc, updateDoc, collection, collectionGroup, doc, writeBatch, runTransaction, getDocs, getCountFromServer, endBefore as endBefore$1, endAt as endAt$1, startAfter as startAfter$1, startAt as startAt$1, where as where$1, documentId, orderBy as orderBy$1, limitToLast as limitToLast$1, limit as limit$1, query } from 'firebase/firestore';
2
- import { cachedGetter, mergeModifiers, asArray, filterUndefinedValues, objectHasNoKeys, filterFalsyAndEmptyValues, build, wrapUseAsyncFunction, useAsync, runAsyncTasksForValues, filterMaybeArrayValues, performMakeLoop, makeWithFactory, MAP_IDENTITY, toModelFieldConversions, makeModelMapFunctions, modifyModelMapFunctions, assignValuesToPOJOFunction, KeyValueTypleValueFilter, asObjectCopyFactory, transformStringFunctionConfig, transformStringFunction, passThrough, filterUniqueTransform, unique, transformNumberFunction, sortValuesFunctionOrMapIdentityWithSortRef, toModelMapFunctions, isEqualToValueDecisionFunction, filterFromPOJOFunction, mapObjectMap, copyObject, modelFieldMapFunctions, filterNullAndUndefinedValues, isDate, bitwiseSetDencoder, sortAscendingIndexNumberRefFunction, latLngStringFunction, DEFAULT_LAT_LNG_STRING_VALUE, mapObjectMapFunction, filterEmptyArrayValues, filterUniqueFunction, isMapIdentityFunction, chainMapSameFunctions, unixDateTimeSecondsNumberFromDate, dateFromDateOrTimeSecondsNumber, pushItemOrArrayItemsIntoArray, separateValues, convertToArray, UTF_PRIVATE_USAGE_AREA_START, UTF_8_START_CHARACTER, mergeArraysIntoArray, lastValue, flattenArrayOrValueArray, allowValueOnceFilter, asGetter, getValueFromGetter, mapIdentityFunction, performTasksFromFactoryInParallelFunction, performAsyncTasks, batch, flattenArray, calculateExpirationDate, groupValues, forEachInIterable, arrayToObject, takeFront, stringContains, isOddNumber, objectToMap, ServerErrorResponse, toReadableError, capitalizeFirstLetter, lowercaseFirstLetter, toRelativeSlashPathStartType, mappedUseFunction, iterableToArray, setContainsAllValues, usePromise, slashPathFactory, errorMessageContainsString, bitwiseObjectDencoder, UNSET_INDEX_NUMBER, mergeObjectsFunction, mergeObjects, forEachKeyValue, updateMaybeValue, ModelRelationUtility, filterKeysOnPOJOFunction, areEqualPOJOValuesUsingPojoFilter, filterOnlyUndefinedValues, makeModelMap, isThrottled, MS_IN_HOUR, multiValueMapBuilder, mergeSlashPaths, slashPathDetails, toAbsoluteSlashPathStartType, SLASH_PATH_FILE_TYPE_SEPARATOR, slashPathPathMatcher, decisionFunction, slashPathSubPathMatcher } from '@dereekb/util';
2
+ import { cachedGetter, mergeModifiers, asArray, filterUndefinedValues, objectHasNoKeys, filterFalsyAndEmptyValues, build, wrapUseAsyncFunction, useAsync, runAsyncTasksForValues, filterMaybeArrayValues, performMakeLoop, makeWithFactory, MAP_IDENTITY, toModelFieldConversions, makeModelMapFunctions, modifyModelMapFunctions, assignValuesToPOJOFunction, KeyValueTypleValueFilter, asObjectCopyFactory, transformStringFunctionConfig, transformStringFunction, passThrough, filterUniqueTransform, unique, transformNumberFunction, sortValuesFunctionOrMapIdentityWithSortRef, toModelMapFunctions, isEqualToValueDecisionFunction, filterFromPOJOFunction, mapObjectMap, copyObject, modelFieldMapFunctions, filterNullAndUndefinedValues, isDate, bitwiseSetDencoder, sortAscendingIndexNumberRefFunction, latLngStringFunction, DEFAULT_LAT_LNG_STRING_VALUE, mapObjectMapFunction, filterEmptyArrayValues, filterUniqueFunction, isMapIdentityFunction, chainMapSameFunctions, unixDateTimeSecondsNumberFromDate, dateFromDateOrTimeSecondsNumber, pushItemOrArrayItemsIntoArray, separateValues, convertToArray, UTF_PRIVATE_USAGE_AREA_START, UTF_8_START_CHARACTER, mergeArraysIntoArray, lastValue, flattenArrayOrValueArray, allowValueOnceFilter, asGetter, getValueFromGetter, mapIdentityFunction, performTasksFromFactoryInParallelFunction, performAsyncTasks, batch, flattenArray, calculateExpirationDate, groupValues, stringContains, forEachInIterable, arrayToObject, takeFront, isOddNumber, objectToMap, ServerErrorResponse, toReadableError, capitalizeFirstLetter, lowercaseFirstLetter, toRelativeSlashPathStartType, mappedUseFunction, iterableToArray, setContainsAllValues, usePromise, slashPathFactory, errorMessageContainsString, bitwiseObjectDencoder, UNSET_INDEX_NUMBER, mergeObjectsFunction, mergeObjects, forEachKeyValue, updateMaybeValue, ModelRelationUtility, filterKeysOnPOJOFunction, areEqualPOJOValuesUsingPojoFilter, filterOnlyUndefinedValues, makeModelMap, isThrottled, MS_IN_HOUR, multiValueMapBuilder, mergeSlashPaths, slashPathDetails, toAbsoluteSlashPathStartType, SLASH_PATH_FILE_TYPE_SEPARATOR, slashPathPathMatcher, decisionFunction, slashPathSubPathMatcher } from '@dereekb/util';
3
3
  import { filterMaybe, lazyFrom, itemAccumulator, ItemPageIterator, mappedPageItemIteration } from '@dereekb/rxjs';
4
4
  import { map, from, combineLatest, of, exhaustMap, Observable, switchMap, timer, skip, shareReplay } from 'rxjs';
5
- import { UNKNOWN_WEBSITE_LINK_TYPE, encodeWebsiteFileLinkToWebsiteLinkEncodedData, decodeWebsiteLinkEncodedDataToWebsiteFileLink, AbstractModelPermissionService, grantedRoleMapReader, noAccessRoleMap, fullAccessRoleMap, IsE164PhoneNumber } from '@dereekb/model';
5
+ import { UNKNOWN_WEBSITE_LINK_TYPE, encodeWebsiteFileLinkToWebsiteLinkEncodedData, decodeWebsiteLinkEncodedDataToWebsiteFileLink, AbstractModelPermissionService, grantedRoleMapReader, noAccessRoleMap, fullAccessRoleMap, clearable, e164PhoneNumberType } from '@dereekb/model';
6
6
  import { toISODateString, formatToISO8601DateString, toJsDate, isSameDate, dateRange, sortByDateFunction, yearWeekCode, UNKNOWN_YEAR_WEEK_CODE } from '@dereekb/date';
7
7
  import { httpsCallable } from 'firebase/functions';
8
8
  import { getMetadata, ref, deleteObject, uploadBytesResumable, getBlob, getBytes, uploadString, uploadBytes, updateMetadata, getDownloadURL, list } from 'firebase/storage';
9
- import { Expose, Type } from 'class-transformer';
10
- import { IsEnum, IsString, IsOptional, registerDecorator, buildMessage, IsNotEmpty, IsBoolean, IsNumber, IsEmail, IsArray, ValidateNested, IsPhoneNumber, IsDate, MinLength, MaxLength, Min, IsMimeType } from 'class-validator';
9
+ import { type } from 'arktype';
11
10
  import { iterateFetchPages, iterateFetchPagesByEachItem, fetchPageFactory } from '@dereekb/util/fetch';
12
11
  import { BaseError } from 'make-error';
13
12
  import { isAfter } from 'date-fns';
@@ -1091,6 +1090,61 @@ function documentReferenceFromDocument(document) {
1091
1090
  function documentReferencesFromDocuments(documents) {
1092
1091
  return documents.map(documentReferenceFromDocument);
1093
1092
  }
1093
+ /**
1094
+ * Creates a {@link LimitedFirestoreDocumentAccessorSnapshotCache} that wraps the given accessor
1095
+ * with an in-memory {@link Map} cache so that repeated loads for the same key return the cached
1096
+ * promise instead of re-reading from Firestore.
1097
+ *
1098
+ * The cache stores the promise itself (not the resolved value), which means concurrent requests
1099
+ * for the same key that arrive before the first read completes will also be deduplicated.
1100
+ *
1101
+ * The cache lives for the lifetime of the returned object and is never invalidated, so this is
1102
+ * best suited for short-lived scopes (e.g. a single request or batch operation) where stale reads
1103
+ * are acceptable.
1104
+ *
1105
+ * @param accessor - The accessor to wrap with caching behavior
1106
+ * @returns A {@link LimitedFirestoreDocumentAccessorSnapshotCache} backed by the given accessor
1107
+ *
1108
+ * @example
1109
+ * ```typescript
1110
+ * const cache = limitedFirestoreDocumentAccessorSnapshotCache(accessor);
1111
+ *
1112
+ * // First call reads from Firestore; second call returns cached result
1113
+ * const pair = await cache.getDocumentSnapshotDataPairForKey('users/abc123');
1114
+ * const samePair = await cache.getDocumentSnapshotDataPairForKey('users/abc123');
1115
+ *
1116
+ * // Batch fetch with automatic deduplication
1117
+ * const pairs = await cache.getDocumentSnapshotDataPairsWithDataForKeys(['users/abc', 'users/def']);
1118
+ *
1119
+ * // Access the underlying accessor directly
1120
+ * const doc = cache.accessor.loadDocumentForKey('users/xyz');
1121
+ * ```
1122
+ */
1123
+ function limitedFirestoreDocumentAccessorSnapshotCache(accessor) {
1124
+ const cache = new Map();
1125
+ function getDocumentSnapshotDataPairForKey(key) {
1126
+ let cached = cache.get(key);
1127
+ if (!cached) {
1128
+ const document = accessor.loadDocumentForKey(key);
1129
+ cached = getDocumentSnapshotDataPair(document);
1130
+ cache.set(key, cached);
1131
+ }
1132
+ return cached;
1133
+ }
1134
+ async function getDocumentSnapshotDataPairsForKeys(keys) {
1135
+ return Promise.all(keys.map((key) => getDocumentSnapshotDataPairForKey(key)));
1136
+ }
1137
+ async function getDocumentSnapshotDataPairsWithDataForKeys(keys) {
1138
+ const pairs = await getDocumentSnapshotDataPairsForKeys(keys);
1139
+ return filterMaybeArrayValues(pairs.map((pair) => (pair.data != null ? pair : undefined)));
1140
+ }
1141
+ return {
1142
+ accessor,
1143
+ getDocumentSnapshotDataPairForKey,
1144
+ getDocumentSnapshotDataPairsForKeys,
1145
+ getDocumentSnapshotDataPairsWithDataForKeys
1146
+ };
1147
+ }
1094
1148
 
1095
1149
  /**
1096
1150
  * Creates an Observable that emits arrays of document snapshots for multiple documents.
@@ -1140,7 +1194,7 @@ function mapLatestSnapshotsFromDocuments(documents, operator) {
1140
1194
  * @param documents - Array of document instances to stream data for
1141
1195
  * @returns Observable that emits arrays of document data whenever any document changes
1142
1196
  */
1143
- function latestDataFromDocuments(documents) {
1197
+ function streamDocumentSnapshotsData(documents) {
1144
1198
  return latestSnapshotsFromDocuments(documents).pipe(dataFromDocumentSnapshots());
1145
1199
  }
1146
1200
  /**
@@ -1198,6 +1252,11 @@ function streamDocumentSnapshotDataPairs(documents) {
1198
1252
  function streamDocumentSnapshotDataPairsWithData(documents) {
1199
1253
  return streamDocumentSnapshotDataPairs(documents).pipe(map((pairs) => pairs.filter((pair) => pair.data != null)));
1200
1254
  }
1255
+ // MARK: Compat
1256
+ /**
1257
+ * @deprecated Use {@link streamDocumentSnapshotsData} instead.
1258
+ */
1259
+ const latestDataFromDocuments = streamDocumentSnapshotsData;
1201
1260
 
1202
1261
  // A set of copied types from @google-cloud/firestore and firebase/firestore to allow cross-compatability.
1203
1262
  /* eslint-disable */
@@ -2353,20 +2412,14 @@ function firebaseQueryItemAccumulator(iteration, mapItem) {
2353
2412
  }
2354
2413
 
2355
2414
  /**
2356
- * Creates a Firestore query constraint.
2415
+ * Creates a {@link FirestoreQueryConstraint} with the given type identifier and data.
2357
2416
  *
2358
- * @template T - Type of data stored in the constraint
2359
- * @param type - The constraint type identifier
2360
- * @param data - The constraint data
2361
- * @returns A Firestore query constraint object
2362
- */
2363
- /**
2364
- * Creates a Firestore query constraint.
2417
+ * This is the low-level factory used by all constraint builder functions (e.g., {@link where},
2418
+ * {@link limit}, {@link orderBy}). Most callers should use those typed builders instead.
2365
2419
  *
2366
- * @template T - Type of data stored in the constraint
2367
- * @param type - The constraint type identifier
2368
- * @param data - The constraint data
2369
- * @returns A Firestore query constraint object
2420
+ * @param type - The constraint type identifier (e.g., 'where', 'limit')
2421
+ * @param data - The constraint-specific configuration data
2422
+ * @returns A typed constraint object
2370
2423
  */
2371
2424
  function firestoreQueryConstraint(type, data) {
2372
2425
  return {
@@ -2866,6 +2919,17 @@ function filterDisallowedFirestoreItemPageIteratorInputConstraints(constraints)
2866
2919
  * This value is used when no itemsPerPage is explicitly specified in the configuration.
2867
2920
  */
2868
2921
  const DEFAULT_FIRESTORE_ITEM_PAGE_ITERATOR_ITEMS_PER_PAGE = 50;
2922
+ /**
2923
+ * Creates a {@link FirestoreItemPageIteratorDelegate} that handles cursor-based Firestore pagination.
2924
+ *
2925
+ * The delegate implements `loadItemsForPage` by:
2926
+ * 1. Retrieving the cursor document from the previous page's results
2927
+ * 2. Building a query with the configured constraints, `startAfter` cursor, and `limit`
2928
+ * 3. Executing the query and wrapping the results in a {@link FirestoreItemPageQueryResult}
2929
+ * with `reload()` and `stream()` capabilities
2930
+ *
2931
+ * @returns A delegate instance for use with {@link ItemPageIterator}
2932
+ */
2869
2933
  function makeFirestoreItemPageIteratorDelegate() {
2870
2934
  return {
2871
2935
  loadItemsForPage: (request) => {
@@ -3023,7 +3087,14 @@ function _firestoreItemPageIterationWithSnapshotIteration(snapshotIteration) {
3023
3087
  return result;
3024
3088
  }
3025
3089
  /**
3026
- * Creates a FirestoreFixedItemPageIterationFactoryFunction.
3090
+ * Creates a factory function for generating fixed-set Firestore pagination instances.
3091
+ *
3092
+ * The returned factory takes an array of document references and an optional filter,
3093
+ * producing a pagination instance that iterates over those specific documents in pages.
3094
+ *
3095
+ * @param baseConfig - Base pagination configuration (query reference, driver, page size)
3096
+ * @param documentAccessor - Accessor used to load document snapshots from the references
3097
+ * @returns A factory function that creates fixed-set pagination instances
3027
3098
  */
3028
3099
  function firestoreFixedItemPageIterationFactory(baseConfig, documentAccessor) {
3029
3100
  return (items, filter) => {
@@ -3040,7 +3111,17 @@ function firestoreFixedItemPageIterationFactory(baseConfig, documentAccessor) {
3040
3111
  };
3041
3112
  }
3042
3113
  /**
3043
- * Creates a FirestoreItemPageIterationInstance that iterates over the fixed
3114
+ * Creates a pagination instance that iterates over a fixed set of document references.
3115
+ *
3116
+ * Unlike {@link firestoreItemPageIteration} which queries Firestore dynamically, this function
3117
+ * paginates through a pre-determined list of document references. Each page loads the next
3118
+ * slice of references via the document accessor and produces a synthetic {@link QuerySnapshot}.
3119
+ *
3120
+ * This is useful for paginating over known document sets (e.g., from a pre-computed list
3121
+ * of references) without executing Firestore queries.
3122
+ *
3123
+ * @param config - Configuration including the document references, accessor, and pagination settings
3124
+ * @returns A pagination instance that pages through the fixed reference set
3044
3125
  */
3045
3126
  function firestoreFixedItemPageIteration(config) {
3046
3127
  const { items, documentAccessor } = config;
@@ -3257,24 +3338,47 @@ function readFirestoreModelKeyFromDocumentSnapshot(snapshot) {
3257
3338
  /**
3258
3339
  * @module Firestore Query Iteration
3259
3340
  *
3260
- * This module provides a comprehensive system for iterating through Firestore query results
3261
- * with support for pagination, batching, and parallelism. It enables efficient processing of
3262
- * large result sets by using cursor-based pagination (via "checkpoints") and various iteration
3263
- * strategies.
3341
+ * Provides a layered system for iterating through Firestore query results using
3342
+ * cursor-based pagination ("checkpoints"). Each layer adds convenience on top of the
3343
+ * one below:
3344
+ *
3345
+ * 1. **Checkpoints** ({@link iterateFirestoreDocumentSnapshotCheckpoints}) — core pagination engine
3346
+ * 2. **Batches** ({@link iterateFirestoreDocumentSnapshotBatches}) — subdivides checkpoints into fixed-size batches
3347
+ * 3. **Snapshots** ({@link iterateFirestoreDocumentSnapshots}) — processes individual snapshots
3348
+ * 4. **Pairs** ({@link iterateFirestoreDocumentSnapshotPairs}) — loads typed document wrappers per snapshot
3349
+ *
3350
+ * Batch variants with document pairs are also available:
3351
+ * - {@link iterateFirestoreDocumentSnapshotPairBatches} — batch processing with typed document access
3352
+ *
3353
+ * All functions support configurable limits (`limitPerCheckpoint`, `totalSnapshotsLimit`),
3354
+ * concurrency (`maxParallelCheckpoints`), rate limiting (`waitBetweenCheckpoints`),
3355
+ * snapshot filtering, and repeat cursor detection.
3264
3356
  */
3265
3357
  /**
3266
- * Iterates through the results of a Firestore query by each FirestoreDocumentSnapshotDataPairWithData.
3358
+ * Iterates through Firestore query results, loading each snapshot as a
3359
+ * {@link FirestoreDocumentSnapshotDataPairWithData} before processing.
3267
3360
  *
3268
- * This function efficiently handles pagination through potentially large result sets by using
3269
- * the checkpoint system to load documents in batches. For each document snapshot, it loads the
3270
- * associated data using the provided document accessor, then passes the combined pair to the
3271
- * processing function.
3361
+ * Built on {@link iterateFirestoreDocumentSnapshots}, this adds an automatic document
3362
+ * loading step: each raw snapshot is resolved through the `documentAccessor` to produce
3363
+ * a pair containing both the typed {@link FirestoreDocument} and its snapshot data.
3364
+ * This is the highest-level iteration function — use it when your callback needs
3365
+ * document-level operations (updates, deletes) alongside the snapshot data.
3272
3366
  *
3273
- * @template T - The document data type
3274
- * @template R - The result type of processing each snapshot pair
3275
- * @template D - The FirestoreDocument implementation type (defaults to FirestoreDocument<T>)
3276
- * @param config - Configuration for the iteration, including the document accessor and processing function
3277
- * @returns A promise that resolves to the result of the iteration, including statistics about checkpoints and snapshots processed
3367
+ * @param config - Iteration config including the document accessor and per-pair callback
3368
+ * @returns Checkpoint-level statistics (total checkpoints, snapshots visited, limit status)
3369
+ *
3370
+ * @example
3371
+ * ```typescript
3372
+ * const result = await iterateFirestoreDocumentSnapshotPairs({
3373
+ * queryFactory,
3374
+ * constraintsFactory: [where('status', '==', 'pending')],
3375
+ * limitPerCheckpoint: 100,
3376
+ * documentAccessor: collection.documentAccessor(),
3377
+ * iterateSnapshotPair: async (pair) => {
3378
+ * await pair.document.accessor.set({ ...pair.data, status: 'processed' });
3379
+ * }
3380
+ * });
3381
+ * ```
3278
3382
  */
3279
3383
  async function iterateFirestoreDocumentSnapshotPairs(config) {
3280
3384
  const { iterateSnapshotPair, documentAccessor } = config;
@@ -3288,16 +3392,32 @@ async function iterateFirestoreDocumentSnapshotPairs(config) {
3288
3392
  });
3289
3393
  }
3290
3394
  /**
3291
- * Iterates through the results of a Firestore query by each document snapshot by itself.
3395
+ * Iterates through Firestore query results, processing each document snapshot individually.
3292
3396
  *
3293
- * This function efficiently handles pagination through potentially large result sets by using
3294
- * the checkpoint system to load documents in batches. Each document snapshot is then processed
3295
- * individually using the provided processing function.
3397
+ * Built on {@link iterateFirestoreDocumentSnapshotBatches} with `maxParallelCheckpoints: 1`,
3398
+ * this unwraps each checkpoint's snapshots and processes them one-by-one via
3399
+ * {@link performAsyncTasks} (sequential by default). Use `snapshotsPerformTasksConfig`
3400
+ * to enable parallel snapshot processing within each checkpoint.
3296
3401
  *
3297
- * @template T - The document data type
3298
- * @template R - The result type of processing each snapshot
3299
- * @param config - Configuration for the iteration, including the snapshot processing function
3300
- * @returns A promise that resolves to the result of the iteration, including statistics about checkpoints and snapshots processed
3402
+ * For document-level operations (needing the typed {@link FirestoreDocument} wrapper),
3403
+ * use {@link iterateFirestoreDocumentSnapshotPairs} instead.
3404
+ *
3405
+ * @param config - Iteration config including the per-snapshot callback
3406
+ * @returns Checkpoint-level statistics (total checkpoints, snapshots visited, limit status)
3407
+ *
3408
+ * @example
3409
+ * ```typescript
3410
+ * const result = await iterateFirestoreDocumentSnapshots({
3411
+ * queryFactory,
3412
+ * constraintsFactory: [where('active', '==', true)],
3413
+ * limitPerCheckpoint: 200,
3414
+ * totalSnapshotsLimit: 1000,
3415
+ * iterateSnapshot: async (snapshot) => {
3416
+ * const data = snapshot.data();
3417
+ * await externalApi.sync(data);
3418
+ * }
3419
+ * });
3420
+ * ```
3301
3421
  */
3302
3422
  async function iterateFirestoreDocumentSnapshots(config) {
3303
3423
  const { iterateSnapshot, performTasksConfig, snapshotsPerformTasksConfig } = config;
@@ -3314,10 +3434,32 @@ async function iterateFirestoreDocumentSnapshots(config) {
3314
3434
  });
3315
3435
  }
3316
3436
  /**
3317
- * Iterates through the results of a Firestore query by each FirestoreDocumentSnapshotDataPair.
3437
+ * Iterates through Firestore query results in batches, loading each batch as
3438
+ * {@link FirestoreDocumentSnapshotDataPairWithData} instances before processing.
3318
3439
  *
3319
- * @param config
3320
- * @returns
3440
+ * Built on {@link iterateFirestoreDocumentSnapshotBatches} with `maxParallelCheckpoints: 1`.
3441
+ * Each batch of raw snapshots is resolved through the `documentAccessor` to produce
3442
+ * typed document-snapshot pairs. Use this when you need batch-level operations with
3443
+ * typed document access (e.g., bulk updates, batch writes).
3444
+ *
3445
+ * @param config - Iteration config including the document accessor and per-batch callback
3446
+ * @returns Checkpoint-level statistics (total checkpoints, snapshots visited, limit status)
3447
+ *
3448
+ * @example
3449
+ * ```typescript
3450
+ * const result = await iterateFirestoreDocumentSnapshotPairBatches({
3451
+ * queryFactory,
3452
+ * constraintsFactory: [where('needsMigration', '==', true)],
3453
+ * limitPerCheckpoint: 500,
3454
+ * batchSize: 50,
3455
+ * documentAccessor: collection.documentAccessor(),
3456
+ * iterateSnapshotPairsBatch: async (pairs, batchIndex) => {
3457
+ * const writeBatch = firestore.batch();
3458
+ * pairs.forEach((pair) => writeBatch.update(pair.document.documentRef, { migrated: true }));
3459
+ * await writeBatch.commit();
3460
+ * }
3461
+ * });
3462
+ * ```
3321
3463
  */
3322
3464
  async function iterateFirestoreDocumentSnapshotPairBatches(config) {
3323
3465
  const { iterateSnapshotPairsBatch, documentAccessor } = config;
@@ -3338,10 +3480,32 @@ async function iterateFirestoreDocumentSnapshotPairBatches(config) {
3338
3480
  */
3339
3481
  const DEFAULT_ITERATE_FIRESTORE_DOCUMENT_SNAPSHOT_BATCHES_BATCH_SIZE = 25;
3340
3482
  /**
3341
- * Iterates through the results of a Firestore query by each document snapshot.
3483
+ * Iterates through Firestore query results by subdividing each checkpoint into smaller batches.
3342
3484
  *
3343
- * @param config
3344
- * @returns
3485
+ * Built on {@link iterateFirestoreDocumentSnapshotCheckpoints}, this function takes each
3486
+ * checkpoint's snapshots and splits them into batches (default size: 25). Batches are
3487
+ * processed via {@link performAsyncTasks}, sequential by default. Use this when operations
3488
+ * have size limits (e.g., Firestore batch writes) or benefit from controlled chunk sizes.
3489
+ *
3490
+ * For per-snapshot processing, use {@link iterateFirestoreDocumentSnapshots}.
3491
+ * For batch processing with typed document pairs, use {@link iterateFirestoreDocumentSnapshotPairBatches}.
3492
+ *
3493
+ * @param config - Iteration config including batch size and per-batch callback
3494
+ * @returns Checkpoint-level statistics (total checkpoints, snapshots visited, limit status)
3495
+ *
3496
+ * @example
3497
+ * ```typescript
3498
+ * const result = await iterateFirestoreDocumentSnapshotBatches({
3499
+ * queryFactory,
3500
+ * constraintsFactory: [where('type', '==', 'order')],
3501
+ * limitPerCheckpoint: 500,
3502
+ * batchSize: 100,
3503
+ * iterateSnapshotBatch: async (snapshots, batchIndex) => {
3504
+ * const data = snapshots.map((s) => s.data());
3505
+ * await analytics.trackBatch(data);
3506
+ * }
3507
+ * });
3508
+ * ```
3345
3509
  */
3346
3510
  async function iterateFirestoreDocumentSnapshotBatches(config) {
3347
3511
  const { iterateSnapshotBatch, batchSizeForSnapshots: inputBatchSizeForSnapshots, performTasksConfig, batchSize: inputBatchSize } = config;
@@ -3367,29 +3531,75 @@ async function iterateFirestoreDocumentSnapshotBatches(config) {
3367
3531
  });
3368
3532
  }
3369
3533
  /**
3370
- * Creates a IterateFirestoreDocumentSnapshotCheckpointsFilterCheckpointSnapshotsFunction that filters out any repeat documents.
3534
+ * Creates a checkpoint filter that deduplicates documents across checkpoints.
3535
+ *
3536
+ * Repeat documents can appear when a document is updated during iteration and
3537
+ * re-matches the query in a subsequent checkpoint. This factory returns a stateful
3538
+ * filter that tracks seen document keys and removes duplicates.
3371
3539
  *
3372
- * Repeat documents can occur in cases where the document is updated and the query matches it again for a different reason.
3373
- * This utility function creates a filter that prevents processing the same document multiple times.
3540
+ * The filter maintains state across checkpoints use a single instance for the
3541
+ * entire iteration run. Pair with `handleRepeatCursor: false` to also terminate
3542
+ * iteration when cursor-level repeats are detected.
3374
3543
  *
3375
- * @param readKeyFunction - Function that extracts a unique key from a document snapshot, defaults to document ID
3376
- * @returns A filter function that prevents duplicate document processing
3544
+ * @param readKeyFunction - Extracts a unique key from each snapshot; defaults to `snapshot.id`
3545
+ * @returns A stateful filter function suitable for `filterCheckpointSnapshots`
3546
+ *
3547
+ * @example
3548
+ * ```typescript
3549
+ * const result = await iterateFirestoreDocumentSnapshotCheckpoints({
3550
+ * queryFactory,
3551
+ * constraintsFactory: [orderBy('updatedAt')],
3552
+ * limitPerCheckpoint: 100,
3553
+ * filterCheckpointSnapshots: filterRepeatCheckpointSnapshots(),
3554
+ * handleRepeatCursor: false,
3555
+ * iterateCheckpoint: async (snapshots) => {
3556
+ * return snapshots.map((s) => s.data());
3557
+ * }
3558
+ * });
3559
+ * ```
3377
3560
  */
3378
3561
  function filterRepeatCheckpointSnapshots(readKeyFunction = (x) => x.id) {
3379
3562
  const allowOnceFilter = allowValueOnceFilter(readKeyFunction);
3380
3563
  return async (snapshots) => snapshots.filter(allowOnceFilter);
3381
3564
  }
3382
3565
  /**
3383
- * Iterates through the results of a Firestore query in several batches.
3566
+ * Core cursor-based pagination engine for iterating through Firestore query results.
3384
3567
  *
3385
- * This is the core pagination function that handles cursor-based iteration through
3386
- * potentially large Firestore query results. It manages cursor documents, checkpoint
3387
- * processing, parallel execution, and various limit controls.
3568
+ * This is the foundational function in the Firestore iteration hierarchy. It drives
3569
+ * sequential cursor-based pagination: each "checkpoint" executes a Firestore query,
3570
+ * uses the last document as a `startAfter` cursor for the next query, and passes
3571
+ * results to the `iterateCheckpoint` callback.
3388
3572
  *
3389
- * @template T - The document data type
3390
- * @template R - The result type of the iteration
3391
- * @param config - Complete configuration for the pagination and processing behavior
3392
- * @returns Promise resolving to statistics about the iteration
3573
+ * The iteration loop continues until one of these conditions is met:
3574
+ * - A query returns no results (no more matching documents)
3575
+ * - The `totalSnapshotsLimit` is reached
3576
+ * - A repeat cursor is detected and `handleRepeatCursor` returns `false`
3577
+ * - The effective `limitPerCheckpoint` calculates to 0 remaining
3578
+ *
3579
+ * Higher-level functions build on this:
3580
+ * - {@link iterateFirestoreDocumentSnapshotBatches} — subdivides checkpoints into smaller batches
3581
+ * - {@link iterateFirestoreDocumentSnapshots} — processes one snapshot at a time
3582
+ * - {@link iterateFirestoreDocumentSnapshotPairs} — loads typed document wrappers per snapshot
3583
+ *
3584
+ * @param config - Complete configuration for pagination, processing, and termination behavior
3585
+ * @returns Statistics including total checkpoints executed, snapshots visited, and whether the limit was hit
3586
+ *
3587
+ * @example
3588
+ * ```typescript
3589
+ * const result = await iterateFirestoreDocumentSnapshotCheckpoints({
3590
+ * queryFactory,
3591
+ * constraintsFactory: [where('createdAt', '<=', cutoffDate), orderBy('createdAt')],
3592
+ * limitPerCheckpoint: 200,
3593
+ * totalSnapshotsLimit: 5000,
3594
+ * handleRepeatCursor: false,
3595
+ * iterateCheckpoint: async (snapshots, querySnapshot) => {
3596
+ * return snapshots.map((s) => ({ id: s.id, data: s.data() }));
3597
+ * },
3598
+ * useCheckpointResult: (result) => {
3599
+ * console.log(`Checkpoint ${result.i}: processed ${result.docSnapshots.length} docs`);
3600
+ * }
3601
+ * });
3602
+ * ```
3393
3603
  */
3394
3604
  async function iterateFirestoreDocumentSnapshotCheckpoints(config) {
3395
3605
  const { iterateCheckpoint, filterCheckpointSnapshots: inputFilterCheckpointSnapshot, handleRepeatCursor: inputHandleRepeatCursor, waitBetweenCheckpoints, useCheckpointResult, constraintsFactory: inputConstraintsFactory, dynamicConstraints: inputDynamicConstraints, queryFactory, maxParallelCheckpoints = 1, limitPerCheckpoint: inputLimitPerCheckpoint, totalSnapshotsLimit: inputTotalSnapshotsLimit } = config;
@@ -3492,13 +3702,20 @@ async function iterateFirestoreDocumentSnapshotCheckpoints(config) {
3492
3702
  }
3493
3703
  // MARK: Utility
3494
3704
  /**
3495
- * Creates a filter that allows each document snapshot to be processed only once based on its path.
3705
+ * Creates a stateful filter that allows each document snapshot through only once,
3706
+ * keyed by its full Firestore model path.
3496
3707
  *
3497
- * This utility helps prevent duplicate processing of documents by tracking which ones have
3498
- * already been seen based on their path.
3708
+ * Unlike {@link filterRepeatCheckpointSnapshots} which uses document ID by default,
3709
+ * this filter uses the full document path ({@link readFirestoreModelKeyFromDocumentSnapshot}),
3710
+ * making it suitable for cross-collection iteration where document IDs alone may collide.
3499
3711
  *
3500
- * @template T - The document snapshot type
3501
- * @returns A filter function that only allows each unique document to pass once
3712
+ * @returns A reusable filter function that passes each unique document path exactly once
3713
+ *
3714
+ * @example
3715
+ * ```typescript
3716
+ * const onceFilter = allowDocumentSnapshotWithPathOnceFilter();
3717
+ * const uniqueSnapshots = allSnapshots.filter(onceFilter);
3718
+ * ```
3502
3719
  */
3503
3720
  function allowDocumentSnapshotWithPathOnceFilter() {
3504
3721
  return allowValueOnceFilter(readFirestoreModelKeyFromDocumentSnapshot);
@@ -5224,62 +5441,15 @@ const DBX_FIREBASE_SERVER_NO_AUTH_ERROR_CODE = 'NO_AUTH';
5224
5441
  */
5225
5442
  const DBX_FIREBASE_SERVER_NO_UID_ERROR_CODE = 'NO_USER_UID';
5226
5443
 
5227
- /******************************************************************************
5228
- Copyright (c) Microsoft Corporation.
5229
-
5230
- Permission to use, copy, modify, and/or distribute this software for any
5231
- purpose with or without fee is hereby granted.
5232
-
5233
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
5234
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
5235
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
5236
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
5237
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
5238
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
5239
- PERFORMANCE OF THIS SOFTWARE.
5240
- ***************************************************************************** */
5241
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
5242
-
5243
-
5244
- function __decorate(decorators, target, key, desc) {
5245
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
5246
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5247
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5248
- return c > 3 && r && Object.defineProperty(target, key, r), r;
5249
- }
5250
-
5251
- function __metadata(metadataKey, metadataValue) {
5252
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
5253
- }
5254
-
5255
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
5256
- var e = new Error(message);
5257
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
5258
- };
5259
-
5260
5444
  var ScheduledFunctionDevelopmentFunctionTypeEnum;
5261
5445
  (function (ScheduledFunctionDevelopmentFunctionTypeEnum) {
5262
5446
  ScheduledFunctionDevelopmentFunctionTypeEnum["LIST"] = "list";
5263
5447
  ScheduledFunctionDevelopmentFunctionTypeEnum["RUN"] = "run";
5264
5448
  })(ScheduledFunctionDevelopmentFunctionTypeEnum || (ScheduledFunctionDevelopmentFunctionTypeEnum = {}));
5265
- class ScheduledFunctionDevelopmentFirebaseFunctionParams {
5266
- type;
5267
- /**
5268
- * Name of function to run.
5269
- */
5270
- run;
5271
- }
5272
- __decorate([
5273
- Expose(),
5274
- IsEnum(ScheduledFunctionDevelopmentFunctionTypeEnum),
5275
- __metadata("design:type", String)
5276
- ], ScheduledFunctionDevelopmentFirebaseFunctionParams.prototype, "type", void 0);
5277
- __decorate([
5278
- Expose(),
5279
- IsString(),
5280
- IsOptional(),
5281
- __metadata("design:type", String)
5282
- ], ScheduledFunctionDevelopmentFirebaseFunctionParams.prototype, "run", void 0);
5449
+ const scheduledFunctionDevelopmentFirebaseFunctionParamsType = type({
5450
+ type: "'list' | 'run'",
5451
+ 'run?': 'string'
5452
+ });
5283
5453
  class ScheduledFunctionDevelopmentFirebaseFunctionListEntry {
5284
5454
  name;
5285
5455
  }
@@ -5306,101 +5476,30 @@ function firebaseModelLoader(getFirestoreCollection) {
5306
5476
  }
5307
5477
 
5308
5478
  /**
5309
- * isFirestoreModelKey validator
5310
- */
5311
- function IsFirestoreModelKey(validationOptions) {
5312
- return function (object, propertyName) {
5313
- registerDecorator({
5314
- name: 'isFirestoreModelKey',
5315
- target: object.constructor,
5316
- propertyName: propertyName,
5317
- options: validationOptions,
5318
- validator: {
5319
- validate: isFirestoreModelKey,
5320
- defaultMessage: buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args?.value}" is not a FirestoreModelKey.`, validationOptions)
5321
- }
5322
- });
5323
- };
5324
- }
5479
+ * ArkType schema for a FirestoreModelKey (full path like "collection/12345").
5480
+ */
5481
+ const firestoreModelKeyType = type('string > 0').narrow((val, ctx) => isFirestoreModelKey(val) || ctx.mustBe('a valid FirestoreModelKey'));
5325
5482
  /**
5326
- * isFirestoreModelId validator
5483
+ * ArkType schema for a FirestoreModelId (document ID like "12345").
5327
5484
  */
5328
- function IsFirestoreModelId(validationOptions) {
5329
- return function (object, propertyName) {
5330
- registerDecorator({
5331
- name: 'isFirestoreModelId',
5332
- target: object.constructor,
5333
- propertyName: propertyName,
5334
- options: validationOptions,
5335
- validator: {
5336
- validate: isFirestoreModelId,
5337
- defaultMessage: buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args?.value}" is not a FirestoreModelId.`, validationOptions)
5338
- }
5339
- });
5340
- };
5341
- }
5485
+ const firestoreModelIdType = type('string > 0').narrow((val, ctx) => isFirestoreModelId(val) || ctx.mustBe('a valid FirestoreModelId'));
5342
5486
  /**
5343
- * isFirestoreModelIdOrKey validator
5487
+ * ArkType schema for a FirestoreModelId or FirestoreModelKey.
5344
5488
  */
5345
- function IsFirestoreModelIdOrKey(validationOptions) {
5346
- return function (object, propertyName) {
5347
- registerDecorator({
5348
- name: 'isFirestoreModelIdOrKey',
5349
- target: object.constructor,
5350
- propertyName: propertyName,
5351
- options: validationOptions,
5352
- validator: {
5353
- validate: isFirestoreModelIdOrKey,
5354
- defaultMessage: buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args?.value}" is not a FirestoreModelId or FirestoreModelKey.`, validationOptions)
5355
- }
5356
- });
5357
- };
5358
- }
5489
+ const firestoreModelIdOrKeyType = type('string > 0').narrow((val, ctx) => isFirestoreModelIdOrKey(val) || ctx.mustBe('a valid FirestoreModelId or FirestoreModelKey'));
5359
5490
 
5360
- /**
5361
- * Simple annotated params that implements FirestoreModelKeyRef.
5362
- */
5363
- class TargetModelParams {
5364
- key;
5365
- }
5366
- __decorate([
5367
- Expose(),
5368
- IsNotEmpty(),
5369
- IsFirestoreModelKey(),
5370
- __metadata("design:type", String)
5371
- ], TargetModelParams.prototype, "key", void 0);
5372
- class InferredTargetModelParams {
5373
- key;
5374
- }
5375
- __decorate([
5376
- Expose(),
5377
- IsOptional(),
5378
- IsNotEmpty(),
5379
- IsFirestoreModelKey(),
5380
- __metadata("design:type", String)
5381
- ], InferredTargetModelParams.prototype, "key", void 0);
5382
- /**
5383
- * Simple annotated params that implements FirestoreModelKeyRef but key is a FirestoreModelId.
5384
- */
5385
- class TargetModelIdParams {
5386
- key;
5387
- }
5388
- __decorate([
5389
- Expose(),
5390
- IsNotEmpty(),
5391
- IsFirestoreModelId(),
5392
- __metadata("design:type", String)
5393
- ], TargetModelIdParams.prototype, "key", void 0);
5394
- class InferredTargetModelIdParams {
5395
- key;
5396
- }
5397
- __decorate([
5398
- Expose(),
5399
- IsOptional(),
5400
- IsNotEmpty(),
5401
- IsFirestoreModelId(),
5402
- __metadata("design:type", String)
5403
- ], InferredTargetModelIdParams.prototype, "key", void 0);
5491
+ const targetModelParamsType = type({
5492
+ key: firestoreModelKeyType
5493
+ });
5494
+ const inferredTargetModelParamsType = type({
5495
+ 'key?': firestoreModelKeyType
5496
+ });
5497
+ const targetModelIdParamsType = type({
5498
+ key: firestoreModelIdType
5499
+ });
5500
+ const inferredTargetModelIdParamsType = type({
5501
+ 'key?': firestoreModelIdType
5502
+ });
5404
5503
 
5405
5504
  /**
5406
5505
  * Abstract AbstractModelPermissionService implementation for FirebaseModelsPermissionService.
@@ -6773,582 +6872,95 @@ const NOTIFICATION_SUBJECT_MIN_LENGTH = 2;
6773
6872
  const NOTIFICATION_SUBJECT_MAX_LENGTH = 100;
6774
6873
  const NOTIFICATION_MESSAGE_MIN_LENGTH = 2;
6775
6874
  const NOTIFICATION_MESSAGE_MAX_LENGTH = 1000;
6776
- /**
6777
- * Config entries are inserted, unless marked as remove.
6778
- */
6779
- class NotificationBoxRecipientTemplateConfigArrayEntryParam {
6780
- type;
6781
- sd;
6782
- se;
6783
- st;
6784
- sp;
6785
- sn;
6786
- /**
6787
- * If true, removes this configuration
6788
- */
6789
- remove;
6790
- }
6791
- __decorate([
6792
- Expose(),
6793
- IsString(),
6794
- __metadata("design:type", String)
6795
- ], NotificationBoxRecipientTemplateConfigArrayEntryParam.prototype, "type", void 0);
6796
- __decorate([
6797
- Expose(),
6798
- IsOptional(),
6799
- IsBoolean(),
6800
- __metadata("design:type", Object)
6801
- ], NotificationBoxRecipientTemplateConfigArrayEntryParam.prototype, "sd", void 0);
6802
- __decorate([
6803
- Expose(),
6804
- IsOptional(),
6805
- IsBoolean(),
6806
- __metadata("design:type", Object)
6807
- ], NotificationBoxRecipientTemplateConfigArrayEntryParam.prototype, "se", void 0);
6808
- __decorate([
6809
- Expose(),
6810
- IsOptional(),
6811
- IsBoolean(),
6812
- __metadata("design:type", Object)
6813
- ], NotificationBoxRecipientTemplateConfigArrayEntryParam.prototype, "st", void 0);
6814
- __decorate([
6815
- Expose(),
6816
- IsOptional(),
6817
- IsBoolean(),
6818
- __metadata("design:type", Object)
6819
- ], NotificationBoxRecipientTemplateConfigArrayEntryParam.prototype, "sp", void 0);
6820
- __decorate([
6821
- Expose(),
6822
- IsOptional(),
6823
- IsBoolean(),
6824
- __metadata("design:type", Object)
6825
- ], NotificationBoxRecipientTemplateConfigArrayEntryParam.prototype, "sn", void 0);
6826
- __decorate([
6827
- Expose(),
6828
- IsOptional(),
6829
- IsBoolean(),
6830
- __metadata("design:type", Object)
6831
- ], NotificationBoxRecipientTemplateConfigArrayEntryParam.prototype, "remove", void 0);
6832
- /**
6833
- * Used for creating a new NotificationUser for a user.
6834
- */
6835
- class CreateNotificationUserParams {
6836
- /**
6837
- * UID of the user to create the NotificationUser for.
6838
- */
6839
- uid;
6840
- }
6841
- __decorate([
6842
- Expose(),
6843
- IsOptional(),
6844
- IsFirestoreModelId(),
6845
- __metadata("design:type", String)
6846
- ], CreateNotificationUserParams.prototype, "uid", void 0);
6847
- /**
6848
- * Used for updating the global or default config on a NotificationUser.
6849
- */
6850
- class UpdateNotificationUserDefaultNotificationBoxRecipientConfigParams {
6851
- /**
6852
- * NotificationBox recipient to update. Is ignored if UID is provided and matches a user. Used for external recipients/users.
6853
- */
6854
- i;
6855
- /**
6856
- * Override email address
6857
- */
6858
- e;
6859
- /**
6860
- * Override phone number
6861
- */
6862
- t;
6863
- /**
6864
- * Array of configs that correspond with "c"
6865
- */
6866
- configs;
6867
- lk;
6868
- bk;
6869
- f;
6870
- }
6871
- __decorate([
6872
- Expose(),
6873
- IsOptional(),
6874
- IsNumber(),
6875
- __metadata("design:type", Object)
6876
- ], UpdateNotificationUserDefaultNotificationBoxRecipientConfigParams.prototype, "i", void 0);
6877
- __decorate([
6878
- Expose(),
6879
- IsOptional(),
6880
- IsEmail(),
6881
- __metadata("design:type", Object)
6882
- ], UpdateNotificationUserDefaultNotificationBoxRecipientConfigParams.prototype, "e", void 0);
6883
- __decorate([
6884
- Expose(),
6885
- IsOptional(),
6886
- IsE164PhoneNumber(),
6887
- __metadata("design:type", Object)
6888
- ], UpdateNotificationUserDefaultNotificationBoxRecipientConfigParams.prototype, "t", void 0);
6889
- __decorate([
6890
- Expose(),
6891
- IsOptional(),
6892
- IsArray(),
6893
- ValidateNested({ each: true }),
6894
- Type(() => NotificationBoxRecipientTemplateConfigArrayEntryParam),
6895
- __metadata("design:type", Object)
6896
- ], UpdateNotificationUserDefaultNotificationBoxRecipientConfigParams.prototype, "configs", void 0);
6897
- __decorate([
6898
- Expose(),
6899
- IsBoolean(),
6900
- IsOptional(),
6901
- __metadata("design:type", Object)
6902
- ], UpdateNotificationUserDefaultNotificationBoxRecipientConfigParams.prototype, "lk", void 0);
6903
- __decorate([
6904
- Expose(),
6905
- IsBoolean(),
6906
- IsOptional(),
6907
- __metadata("design:type", Object)
6908
- ], UpdateNotificationUserDefaultNotificationBoxRecipientConfigParams.prototype, "bk", void 0);
6909
- __decorate([
6910
- Expose(),
6911
- IsOptional(),
6912
- IsEnum(NotificationBoxRecipientFlag),
6913
- __metadata("design:type", Object)
6914
- ], UpdateNotificationUserDefaultNotificationBoxRecipientConfigParams.prototype, "f", void 0);
6915
- class UpdateNotificationBoxRecipientLikeParams {
6916
- /**
6917
- * Override email address
6918
- */
6919
- e;
6920
- /**
6921
- * Override phone number
6922
- */
6923
- t;
6924
- /**
6925
- * Notification summary id
6926
- */
6927
- s;
6928
- /**
6929
- * Array of configs
6930
- */
6931
- configs;
6932
- }
6933
- __decorate([
6934
- Expose(),
6935
- IsOptional(),
6936
- IsEmail(),
6937
- __metadata("design:type", Object)
6938
- ], UpdateNotificationBoxRecipientLikeParams.prototype, "e", void 0);
6939
- __decorate([
6940
- Expose(),
6941
- IsOptional(),
6942
- IsE164PhoneNumber(),
6943
- __metadata("design:type", Object)
6944
- ], UpdateNotificationBoxRecipientLikeParams.prototype, "t", void 0);
6945
- __decorate([
6946
- Expose(),
6947
- IsOptional(),
6948
- IsPhoneNumber(),
6949
- __metadata("design:type", Object)
6950
- ], UpdateNotificationBoxRecipientLikeParams.prototype, "s", void 0);
6951
- __decorate([
6952
- Expose(),
6953
- IsOptional(),
6954
- IsArray(),
6955
- ValidateNested({ each: true }),
6956
- Type(() => NotificationBoxRecipientTemplateConfigArrayEntryParam),
6957
- __metadata("design:type", Object)
6958
- ], UpdateNotificationBoxRecipientLikeParams.prototype, "configs", void 0);
6959
- /**
6960
- * Used for updating the target NotificationUserNotificationBoxRecipientConfig.
6961
- */
6962
- class UpdateNotificationUserNotificationBoxRecipientParams extends UpdateNotificationBoxRecipientLikeParams {
6963
- /**
6964
- * NotificationBox config to update
6965
- */
6966
- nb;
6967
- rm;
6968
- lk;
6969
- bk;
6970
- f;
6971
- /**
6972
- * Whether or not to delete this configuration entirely.
6973
- *
6974
- * Will only delete if rm is true and ns is false. Is ignored otherwise.
6975
- */
6976
- deleteRemovedConfig;
6977
- }
6978
- __decorate([
6979
- Expose(),
6980
- IsFirestoreModelId(),
6981
- __metadata("design:type", String)
6982
- ], UpdateNotificationUserNotificationBoxRecipientParams.prototype, "nb", void 0);
6983
- __decorate([
6984
- Expose(),
6985
- IsOptional(),
6986
- IsBoolean(),
6987
- __metadata("design:type", Object)
6988
- ], UpdateNotificationUserNotificationBoxRecipientParams.prototype, "rm", void 0);
6989
- __decorate([
6990
- Expose(),
6991
- IsOptional(),
6992
- IsBoolean(),
6993
- __metadata("design:type", Object)
6994
- ], UpdateNotificationUserNotificationBoxRecipientParams.prototype, "lk", void 0);
6995
- __decorate([
6996
- Expose(),
6997
- IsOptional(),
6998
- IsBoolean(),
6999
- __metadata("design:type", Object)
7000
- ], UpdateNotificationUserNotificationBoxRecipientParams.prototype, "bk", void 0);
7001
- __decorate([
7002
- Expose(),
7003
- IsOptional(),
7004
- IsEnum(() => NotificationBoxRecipientFlag),
7005
- __metadata("design:type", Object)
7006
- ], UpdateNotificationUserNotificationBoxRecipientParams.prototype, "f", void 0);
7007
- __decorate([
7008
- Expose(),
7009
- IsOptional(),
7010
- IsBoolean(),
7011
- __metadata("design:type", Object)
7012
- ], UpdateNotificationUserNotificationBoxRecipientParams.prototype, "deleteRemovedConfig", void 0);
7013
- /**
7014
- * Used for updating the NotificationUser.
7015
- */
7016
- class UpdateNotificationUserParams extends TargetModelParams {
7017
- // TODO: update configs...
7018
- gc;
7019
- dc;
7020
- bc;
7021
- }
7022
- __decorate([
7023
- Expose(),
7024
- IsOptional(),
7025
- ValidateNested(),
7026
- Type(() => UpdateNotificationUserDefaultNotificationBoxRecipientConfigParams),
7027
- __metadata("design:type", Object)
7028
- ], UpdateNotificationUserParams.prototype, "gc", void 0);
7029
- __decorate([
7030
- Expose(),
7031
- IsOptional(),
7032
- ValidateNested(),
7033
- Type(() => UpdateNotificationUserDefaultNotificationBoxRecipientConfigParams),
7034
- __metadata("design:type", Object)
7035
- ], UpdateNotificationUserParams.prototype, "dc", void 0);
7036
- __decorate([
7037
- Expose(),
7038
- IsOptional(),
7039
- IsArray(),
7040
- ValidateNested({ each: true }),
7041
- Type(() => UpdateNotificationUserNotificationBoxRecipientParams),
7042
- __metadata("design:type", Object)
7043
- ], UpdateNotificationUserParams.prototype, "bc", void 0);
7044
- class ResyncNotificationUserParams extends TargetModelParams {
7045
- }
7046
- class ResyncAllNotificationUserParams {
7047
- }
7048
- /**
7049
- * Used for creating a new NotificationSummary for a model.
7050
- */
7051
- class CreateNotificationSummaryParams {
7052
- /**
7053
- * Model to create the NotificationSummary for.
7054
- */
7055
- model;
7056
- }
7057
- __decorate([
7058
- Expose(),
7059
- IsNotEmpty(),
7060
- IsFirestoreModelKey(),
7061
- __metadata("design:type", String)
7062
- ], CreateNotificationSummaryParams.prototype, "model", void 0);
7063
- /**
7064
- * Used for updating the NotificationSummary.
7065
- */
7066
- class UpdateNotificationSummaryParams extends TargetModelParams {
7067
- /**
7068
- * Updates the "rat" time to now.
7069
- */
7070
- flagAllRead;
7071
- /**
7072
- * Sets the "rat" time to the given date, or clears it.
7073
- */
7074
- setReadAtTime;
7075
- }
7076
- __decorate([
7077
- Expose(),
7078
- IsOptional(),
7079
- IsBoolean(),
7080
- __metadata("design:type", Object)
7081
- ], UpdateNotificationSummaryParams.prototype, "flagAllRead", void 0);
7082
- __decorate([
7083
- Expose(),
7084
- IsOptional(),
7085
- IsDate(),
7086
- Type(() => Date),
7087
- __metadata("design:type", Object)
7088
- ], UpdateNotificationSummaryParams.prototype, "setReadAtTime", void 0);
7089
- /**
7090
- * Used for creating or initializing a new NotificationBox for a model.
7091
- *
7092
- * Mainly used for testing. Not exposed to the API.
7093
- *
7094
- * The preferred way is to create a NotificationBox through a Notification.
7095
- */
7096
- class CreateNotificationBoxParams {
7097
- model;
7098
- }
7099
- __decorate([
7100
- Expose(),
7101
- IsNotEmpty(),
7102
- IsFirestoreModelKey(),
7103
- __metadata("design:type", String)
7104
- ], CreateNotificationBoxParams.prototype, "model", void 0);
7105
- /**
7106
- * Used for initializing an uninitialized model like NotificationBox or NotificationSummary.
7107
- */
7108
- class InitializeNotificationModelParams extends TargetModelParams {
7109
- /**
7110
- * Whether or not to throw an error if the notification has already been sent or is being sent.
7111
- */
7112
- throwErrorIfAlreadyInitialized;
7113
- }
7114
- __decorate([
7115
- Expose(),
7116
- IsBoolean(),
7117
- IsOptional(),
7118
- __metadata("design:type", Boolean)
7119
- ], InitializeNotificationModelParams.prototype, "throwErrorIfAlreadyInitialized", void 0);
7120
- class InitializeAllApplicableNotificationBoxesParams {
7121
- }
7122
- class InitializeAllApplicableNotificationSummariesParams {
7123
- }
7124
- /**
7125
- * Used for updating the NotificationBox.
7126
- */
7127
- class UpdateNotificationBoxParams extends TargetModelParams {
7128
- }
7129
- /**
7130
- * Used to create/update a notification box recipient.
7131
- */
7132
- class UpdateNotificationBoxRecipientParams extends UpdateNotificationBoxRecipientLikeParams {
7133
- /**
7134
- * NotificationBox key to update.
7135
- */
7136
- key;
7137
- /**
7138
- * NotificationBox recipient to update. Is ignored if UID is provided and matches a user. Used for external recipients/users.
7139
- */
7140
- i;
7141
- /**
7142
- * Notification recipient to update by UID, if applicable.
7143
- */
7144
- uid;
7145
- /**
7146
- * Whether or not to create the user if they currently do not exist. Defaults to false.
7147
- */
7148
- insert;
7149
- /**
7150
- * Whether or not to enable/disable the recipient from recieving items from this box.
7151
- */
7152
- enabled;
7153
- /**
7154
- * Whether or not to remove the user if they exist. Defaults to false.
7155
- */
7156
- remove;
7157
- /**
7158
- * If true, the target recipient will have this NotificationBox added to their exclusion list.
7159
- * If false, the target recipient will have this NotificationBox removed from their exclusion list.
7160
- *
7161
- * If set, the other functions are ignored.
7162
- *
7163
- * If targeting the user by the index, the NotificationBox must exist, and the user must have a uid, otherwise an error will be thrown.
7164
- */
7165
- setExclusion;
7166
- }
7167
- __decorate([
7168
- Expose(),
7169
- IsNotEmpty(),
7170
- IsFirestoreModelKey(),
7171
- __metadata("design:type", String)
7172
- ], UpdateNotificationBoxRecipientParams.prototype, "key", void 0);
7173
- __decorate([
7174
- Expose(),
7175
- IsOptional(),
7176
- IsNumber(),
7177
- __metadata("design:type", Object)
7178
- ], UpdateNotificationBoxRecipientParams.prototype, "i", void 0);
7179
- __decorate([
7180
- Expose(),
7181
- IsOptional(),
7182
- IsFirestoreModelId(),
7183
- __metadata("design:type", Object)
7184
- ], UpdateNotificationBoxRecipientParams.prototype, "uid", void 0);
7185
- __decorate([
7186
- Expose(),
7187
- IsOptional(),
7188
- IsBoolean(),
7189
- __metadata("design:type", Object)
7190
- ], UpdateNotificationBoxRecipientParams.prototype, "insert", void 0);
7191
- __decorate([
7192
- Expose(),
7193
- IsOptional(),
7194
- IsBoolean(),
7195
- __metadata("design:type", Object)
7196
- ], UpdateNotificationBoxRecipientParams.prototype, "enabled", void 0);
7197
- __decorate([
7198
- Expose(),
7199
- IsOptional(),
7200
- IsBoolean(),
7201
- __metadata("design:type", Object)
7202
- ], UpdateNotificationBoxRecipientParams.prototype, "remove", void 0);
7203
- __decorate([
7204
- Expose(),
7205
- IsOptional(),
7206
- IsBoolean(),
7207
- __metadata("design:type", Object)
7208
- ], UpdateNotificationBoxRecipientParams.prototype, "setExclusion", void 0);
7209
- class NotificationRecipientParams {
7210
- /**
7211
- * User to send the notification to.
7212
- */
7213
- uid;
7214
- /**
7215
- * Recipient Name
7216
- */
7217
- un;
7218
- /**
7219
- * Email address
7220
- */
7221
- e;
7222
- /**
7223
- * Phone number
7224
- */
7225
- p;
7226
- }
7227
- __decorate([
7228
- Expose(),
7229
- IsOptional(),
7230
- IsFirestoreModelId(),
7231
- __metadata("design:type", Object)
7232
- ], NotificationRecipientParams.prototype, "uid", void 0);
7233
- __decorate([
7234
- Expose(),
7235
- IsOptional(),
7236
- IsString(),
7237
- MinLength(NOTIFICATION_RECIPIENT_NAME_MIN_LENGTH),
7238
- MaxLength(NOTIFICATION_RECIPIENT_NAME_MAX_LENGTH),
7239
- __metadata("design:type", Object)
7240
- ], NotificationRecipientParams.prototype, "un", void 0);
7241
- __decorate([
7242
- Expose(),
7243
- IsOptional(),
7244
- IsEmail(),
7245
- __metadata("design:type", Object)
7246
- ], NotificationRecipientParams.prototype, "e", void 0);
7247
- __decorate([
7248
- Expose(),
7249
- IsOptional(),
7250
- IsPhoneNumber(),
7251
- __metadata("design:type", Object)
7252
- ], NotificationRecipientParams.prototype, "p", void 0);
7253
- /**
7254
- * Used for sending the notification immediately, if it has not already been sent.
7255
- */
7256
- class SendNotificationParams extends TargetModelParams {
7257
- /**
7258
- * Whether or not to ignore the send at time. Defaults to false.
7259
- *
7260
- * If true, the send at time will be ignored and the notification will be sent immediately.
7261
- */
7262
- ignoreSendAtThrottle;
7263
- /**
7264
- * Whether or not to throw an error if the notification has already been sent or is being sent.
7265
- *
7266
- * Defaults to false.
7267
- */
7268
- throwErrorIfSent;
7269
- }
7270
- __decorate([
7271
- Expose(),
7272
- IsOptional(),
7273
- IsBoolean(),
7274
- __metadata("design:type", Object)
7275
- ], SendNotificationParams.prototype, "ignoreSendAtThrottle", void 0);
7276
- __decorate([
7277
- Expose(),
7278
- IsOptional(),
7279
- IsBoolean(),
7280
- __metadata("design:type", Object)
7281
- ], SendNotificationParams.prototype, "throwErrorIfSent", void 0);
7282
- /**
7283
- * Params class used for subscribing a system user to a NotificationBox for a model.
7284
- */
7285
- class AbstractSubscribeToNotificationBoxParams extends TargetModelParams {
7286
- /**
7287
- * Notification recipient to subscribe to notifications
7288
- */
7289
- uid;
7290
- }
7291
- __decorate([
7292
- Expose(),
7293
- IsFirestoreModelId(),
7294
- __metadata("design:type", String)
7295
- ], AbstractSubscribeToNotificationBoxParams.prototype, "uid", void 0);
7296
- class AbstractSubscribeOrUnsubscribeToNotificationBoxParams extends AbstractSubscribeToNotificationBoxParams {
7297
- /**
7298
- * If true, unsubscribes from the notification box instead.
7299
- */
7300
- unsubscribe;
7301
- }
7302
- __decorate([
7303
- Expose(),
7304
- IsOptional(),
7305
- IsBoolean(),
7306
- __metadata("design:type", Object)
7307
- ], AbstractSubscribeOrUnsubscribeToNotificationBoxParams.prototype, "unsubscribe", void 0);
7308
- /**
7309
- * Used for sending queued notifications in the system.
7310
- */
7311
- class SendQueuedNotificationsParams {
7312
- /**
7313
- * The max number of send loops to run.
7314
- *
7315
- * No limit by default.
7316
- */
7317
- maxSendNotificationLoops;
7318
- /**
7319
- * The max number of parallel send tasks to run.
7320
- *
7321
- * Defaults to 5.
7322
- */
7323
- maxParellelSendTasks;
7324
- /**
7325
- * The threshold to use when to log a warning for an excessive of notification loops.
7326
- */
7327
- sendNotificationLoopsTaskExcessThreshold;
7328
- }
7329
- __decorate([
7330
- Expose(),
7331
- IsOptional(),
7332
- IsNumber(),
7333
- __metadata("design:type", Object)
7334
- ], SendQueuedNotificationsParams.prototype, "maxSendNotificationLoops", void 0);
7335
- __decorate([
7336
- Expose(),
7337
- IsOptional(),
7338
- IsNumber(),
7339
- __metadata("design:type", Object)
7340
- ], SendQueuedNotificationsParams.prototype, "maxParellelSendTasks", void 0);
7341
- __decorate([
7342
- Expose(),
7343
- IsOptional(),
7344
- IsNumber(),
7345
- __metadata("design:type", Object)
7346
- ], SendQueuedNotificationsParams.prototype, "sendNotificationLoopsTaskExcessThreshold", void 0);
7347
- /**
7348
- * Used for sending queued notifications in the system.
7349
- */
7350
- class CleanupSentNotificationsParams {
7351
- }
6875
+ const notificationBoxRecipientTemplateConfigArrayEntryParamType = type({
6876
+ type: 'string > 0',
6877
+ 'sd?': clearable('boolean'),
6878
+ 'se?': clearable('boolean'),
6879
+ 'st?': clearable('boolean'),
6880
+ 'sp?': clearable('boolean'),
6881
+ 'sn?': clearable('boolean'),
6882
+ 'remove?': clearable('boolean')
6883
+ });
6884
+ const createNotificationUserParamsType = type({
6885
+ uid: firestoreModelIdType
6886
+ });
6887
+ const updateNotificationUserDefaultNotificationBoxRecipientConfigParamsType = type({
6888
+ 'i?': clearable('number'),
6889
+ 'e?': clearable('string.email'),
6890
+ 't?': clearable(e164PhoneNumberType),
6891
+ 'configs?': clearable(notificationBoxRecipientTemplateConfigArrayEntryParamType.array()),
6892
+ 'lk?': clearable('boolean'),
6893
+ 'bk?': clearable('boolean'),
6894
+ 'f?': clearable(type.enumerated(NotificationBoxRecipientFlag.ENABLED, NotificationBoxRecipientFlag.DISABLED, NotificationBoxRecipientFlag.OPT_OUT))
6895
+ });
6896
+ const updateNotificationBoxRecipientLikeParamsType = type({
6897
+ 'e?': clearable('string.email'),
6898
+ 't?': clearable(e164PhoneNumberType),
6899
+ 's?': clearable('string'),
6900
+ 'configs?': clearable(notificationBoxRecipientTemplateConfigArrayEntryParamType.array())
6901
+ });
6902
+ const updateNotificationUserNotificationBoxRecipientParamsType = updateNotificationBoxRecipientLikeParamsType.merge({
6903
+ nb: firestoreModelIdType,
6904
+ 'rm?': clearable('boolean'),
6905
+ 'lk?': clearable('boolean'),
6906
+ 'bk?': clearable('boolean'),
6907
+ 'f?': clearable(type.enumerated(NotificationBoxRecipientFlag.ENABLED, NotificationBoxRecipientFlag.DISABLED, NotificationBoxRecipientFlag.OPT_OUT)),
6908
+ 'deleteRemovedConfig?': clearable('boolean')
6909
+ });
6910
+ const updateNotificationUserParamsType = targetModelParamsType.merge({
6911
+ 'gc?': clearable(updateNotificationUserDefaultNotificationBoxRecipientConfigParamsType),
6912
+ 'dc?': clearable(updateNotificationUserDefaultNotificationBoxRecipientConfigParamsType),
6913
+ 'bc?': clearable(updateNotificationUserNotificationBoxRecipientParamsType.array())
6914
+ });
6915
+ const resyncNotificationUserParamsType = targetModelParamsType;
6916
+ const resyncAllNotificationUserParamsType = type({});
6917
+ const createNotificationSummaryParamsType = type({
6918
+ model: firestoreModelKeyType
6919
+ });
6920
+ const updateNotificationSummaryParamsType = targetModelParamsType.merge({
6921
+ 'flagAllRead?': clearable('boolean'),
6922
+ 'setReadAtTime?': clearable('string.date.parse')
6923
+ });
6924
+ const createNotificationBoxParamsType = type({
6925
+ model: firestoreModelKeyType
6926
+ });
6927
+ const initializeNotificationModelParamsType = targetModelParamsType.merge({
6928
+ 'throwErrorIfAlreadyInitialized?': 'boolean'
6929
+ });
6930
+ const initializeAllApplicableNotificationBoxesParamsType = type({});
6931
+ const initializeAllApplicableNotificationSummariesParamsType = type({});
6932
+ const updateNotificationBoxParamsType = targetModelParamsType;
6933
+ const updateNotificationBoxRecipientParamsType = updateNotificationBoxRecipientLikeParamsType.merge({
6934
+ key: firestoreModelKeyType,
6935
+ 'i?': clearable('number'),
6936
+ 'uid?': clearable(firestoreModelIdType),
6937
+ 'insert?': clearable('boolean'),
6938
+ 'enabled?': clearable('boolean'),
6939
+ 'remove?': clearable('boolean'),
6940
+ 'setExclusion?': clearable('boolean')
6941
+ });
6942
+ const notificationRecipientParamsType = type({
6943
+ 'uid?': clearable(firestoreModelIdType),
6944
+ 'un?': clearable(`string >= ${NOTIFICATION_RECIPIENT_NAME_MIN_LENGTH} & string <= ${NOTIFICATION_RECIPIENT_NAME_MAX_LENGTH}`),
6945
+ 'e?': clearable('string.email'),
6946
+ 'p?': clearable('string')
6947
+ });
6948
+ const sendNotificationParamsType = targetModelParamsType.merge({
6949
+ 'ignoreSendAtThrottle?': clearable('boolean'),
6950
+ 'throwErrorIfSent?': clearable('boolean')
6951
+ });
6952
+ const abstractSubscribeToNotificationBoxParamsType = targetModelParamsType.merge({
6953
+ uid: firestoreModelIdType
6954
+ });
6955
+ const abstractSubscribeOrUnsubscribeToNotificationBoxParamsType = abstractSubscribeToNotificationBoxParamsType.merge({
6956
+ 'unsubscribe?': clearable('boolean')
6957
+ });
6958
+ const sendQueuedNotificationsParamsType = type({
6959
+ 'maxSendNotificationLoops?': clearable('number'),
6960
+ 'maxParellelSendTasks?': clearable('number'),
6961
+ 'sendNotificationLoopsTaskExcessThreshold?': clearable('number')
6962
+ });
6963
+ const cleanupSentNotificationsParamsType = type({});
7352
6964
  const notificationFunctionTypeConfigMap = {};
7353
6965
  const notificationBoxModelCrudFunctionsConfig = {
7354
6966
  notificationUser: ['update:_,resync'],
@@ -8279,325 +7891,61 @@ const STORAGE_FILE_GROUP_QUEUED_FOR_INITIALIZATION_ERROR_CODE = 'STORAGE_FILE_GR
8279
7891
  */
8280
7892
  const STORAGE_FILE_GROUP_CREATE_INPUT_ERROR_CODE = 'STORAGE_FILE_GROUP_CREATE_INPUT_ERROR';
8281
7893
 
8282
- /**
8283
- * Used for directly create a new StorageFile.
8284
- */
8285
- class CreateStorageFileParams {
8286
- }
8287
- /**
8288
- * Initializes all StorageFiles in the uploads folder.
8289
- */
8290
- class InitializeAllStorageFilesFromUploadsParams {
8291
- /**
8292
- * The maximum number of files to initialize at once.
8293
- */
8294
- maxFilesToInitialize;
8295
- /**
8296
- * The specific folder under the uploads folder to search for files and initialize
8297
- */
8298
- folderPath;
8299
- /**
8300
- * Overrides the default uploads folder path.
8301
- */
8302
- overrideUploadsFolderPath;
8303
- }
8304
- __decorate([
8305
- Expose(),
8306
- IsNumber(),
8307
- IsOptional(),
8308
- __metadata("design:type", Object)
8309
- ], InitializeAllStorageFilesFromUploadsParams.prototype, "maxFilesToInitialize", void 0);
8310
- __decorate([
8311
- Expose(),
8312
- IsString(),
8313
- IsOptional(),
8314
- __metadata("design:type", Object)
8315
- ], InitializeAllStorageFilesFromUploadsParams.prototype, "folderPath", void 0);
8316
- __decorate([
8317
- Expose(),
8318
- IsString(),
8319
- IsOptional(),
8320
- __metadata("design:type", Object)
8321
- ], InitializeAllStorageFilesFromUploadsParams.prototype, "overrideUploadsFolderPath", void 0);
8322
- /**
8323
- * Initializes a StorageFile from the document at the given path.
8324
- */
8325
- class InitializeStorageFileFromUploadParams {
8326
- /**
8327
- * Specific bucketId to use.
8328
- *
8329
- * If not defined, the default bucket will be used.
8330
- */
8331
- bucketId;
8332
- pathString;
8333
- /**
8334
- * Whether or not to attempt to expedite the processing of the created StorageFile, if it is queued for processing.
8335
- *
8336
- * If it cannot be processed, this argument will have no effect.
8337
- */
8338
- expediteProcessing;
8339
- }
8340
- __decorate([
8341
- Expose(),
8342
- IsOptional(),
8343
- IsString(),
8344
- __metadata("design:type", Object)
8345
- ], InitializeStorageFileFromUploadParams.prototype, "bucketId", void 0);
8346
- __decorate([
8347
- Expose(),
8348
- IsString(),
8349
- __metadata("design:type", String)
8350
- ], InitializeStorageFileFromUploadParams.prototype, "pathString", void 0);
8351
- __decorate([
8352
- Expose(),
8353
- IsBoolean(),
8354
- IsOptional(),
8355
- __metadata("design:type", Boolean)
8356
- ], InitializeStorageFileFromUploadParams.prototype, "expediteProcessing", void 0);
8357
- class ProcessStorageFileParams extends TargetModelParams {
8358
- /**
8359
- * If set, will start/run the processing immediately instead of waiting for the next scheduled run.
8360
- */
8361
- runImmediately;
8362
- /**
8363
- * If set, will check and retry processing if the StorageFile is in a failed processing state.
8364
- */
8365
- checkRetryProcessing;
8366
- /**
8367
- * Used with checkRetryProcessing.
8368
- *
8369
- * If set, will forcibly create a new processing task even if the existing processing task appears to be ok, or if processing was already marked complete.
8370
- */
8371
- forceRestartProcessing;
8372
- /**
8373
- * If set, will start the processing again if the StorageFile is in a successful processing state.
8374
- */
8375
- processAgainIfSuccessful;
8376
- }
8377
- __decorate([
8378
- Expose(),
8379
- IsBoolean(),
8380
- IsOptional(),
8381
- __metadata("design:type", Object)
8382
- ], ProcessStorageFileParams.prototype, "runImmediately", void 0);
8383
- __decorate([
8384
- Expose(),
8385
- IsBoolean(),
8386
- IsOptional(),
8387
- __metadata("design:type", Object)
8388
- ], ProcessStorageFileParams.prototype, "checkRetryProcessing", void 0);
8389
- __decorate([
8390
- Expose(),
8391
- IsBoolean(),
8392
- IsOptional(),
8393
- __metadata("design:type", Object)
8394
- ], ProcessStorageFileParams.prototype, "forceRestartProcessing", void 0);
8395
- __decorate([
8396
- Expose(),
8397
- IsBoolean(),
8398
- IsOptional(),
8399
- __metadata("design:type", Object)
8400
- ], ProcessStorageFileParams.prototype, "processAgainIfSuccessful", void 0);
8401
- /**
8402
- * Processes all StorageFiles that are queued for processing.
8403
- */
8404
- class ProcessAllQueuedStorageFilesParams {
8405
- }
8406
- class UpdateStorageFileParams extends TargetModelParams {
8407
- /**
8408
- * Sets the delete at time for the given StorageFileDocument, and queues the file for deletion.
8409
- */
8410
- sdat;
8411
- }
8412
- __decorate([
8413
- Expose(),
8414
- IsDate(),
8415
- IsOptional(),
8416
- Type(() => Date),
8417
- __metadata("design:type", Object)
8418
- ], UpdateStorageFileParams.prototype, "sdat", void 0);
8419
- class DeleteStorageFileParams extends TargetModelParams {
8420
- /**
8421
- * If true, will force the deletion of the StorageFile even if it is not queued for deletion.
8422
- */
8423
- force;
8424
- }
8425
- __decorate([
8426
- Expose(),
8427
- IsBoolean(),
8428
- IsOptional(),
8429
- __metadata("design:type", Object)
8430
- ], DeleteStorageFileParams.prototype, "force", void 0);
8431
- /**
8432
- * Processes all StorageFiles that are queued for processing.
8433
- */
8434
- class DeleteAllQueuedStorageFilesParams {
8435
- }
8436
- class DownloadStorageFileParams extends TargetModelParams {
8437
- /**
8438
- * Date to expire the download URL.
8439
- */
8440
- expiresAt;
8441
- /**
8442
- * Duration in milliseconds to expire the download URL from now.
8443
- */
8444
- expiresIn;
8445
- /**
8446
- * The content disposition for the response to use.
8447
- */
8448
- responseDisposition;
8449
- /**
8450
- * The content type for the response to use.
8451
- *
8452
- * Only available to admins.
8453
- */
8454
- responseContentType;
8455
- /**
8456
- * Whether or not an admin is creating the link.
8457
- *
8458
- * Allows a longer expiration.
8459
- */
8460
- asAdmin;
8461
- }
8462
- __decorate([
8463
- Expose(),
8464
- IsDate(),
8465
- IsOptional(),
8466
- Type(() => Date),
8467
- __metadata("design:type", Object)
8468
- ], DownloadStorageFileParams.prototype, "expiresAt", void 0);
8469
- __decorate([
8470
- Expose(),
8471
- Min(0),
8472
- IsNumber(),
8473
- IsOptional(),
8474
- __metadata("design:type", Object)
8475
- ], DownloadStorageFileParams.prototype, "expiresIn", void 0);
8476
- __decorate([
8477
- Expose(),
8478
- IsOptional(),
8479
- IsString(),
8480
- __metadata("design:type", Object)
8481
- ], DownloadStorageFileParams.prototype, "responseDisposition", void 0);
8482
- __decorate([
8483
- Expose(),
8484
- IsOptional(),
8485
- IsString(),
8486
- IsMimeType(),
8487
- __metadata("design:type", Object)
8488
- ], DownloadStorageFileParams.prototype, "responseContentType", void 0);
8489
- __decorate([
8490
- Expose(),
8491
- IsBoolean(),
8492
- IsOptional(),
8493
- __metadata("design:type", Object)
8494
- ], DownloadStorageFileParams.prototype, "asAdmin", void 0);
8495
- /**
8496
- * Used for creating or initializing a new StorageFileGroup for a StorageFile.
8497
- *
8498
- * Mainly used for testing. Not exposed to the API.
8499
- *
8500
- * The preferred way is to create a StorageFileGroup through a StorageFile.
8501
- */
8502
- class CreateStorageFileGroupParams {
8503
- /**
8504
- * ModelKey to use for creating the StorageFileGroup.
8505
- */
8506
- model;
8507
- /**
8508
- * StorageFileId to use for creating the StorageFileGroup.
8509
- */
8510
- storageFileId;
8511
- }
8512
- __decorate([
8513
- Expose(),
8514
- IsOptional(),
8515
- IsNotEmpty(),
8516
- IsFirestoreModelKey(),
8517
- __metadata("design:type", Object)
8518
- ], CreateStorageFileGroupParams.prototype, "model", void 0);
8519
- __decorate([
8520
- Expose(),
8521
- IsNotEmpty(),
8522
- IsFirestoreModelId(),
8523
- __metadata("design:type", Object)
8524
- ], CreateStorageFileGroupParams.prototype, "storageFileId", void 0);
8525
- class SyncStorageFileWithGroupsParams extends TargetModelParams {
8526
- /**
8527
- * If true, will force syncing even if the StorageFile is not flagged for a resync.
8528
- */
8529
- force;
8530
- }
8531
- __decorate([
8532
- Expose(),
8533
- IsBoolean(),
8534
- IsOptional(),
8535
- __metadata("design:type", Boolean)
8536
- ], SyncStorageFileWithGroupsParams.prototype, "force", void 0);
8537
- class SyncAllFlaggedStorageFilesWithGroupsParams {
8538
- }
8539
- class UpdateStorageFileGroupParams extends TargetModelParams {
8540
- /**
8541
- * Entries to update, if selected.
8542
- */
8543
- entries;
8544
- }
8545
- __decorate([
8546
- Expose(),
8547
- IsArray(),
8548
- IsOptional(),
8549
- Type(() => UpdateStorageFileGroupEntryParams),
8550
- ValidateNested({ each: true }),
8551
- __metadata("design:type", Object)
8552
- ], UpdateStorageFileGroupParams.prototype, "entries", void 0);
8553
- class UpdateStorageFileGroupEntryParams {
8554
- s;
8555
- n;
8556
- }
8557
- __decorate([
8558
- Expose(),
8559
- IsNotEmpty(),
8560
- IsFirestoreModelId(),
8561
- __metadata("design:type", String)
8562
- ], UpdateStorageFileGroupEntryParams.prototype, "s", void 0);
8563
- __decorate([
8564
- Expose(),
8565
- IsString(),
8566
- IsOptional(),
8567
- IsNotEmpty(),
8568
- __metadata("design:type", Object)
8569
- ], UpdateStorageFileGroupEntryParams.prototype, "n", void 0);
8570
- class RegenerateStorageFileGroupContentParams extends TargetModelParams {
8571
- /**
8572
- * If true, will force syncing even if the StorageFile is not flagged for a resync.
8573
- */
8574
- force;
8575
- }
8576
- __decorate([
8577
- Expose(),
8578
- IsBoolean(),
8579
- IsOptional(),
8580
- __metadata("design:type", Boolean)
8581
- ], RegenerateStorageFileGroupContentParams.prototype, "force", void 0);
8582
- class RegenerateAllFlaggedStorageFileGroupsContentParams {
8583
- }
8584
- /**
8585
- * Used for initializing an uninitialized model like NotificationBox or NotificationSummary.
8586
- */
8587
- class InitializeStorageFileModelParams extends TargetModelParams {
8588
- /**
8589
- * Whether or not to throw an error if the notification has already been sent or is being sent.
8590
- */
8591
- throwErrorIfAlreadyInitialized;
8592
- }
8593
- __decorate([
8594
- Expose(),
8595
- IsBoolean(),
8596
- IsOptional(),
8597
- __metadata("design:type", Boolean)
8598
- ], InitializeStorageFileModelParams.prototype, "throwErrorIfAlreadyInitialized", void 0);
8599
- class InitializeAllApplicableStorageFileGroupsParams {
8600
- }
7894
+ const createStorageFileParamsType = type({});
7895
+ const initializeAllStorageFilesFromUploadsParamsType = type({
7896
+ 'maxFilesToInitialize?': clearable('number'),
7897
+ 'folderPath?': clearable('string'),
7898
+ 'overrideUploadsFolderPath?': clearable('string')
7899
+ });
7900
+ const initializeStorageFileFromUploadParamsType = type({
7901
+ 'bucketId?': clearable('string'),
7902
+ pathString: 'string > 0',
7903
+ 'expediteProcessing?': 'boolean'
7904
+ });
7905
+ const processStorageFileParamsType = targetModelParamsType.merge({
7906
+ 'runImmediately?': clearable('boolean'),
7907
+ 'checkRetryProcessing?': clearable('boolean'),
7908
+ 'forceRestartProcessing?': clearable('boolean'),
7909
+ 'processAgainIfSuccessful?': clearable('boolean')
7910
+ });
7911
+ const processAllQueuedStorageFilesParamsType = type({});
7912
+ const updateStorageFileParamsType = targetModelParamsType.merge({
7913
+ 'sdat?': clearable('string.date.parse')
7914
+ });
7915
+ const deleteStorageFileParamsType = targetModelParamsType.merge({
7916
+ 'force?': clearable('boolean')
7917
+ });
7918
+ const deleteAllQueuedStorageFilesParamsType = type({});
7919
+ const downloadStorageFileParamsType = targetModelParamsType.merge({
7920
+ 'expiresAt?': clearable('string.date.parse'),
7921
+ 'expiresIn?': clearable('number >= 0'),
7922
+ 'responseDisposition?': clearable('string'),
7923
+ 'responseContentType?': clearable('string'),
7924
+ 'asAdmin?': clearable('boolean')
7925
+ });
7926
+ const createStorageFileGroupParamsType = type({
7927
+ 'model?': clearable(firestoreModelKeyType),
7928
+ 'storageFileId?': clearable(firestoreModelIdType)
7929
+ });
7930
+ const syncStorageFileWithGroupsParamsType = targetModelParamsType.merge({
7931
+ 'force?': 'boolean'
7932
+ });
7933
+ const syncAllFlaggedStorageFilesWithGroupsParamsType = type({});
7934
+ const updateStorageFileGroupEntryParamsType = type({
7935
+ s: firestoreModelIdType,
7936
+ 'n?': clearable('string > 0')
7937
+ });
7938
+ const updateStorageFileGroupParamsType = targetModelParamsType.merge({
7939
+ 'entries?': clearable(updateStorageFileGroupEntryParamsType.array())
7940
+ });
7941
+ const regenerateStorageFileGroupContentParamsType = targetModelParamsType.merge({
7942
+ 'force?': 'boolean'
7943
+ });
7944
+ const regenerateAllFlaggedStorageFileGroupsContentParamsType = type({});
7945
+ const initializeStorageFileModelParamsType = targetModelParamsType.merge({
7946
+ 'throwErrorIfAlreadyInitialized?': 'boolean'
7947
+ });
7948
+ const initializeAllApplicableStorageFileGroupsParamsType = type({});
8601
7949
  const storageFileFunctionTypeConfigMap = {};
8602
7950
  const storageFileModelCrudFunctionsConfig = {
8603
7951
  storageFile: ['create:_,fromUpload,allFromUpload', 'update:_,process,syncWithGroups', 'delete:_', 'read:download'],
@@ -9455,5 +8803,5 @@ function systemStateFirestoreCollection(firestoreContext, converters) {
9455
8803
  });
9456
8804
  }
9457
8805
 
9458
- export { ALL_STORAGE_FILE_NOTIFICATION_TASK_TYPES, ALL_USER_UPLOADS_FOLDER_NAME, ALL_USER_UPLOADS_FOLDER_PATH, AbstractFirestoreDocument, AbstractFirestoreDocumentDataAccessorWrapper, AbstractFirestoreDocumentWithParent, AbstractSubscribeOrUnsubscribeToNotificationBoxParams, 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, CreateStorageFileGroupParams, CreateStorageFileParams, DBX_FIREBASE_SERVER_NO_AUTH_ERROR_CODE, DBX_FIREBASE_SERVER_NO_UID_ERROR_CODE, DEFAULT_DATE_CELL_RANGE_VALUE, DEFAULT_FIRESTORE_DATE_CELL_SCHEDULE_VALUE, DEFAULT_FIRESTORE_ITEM_PAGE_ITERATOR_ITEMS_PER_PAGE, DEFAULT_FIRESTORE_STRING_FIELD_VALUE, DEFAULT_FIRESTORE_UNITED_STATES_ADDRESS_VALUE, DEFAULT_FIRESTORE_WEBSITE_FILE_LINK_VALUE, DEFAULT_ITERATE_FIRESTORE_DOCUMENT_SNAPSHOT_BATCHES_BATCH_SIZE, DEFAULT_NOTIFICATION_TASK_NOTIFICATION_MODEL_KEY, DEFAULT_NOTIFICATION_TASK_SUBTASK_CLEANUP_RETRY_ATTEMPTS, DEFAULT_NOTIFICATION_TASK_SUBTASK_CLEANUP_RETRY_DELAY, DEFAULT_NOTIFICATION_TEMPLATE_TYPE, DEFAULT_QUERY_CHANGE_WATCHER_DELAY, DEFAULT_SINGLE_ITEM_FIRESTORE_COLLECTION_DOCUMENT_IDENTIFIER, DEFAULT_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, DEFAULT_WEBSITE_LINK, DeleteAllQueuedStorageFilesParams, DeleteStorageFileParams, DownloadStorageFileParams, EMPTY_STORAGE_FILE_PURPOSE_SUBGROUP, EXACT_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, FIREBASE_AUTH_NETWORK_REQUEST_ERROR, FIREBASE_AUTH_NETWORK_REQUEST_FAILED, FIREBASE_AUTH_PASSWORD_MAX_LENGTH, FIREBASE_AUTH_PASSWORD_MIN_LENGTH, FIREBASE_AUTH_USER_NOT_FOUND_ERROR, FIREBASE_AUTH_WRONG_PASSWORD, FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY, FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY, FIREBASE_SERVER_AUTH_CLAIMS_RESET_PASSWORD_KEY, FIREBASE_SERVER_AUTH_CLAIMS_SETUP_LAST_COM_DATE_KEY, FIREBASE_SERVER_AUTH_CLAIMS_SETUP_PASSWORD_KEY, FIRESTORE_CLIENT_QUERY_CONSTRAINT_HANDLER_MAPPING, FIRESTORE_COLLECTION_NAME_SEPARATOR, FIRESTORE_DUMMY_MODEL_KEY, FIRESTORE_EMPTY_VALUE, FIRESTORE_END_AT_QUERY_CONSTRAINT_TYPE, FIRESTORE_END_AT_VALUE_QUERY_CONSTRAINT_TYPE, FIRESTORE_END_BEFORE_QUERY_CONSTRAINT_TYPE, FIRESTORE_ITEM_PAGE_ITERATOR, FIRESTORE_ITEM_PAGE_ITERATOR_DELEGATE, FIRESTORE_LIMIT_QUERY_CONSTRAINT_TYPE, FIRESTORE_LIMIT_TO_LAST_QUERY_CONSTRAINT_TYPE, FIRESTORE_MAX_WHERE_IN_FILTER_ARGS_COUNT, FIRESTORE_MODEL_ID_REGEX, FIRESTORE_MODEL_KEY_REGEX, FIRESTORE_MODEL_KEY_REGEX_STRICT, FIRESTORE_OFFSET_QUERY_CONSTRAINT_TYPE, FIRESTORE_ORDER_BY_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, FIRESTORE_ORDER_BY_QUERY_CONSTRAINT_TYPE, FIRESTORE_PASSTHROUGH_FIELD, FIRESTORE_PERMISSION_DENIED_ERROR_CODE, FIRESTORE_START_AFTER_QUERY_CONSTRAINT_TYPE, FIRESTORE_START_AT_QUERY_CONSTRAINT_TYPE, FIRESTORE_START_AT_VALUE_QUERY_CONSTRAINT_TYPE, FIRESTORE_WHERE_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, FIRESTORE_WHERE_QUERY_CONSTRAINT_TYPE, FirebaseDevelopmentFunctions, FirebaseModelPermissionServiceInstance, FirebaseServerError, FirestoreAccessorStreamMode, FirestoreDocumentContextType, HIGH_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, InferredTargetModelIdParams, InferredTargetModelParams, InitializeAllApplicableNotificationBoxesParams, InitializeAllApplicableNotificationSummariesParams, InitializeAllApplicableStorageFileGroupsParams, InitializeAllStorageFilesFromUploadsParams, InitializeNotificationModelParams, InitializeStorageFileFromUploadParams, InitializeStorageFileModelParams, IsFirestoreModelId, IsFirestoreModelIdOrKey, IsFirestoreModelKey, LOW_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, MAX_FIRESTORE_MAP_ZOOM_LEVEL_VALUE, MIN_FIRESTORE_MAP_ZOOM_LEVEL_VALUE, MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_DEFAULT, MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_SPLITTER, MODEL_STORAGE_FILE_SLASH_PATH_FACTORY, ModifyBeforeSetFirestoreDocumentDataAccessorWrapper, NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE, NOTIFICATION_BOX_EXCLUSION_TARGET_INVALID_ERROR_CODE, NOTIFICATION_BOX_EXISTS_FOR_MODEL_ERROR_CODE, NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST_ERROR_CODE, NOTIFICATION_MESSAGE_MAX_LENGTH, NOTIFICATION_MESSAGE_MIN_LENGTH, NOTIFICATION_MODEL_ALREADY_INITIALIZED_ERROR_CODE, NOTIFICATION_RECIPIENT_NAME_MAX_LENGTH, NOTIFICATION_RECIPIENT_NAME_MIN_LENGTH, NOTIFICATION_SUBJECT_MAX_LENGTH, NOTIFICATION_SUBJECT_MIN_LENGTH, NOTIFICATION_SUMMARY_EMBEDDED_NOTIFICATION_ITEM_MESSAGE_MAX_LENGTH, NOTIFICATION_SUMMARY_EMBEDDED_NOTIFICATION_ITEM_SUBJECT_MAX_LENGTH, NOTIFICATION_SUMMARY_ITEM_LIMIT, NOTIFICATION_TASK_SUBTASK_CHECKPOINT_CLEANUP, NOTIFICATION_TASK_SUBTASK_CHECKPOINT_PROCESSING, NOTIFICATION_USER_BLOCKED_FROM_BEING_ADD_TO_RECIPIENTS_ERROR_CODE, NOTIFICATION_USER_INVALID_UID_FOR_CREATE_ERROR_CODE, NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED_ERROR_CODE, NOTIFICATION_WEEK_NOTIFICATION_ITEM_LIMIT, NotificationBoxDocument, NotificationBoxRecipientFlag, NotificationBoxRecipientTemplateConfigArrayEntryParam, NotificationBoxRecipientTemplateConfigBoolean, NotificationDocument, NotificationFirestoreCollections, NotificationFunctions, NotificationMessageFlag, NotificationRecipientParams, NotificationRecipientSendFlag, NotificationSendState, NotificationSendType, NotificationSummaryDocument, NotificationUserDocument, NotificationWeekDocument, ProcessAllQueuedStorageFilesParams, ProcessStorageFileParams, RUN_DEV_FUNCTION_APP_FUNCTION_KEY, RegenerateAllFlaggedStorageFileGroupsContentParams, RegenerateStorageFileGroupContentParams, ResyncAllNotificationUserParams, ResyncNotificationUserParams, SCHEDULED_FUNCTION_DEV_FUNCTION_SPECIFIER, STORAGEFILE_RELATED_FILE_METADATA_KEY, STORAGE_FILE_ALREADY_PROCESSED_ERROR_CODE, STORAGE_FILE_CANNOT_BE_DELETED_YET_ERROR_CODE, STORAGE_FILE_GROUP_CREATE_INPUT_ERROR_CODE, STORAGE_FILE_GROUP_QUEUED_FOR_INITIALIZATION_ERROR_CODE, STORAGE_FILE_GROUP_ROOT_FOLDER_PATH, STORAGE_FILE_GROUP_ZIP_FILE_PATH, STORAGE_FILE_GROUP_ZIP_INFO_JSON_FILE_NAME, STORAGE_FILE_GROUP_ZIP_STORAGE_FILE_PURPOSE, STORAGE_FILE_GROUP_ZIP_STORAGE_FILE_PURPOSE_CREATE_ZIP_SUBTASK, STORAGE_FILE_MODEL_ALREADY_INITIALIZED_ERROR_CODE, STORAGE_FILE_NOT_FLAGGED_FOR_DELETION_ERROR_CODE, STORAGE_FILE_NOT_FLAGGED_FOR_GROUPS_SYNC_ERROR_CODE, STORAGE_FILE_PROCESSING_NOTIFICATION_TASK_TYPE, STORAGE_FILE_PROCESSING_NOT_ALLOWED_FOR_INVALID_STATE_ERROR_CODE, STORAGE_FILE_PROCESSING_NOT_AVAILABLE_FOR_TYPE_ERROR_CODE, STORAGE_FILE_PROCESSING_NOT_QUEUED_FOR_PROCESSING_ERROR_CODE, STORAGE_FILE_PROCESSING_STUCK_THROTTLE_CHECK_MS, STORAGE_FILE_UPLOAD_USER_ROLE, ScheduledFunctionDevelopmentFirebaseFunctionListEntry, ScheduledFunctionDevelopmentFirebaseFunctionParams, ScheduledFunctionDevelopmentFunctionTypeEnum, SendNotificationParams, SendQueuedNotificationsParams, StorageFileCreationType, StorageFileDocument, StorageFileFirestoreCollections, StorageFileFunctions, StorageFileGroupDocument, StorageFileProcessingState, StorageFileState, StorageFileUploadStreamUnsupportedError, SyncAllFlaggedStorageFilesWithGroupsParams, SyncStorageFileWithGroupsParams, SystemStateDocument, SystemStateFirestoreCollections, TargetModelIdParams, TargetModelParams, UPLOADED_FILE_DOES_NOT_EXIST_ERROR_CODE, UPLOADED_FILE_INITIALIZATION_DISCARDED_ERROR_CODE, UPLOADED_FILE_INITIALIZATION_FAILED_ERROR_CODE, UPLOADED_FILE_NOT_ALLOWED_TO_BE_INITIALIZED_ERROR_CODE, UPLOADS_FOLDER_PATH, UpdateNotificationBoxParams, UpdateNotificationBoxRecipientLikeParams, UpdateNotificationBoxRecipientParams, UpdateNotificationSummaryParams, UpdateNotificationUserDefaultNotificationBoxRecipientConfigParams, UpdateNotificationUserNotificationBoxRecipientParams, UpdateNotificationUserParams, UpdateStorageFileGroupEntryParams, UpdateStorageFileGroupParams, UpdateStorageFileParams, _createNotificationDocumentFromPair, addConstraintToBuilder, addOrReplaceLimitInConstraints, allChildDocumentsUnderParent, allChildDocumentsUnderParentPath, allChildDocumentsUnderRelativePath, allowDocumentSnapshotWithPathOnceFilter, allowedNotificationRecipients, appNotificationTemplateTypeInfoRecordService, applyExclusionsToNotificationUserNotificationBoxRecipientConfigs, arrayUpdateWithAccessorFunction, asTopLevelFieldPath, asTopLevelFieldPaths, assertFirestoreUpdateHasData, assertStorageUploadOptionsStringFormat, assignDateCellRangeFunction, assignDateCellScheduleFunction, assignUnitedStatesAddressFunction, assignWebsiteFileLinkFunction, assignWebsiteLinkFunction, buildFirebaseCollectionTypeModelTypeMap, calculateNsForNotificationUserNotificationBoxRecipientConfigs, calculateStorageFileGroupEmbeddedFileUpdate, calculateStorageFileGroupRegeneration, callModelFirebaseFunctionMapFactory, canQueueStorageFileForProcessing, childFirestoreModelKey, childFirestoreModelKeyPath, childFirestoreModelKeys, clientFirebaseFirestoreContextFactory, clientFirebaseStorageContextFactory, combineUploadFileTypeDeterminers, completeSubtaskProcessingAndScheduleCleanupTaskResult, contextGrantedModelRolesReader, contextGrantedModelRolesReaderDoesNotExistErrorMessage, contextGrantedModelRolesReaderPermissionErrorMessage, convertHttpsCallableErrorToReadableError, copyDocumentIdForUserRelatedModifierFunction, copyDocumentIdToFieldModifierFunction, copyStoragePath, copyUserRelatedDataAccessorFactoryFunction, copyUserRelatedDataModifierConfig, createNotificationDocument, createNotificationDocumentIfSending, createNotificationDocumentPair, createNotificationTaskTemplate, createNotificationTemplate, createStorageFileDocumentPair, createStorageFileDocumentPairFactory, dataFromDocumentSnapshots, dataFromSnapshotStream, delayCompletion, determineByFileName, determineByFilePath, determineByFolderName, determineUserByFolder, determineUserByFolderWrapperFunction, determineUserByUserUploadsFolderWrapperFunction, developmentFirebaseFunctionMapFactory, directDataHttpsCallable, documentData, documentDataFunction, documentDataWithIdAndKey, documentReferenceFromDocument, documentReferencesFromDocuments, documentReferencesFromSnapshot, effectiveNotificationBoxRecipientConfig, effectiveNotificationBoxRecipientTemplateConfig, endAt, endAtValue, endBefore, extendFirestoreCollectionWithSingleDocumentAccessor, filterConstraintsOfType, filterDisallowedFirestoreItemPageIteratorInputConstraints, filterRepeatCheckpointSnapshots, filterWithDateRange, firebaseAuthErrorToReadableError, firebaseFirestoreClientDrivers, firebaseFirestoreQueryConstraintFunctionsDriver, firebaseFirestoreQueryDriver, firebaseFunctionMapFactory, firebaseModelLoader, firebaseModelPermissionService, firebaseModelService, firebaseModelServiceFactory, firebaseModelsService, firebaseQueryItemAccumulator, firebaseQuerySnapshotAccumulator, firebaseStorageBucketFolderPath, firebaseStorageClientAccessorDriver, firebaseStorageClientAccessorFile, firebaseStorageClientAccessorFolder, firebaseStorageClientDrivers, firebaseStorageClientListFilesResultFactory, firebaseStorageContextFactory, firebaseStorageFileExists, firebaseStorageFilePathFromStorageFilePath, firebaseStorageRefForStorageFilePath, firestoreArray, firestoreArrayMap, firestoreBitwiseObjectMap, firestoreBitwiseSet, firestoreBitwiseSetMap, firestoreBoolean, firestoreClientAccessorDriver, firestoreClientArrayUpdateToUpdateData, firestoreClientIncrementUpdateToUpdateData, firestoreCollectionQueryFactory, firestoreContextFactory, firestoreDate, firestoreDateCellRange, firestoreDateCellRangeArray, firestoreDateCellRangeAssignFn, firestoreDateCellSchedule, firestoreDateCellScheduleAssignFn, firestoreDateNumber, firestoreDencoderArray, firestoreDencoderMap, firestoreDencoderStringArray, firestoreDocumentAccessorContextExtension, firestoreDocumentAccessorFactory, firestoreDocumentLoader, firestoreDocumentSnapshotPairsLoader, firestoreDocumentSnapshotPairsLoaderInstance, firestoreDummyKey, firestoreEncodedArray, firestoreEncodedObjectMap, firestoreEnum, firestoreEnumArray, firestoreField, firestoreFieldConfigToModelMapFunctionsRef, firestoreFixedItemPageIteration, firestoreFixedItemPageIterationFactory, firestoreIdBatchVerifierFactory, firestoreIdentityTypeArray, firestoreIdentityTypeArrayName, firestoreItemPageIteration, firestoreItemPageIterationFactory, firestoreLatLngString, firestoreMap, firestoreMapZoomLevel, firestoreModelId, firestoreModelIdArrayField, firestoreModelIdFromDocument, firestoreModelIdFromEmail, firestoreModelIdGrantedRoleArrayMap, firestoreModelIdGrantedRoleMap, firestoreModelIdString, firestoreModelIdentity, firestoreModelIdentityTypeMap, firestoreModelIdsFromDocuments, firestoreModelIdsFromKey, firestoreModelKey, firestoreModelKeyArrayField, firestoreModelKeyCollectionName, firestoreModelKeyCollectionType, firestoreModelKeyCollectionTypeArray, firestoreModelKeyCollectionTypeArrayName, firestoreModelKeyCollectionTypePair, firestoreModelKeyEncodedGrantedRoleMap, firestoreModelKeyFactory, firestoreModelKeyFromDocument, firestoreModelKeyGrantedRoleArrayMap, firestoreModelKeyGrantedRoleMap, firestoreModelKeyPairObject, firestoreModelKeyParentKey, firestoreModelKeyParentKeyPartPairs, firestoreModelKeyPart, firestoreModelKeyPartPairs, firestoreModelKeyPartPairsKeyPath, firestoreModelKeyPartPairsPaths, firestoreModelKeyPath, firestoreModelKeyString, firestoreModelKeyTypePair, firestoreModelKeys, firestoreModelKeysFromDocuments, firestoreModelType, firestoreNotificationBoxRecipient, firestoreNotificationBoxRecipientTemplateConfigRecord, firestoreNotificationItem, firestoreNotificationRecipientWithConfig, firestoreNotificationUserDefaultNotificationBoxRecipientConfig, firestoreNotificationUserNotificationBoxRecipientConfig, firestoreNumber, firestoreObjectArray, firestorePassThroughField, firestoreQueryConstraint, firestoreQueryConstraintFactory, firestoreQueryDocumentSnapshotPairsLoader, firestoreQueryFactory, firestoreSingleDocumentAccessor, firestoreString, firestoreSubObject, firestoreTimezoneString, firestoreUID, firestoreUniqueArray, firestoreUniqueKeyedArray, firestoreUniqueNumberArray, firestoreUniqueStringArray, firestoreUnitedStatesAddress, firestoreUnitedStatesAddressAssignFn, firestoreUnixDateTimeSecondsNumber, firestoreUpdateWithNoDataError, firestoreWebsiteFileLink, firestoreWebsiteFileLinkAssignFn, firestoreWebsiteFileLinkEncodedArray, firestoreWebsiteFileLinkObjectArray, firestoreWebsiteLink, firestoreWebsiteLinkArray, firestoreWebsiteLinkAssignFn, flatFirestoreModelKey, getDataFromDocumentSnapshots, getDocumentSnapshotData, getDocumentSnapshotDataPair, getDocumentSnapshotDataPairs, getDocumentSnapshotDataPairsWithData, getDocumentSnapshotDataTuples, getDocumentSnapshotPair, getDocumentSnapshotPairs, getDocumentSnapshots, getDocumentSnapshotsData, grantFullAccessIfAdmin, grantFullAccessIfAuthUserRelated, grantModelRolesIfAdmin, grantModelRolesIfAdminFunction, grantModelRolesIfAuthUserRelatedModelFunction, grantModelRolesIfFunction, grantModelRolesIfHasAuthRolesFactory, grantModelRolesIfHasAuthRolesFunction, grantModelRolesOnlyIfFunction, grantStorageFileRolesForUserAuthFunction, inContextFirebaseModelServiceFactory, inContextFirebaseModelsServiceFactory, incrementUpdateWithAccessorFunction, inferKeyFromTwoWayFlatFirestoreModelKey, inferNotificationBoxRelatedModelKey, inferStorageFileGroupRelatedModelKey, interceptAccessorFactoryFunction, isAdminInFirebaseModelContext, isClientFirebaseError, isCompleteNotificationSendState, isFirebaseStorageObjectNotFoundError, isFirestoreModelId, isFirestoreModelIdOrKey, isFirestoreModelKey, isOwnerOfUserRelatedModelInFirebaseModelContext, iterateFirestoreDocumentSnapshotBatches, iterateFirestoreDocumentSnapshotCheckpoints, iterateFirestoreDocumentSnapshotPairBatches, iterateFirestoreDocumentSnapshotPairs, iterateFirestoreDocumentSnapshots, iterateStorageListFiles, iterateStorageListFilesByEachFile, iterateStorageListFilesFactory, iterationQueryDocChangeWatcher, iterationQueryDocChangeWatcherChangeTypeForGroup, latestDataFromDocuments, latestSnapshotsFromDocuments, lazyFirebaseFunctionsFactory, limit, limitToLast, limitUploadFileTypeDeterminer, limitedFirestoreDocumentAccessorFactory, loadAllFirestoreDocumentSnapshot, loadAllFirestoreDocumentSnapshotPairs, loadDocumentsForDocumentReferences, loadDocumentsForDocumentReferencesFromValues, loadDocumentsForIds, loadDocumentsForIdsFromValues, loadDocumentsForKeys, loadDocumentsForKeysFromValues, loadDocumentsForSnapshots, loadDocumentsForValues, loadNotificationBoxDocumentForReferencePair, loadStorageFileGroupDocumentForReferencePair, makeDocuments, makeFirestoreCollection, makeFirestoreCollectionGroup, makeFirestoreCollectionWithParent, makeFirestoreItemPageIteratorDelegate, makeFirestoreQueryConstraintFunctionsDriver, makeRootSingleItemFirestoreCollection, makeSingleItemFirestoreCollection, mapDataFromSnapshot, mapHttpsCallable, mapLatestSnapshotsFromDocuments, mergeNotificationBoxRecipientTemplateConfigRecords, mergeNotificationBoxRecipientTemplateConfigs, mergeNotificationBoxRecipients, mergeNotificationSendMessagesResult, mergeNotificationUserDefaultNotificationBoxRecipientConfig, mergeNotificationUserNotificationBoxRecipientConfigs, modelStorageSlashPathFactory, modifyBeforeSetInterceptAccessorFactoryFunction, newDocuments, newNotificationBoxRecipientForUid, noContentNotificationMessageFunctionFactory, noStringFormatInStorageUploadOptionsError, notificationBoxCollectionReference, notificationBoxConverter, notificationBoxFirestoreCollection, notificationBoxIdForModel, notificationBoxIdentity, notificationBoxModelCrudFunctionsConfig, notificationBoxRecipientTemplateConfigArrayToRecord, notificationBoxRecipientTemplateConfigRecordToArray, notificationBoxesFlaggedForNeedsInitializationQuery, notificationBoxesFlaggedInvalidQuery, notificationCollectionReference, notificationCollectionReferenceFactory, notificationConverter, notificationFirestoreCollectionFactory, notificationFirestoreCollectionGroup, notificationFunctionMap, notificationFunctionTypeConfigMap, notificationIdentity, notificationMessageFunction, notificationSendExclusionCanSendFunction, notificationSendFlagsImplyIsComplete, notificationSubtaskComplete, notificationSummariesFlaggedForNeedsInitializationQuery, notificationSummaryCollectionReference, notificationSummaryConverter, notificationSummaryFirestoreCollection, notificationSummaryIdForModel, notificationSummaryIdForUidFunctionForRootFirestoreModelIdentity, notificationSummaryIdentity, notificationTaskCanRunNextCheckpoint, notificationTaskComplete, notificationTaskDelayRetry, notificationTaskFailed, notificationTaskPartiallyComplete, notificationTaskUniqueId, notificationTemplateTypeInfoRecord, notificationUserCollectionReference, notificationUserConverter, notificationUserFirestoreCollection, notificationUserHasExclusionQuery, notificationUserIdentity, notificationUsersFlaggedForNeedsSyncQuery, notificationWeekCollectionReference, notificationWeekCollectionReferenceFactory, notificationWeekConverter, notificationWeekFirestoreCollectionFactory, notificationWeekFirestoreCollectionGroup, notificationWeekIdentity, notificationsPastSendAtTimeQuery, notificationsReadyForCleanupQuery, offset, onCallCreateModelParams, onCallCreateModelResult, onCallCreateModelResultWithDocs, onCallDeleteModelParams, onCallDevelopmentParams, onCallReadModelParams, onCallTypedModelParams, onCallTypedModelParamsFunction, onCallUpdateModelParams, optionalFirestoreArray, optionalFirestoreBoolean, optionalFirestoreDate, optionalFirestoreDateNumber, optionalFirestoreEnum, optionalFirestoreField, optionalFirestoreNumber, optionalFirestoreString, optionalFirestoreUID, optionalFirestoreUnitedStatesAddress, optionalFirestoreUnixDateTimeSecondsNumber, orderBy, orderByDocumentId, readFirestoreModelKey, readFirestoreModelKeyFromDocumentSnapshot, replaceConstraints, selectFromFirebaseModelsService, separateConstraints, setIdAndKeyFromKeyIdRefOnDocumentData, setIdAndKeyFromSnapshotOnDocumentData, shouldSaveNotificationToNotificationWeek, shouldSendCreatedNotificationInput, snapshotConverterFunctions, snapshotStreamDataForAccessor, snapshotStreamForAccessor, sortNotificationItemsFunction, startAfter, startAt, startAtValue, storageFileCollectionReference, storageFileConverter, storageFileFirestoreCollection, storageFileFlaggedForSyncWithGroupsQuery, storageFileFunctionMap, storageFileFunctionTypeConfigMap, storageFileGroupCollectionReference, storageFileGroupConverter, storageFileGroupCreateStorageFileKeyFactory, storageFileGroupCreatedStorageFileKey, storageFileGroupEmbeddedFile, storageFileGroupFirestoreCollection, storageFileGroupFolderPath, storageFileGroupIdForModel, storageFileGroupIdentity, storageFileGroupZipFileStoragePath, storageFileGroupZipStorageFileKey, storageFileGroupsFlaggedForContentRegenerationQuery, storageFileGroupsFlaggedForNeedsInitializationQuery, storageFileGroupsFlaggedInvalidQuery, storageFileIdentity, storageFileModelCrudFunctionsConfig, storageFileProcessingNotificationTaskTemplate, storageFilePurposeAndUserQuery, storageFileUploadUserSimpleClaimsConfiguration, storageFilesQueuedForDeleteQuery, storageFilesQueuedForProcessingQuery, storageListFilesResultFactory, storageListFilesResultHasNoNextError, storagePathFactory, storedFileReaderFactory, streamDocumentSnapshotDataPairs, streamDocumentSnapshotDataPairsWithData, streamFromOnSnapshot, systemStateCollectionReference, systemStateConverter, systemStateFirestoreCollection, systemStateIdentity, twoWayFlatFirestoreModelKey, unreadNotificationItems, unsupportedFirestoreDriverFunctionError, updateNotificationBoxRecipientTemplateConfigRecord, updateNotificationRecipient, updateNotificationUserDefaultNotificationBoxRecipientConfig, updateNotificationUserNotificationBoxRecipientConfigIfChanged, updateNotificationUserNotificationBoxRecipientConfigs, updateNotificationUserNotificationSendExclusions, updateWithAccessorUpdateAndConverterFunction, uploadFileWithStream, useContextAuth, useContextAuthUid, useDocumentSnapshot, useDocumentSnapshotData, useFirebaseModelsService, userUploadsFolderSlashPathFactory, userUploadsFolderStoragePathFactory, where, whereDateIsAfter, whereDateIsAfterWithSort, whereDateIsBefore, whereDateIsBeforeWithSort, whereDateIsBetween, whereDateIsInRange, whereDateIsOnOrAfter, whereDateIsOnOrAfterWithSort, whereDateIsOnOrBefore, whereDateIsOnOrBeforeWithSort, whereDocumentId, whereStringHasRootIdentityModelKey, whereStringValueHasPrefix };
8806
+ export { ALL_STORAGE_FILE_NOTIFICATION_TASK_TYPES, ALL_USER_UPLOADS_FOLDER_NAME, ALL_USER_UPLOADS_FOLDER_PATH, AbstractFirestoreDocument, AbstractFirestoreDocumentDataAccessorWrapper, AbstractFirestoreDocumentWithParent, AppNotificationTemplateTypeInfoRecordService, BASE_MODEL_STORAGE_FILE_PATH, CALL_MODEL_APP_FUNCTION_KEY, COPY_USER_RELATED_DATA_ACCESSOR_FACTORY_FUNCTION, CREATE_NOTIFICATION_ID_REQUIRED_ERROR_CODE, ContextGrantedModelRolesReaderInstance, DBX_FIREBASE_SERVER_NO_AUTH_ERROR_CODE, DBX_FIREBASE_SERVER_NO_UID_ERROR_CODE, DEFAULT_DATE_CELL_RANGE_VALUE, DEFAULT_FIRESTORE_DATE_CELL_SCHEDULE_VALUE, DEFAULT_FIRESTORE_ITEM_PAGE_ITERATOR_ITEMS_PER_PAGE, DEFAULT_FIRESTORE_STRING_FIELD_VALUE, DEFAULT_FIRESTORE_UNITED_STATES_ADDRESS_VALUE, DEFAULT_FIRESTORE_WEBSITE_FILE_LINK_VALUE, DEFAULT_ITERATE_FIRESTORE_DOCUMENT_SNAPSHOT_BATCHES_BATCH_SIZE, DEFAULT_NOTIFICATION_TASK_NOTIFICATION_MODEL_KEY, DEFAULT_NOTIFICATION_TASK_SUBTASK_CLEANUP_RETRY_ATTEMPTS, DEFAULT_NOTIFICATION_TASK_SUBTASK_CLEANUP_RETRY_DELAY, DEFAULT_NOTIFICATION_TEMPLATE_TYPE, DEFAULT_QUERY_CHANGE_WATCHER_DELAY, DEFAULT_SINGLE_ITEM_FIRESTORE_COLLECTION_DOCUMENT_IDENTIFIER, DEFAULT_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, DEFAULT_WEBSITE_LINK, EMPTY_STORAGE_FILE_PURPOSE_SUBGROUP, EXACT_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, FIREBASE_AUTH_NETWORK_REQUEST_ERROR, FIREBASE_AUTH_NETWORK_REQUEST_FAILED, FIREBASE_AUTH_PASSWORD_MAX_LENGTH, FIREBASE_AUTH_PASSWORD_MIN_LENGTH, FIREBASE_AUTH_USER_NOT_FOUND_ERROR, FIREBASE_AUTH_WRONG_PASSWORD, FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY, FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY, FIREBASE_SERVER_AUTH_CLAIMS_RESET_PASSWORD_KEY, FIREBASE_SERVER_AUTH_CLAIMS_SETUP_LAST_COM_DATE_KEY, FIREBASE_SERVER_AUTH_CLAIMS_SETUP_PASSWORD_KEY, FIRESTORE_CLIENT_QUERY_CONSTRAINT_HANDLER_MAPPING, FIRESTORE_COLLECTION_NAME_SEPARATOR, FIRESTORE_DUMMY_MODEL_KEY, FIRESTORE_EMPTY_VALUE, FIRESTORE_END_AT_QUERY_CONSTRAINT_TYPE, FIRESTORE_END_AT_VALUE_QUERY_CONSTRAINT_TYPE, FIRESTORE_END_BEFORE_QUERY_CONSTRAINT_TYPE, FIRESTORE_ITEM_PAGE_ITERATOR, FIRESTORE_ITEM_PAGE_ITERATOR_DELEGATE, FIRESTORE_LIMIT_QUERY_CONSTRAINT_TYPE, FIRESTORE_LIMIT_TO_LAST_QUERY_CONSTRAINT_TYPE, FIRESTORE_MAX_WHERE_IN_FILTER_ARGS_COUNT, FIRESTORE_MODEL_ID_REGEX, FIRESTORE_MODEL_KEY_REGEX, FIRESTORE_MODEL_KEY_REGEX_STRICT, FIRESTORE_OFFSET_QUERY_CONSTRAINT_TYPE, FIRESTORE_ORDER_BY_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, FIRESTORE_ORDER_BY_QUERY_CONSTRAINT_TYPE, FIRESTORE_PASSTHROUGH_FIELD, FIRESTORE_PERMISSION_DENIED_ERROR_CODE, FIRESTORE_START_AFTER_QUERY_CONSTRAINT_TYPE, FIRESTORE_START_AT_QUERY_CONSTRAINT_TYPE, FIRESTORE_START_AT_VALUE_QUERY_CONSTRAINT_TYPE, FIRESTORE_WHERE_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, FIRESTORE_WHERE_QUERY_CONSTRAINT_TYPE, FirebaseDevelopmentFunctions, FirebaseModelPermissionServiceInstance, FirebaseServerError, FirestoreAccessorStreamMode, FirestoreDocumentContextType, HIGH_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, LOW_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, MAX_FIRESTORE_MAP_ZOOM_LEVEL_VALUE, MIN_FIRESTORE_MAP_ZOOM_LEVEL_VALUE, MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_DEFAULT, MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_SPLITTER, MODEL_STORAGE_FILE_SLASH_PATH_FACTORY, ModifyBeforeSetFirestoreDocumentDataAccessorWrapper, NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE, NOTIFICATION_BOX_EXCLUSION_TARGET_INVALID_ERROR_CODE, NOTIFICATION_BOX_EXISTS_FOR_MODEL_ERROR_CODE, NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST_ERROR_CODE, NOTIFICATION_MESSAGE_MAX_LENGTH, NOTIFICATION_MESSAGE_MIN_LENGTH, NOTIFICATION_MODEL_ALREADY_INITIALIZED_ERROR_CODE, NOTIFICATION_RECIPIENT_NAME_MAX_LENGTH, NOTIFICATION_RECIPIENT_NAME_MIN_LENGTH, NOTIFICATION_SUBJECT_MAX_LENGTH, NOTIFICATION_SUBJECT_MIN_LENGTH, NOTIFICATION_SUMMARY_EMBEDDED_NOTIFICATION_ITEM_MESSAGE_MAX_LENGTH, NOTIFICATION_SUMMARY_EMBEDDED_NOTIFICATION_ITEM_SUBJECT_MAX_LENGTH, NOTIFICATION_SUMMARY_ITEM_LIMIT, NOTIFICATION_TASK_SUBTASK_CHECKPOINT_CLEANUP, NOTIFICATION_TASK_SUBTASK_CHECKPOINT_PROCESSING, NOTIFICATION_USER_BLOCKED_FROM_BEING_ADD_TO_RECIPIENTS_ERROR_CODE, NOTIFICATION_USER_INVALID_UID_FOR_CREATE_ERROR_CODE, NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED_ERROR_CODE, NOTIFICATION_WEEK_NOTIFICATION_ITEM_LIMIT, NotificationBoxDocument, NotificationBoxRecipientFlag, NotificationBoxRecipientTemplateConfigBoolean, NotificationDocument, NotificationFirestoreCollections, NotificationFunctions, NotificationMessageFlag, NotificationRecipientSendFlag, NotificationSendState, NotificationSendType, NotificationSummaryDocument, NotificationUserDocument, NotificationWeekDocument, RUN_DEV_FUNCTION_APP_FUNCTION_KEY, SCHEDULED_FUNCTION_DEV_FUNCTION_SPECIFIER, STORAGEFILE_RELATED_FILE_METADATA_KEY, STORAGE_FILE_ALREADY_PROCESSED_ERROR_CODE, STORAGE_FILE_CANNOT_BE_DELETED_YET_ERROR_CODE, STORAGE_FILE_GROUP_CREATE_INPUT_ERROR_CODE, STORAGE_FILE_GROUP_QUEUED_FOR_INITIALIZATION_ERROR_CODE, STORAGE_FILE_GROUP_ROOT_FOLDER_PATH, STORAGE_FILE_GROUP_ZIP_FILE_PATH, STORAGE_FILE_GROUP_ZIP_INFO_JSON_FILE_NAME, STORAGE_FILE_GROUP_ZIP_STORAGE_FILE_PURPOSE, STORAGE_FILE_GROUP_ZIP_STORAGE_FILE_PURPOSE_CREATE_ZIP_SUBTASK, STORAGE_FILE_MODEL_ALREADY_INITIALIZED_ERROR_CODE, STORAGE_FILE_NOT_FLAGGED_FOR_DELETION_ERROR_CODE, STORAGE_FILE_NOT_FLAGGED_FOR_GROUPS_SYNC_ERROR_CODE, STORAGE_FILE_PROCESSING_NOTIFICATION_TASK_TYPE, STORAGE_FILE_PROCESSING_NOT_ALLOWED_FOR_INVALID_STATE_ERROR_CODE, STORAGE_FILE_PROCESSING_NOT_AVAILABLE_FOR_TYPE_ERROR_CODE, STORAGE_FILE_PROCESSING_NOT_QUEUED_FOR_PROCESSING_ERROR_CODE, STORAGE_FILE_PROCESSING_STUCK_THROTTLE_CHECK_MS, STORAGE_FILE_UPLOAD_USER_ROLE, ScheduledFunctionDevelopmentFirebaseFunctionListEntry, ScheduledFunctionDevelopmentFunctionTypeEnum, StorageFileCreationType, StorageFileDocument, StorageFileFirestoreCollections, StorageFileFunctions, StorageFileGroupDocument, StorageFileProcessingState, StorageFileState, StorageFileUploadStreamUnsupportedError, SystemStateDocument, SystemStateFirestoreCollections, UPLOADED_FILE_DOES_NOT_EXIST_ERROR_CODE, UPLOADED_FILE_INITIALIZATION_DISCARDED_ERROR_CODE, UPLOADED_FILE_INITIALIZATION_FAILED_ERROR_CODE, UPLOADED_FILE_NOT_ALLOWED_TO_BE_INITIALIZED_ERROR_CODE, UPLOADS_FOLDER_PATH, _createNotificationDocumentFromPair, abstractSubscribeOrUnsubscribeToNotificationBoxParamsType, abstractSubscribeToNotificationBoxParamsType, addConstraintToBuilder, addOrReplaceLimitInConstraints, allChildDocumentsUnderParent, allChildDocumentsUnderParentPath, allChildDocumentsUnderRelativePath, allowDocumentSnapshotWithPathOnceFilter, allowedNotificationRecipients, appNotificationTemplateTypeInfoRecordService, applyExclusionsToNotificationUserNotificationBoxRecipientConfigs, arrayUpdateWithAccessorFunction, asTopLevelFieldPath, asTopLevelFieldPaths, assertFirestoreUpdateHasData, assertStorageUploadOptionsStringFormat, assignDateCellRangeFunction, assignDateCellScheduleFunction, assignUnitedStatesAddressFunction, assignWebsiteFileLinkFunction, assignWebsiteLinkFunction, buildFirebaseCollectionTypeModelTypeMap, calculateNsForNotificationUserNotificationBoxRecipientConfigs, calculateStorageFileGroupEmbeddedFileUpdate, calculateStorageFileGroupRegeneration, callModelFirebaseFunctionMapFactory, canQueueStorageFileForProcessing, childFirestoreModelKey, childFirestoreModelKeyPath, childFirestoreModelKeys, cleanupSentNotificationsParamsType, clientFirebaseFirestoreContextFactory, clientFirebaseStorageContextFactory, combineUploadFileTypeDeterminers, completeSubtaskProcessingAndScheduleCleanupTaskResult, contextGrantedModelRolesReader, contextGrantedModelRolesReaderDoesNotExistErrorMessage, contextGrantedModelRolesReaderPermissionErrorMessage, convertHttpsCallableErrorToReadableError, copyDocumentIdForUserRelatedModifierFunction, copyDocumentIdToFieldModifierFunction, copyStoragePath, copyUserRelatedDataAccessorFactoryFunction, copyUserRelatedDataModifierConfig, createNotificationBoxParamsType, createNotificationDocument, createNotificationDocumentIfSending, createNotificationDocumentPair, createNotificationSummaryParamsType, createNotificationTaskTemplate, createNotificationTemplate, createNotificationUserParamsType, createStorageFileDocumentPair, createStorageFileDocumentPairFactory, createStorageFileGroupParamsType, createStorageFileParamsType, dataFromDocumentSnapshots, dataFromSnapshotStream, delayCompletion, deleteAllQueuedStorageFilesParamsType, deleteStorageFileParamsType, determineByFileName, determineByFilePath, determineByFolderName, determineUserByFolder, determineUserByFolderWrapperFunction, determineUserByUserUploadsFolderWrapperFunction, developmentFirebaseFunctionMapFactory, directDataHttpsCallable, documentData, documentDataFunction, documentDataWithIdAndKey, documentReferenceFromDocument, documentReferencesFromDocuments, documentReferencesFromSnapshot, downloadStorageFileParamsType, effectiveNotificationBoxRecipientConfig, effectiveNotificationBoxRecipientTemplateConfig, endAt, endAtValue, endBefore, extendFirestoreCollectionWithSingleDocumentAccessor, filterConstraintsOfType, filterDisallowedFirestoreItemPageIteratorInputConstraints, filterRepeatCheckpointSnapshots, filterWithDateRange, firebaseAuthErrorToReadableError, firebaseFirestoreClientDrivers, firebaseFirestoreQueryConstraintFunctionsDriver, firebaseFirestoreQueryDriver, firebaseFunctionMapFactory, firebaseModelLoader, firebaseModelPermissionService, firebaseModelService, firebaseModelServiceFactory, firebaseModelsService, firebaseQueryItemAccumulator, firebaseQuerySnapshotAccumulator, firebaseStorageBucketFolderPath, firebaseStorageClientAccessorDriver, firebaseStorageClientAccessorFile, firebaseStorageClientAccessorFolder, firebaseStorageClientDrivers, firebaseStorageClientListFilesResultFactory, firebaseStorageContextFactory, firebaseStorageFileExists, firebaseStorageFilePathFromStorageFilePath, firebaseStorageRefForStorageFilePath, firestoreArray, firestoreArrayMap, firestoreBitwiseObjectMap, firestoreBitwiseSet, firestoreBitwiseSetMap, firestoreBoolean, firestoreClientAccessorDriver, firestoreClientArrayUpdateToUpdateData, firestoreClientIncrementUpdateToUpdateData, firestoreCollectionQueryFactory, firestoreContextFactory, firestoreDate, firestoreDateCellRange, firestoreDateCellRangeArray, firestoreDateCellRangeAssignFn, firestoreDateCellSchedule, firestoreDateCellScheduleAssignFn, firestoreDateNumber, firestoreDencoderArray, firestoreDencoderMap, firestoreDencoderStringArray, firestoreDocumentAccessorContextExtension, firestoreDocumentAccessorFactory, firestoreDocumentLoader, firestoreDocumentSnapshotPairsLoader, firestoreDocumentSnapshotPairsLoaderInstance, firestoreDummyKey, firestoreEncodedArray, firestoreEncodedObjectMap, firestoreEnum, firestoreEnumArray, firestoreField, firestoreFieldConfigToModelMapFunctionsRef, firestoreFixedItemPageIteration, firestoreFixedItemPageIterationFactory, firestoreIdBatchVerifierFactory, firestoreIdentityTypeArray, firestoreIdentityTypeArrayName, firestoreItemPageIteration, firestoreItemPageIterationFactory, firestoreLatLngString, firestoreMap, firestoreMapZoomLevel, firestoreModelId, firestoreModelIdArrayField, firestoreModelIdFromDocument, firestoreModelIdFromEmail, firestoreModelIdGrantedRoleArrayMap, firestoreModelIdGrantedRoleMap, firestoreModelIdOrKeyType, firestoreModelIdString, firestoreModelIdType, firestoreModelIdentity, firestoreModelIdentityTypeMap, firestoreModelIdsFromDocuments, firestoreModelIdsFromKey, firestoreModelKey, firestoreModelKeyArrayField, firestoreModelKeyCollectionName, firestoreModelKeyCollectionType, firestoreModelKeyCollectionTypeArray, firestoreModelKeyCollectionTypeArrayName, firestoreModelKeyCollectionTypePair, firestoreModelKeyEncodedGrantedRoleMap, firestoreModelKeyFactory, firestoreModelKeyFromDocument, firestoreModelKeyGrantedRoleArrayMap, firestoreModelKeyGrantedRoleMap, firestoreModelKeyPairObject, firestoreModelKeyParentKey, firestoreModelKeyParentKeyPartPairs, firestoreModelKeyPart, firestoreModelKeyPartPairs, firestoreModelKeyPartPairsKeyPath, firestoreModelKeyPartPairsPaths, firestoreModelKeyPath, firestoreModelKeyString, firestoreModelKeyType, firestoreModelKeyTypePair, firestoreModelKeys, firestoreModelKeysFromDocuments, firestoreModelType, firestoreNotificationBoxRecipient, firestoreNotificationBoxRecipientTemplateConfigRecord, firestoreNotificationItem, firestoreNotificationRecipientWithConfig, firestoreNotificationUserDefaultNotificationBoxRecipientConfig, firestoreNotificationUserNotificationBoxRecipientConfig, firestoreNumber, firestoreObjectArray, firestorePassThroughField, firestoreQueryConstraint, firestoreQueryConstraintFactory, firestoreQueryDocumentSnapshotPairsLoader, firestoreQueryFactory, firestoreSingleDocumentAccessor, firestoreString, firestoreSubObject, firestoreTimezoneString, firestoreUID, firestoreUniqueArray, firestoreUniqueKeyedArray, firestoreUniqueNumberArray, firestoreUniqueStringArray, firestoreUnitedStatesAddress, firestoreUnitedStatesAddressAssignFn, firestoreUnixDateTimeSecondsNumber, firestoreUpdateWithNoDataError, firestoreWebsiteFileLink, firestoreWebsiteFileLinkAssignFn, firestoreWebsiteFileLinkEncodedArray, firestoreWebsiteFileLinkObjectArray, firestoreWebsiteLink, firestoreWebsiteLinkArray, firestoreWebsiteLinkAssignFn, flatFirestoreModelKey, getDataFromDocumentSnapshots, getDocumentSnapshotData, getDocumentSnapshotDataPair, getDocumentSnapshotDataPairs, getDocumentSnapshotDataPairsWithData, getDocumentSnapshotDataTuples, getDocumentSnapshotPair, getDocumentSnapshotPairs, getDocumentSnapshots, getDocumentSnapshotsData, grantFullAccessIfAdmin, grantFullAccessIfAuthUserRelated, grantModelRolesIfAdmin, grantModelRolesIfAdminFunction, grantModelRolesIfAuthUserRelatedModelFunction, grantModelRolesIfFunction, grantModelRolesIfHasAuthRolesFactory, grantModelRolesIfHasAuthRolesFunction, grantModelRolesOnlyIfFunction, grantStorageFileRolesForUserAuthFunction, inContextFirebaseModelServiceFactory, inContextFirebaseModelsServiceFactory, incrementUpdateWithAccessorFunction, inferKeyFromTwoWayFlatFirestoreModelKey, inferNotificationBoxRelatedModelKey, inferStorageFileGroupRelatedModelKey, inferredTargetModelIdParamsType, inferredTargetModelParamsType, initializeAllApplicableNotificationBoxesParamsType, initializeAllApplicableNotificationSummariesParamsType, initializeAllApplicableStorageFileGroupsParamsType, initializeAllStorageFilesFromUploadsParamsType, initializeNotificationModelParamsType, initializeStorageFileFromUploadParamsType, initializeStorageFileModelParamsType, interceptAccessorFactoryFunction, isAdminInFirebaseModelContext, isClientFirebaseError, isCompleteNotificationSendState, isFirebaseStorageObjectNotFoundError, isFirestoreModelId, isFirestoreModelIdOrKey, isFirestoreModelKey, isOwnerOfUserRelatedModelInFirebaseModelContext, iterateFirestoreDocumentSnapshotBatches, iterateFirestoreDocumentSnapshotCheckpoints, iterateFirestoreDocumentSnapshotPairBatches, iterateFirestoreDocumentSnapshotPairs, iterateFirestoreDocumentSnapshots, iterateStorageListFiles, iterateStorageListFilesByEachFile, iterateStorageListFilesFactory, iterationQueryDocChangeWatcher, iterationQueryDocChangeWatcherChangeTypeForGroup, latestDataFromDocuments, latestSnapshotsFromDocuments, lazyFirebaseFunctionsFactory, limit, limitToLast, limitUploadFileTypeDeterminer, limitedFirestoreDocumentAccessorFactory, limitedFirestoreDocumentAccessorSnapshotCache, loadAllFirestoreDocumentSnapshot, loadAllFirestoreDocumentSnapshotPairs, loadDocumentsForDocumentReferences, loadDocumentsForDocumentReferencesFromValues, loadDocumentsForIds, loadDocumentsForIdsFromValues, loadDocumentsForKeys, loadDocumentsForKeysFromValues, loadDocumentsForSnapshots, loadDocumentsForValues, loadNotificationBoxDocumentForReferencePair, loadStorageFileGroupDocumentForReferencePair, makeDocuments, makeFirestoreCollection, makeFirestoreCollectionGroup, makeFirestoreCollectionWithParent, makeFirestoreItemPageIteratorDelegate, makeFirestoreQueryConstraintFunctionsDriver, makeRootSingleItemFirestoreCollection, makeSingleItemFirestoreCollection, mapDataFromSnapshot, mapHttpsCallable, mapLatestSnapshotsFromDocuments, mergeNotificationBoxRecipientTemplateConfigRecords, mergeNotificationBoxRecipientTemplateConfigs, mergeNotificationBoxRecipients, mergeNotificationSendMessagesResult, mergeNotificationUserDefaultNotificationBoxRecipientConfig, mergeNotificationUserNotificationBoxRecipientConfigs, modelStorageSlashPathFactory, modifyBeforeSetInterceptAccessorFactoryFunction, newDocuments, newNotificationBoxRecipientForUid, noContentNotificationMessageFunctionFactory, noStringFormatInStorageUploadOptionsError, notificationBoxCollectionReference, notificationBoxConverter, notificationBoxFirestoreCollection, notificationBoxIdForModel, notificationBoxIdentity, notificationBoxModelCrudFunctionsConfig, notificationBoxRecipientTemplateConfigArrayEntryParamType, notificationBoxRecipientTemplateConfigArrayToRecord, notificationBoxRecipientTemplateConfigRecordToArray, notificationBoxesFlaggedForNeedsInitializationQuery, notificationBoxesFlaggedInvalidQuery, notificationCollectionReference, notificationCollectionReferenceFactory, notificationConverter, notificationFirestoreCollectionFactory, notificationFirestoreCollectionGroup, notificationFunctionMap, notificationFunctionTypeConfigMap, notificationIdentity, notificationMessageFunction, notificationRecipientParamsType, notificationSendExclusionCanSendFunction, notificationSendFlagsImplyIsComplete, notificationSubtaskComplete, notificationSummariesFlaggedForNeedsInitializationQuery, notificationSummaryCollectionReference, notificationSummaryConverter, notificationSummaryFirestoreCollection, notificationSummaryIdForModel, notificationSummaryIdForUidFunctionForRootFirestoreModelIdentity, notificationSummaryIdentity, notificationTaskCanRunNextCheckpoint, notificationTaskComplete, notificationTaskDelayRetry, notificationTaskFailed, notificationTaskPartiallyComplete, notificationTaskUniqueId, notificationTemplateTypeInfoRecord, notificationUserCollectionReference, notificationUserConverter, notificationUserFirestoreCollection, notificationUserHasExclusionQuery, notificationUserIdentity, notificationUsersFlaggedForNeedsSyncQuery, notificationWeekCollectionReference, notificationWeekCollectionReferenceFactory, notificationWeekConverter, notificationWeekFirestoreCollectionFactory, notificationWeekFirestoreCollectionGroup, notificationWeekIdentity, notificationsPastSendAtTimeQuery, notificationsReadyForCleanupQuery, offset, onCallCreateModelParams, onCallCreateModelResult, onCallCreateModelResultWithDocs, onCallDeleteModelParams, onCallDevelopmentParams, onCallReadModelParams, onCallTypedModelParams, onCallTypedModelParamsFunction, onCallUpdateModelParams, optionalFirestoreArray, optionalFirestoreBoolean, optionalFirestoreDate, optionalFirestoreDateNumber, optionalFirestoreEnum, optionalFirestoreField, optionalFirestoreNumber, optionalFirestoreString, optionalFirestoreUID, optionalFirestoreUnitedStatesAddress, optionalFirestoreUnixDateTimeSecondsNumber, orderBy, orderByDocumentId, processAllQueuedStorageFilesParamsType, processStorageFileParamsType, readFirestoreModelKey, readFirestoreModelKeyFromDocumentSnapshot, regenerateAllFlaggedStorageFileGroupsContentParamsType, regenerateStorageFileGroupContentParamsType, replaceConstraints, resyncAllNotificationUserParamsType, resyncNotificationUserParamsType, scheduledFunctionDevelopmentFirebaseFunctionParamsType, selectFromFirebaseModelsService, sendNotificationParamsType, sendQueuedNotificationsParamsType, separateConstraints, setIdAndKeyFromKeyIdRefOnDocumentData, setIdAndKeyFromSnapshotOnDocumentData, shouldSaveNotificationToNotificationWeek, shouldSendCreatedNotificationInput, snapshotConverterFunctions, snapshotStreamDataForAccessor, snapshotStreamForAccessor, sortNotificationItemsFunction, startAfter, startAt, startAtValue, storageFileCollectionReference, storageFileConverter, storageFileFirestoreCollection, storageFileFlaggedForSyncWithGroupsQuery, storageFileFunctionMap, storageFileFunctionTypeConfigMap, storageFileGroupCollectionReference, storageFileGroupConverter, storageFileGroupCreateStorageFileKeyFactory, storageFileGroupCreatedStorageFileKey, storageFileGroupEmbeddedFile, storageFileGroupFirestoreCollection, storageFileGroupFolderPath, storageFileGroupIdForModel, storageFileGroupIdentity, storageFileGroupZipFileStoragePath, storageFileGroupZipStorageFileKey, storageFileGroupsFlaggedForContentRegenerationQuery, storageFileGroupsFlaggedForNeedsInitializationQuery, storageFileGroupsFlaggedInvalidQuery, storageFileIdentity, storageFileModelCrudFunctionsConfig, storageFileProcessingNotificationTaskTemplate, storageFilePurposeAndUserQuery, storageFileUploadUserSimpleClaimsConfiguration, storageFilesQueuedForDeleteQuery, storageFilesQueuedForProcessingQuery, storageListFilesResultFactory, storageListFilesResultHasNoNextError, storagePathFactory, storedFileReaderFactory, streamDocumentSnapshotDataPairs, streamDocumentSnapshotDataPairsWithData, streamDocumentSnapshotsData, streamFromOnSnapshot, syncAllFlaggedStorageFilesWithGroupsParamsType, syncStorageFileWithGroupsParamsType, systemStateCollectionReference, systemStateConverter, systemStateFirestoreCollection, systemStateIdentity, targetModelIdParamsType, targetModelParamsType, twoWayFlatFirestoreModelKey, unreadNotificationItems, unsupportedFirestoreDriverFunctionError, updateNotificationBoxParamsType, updateNotificationBoxRecipientLikeParamsType, updateNotificationBoxRecipientParamsType, updateNotificationBoxRecipientTemplateConfigRecord, updateNotificationRecipient, updateNotificationSummaryParamsType, updateNotificationUserDefaultNotificationBoxRecipientConfig, updateNotificationUserDefaultNotificationBoxRecipientConfigParamsType, updateNotificationUserNotificationBoxRecipientConfigIfChanged, updateNotificationUserNotificationBoxRecipientConfigs, updateNotificationUserNotificationBoxRecipientParamsType, updateNotificationUserNotificationSendExclusions, updateNotificationUserParamsType, updateStorageFileGroupEntryParamsType, updateStorageFileGroupParamsType, updateStorageFileParamsType, updateWithAccessorUpdateAndConverterFunction, uploadFileWithStream, useContextAuth, useContextAuthUid, useDocumentSnapshot, useDocumentSnapshotData, useFirebaseModelsService, userUploadsFolderSlashPathFactory, userUploadsFolderStoragePathFactory, where, whereDateIsAfter, whereDateIsAfterWithSort, whereDateIsBefore, whereDateIsBeforeWithSort, whereDateIsBetween, whereDateIsInRange, whereDateIsOnOrAfter, whereDateIsOnOrAfterWithSort, whereDateIsOnOrBefore, whereDateIsOnOrBeforeWithSort, whereDocumentId, whereStringHasRootIdentityModelKey, whereStringValueHasPrefix };
9459
8807
  //# sourceMappingURL=index.esm.js.map