@dereekb/firebase 13.36.0 → 13.38.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.
@@ -0,0 +1,115 @@
1
+ import type { Maybe } from '@dereekb/util';
2
+ import { type AstNode } from './util';
3
+ /**
4
+ * Name of the `@dereekb/model` helper that expands an arktype definition to `T | null | undefined`.
5
+ */
6
+ export declare const CLEARABLE_FUNCTION_NAME = "clearable";
7
+ /**
8
+ * Module that publishes {@link CLEARABLE_FUNCTION_NAME}.
9
+ */
10
+ export declare const CLEARABLE_IMPORT_MODULE = "@dereekb/model";
11
+ /**
12
+ * Identifier callees whose object-literal argument is an arktype definition (`type({ ... })`, `scope({ ... })`).
13
+ */
14
+ export declare const DEFAULT_ARKTYPE_DEFINITION_CALLEE_NAMES: readonly string[];
15
+ /**
16
+ * Arktype combinator methods that take an object-literal definition (`targetModelParamsType.merge({ ... })`).
17
+ */
18
+ export declare const DEFAULT_ARKTYPE_COMBINATOR_METHOD_NAMES: readonly string[];
19
+ /**
20
+ * Options for the prefer-clearable-arktype rule.
21
+ */
22
+ export interface FirebasePreferClearableArktypeRuleOptions {
23
+ /**
24
+ * Name of the clearable helper. Defaults to {@link CLEARABLE_FUNCTION_NAME}.
25
+ */
26
+ readonly clearableFunctionName?: string;
27
+ /**
28
+ * Module the helper is auto-imported from. Defaults to {@link CLEARABLE_IMPORT_MODULE}.
29
+ */
30
+ readonly importModule?: string;
31
+ /**
32
+ * Whether the fixer may add the helper's import when it is missing. Defaults to `true`.
33
+ */
34
+ readonly autoImport?: boolean;
35
+ /**
36
+ * Whether to also report definitions that union only one of `null` / `undefined`. Defaults to
37
+ * `false`, since a single-nullish definition can be a deliberate narrowing rather than a clearable
38
+ * field.
39
+ */
40
+ readonly includeSingleNullish?: boolean;
41
+ /**
42
+ * Identifier callee names that take an arktype definition. Defaults to {@link DEFAULT_ARKTYPE_DEFINITION_CALLEE_NAMES}.
43
+ */
44
+ readonly definitionCalleeNames?: string[];
45
+ /**
46
+ * Combinator method names that take an arktype definition. Defaults to {@link DEFAULT_ARKTYPE_COMBINATOR_METHOD_NAMES}.
47
+ */
48
+ readonly combinatorMethodNames?: string[];
49
+ }
50
+ /**
51
+ * ESLint rule definition for prefer-clearable-arktype.
52
+ */
53
+ export interface FirebasePreferClearableArktypeRuleDefinition {
54
+ readonly meta: {
55
+ readonly type: 'suggestion';
56
+ readonly fixable: 'code';
57
+ readonly docs: {
58
+ readonly description: string;
59
+ readonly recommended: boolean;
60
+ };
61
+ readonly messages: Readonly<Record<string, string>>;
62
+ readonly schema: readonly object[];
63
+ };
64
+ create(context: {
65
+ options: FirebasePreferClearableArktypeRuleOptions[];
66
+ report: (descriptor: {
67
+ node: AstNode;
68
+ messageId: string;
69
+ data?: Record<string, string>;
70
+ fix?: (fixer: AstNode) => Maybe<AstNode> | AstNode[];
71
+ }) => void;
72
+ sourceCode: AstNode;
73
+ }): Record<string, (node: AstNode) => void>;
74
+ }
75
+ /**
76
+ * ESLint rule that requires arktype model/params definitions to express a clearable field with
77
+ * `clearable('TYPE')` rather than by unioning the nullish keywords inline
78
+ * (`'TYPE | null | undefined'`) or by appending them with `.or(...)`.
79
+ *
80
+ * `clearable(...)` is the workspace's canonical spelling for the `Maybe<T>` fields on a params
81
+ * interface: it names the semantic (`null` clears the field, `undefined` leaves it unchanged)
82
+ * instead of restating the union at every property, and it is what the model-api validator's
83
+ * `MAYBE_WITHOUT_CLEARABLE` check and the JSON Schema export helper both key off. An inline union
84
+ * decodes the same way today but drifts from both.
85
+ *
86
+ * Only properties of an object literal passed to an arktype definition call (`type({ … })`,
87
+ * `someType.merge({ … })`, …) are considered, so ordinary object literals — and `clearable`'s own
88
+ * implementation — are left alone.
89
+ *
90
+ * The fix rewrites the property value and, when the helper is not already in scope, adds its import
91
+ * (once per pass; the remaining properties are rewritten in the same pass alongside it). When no
92
+ * import can be anchored the violation is reported without a fix rather than emitting a reference to
93
+ * an unimported helper.
94
+ *
95
+ * @example
96
+ * ```ts
97
+ * // WARN — preferClearableDefinition
98
+ * export const updateWidgetParamsType = type({
99
+ * 'name?': 'string | null | undefined',
100
+ * 'tags?': 'string[] | null | undefined'
101
+ * });
102
+ *
103
+ * // WARN — preferClearableOrChain
104
+ * export const publishWidgetParamsType = type({
105
+ * 'entries?': widgetEntryParamsType.array().or('null | undefined')
106
+ * });
107
+ *
108
+ * // OK
109
+ * export const updateWidgetParamsType = type({
110
+ * 'name?': clearable('string'),
111
+ * 'tags?': clearable('string[]')
112
+ * });
113
+ * ```
114
+ */
115
+ export declare const FIREBASE_PREFER_CLEARABLE_ARKTYPE_RULE: FirebasePreferClearableArktypeRuleDefinition;
package/index.cjs.js CHANGED
@@ -1463,10 +1463,15 @@ function _is_native_reflect_construct$9() {
1463
1463
  },
1464
1464
  {
1465
1465
  /**
1466
- * Retrieves the data of the document, checking the cache first.
1466
+ * Retrieves the data of the document, always fetching from Firestore.
1467
1467
  *
1468
- * If a fresh cache entry exists, returns it without hitting Firestore.
1469
- * Otherwise falls through to {@link snapshot} which populates the cache.
1468
+ * Delegates to {@link snapshot}, so the read is unconditional and the cache is only WRITTEN to, not
1469
+ * consulted — a caller that wants the cached value should read {@link cache} directly.
1470
+ *
1471
+ * The returned data is converter-applied: declared defaults are filled in, undeclared fields are
1472
+ * stripped, and encoded fields (`firestoreEncodedArray`, `firestoreBitwiseSet`) are decoded. This is
1473
+ * byte-for-byte what the model API's `readDocument` returns, which is what lets `dbx-cli` read the
1474
+ * same document over either transport and get the same answer.
1470
1475
  *
1471
1476
  * @param options - Overrides forwarded to `DocumentSnapshot.data()`, if any.
1472
1477
  * @returns Resolves with the document data, or undefined when the document does not exist.
@@ -4244,6 +4249,64 @@ function optionalFirestoreField(config) {
4244
4249
  }
4245
4250
  return result;
4246
4251
  }
4252
+ /**
4253
+ * Creates a field mapping configuration for an optional object field that is stored as-is, aside from
4254
+ * the values the filter strips out on the way in.
4255
+ *
4256
+ * This is the field for json a converter should not model: a third-party api response, a request config
4257
+ * whose parameters the vendor extends without warning, an sdk-shaped payload. A strict converter would
4258
+ * silently drop whatever it does not name; this one keeps everything.
4259
+ *
4260
+ * The one thing it does not keep is a value Firestore rejects. Firestore refuses an explicit `undefined`
4261
+ * outright — one absent optional field anywhere in the payload fails the whole write — and such a value
4262
+ * is exactly what assembling json from `Maybe` inputs produces (a usage object built from whichever
4263
+ * token counts a response happened to report, a config a caller spread a `Maybe` into). Solved per-writer
4264
+ * it has to be remembered at every call site; solved here it cannot be forgotten.
4265
+ *
4266
+ * The filtering is RECURSIVE, since json of this kind is nested and its interior is just as capable of
4267
+ * carrying an `undefined` as its top level. Non-plain values are retained by reference, so a `Date` (or
4268
+ * a `Timestamp`, or a `DocumentReference`) survives the copy intact.
4269
+ *
4270
+ * Filtering happens on WRITE only. Reads are the plain passthrough — no copy, no traversal — since data
4271
+ * that came out of Firestore cannot contain the values being filtered in the first place.
4272
+ *
4273
+ * A top-level `null` still clears the field: {@link optionalFirestoreField} short-circuits `x == null`
4274
+ * ahead of the transform, so `update({ myField: null })` is untouched by this.
4275
+ *
4276
+ * @param config - Filtering and storage configuration. Defaults to stripping `undefined` values at every depth.
4277
+ * @returns A field mapping configuration for optional passthrough json values.
4278
+ *
4279
+ * @dbxModelSnapshotField
4280
+ * @dbxModelSnapshotFieldCategory object
4281
+ * @dbxModelSnapshotFieldOptional true
4282
+ * @dbxModelSnapshotFieldTags json, passthrough, object, raw, optional, undefined, filter, recursive, factory
4283
+ * @dbxModelSnapshotFieldRelated optional-firestore-field, firestore-pass-through-field, firestore-sub-object
4284
+ * @template T - Type for both the model field and Firestore field
4285
+ *
4286
+ * @example
4287
+ * ```ts
4288
+ * fields: {
4289
+ * // { model: 'm', temperature: undefined, provider: { only: ['openai'], sort: undefined } }
4290
+ * // stores as { model: 'm', provider: { only: ['openai'] } }
4291
+ * config: optionalFirestorePassthroughJsonField<MyVendorConfig>(),
4292
+ * // store null rather than an empty object when nothing survives the filtering
4293
+ * usage: optionalFirestorePassthroughJsonField<MyVendorUsage>({ filterEmptyValues: true, dontStoreIfEmpty: true })
4294
+ * }
4295
+ * ```
4296
+ *
4297
+ * @__NO_SIDE_EFFECTS__
4298
+ */ function optionalFirestorePassthroughJsonField(config) {
4299
+ var _ref = config !== null && config !== void 0 ? config : {}, dontStoreIfEmpty = _ref.dontStoreIfEmpty, defaultReadValue = _ref.defaultReadValue;
4300
+ return optionalFirestoreField({
4301
+ defaultReadValue: defaultReadValue,
4302
+ dontStoreIf: dontStoreIfEmpty ? function(x) {
4303
+ return util.objectHasNoKeys(x);
4304
+ } : undefined,
4305
+ // transformToData rather than transformData: the latter is applied in both directions and would copy
4306
+ // the field on every READ too.
4307
+ transformToData: util.copyValueDeepFunction(config)
4308
+ });
4309
+ }
4247
4310
  /**
4248
4311
  * Default value for required Firestore string fields when the field is missing from the document.
4249
4312
  */ var DEFAULT_FIRESTORE_STRING_FIELD_VALUE = '';
@@ -12399,6 +12462,34 @@ var OFFLINE_ACCESS_OIDC_SCOPE_DETAILS = {
12399
12462
  value: SERVICE_TOKEN_OIDC_SCOPE,
12400
12463
  description: 'Admin-only: issue a long-lived, non-rotating token for server/API use'
12401
12464
  };
12465
+ // MARK: Firestore Session Scope
12466
+ /**
12467
+ * Custom OIDC scope that requests a short-lived direct-Firestore session — a Firebase Auth custom
12468
+ * token plus an App Check attestation minted by the server on the caller's behalf.
12469
+ *
12470
+ * Lets a headless client (a `@dereekb/dbx-cli`-based CLI) connect to Firestore as the authenticated
12471
+ * user and read through the SAME security rules the browser app is subject to, without distributing
12472
+ * service-account credentials. It is the direct-connection counterpart to the `model.*` scopes, which
12473
+ * only reach data over the model HTTP API.
12474
+ *
12475
+ * This scope is privileged: the minted App Check token attests as the app's registered web app, so
12476
+ * provider-side wiring is expected to hard-reject the request for non-admin users (via
12477
+ * {@link OidcProviderConfig.adminOnlyScopes}). The generic `@dereekb/firebase-server` package stays
12478
+ * app-agnostic — the scope is only activated when an app lists it in that config array and supplies
12479
+ * the session endpoint's admin predicate.
12480
+ *
12481
+ * Scope-gating alone is NOT a sufficient gate: `oidcScopesFromScopeClaim` returns `undefined` for a
12482
+ * non-OIDC caller (a plain Firebase ID token) and every enforcement site treats `undefined` as
12483
+ * "skip". The endpoint's admin predicate is the load-bearing check; this scope is defence in depth.
12484
+ */ var FIRESTORE_SESSION_OIDC_SCOPE = 'session.firestore';
12485
+ /**
12486
+ * Pre-built scope picker entry for {@link FIRESTORE_SESSION_OIDC_SCOPE}. Labeled as an admin-only
12487
+ * scope so consent screens and admin pickers signal that it is restricted to privileged users.
12488
+ */ var FIRESTORE_SESSION_OIDC_SCOPE_DETAILS = {
12489
+ label: 'Direct Firestore session (admin)',
12490
+ value: FIRESTORE_SESSION_OIDC_SCOPE,
12491
+ description: 'Admin-only: connect directly to Firestore as you, through security rules'
12492
+ };
12402
12493
  /**
12403
12494
  * Parses a raw OIDC `scope` claim (a space-delimited string) into the granted scope set consumed by
12404
12495
  * {@link oidcScopeTermSatisfied} / {@link oidcScopeTermsSatisfied}.
@@ -13833,7 +13924,9 @@ function _object_spread_props$c(target, source) {
13833
13924
  }
13834
13925
  });
13835
13926
  var permissionService = firebaseModelPermissionService(permissionServiceDelegate);
13836
- var service = {
13927
+ var service = _object_spread_props$c(_object_spread$f({}, config.serverOnly ? {
13928
+ serverOnly: true
13929
+ } : {}), {
13837
13930
  getFirestoreCollection: config.getFirestoreCollection,
13838
13931
  roleMapForModelContext: function roleMapForModelContext(model, context) {
13839
13932
  return permissionService.roleMapForModelContext(model, context);
@@ -13842,7 +13935,7 @@ function _object_spread_props$c(target, source) {
13842
13935
  return permissionService.roleMapForKeyContext(key, context);
13843
13936
  },
13844
13937
  loadModelForKey: permissionServiceDelegate.loadModelForKey
13845
- };
13938
+ });
13846
13939
  return service;
13847
13940
  }
13848
13941
  /**
@@ -13919,6 +14012,7 @@ function _object_spread_props$c(target, source) {
13919
14012
  return firebaseModelService.loadModelForKey(key, context);
13920
14013
  };
13921
14014
  x.getFirestoreCollection = getFirestoreCollection;
14015
+ x.serverOnly = firebaseModelService.serverOnly;
13922
14016
  }
13923
14017
  });
13924
14018
  return service;
@@ -22996,6 +23090,8 @@ exports.FIRESTORE_ORDER_BY_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE = FIRESTORE_ORDER_B
22996
23090
  exports.FIRESTORE_ORDER_BY_QUERY_CONSTRAINT_TYPE = FIRESTORE_ORDER_BY_QUERY_CONSTRAINT_TYPE;
22997
23091
  exports.FIRESTORE_PASSTHROUGH_FIELD = FIRESTORE_PASSTHROUGH_FIELD;
22998
23092
  exports.FIRESTORE_PERMISSION_DENIED_ERROR_CODE = FIRESTORE_PERMISSION_DENIED_ERROR_CODE;
23093
+ exports.FIRESTORE_SESSION_OIDC_SCOPE = FIRESTORE_SESSION_OIDC_SCOPE;
23094
+ exports.FIRESTORE_SESSION_OIDC_SCOPE_DETAILS = FIRESTORE_SESSION_OIDC_SCOPE_DETAILS;
22999
23095
  exports.FIRESTORE_START_AFTER_QUERY_CONSTRAINT_TYPE = FIRESTORE_START_AFTER_QUERY_CONSTRAINT_TYPE;
23000
23096
  exports.FIRESTORE_START_AT_QUERY_CONSTRAINT_TYPE = FIRESTORE_START_AT_QUERY_CONSTRAINT_TYPE;
23001
23097
  exports.FIRESTORE_START_AT_VALUE_QUERY_CONSTRAINT_TYPE = FIRESTORE_START_AT_VALUE_QUERY_CONSTRAINT_TYPE;
@@ -23598,6 +23694,7 @@ exports.optionalFirestoreEnum = optionalFirestoreEnum;
23598
23694
  exports.optionalFirestoreField = optionalFirestoreField;
23599
23695
  exports.optionalFirestoreNotificationHealthCheck = optionalFirestoreNotificationHealthCheck;
23600
23696
  exports.optionalFirestoreNumber = optionalFirestoreNumber;
23697
+ exports.optionalFirestorePassthroughJsonField = optionalFirestorePassthroughJsonField;
23601
23698
  exports.optionalFirestoreString = optionalFirestoreString;
23602
23699
  exports.optionalFirestoreUID = optionalFirestoreUID;
23603
23700
  exports.optionalFirestoreUnitedStatesAddress = optionalFirestoreUnitedStatesAddress;
package/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { increment, arrayRemove, arrayUnion, onSnapshot, getDoc, deleteDoc, setDoc, updateDoc, collection, collectionGroup, doc, writeBatch, runTransaction, limit as limit$1, limitToLast as limitToLast$1, orderBy as orderBy$1, documentId, where as where$1, startAt as startAt$1, startAfter as startAfter$1, endAt as endAt$1, endBefore as endBefore$1, query, getDocs, getCountFromServer } from 'firebase/firestore';
2
- import { cachedGetter, mergeModifiers, asArray, filterUndefinedValues, objectHasNoKeys, filterFalsyAndEmptyValues, build, compareStringsNumeric, wrapUseAsyncFunction, runAsyncTasksForValues, filterMaybeArrayValues, performMakeLoop, makeWithFactory, useAsync, MAP_IDENTITY, toModelFieldConversions, makeModelMapFunctions, modifyModelMapFunctions, assignValuesToPOJOFunction, KeyValueTypleValueFilter, toModelMapFunctions, asObjectCopyFactory, isEqualToValueDecisionFunction, passThrough, transformStringFunctionConfig, transformStringFunction, sortValuesFunctionOrMapIdentityWithSortRef, modelFieldMapFunctions, filterNullAndUndefinedValues, unique, filterUniqueTransform, bitwiseSetDencoder, sortAscendingIndexNumberRefFunction, filterFromPOJOFunction, mapObjectMap, copyObject, latLngStringFunction, mapObjectMapFunction, filterEmptyArrayValues, transformNumberFunction, filterUniqueFunction, dateFromDateOrTimeSecondsNumber, unixDateTimeSecondsNumberFromDate, isMapIdentityFunction, chainMapSameFunctions, isDate, DEFAULT_LAT_LNG_STRING_VALUE, 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, splitStringAtFirstCharacterOccurence, mappedUseFunction, iterableToArray, setContainsAllValues, usePromise, slashPathFactory, errorMessageContainsString, bitwiseObjectDencoder, mergeObjectsFunction, mergeObjects, forEachKeyValue, updateMaybeValue, UNSET_INDEX_NUMBER, 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, compareStringsNumeric, wrapUseAsyncFunction, runAsyncTasksForValues, filterMaybeArrayValues, performMakeLoop, makeWithFactory, useAsync, MAP_IDENTITY, toModelFieldConversions, makeModelMapFunctions, modifyModelMapFunctions, assignValuesToPOJOFunction, KeyValueTypleValueFilter, toModelMapFunctions, asObjectCopyFactory, isEqualToValueDecisionFunction, passThrough, transformStringFunctionConfig, transformStringFunction, sortValuesFunctionOrMapIdentityWithSortRef, modelFieldMapFunctions, filterNullAndUndefinedValues, unique, filterUniqueTransform, bitwiseSetDencoder, sortAscendingIndexNumberRefFunction, filterFromPOJOFunction, mapObjectMap, copyObject, latLngStringFunction, mapObjectMapFunction, filterEmptyArrayValues, transformNumberFunction, filterUniqueFunction, dateFromDateOrTimeSecondsNumber, unixDateTimeSecondsNumberFromDate, isMapIdentityFunction, chainMapSameFunctions, isDate, copyValueDeepFunction, DEFAULT_LAT_LNG_STRING_VALUE, 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, splitStringAtFirstCharacterOccurence, mappedUseFunction, iterableToArray, setContainsAllValues, usePromise, slashPathFactory, errorMessageContainsString, bitwiseObjectDencoder, mergeObjectsFunction, mergeObjects, forEachKeyValue, updateMaybeValue, UNSET_INDEX_NUMBER, 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, EMPTY, tap, combineLatest, of, Subject, filter, exhaustMap, Observable, switchMap, timer, skip, shareReplay } from 'rxjs';
5
5
  import { UNKNOWN_WEBSITE_LINK_TYPE, encodeWebsiteFileLinkToWebsiteLinkEncodedData, decodeWebsiteLinkEncodedDataToWebsiteFileLink, clearable, AbstractModelPermissionService, grantedRoleMapReader, noAccessRoleMap, fullAccessRoleMap, e164PhoneNumberType, ARKTYPE_DATE_DTO_TYPE } from '@dereekb/model';
@@ -1461,10 +1461,15 @@ function _is_native_reflect_construct$9() {
1461
1461
  },
1462
1462
  {
1463
1463
  /**
1464
- * Retrieves the data of the document, checking the cache first.
1464
+ * Retrieves the data of the document, always fetching from Firestore.
1465
1465
  *
1466
- * If a fresh cache entry exists, returns it without hitting Firestore.
1467
- * Otherwise falls through to {@link snapshot} which populates the cache.
1466
+ * Delegates to {@link snapshot}, so the read is unconditional and the cache is only WRITTEN to, not
1467
+ * consulted — a caller that wants the cached value should read {@link cache} directly.
1468
+ *
1469
+ * The returned data is converter-applied: declared defaults are filled in, undeclared fields are
1470
+ * stripped, and encoded fields (`firestoreEncodedArray`, `firestoreBitwiseSet`) are decoded. This is
1471
+ * byte-for-byte what the model API's `readDocument` returns, which is what lets `dbx-cli` read the
1472
+ * same document over either transport and get the same answer.
1468
1473
  *
1469
1474
  * @param options - Overrides forwarded to `DocumentSnapshot.data()`, if any.
1470
1475
  * @returns Resolves with the document data, or undefined when the document does not exist.
@@ -4242,6 +4247,64 @@ function optionalFirestoreField(config) {
4242
4247
  }
4243
4248
  return result;
4244
4249
  }
4250
+ /**
4251
+ * Creates a field mapping configuration for an optional object field that is stored as-is, aside from
4252
+ * the values the filter strips out on the way in.
4253
+ *
4254
+ * This is the field for json a converter should not model: a third-party api response, a request config
4255
+ * whose parameters the vendor extends without warning, an sdk-shaped payload. A strict converter would
4256
+ * silently drop whatever it does not name; this one keeps everything.
4257
+ *
4258
+ * The one thing it does not keep is a value Firestore rejects. Firestore refuses an explicit `undefined`
4259
+ * outright — one absent optional field anywhere in the payload fails the whole write — and such a value
4260
+ * is exactly what assembling json from `Maybe` inputs produces (a usage object built from whichever
4261
+ * token counts a response happened to report, a config a caller spread a `Maybe` into). Solved per-writer
4262
+ * it has to be remembered at every call site; solved here it cannot be forgotten.
4263
+ *
4264
+ * The filtering is RECURSIVE, since json of this kind is nested and its interior is just as capable of
4265
+ * carrying an `undefined` as its top level. Non-plain values are retained by reference, so a `Date` (or
4266
+ * a `Timestamp`, or a `DocumentReference`) survives the copy intact.
4267
+ *
4268
+ * Filtering happens on WRITE only. Reads are the plain passthrough — no copy, no traversal — since data
4269
+ * that came out of Firestore cannot contain the values being filtered in the first place.
4270
+ *
4271
+ * A top-level `null` still clears the field: {@link optionalFirestoreField} short-circuits `x == null`
4272
+ * ahead of the transform, so `update({ myField: null })` is untouched by this.
4273
+ *
4274
+ * @param config - Filtering and storage configuration. Defaults to stripping `undefined` values at every depth.
4275
+ * @returns A field mapping configuration for optional passthrough json values.
4276
+ *
4277
+ * @dbxModelSnapshotField
4278
+ * @dbxModelSnapshotFieldCategory object
4279
+ * @dbxModelSnapshotFieldOptional true
4280
+ * @dbxModelSnapshotFieldTags json, passthrough, object, raw, optional, undefined, filter, recursive, factory
4281
+ * @dbxModelSnapshotFieldRelated optional-firestore-field, firestore-pass-through-field, firestore-sub-object
4282
+ * @template T - Type for both the model field and Firestore field
4283
+ *
4284
+ * @example
4285
+ * ```ts
4286
+ * fields: {
4287
+ * // { model: 'm', temperature: undefined, provider: { only: ['openai'], sort: undefined } }
4288
+ * // stores as { model: 'm', provider: { only: ['openai'] } }
4289
+ * config: optionalFirestorePassthroughJsonField<MyVendorConfig>(),
4290
+ * // store null rather than an empty object when nothing survives the filtering
4291
+ * usage: optionalFirestorePassthroughJsonField<MyVendorUsage>({ filterEmptyValues: true, dontStoreIfEmpty: true })
4292
+ * }
4293
+ * ```
4294
+ *
4295
+ * @__NO_SIDE_EFFECTS__
4296
+ */ function optionalFirestorePassthroughJsonField(config) {
4297
+ var _ref = config !== null && config !== void 0 ? config : {}, dontStoreIfEmpty = _ref.dontStoreIfEmpty, defaultReadValue = _ref.defaultReadValue;
4298
+ return optionalFirestoreField({
4299
+ defaultReadValue: defaultReadValue,
4300
+ dontStoreIf: dontStoreIfEmpty ? function(x) {
4301
+ return objectHasNoKeys(x);
4302
+ } : undefined,
4303
+ // transformToData rather than transformData: the latter is applied in both directions and would copy
4304
+ // the field on every READ too.
4305
+ transformToData: copyValueDeepFunction(config)
4306
+ });
4307
+ }
4245
4308
  /**
4246
4309
  * Default value for required Firestore string fields when the field is missing from the document.
4247
4310
  */ var DEFAULT_FIRESTORE_STRING_FIELD_VALUE = '';
@@ -12397,6 +12460,34 @@ var OFFLINE_ACCESS_OIDC_SCOPE_DETAILS = {
12397
12460
  value: SERVICE_TOKEN_OIDC_SCOPE,
12398
12461
  description: 'Admin-only: issue a long-lived, non-rotating token for server/API use'
12399
12462
  };
12463
+ // MARK: Firestore Session Scope
12464
+ /**
12465
+ * Custom OIDC scope that requests a short-lived direct-Firestore session — a Firebase Auth custom
12466
+ * token plus an App Check attestation minted by the server on the caller's behalf.
12467
+ *
12468
+ * Lets a headless client (a `@dereekb/dbx-cli`-based CLI) connect to Firestore as the authenticated
12469
+ * user and read through the SAME security rules the browser app is subject to, without distributing
12470
+ * service-account credentials. It is the direct-connection counterpart to the `model.*` scopes, which
12471
+ * only reach data over the model HTTP API.
12472
+ *
12473
+ * This scope is privileged: the minted App Check token attests as the app's registered web app, so
12474
+ * provider-side wiring is expected to hard-reject the request for non-admin users (via
12475
+ * {@link OidcProviderConfig.adminOnlyScopes}). The generic `@dereekb/firebase-server` package stays
12476
+ * app-agnostic — the scope is only activated when an app lists it in that config array and supplies
12477
+ * the session endpoint's admin predicate.
12478
+ *
12479
+ * Scope-gating alone is NOT a sufficient gate: `oidcScopesFromScopeClaim` returns `undefined` for a
12480
+ * non-OIDC caller (a plain Firebase ID token) and every enforcement site treats `undefined` as
12481
+ * "skip". The endpoint's admin predicate is the load-bearing check; this scope is defence in depth.
12482
+ */ var FIRESTORE_SESSION_OIDC_SCOPE = 'session.firestore';
12483
+ /**
12484
+ * Pre-built scope picker entry for {@link FIRESTORE_SESSION_OIDC_SCOPE}. Labeled as an admin-only
12485
+ * scope so consent screens and admin pickers signal that it is restricted to privileged users.
12486
+ */ var FIRESTORE_SESSION_OIDC_SCOPE_DETAILS = {
12487
+ label: 'Direct Firestore session (admin)',
12488
+ value: FIRESTORE_SESSION_OIDC_SCOPE,
12489
+ description: 'Admin-only: connect directly to Firestore as you, through security rules'
12490
+ };
12400
12491
  /**
12401
12492
  * Parses a raw OIDC `scope` claim (a space-delimited string) into the granted scope set consumed by
12402
12493
  * {@link oidcScopeTermSatisfied} / {@link oidcScopeTermsSatisfied}.
@@ -13831,7 +13922,9 @@ function _object_spread_props$c(target, source) {
13831
13922
  }
13832
13923
  });
13833
13924
  var permissionService = firebaseModelPermissionService(permissionServiceDelegate);
13834
- var service = {
13925
+ var service = _object_spread_props$c(_object_spread$f({}, config.serverOnly ? {
13926
+ serverOnly: true
13927
+ } : {}), {
13835
13928
  getFirestoreCollection: config.getFirestoreCollection,
13836
13929
  roleMapForModelContext: function roleMapForModelContext(model, context) {
13837
13930
  return permissionService.roleMapForModelContext(model, context);
@@ -13840,7 +13933,7 @@ function _object_spread_props$c(target, source) {
13840
13933
  return permissionService.roleMapForKeyContext(key, context);
13841
13934
  },
13842
13935
  loadModelForKey: permissionServiceDelegate.loadModelForKey
13843
- };
13936
+ });
13844
13937
  return service;
13845
13938
  }
13846
13939
  /**
@@ -13917,6 +14010,7 @@ function _object_spread_props$c(target, source) {
13917
14010
  return firebaseModelService.loadModelForKey(key, context);
13918
14011
  };
13919
14012
  x.getFirestoreCollection = getFirestoreCollection;
14013
+ x.serverOnly = firebaseModelService.serverOnly;
13920
14014
  }
13921
14015
  });
13922
14016
  return service;
@@ -22884,4 +22978,4 @@ var USER_EXTERNAL_CONNECTION_MODEL_CRUD_FUNCTIONS_CONFIG = {
22884
22978
  * Used to generate the UserExternalConnectionFunctions map for a Functions instance.
22885
22979
  */ var userExternalConnectionFunctionMap = callModelFirebaseFunctionMapFactory(USER_EXTERNAL_CONNECTION_FUNCTION_TYPE_CONFIG_MAP, USER_EXTERNAL_CONNECTION_MODEL_CRUD_FUNCTIONS_CONFIG);
22886
22980
 
22887
- export { ALL_NOTIFICATION_DELIVERY_METHODS, ALL_OIDC_TOKEN_ENDPOINT_AUTH_METHODS, ALL_OIDC_TOKEN_ENDPOINT_AUTH_METHOD_OPTIONS, ALL_STORAGE_FILE_NOTIFICATION_TASK_TYPES, ALL_USER_UPLOADS_FOLDER_NAME, ALL_USER_UPLOADS_FOLDER_PATH, ALREADY_EXISTS_ERROR_CODE, AbstractFirestoreDocument, AbstractFirestoreDocumentDataAccessorWrapper, AbstractFirestoreDocumentWithParent, AppNotificationTemplateTypeInfoRecordService, BAD_DOCUMENT_QUERY_CURSOR_ERROR_CODE, BAD_REQUEST_ERROR_CODE, BASE_MODEL_STORAGE_FILE_PATH, CALCOM_USER_EXTERNAL_CONNECTION_PROVIDER_TYPE, CALL_MODEL_APP_FUNCTION_KEY, CALL_MODEL_MISSING_OIDC_SCOPE_ERROR_CODE, CALL_MODEL_OIDC_SCOPES, CALL_MODEL_OIDC_SCOPE_DETAILS, CALL_MODEL_OIDC_SCOPE_FOR_CALL_TYPE, CALL_MODEL_OIDC_SCOPE_PREFIX, CLIENT_SECRET_BASIC_TOKEN_ENDPOINT_AUTH_METHOD, CLIENT_SECRET_JWT_TOKEN_ENDPOINT_AUTH_METHOD, CLIENT_SECRET_POST_TOKEN_ENDPOINT_AUTH_METHOD, CONFLICT_ERROR_CODE, COPY_USER_RELATED_DATA_ACCESSOR_FACTORY_FUNCTION, CREATE_MODEL_OIDC_SCOPE, CREATE_NOTIFICATION_ID_REQUIRED_ERROR_CODE, CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_MAX_EXPIRES_IN_MS, CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_MAX_FILENAME_LENGTH, CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_MIN_EXPIRES_IN_MS, ContextGrantedModelRolesReaderInstance, DBX_FIREBASE_SERVER_NO_AUTH_ERROR_CODE, DBX_FIREBASE_SERVER_NO_UID_ERROR_CODE, DBX_FIREBASE_SERVER_PASSWORD_RESET_INVALID_CODE_ERROR_CODE, DBX_FIREBASE_SERVER_PASSWORD_RESET_NO_CONFIG_ERROR_CODE, DBX_FIREBASE_SERVER_PASSWORD_RESET_SEND_ONCE_ERROR_CODE, DBX_FIREBASE_SERVER_PASSWORD_RESET_THROTTLE_ERROR_CODE, DEFAULT_CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_EXPIRES_IN_MS, 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_IN_MEMORY_CACHE_TTL, DEFAULT_ITERATE_FIRESTORE_DOCUMENT_SNAPSHOT_BATCHES_BATCH_SIZE, DEFAULT_MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER, 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_NOTIFICATION_USER_HEALTH_CHECK_PROBE_THROTTLE_MINUTES, DEFAULT_NOTIFICATION_USER_HEALTH_CHECK_THROTTLE_MINUTES, DEFAULT_NOTIFICATION_USER_HEALTH_CHECK_VERIFY_THROTTLE_SECONDS, DEFAULT_ON_CALL_QUERY_MODEL_LIMIT, DEFAULT_PAGED_ITEM_INDEX_DOCUMENT_ID, DEFAULT_PAGED_ITEM_MAX_ITEMS_PER_PAGE, DEFAULT_QUERY_CHANGE_WATCHER_DELAY, DEFAULT_SINGLE_ITEM_FIRESTORE_COLLECTION_DOCUMENT_IDENTIFIER, DEFAULT_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, DEFAULT_WEBSITE_LINK, DELETE_MODEL_OIDC_SCOPE, DISCORD_USER_EXTERNAL_CONNECTION_PROVIDER_TYPE, DOWNLOAD_MULTIPLE_STORAGE_FILES_MAX_FILES, DOWNLOAD_MULTIPLE_STORAGE_FILES_MIN_FILES, EMAIL_OIDC_SCOPE, EMAIL_OIDC_SCOPE_DETAILS, EMPTY_STORAGE_FILE_PURPOSE_SUBGROUP, EXACT_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, FIREBASE_AUTH_CREDENTIAL_ALREADY_IN_USE_ERROR, FIREBASE_AUTH_EMAIL_ALREADY_EXISTS_ERROR, FIREBASE_AUTH_EMAIL_ALREADY_IN_USE_ERROR, FIREBASE_AUTH_INVALID_PHONE_NUMBER_ERROR, FIREBASE_AUTH_NETWORK_REQUEST_ERROR, FIREBASE_AUTH_NETWORK_REQUEST_FAILED, FIREBASE_AUTH_OOB_CODE_DATA_PAIR_DELIMITER, FIREBASE_AUTH_PASSWORD_MAX_LENGTH, FIREBASE_AUTH_PASSWORD_MIN_LENGTH, FIREBASE_AUTH_PHONE_NUMBER_ALREADY_EXISTS_ERROR, FIREBASE_AUTH_PROVIDER_ALREADY_LINKED_ERROR, FIREBASE_AUTH_QUOTA_EXCEEDED_ERROR, FIREBASE_AUTH_USER_NOT_FOUND_ERROR, FIREBASE_AUTH_WRONG_PASSWORD, FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY, FIREBASE_SERVER_AUTH_CLAIMS_RESET_EXPIRES_AT_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, FORBIDDEN_ERROR_CODE, FirebaseDevelopmentFunctions, FirebaseModelPermissionServiceInstance, FirebaseServerError, FirestoreAccessorStreamMode, FirestoreDocumentContextType, HIGH_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, INTERNAL_SERVER_ERROR_CODE, INVOKE_MODEL_OIDC_SCOPE, KnownNotificationHealthCheckIssueCode, LOW_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, MAX_FIRESTORE_MAP_ZOOM_LEVEL_VALUE, MAX_ON_CALL_QUERY_MODEL_LIMIT, MIN_FIRESTORE_MAP_ZOOM_LEVEL_VALUE, MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_SPLITTER, MODEL_NOT_AVAILABLE_ERROR_CODE, MODEL_STORAGE_FILE_SLASH_PATH_FACTORY, MailgunNotificationHealthCheckIssueCode, ModifyBeforeSetFirestoreDocumentDataAccessorWrapper, NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE, NOTIFICATION_BOX_EXCLUSION_TARGET_INVALID_ERROR_CODE, NOTIFICATION_BOX_EXISTS_FOR_MODEL_ERROR_CODE, NOTIFICATION_BOX_MODEL_CRUD_FUNCTIONS_CONFIG, NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST_ERROR_CODE, NOTIFICATION_FUNCTION_TYPE_CONFIG_MAP, NOTIFICATION_HEALTH_CHECK_STATUS_SEVERITY, NOTIFICATION_LOGGED_EVENT_DAY_ITEM_CONVERTER, 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_HEALTH_CHECK_PROBE_THROTTLED_ERROR_CODE, NOTIFICATION_USER_HEALTH_CHECK_THROTTLED_ERROR_CODE, NOTIFICATION_USER_HEALTH_CHECK_VERIFY_THROTTLED_ERROR_CODE, NOTIFICATION_USER_INVALID_UID_FOR_CREATE_ERROR_CODE, NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED_ERROR_CODE, NOTIFICATION_WEEK_NOTIFICATION_ITEM_LIMIT, NOT_FOUND_ERROR_CODE, NotificationBoxDocument, NotificationBoxRecipientFlag, NotificationBoxRecipientTemplateConfigBoolean, NotificationDeliveryMethod, NotificationDocument, NotificationFirestoreCollections, NotificationFunctions, NotificationHealthCheckStatus, NotificationLoggedEventDayDocument, NotificationLoggedEventDayPageDocument, NotificationMessageFlag, NotificationRecipientSendFlag, NotificationSendState, NotificationSendType, NotificationSummaryDocument, NotificationUserDocument, NotificationWeekDocument, OFFLINE_ACCESS_OIDC_SCOPE, OFFLINE_ACCESS_OIDC_SCOPE_DETAILS, OIDC_ENTRY_CLIENT_TYPE, OIDC_FUNCTION_TYPE_CONFIG_MAP, OIDC_MODEL_CRUD_FUNCTIONS_CONFIG, OIDC_PROVIDER_PROFILE_DEFAULT_DESCRIPTION_SUFFIX, OPENID_OIDC_SCOPE, OPENID_OIDC_SCOPE_DETAILS, OidcEntryDocument, OidcModelFirestoreCollections, OidcModelFunctions, PERMISSION_DENIED_ERROR_CODE, PRIVATE_KEY_JWT_TOKEN_ENDPOINT_AUTH_METHOD, PROFILE_OIDC_SCOPE, PROFILE_OIDC_SCOPE_DETAILS, PUBLIC_PKCE_TOKEN_ENDPOINT_AUTH_METHOD, QUERY_MODEL_OIDC_SCOPE, READ_MODEL_OIDC_SCOPE, RUN_DEV_FUNCTION_APP_FUNCTION_KEY, SCHEDULED_FUNCTION_DEV_FUNCTION_SPECIFIER, SERVICE_TOKEN_OIDC_SCOPE, SERVICE_TOKEN_OIDC_SCOPE_DETAILS, STANDARD_OIDC_SCOPES, STANDARD_OIDC_SCOPE_DETAILS, STORAGEFILE_RELATED_FILE_METADATA_KEY, STORAGE_FILE_ALREADY_PROCESSED_ERROR_CODE, STORAGE_FILE_CANNOT_BE_DELETED_YET_ERROR_CODE, STORAGE_FILE_FUNCTION_TYPE_CONFIG_MAP, 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_MODEL_CRUD_FUNCTIONS_CONFIG, 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, STORAGE_FILE_UPLOAD_USER_SIMPLE_CLAIMS_CONFIGURATION, ScheduledFunctionDevelopmentFirebaseFunctionListEntry, ScheduledFunctionDevelopmentFunctionTypeEnum, StorageFileCreationType, StorageFileDocument, StorageFileFirestoreCollections, StorageFileFunctions, StorageFileGroupDocument, StorageFileProcessingState, StorageFileState, StorageFileUploadStreamUnsupportedError, SystemStateDocument, SystemStateFirestoreCollections, UNAUTHENTICATED_ERROR_CODE, UNAVAILABLE_ERROR_CODE, UNAVAILABLE_OR_DEACTIVATED_FUNCTION_ERROR_CODE, UNKNOWN_MODEL_TYPE_ERROR_CODE, UNTRACKABLE_NOTIFICATION_HEALTH_CHECK_PROBE_ID, UPDATE_MODEL_OIDC_SCOPE, 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, USER_EXTERNAL_CONNECTION_ENTRY_STATUSES, USER_EXTERNAL_CONNECTION_FUNCTION_TYPE_CONFIG_MAP, USER_EXTERNAL_CONNECTION_MODEL_CRUD_FUNCTIONS_CONFIG, UserExternalConnectionDocument, UserExternalConnectionFunctions, ZOHO_USER_EXTERNAL_CONNECTION_PROVIDER_TYPE, ZOOM_USER_EXTERNAL_CONNECTION_PROVIDER_TYPE, _createNotificationDocumentFromPair, abstractSubscribeOrUnsubscribeToNotificationBoxParamsType, abstractSubscribeToNotificationBoxParamsType, addConstraintToBuilder, addOrReplaceLimitInConstraints, adminOnlyScopesForOidcProviderProfiles, allChildDocumentsUnderParent, allChildDocumentsUnderParentPath, allChildDocumentsUnderRelativePath, allNotificationHealthCheckIssues, allowDocumentSnapshotWithPathOnceFilter, allowedNotificationRecipients, appNotificationTemplateTypeInfoRecordService, applyExclusionsToNotificationUserNotificationBoxRecipientConfigs, applyUserExternalConnectionEntry, arrayUpdateWithAccessorFunction, asTopLevelFieldPath, asTopLevelFieldPaths, assertFirestoreUpdateHasData, assertStorageUploadOptionsStringFormat, assignDateCellRangeFunction, assignDateCellScheduleFunction, assignUnitedStatesAddressFunction, assignWebsiteFileLinkFunction, assignWebsiteLinkFunction, assignmentOnlyScopesForOidcProviderProfiles, buildFirebaseCollectionTypeModelTypeMap, calculateNsForNotificationUserNotificationBoxRecipientConfigs, calculateStorageFileGroupEmbeddedFileUpdate, calculateStorageFileGroupRegeneration, callModelFirebaseFunctionMapFactory, callModelOidcScopeForCallType, canQueueStorageFileForProcessing, childFirestoreModelKey, childFirestoreModelKeyPath, childFirestoreModelKeys, cleanupOldNotificationLoggedEventDaysParamsType, cleanupSentNotificationsParamsType, clientFirebaseFirestoreContextFactory, clientFirebaseStorageContextFactory, combineUploadFileTypeDeterminers, completeSubtaskProcessingAndScheduleCleanupTaskResult, contextGrantedModelRolesReader, contextGrantedModelRolesReaderDoesNotExistErrorMessage, contextGrantedModelRolesReaderPermissionErrorMessage, convertHttpsCallableErrorToReadableError, copyDocumentIdForUserRelatedModifierFunction, copyDocumentIdToFieldModifierFunction, copyStoragePath, copyUserRelatedDataAccessorFactoryFunction, copyUserRelatedDataModifierConfig, createNotificationBoxParamsType, createNotificationDocument, createNotificationDocumentIfSending, createNotificationDocumentPair, createNotificationLoggedEventTemplate, createNotificationSummaryParamsType, createNotificationTaskTemplate, createNotificationTemplate, createNotificationUserParamsType, createOidcClientFieldParamsType, createOidcClientParamsType, createStorageFileDocumentPair, createStorageFileDocumentPairFactory, createStorageFileGroupParamsType, createStorageFileParamsType, createStorageFileSignedUploadUrlParamsType, createUserExternalConnectionParamsType, dataFromDocumentSnapshots, dataFromSnapshotStream, decodeFirebaseAuthOobCode, defaultOidcProviderProfiles, defaultPagedItemPageDataConverter, defaultUnlockedScopesForOidcProviderProfiles, delayCompletion, deleteAllQueuedStorageFilesParamsType, targetModelParamsType as deleteOidcClientParamsType, targetModelParamsType as deleteOidcTokenParamsType, deleteStorageFileParamsType, determineByFileName, determineByFilePath, determineByFolderName, determineUserByFolder, determineUserByFolderWrapperFunction, determineUserByUserUploadsFolderWrapperFunction, developmentFirebaseFunctionMapFactory, directDataHttpsCallable, disconnectUserExternalConnectionParamsType, documentData, documentDataFunction, documentDataWithIdAndKey, documentReferenceFromDocument, documentReferencesFromDocuments, documentReferencesFromSnapshot, downloadMultipleStorageFilesFileParamsType, downloadMultipleStorageFilesParamsType, downloadStorageFileParamsType, effectiveNotificationBoxRecipientConfig, effectiveNotificationBoxRecipientTemplateConfig, emptyUserExternalConnection, encodeFirebaseAuthOobCode, endAt, endAtValue, endBefore, extendFirestoreCollectionWithPagedItemAccessor, 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, firestoreCollectionDocumentCache, 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, firestoreNotificationDeliveryHealthCheckResult, firestoreNotificationHealthCheck, firestoreNotificationHealthCheckIssue, firestoreNotificationHealthCheckProbe, firestoreNotificationItem, firestoreNotificationRecipientWithConfig, firestoreNotificationUserDefaultNotificationBoxRecipientConfig, firestoreNotificationUserNotificationBoxRecipientConfig, firestoreNumber, firestoreObjectArray, firestoreObjectMap, 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, inMemoryFirestoreCollectionCacheDelegate, inMemoryFirestoreContextCache, inMemoryFirestoreContextCacheFactory, incrementUpdateWithAccessorFunction, inferKeyFromTwoWayFlatFirestoreModelKey, inferNotificationBoxRelatedModelKey, inferStorageFileGroupRelatedModelKey, inferredTargetModelIdParamsType, inferredTargetModelParamsType, initializeAllApplicableNotificationBoxesParamsType, initializeAllApplicableNotificationSummariesParamsType, initializeAllApplicableStorageFileGroupsParamsType, initializeAllStorageFilesFromUploadsParamsType, initializeNotificationModelParamsType, initializeStorageFileFromUploadParamsType, initializeStorageFileModelParamsType, interceptAccessorFactoryFunction, isAdminInFirebaseModelContext, isClientFirebaseError, isCompleteNotificationSendState, isFirebaseStorageObjectNotFoundError, isFirestoreModelId, isFirestoreModelIdOrKey, isFirestoreModelKey, isLoggedEventNotification, isOwnerOfUserRelatedModelInFirebaseModelContext, isPendingNotificationHealthCheckProbe, isProblemNotificationHealthCheckStatus, 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, makeFirestoreContextCache, makeFirestoreItemPageIteratorDelegate, makeFirestoreQueryConstraintFunctionsDriver, makePagedItemFirestoreCollection, makeRootSingleItemFirestoreCollection, makeSingleItemFirestoreCollection, mapDataFromSnapshot, mapHttpsCallable, mapLatestSnapshotsFromDocuments, mergeNotificationBoxRecipientTemplateConfigRecords, mergeNotificationBoxRecipientTemplateConfigs, mergeNotificationBoxRecipients, mergeNotificationSendMessagesResult, mergeNotificationUserDefaultNotificationBoxRecipientConfig, mergeNotificationUserNotificationBoxRecipientConfigs, modelStorageSlashPathFactory, modifyBeforeSetInterceptAccessorFactoryFunction, newDocuments, newNotificationBoxRecipientForUid, noContentNotificationMessageFunctionFactory, noStringFormatInStorageUploadOptionsError, noopFirestoreCollectionCache, noopFirestoreCollectionCacheDelegate, noopFirestoreCollectionDocumentCache, noopFirestoreContextCache, notificationBoxCollectionReference, notificationBoxConverter, notificationBoxFirestoreCollection, notificationBoxIdForModel, notificationBoxIdentity, notificationBoxRecipientTemplateConfigArrayEntryParamType, notificationBoxRecipientTemplateConfigArrayToRecord, notificationBoxRecipientTemplateConfigRecordToArray, notificationBoxesFlaggedForNeedsInitializationQuery, notificationBoxesFlaggedInvalidQuery, notificationCollectionReference, notificationCollectionReferenceFactory, notificationConverter, notificationDeliveryHealthCheckResultForMethod, notificationFirestoreCollectionFactory, notificationFirestoreCollectionGroup, notificationFunctionMap, notificationHealthCheckIssue, notificationHealthCheckPendingProbeMethods, notificationIdentity, notificationLoggedEventDayCollectionReference, notificationLoggedEventDayCollectionReferenceFactory, notificationLoggedEventDayConverter, notificationLoggedEventDayFirestoreCollectionFactory, notificationLoggedEventDayFirestoreCollectionGroup, notificationLoggedEventDayId, notificationLoggedEventDayIdentity, notificationLoggedEventDayPageCollectionReference, notificationLoggedEventDayPageFirestoreCollectionGroup, notificationLoggedEventDayPageIdentity, notificationLoggedEventDayPagedItemsCollectionFactory, notificationLoggedEventDayPagedItemsCollectionReferenceFactory, notificationLoggedEventDaysOlderThanQuery, notificationLoggedEventLoader, notificationMessageFunction, notificationRecipientParamsType, notificationSendExclusionCanSendFunction, notificationSendFlagsImplyIsComplete, notificationSubtaskComplete, notificationSummariesFlaggedForNeedsInitializationQuery, notificationSummaryCollectionReference, notificationSummaryConverter, notificationSummaryFirestoreCollection, notificationSummaryIdForModel, notificationSummaryIdForUidFunctionForRootFirestoreModelIdentity, notificationSummaryIdentity, notificationTaskCanRunNextCheckpoint, notificationTaskComplete, notificationTaskDelayRetry, notificationTaskFailed, notificationTaskPartiallyComplete, notificationTaskUniqueId, notificationTemplateTypeInfoRecord, notificationUserCollectionReference, notificationUserConverter, notificationUserFirestoreCollection, notificationUserHasExclusionQuery, notificationUserHealthCheckNextProbeAt, notificationUserHealthCheckNextProbeAtByMethod, notificationUserHealthCheckNextRunAt, notificationUserHealthCheckNextVerifyAt, notificationUserHealthCheckParamsType, notificationUserIdentity, notificationUsersFlaggedForNeedsSyncQuery, notificationWeekCollectionReference, notificationWeekCollectionReferenceFactory, notificationWeekConverter, notificationWeekFirestoreCollectionFactory, notificationWeekFirestoreCollectionGroup, notificationWeekIdentity, notificationsPastSendAtTimeQuery, notificationsReadyForCleanupQuery, offset, oidcClientEntriesByOwnerQuery, oidcEntriesByClientIdQuery, oidcEntriesByGrantIdQuery, oidcEntriesByUidQuery, oidcEntriesByUserCodeQuery, oidcEntriesWithTypeQuery, oidcEntryCollectionReference, oidcEntryConverter, oidcEntryFirestoreCollection, oidcEntryIdentity, oidcGrantEntriesByUidQuery, oidcModelFunctionMap, oidcProviderProfileDetails, oidcProviderProfilesForClient, oidcProviderProfilesForKeys, oidcScopeTermSatisfied, oidcScopeTermsSatisfied, oidcScopesFromScopeClaim, onCallCreateModelParams, onCallCreateModelResult, onCallCreateModelResultWithDocs, onCallDeleteModelParams, onCallDevelopmentParams, onCallInvokeModelParams, onCallQueryModelParams, onCallReadModelParams, onCallTypedModelParams, onCallTypedModelParamsFunction, onCallUpdateModelParams, optionalFirestoreArray, optionalFirestoreBoolean, optionalFirestoreDate, optionalFirestoreDateNumber, optionalFirestoreEnum, optionalFirestoreField, optionalFirestoreNotificationHealthCheck, optionalFirestoreNumber, optionalFirestoreString, optionalFirestoreUID, optionalFirestoreUnitedStatesAddress, optionalFirestoreUnixDateTimeSecondsNumber, orderBy, orderByDocumentId, processAllQueuedStorageFilesParamsType, processStorageFileParamsType, readFirestoreModelKey, readFirestoreModelKeyFromDocumentSnapshot, readLoggingFirestoreContextCache, readLoggingFirestoreContextCacheFactory, readMultipleStorageFilesMetadataFileParamsType, readMultipleStorageFilesMetadataParamsType, readStorageFileMetadataParamsType, readUserExternalConnectionAuthorizeStateParamsType, regenerateAllFlaggedStorageFileGroupsContentParamsType, regenerateStorageFileGroupContentParamsType, replaceConstraints, requiredScopesForOidcProviderProfiles, resolveEffectiveOidcScopeTerms, resolveOidcModelScopeRequirement, resyncAllNotificationUserParamsType, targetModelParamsType as resyncNotificationUserParamsType, rollupNotificationDeliveryHealthCheckResultStatus, rollupNotificationHealthCheckResultStatus, rollupNotificationHealthCheckStatus, targetModelParamsType as rotateOidcClientSecretParamsType, scheduledFunctionDevelopmentFirebaseFunctionParamsType, scopesForOidcProviderProfiles, selectFromFirebaseModelsService, sendNotificationParamsType, sendQueuedNotificationsParamsType, separateConstraints, setIdAndKeyFromKeyIdRefOnDocumentData, setIdAndKeyFromSnapshotOnDocumentData, shouldSaveNotificationToNotificationWeek, shouldSendCreatedNotificationInput, snapshotConverterFunctions, snapshotStreamDataForAccessor, snapshotStreamForAccessor, sortNotificationItemsFunction, startAfter, startAt, startAtValue, storageFileCollectionReference, storageFileConverter, storageFileFirestoreCollection, storageFileFlaggedForSyncWithGroupsQuery, storageFileFunctionMap, storageFileGroupCollectionReference, storageFileGroupConverter, storageFileGroupCreateStorageFileKeyFactory, storageFileGroupCreatedStorageFileKey, storageFileGroupEmbeddedFile, storageFileGroupFirestoreCollection, storageFileGroupFolderPath, storageFileGroupIdForModel, storageFileGroupIdentity, storageFileGroupZipFileStoragePath, storageFileGroupZipStorageFileKey, storageFileGroupsFlaggedForContentRegenerationQuery, storageFileGroupsFlaggedForNeedsInitializationQuery, storageFileGroupsFlaggedInvalidQuery, storageFileIdentity, storageFileProcessingNotificationTaskTemplate, storageFilePurposeAndUserQuery, storageFilesQueuedForDeleteQuery, storageFilesQueuedForProcessingQuery, storageListFilesResultFactory, storageListFilesResultHasNoNextError, storagePathFactory, storedFileReaderFactory, streamDocumentSnapshotDataPairs, streamDocumentSnapshotDataPairsWithData, streamDocumentSnapshotsData, streamFromOnSnapshot, syncAllFlaggedStorageFilesWithGroupsParamsType, syncStorageFileWithGroupsParamsType, systemStateCollectionReference, systemStateConverter, systemStateFirestoreCollection, systemStateIdentity, systemStateStoredDataConverterFactory, targetModelIdParamsType, targetModelParamsType, twoWayFlatFirestoreModelKey, unreadNotificationItems, unsupportedFirestoreDriverFunctionError, untrackableNotificationHealthCheckProbe, targetModelParamsType as updateNotificationBoxParamsType, updateNotificationBoxRecipientLikeParamsType, updateNotificationBoxRecipientParamsType, updateNotificationBoxRecipientTemplateConfigRecord, updateNotificationRecipient, updateNotificationSummaryParamsType, updateNotificationUserDefaultNotificationBoxRecipientConfig, updateNotificationUserDefaultNotificationBoxRecipientConfigParamsType, updateNotificationUserNotificationBoxRecipientConfigIfChanged, updateNotificationUserNotificationBoxRecipientConfigs, updateNotificationUserNotificationBoxRecipientParamsType, updateNotificationUserNotificationSendExclusions, updateNotificationUserParamsType, updateOidcClientFieldParamsType, updateOidcClientParamsType, updateStorageFileGroupEntryParamsType, updateStorageFileGroupParamsType, updateStorageFileParamsType, updateWithAccessorUpdateAndConverterFunction, uploadFileWithStream, useContextAuth, useContextAuthUid, useDocumentSnapshot, useDocumentSnapshotData, useFirebaseModelsService, userExternalConnectionAccessorFactory, userExternalConnectionCollectionReference, userExternalConnectionConnectedProviderTypes, userExternalConnectionConverter, userExternalConnectionEntryFields, userExternalConnectionEntryForOutcome, userExternalConnectionEntryForProvider, userExternalConnectionEntryIsConnected, userExternalConnectionEntryIsExpired, userExternalConnectionFirestoreCollection, userExternalConnectionFunctionMap, userExternalConnectionIdentity, userExternalConnectionIsConnectedToProvider, userExternalConnectionsWithConnectedProviderQuery, userUploadsFolderSlashPathFactory, userUploadsFolderStoragePathFactory, where, whereDateIsAfter, whereDateIsAfterWithSort, whereDateIsBefore, whereDateIsBeforeWithSort, whereDateIsBetween, whereDateIsInRange, whereDateIsOnOrAfter, whereDateIsOnOrAfterWithSort, whereDateIsOnOrBefore, whereDateIsOnOrBeforeWithSort, whereDocumentId, whereStringHasRootIdentityModelKey, whereStringValueHasPrefix };
22981
+ export { ALL_NOTIFICATION_DELIVERY_METHODS, ALL_OIDC_TOKEN_ENDPOINT_AUTH_METHODS, ALL_OIDC_TOKEN_ENDPOINT_AUTH_METHOD_OPTIONS, ALL_STORAGE_FILE_NOTIFICATION_TASK_TYPES, ALL_USER_UPLOADS_FOLDER_NAME, ALL_USER_UPLOADS_FOLDER_PATH, ALREADY_EXISTS_ERROR_CODE, AbstractFirestoreDocument, AbstractFirestoreDocumentDataAccessorWrapper, AbstractFirestoreDocumentWithParent, AppNotificationTemplateTypeInfoRecordService, BAD_DOCUMENT_QUERY_CURSOR_ERROR_CODE, BAD_REQUEST_ERROR_CODE, BASE_MODEL_STORAGE_FILE_PATH, CALCOM_USER_EXTERNAL_CONNECTION_PROVIDER_TYPE, CALL_MODEL_APP_FUNCTION_KEY, CALL_MODEL_MISSING_OIDC_SCOPE_ERROR_CODE, CALL_MODEL_OIDC_SCOPES, CALL_MODEL_OIDC_SCOPE_DETAILS, CALL_MODEL_OIDC_SCOPE_FOR_CALL_TYPE, CALL_MODEL_OIDC_SCOPE_PREFIX, CLIENT_SECRET_BASIC_TOKEN_ENDPOINT_AUTH_METHOD, CLIENT_SECRET_JWT_TOKEN_ENDPOINT_AUTH_METHOD, CLIENT_SECRET_POST_TOKEN_ENDPOINT_AUTH_METHOD, CONFLICT_ERROR_CODE, COPY_USER_RELATED_DATA_ACCESSOR_FACTORY_FUNCTION, CREATE_MODEL_OIDC_SCOPE, CREATE_NOTIFICATION_ID_REQUIRED_ERROR_CODE, CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_MAX_EXPIRES_IN_MS, CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_MAX_FILENAME_LENGTH, CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_MIN_EXPIRES_IN_MS, ContextGrantedModelRolesReaderInstance, DBX_FIREBASE_SERVER_NO_AUTH_ERROR_CODE, DBX_FIREBASE_SERVER_NO_UID_ERROR_CODE, DBX_FIREBASE_SERVER_PASSWORD_RESET_INVALID_CODE_ERROR_CODE, DBX_FIREBASE_SERVER_PASSWORD_RESET_NO_CONFIG_ERROR_CODE, DBX_FIREBASE_SERVER_PASSWORD_RESET_SEND_ONCE_ERROR_CODE, DBX_FIREBASE_SERVER_PASSWORD_RESET_THROTTLE_ERROR_CODE, DEFAULT_CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_EXPIRES_IN_MS, 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_IN_MEMORY_CACHE_TTL, DEFAULT_ITERATE_FIRESTORE_DOCUMENT_SNAPSHOT_BATCHES_BATCH_SIZE, DEFAULT_MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER, 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_NOTIFICATION_USER_HEALTH_CHECK_PROBE_THROTTLE_MINUTES, DEFAULT_NOTIFICATION_USER_HEALTH_CHECK_THROTTLE_MINUTES, DEFAULT_NOTIFICATION_USER_HEALTH_CHECK_VERIFY_THROTTLE_SECONDS, DEFAULT_ON_CALL_QUERY_MODEL_LIMIT, DEFAULT_PAGED_ITEM_INDEX_DOCUMENT_ID, DEFAULT_PAGED_ITEM_MAX_ITEMS_PER_PAGE, DEFAULT_QUERY_CHANGE_WATCHER_DELAY, DEFAULT_SINGLE_ITEM_FIRESTORE_COLLECTION_DOCUMENT_IDENTIFIER, DEFAULT_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, DEFAULT_WEBSITE_LINK, DELETE_MODEL_OIDC_SCOPE, DISCORD_USER_EXTERNAL_CONNECTION_PROVIDER_TYPE, DOWNLOAD_MULTIPLE_STORAGE_FILES_MAX_FILES, DOWNLOAD_MULTIPLE_STORAGE_FILES_MIN_FILES, EMAIL_OIDC_SCOPE, EMAIL_OIDC_SCOPE_DETAILS, EMPTY_STORAGE_FILE_PURPOSE_SUBGROUP, EXACT_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, FIREBASE_AUTH_CREDENTIAL_ALREADY_IN_USE_ERROR, FIREBASE_AUTH_EMAIL_ALREADY_EXISTS_ERROR, FIREBASE_AUTH_EMAIL_ALREADY_IN_USE_ERROR, FIREBASE_AUTH_INVALID_PHONE_NUMBER_ERROR, FIREBASE_AUTH_NETWORK_REQUEST_ERROR, FIREBASE_AUTH_NETWORK_REQUEST_FAILED, FIREBASE_AUTH_OOB_CODE_DATA_PAIR_DELIMITER, FIREBASE_AUTH_PASSWORD_MAX_LENGTH, FIREBASE_AUTH_PASSWORD_MIN_LENGTH, FIREBASE_AUTH_PHONE_NUMBER_ALREADY_EXISTS_ERROR, FIREBASE_AUTH_PROVIDER_ALREADY_LINKED_ERROR, FIREBASE_AUTH_QUOTA_EXCEEDED_ERROR, FIREBASE_AUTH_USER_NOT_FOUND_ERROR, FIREBASE_AUTH_WRONG_PASSWORD, FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY, FIREBASE_SERVER_AUTH_CLAIMS_RESET_EXPIRES_AT_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_SESSION_OIDC_SCOPE, FIRESTORE_SESSION_OIDC_SCOPE_DETAILS, 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, FORBIDDEN_ERROR_CODE, FirebaseDevelopmentFunctions, FirebaseModelPermissionServiceInstance, FirebaseServerError, FirestoreAccessorStreamMode, FirestoreDocumentContextType, HIGH_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, INTERNAL_SERVER_ERROR_CODE, INVOKE_MODEL_OIDC_SCOPE, KnownNotificationHealthCheckIssueCode, LOW_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL, MAX_FIRESTORE_MAP_ZOOM_LEVEL_VALUE, MAX_ON_CALL_QUERY_MODEL_LIMIT, MIN_FIRESTORE_MAP_ZOOM_LEVEL_VALUE, MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_SPLITTER, MODEL_NOT_AVAILABLE_ERROR_CODE, MODEL_STORAGE_FILE_SLASH_PATH_FACTORY, MailgunNotificationHealthCheckIssueCode, ModifyBeforeSetFirestoreDocumentDataAccessorWrapper, NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE, NOTIFICATION_BOX_EXCLUSION_TARGET_INVALID_ERROR_CODE, NOTIFICATION_BOX_EXISTS_FOR_MODEL_ERROR_CODE, NOTIFICATION_BOX_MODEL_CRUD_FUNCTIONS_CONFIG, NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST_ERROR_CODE, NOTIFICATION_FUNCTION_TYPE_CONFIG_MAP, NOTIFICATION_HEALTH_CHECK_STATUS_SEVERITY, NOTIFICATION_LOGGED_EVENT_DAY_ITEM_CONVERTER, 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_HEALTH_CHECK_PROBE_THROTTLED_ERROR_CODE, NOTIFICATION_USER_HEALTH_CHECK_THROTTLED_ERROR_CODE, NOTIFICATION_USER_HEALTH_CHECK_VERIFY_THROTTLED_ERROR_CODE, NOTIFICATION_USER_INVALID_UID_FOR_CREATE_ERROR_CODE, NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED_ERROR_CODE, NOTIFICATION_WEEK_NOTIFICATION_ITEM_LIMIT, NOT_FOUND_ERROR_CODE, NotificationBoxDocument, NotificationBoxRecipientFlag, NotificationBoxRecipientTemplateConfigBoolean, NotificationDeliveryMethod, NotificationDocument, NotificationFirestoreCollections, NotificationFunctions, NotificationHealthCheckStatus, NotificationLoggedEventDayDocument, NotificationLoggedEventDayPageDocument, NotificationMessageFlag, NotificationRecipientSendFlag, NotificationSendState, NotificationSendType, NotificationSummaryDocument, NotificationUserDocument, NotificationWeekDocument, OFFLINE_ACCESS_OIDC_SCOPE, OFFLINE_ACCESS_OIDC_SCOPE_DETAILS, OIDC_ENTRY_CLIENT_TYPE, OIDC_FUNCTION_TYPE_CONFIG_MAP, OIDC_MODEL_CRUD_FUNCTIONS_CONFIG, OIDC_PROVIDER_PROFILE_DEFAULT_DESCRIPTION_SUFFIX, OPENID_OIDC_SCOPE, OPENID_OIDC_SCOPE_DETAILS, OidcEntryDocument, OidcModelFirestoreCollections, OidcModelFunctions, PERMISSION_DENIED_ERROR_CODE, PRIVATE_KEY_JWT_TOKEN_ENDPOINT_AUTH_METHOD, PROFILE_OIDC_SCOPE, PROFILE_OIDC_SCOPE_DETAILS, PUBLIC_PKCE_TOKEN_ENDPOINT_AUTH_METHOD, QUERY_MODEL_OIDC_SCOPE, READ_MODEL_OIDC_SCOPE, RUN_DEV_FUNCTION_APP_FUNCTION_KEY, SCHEDULED_FUNCTION_DEV_FUNCTION_SPECIFIER, SERVICE_TOKEN_OIDC_SCOPE, SERVICE_TOKEN_OIDC_SCOPE_DETAILS, STANDARD_OIDC_SCOPES, STANDARD_OIDC_SCOPE_DETAILS, STORAGEFILE_RELATED_FILE_METADATA_KEY, STORAGE_FILE_ALREADY_PROCESSED_ERROR_CODE, STORAGE_FILE_CANNOT_BE_DELETED_YET_ERROR_CODE, STORAGE_FILE_FUNCTION_TYPE_CONFIG_MAP, 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_MODEL_CRUD_FUNCTIONS_CONFIG, 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, STORAGE_FILE_UPLOAD_USER_SIMPLE_CLAIMS_CONFIGURATION, ScheduledFunctionDevelopmentFirebaseFunctionListEntry, ScheduledFunctionDevelopmentFunctionTypeEnum, StorageFileCreationType, StorageFileDocument, StorageFileFirestoreCollections, StorageFileFunctions, StorageFileGroupDocument, StorageFileProcessingState, StorageFileState, StorageFileUploadStreamUnsupportedError, SystemStateDocument, SystemStateFirestoreCollections, UNAUTHENTICATED_ERROR_CODE, UNAVAILABLE_ERROR_CODE, UNAVAILABLE_OR_DEACTIVATED_FUNCTION_ERROR_CODE, UNKNOWN_MODEL_TYPE_ERROR_CODE, UNTRACKABLE_NOTIFICATION_HEALTH_CHECK_PROBE_ID, UPDATE_MODEL_OIDC_SCOPE, 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, USER_EXTERNAL_CONNECTION_ENTRY_STATUSES, USER_EXTERNAL_CONNECTION_FUNCTION_TYPE_CONFIG_MAP, USER_EXTERNAL_CONNECTION_MODEL_CRUD_FUNCTIONS_CONFIG, UserExternalConnectionDocument, UserExternalConnectionFunctions, ZOHO_USER_EXTERNAL_CONNECTION_PROVIDER_TYPE, ZOOM_USER_EXTERNAL_CONNECTION_PROVIDER_TYPE, _createNotificationDocumentFromPair, abstractSubscribeOrUnsubscribeToNotificationBoxParamsType, abstractSubscribeToNotificationBoxParamsType, addConstraintToBuilder, addOrReplaceLimitInConstraints, adminOnlyScopesForOidcProviderProfiles, allChildDocumentsUnderParent, allChildDocumentsUnderParentPath, allChildDocumentsUnderRelativePath, allNotificationHealthCheckIssues, allowDocumentSnapshotWithPathOnceFilter, allowedNotificationRecipients, appNotificationTemplateTypeInfoRecordService, applyExclusionsToNotificationUserNotificationBoxRecipientConfigs, applyUserExternalConnectionEntry, arrayUpdateWithAccessorFunction, asTopLevelFieldPath, asTopLevelFieldPaths, assertFirestoreUpdateHasData, assertStorageUploadOptionsStringFormat, assignDateCellRangeFunction, assignDateCellScheduleFunction, assignUnitedStatesAddressFunction, assignWebsiteFileLinkFunction, assignWebsiteLinkFunction, assignmentOnlyScopesForOidcProviderProfiles, buildFirebaseCollectionTypeModelTypeMap, calculateNsForNotificationUserNotificationBoxRecipientConfigs, calculateStorageFileGroupEmbeddedFileUpdate, calculateStorageFileGroupRegeneration, callModelFirebaseFunctionMapFactory, callModelOidcScopeForCallType, canQueueStorageFileForProcessing, childFirestoreModelKey, childFirestoreModelKeyPath, childFirestoreModelKeys, cleanupOldNotificationLoggedEventDaysParamsType, cleanupSentNotificationsParamsType, clientFirebaseFirestoreContextFactory, clientFirebaseStorageContextFactory, combineUploadFileTypeDeterminers, completeSubtaskProcessingAndScheduleCleanupTaskResult, contextGrantedModelRolesReader, contextGrantedModelRolesReaderDoesNotExistErrorMessage, contextGrantedModelRolesReaderPermissionErrorMessage, convertHttpsCallableErrorToReadableError, copyDocumentIdForUserRelatedModifierFunction, copyDocumentIdToFieldModifierFunction, copyStoragePath, copyUserRelatedDataAccessorFactoryFunction, copyUserRelatedDataModifierConfig, createNotificationBoxParamsType, createNotificationDocument, createNotificationDocumentIfSending, createNotificationDocumentPair, createNotificationLoggedEventTemplate, createNotificationSummaryParamsType, createNotificationTaskTemplate, createNotificationTemplate, createNotificationUserParamsType, createOidcClientFieldParamsType, createOidcClientParamsType, createStorageFileDocumentPair, createStorageFileDocumentPairFactory, createStorageFileGroupParamsType, createStorageFileParamsType, createStorageFileSignedUploadUrlParamsType, createUserExternalConnectionParamsType, dataFromDocumentSnapshots, dataFromSnapshotStream, decodeFirebaseAuthOobCode, defaultOidcProviderProfiles, defaultPagedItemPageDataConverter, defaultUnlockedScopesForOidcProviderProfiles, delayCompletion, deleteAllQueuedStorageFilesParamsType, targetModelParamsType as deleteOidcClientParamsType, targetModelParamsType as deleteOidcTokenParamsType, deleteStorageFileParamsType, determineByFileName, determineByFilePath, determineByFolderName, determineUserByFolder, determineUserByFolderWrapperFunction, determineUserByUserUploadsFolderWrapperFunction, developmentFirebaseFunctionMapFactory, directDataHttpsCallable, disconnectUserExternalConnectionParamsType, documentData, documentDataFunction, documentDataWithIdAndKey, documentReferenceFromDocument, documentReferencesFromDocuments, documentReferencesFromSnapshot, downloadMultipleStorageFilesFileParamsType, downloadMultipleStorageFilesParamsType, downloadStorageFileParamsType, effectiveNotificationBoxRecipientConfig, effectiveNotificationBoxRecipientTemplateConfig, emptyUserExternalConnection, encodeFirebaseAuthOobCode, endAt, endAtValue, endBefore, extendFirestoreCollectionWithPagedItemAccessor, 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, firestoreCollectionDocumentCache, 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, firestoreNotificationDeliveryHealthCheckResult, firestoreNotificationHealthCheck, firestoreNotificationHealthCheckIssue, firestoreNotificationHealthCheckProbe, firestoreNotificationItem, firestoreNotificationRecipientWithConfig, firestoreNotificationUserDefaultNotificationBoxRecipientConfig, firestoreNotificationUserNotificationBoxRecipientConfig, firestoreNumber, firestoreObjectArray, firestoreObjectMap, 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, inMemoryFirestoreCollectionCacheDelegate, inMemoryFirestoreContextCache, inMemoryFirestoreContextCacheFactory, incrementUpdateWithAccessorFunction, inferKeyFromTwoWayFlatFirestoreModelKey, inferNotificationBoxRelatedModelKey, inferStorageFileGroupRelatedModelKey, inferredTargetModelIdParamsType, inferredTargetModelParamsType, initializeAllApplicableNotificationBoxesParamsType, initializeAllApplicableNotificationSummariesParamsType, initializeAllApplicableStorageFileGroupsParamsType, initializeAllStorageFilesFromUploadsParamsType, initializeNotificationModelParamsType, initializeStorageFileFromUploadParamsType, initializeStorageFileModelParamsType, interceptAccessorFactoryFunction, isAdminInFirebaseModelContext, isClientFirebaseError, isCompleteNotificationSendState, isFirebaseStorageObjectNotFoundError, isFirestoreModelId, isFirestoreModelIdOrKey, isFirestoreModelKey, isLoggedEventNotification, isOwnerOfUserRelatedModelInFirebaseModelContext, isPendingNotificationHealthCheckProbe, isProblemNotificationHealthCheckStatus, 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, makeFirestoreContextCache, makeFirestoreItemPageIteratorDelegate, makeFirestoreQueryConstraintFunctionsDriver, makePagedItemFirestoreCollection, makeRootSingleItemFirestoreCollection, makeSingleItemFirestoreCollection, mapDataFromSnapshot, mapHttpsCallable, mapLatestSnapshotsFromDocuments, mergeNotificationBoxRecipientTemplateConfigRecords, mergeNotificationBoxRecipientTemplateConfigs, mergeNotificationBoxRecipients, mergeNotificationSendMessagesResult, mergeNotificationUserDefaultNotificationBoxRecipientConfig, mergeNotificationUserNotificationBoxRecipientConfigs, modelStorageSlashPathFactory, modifyBeforeSetInterceptAccessorFactoryFunction, newDocuments, newNotificationBoxRecipientForUid, noContentNotificationMessageFunctionFactory, noStringFormatInStorageUploadOptionsError, noopFirestoreCollectionCache, noopFirestoreCollectionCacheDelegate, noopFirestoreCollectionDocumentCache, noopFirestoreContextCache, notificationBoxCollectionReference, notificationBoxConverter, notificationBoxFirestoreCollection, notificationBoxIdForModel, notificationBoxIdentity, notificationBoxRecipientTemplateConfigArrayEntryParamType, notificationBoxRecipientTemplateConfigArrayToRecord, notificationBoxRecipientTemplateConfigRecordToArray, notificationBoxesFlaggedForNeedsInitializationQuery, notificationBoxesFlaggedInvalidQuery, notificationCollectionReference, notificationCollectionReferenceFactory, notificationConverter, notificationDeliveryHealthCheckResultForMethod, notificationFirestoreCollectionFactory, notificationFirestoreCollectionGroup, notificationFunctionMap, notificationHealthCheckIssue, notificationHealthCheckPendingProbeMethods, notificationIdentity, notificationLoggedEventDayCollectionReference, notificationLoggedEventDayCollectionReferenceFactory, notificationLoggedEventDayConverter, notificationLoggedEventDayFirestoreCollectionFactory, notificationLoggedEventDayFirestoreCollectionGroup, notificationLoggedEventDayId, notificationLoggedEventDayIdentity, notificationLoggedEventDayPageCollectionReference, notificationLoggedEventDayPageFirestoreCollectionGroup, notificationLoggedEventDayPageIdentity, notificationLoggedEventDayPagedItemsCollectionFactory, notificationLoggedEventDayPagedItemsCollectionReferenceFactory, notificationLoggedEventDaysOlderThanQuery, notificationLoggedEventLoader, notificationMessageFunction, notificationRecipientParamsType, notificationSendExclusionCanSendFunction, notificationSendFlagsImplyIsComplete, notificationSubtaskComplete, notificationSummariesFlaggedForNeedsInitializationQuery, notificationSummaryCollectionReference, notificationSummaryConverter, notificationSummaryFirestoreCollection, notificationSummaryIdForModel, notificationSummaryIdForUidFunctionForRootFirestoreModelIdentity, notificationSummaryIdentity, notificationTaskCanRunNextCheckpoint, notificationTaskComplete, notificationTaskDelayRetry, notificationTaskFailed, notificationTaskPartiallyComplete, notificationTaskUniqueId, notificationTemplateTypeInfoRecord, notificationUserCollectionReference, notificationUserConverter, notificationUserFirestoreCollection, notificationUserHasExclusionQuery, notificationUserHealthCheckNextProbeAt, notificationUserHealthCheckNextProbeAtByMethod, notificationUserHealthCheckNextRunAt, notificationUserHealthCheckNextVerifyAt, notificationUserHealthCheckParamsType, notificationUserIdentity, notificationUsersFlaggedForNeedsSyncQuery, notificationWeekCollectionReference, notificationWeekCollectionReferenceFactory, notificationWeekConverter, notificationWeekFirestoreCollectionFactory, notificationWeekFirestoreCollectionGroup, notificationWeekIdentity, notificationsPastSendAtTimeQuery, notificationsReadyForCleanupQuery, offset, oidcClientEntriesByOwnerQuery, oidcEntriesByClientIdQuery, oidcEntriesByGrantIdQuery, oidcEntriesByUidQuery, oidcEntriesByUserCodeQuery, oidcEntriesWithTypeQuery, oidcEntryCollectionReference, oidcEntryConverter, oidcEntryFirestoreCollection, oidcEntryIdentity, oidcGrantEntriesByUidQuery, oidcModelFunctionMap, oidcProviderProfileDetails, oidcProviderProfilesForClient, oidcProviderProfilesForKeys, oidcScopeTermSatisfied, oidcScopeTermsSatisfied, oidcScopesFromScopeClaim, onCallCreateModelParams, onCallCreateModelResult, onCallCreateModelResultWithDocs, onCallDeleteModelParams, onCallDevelopmentParams, onCallInvokeModelParams, onCallQueryModelParams, onCallReadModelParams, onCallTypedModelParams, onCallTypedModelParamsFunction, onCallUpdateModelParams, optionalFirestoreArray, optionalFirestoreBoolean, optionalFirestoreDate, optionalFirestoreDateNumber, optionalFirestoreEnum, optionalFirestoreField, optionalFirestoreNotificationHealthCheck, optionalFirestoreNumber, optionalFirestorePassthroughJsonField, optionalFirestoreString, optionalFirestoreUID, optionalFirestoreUnitedStatesAddress, optionalFirestoreUnixDateTimeSecondsNumber, orderBy, orderByDocumentId, processAllQueuedStorageFilesParamsType, processStorageFileParamsType, readFirestoreModelKey, readFirestoreModelKeyFromDocumentSnapshot, readLoggingFirestoreContextCache, readLoggingFirestoreContextCacheFactory, readMultipleStorageFilesMetadataFileParamsType, readMultipleStorageFilesMetadataParamsType, readStorageFileMetadataParamsType, readUserExternalConnectionAuthorizeStateParamsType, regenerateAllFlaggedStorageFileGroupsContentParamsType, regenerateStorageFileGroupContentParamsType, replaceConstraints, requiredScopesForOidcProviderProfiles, resolveEffectiveOidcScopeTerms, resolveOidcModelScopeRequirement, resyncAllNotificationUserParamsType, targetModelParamsType as resyncNotificationUserParamsType, rollupNotificationDeliveryHealthCheckResultStatus, rollupNotificationHealthCheckResultStatus, rollupNotificationHealthCheckStatus, targetModelParamsType as rotateOidcClientSecretParamsType, scheduledFunctionDevelopmentFirebaseFunctionParamsType, scopesForOidcProviderProfiles, selectFromFirebaseModelsService, sendNotificationParamsType, sendQueuedNotificationsParamsType, separateConstraints, setIdAndKeyFromKeyIdRefOnDocumentData, setIdAndKeyFromSnapshotOnDocumentData, shouldSaveNotificationToNotificationWeek, shouldSendCreatedNotificationInput, snapshotConverterFunctions, snapshotStreamDataForAccessor, snapshotStreamForAccessor, sortNotificationItemsFunction, startAfter, startAt, startAtValue, storageFileCollectionReference, storageFileConverter, storageFileFirestoreCollection, storageFileFlaggedForSyncWithGroupsQuery, storageFileFunctionMap, storageFileGroupCollectionReference, storageFileGroupConverter, storageFileGroupCreateStorageFileKeyFactory, storageFileGroupCreatedStorageFileKey, storageFileGroupEmbeddedFile, storageFileGroupFirestoreCollection, storageFileGroupFolderPath, storageFileGroupIdForModel, storageFileGroupIdentity, storageFileGroupZipFileStoragePath, storageFileGroupZipStorageFileKey, storageFileGroupsFlaggedForContentRegenerationQuery, storageFileGroupsFlaggedForNeedsInitializationQuery, storageFileGroupsFlaggedInvalidQuery, storageFileIdentity, storageFileProcessingNotificationTaskTemplate, storageFilePurposeAndUserQuery, storageFilesQueuedForDeleteQuery, storageFilesQueuedForProcessingQuery, storageListFilesResultFactory, storageListFilesResultHasNoNextError, storagePathFactory, storedFileReaderFactory, streamDocumentSnapshotDataPairs, streamDocumentSnapshotDataPairsWithData, streamDocumentSnapshotsData, streamFromOnSnapshot, syncAllFlaggedStorageFilesWithGroupsParamsType, syncStorageFileWithGroupsParamsType, systemStateCollectionReference, systemStateConverter, systemStateFirestoreCollection, systemStateIdentity, systemStateStoredDataConverterFactory, targetModelIdParamsType, targetModelParamsType, twoWayFlatFirestoreModelKey, unreadNotificationItems, unsupportedFirestoreDriverFunctionError, untrackableNotificationHealthCheckProbe, targetModelParamsType as updateNotificationBoxParamsType, updateNotificationBoxRecipientLikeParamsType, updateNotificationBoxRecipientParamsType, updateNotificationBoxRecipientTemplateConfigRecord, updateNotificationRecipient, updateNotificationSummaryParamsType, updateNotificationUserDefaultNotificationBoxRecipientConfig, updateNotificationUserDefaultNotificationBoxRecipientConfigParamsType, updateNotificationUserNotificationBoxRecipientConfigIfChanged, updateNotificationUserNotificationBoxRecipientConfigs, updateNotificationUserNotificationBoxRecipientParamsType, updateNotificationUserNotificationSendExclusions, updateNotificationUserParamsType, updateOidcClientFieldParamsType, updateOidcClientParamsType, updateStorageFileGroupEntryParamsType, updateStorageFileGroupParamsType, updateStorageFileParamsType, updateWithAccessorUpdateAndConverterFunction, uploadFileWithStream, useContextAuth, useContextAuthUid, useDocumentSnapshot, useDocumentSnapshotData, useFirebaseModelsService, userExternalConnectionAccessorFactory, userExternalConnectionCollectionReference, userExternalConnectionConnectedProviderTypes, userExternalConnectionConverter, userExternalConnectionEntryFields, userExternalConnectionEntryForOutcome, userExternalConnectionEntryForProvider, userExternalConnectionEntryIsConnected, userExternalConnectionEntryIsExpired, userExternalConnectionFirestoreCollection, userExternalConnectionFunctionMap, userExternalConnectionIdentity, userExternalConnectionIsConnectedToProvider, userExternalConnectionsWithConnectedProviderQuery, userUploadsFolderSlashPathFactory, userUploadsFolderStoragePathFactory, where, whereDateIsAfter, whereDateIsAfterWithSort, whereDateIsBefore, whereDateIsBeforeWithSort, whereDateIsBetween, whereDateIsInRange, whereDateIsOnOrAfter, whereDateIsOnOrAfterWithSort, whereDateIsOnOrBefore, whereDateIsOnOrBeforeWithSort, whereDocumentId, whereStringHasRootIdentityModelKey, whereStringValueHasPrefix };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/firebase",
3
- "version": "13.36.0",
3
+ "version": "13.38.0",
4
4
  "sideEffects": false,
5
5
  "exports": {
6
6
  "./test": {
@@ -24,10 +24,10 @@
24
24
  }
25
25
  },
26
26
  "peerDependencies": {
27
- "@dereekb/date": "13.36.0",
28
- "@dereekb/model": "13.36.0",
29
- "@dereekb/rxjs": "13.36.0",
30
- "@dereekb/util": "13.36.0",
27
+ "@dereekb/date": "13.38.0",
28
+ "@dereekb/model": "13.38.0",
29
+ "@dereekb/rxjs": "13.38.0",
30
+ "@dereekb/util": "13.38.0",
31
31
  "@firebase/rules-unit-testing": "5.0.0",
32
32
  "@marcbachmann/cel-js": "^7.6.1",
33
33
  "@typescript-eslint/parser": "8.59.3",
@@ -126,6 +126,32 @@ export type ServiceTokenOidcScope = typeof SERVICE_TOKEN_OIDC_SCOPE;
126
126
  * restricted to privileged users.
127
127
  */
128
128
  export declare const SERVICE_TOKEN_OIDC_SCOPE_DETAILS: LabeledValueWithDescription<ServiceTokenOidcScope>;
129
+ /**
130
+ * Custom OIDC scope that requests a short-lived direct-Firestore session — a Firebase Auth custom
131
+ * token plus an App Check attestation minted by the server on the caller's behalf.
132
+ *
133
+ * Lets a headless client (a `@dereekb/dbx-cli`-based CLI) connect to Firestore as the authenticated
134
+ * user and read through the SAME security rules the browser app is subject to, without distributing
135
+ * service-account credentials. It is the direct-connection counterpart to the `model.*` scopes, which
136
+ * only reach data over the model HTTP API.
137
+ *
138
+ * This scope is privileged: the minted App Check token attests as the app's registered web app, so
139
+ * provider-side wiring is expected to hard-reject the request for non-admin users (via
140
+ * {@link OidcProviderConfig.adminOnlyScopes}). The generic `@dereekb/firebase-server` package stays
141
+ * app-agnostic — the scope is only activated when an app lists it in that config array and supplies
142
+ * the session endpoint's admin predicate.
143
+ *
144
+ * Scope-gating alone is NOT a sufficient gate: `oidcScopesFromScopeClaim` returns `undefined` for a
145
+ * non-OIDC caller (a plain Firebase ID token) and every enforcement site treats `undefined` as
146
+ * "skip". The endpoint's admin predicate is the load-bearing check; this scope is defence in depth.
147
+ */
148
+ export declare const FIRESTORE_SESSION_OIDC_SCOPE: "session.firestore";
149
+ export type FirestoreSessionOidcScope = typeof FIRESTORE_SESSION_OIDC_SCOPE;
150
+ /**
151
+ * Pre-built scope picker entry for {@link FIRESTORE_SESSION_OIDC_SCOPE}. Labeled as an admin-only
152
+ * scope so consent screens and admin pickers signal that it is restricted to privileged users.
153
+ */
154
+ export declare const FIRESTORE_SESSION_OIDC_SCOPE_DETAILS: LabeledValueWithDescription<FirestoreSessionOidcScope>;
129
155
  /**
130
156
  * A single requirement TERM in the callModel OIDC scope model.
131
157
  *