@dereekb/firebase 10.0.9 → 10.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +55 -24
- package/index.esm.js +67 -29
- package/package.json +1 -1
- package/src/lib/common/firestore/snapshot/snapshot.field.d.ts +61 -10
- package/test/CHANGELOG.md +8 -0
- package/test/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -3664,11 +3664,38 @@ const FIRESTORE_PASSTHROUGH_FIELD = firestoreField({
|
|
|
3664
3664
|
function firestorePassThroughField() {
|
|
3665
3665
|
return FIRESTORE_PASSTHROUGH_FIELD;
|
|
3666
3666
|
}
|
|
3667
|
+
function optionalFirestoreField(config) {
|
|
3668
|
+
if (config) {
|
|
3669
|
+
const {
|
|
3670
|
+
dontStoreDefaultReturnValue,
|
|
3671
|
+
defaultReadValue: defaultValue,
|
|
3672
|
+
dontStoreIfValue = dontStoreDefaultReturnValue && defaultValue != null ? defaultValue : undefined,
|
|
3673
|
+
transformData: inputTransformData,
|
|
3674
|
+
transformFromData,
|
|
3675
|
+
transformToData
|
|
3676
|
+
} = config !== null && config !== void 0 ? config : {};
|
|
3677
|
+
const transformData = inputTransformData !== null && inputTransformData !== void 0 ? inputTransformData : util.passThrough;
|
|
3678
|
+
const transformFrom = transformFromData !== null && transformFromData !== void 0 ? transformFromData : transformData;
|
|
3679
|
+
const transformTo = transformToData !== null && transformToData !== void 0 ? transformToData : transformData;
|
|
3680
|
+
return firestoreField({
|
|
3681
|
+
default: null,
|
|
3682
|
+
fromData: defaultValue != null ? x => transformFrom(x == null ? defaultValue : x) : transformFrom != null ? x => x != null ? transformFrom(x) : x : util.passThrough,
|
|
3683
|
+
toData: dontStoreIfValue != null ? x => {
|
|
3684
|
+
if (x != null) {
|
|
3685
|
+
const transformedValue = transformTo(x);
|
|
3686
|
+
return transformedValue === dontStoreIfValue ? null : transformedValue;
|
|
3687
|
+
} else {
|
|
3688
|
+
return x;
|
|
3689
|
+
}
|
|
3690
|
+
} : util.passThrough
|
|
3691
|
+
});
|
|
3692
|
+
} else {
|
|
3693
|
+
return FIRESTORE_PASSTHROUGH_FIELD;
|
|
3694
|
+
}
|
|
3695
|
+
}
|
|
3667
3696
|
const DEFAULT_FIRESTORE_STRING_FIELD_VALUE = '';
|
|
3668
3697
|
function firestoreString(config) {
|
|
3669
|
-
const transform = (config === null || config === void 0 ? void 0 : config.transform)
|
|
3670
|
-
transform: config === null || config === void 0 ? void 0 : config.transform
|
|
3671
|
-
} : config === null || config === void 0 ? void 0 : config.transform : undefined;
|
|
3698
|
+
const transform = util.transformStringFunctionConfig(config === null || config === void 0 ? void 0 : config.transform);
|
|
3672
3699
|
const transformData = transform ? util.transformStringFunction(transform) : util.passThrough;
|
|
3673
3700
|
return firestoreField(Object.assign(Object.assign({
|
|
3674
3701
|
default: DEFAULT_FIRESTORE_STRING_FIELD_VALUE
|
|
@@ -3678,16 +3705,10 @@ function firestoreString(config) {
|
|
|
3678
3705
|
}));
|
|
3679
3706
|
}
|
|
3680
3707
|
function optionalFirestoreString(config) {
|
|
3681
|
-
const transform = (config === null || config === void 0 ? void 0 : config.transform)
|
|
3682
|
-
transform: config === null || config === void 0 ? void 0 : config.transform
|
|
3683
|
-
} : config === null || config === void 0 ? void 0 : config.transform : undefined;
|
|
3708
|
+
const transform = util.transformStringFunctionConfig(config === null || config === void 0 ? void 0 : config.transform);
|
|
3684
3709
|
const transformData = transform ? util.transformStringFunction(transform) : util.passThrough;
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
default: null
|
|
3688
|
-
}, config), {
|
|
3689
|
-
fromData: transformMaybeData,
|
|
3690
|
-
toData: transformMaybeData
|
|
3710
|
+
return optionalFirestoreField(Object.assign(Object.assign({}, config), {
|
|
3711
|
+
transformData
|
|
3691
3712
|
}));
|
|
3692
3713
|
}
|
|
3693
3714
|
function firestoreEnum(config) {
|
|
@@ -3696,8 +3717,8 @@ function firestoreEnum(config) {
|
|
|
3696
3717
|
toData: util.passThrough
|
|
3697
3718
|
}));
|
|
3698
3719
|
}
|
|
3699
|
-
function optionalFirestoreEnum() {
|
|
3700
|
-
return
|
|
3720
|
+
function optionalFirestoreEnum(config) {
|
|
3721
|
+
return optionalFirestoreField(config);
|
|
3701
3722
|
}
|
|
3702
3723
|
function firestoreUID() {
|
|
3703
3724
|
return firestoreString({
|
|
@@ -3736,8 +3757,8 @@ function firestoreBoolean(config) {
|
|
|
3736
3757
|
toData: util.passThrough
|
|
3737
3758
|
});
|
|
3738
3759
|
}
|
|
3739
|
-
function optionalFirestoreBoolean() {
|
|
3740
|
-
return
|
|
3760
|
+
function optionalFirestoreBoolean(config) {
|
|
3761
|
+
return optionalFirestoreField(config);
|
|
3741
3762
|
}
|
|
3742
3763
|
function firestoreNumber(config) {
|
|
3743
3764
|
var _a;
|
|
@@ -3756,12 +3777,8 @@ function optionalFirestoreNumber(config) {
|
|
|
3756
3777
|
transform: config === null || config === void 0 ? void 0 : config.transform
|
|
3757
3778
|
} : config === null || config === void 0 ? void 0 : config.transform : undefined;
|
|
3758
3779
|
const transformData = transform ? util.transformNumberFunction(transform) : util.passThrough;
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
default: null
|
|
3762
|
-
}, config), {
|
|
3763
|
-
fromData: transformMaybeData,
|
|
3764
|
-
toData: transformMaybeData
|
|
3780
|
+
return optionalFirestoreField(Object.assign(Object.assign({}, config), {
|
|
3781
|
+
transformData
|
|
3765
3782
|
}));
|
|
3766
3783
|
}
|
|
3767
3784
|
function firestoreArray(config) {
|
|
@@ -6825,11 +6842,24 @@ function modelFirebaseFunctionMapFactory(configMap, crudConfigMap) {
|
|
|
6825
6842
|
excluded: specifiedCrudFunctionKeys
|
|
6826
6843
|
} = util.separateValues(config, x => x.indexOf(':') === -1);
|
|
6827
6844
|
const crudFunctions = new Set(crudFunctionKeys);
|
|
6828
|
-
const
|
|
6845
|
+
const specifiedCrudFunctionTuples = specifiedCrudFunctionKeys.map(x => {
|
|
6829
6846
|
const [crud, functionsSplit] = x.split(':', 2);
|
|
6830
6847
|
const functions = functionsSplit.split(MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_SPLITTER);
|
|
6831
6848
|
return [crud, functions];
|
|
6832
|
-
})
|
|
6849
|
+
});
|
|
6850
|
+
// check that there isn't a repeat crud key configured, which disallowed configuration and would cause some functions to be ignored
|
|
6851
|
+
const encounteredCruds = new Set();
|
|
6852
|
+
function assertCrudKeyNotEncountered(crud) {
|
|
6853
|
+
if (encounteredCruds.has(crud)) {
|
|
6854
|
+
throw new Error(`Cannot have multiple declarations of the same crud. Found repeat for crud: ${crud}`);
|
|
6855
|
+
} else {
|
|
6856
|
+
encounteredCruds.add(crud);
|
|
6857
|
+
}
|
|
6858
|
+
}
|
|
6859
|
+
crudFunctions.forEach(assertCrudKeyNotEncountered);
|
|
6860
|
+
specifiedCrudFunctionTuples.forEach(([crud]) => assertCrudKeyNotEncountered(crud));
|
|
6861
|
+
// build and add the functions
|
|
6862
|
+
const specifierFunctions = new Map(specifiedCrudFunctionTuples);
|
|
6833
6863
|
function addFunctions(crud, fn, modelType) {
|
|
6834
6864
|
let crudFns;
|
|
6835
6865
|
if (crudFunctions.has(crud)) {
|
|
@@ -8070,6 +8100,7 @@ exports.optionalFirestoreArray = optionalFirestoreArray;
|
|
|
8070
8100
|
exports.optionalFirestoreBoolean = optionalFirestoreBoolean;
|
|
8071
8101
|
exports.optionalFirestoreDate = optionalFirestoreDate;
|
|
8072
8102
|
exports.optionalFirestoreEnum = optionalFirestoreEnum;
|
|
8103
|
+
exports.optionalFirestoreField = optionalFirestoreField;
|
|
8073
8104
|
exports.optionalFirestoreNumber = optionalFirestoreNumber;
|
|
8074
8105
|
exports.optionalFirestoreString = optionalFirestoreString;
|
|
8075
8106
|
exports.optionalFirestoreUID = optionalFirestoreUID;
|
package/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { increment, onSnapshot, getDoc, deleteDoc, setDoc, updateDoc, doc, collectionGroup, collection, runTransaction, writeBatch, limit as limit$1, limitToLast as limitToLast$1, orderBy as orderBy$1, documentId, where as where$1, startAt as startAt$1, startAfter as startAfter$1, endAt as endAt$1, endBefore as endBefore$1, getDocs, query } from 'firebase/firestore';
|
|
2
|
-
import { cachedGetter, mergeModifiers, asArray, filterUndefinedValues, objectHasNoKeys, filterFalsyAndEmptyValues, build, wrapUseAsyncFunction, makeWithFactory, performMakeLoop, runAsyncTasksForValues, filterMaybeValues, useAsync, toModelFieldConversions, makeModelMapFunctions, modifyModelMapFunctions, assignValuesToPOJOFunction, KeyValueTypleValueFilter, asObjectCopyFactory, passThrough, transformStringFunction, transformNumberFunction, sortValuesFunctionOrMapIdentityWithSortRef, filterUniqueFunction, unique, filterUniqueTransform, filterFromPOJOFunction, mapObjectMapFunction, copyObject, mapObjectMap, filterEmptyValues, modelFieldMapFunctions, toModelMapFunctions, latLngStringFunction, DEFAULT_LAT_LNG_STRING_VALUE, sortAscendingIndexNumberRefFunction, bitwiseSetDencoder, convertToArray, pushItemOrArrayItemsIntoArray, separateValues, UTF_8_START_CHARACTER, UTF_PRIVATE_USAGE_AREA_START, mergeArraysIntoArray, lastValue, flattenArrayOrValueArray, performAsyncTasks, batch, asGetter, groupValues, forEachInIterable, arrayToObject, takeFront, isOddNumber, objectToMap, ServerErrorResponse, toReadableError, capitalizeFirstLetter, lowercaseFirstLetter, toRelativeSlashPathStartType, mappedUseFunction, iterableToArray, getValueFromGetter, setContainsAllValues, usePromise, slashPathFactory, errorMessageContainsString } from '@dereekb/util';
|
|
2
|
+
import { cachedGetter, mergeModifiers, asArray, filterUndefinedValues, objectHasNoKeys, filterFalsyAndEmptyValues, build, wrapUseAsyncFunction, makeWithFactory, performMakeLoop, runAsyncTasksForValues, filterMaybeValues, useAsync, toModelFieldConversions, makeModelMapFunctions, modifyModelMapFunctions, assignValuesToPOJOFunction, KeyValueTypleValueFilter, asObjectCopyFactory, passThrough, transformStringFunctionConfig, transformStringFunction, transformNumberFunction, sortValuesFunctionOrMapIdentityWithSortRef, filterUniqueFunction, unique, filterUniqueTransform, filterFromPOJOFunction, mapObjectMapFunction, copyObject, mapObjectMap, filterEmptyValues, modelFieldMapFunctions, toModelMapFunctions, latLngStringFunction, DEFAULT_LAT_LNG_STRING_VALUE, sortAscendingIndexNumberRefFunction, bitwiseSetDencoder, convertToArray, pushItemOrArrayItemsIntoArray, separateValues, UTF_8_START_CHARACTER, UTF_PRIVATE_USAGE_AREA_START, mergeArraysIntoArray, lastValue, flattenArrayOrValueArray, performAsyncTasks, batch, asGetter, groupValues, forEachInIterable, arrayToObject, takeFront, isOddNumber, objectToMap, ServerErrorResponse, toReadableError, capitalizeFirstLetter, lowercaseFirstLetter, toRelativeSlashPathStartType, mappedUseFunction, iterableToArray, getValueFromGetter, setContainsAllValues, usePromise, slashPathFactory, errorMessageContainsString } from '@dereekb/util';
|
|
3
3
|
import { filterMaybe, lazyFrom, itemAccumulator, ItemPageIterator, MappedPageItemIterationInstance } from '@dereekb/rxjs';
|
|
4
4
|
import { from, map, combineLatest, shareReplay, of, exhaustMap, Observable, switchMap, timer, skip } from 'rxjs';
|
|
5
5
|
import { UNKNOWN_WEBSITE_LINK_TYPE, decodeWebsiteLinkEncodedDataToWebsiteFileLink, encodeWebsiteFileLinkToWebsiteLinkEncodedData, AbstractModelPermissionService, grantedRoleMapReader, noAccessRoleMap, fullAccessRoleMap } from '@dereekb/model';
|
|
@@ -3838,14 +3838,38 @@ const FIRESTORE_PASSTHROUGH_FIELD = firestoreField({
|
|
|
3838
3838
|
function firestorePassThroughField() {
|
|
3839
3839
|
return FIRESTORE_PASSTHROUGH_FIELD;
|
|
3840
3840
|
}
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3841
|
+
function optionalFirestoreField(config) {
|
|
3842
|
+
if (config) {
|
|
3843
|
+
const {
|
|
3844
|
+
dontStoreDefaultReturnValue,
|
|
3845
|
+
defaultReadValue: defaultValue,
|
|
3846
|
+
dontStoreIfValue = dontStoreDefaultReturnValue && defaultValue != null ? defaultValue : undefined,
|
|
3847
|
+
transformData: inputTransformData,
|
|
3848
|
+
transformFromData,
|
|
3849
|
+
transformToData
|
|
3850
|
+
} = config != null ? config : {};
|
|
3851
|
+
const transformData = inputTransformData != null ? inputTransformData : passThrough;
|
|
3852
|
+
const transformFrom = transformFromData != null ? transformFromData : transformData;
|
|
3853
|
+
const transformTo = transformToData != null ? transformToData : transformData;
|
|
3854
|
+
return firestoreField({
|
|
3855
|
+
default: null,
|
|
3856
|
+
fromData: defaultValue != null ? x => transformFrom(x == null ? defaultValue : x) : transformFrom != null ? x => x != null ? transformFrom(x) : x : passThrough,
|
|
3857
|
+
toData: dontStoreIfValue != null ? x => {
|
|
3858
|
+
if (x != null) {
|
|
3859
|
+
const transformedValue = transformTo(x);
|
|
3860
|
+
return transformedValue === dontStoreIfValue ? null : transformedValue;
|
|
3861
|
+
} else {
|
|
3862
|
+
return x;
|
|
3863
|
+
}
|
|
3864
|
+
} : passThrough
|
|
3865
|
+
});
|
|
3866
|
+
} else {
|
|
3867
|
+
return FIRESTORE_PASSTHROUGH_FIELD;
|
|
3868
|
+
}
|
|
3869
|
+
}
|
|
3844
3870
|
const DEFAULT_FIRESTORE_STRING_FIELD_VALUE = '';
|
|
3845
3871
|
function firestoreString(config) {
|
|
3846
|
-
const transform = config
|
|
3847
|
-
transform: config == null ? void 0 : config.transform
|
|
3848
|
-
} : config == null ? void 0 : config.transform : undefined;
|
|
3872
|
+
const transform = transformStringFunctionConfig(config == null ? void 0 : config.transform);
|
|
3849
3873
|
const transformData = transform ? transformStringFunction(transform) : passThrough;
|
|
3850
3874
|
return firestoreField(Object.assign({
|
|
3851
3875
|
default: DEFAULT_FIRESTORE_STRING_FIELD_VALUE
|
|
@@ -3855,16 +3879,10 @@ function firestoreString(config) {
|
|
|
3855
3879
|
}));
|
|
3856
3880
|
}
|
|
3857
3881
|
function optionalFirestoreString(config) {
|
|
3858
|
-
const transform = config
|
|
3859
|
-
transform: config == null ? void 0 : config.transform
|
|
3860
|
-
} : config == null ? void 0 : config.transform : undefined;
|
|
3882
|
+
const transform = transformStringFunctionConfig(config == null ? void 0 : config.transform);
|
|
3861
3883
|
const transformData = transform ? transformStringFunction(transform) : passThrough;
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
default: null
|
|
3865
|
-
}, config, {
|
|
3866
|
-
fromData: transformMaybeData,
|
|
3867
|
-
toData: transformMaybeData
|
|
3884
|
+
return optionalFirestoreField(Object.assign({}, config, {
|
|
3885
|
+
transformData
|
|
3868
3886
|
}));
|
|
3869
3887
|
}
|
|
3870
3888
|
function firestoreEnum(config) {
|
|
@@ -3873,8 +3891,8 @@ function firestoreEnum(config) {
|
|
|
3873
3891
|
toData: passThrough
|
|
3874
3892
|
}));
|
|
3875
3893
|
}
|
|
3876
|
-
function optionalFirestoreEnum() {
|
|
3877
|
-
return
|
|
3894
|
+
function optionalFirestoreEnum(config) {
|
|
3895
|
+
return optionalFirestoreField(config);
|
|
3878
3896
|
}
|
|
3879
3897
|
function firestoreUID() {
|
|
3880
3898
|
return firestoreString({
|
|
@@ -3913,8 +3931,8 @@ function firestoreBoolean(config) {
|
|
|
3913
3931
|
toData: passThrough
|
|
3914
3932
|
});
|
|
3915
3933
|
}
|
|
3916
|
-
function optionalFirestoreBoolean() {
|
|
3917
|
-
return
|
|
3934
|
+
function optionalFirestoreBoolean(config) {
|
|
3935
|
+
return optionalFirestoreField(config);
|
|
3918
3936
|
}
|
|
3919
3937
|
function firestoreNumber(config) {
|
|
3920
3938
|
var _config$defaultBefore3;
|
|
@@ -3933,12 +3951,8 @@ function optionalFirestoreNumber(config) {
|
|
|
3933
3951
|
transform: config == null ? void 0 : config.transform
|
|
3934
3952
|
} : config == null ? void 0 : config.transform : undefined;
|
|
3935
3953
|
const transformData = transform ? transformNumberFunction(transform) : passThrough;
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
default: null
|
|
3939
|
-
}, config, {
|
|
3940
|
-
fromData: transformMaybeData,
|
|
3941
|
-
toData: transformMaybeData
|
|
3954
|
+
return optionalFirestoreField(Object.assign({}, config, {
|
|
3955
|
+
transformData
|
|
3942
3956
|
}));
|
|
3943
3957
|
}
|
|
3944
3958
|
function firestoreArray(config) {
|
|
@@ -4503,6 +4517,15 @@ function firestoreBitwiseObjectMap(config) {
|
|
|
4503
4517
|
}));
|
|
4504
4518
|
}
|
|
4505
4519
|
|
|
4520
|
+
// MARK: Compat
|
|
4521
|
+
/**
|
|
4522
|
+
* @deprecated use TransformStringFunctionConfigInput instead.
|
|
4523
|
+
*/
|
|
4524
|
+
|
|
4525
|
+
/**
|
|
4526
|
+
* @deprecated use TransformNumberFunctionConfigInput instead.
|
|
4527
|
+
*/
|
|
4528
|
+
|
|
4506
4529
|
function unsupportedFirestoreDriverFunctionError(message) {
|
|
4507
4530
|
throw new Error(message != null ? message : 'This function is not supported by this Firestore driver.');
|
|
4508
4531
|
}
|
|
@@ -7542,11 +7565,26 @@ function modelFirebaseFunctionMapFactory(configMap, crudConfigMap) {
|
|
|
7542
7565
|
excluded: specifiedCrudFunctionKeys
|
|
7543
7566
|
} = separateValues(config, x => x.indexOf(':') === -1);
|
|
7544
7567
|
const crudFunctions = new Set(crudFunctionKeys);
|
|
7545
|
-
const
|
|
7568
|
+
const specifiedCrudFunctionTuples = specifiedCrudFunctionKeys.map(x => {
|
|
7546
7569
|
const [crud, functionsSplit] = x.split(':', 2);
|
|
7547
7570
|
const functions = functionsSplit.split(MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_SPLITTER);
|
|
7548
7571
|
return [crud, functions];
|
|
7549
|
-
})
|
|
7572
|
+
});
|
|
7573
|
+
|
|
7574
|
+
// check that there isn't a repeat crud key configured, which disallowed configuration and would cause some functions to be ignored
|
|
7575
|
+
const encounteredCruds = new Set();
|
|
7576
|
+
function assertCrudKeyNotEncountered(crud) {
|
|
7577
|
+
if (encounteredCruds.has(crud)) {
|
|
7578
|
+
throw new Error(`Cannot have multiple declarations of the same crud. Found repeat for crud: ${crud}`);
|
|
7579
|
+
} else {
|
|
7580
|
+
encounteredCruds.add(crud);
|
|
7581
|
+
}
|
|
7582
|
+
}
|
|
7583
|
+
crudFunctions.forEach(assertCrudKeyNotEncountered);
|
|
7584
|
+
specifiedCrudFunctionTuples.forEach(([crud]) => assertCrudKeyNotEncountered(crud));
|
|
7585
|
+
|
|
7586
|
+
// build and add the functions
|
|
7587
|
+
const specifierFunctions = new Map(specifiedCrudFunctionTuples);
|
|
7550
7588
|
function addFunctions(crud, fn, modelType) {
|
|
7551
7589
|
let crudFns;
|
|
7552
7590
|
if (crudFunctions.has(crud)) {
|
|
@@ -8764,4 +8802,4 @@ function systemStateFirestoreCollection(firestoreContext, converters) {
|
|
|
8764
8802
|
});
|
|
8765
8803
|
}
|
|
8766
8804
|
|
|
8767
|
-
export { AbstractFirestoreDocument, AbstractFirestoreDocumentDataAccessorWrapper, AbstractFirestoreDocumentWithParent, BASE_MODEL_STORAGE_FILE_PATH, COPY_USER_RELATED_DATA_ACCESSOR_FACTORY_FUNCTION, CREATE_MODEL_APP_FUNCTION_KEY, ContextGrantedModelRolesReaderInstance, DEFAULT_DATE_CELL_RANGE_VALUE, DEFAULT_FIRESTORE_DATE_CELL_SCHEDULE_VALUE, DEFAULT_FIRESTORE_ITEM_PAGE_ITERATOR_ITEMS_PER_PAGE, DEFAULT_FIRESTORE_STRING_FIELD_VALUE, DEFAULT_FIRESTORE_UNITED_STATES_ADDRESS_VALUE, DEFAULT_FIRESTORE_WEBSITE_FILE_LINK_VALUE, DEFAULT_ITERATE_FIRESTORE_DOCUMENT_SNAPSHOT_BATCHES_BATCH_SIZE, DEFAULT_QUERY_CHANGE_WATCHER_DELAY, DEFAULT_SINGLE_ITEM_FIRESTORE_COLLECTION_DOCUMENT_IDENTIFIER, DEFAULT_WEBSITE_LINK, DELETE_MODEL_APP_FUNCTION_KEY, FIREBASE_AUTH_NETWORK_REQUEST_ERROR, FIREBASE_AUTH_NETWORK_REQUEST_FAILED, FIREBASE_AUTH_PASSWORD_MAX_LENGTH, FIREBASE_AUTH_PASSWORD_MIN_LENGTH, FIREBASE_AUTH_USER_NOT_FOUND_ERROR, FIREBASE_AUTH_WRONG_PASSWORD, FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY, FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY, FIREBASE_SERVER_AUTH_CLAIMS_RESET_PASSWORD_KEY, FIREBASE_SERVER_AUTH_CLAIMS_SETUP_LAST_COM_DATE_KEY, FIREBASE_SERVER_AUTH_CLAIMS_SETUP_PASSWORD_KEY, FIRESTORE_CLIENT_QUERY_CONSTRAINT_HANDLER_MAPPING, FIRESTORE_COLLECTION_NAME_SEPARATOR, FIRESTORE_DUMMY_MODEL_KEY, FIRESTORE_EMPTY_VALUE, FIRESTORE_END_AT_QUERY_CONSTRAINT_TYPE, FIRESTORE_END_AT_VALUE_QUERY_CONSTRAINT_TYPE, FIRESTORE_END_BEFORE_QUERY_CONSTRAINT_TYPE, FIRESTORE_ITEM_PAGE_ITERATOR, FIRESTORE_ITEM_PAGE_ITERATOR_DELEGATE, FIRESTORE_LIMIT_QUERY_CONSTRAINT_TYPE, FIRESTORE_LIMIT_TO_LAST_QUERY_CONSTRAINT_TYPE, FIRESTORE_MAX_WHERE_IN_FILTER_ARGS_COUNT, FIRESTORE_MODEL_ID_REGEX, FIRESTORE_MODEL_KEY_REGEX, FIRESTORE_MODEL_KEY_REGEX_STRICT, FIRESTORE_OFFSET_QUERY_CONSTRAINT_TYPE, FIRESTORE_ORDER_BY_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, FIRESTORE_ORDER_BY_QUERY_CONSTRAINT_TYPE, FIRESTORE_PASSTHROUGH_FIELD, FIRESTORE_START_AFTER_QUERY_CONSTRAINT_TYPE, FIRESTORE_START_AT_QUERY_CONSTRAINT_TYPE, FIRESTORE_START_AT_VALUE_QUERY_CONSTRAINT_TYPE, FIRESTORE_WHERE_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, FIRESTORE_WHERE_QUERY_CONSTRAINT_TYPE, FirebaseDevelopmentFunctions, FirebaseModelPermissionServiceInstance, FirebaseServerError, FirestoreAccessorStreamMode, FirestoreDocumentContextType, FirestoreItemPageIterationInstance, InferredTargetModelIdParams, InferredTargetModelParams, IsFirestoreModelId, IsFirestoreModelKey, MAX_FIRESTORE_MAP_ZOOM_LEVEL_VALUE, MIN_FIRESTORE_MAP_ZOOM_LEVEL_VALUE, MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_DEFAULT, MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_SPLITTER, MODEL_STORAGE_FILE_SLASH_PATH_FACTORY, ModifyBeforeSetFirestoreDocumentDataAccessorWrapper, READ_MODEL_APP_FUNCTION_KEY, RUN_DEV_FUNCTION_APP_FUNCTION_KEY, SCHEDULED_FUNCTION_DEV_FUNCTION_SPECIFIER, ScheduledFunctionDevelopmentFirebaseFunctionListEntry, ScheduledFunctionDevelopmentFirebaseFunctionParams, ScheduledFunctionDevelopmentFunctionTypeEnum, SystemStateDocument, SystemStateFirestoreCollections, TargetModelIdParams, TargetModelParams, UPDATE_MODEL_APP_FUNCTION_KEY, addConstraintToBuilder, addOrReplaceLimitInConstraints, allChildDocumentsUnderParent, allChildDocumentsUnderParentPath, allChildDocumentsUnderRelativePath, asTopLevelFieldPath, asTopLevelFieldPaths, assertFirestoreUpdateHasData, assertStorageUploadOptionsStringFormat, assignDateCellRangeFunction, assignDateCellScheduleFunction, assignUnitedStatesAddressFunction, assignWebsiteFileLinkFunction, assignWebsiteLinkFunction, buildFirebaseCollectionTypeModelTypeMap, childFirestoreModelKey, childFirestoreModelKeyPath, childFirestoreModelKeys, clientFirebaseFirestoreContextFactory, clientFirebaseStorageContextFactory, contextGrantedModelRolesReader, contextGrantedModelRolesReaderDoesNotExistErrorMessage, contextGrantedModelRolesReaderPermissionErrorMessage, convertHttpsCallableErrorToReadableError, copyDocumentIdForUserRelatedModifierFunction, copyDocumentIdToFieldModifierFunction, copyUserRelatedDataAccessorFactoryFunction, copyUserRelatedDataModifierConfig, dataFromDocumentSnapshots, dataFromSnapshotStream, developmentFirebaseFunctionMapFactory, directDataHttpsCallable, documentData, documentDataFunction, documentDataWithIdAndKey, documentReferenceFromDocument, documentReferencesFromDocuments, documentReferencesFromSnapshot, endAt, endAtValue, endBefore, extendFirestoreCollectionWithSingleDocumentAccessor, filterConstraintsOfType, filterDisallowedFirestoreItemPageIteratorInputContraints, firebaseAuthErrorToReadableError, firebaseFirestoreClientDrivers, firebaseFirestoreQueryConstraintFunctionsDriver, firebaseFirestoreQueryDriver, firebaseFunctionMapFactory, firebaseModelLoader, firebaseModelPermissionService, firebaseModelService, firebaseModelServiceFactory, firebaseModelsService, firebaseQueryItemAccumulator, firebaseQuerySnapshotAccumulator, firebaseStorageBucketFolderPath, firebaseStorageClientAccessorDriver, firebaseStorageClientAccessorFile, firebaseStorageClientAccessorFolder, firebaseStorageClientDrivers, firebaseStorageClientListFilesResultFactory, firebaseStorageContextFactory, firebaseStorageFileExists, firebaseStorageFilePathFromStorageFilePath, firebaseStorageRefForStorageFilePath, firestoreArray, firestoreArrayMap, firestoreBitwiseObjectMap, firestoreBitwiseSet, firestoreBitwiseSetMap, firestoreBoolean, firestoreClientAccessorDriver, firestoreClientIncrementUpdateToUpdateData, firestoreContextFactory, firestoreDate, firestoreDateCellRange, firestoreDateCellRangeArray, firestoreDateCellRangeAssignFn, firestoreDateCellSchedule, firestoreDateCellScheduleAssignFn, firestoreDencoderArray, firestoreDencoderMap, firestoreDencoderStringArray, firestoreDocumentAccessorContextExtension, firestoreDocumentAccessorFactory, firestoreDocumentLoader, firestoreDummyKey, firestoreEncodedArray, firestoreEncodedObjectMap, firestoreEnum, firestoreEnumArray, firestoreField, firestoreFieldConfigToModelMapFunctionsRef, firestoreIdBatchVerifierFactory, firestoreIdentityTypeArray, firestoreIdentityTypeArrayName, firestoreItemPageIteration, firestoreItemPageIterationFactory, firestoreLatLngString, firestoreMap, firestoreMapZoomLevel, firestoreModelId, firestoreModelIdArrayField, firestoreModelIdFromDocument, firestoreModelIdGrantedRoleArrayMap, firestoreModelIdGrantedRoleMap, firestoreModelIdString, firestoreModelIdentity, firestoreModelIdentityTypeMap, firestoreModelIdsFromDocuments, firestoreModelIdsFromKey, firestoreModelKey, firestoreModelKeyArrayField, firestoreModelKeyCollectionName, firestoreModelKeyCollectionType, firestoreModelKeyCollectionTypeArray, firestoreModelKeyCollectionTypeArrayName, firestoreModelKeyCollectionTypePair, firestoreModelKeyEncodedGrantedRoleMap, firestoreModelKeyFromDocument, firestoreModelKeyGrantedRoleArrayMap, firestoreModelKeyGrantedRoleMap, firestoreModelKeyPairObject, firestoreModelKeyParentKey, firestoreModelKeyParentKeyPartPairs, firestoreModelKeyPart, firestoreModelKeyPartPairs, firestoreModelKeyPartPairsKeyPath, firestoreModelKeyPartPairsPaths, firestoreModelKeyPath, firestoreModelKeyString, firestoreModelKeyTypePair, firestoreModelKeys, firestoreModelKeysFromDocuments, firestoreModelType, firestoreNumber, firestoreObjectArray, firestorePassThroughField, firestoreQueryConstraint, firestoreQueryConstraintFactory, firestoreQueryFactory, firestoreSingleDocumentAccessor, firestoreString, firestoreSubObject, firestoreTimezoneString, firestoreUID, firestoreUniqueArray, firestoreUniqueKeyedArray, firestoreUniqueStringArray, firestoreUnitedStatesAddress, firestoreUnitedStatesAddressAssignFn, firestoreUpdateWithNoDataError, firestoreWebsiteFileLink, firestoreWebsiteFileLinkAssignFn, firestoreWebsiteFileLinkEncodedArray, firestoreWebsiteFileLinkObjectArray, firestoreWebsiteLink, firestoreWebsiteLinkArray, firestoreWebsiteLinkAssignFn, flatFirestoreModelKey, getDataFromDocumentSnapshots, getDocumentSnapshotData, getDocumentSnapshotDataPair, getDocumentSnapshotDataPairs, getDocumentSnapshotDataTuples, getDocumentSnapshotPair, getDocumentSnapshotPairs, getDocumentSnapshots, getDocumentSnapshotsData, grantFullAccessIfAdmin, grantFullAccessIfAuthUserRelated, grantModelRolesIfAdmin, grantModelRolesIfAdminFunction, grantModelRolesIfAuthUserRelatedModelFunction, grantModelRolesIfFunction, grantModelRolesIfHasAuthRolesFactory, grantModelRolesIfHasAuthRolesFunction, grantModelRolesOnlyIfFunction, inContextFirebaseModelServiceFactory, inContextFirebaseModelsServiceFactory, incrementUpdateWithAccessorFunction, inferKeyFromTwoWayFlatFirestoreModelKey, interceptAccessorFactoryFunction, isAdminInFirebaseModelContext, isFirebaseStorageObjectNotFoundError, isFirestoreModelId, isFirestoreModelKey, isOwnerOfUserRelatedModelInFirebaseModelContext, iterateFirestoreDocumentSnapshotBatches, iterateFirestoreDocumentSnapshotCheckpoints, iterateFirestoreDocumentSnapshotPairBatches, iterateFirestoreDocumentSnapshotPairs, iterateFirestoreDocumentSnapshots, iterationQueryDocChangeWatcher, iterationQueryDocChangeWatcherChangeTypeForGroup, latestDataFromDocuments, latestSnapshotsFromDocuments, lazyFirebaseFunctionsFactory, limit, limitToLast, limitedFirestoreDocumentAccessorFactory, loadDocumentsForDocumentReferences, loadDocumentsForDocumentReferencesFromValues, loadDocumentsForIds, loadDocumentsForIdsFromValues, loadDocumentsForKeys, loadDocumentsForKeysFromValues, loadDocumentsForSnapshots, loadDocumentsForValues, makeDocuments, makeFirestoreCollection, makeFirestoreCollectionGroup, makeFirestoreCollectionWithParent, makeFirestoreItemPageIteratorDelegate, makeFirestoreQueryConstraintFunctionsDriver, makeRootSingleItemFirestoreCollection, makeSingleItemFirestoreCollection, mapDataFromSnapshot, mapHttpsCallable, modelFirebaseFunctionMapFactory, modelStorageSlashPathFactory, modifyBeforeSetInterceptAccessorFactoryFunction, newDocuments, noStringFormatInStorageUploadOptionsError, offset, onCallCreateModelResult, onCallCreateModelResultWithDocs, onCallDevelopmentParams, onCallTypedModelParams, optionalFirestoreArray, optionalFirestoreBoolean, optionalFirestoreDate, optionalFirestoreEnum, optionalFirestoreNumber, optionalFirestoreString, optionalFirestoreUID, optionalFirestoreUnitedStatesAddress, orderBy, orderByDocumentId, readFirestoreModelKey, replaceConstraints, selectFromFirebaseModelsService, separateConstraints, setIdAndKeyFromKeyIdRefOnDocumentData, setIdAndKeyFromSnapshotOnDocumentData, snapshotConverterFunctions, snapshotStreamDataForAccessor, snapshotStreamForAccessor, startAfter, startAt, startAtValue, storageListFilesResultFactory, storageListFilesResultHasNoNextError, storagePathFactory, streamFromOnSnapshot, systemStateCollectionReference, systemStateConverter, systemStateFirestoreCollection, systemStateIdentity, twoWayFlatFirestoreModelKey, unsupportedFirestoreDriverFunctionError, updateWithAccessorUpdateAndConverterFunction, useContextAuth, useContextAuthUid, useDocumentSnapshot, useDocumentSnapshotData, useFirebaseModelsService, where, whereDateIsBefore, whereDateIsBeforeWithSort, whereDateIsBetween, whereDateIsInRange, whereDateIsOnOrAfter, whereDateIsOnOrAfterWithSort, whereDocumentId, whereStringHasRootIdentityModelKey, whereStringValueHasPrefix };
|
|
8805
|
+
export { AbstractFirestoreDocument, AbstractFirestoreDocumentDataAccessorWrapper, AbstractFirestoreDocumentWithParent, BASE_MODEL_STORAGE_FILE_PATH, COPY_USER_RELATED_DATA_ACCESSOR_FACTORY_FUNCTION, CREATE_MODEL_APP_FUNCTION_KEY, ContextGrantedModelRolesReaderInstance, DEFAULT_DATE_CELL_RANGE_VALUE, DEFAULT_FIRESTORE_DATE_CELL_SCHEDULE_VALUE, DEFAULT_FIRESTORE_ITEM_PAGE_ITERATOR_ITEMS_PER_PAGE, DEFAULT_FIRESTORE_STRING_FIELD_VALUE, DEFAULT_FIRESTORE_UNITED_STATES_ADDRESS_VALUE, DEFAULT_FIRESTORE_WEBSITE_FILE_LINK_VALUE, DEFAULT_ITERATE_FIRESTORE_DOCUMENT_SNAPSHOT_BATCHES_BATCH_SIZE, DEFAULT_QUERY_CHANGE_WATCHER_DELAY, DEFAULT_SINGLE_ITEM_FIRESTORE_COLLECTION_DOCUMENT_IDENTIFIER, DEFAULT_WEBSITE_LINK, DELETE_MODEL_APP_FUNCTION_KEY, FIREBASE_AUTH_NETWORK_REQUEST_ERROR, FIREBASE_AUTH_NETWORK_REQUEST_FAILED, FIREBASE_AUTH_PASSWORD_MAX_LENGTH, FIREBASE_AUTH_PASSWORD_MIN_LENGTH, FIREBASE_AUTH_USER_NOT_FOUND_ERROR, FIREBASE_AUTH_WRONG_PASSWORD, FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY, FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY, FIREBASE_SERVER_AUTH_CLAIMS_RESET_PASSWORD_KEY, FIREBASE_SERVER_AUTH_CLAIMS_SETUP_LAST_COM_DATE_KEY, FIREBASE_SERVER_AUTH_CLAIMS_SETUP_PASSWORD_KEY, FIRESTORE_CLIENT_QUERY_CONSTRAINT_HANDLER_MAPPING, FIRESTORE_COLLECTION_NAME_SEPARATOR, FIRESTORE_DUMMY_MODEL_KEY, FIRESTORE_EMPTY_VALUE, FIRESTORE_END_AT_QUERY_CONSTRAINT_TYPE, FIRESTORE_END_AT_VALUE_QUERY_CONSTRAINT_TYPE, FIRESTORE_END_BEFORE_QUERY_CONSTRAINT_TYPE, FIRESTORE_ITEM_PAGE_ITERATOR, FIRESTORE_ITEM_PAGE_ITERATOR_DELEGATE, FIRESTORE_LIMIT_QUERY_CONSTRAINT_TYPE, FIRESTORE_LIMIT_TO_LAST_QUERY_CONSTRAINT_TYPE, FIRESTORE_MAX_WHERE_IN_FILTER_ARGS_COUNT, FIRESTORE_MODEL_ID_REGEX, FIRESTORE_MODEL_KEY_REGEX, FIRESTORE_MODEL_KEY_REGEX_STRICT, FIRESTORE_OFFSET_QUERY_CONSTRAINT_TYPE, FIRESTORE_ORDER_BY_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, FIRESTORE_ORDER_BY_QUERY_CONSTRAINT_TYPE, FIRESTORE_PASSTHROUGH_FIELD, FIRESTORE_START_AFTER_QUERY_CONSTRAINT_TYPE, FIRESTORE_START_AT_QUERY_CONSTRAINT_TYPE, FIRESTORE_START_AT_VALUE_QUERY_CONSTRAINT_TYPE, FIRESTORE_WHERE_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, FIRESTORE_WHERE_QUERY_CONSTRAINT_TYPE, FirebaseDevelopmentFunctions, FirebaseModelPermissionServiceInstance, FirebaseServerError, FirestoreAccessorStreamMode, FirestoreDocumentContextType, FirestoreItemPageIterationInstance, InferredTargetModelIdParams, InferredTargetModelParams, IsFirestoreModelId, IsFirestoreModelKey, MAX_FIRESTORE_MAP_ZOOM_LEVEL_VALUE, MIN_FIRESTORE_MAP_ZOOM_LEVEL_VALUE, MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_DEFAULT, MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_SPLITTER, MODEL_STORAGE_FILE_SLASH_PATH_FACTORY, ModifyBeforeSetFirestoreDocumentDataAccessorWrapper, READ_MODEL_APP_FUNCTION_KEY, RUN_DEV_FUNCTION_APP_FUNCTION_KEY, SCHEDULED_FUNCTION_DEV_FUNCTION_SPECIFIER, ScheduledFunctionDevelopmentFirebaseFunctionListEntry, ScheduledFunctionDevelopmentFirebaseFunctionParams, ScheduledFunctionDevelopmentFunctionTypeEnum, SystemStateDocument, SystemStateFirestoreCollections, TargetModelIdParams, TargetModelParams, UPDATE_MODEL_APP_FUNCTION_KEY, addConstraintToBuilder, addOrReplaceLimitInConstraints, allChildDocumentsUnderParent, allChildDocumentsUnderParentPath, allChildDocumentsUnderRelativePath, asTopLevelFieldPath, asTopLevelFieldPaths, assertFirestoreUpdateHasData, assertStorageUploadOptionsStringFormat, assignDateCellRangeFunction, assignDateCellScheduleFunction, assignUnitedStatesAddressFunction, assignWebsiteFileLinkFunction, assignWebsiteLinkFunction, buildFirebaseCollectionTypeModelTypeMap, childFirestoreModelKey, childFirestoreModelKeyPath, childFirestoreModelKeys, clientFirebaseFirestoreContextFactory, clientFirebaseStorageContextFactory, contextGrantedModelRolesReader, contextGrantedModelRolesReaderDoesNotExistErrorMessage, contextGrantedModelRolesReaderPermissionErrorMessage, convertHttpsCallableErrorToReadableError, copyDocumentIdForUserRelatedModifierFunction, copyDocumentIdToFieldModifierFunction, copyUserRelatedDataAccessorFactoryFunction, copyUserRelatedDataModifierConfig, dataFromDocumentSnapshots, dataFromSnapshotStream, developmentFirebaseFunctionMapFactory, directDataHttpsCallable, documentData, documentDataFunction, documentDataWithIdAndKey, documentReferenceFromDocument, documentReferencesFromDocuments, documentReferencesFromSnapshot, endAt, endAtValue, endBefore, extendFirestoreCollectionWithSingleDocumentAccessor, filterConstraintsOfType, filterDisallowedFirestoreItemPageIteratorInputContraints, firebaseAuthErrorToReadableError, firebaseFirestoreClientDrivers, firebaseFirestoreQueryConstraintFunctionsDriver, firebaseFirestoreQueryDriver, firebaseFunctionMapFactory, firebaseModelLoader, firebaseModelPermissionService, firebaseModelService, firebaseModelServiceFactory, firebaseModelsService, firebaseQueryItemAccumulator, firebaseQuerySnapshotAccumulator, firebaseStorageBucketFolderPath, firebaseStorageClientAccessorDriver, firebaseStorageClientAccessorFile, firebaseStorageClientAccessorFolder, firebaseStorageClientDrivers, firebaseStorageClientListFilesResultFactory, firebaseStorageContextFactory, firebaseStorageFileExists, firebaseStorageFilePathFromStorageFilePath, firebaseStorageRefForStorageFilePath, firestoreArray, firestoreArrayMap, firestoreBitwiseObjectMap, firestoreBitwiseSet, firestoreBitwiseSetMap, firestoreBoolean, firestoreClientAccessorDriver, firestoreClientIncrementUpdateToUpdateData, firestoreContextFactory, firestoreDate, firestoreDateCellRange, firestoreDateCellRangeArray, firestoreDateCellRangeAssignFn, firestoreDateCellSchedule, firestoreDateCellScheduleAssignFn, firestoreDencoderArray, firestoreDencoderMap, firestoreDencoderStringArray, firestoreDocumentAccessorContextExtension, firestoreDocumentAccessorFactory, firestoreDocumentLoader, firestoreDummyKey, firestoreEncodedArray, firestoreEncodedObjectMap, firestoreEnum, firestoreEnumArray, firestoreField, firestoreFieldConfigToModelMapFunctionsRef, firestoreIdBatchVerifierFactory, firestoreIdentityTypeArray, firestoreIdentityTypeArrayName, firestoreItemPageIteration, firestoreItemPageIterationFactory, firestoreLatLngString, firestoreMap, firestoreMapZoomLevel, firestoreModelId, firestoreModelIdArrayField, firestoreModelIdFromDocument, firestoreModelIdGrantedRoleArrayMap, firestoreModelIdGrantedRoleMap, firestoreModelIdString, firestoreModelIdentity, firestoreModelIdentityTypeMap, firestoreModelIdsFromDocuments, firestoreModelIdsFromKey, firestoreModelKey, firestoreModelKeyArrayField, firestoreModelKeyCollectionName, firestoreModelKeyCollectionType, firestoreModelKeyCollectionTypeArray, firestoreModelKeyCollectionTypeArrayName, firestoreModelKeyCollectionTypePair, firestoreModelKeyEncodedGrantedRoleMap, firestoreModelKeyFromDocument, firestoreModelKeyGrantedRoleArrayMap, firestoreModelKeyGrantedRoleMap, firestoreModelKeyPairObject, firestoreModelKeyParentKey, firestoreModelKeyParentKeyPartPairs, firestoreModelKeyPart, firestoreModelKeyPartPairs, firestoreModelKeyPartPairsKeyPath, firestoreModelKeyPartPairsPaths, firestoreModelKeyPath, firestoreModelKeyString, firestoreModelKeyTypePair, firestoreModelKeys, firestoreModelKeysFromDocuments, firestoreModelType, firestoreNumber, firestoreObjectArray, firestorePassThroughField, firestoreQueryConstraint, firestoreQueryConstraintFactory, firestoreQueryFactory, firestoreSingleDocumentAccessor, firestoreString, firestoreSubObject, firestoreTimezoneString, firestoreUID, firestoreUniqueArray, firestoreUniqueKeyedArray, firestoreUniqueStringArray, firestoreUnitedStatesAddress, firestoreUnitedStatesAddressAssignFn, firestoreUpdateWithNoDataError, firestoreWebsiteFileLink, firestoreWebsiteFileLinkAssignFn, firestoreWebsiteFileLinkEncodedArray, firestoreWebsiteFileLinkObjectArray, firestoreWebsiteLink, firestoreWebsiteLinkArray, firestoreWebsiteLinkAssignFn, flatFirestoreModelKey, getDataFromDocumentSnapshots, getDocumentSnapshotData, getDocumentSnapshotDataPair, getDocumentSnapshotDataPairs, getDocumentSnapshotDataTuples, getDocumentSnapshotPair, getDocumentSnapshotPairs, getDocumentSnapshots, getDocumentSnapshotsData, grantFullAccessIfAdmin, grantFullAccessIfAuthUserRelated, grantModelRolesIfAdmin, grantModelRolesIfAdminFunction, grantModelRolesIfAuthUserRelatedModelFunction, grantModelRolesIfFunction, grantModelRolesIfHasAuthRolesFactory, grantModelRolesIfHasAuthRolesFunction, grantModelRolesOnlyIfFunction, inContextFirebaseModelServiceFactory, inContextFirebaseModelsServiceFactory, incrementUpdateWithAccessorFunction, inferKeyFromTwoWayFlatFirestoreModelKey, interceptAccessorFactoryFunction, isAdminInFirebaseModelContext, isFirebaseStorageObjectNotFoundError, isFirestoreModelId, isFirestoreModelKey, isOwnerOfUserRelatedModelInFirebaseModelContext, iterateFirestoreDocumentSnapshotBatches, iterateFirestoreDocumentSnapshotCheckpoints, iterateFirestoreDocumentSnapshotPairBatches, iterateFirestoreDocumentSnapshotPairs, iterateFirestoreDocumentSnapshots, iterationQueryDocChangeWatcher, iterationQueryDocChangeWatcherChangeTypeForGroup, latestDataFromDocuments, latestSnapshotsFromDocuments, lazyFirebaseFunctionsFactory, limit, limitToLast, limitedFirestoreDocumentAccessorFactory, loadDocumentsForDocumentReferences, loadDocumentsForDocumentReferencesFromValues, loadDocumentsForIds, loadDocumentsForIdsFromValues, loadDocumentsForKeys, loadDocumentsForKeysFromValues, loadDocumentsForSnapshots, loadDocumentsForValues, makeDocuments, makeFirestoreCollection, makeFirestoreCollectionGroup, makeFirestoreCollectionWithParent, makeFirestoreItemPageIteratorDelegate, makeFirestoreQueryConstraintFunctionsDriver, makeRootSingleItemFirestoreCollection, makeSingleItemFirestoreCollection, mapDataFromSnapshot, mapHttpsCallable, modelFirebaseFunctionMapFactory, modelStorageSlashPathFactory, modifyBeforeSetInterceptAccessorFactoryFunction, newDocuments, noStringFormatInStorageUploadOptionsError, offset, onCallCreateModelResult, onCallCreateModelResultWithDocs, onCallDevelopmentParams, onCallTypedModelParams, optionalFirestoreArray, optionalFirestoreBoolean, optionalFirestoreDate, optionalFirestoreEnum, optionalFirestoreField, optionalFirestoreNumber, optionalFirestoreString, optionalFirestoreUID, optionalFirestoreUnitedStatesAddress, orderBy, orderByDocumentId, readFirestoreModelKey, replaceConstraints, selectFromFirebaseModelsService, separateConstraints, setIdAndKeyFromKeyIdRefOnDocumentData, setIdAndKeyFromSnapshotOnDocumentData, snapshotConverterFunctions, snapshotStreamDataForAccessor, snapshotStreamForAccessor, startAfter, startAt, startAtValue, storageListFilesResultFactory, storageListFilesResultHasNoNextError, storagePathFactory, streamFromOnSnapshot, systemStateCollectionReference, systemStateConverter, systemStateFirestoreCollection, systemStateIdentity, twoWayFlatFirestoreModelKey, unsupportedFirestoreDriverFunctionError, updateWithAccessorUpdateAndConverterFunction, useContextAuth, useContextAuthUid, useDocumentSnapshot, useDocumentSnapshotData, useFirebaseModelsService, where, whereDateIsBefore, whereDateIsBeforeWithSort, whereDateIsBetween, whereDateIsInRange, whereDateIsOnOrAfter, whereDateIsOnOrAfterWithSort, whereDocumentId, whereStringHasRootIdentityModelKey, whereStringValueHasPrefix };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type WebsiteLink, type GrantedRole, type WebsiteFileLink } from '@dereekb/model';
|
|
2
2
|
import { type DateCellRange, type DateCellSchedule } from '@dereekb/date';
|
|
3
|
-
import { type ModelFieldMapFunctionsConfig, type GetterOrValue, type Maybe, type ModelFieldMapConvertFunction, type PrimativeKey, type ReadKeyFunction, type ModelFieldMapFunctionsWithDefaultsConfig, type FilterUniqueStringsTransformConfig, type MapFunction, type FilterKeyValueTuplesInput, type ModelKey, type ToModelMapFunctionsInput, type ModelMapFunctionsRef, type
|
|
3
|
+
import { type ModelFieldMapFunctionsConfig, type GetterOrValue, type Maybe, type ModelFieldMapConvertFunction, type PrimativeKey, type ReadKeyFunction, type ModelFieldMapFunctionsWithDefaultsConfig, type FilterUniqueStringsTransformConfig, type MapFunction, type FilterKeyValueTuplesInput, type ModelKey, type ToModelMapFunctionsInput, type ModelMapFunctionsRef, type LatLngPrecision, type LatLngString, type TimezoneString, type PrimativeKeyStringDencoderFunction, type PrimativeKeyDencoderFunction, type UnitedStatesAddress, type ZoomLevel, type FilterUniqueFunction, type BitwiseEncodedSet, type BitwiseObjectDencoder, type SortCompareFunctionRef, type TransformNumberFunctionConfigInput, type TransformStringFunctionConfigInput } from '@dereekb/util';
|
|
4
4
|
import { type FirestoreModelData } from './snapshot.type';
|
|
5
5
|
export interface BaseFirestoreFieldConfig<V, D = unknown> {
|
|
6
6
|
fromData: ModelFieldMapConvertFunction<D, V>;
|
|
@@ -42,23 +42,65 @@ export type FirestoreModelFieldMapFunctionsConfig<V, D> = ModelFieldMapFunctions
|
|
|
42
42
|
export declare function firestoreField<V, D = unknown>(config: FirestoreFieldConfig<V, D>): FirestoreModelFieldMapFunctionsConfig<V, D>;
|
|
43
43
|
export declare const FIRESTORE_PASSTHROUGH_FIELD: FirestoreModelFieldMapFunctionsConfig<unknown, unknown>;
|
|
44
44
|
export declare function firestorePassThroughField<T>(): ModelFieldMapFunctionsConfig<T, T>;
|
|
45
|
+
export interface OptionalFirestoreFieldConfig<T> {
|
|
46
|
+
/**
|
|
47
|
+
* Defaults the dontStoreIfValue value to this value.
|
|
48
|
+
*
|
|
49
|
+
* This is ignored if no default value is set.
|
|
50
|
+
*/
|
|
51
|
+
readonly dontStoreDefaultReturnValue?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Removes the value from the object if the stored value would equal this value.
|
|
54
|
+
*/
|
|
55
|
+
readonly dontStoreIfValue?: T;
|
|
56
|
+
/**
|
|
57
|
+
* Value to optionally return if there is no value in the database when reading from the database.
|
|
58
|
+
*/
|
|
59
|
+
readonly defaultReadValue?: T;
|
|
60
|
+
}
|
|
61
|
+
export interface OptionalFirestoreFieldConfigWithTransform<T> extends OptionalFirestoreFieldConfig<T> {
|
|
62
|
+
/**
|
|
63
|
+
* (Optional) Function to transform the data before it is stored and after it is read.
|
|
64
|
+
*
|
|
65
|
+
* This is used as the default for transformToData, and transformToData.
|
|
66
|
+
*/
|
|
67
|
+
readonly transformData?: MapFunction<T, T>;
|
|
68
|
+
/**
|
|
69
|
+
* (Optional) Function to transform the data after it is read from Firestore.
|
|
70
|
+
*
|
|
71
|
+
* Only transforms non-null/undefined values from the database.
|
|
72
|
+
*
|
|
73
|
+
* Overrides transformData.
|
|
74
|
+
*/
|
|
75
|
+
readonly transformFromData?: MapFunction<T, T>;
|
|
76
|
+
/**
|
|
77
|
+
* (Optional) Transform function that is only used before the data is stored to Firestore.
|
|
78
|
+
*
|
|
79
|
+
* Is allowed to return null to clear the stored value.
|
|
80
|
+
*
|
|
81
|
+
* Overrides transformData.
|
|
82
|
+
*/
|
|
83
|
+
readonly transformToData?: MapFunction<T, T | null>;
|
|
84
|
+
}
|
|
85
|
+
export declare function optionalFirestoreField<T>(config?: OptionalFirestoreFieldConfigWithTransform<T>): ModelFieldMapFunctionsConfig<Maybe<T>, Maybe<T>>;
|
|
45
86
|
export type MapConfiguredFirestoreFieldConfigWithDefault<V, D = unknown> = Omit<FirestoreFieldConfigWithDefault<V, D>, 'fromData' | 'toData'>;
|
|
46
87
|
export type MapConfiguredFirestoreFieldConfigWithDefaultData<V, D = unknown> = Omit<FirestoreFieldConfigWithDefaultData<V, D>, 'fromData' | 'toData'>;
|
|
47
88
|
export type MapConfiguredFirestoreFieldConfig<V, D = unknown> = MapConfiguredFirestoreFieldConfigWithDefault<V, D> | MapConfiguredFirestoreFieldConfigWithDefaultData<V, D>;
|
|
48
89
|
export type DefaultMapConfiguredFirestoreFieldConfig<V, D = unknown> = Omit<FirestoreFieldConfigWithDefault<V, D>, 'fromData' | 'toData' | 'default'> & Partial<Pick<FirestoreFieldConfigWithDefault<V, D>, 'default'>>;
|
|
49
90
|
export type OptionalMapConfiguredFirestoreFieldConfig<V, D = unknown> = Omit<BaseFirestoreFieldConfig<V, D>, 'fromData' | 'toData' | 'defaultBeforeSave'>;
|
|
50
|
-
export type FirestoreStringTransformOptions<S extends string = string> = TransformStringFunctionConfig | TransformStringFunction<S>;
|
|
51
91
|
export interface FirestoreStringConfig<S extends string = string> extends DefaultMapConfiguredFirestoreFieldConfig<S, S> {
|
|
52
|
-
transform?:
|
|
92
|
+
transform?: TransformStringFunctionConfigInput<S>;
|
|
53
93
|
}
|
|
54
94
|
export declare const DEFAULT_FIRESTORE_STRING_FIELD_VALUE = "";
|
|
55
95
|
export declare function firestoreString<S extends string = string>(config?: FirestoreStringConfig<S>): FirestoreModelFieldMapFunctionsConfig<S, S>;
|
|
56
|
-
export
|
|
96
|
+
export type OptionalFirestoreString<S extends string = string> = OptionalFirestoreFieldConfig<S> & Pick<FirestoreStringConfig<S>, 'transform'>;
|
|
97
|
+
export declare function optionalFirestoreString<S extends string = string>(config?: OptionalFirestoreString<S>): ModelFieldMapFunctionsConfig<Maybe<S>, Maybe<S>>;
|
|
57
98
|
export type FirestoreEnumConfig<S extends string | number> = MapConfiguredFirestoreFieldConfigWithDefault<S, S>;
|
|
58
99
|
export declare function firestoreEnum<S extends string | number>(config: FirestoreEnumConfig<S>): FirestoreModelFieldMapFunctionsConfig<S, S>;
|
|
59
|
-
export
|
|
100
|
+
export type OptionalFirestoreEnum<S extends string | number> = OptionalFirestoreFieldConfig<S>;
|
|
101
|
+
export declare function optionalFirestoreEnum<S extends string | number>(config?: OptionalFirestoreEnum<S>): ModelFieldMapFunctionsConfig<Maybe<S>, Maybe<S>>;
|
|
60
102
|
export declare function firestoreUID(): FirestoreModelFieldMapFunctionsConfig<string, string>;
|
|
61
|
-
export declare function optionalFirestoreUID():
|
|
103
|
+
export declare function optionalFirestoreUID(): ModelFieldMapFunctionsConfig<Maybe<string>, Maybe<string>>;
|
|
62
104
|
export declare const firestoreModelKeyString: FirestoreModelFieldMapFunctionsConfig<string, string>;
|
|
63
105
|
export declare const firestoreModelIdString: FirestoreModelFieldMapFunctionsConfig<string, string>;
|
|
64
106
|
export type FirestoreDateFieldConfig = DefaultMapConfiguredFirestoreFieldConfig<Date, string> & {
|
|
@@ -68,14 +110,15 @@ export declare function firestoreDate(config?: FirestoreDateFieldConfig): Firest
|
|
|
68
110
|
export declare function optionalFirestoreDate(): FirestoreModelFieldMapFunctionsConfig<Maybe<Date>, Maybe<string>>;
|
|
69
111
|
export type FirestoreBooleanFieldConfig = MapConfiguredFirestoreFieldConfigWithDefault<boolean, boolean>;
|
|
70
112
|
export declare function firestoreBoolean(config: FirestoreBooleanFieldConfig): FirestoreModelFieldMapFunctionsConfig<boolean, boolean>;
|
|
71
|
-
export
|
|
72
|
-
export
|
|
113
|
+
export type OptionalFirestoreBooleanFieldConfig = OptionalFirestoreFieldConfig<boolean>;
|
|
114
|
+
export declare function optionalFirestoreBoolean(config?: OptionalFirestoreBooleanFieldConfig): ModelFieldMapFunctionsConfig<Maybe<boolean>, Maybe<boolean>>;
|
|
73
115
|
export interface FirestoreNumberConfig<N extends number = number> extends MapConfiguredFirestoreFieldConfigWithDefault<N, N> {
|
|
74
116
|
saveDefault?: Maybe<boolean>;
|
|
75
|
-
transform?:
|
|
117
|
+
transform?: TransformNumberFunctionConfigInput<N>;
|
|
76
118
|
}
|
|
77
119
|
export declare function firestoreNumber<N extends number = number>(config: FirestoreNumberConfig<N>): FirestoreModelFieldMapFunctionsConfig<N, N>;
|
|
78
|
-
export
|
|
120
|
+
export type OptionalFirestoreNumberFieldConfig<N extends number = number> = OptionalFirestoreFieldConfig<N> & Pick<FirestoreNumberConfig<N>, 'transform'>;
|
|
121
|
+
export declare function optionalFirestoreNumber<N extends number = number>(config?: OptionalFirestoreNumberFieldConfig<N>): ModelFieldMapFunctionsConfig<Maybe<N>, Maybe<N>>;
|
|
79
122
|
export type FirestoreArrayFieldConfig<T> = DefaultMapConfiguredFirestoreFieldConfig<T[], T[]> & Partial<SortCompareFunctionRef<T>> & Partial<FirestoreFieldDefault<T[]>>;
|
|
80
123
|
export declare function firestoreArray<T>(config: FirestoreArrayFieldConfig<T>): FirestoreModelFieldMapFunctionsConfig<T[], T[]>;
|
|
81
124
|
export declare function optionalFirestoreArray<T>(): ModelFieldMapFunctionsConfig<Maybe<T[]>, Maybe<T[]>>;
|
|
@@ -354,3 +397,11 @@ export interface FirestoreBitwiseObjectMapConfig<T extends object, K extends str
|
|
|
354
397
|
dencoder: BitwiseObjectDencoder<T>;
|
|
355
398
|
}
|
|
356
399
|
export declare function firestoreBitwiseObjectMap<T extends object, K extends string = string>(config: FirestoreBitwiseObjectMapConfig<T, K>): FirestoreModelFieldMapFunctionsConfig<FirestoreEncodedObjectMapFieldValueType<T, K>, FirestoreMapFieldType<number, K>>;
|
|
400
|
+
/**
|
|
401
|
+
* @deprecated use TransformStringFunctionConfigInput instead.
|
|
402
|
+
*/
|
|
403
|
+
export type FirestoreStringTransformOptions<S extends string = string> = TransformStringFunctionConfigInput<S>;
|
|
404
|
+
/**
|
|
405
|
+
* @deprecated use TransformNumberFunctionConfigInput instead.
|
|
406
|
+
*/
|
|
407
|
+
export type FirestoreNumberTransformOptions<N extends number = number> = TransformNumberFunctionConfigInput<N>;
|
package/test/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [10.0.11](https://github.com/dereekb/dbx-components/compare/v10.0.10-dev...v10.0.11) (2024-01-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [10.0.10](https://github.com/dereekb/dbx-components/compare/v10.0.9-dev...v10.0.10) (2024-01-21)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
5
13
|
## [10.0.9](https://github.com/dereekb/dbx-components/compare/v10.0.8-dev...v10.0.9) (2024-01-15)
|
|
6
14
|
|
|
7
15
|
|