@dereekb/firebase 13.11.13 → 13.11.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +1446 -1137
- package/index.esm.js +1437 -1128
- package/package.json +5 -5
- package/src/lib/client/error/error.d.ts +1 -1
- package/src/lib/client/firestore/array.d.ts +3 -2
- package/src/lib/client/firestore/driver.accessor.batch.d.ts +5 -4
- package/src/lib/client/firestore/driver.accessor.create.d.ts +4 -3
- package/src/lib/client/firestore/driver.accessor.d.ts +2 -1
- package/src/lib/client/firestore/driver.accessor.default.d.ts +5 -3
- package/src/lib/client/firestore/driver.accessor.transaction.d.ts +7 -5
- package/src/lib/client/firestore/driver.d.ts +1 -1
- package/src/lib/client/firestore/driver.query.d.ts +5 -5
- package/src/lib/client/firestore/increment.d.ts +3 -2
- package/src/lib/client/function/development.function.factory.d.ts +3 -2
- package/src/lib/client/function/error.d.ts +2 -2
- package/src/lib/client/function/function.callable.d.ts +5 -5
- package/src/lib/client/function/function.factory.d.ts +6 -4
- package/src/lib/client/function/model.function.factory.d.ts +9 -8
- package/src/lib/client/storage/driver.accessor.d.ts +14 -14
- package/src/lib/client/storage/driver.d.ts +1 -1
- package/src/lib/common/auth/auth.error.d.ts +2 -2
- package/src/lib/common/development/function.d.ts +5 -5
- package/src/lib/common/firestore/accessor/accessor.d.ts +22 -16
- package/src/lib/common/firestore/accessor/accessor.wrap.d.ts +33 -29
- package/src/lib/common/firestore/accessor/accessor.wrap.modify.d.ts +11 -7
- package/src/lib/common/firestore/accessor/array.d.ts +3 -2
- package/src/lib/common/firestore/accessor/document.d.ts +27 -24
- package/src/lib/common/firestore/accessor/document.paged.d.ts +2 -2
- package/src/lib/common/firestore/accessor/document.rxjs.d.ts +15 -12
- package/src/lib/common/firestore/accessor/document.utility.d.ts +81 -72
- package/src/lib/common/firestore/accessor/increment.d.ts +3 -2
- package/src/lib/common/firestore/cache/cache.d.ts +8 -7
- package/src/lib/common/firestore/cache/cache.memory.d.ts +13 -10
- package/src/lib/common/firestore/collection/collection.d.ts +62 -42
- package/src/lib/common/firestore/collection/collection.group.d.ts +4 -2
- package/src/lib/common/firestore/collection/collection.query.d.ts +7 -4
- package/src/lib/common/firestore/collection/collection.single.d.ts +4 -2
- package/src/lib/common/firestore/collection/collection.util.d.ts +3 -2
- package/src/lib/common/firestore/collection/subcollection.d.ts +4 -2
- package/src/lib/common/firestore/collection/subcollection.paged.d.ts +7 -3
- package/src/lib/common/firestore/collection/subcollection.single.d.ts +4 -2
- package/src/lib/common/firestore/context.d.ts +4 -2
- package/src/lib/common/firestore/driver/query.handler.d.ts +4 -3
- package/src/lib/common/firestore/error.d.ts +6 -5
- package/src/lib/common/firestore/query/constraint.d.ts +56 -36
- package/src/lib/common/firestore/query/constraint.template.d.ts +15 -7
- package/src/lib/common/firestore/query/iterator.d.ts +20 -13
- package/src/lib/common/firestore/query/query.d.ts +6 -4
- package/src/lib/common/firestore/query/query.iterate.array.d.ts +10 -6
- package/src/lib/common/firestore/query/query.iterate.d.ts +8 -8
- package/src/lib/common/firestore/query/query.util.d.ts +11 -7
- package/src/lib/common/firestore/query/watcher.d.ts +9 -7
- package/src/lib/common/firestore/snapshot/snapshot.d.ts +6 -3
- package/src/lib/common/firestore/snapshot/snapshot.field.d.ts +230 -132
- package/src/lib/common/firestore/util/id.batch.d.ts +4 -2
- package/src/lib/common/model/function.d.ts +21 -20
- package/src/lib/common/model/model/model.loader.d.ts +2 -2
- package/src/lib/common/model/model.service.d.ts +28 -20
- package/src/lib/common/model/permission/permission.service.d.ts +3 -2
- package/src/lib/common/model/permission/permission.service.grant.d.ts +27 -21
- package/src/lib/common/model/permission/permission.service.role.d.ts +7 -7
- package/src/lib/common/storage/accessor/path.model.d.ts +3 -2
- package/src/lib/common/storage/context.d.ts +3 -2
- package/src/lib/common/storage/driver/accessor.iterate.d.ts +7 -6
- package/src/lib/common/storage/driver/accessor.util.d.ts +4 -4
- package/src/lib/common/storage/driver/error.d.ts +3 -3
- package/src/lib/common/storage/driver/list.d.ts +4 -3
- package/src/lib/common/storage/storage.d.ts +9 -8
- package/src/lib/common/storage/types.d.ts +1 -1
- package/src/lib/model/notification/notification.api.d.ts +2 -2
- package/src/lib/model/notification/notification.api.util.d.ts +16 -16
- package/src/lib/model/notification/notification.config.d.ts +35 -34
- package/src/lib/model/notification/notification.create.d.ts +17 -15
- package/src/lib/model/notification/notification.create.loggedevent.d.ts +3 -2
- package/src/lib/model/notification/notification.create.task.d.ts +3 -2
- package/src/lib/model/notification/notification.d.ts +53 -45
- package/src/lib/model/notification/notification.details.d.ts +5 -4
- package/src/lib/model/notification/notification.id.d.ts +8 -8
- package/src/lib/model/notification/notification.item.d.ts +3 -3
- package/src/lib/model/notification/notification.loggedevent.loader.d.ts +2 -2
- package/src/lib/model/notification/notification.message.d.ts +6 -4
- package/src/lib/model/notification/notification.query.d.ts +12 -12
- package/src/lib/model/notification/notification.send.d.ts +3 -3
- package/src/lib/model/notification/notification.task.d.ts +15 -15
- package/src/lib/model/notification/notification.task.subtask.d.ts +3 -3
- package/src/lib/model/notification/notification.util.d.ts +29 -29
- package/src/lib/model/oidcmodel/oidcmodel.api.d.ts +2 -2
- package/src/lib/model/oidcmodel/oidcmodel.d.ts +6 -6
- package/src/lib/model/oidcmodel/oidcmodel.query.d.ts +18 -18
- package/src/lib/model/storagefile/storagefile.api.d.ts +2 -2
- package/src/lib/model/storagefile/storagefile.create.d.ts +8 -7
- package/src/lib/model/storagefile/storagefile.d.ts +19 -18
- package/src/lib/model/storagefile/storagefile.file.d.ts +2 -1
- package/src/lib/model/storagefile/storagefile.group.d.ts +5 -5
- package/src/lib/model/storagefile/storagefile.permission.d.ts +3 -2
- package/src/lib/model/storagefile/storagefile.query.d.ts +15 -15
- package/src/lib/model/storagefile/storagefile.task.d.ts +2 -2
- package/src/lib/model/storagefile/storagefile.upload.claims.d.ts +4 -4
- package/src/lib/model/storagefile/storagefile.upload.d.ts +8 -6
- package/src/lib/model/storagefile/storagefile.upload.determiner.d.ts +18 -16
- package/src/lib/model/storagefile/storagefile.util.d.ts +8 -8
- package/src/lib/model/system/system.d.ts +6 -6
- package/test/index.cjs.js +43 -43
- package/test/index.esm.js +38 -38
- package/test/package.json +6 -6
- package/test/src/lib/client/firebase.d.ts +1 -1
- package/test/src/lib/common/firestore/firestore.d.ts +3 -3
- package/test/src/lib/common/mock/mock.item.collection.fixture.d.ts +3 -3
- package/test/src/lib/common/mock/mock.item.d.ts +16 -16
- package/test/src/lib/common/mock/mock.item.query.d.ts +4 -4
- package/test/src/lib/common/mock/mock.item.storage.fixture.d.ts +3 -3
- package/test/src/lib/common/storage/storage.d.ts +1 -1
|
@@ -42,15 +42,15 @@ export interface BaseFirestoreFieldConfig<V, D = unknown> {
|
|
|
42
42
|
/**
|
|
43
43
|
* Function to convert from Firestore data (D) to model value (V)
|
|
44
44
|
*/
|
|
45
|
-
fromData: ModelFieldMapConvertFunction<D, V>;
|
|
45
|
+
readonly fromData: ModelFieldMapConvertFunction<D, V>;
|
|
46
46
|
/**
|
|
47
47
|
* Function to convert from model value (V) to Firestore data (D)
|
|
48
48
|
*/
|
|
49
|
-
toData: ModelFieldMapConvertFunction<V, D>;
|
|
49
|
+
readonly toData: ModelFieldMapConvertFunction<V, D>;
|
|
50
50
|
/**
|
|
51
51
|
* Optional default value to use before saving if the value is null/undefined
|
|
52
52
|
*/
|
|
53
|
-
defaultBeforeSave?: GetterOrValue<D
|
|
53
|
+
readonly defaultBeforeSave?: GetterOrValue<Maybe<D>>;
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* Default value for firestoreField().
|
|
@@ -118,15 +118,16 @@ export type FirestoreModelFieldMapFunctionsConfig<V, D> = ModelFieldMapFunctions
|
|
|
118
118
|
* Use the higher-level field converters for common types; use this directly only when you need a
|
|
119
119
|
* custom conversion not covered by the built-in converters.
|
|
120
120
|
*
|
|
121
|
-
* @
|
|
122
|
-
* @
|
|
123
|
-
* @param config - Configuration for the Firestore field
|
|
124
|
-
* @returns A configured mapping between model and Firestore data
|
|
121
|
+
* @param config - Configuration for the Firestore field.
|
|
122
|
+
* @returns A configured mapping between model and Firestore data.
|
|
125
123
|
*
|
|
126
124
|
* @dbxModelSnapshotField
|
|
127
125
|
* @dbxModelSnapshotFieldCategory primitive
|
|
128
126
|
* @dbxModelSnapshotFieldTags base, custom, transform, default, factory
|
|
129
127
|
* @dbxModelSnapshotFieldRelated optional-firestore-field
|
|
128
|
+
* @template V - Value type for the field in the model
|
|
129
|
+
* @template D - Data type for the field in Firestore (defaults to unknown)
|
|
130
|
+
*
|
|
130
131
|
* @example
|
|
131
132
|
* ```ts
|
|
132
133
|
* // Custom field that stores a Set<string> as a comma-separated string
|
|
@@ -136,6 +137,7 @@ export type FirestoreModelFieldMapFunctionsConfig<V, D> = ModelFieldMapFunctions
|
|
|
136
137
|
* toData: (set) => [...set].join(',')
|
|
137
138
|
* });
|
|
138
139
|
* ```
|
|
140
|
+
*
|
|
139
141
|
* @__NO_SIDE_EFFECTS__
|
|
140
142
|
*/
|
|
141
143
|
export declare function firestoreField<V, D = unknown>(config: FirestoreFieldConfig<V, D>): FirestoreModelFieldMapFunctionsConfig<V, D>;
|
|
@@ -162,17 +164,20 @@ export declare const FIRESTORE_PASSTHROUGH_FIELD: FirestoreModelFieldMapFunction
|
|
|
162
164
|
* This is useful when the model field and Firestore field are the same type and
|
|
163
165
|
* no transformation is needed in either direction.
|
|
164
166
|
*
|
|
165
|
-
* @
|
|
166
|
-
*
|
|
167
|
+
* @returns A field mapping configuration that passes values through unchanged.
|
|
168
|
+
*
|
|
167
169
|
* @dbxModelSnapshotField
|
|
168
170
|
* @dbxModelSnapshotFieldCategory primitive
|
|
169
171
|
* @dbxModelSnapshotFieldTags passthrough, identity, raw, untransformed, factory
|
|
172
|
+
* @template T - Type for both the model field and Firestore field
|
|
173
|
+
*
|
|
170
174
|
* @example
|
|
171
175
|
* ```ts
|
|
172
176
|
* fields: {
|
|
173
177
|
* payload: firestorePassThroughField<MyType>()
|
|
174
178
|
* }
|
|
175
179
|
* ```
|
|
180
|
+
*
|
|
176
181
|
* @__NO_SIDE_EFFECTS__
|
|
177
182
|
*/
|
|
178
183
|
export declare function firestorePassThroughField<T>(): ModelFieldMapFunctionsConfig<T, T>;
|
|
@@ -250,7 +255,7 @@ export interface OptionalFirestoreFieldConfigWithTwoTypeTransform<V, D> extends
|
|
|
250
255
|
*
|
|
251
256
|
* Overrides transformData.
|
|
252
257
|
*/
|
|
253
|
-
readonly transformToData?: MapFunction<V, D
|
|
258
|
+
readonly transformToData?: MapFunction<V, Maybe<D>>;
|
|
254
259
|
}
|
|
255
260
|
/**
|
|
256
261
|
* Configuration for optional Firestore fields with single type and transformation function.
|
|
@@ -366,9 +371,14 @@ export declare const DEFAULT_FIRESTORE_STRING_FIELD_VALUE = "";
|
|
|
366
371
|
* Defaults to empty string `''` when the field is missing. Supports optional string
|
|
367
372
|
* transformation (e.g., lowercase, trim) applied on both read and write.
|
|
368
373
|
*
|
|
374
|
+
* @param config - Configuration for the string field.
|
|
375
|
+
* @returns A field mapping configuration for string values.
|
|
376
|
+
*
|
|
377
|
+
* @dbxModelSnapshotField
|
|
378
|
+
* @dbxModelSnapshotFieldCategory primitive
|
|
379
|
+
* @dbxModelSnapshotFieldTags string, text, transform, lowercase, factory
|
|
380
|
+
* @dbxModelSnapshotFieldRelated optional-firestore-string
|
|
369
381
|
* @template S - String type for the field (defaults to string)
|
|
370
|
-
* @param config - Configuration for the string field
|
|
371
|
-
* @returns A field mapping configuration for string values
|
|
372
382
|
*
|
|
373
383
|
* @example
|
|
374
384
|
* ```ts
|
|
@@ -378,10 +388,7 @@ export declare const DEFAULT_FIRESTORE_STRING_FIELD_VALUE = "";
|
|
|
378
388
|
* // String field with lowercase transformation
|
|
379
389
|
* const emailField = firestoreString({ transform: 'lowercase' });
|
|
380
390
|
* ```
|
|
381
|
-
*
|
|
382
|
-
* @dbxModelSnapshotFieldCategory primitive
|
|
383
|
-
* @dbxModelSnapshotFieldTags string, text, transform, lowercase, factory
|
|
384
|
-
* @dbxModelSnapshotFieldRelated optional-firestore-string
|
|
391
|
+
*
|
|
385
392
|
* @__NO_SIDE_EFFECTS__
|
|
386
393
|
*/
|
|
387
394
|
export declare function firestoreString<S extends string = string>(config?: FirestoreStringConfig<S>): FirestoreModelFieldMapFunctionsConfig<S, S>;
|
|
@@ -394,20 +401,23 @@ export type OptionalFirestoreString<S extends string = string> = OptionalOneType
|
|
|
394
401
|
/**
|
|
395
402
|
* Creates a field mapping configuration for optional Firestore string fields.
|
|
396
403
|
*
|
|
397
|
-
* @
|
|
398
|
-
* @
|
|
399
|
-
*
|
|
404
|
+
* @param config - Configuration for the optional string field.
|
|
405
|
+
* @returns A field mapping configuration for optional string values.
|
|
406
|
+
*
|
|
400
407
|
* @dbxModelSnapshotField
|
|
401
408
|
* @dbxModelSnapshotFieldCategory primitive
|
|
402
409
|
* @dbxModelSnapshotFieldOptional true
|
|
403
410
|
* @dbxModelSnapshotFieldTags string, text, optional, transform, factory
|
|
404
411
|
* @dbxModelSnapshotFieldRelated firestore-string
|
|
412
|
+
* @template S - String type for the field (defaults to string)
|
|
413
|
+
*
|
|
405
414
|
* @example
|
|
406
415
|
* ```ts
|
|
407
416
|
* fields: {
|
|
408
417
|
* nickname: optionalFirestoreString()
|
|
409
418
|
* }
|
|
410
419
|
* ```
|
|
420
|
+
*
|
|
411
421
|
* @__NO_SIDE_EFFECTS__
|
|
412
422
|
*/
|
|
413
423
|
export declare function optionalFirestoreString<S extends string = string>(config?: OptionalFirestoreString<S>): FirestoreModelFieldMapFunctionsConfig<Maybe<S>, Maybe<S>>;
|
|
@@ -420,19 +430,22 @@ export type FirestoreEnumConfig<S extends string | number> = MapConfiguredFirest
|
|
|
420
430
|
/**
|
|
421
431
|
* Creates a field mapping configuration for Firestore enum fields.
|
|
422
432
|
*
|
|
423
|
-
* @
|
|
424
|
-
* @
|
|
425
|
-
*
|
|
433
|
+
* @param config - Configuration for the enum field.
|
|
434
|
+
* @returns A field mapping configuration for enum values.
|
|
435
|
+
*
|
|
426
436
|
* @dbxModelSnapshotField
|
|
427
437
|
* @dbxModelSnapshotFieldCategory primitive
|
|
428
438
|
* @dbxModelSnapshotFieldTags enum, string, number, factory
|
|
429
439
|
* @dbxModelSnapshotFieldRelated optional-firestore-enum
|
|
440
|
+
* @template S - Enum type (string or number)
|
|
441
|
+
*
|
|
430
442
|
* @example
|
|
431
443
|
* ```ts
|
|
432
444
|
* fields: {
|
|
433
445
|
* status: firestoreEnum<UserStatus>({ default: UserStatus.Pending })
|
|
434
446
|
* }
|
|
435
447
|
* ```
|
|
448
|
+
*
|
|
436
449
|
* @__NO_SIDE_EFFECTS__
|
|
437
450
|
*/
|
|
438
451
|
export declare function firestoreEnum<S extends string | number>(config: FirestoreEnumConfig<S>): FirestoreModelFieldMapFunctionsConfig<S, S>;
|
|
@@ -445,43 +458,50 @@ export type OptionalFirestoreEnumConfig<S extends string | number> = OptionalOne
|
|
|
445
458
|
/**
|
|
446
459
|
* Creates a field mapping configuration for optional Firestore enum fields.
|
|
447
460
|
*
|
|
448
|
-
* @
|
|
449
|
-
* @
|
|
450
|
-
*
|
|
461
|
+
* @param config - Configuration for the optional enum field.
|
|
462
|
+
* @returns A field mapping configuration for optional enum values.
|
|
463
|
+
*
|
|
451
464
|
* @dbxModelSnapshotField
|
|
452
465
|
* @dbxModelSnapshotFieldCategory primitive
|
|
453
466
|
* @dbxModelSnapshotFieldOptional true
|
|
454
467
|
* @dbxModelSnapshotFieldTags enum, optional, string, number, factory
|
|
455
468
|
* @dbxModelSnapshotFieldRelated firestore-enum
|
|
469
|
+
* @template S - Enum type (string or number)
|
|
470
|
+
*
|
|
456
471
|
* @__NO_SIDE_EFFECTS__
|
|
457
472
|
*/
|
|
458
473
|
export declare function optionalFirestoreEnum<S extends string | number>(config?: OptionalFirestoreEnumConfig<S>): FirestoreModelFieldMapFunctionsConfig<Maybe<S>, Maybe<S>>;
|
|
459
474
|
/**
|
|
460
475
|
* Creates a field mapping configuration for Firestore UID fields.
|
|
461
476
|
*
|
|
462
|
-
* @returns A field mapping configuration for Firebase Auth user IDs
|
|
477
|
+
* @returns A field mapping configuration for Firebase Auth user IDs.
|
|
478
|
+
*
|
|
463
479
|
* @dbxModelSnapshotField
|
|
464
480
|
* @dbxModelSnapshotFieldCategory model-key
|
|
465
481
|
* @dbxModelSnapshotFieldTags uid, user, owner, account, auth, string, factory
|
|
466
482
|
* @dbxModelSnapshotFieldRelated optional-firestore-uid
|
|
483
|
+
*
|
|
467
484
|
* @example
|
|
468
485
|
* ```ts
|
|
469
486
|
* fields: {
|
|
470
487
|
* uid: firestoreUID()
|
|
471
488
|
* }
|
|
472
489
|
* ```
|
|
490
|
+
*
|
|
473
491
|
* @__NO_SIDE_EFFECTS__
|
|
474
492
|
*/
|
|
475
493
|
export declare function firestoreUID(): FirestoreModelFieldMapFunctionsConfig<string, string>;
|
|
476
494
|
/**
|
|
477
495
|
* Creates a field mapping configuration for optional Firestore UID fields.
|
|
478
496
|
*
|
|
479
|
-
* @returns A field mapping configuration for optional Firebase Auth user IDs
|
|
497
|
+
* @returns A field mapping configuration for optional Firebase Auth user IDs.
|
|
498
|
+
*
|
|
480
499
|
* @dbxModelSnapshotField
|
|
481
500
|
* @dbxModelSnapshotFieldCategory model-key
|
|
482
501
|
* @dbxModelSnapshotFieldOptional true
|
|
483
502
|
* @dbxModelSnapshotFieldTags uid, user, owner, account, auth, optional, string, factory
|
|
484
503
|
* @dbxModelSnapshotFieldRelated firestore-uid
|
|
504
|
+
*
|
|
485
505
|
* @__NO_SIDE_EFFECTS__
|
|
486
506
|
*/
|
|
487
507
|
export declare function optionalFirestoreUID(): FirestoreModelFieldMapFunctionsConfig<Maybe<string>, Maybe<string>>;
|
|
@@ -532,8 +552,13 @@ export type FirestoreDateFieldConfig = DefaultMapConfiguredFirestoreFieldConfig<
|
|
|
532
552
|
* Defaults to `new Date()` when the field is missing. Use `saveDefaultAsNow` to automatically
|
|
533
553
|
* store the current timestamp when a new document is created.
|
|
534
554
|
*
|
|
535
|
-
* @param config - Configuration for the date field
|
|
536
|
-
* @returns A field mapping configuration for Date values
|
|
555
|
+
* @param config - Configuration for the date field.
|
|
556
|
+
* @returns A field mapping configuration for Date values.
|
|
557
|
+
*
|
|
558
|
+
* @dbxModelSnapshotField
|
|
559
|
+
* @dbxModelSnapshotFieldCategory date
|
|
560
|
+
* @dbxModelSnapshotFieldTags date, time, iso, timestamp, factory
|
|
561
|
+
* @dbxModelSnapshotFieldRelated optional-firestore-date, firestore-date-number
|
|
537
562
|
*
|
|
538
563
|
* @example
|
|
539
564
|
* ```ts
|
|
@@ -543,10 +568,7 @@ export type FirestoreDateFieldConfig = DefaultMapConfiguredFirestoreFieldConfig<
|
|
|
543
568
|
* // Date field with a fixed default
|
|
544
569
|
* const startDateField = firestoreDate({ default: new Date('2020-01-01') });
|
|
545
570
|
* ```
|
|
546
|
-
*
|
|
547
|
-
* @dbxModelSnapshotFieldCategory date
|
|
548
|
-
* @dbxModelSnapshotFieldTags date, time, iso, timestamp, factory
|
|
549
|
-
* @dbxModelSnapshotFieldRelated optional-firestore-date, firestore-date-number
|
|
571
|
+
*
|
|
550
572
|
* @__NO_SIDE_EFFECTS__
|
|
551
573
|
*/
|
|
552
574
|
export declare function firestoreDate(config?: FirestoreDateFieldConfig): FirestoreModelFieldMapFunctionsConfig<Date, string>;
|
|
@@ -562,19 +584,22 @@ export type OptionalFirestoreDateFieldConfig = OptionalFirestoreFieldConfig<Date
|
|
|
562
584
|
*
|
|
563
585
|
* Handles conversion between JavaScript Date objects and ISO8601 strings stored in Firestore.
|
|
564
586
|
*
|
|
565
|
-
* @param config - Configuration for the optional date field
|
|
566
|
-
* @returns A field mapping configuration for optional Date values
|
|
587
|
+
* @param config - Configuration for the optional date field.
|
|
588
|
+
* @returns A field mapping configuration for optional Date values.
|
|
589
|
+
*
|
|
567
590
|
* @dbxModelSnapshotField
|
|
568
591
|
* @dbxModelSnapshotFieldCategory date
|
|
569
592
|
* @dbxModelSnapshotFieldOptional true
|
|
570
593
|
* @dbxModelSnapshotFieldTags date, time, iso, optional, factory
|
|
571
594
|
* @dbxModelSnapshotFieldRelated firestore-date
|
|
595
|
+
*
|
|
572
596
|
* @example
|
|
573
597
|
* ```ts
|
|
574
598
|
* fields: {
|
|
575
599
|
* deletedAt: optionalFirestoreDate()
|
|
576
600
|
* }
|
|
577
601
|
* ```
|
|
602
|
+
*
|
|
578
603
|
* @__NO_SIDE_EFFECTS__
|
|
579
604
|
*/
|
|
580
605
|
export declare function optionalFirestoreDate(config?: OptionalFirestoreDateFieldConfig): FirestoreModelFieldMapFunctionsConfig<Maybe<Date>, Maybe<string>>;
|
|
@@ -601,12 +626,14 @@ export type FirestoreDateNumberFieldConfig = DefaultMapConfiguredFirestoreFieldC
|
|
|
601
626
|
* Handles conversion between JavaScript Date objects and numeric representations
|
|
602
627
|
* using the provided `fromDate`/`toDate` conversion functions.
|
|
603
628
|
*
|
|
604
|
-
* @param config - Configuration including custom Date-to-number conversion functions
|
|
605
|
-
* @returns A field mapping configuration for Date values stored as numbers
|
|
629
|
+
* @param config - Configuration including custom Date-to-number conversion functions.
|
|
630
|
+
* @returns A field mapping configuration for Date values stored as numbers.
|
|
631
|
+
*
|
|
606
632
|
* @dbxModelSnapshotField
|
|
607
633
|
* @dbxModelSnapshotFieldCategory date
|
|
608
634
|
* @dbxModelSnapshotFieldTags date, number, timestamp, factory
|
|
609
635
|
* @dbxModelSnapshotFieldRelated optional-firestore-date-number, firestore-unix-date-time-seconds-number
|
|
636
|
+
*
|
|
610
637
|
* @__NO_SIDE_EFFECTS__
|
|
611
638
|
*/
|
|
612
639
|
export declare function firestoreDateNumber(config: FirestoreDateNumberFieldConfig): FirestoreModelFieldMapFunctionsConfig<Date, number>;
|
|
@@ -620,13 +647,15 @@ export type OptionalFirestoreDateNumberFieldConfig = OptionalFirestoreFieldConfi
|
|
|
620
647
|
/**
|
|
621
648
|
* Creates a field mapping configuration for optional Firestore date field that is stored as a number.
|
|
622
649
|
*
|
|
623
|
-
* @param config - Configuration for the optional date field
|
|
624
|
-
* @returns A field mapping configuration for optional Date values
|
|
650
|
+
* @param config - Configuration for the optional date field.
|
|
651
|
+
* @returns A field mapping configuration for optional Date values.
|
|
652
|
+
*
|
|
625
653
|
* @dbxModelSnapshotField
|
|
626
654
|
* @dbxModelSnapshotFieldCategory date
|
|
627
655
|
* @dbxModelSnapshotFieldOptional true
|
|
628
656
|
* @dbxModelSnapshotFieldTags date, number, timestamp, optional, factory
|
|
629
657
|
* @dbxModelSnapshotFieldRelated firestore-date-number
|
|
658
|
+
*
|
|
630
659
|
* @__NO_SIDE_EFFECTS__
|
|
631
660
|
*/
|
|
632
661
|
export declare function optionalFirestoreDateNumber(config: OptionalFirestoreDateNumberFieldConfig): FirestoreModelFieldMapFunctionsConfig<Maybe<Date>, Maybe<number>>;
|
|
@@ -634,8 +663,9 @@ export type FirestoreUnixDateTimeSecondsNumberFieldConfig = Omit<FirestoreDateNu
|
|
|
634
663
|
/**
|
|
635
664
|
* Creates a field mapping configuration for Firestore Date fields that are stored as a UnixDateTimeSecondsNumber.
|
|
636
665
|
*
|
|
637
|
-
* @param config - Configuration for the date field
|
|
638
|
-
* @returns A field mapping configuration for Date values
|
|
666
|
+
* @param config - Configuration for the date field.
|
|
667
|
+
* @returns A field mapping configuration for Date values.
|
|
668
|
+
*
|
|
639
669
|
* @__NO_SIDE_EFFECTS__
|
|
640
670
|
*/
|
|
641
671
|
export declare function firestoreUnixDateTimeSecondsNumber(config: FirestoreUnixDateTimeSecondsNumberFieldConfig): FirestoreModelFieldMapFunctionsConfig<Date, number>;
|
|
@@ -643,8 +673,9 @@ export type OptionalFirestoreUnixDateTimeSecondsNumberFieldConfig = Omit<Optiona
|
|
|
643
673
|
/**
|
|
644
674
|
* Creates a field mapping configuration for optional Firestore Date fields that are stored as a UnixDateTimeSecondsNumber.
|
|
645
675
|
*
|
|
646
|
-
* @param config - Configuration for the optional date field
|
|
647
|
-
* @returns A field mapping configuration for optional Date values
|
|
676
|
+
* @param config - Configuration for the optional date field.
|
|
677
|
+
* @returns A field mapping configuration for optional Date values.
|
|
678
|
+
*
|
|
648
679
|
* @__NO_SIDE_EFFECTS__
|
|
649
680
|
*/
|
|
650
681
|
export declare function optionalFirestoreUnixDateTimeSecondsNumber(config?: OptionalFirestoreUnixDateTimeSecondsNumberFieldConfig): FirestoreModelFieldMapFunctionsConfig<Maybe<Date>, Maybe<number>>;
|
|
@@ -655,18 +686,21 @@ export type FirestoreBooleanFieldConfig = MapConfiguredFirestoreFieldConfigWithD
|
|
|
655
686
|
/**
|
|
656
687
|
* Creates a field mapping configuration for Firestore boolean fields.
|
|
657
688
|
*
|
|
658
|
-
* @param config - Configuration for the boolean field
|
|
659
|
-
* @returns A field mapping configuration for boolean values
|
|
689
|
+
* @param config - Configuration for the boolean field.
|
|
690
|
+
* @returns A field mapping configuration for boolean values.
|
|
691
|
+
*
|
|
660
692
|
* @dbxModelSnapshotField
|
|
661
693
|
* @dbxModelSnapshotFieldCategory primitive
|
|
662
694
|
* @dbxModelSnapshotFieldTags boolean, flag, factory
|
|
663
695
|
* @dbxModelSnapshotFieldRelated optional-firestore-boolean
|
|
696
|
+
*
|
|
664
697
|
* @example
|
|
665
698
|
* ```ts
|
|
666
699
|
* fields: {
|
|
667
700
|
* active: firestoreBoolean({ default: true })
|
|
668
701
|
* }
|
|
669
702
|
* ```
|
|
703
|
+
*
|
|
670
704
|
* @__NO_SIDE_EFFECTS__
|
|
671
705
|
*/
|
|
672
706
|
export declare function firestoreBoolean(config: FirestoreBooleanFieldConfig): FirestoreModelFieldMapFunctionsConfig<boolean, boolean>;
|
|
@@ -677,19 +711,22 @@ export type OptionalFirestoreBooleanFieldConfig = OptionalOneTypeFirestoreFieldC
|
|
|
677
711
|
/**
|
|
678
712
|
* Creates a field mapping configuration for optional Firestore boolean fields.
|
|
679
713
|
*
|
|
680
|
-
* @param config - Configuration for the optional boolean field
|
|
681
|
-
* @returns A field mapping configuration for optional boolean values
|
|
714
|
+
* @param config - Configuration for the optional boolean field.
|
|
715
|
+
* @returns A field mapping configuration for optional boolean values.
|
|
716
|
+
*
|
|
682
717
|
* @dbxModelSnapshotField
|
|
683
718
|
* @dbxModelSnapshotFieldCategory primitive
|
|
684
719
|
* @dbxModelSnapshotFieldOptional true
|
|
685
720
|
* @dbxModelSnapshotFieldTags boolean, flag, optional, dontstore, factory
|
|
686
721
|
* @dbxModelSnapshotFieldRelated firestore-boolean
|
|
722
|
+
*
|
|
687
723
|
* @example
|
|
688
724
|
* ```ts
|
|
689
725
|
* fields: {
|
|
690
726
|
* ns: optionalFirestoreBoolean()
|
|
691
727
|
* }
|
|
692
728
|
* ```
|
|
729
|
+
*
|
|
693
730
|
* @__NO_SIDE_EFFECTS__
|
|
694
731
|
*/
|
|
695
732
|
export declare function optionalFirestoreBoolean(config?: OptionalFirestoreBooleanFieldConfig): FirestoreModelFieldMapFunctionsConfig<Maybe<boolean>, Maybe<boolean>>;
|
|
@@ -711,19 +748,22 @@ export interface FirestoreNumberConfig<N extends number = number> extends MapCon
|
|
|
711
748
|
/**
|
|
712
749
|
* Creates a field mapping configuration for Firestore number fields.
|
|
713
750
|
*
|
|
714
|
-
* @
|
|
715
|
-
* @
|
|
716
|
-
*
|
|
751
|
+
* @param config - Configuration for the number field.
|
|
752
|
+
* @returns A field mapping configuration for number values.
|
|
753
|
+
*
|
|
717
754
|
* @dbxModelSnapshotField
|
|
718
755
|
* @dbxModelSnapshotFieldCategory primitive
|
|
719
756
|
* @dbxModelSnapshotFieldTags number, integer, transform, factory
|
|
720
757
|
* @dbxModelSnapshotFieldRelated optional-firestore-number
|
|
758
|
+
* @template N - Number type for the field (defaults to number)
|
|
759
|
+
*
|
|
721
760
|
* @example
|
|
722
761
|
* ```ts
|
|
723
762
|
* fields: {
|
|
724
763
|
* count: firestoreNumber({ default: 0 })
|
|
725
764
|
* }
|
|
726
765
|
* ```
|
|
766
|
+
*
|
|
727
767
|
* @__NO_SIDE_EFFECTS__
|
|
728
768
|
*/
|
|
729
769
|
export declare function firestoreNumber<N extends number = number>(config: FirestoreNumberConfig<N>): FirestoreModelFieldMapFunctionsConfig<N, N>;
|
|
@@ -736,14 +776,16 @@ export type OptionalFirestoreNumberFieldConfig<N extends number = number> = Opti
|
|
|
736
776
|
/**
|
|
737
777
|
* Creates a field mapping configuration for optional Firestore number fields.
|
|
738
778
|
*
|
|
739
|
-
* @
|
|
740
|
-
* @
|
|
741
|
-
*
|
|
779
|
+
* @param config - Configuration for the optional number field.
|
|
780
|
+
* @returns A field mapping configuration for optional number values.
|
|
781
|
+
*
|
|
742
782
|
* @dbxModelSnapshotField
|
|
743
783
|
* @dbxModelSnapshotFieldCategory primitive
|
|
744
784
|
* @dbxModelSnapshotFieldOptional true
|
|
745
785
|
* @dbxModelSnapshotFieldTags number, integer, optional, transform, factory
|
|
746
786
|
* @dbxModelSnapshotFieldRelated firestore-number
|
|
787
|
+
* @template N - Number type for the field (defaults to number)
|
|
788
|
+
*
|
|
747
789
|
* @__NO_SIDE_EFFECTS__
|
|
748
790
|
*/
|
|
749
791
|
export declare function optionalFirestoreNumber<N extends number = number>(config?: OptionalFirestoreNumberFieldConfig<N>): FirestoreModelFieldMapFunctionsConfig<Maybe<N>, Maybe<N>>;
|
|
@@ -759,9 +801,14 @@ export type FirestoreArrayFieldConfig<T> = DefaultMapConfiguredFirestoreFieldCon
|
|
|
759
801
|
* Defaults to an empty array when the field is missing. Supports optional sorting
|
|
760
802
|
* via `sortWith` which is applied on both read and write.
|
|
761
803
|
*
|
|
804
|
+
* @param config - Configuration for the array field.
|
|
805
|
+
* @returns A field mapping configuration for array values.
|
|
806
|
+
*
|
|
807
|
+
* @dbxModelSnapshotField
|
|
808
|
+
* @dbxModelSnapshotFieldCategory array
|
|
809
|
+
* @dbxModelSnapshotFieldTags array, list, sort, factory
|
|
810
|
+
* @dbxModelSnapshotFieldRelated optional-firestore-array, firestore-unique-array
|
|
762
811
|
* @template T - Type of elements in the array
|
|
763
|
-
* @param config - Configuration for the array field
|
|
764
|
-
* @returns A field mapping configuration for array values
|
|
765
812
|
*
|
|
766
813
|
* @example
|
|
767
814
|
* ```ts
|
|
@@ -770,10 +817,7 @@ export type FirestoreArrayFieldConfig<T> = DefaultMapConfiguredFirestoreFieldCon
|
|
|
770
817
|
* sortWith: (a, b) => a.localeCompare(b)
|
|
771
818
|
* });
|
|
772
819
|
* ```
|
|
773
|
-
*
|
|
774
|
-
* @dbxModelSnapshotFieldCategory array
|
|
775
|
-
* @dbxModelSnapshotFieldTags array, list, sort, factory
|
|
776
|
-
* @dbxModelSnapshotFieldRelated optional-firestore-array, firestore-unique-array
|
|
820
|
+
*
|
|
777
821
|
* @__NO_SIDE_EFFECTS__
|
|
778
822
|
*/
|
|
779
823
|
export declare function firestoreArray<T>(config: FirestoreArrayFieldConfig<T>): FirestoreModelFieldMapFunctionsConfig<T[], T[]>;
|
|
@@ -803,20 +847,23 @@ export type OptionalFirestoreArrayFieldConfig<T> = Omit<OptionalFirestoreFieldCo
|
|
|
803
847
|
*
|
|
804
848
|
* Supports unique filtering and conditional storage based on array content.
|
|
805
849
|
*
|
|
806
|
-
* @
|
|
807
|
-
* @
|
|
808
|
-
*
|
|
850
|
+
* @param config - Configuration for the optional array field.
|
|
851
|
+
* @returns A field mapping configuration for optional array values.
|
|
852
|
+
*
|
|
809
853
|
* @dbxModelSnapshotField
|
|
810
854
|
* @dbxModelSnapshotFieldCategory array
|
|
811
855
|
* @dbxModelSnapshotFieldOptional true
|
|
812
856
|
* @dbxModelSnapshotFieldTags array, list, optional, unique, dontstore, factory
|
|
813
857
|
* @dbxModelSnapshotFieldRelated firestore-array
|
|
858
|
+
* @template T - Type of elements in the array
|
|
859
|
+
*
|
|
814
860
|
* @example
|
|
815
861
|
* ```ts
|
|
816
862
|
* fields: {
|
|
817
863
|
* tags: optionalFirestoreArray<string>({ filterUnique: true, dontStoreIfEmpty: true })
|
|
818
864
|
* }
|
|
819
865
|
* ```
|
|
866
|
+
*
|
|
820
867
|
* @__NO_SIDE_EFFECTS__
|
|
821
868
|
*/
|
|
822
869
|
export declare function optionalFirestoreArray<T>(config?: OptionalFirestoreArrayFieldConfig<T>): FirestoreModelFieldMapFunctionsConfig<Maybe<T[]>, Maybe<T[]>>;
|
|
@@ -835,10 +882,12 @@ export type FirestoreUniqueArrayFieldConfig<T, K extends PrimativeKey = T extend
|
|
|
835
882
|
/**
|
|
836
883
|
* Creates a field mapping configuration for Firestore array fields with unique filtering.
|
|
837
884
|
*
|
|
885
|
+
* @param config - Configuration for the unique array field.
|
|
886
|
+
* @returns A field mapping configuration for unique array values.
|
|
887
|
+
*
|
|
838
888
|
* @template T - Type of elements in the array
|
|
839
889
|
* @template K - Key type for filtering uniqueness
|
|
840
|
-
*
|
|
841
|
-
* @returns A field mapping configuration for unique array values
|
|
890
|
+
*
|
|
842
891
|
* @__NO_SIDE_EFFECTS__
|
|
843
892
|
*/
|
|
844
893
|
export declare function firestoreUniqueArray<T, K extends PrimativeKey = T extends PrimativeKey ? T : PrimativeKey>(config: FirestoreUniqueArrayFieldConfig<T, K>): FirestoreModelFieldMapFunctionsConfig<T[], T[]>;
|
|
@@ -857,10 +906,12 @@ export type FirestoreUniqueKeyedArrayFieldConfig<T, K extends PrimativeKey = Pri
|
|
|
857
906
|
/**
|
|
858
907
|
* Creates a field mapping configuration for Firestore array fields with unique filtering based on a key function.
|
|
859
908
|
*
|
|
909
|
+
* @param config - Configuration for the keyed unique array field.
|
|
910
|
+
* @returns A field mapping configuration for keyed unique array values.
|
|
911
|
+
*
|
|
860
912
|
* @template T - Type of elements in the array
|
|
861
913
|
* @template K - Type of the key used for uniqueness
|
|
862
|
-
*
|
|
863
|
-
* @returns A field mapping configuration for keyed unique array values
|
|
914
|
+
*
|
|
864
915
|
* @__NO_SIDE_EFFECTS__
|
|
865
916
|
*/
|
|
866
917
|
export declare function firestoreUniqueKeyedArray<T, K extends PrimativeKey = PrimativeKey>(config: FirestoreUniqueKeyedArrayFieldConfig<T, K>): FirestoreModelFieldMapFunctionsConfig<T[], T[]>;
|
|
@@ -873,12 +924,14 @@ export type FirestoreEnumArrayFieldConfig<S extends string | number> = Omit<Fire
|
|
|
873
924
|
/**
|
|
874
925
|
* Creates a field mapping configuration for Firestore array fields of unique enum values.
|
|
875
926
|
*
|
|
876
|
-
* @
|
|
877
|
-
* @
|
|
878
|
-
*
|
|
927
|
+
* @param config - Configuration for the enum array field.
|
|
928
|
+
* @returns A field mapping configuration for enum array values.
|
|
929
|
+
*
|
|
879
930
|
* @dbxModelSnapshotField
|
|
880
931
|
* @dbxModelSnapshotFieldCategory array
|
|
881
932
|
* @dbxModelSnapshotFieldTags array, enum, unique, flags, tags, factory
|
|
933
|
+
* @template S - Enum type (string or number)
|
|
934
|
+
*
|
|
882
935
|
* @__NO_SIDE_EFFECTS__
|
|
883
936
|
*/
|
|
884
937
|
export declare function firestoreEnumArray<S extends string | number>(config?: FirestoreEnumArrayFieldConfig<S>): FirestoreModelFieldMapFunctionsConfig<S[], S[]>;
|
|
@@ -891,9 +944,11 @@ export type FirestoreUniqueStringArrayFieldConfig<S extends string = string> = O
|
|
|
891
944
|
/**
|
|
892
945
|
* Creates a field mapping configuration for Firestore array fields of unique string values.
|
|
893
946
|
*
|
|
947
|
+
* @param config - Configuration for the unique string array field.
|
|
948
|
+
* @returns A field mapping configuration for unique string array values.
|
|
949
|
+
*
|
|
894
950
|
* @template S - String type (defaults to string)
|
|
895
|
-
*
|
|
896
|
-
* @returns A field mapping configuration for unique string array values
|
|
951
|
+
*
|
|
897
952
|
* @__NO_SIDE_EFFECTS__
|
|
898
953
|
*/
|
|
899
954
|
export declare function firestoreUniqueStringArray<S extends string = string>(config?: FirestoreUniqueStringArrayFieldConfig<S>): FirestoreModelFieldMapFunctionsConfig<S[], S[]>;
|
|
@@ -929,9 +984,11 @@ export type FirestoreUniqueNumberArrayFieldConfig<S extends number = number> = O
|
|
|
929
984
|
/**
|
|
930
985
|
* Creates a field mapping configuration for Firestore array fields of unique number values.
|
|
931
986
|
*
|
|
987
|
+
* @param config - Configuration for the unique number array field.
|
|
988
|
+
* @returns A field mapping configuration for unique number array values.
|
|
989
|
+
*
|
|
932
990
|
* @template S - Number type (defaults to number)
|
|
933
|
-
*
|
|
934
|
-
* @returns A field mapping configuration for unique number array values
|
|
991
|
+
*
|
|
935
992
|
* @__NO_SIDE_EFFECTS__
|
|
936
993
|
*/
|
|
937
994
|
export declare function firestoreUniqueNumberArray<S extends number = number>(config?: FirestoreUniqueNumberArrayFieldConfig<S>): FirestoreModelFieldMapFunctionsConfig<S[], S[]>;
|
|
@@ -962,10 +1019,12 @@ export type FirestoreEncodedArrayFieldConfig<T, E extends string | number> = Def
|
|
|
962
1019
|
* Encodes model values to string or number representations for storage, and decodes them on read.
|
|
963
1020
|
* Useful when the model type is richer than what should be stored directly in Firestore.
|
|
964
1021
|
*
|
|
1022
|
+
* @param config - Configuration for the encoded array field.
|
|
1023
|
+
* @returns A field mapping configuration for encoded array values.
|
|
1024
|
+
*
|
|
965
1025
|
* @template T - Type of elements in the model array
|
|
966
1026
|
* @template E - Type of encoded elements in Firestore (string or number)
|
|
967
|
-
*
|
|
968
|
-
* @returns A field mapping configuration for encoded array values
|
|
1027
|
+
*
|
|
969
1028
|
* @__NO_SIDE_EFFECTS__
|
|
970
1029
|
*/
|
|
971
1030
|
export declare function firestoreEncodedArray<T, E extends string | number>(config: FirestoreEncodedArrayFieldConfig<T, E>): FirestoreModelFieldMapFunctionsConfig<T[], E[]>;
|
|
@@ -987,10 +1046,12 @@ export type FirestoreDencoderArrayFieldConfig<D extends PrimativeKey, E extends
|
|
|
987
1046
|
* The dencoder is a single function that handles both encoding (model → Firestore) and decoding
|
|
988
1047
|
* (Firestore → model) directions, leveraging {@link PrimativeKeyDencoderFunction}.
|
|
989
1048
|
*
|
|
1049
|
+
* @param config - Configuration for the decoder array field.
|
|
1050
|
+
* @returns A field mapping configuration for encoded primative key array values.
|
|
1051
|
+
*
|
|
990
1052
|
* @template D - Type of decoded elements in the model array
|
|
991
1053
|
* @template E - Type of encoded elements in Firestore
|
|
992
|
-
*
|
|
993
|
-
* @returns A field mapping configuration for encoded primative key array values
|
|
1054
|
+
*
|
|
994
1055
|
* @__NO_SIDE_EFFECTS__
|
|
995
1056
|
*/
|
|
996
1057
|
export declare function firestoreDencoderArray<D extends PrimativeKey, E extends PrimativeKey>(config: FirestoreDencoderArrayFieldConfig<D, E>): FirestoreModelFieldMapFunctionsConfig<D[], E[]>;
|
|
@@ -1012,11 +1073,13 @@ export type FirestoreDencoderStringArrayFieldConfig<D extends PrimativeKey, E ex
|
|
|
1012
1073
|
*
|
|
1013
1074
|
* An array that is stored as an encoded string using a PrimativeKeyDencoderString configuration.
|
|
1014
1075
|
*
|
|
1076
|
+
* @param config - Configuration for the string decoder array field.
|
|
1077
|
+
* @returns A field mapping configuration for string-encoded primative key array values.
|
|
1078
|
+
*
|
|
1015
1079
|
* @template D - Type of decoded elements in the model array
|
|
1016
1080
|
* @template E - Type of encoded elements (intermediate representation)
|
|
1017
1081
|
* @template S - String type for storage in Firestore
|
|
1018
|
-
*
|
|
1019
|
-
* @returns A field mapping configuration for string-encoded primative key array values
|
|
1082
|
+
*
|
|
1020
1083
|
* @__NO_SIDE_EFFECTS__
|
|
1021
1084
|
*/
|
|
1022
1085
|
export declare function firestoreDencoderStringArray<D extends PrimativeKey, E extends PrimativeKey, S extends string = string>(config: FirestoreDencoderStringArrayFieldConfig<D, E, S>): FirestoreModelFieldMapFunctionsConfig<D[], S>;
|
|
@@ -1048,10 +1111,14 @@ export type FirestoreMapFieldConfig<T, K extends string = string> = DefaultMapCo
|
|
|
1048
1111
|
* By default, removes all null/undefined keys from the object before saving to Firestore.
|
|
1049
1112
|
* Defaults to an empty object `{}` when the field is missing.
|
|
1050
1113
|
*
|
|
1114
|
+
* @param config - Configuration for the map field.
|
|
1115
|
+
* @returns A field mapping configuration for map values.
|
|
1116
|
+
*
|
|
1117
|
+
* @dbxModelSnapshotField
|
|
1118
|
+
* @dbxModelSnapshotFieldCategory map
|
|
1119
|
+
* @dbxModelSnapshotFieldTags map, record, dictionary, dict, factory
|
|
1051
1120
|
* @template T - Value type in the map
|
|
1052
1121
|
* @template K - Key type (must be string, as Firestore maps only have string keys)
|
|
1053
|
-
* @param config - Configuration for the map field
|
|
1054
|
-
* @returns A field mapping configuration for map values
|
|
1055
1122
|
*
|
|
1056
1123
|
* @example
|
|
1057
1124
|
* ```ts
|
|
@@ -1060,9 +1127,7 @@ export type FirestoreMapFieldConfig<T, K extends string = string> = DefaultMapCo
|
|
|
1060
1127
|
* mapFilter: KeyValueTypleValueFilter.EMPTY
|
|
1061
1128
|
* });
|
|
1062
1129
|
* ```
|
|
1063
|
-
*
|
|
1064
|
-
* @dbxModelSnapshotFieldCategory map
|
|
1065
|
-
* @dbxModelSnapshotFieldTags map, record, dictionary, dict, factory
|
|
1130
|
+
*
|
|
1066
1131
|
* @__NO_SIDE_EFFECTS__
|
|
1067
1132
|
*/
|
|
1068
1133
|
export declare function firestoreMap<T, K extends string = string>(config?: FirestoreMapFieldConfig<T, K>): FirestoreModelFieldMapFunctionsConfig<FirestoreMapFieldType<T, K>, FirestoreMapFieldType<T, K>>;
|
|
@@ -1071,7 +1136,8 @@ export declare function firestoreMap<T, K extends string = string>(config?: Fire
|
|
|
1071
1136
|
*
|
|
1072
1137
|
* Filters out models with no/null roles by default.
|
|
1073
1138
|
*
|
|
1074
|
-
* @returns A field mapping configuration for a map of granted roles keyed by FirestoreModelKey
|
|
1139
|
+
* @returns A field mapping configuration for a map of granted roles keyed by FirestoreModelKey.
|
|
1140
|
+
*
|
|
1075
1141
|
* @__NO_SIDE_EFFECTS__
|
|
1076
1142
|
*/
|
|
1077
1143
|
export declare function firestoreModelKeyGrantedRoleMap<R extends GrantedRole>(): FirestoreModelFieldMapFunctionsConfig<FirestoreMapFieldType<R, string>, FirestoreMapFieldType<R, string>>;
|
|
@@ -1107,11 +1173,13 @@ export type FirestoreEncodedObjectMapFieldConfig<T, E, S extends string = string
|
|
|
1107
1173
|
* Each value in the map is encoded/decoded using the provided `encoder`/`decoder` functions.
|
|
1108
1174
|
* By default, removes all empty/null keys from the map before saving.
|
|
1109
1175
|
*
|
|
1176
|
+
* @param config - Configuration including encoder/decoder functions.
|
|
1177
|
+
* @returns A field mapping configuration for encoded map values.
|
|
1178
|
+
*
|
|
1110
1179
|
* @template T - Decoded value type in the model
|
|
1111
1180
|
* @template E - Encoded value type in Firestore
|
|
1112
1181
|
* @template S - Key type (string, defaults to string)
|
|
1113
|
-
*
|
|
1114
|
-
* @returns A field mapping configuration for encoded map values
|
|
1182
|
+
*
|
|
1115
1183
|
* @__NO_SIDE_EFFECTS__
|
|
1116
1184
|
*/
|
|
1117
1185
|
export declare function firestoreEncodedObjectMap<T, E, S extends string = string>(config: FirestoreEncodedObjectMapFieldConfig<T, E, S>): FirestoreModelFieldMapFunctionsConfig<FirestoreEncodedObjectMapFieldValueType<T, S>, FirestoreMapFieldType<E, S>>;
|
|
@@ -1128,11 +1196,13 @@ export type FirestoreDencoderMapFieldConfig<D extends PrimativeKey, E extends Pr
|
|
|
1128
1196
|
* Similar to {@link firestoreEncodedObjectMap} but uses a single dencoder function for both
|
|
1129
1197
|
* encoding and decoding directions. By default, removes all empty/null keys from the map before saving.
|
|
1130
1198
|
*
|
|
1199
|
+
* @param config - Configuration including the dencoder function.
|
|
1200
|
+
* @returns A field mapping configuration for dencoder-mapped values.
|
|
1201
|
+
*
|
|
1131
1202
|
* @template D - Decoded primative key type
|
|
1132
1203
|
* @template E - Encoded primative key type
|
|
1133
1204
|
* @template S - Key type for the map (string, defaults to string)
|
|
1134
|
-
*
|
|
1135
|
-
* @returns A field mapping configuration for dencoder-mapped values
|
|
1205
|
+
*
|
|
1136
1206
|
* @__NO_SIDE_EFFECTS__
|
|
1137
1207
|
*/
|
|
1138
1208
|
export declare function firestoreDencoderMap<D extends PrimativeKey, E extends PrimativeKey, S extends string = string>(config: FirestoreDencoderMapFieldConfig<D, E, S>): FirestoreModelFieldMapFunctionsConfig<FirestoreEncodedObjectMapFieldValueType<D[], S>, FirestoreMapFieldType<E, S>>;
|
|
@@ -1141,8 +1211,9 @@ export declare function firestoreDencoderMap<D extends PrimativeKey, E extends P
|
|
|
1141
1211
|
*
|
|
1142
1212
|
* Filters out models with empty/no roles by default.
|
|
1143
1213
|
*
|
|
1144
|
-
* @param dencoder - The dencoder function used to encode and decode the role values
|
|
1145
|
-
* @returns A field mapping configuration for an encoded granted role map keyed by FirestoreModelKey
|
|
1214
|
+
* @param dencoder - The dencoder function used to encode and decode the role values.
|
|
1215
|
+
* @returns A field mapping configuration for an encoded granted role map keyed by FirestoreModelKey.
|
|
1216
|
+
*
|
|
1146
1217
|
* @__NO_SIDE_EFFECTS__
|
|
1147
1218
|
*/
|
|
1148
1219
|
export declare function firestoreModelKeyEncodedGrantedRoleMap<D extends GrantedRole, E extends string>(dencoder: PrimativeKeyStringDencoderFunction<D, E>): FirestoreModelFieldMapFunctionsConfig<FirestoreEncodedObjectMapFieldValueType<D[], string>, FirestoreMapFieldType<E, string>>;
|
|
@@ -1156,13 +1227,15 @@ export type FirestoreArrayMapFieldConfig<T, K extends string = string> = Firesto
|
|
|
1156
1227
|
*
|
|
1157
1228
|
* Defaults to filtering empty arrays and null/undefined elements from each array before saving.
|
|
1158
1229
|
*
|
|
1159
|
-
* @
|
|
1160
|
-
* @
|
|
1161
|
-
*
|
|
1162
|
-
* @returns A field mapping configuration for map values with array entries
|
|
1230
|
+
* @param config - Configuration for the array map field.
|
|
1231
|
+
* @returns A field mapping configuration for map values with array entries.
|
|
1232
|
+
*
|
|
1163
1233
|
* @dbxModelSnapshotField
|
|
1164
1234
|
* @dbxModelSnapshotFieldCategory map
|
|
1165
1235
|
* @dbxModelSnapshotFieldTags map, array, lookup, multi-value, factory
|
|
1236
|
+
* @template T - Element type in the array values
|
|
1237
|
+
* @template K - Key type for the map (string)
|
|
1238
|
+
*
|
|
1166
1239
|
* @__NO_SIDE_EFFECTS__
|
|
1167
1240
|
*/
|
|
1168
1241
|
export declare function firestoreArrayMap<T, K extends string = string>(config?: FirestoreArrayMapFieldConfig<T, K>): FirestoreModelFieldMapFunctionsConfig<FirestoreMapFieldType<T[], K>, FirestoreMapFieldType<T[], K>>;
|
|
@@ -1171,7 +1244,8 @@ export declare function firestoreArrayMap<T, K extends string = string>(config?:
|
|
|
1171
1244
|
*
|
|
1172
1245
|
* Filters empty roles/arrays by default.
|
|
1173
1246
|
*
|
|
1174
|
-
* @returns A field mapping configuration for a map of granted role arrays keyed by FirestoreModelKey
|
|
1247
|
+
* @returns A field mapping configuration for a map of granted role arrays keyed by FirestoreModelKey.
|
|
1248
|
+
*
|
|
1175
1249
|
* @__NO_SIDE_EFFECTS__
|
|
1176
1250
|
*/
|
|
1177
1251
|
export declare function firestoreModelKeyGrantedRoleArrayMap<R extends GrantedRole>(): FirestoreModelFieldMapFunctionsConfig<FirestoreMapFieldType<R[], string>, FirestoreMapFieldType<R[], string>>;
|
|
@@ -1212,8 +1286,9 @@ export type FirestoreObjectArrayFieldConfigFirestoreFieldInput<T extends object,
|
|
|
1212
1286
|
* Used internally by {@link firestoreObjectArray} to adapt field configs into the map functions
|
|
1213
1287
|
* format needed for array element conversion.
|
|
1214
1288
|
*
|
|
1215
|
-
* @param config - The FirestoreModelFieldMapFunctionsConfig to convert
|
|
1216
|
-
* @returns A ModelMapFunctionsRef wrapping the derived map functions
|
|
1289
|
+
* @param config - The FirestoreModelFieldMapFunctionsConfig to convert.
|
|
1290
|
+
* @returns A ModelMapFunctionsRef wrapping the derived map functions.
|
|
1291
|
+
*
|
|
1217
1292
|
* @__NO_SIDE_EFFECTS__
|
|
1218
1293
|
*/
|
|
1219
1294
|
export declare function firestoreFieldConfigToModelMapFunctionsRef<T extends object, O extends object = FirestoreModelData<T>>(config: FirestoreModelFieldMapFunctionsConfig<T, O>): ModelMapFunctionsRef<T, O>;
|
|
@@ -1226,10 +1301,15 @@ export declare function firestoreFieldConfigToModelMapFunctionsRef<T extends obj
|
|
|
1226
1301
|
*
|
|
1227
1302
|
* On write, null/undefined values are filtered from each object to match Firestore semantics.
|
|
1228
1303
|
*
|
|
1304
|
+
* @param config - Configuration including element conversions and optional filtering/sorting.
|
|
1305
|
+
* @returns A field mapping configuration for object array values.
|
|
1306
|
+
*
|
|
1307
|
+
* @dbxModelSnapshotField
|
|
1308
|
+
* @dbxModelSnapshotFieldCategory object
|
|
1309
|
+
* @dbxModelSnapshotFieldTags array, object, embedded, nested, structured, factory
|
|
1310
|
+
* @dbxModelSnapshotFieldRelated firestore-sub-object
|
|
1229
1311
|
* @template T - The element model type
|
|
1230
1312
|
* @template O - The element Firestore data type (defaults to FirestoreModelData<T>)
|
|
1231
|
-
* @param config - Configuration including element conversions and optional filtering/sorting
|
|
1232
|
-
* @returns A field mapping configuration for object array values
|
|
1233
1313
|
*
|
|
1234
1314
|
* @example
|
|
1235
1315
|
* ```ts
|
|
@@ -1239,10 +1319,7 @@ export declare function firestoreFieldConfigToModelMapFunctionsRef<T extends obj
|
|
|
1239
1319
|
* sortWith: sortAscendingIndexNumberRefFunction()
|
|
1240
1320
|
* });
|
|
1241
1321
|
* ```
|
|
1242
|
-
*
|
|
1243
|
-
* @dbxModelSnapshotFieldCategory object
|
|
1244
|
-
* @dbxModelSnapshotFieldTags array, object, embedded, nested, structured, factory
|
|
1245
|
-
* @dbxModelSnapshotFieldRelated firestore-sub-object
|
|
1322
|
+
*
|
|
1246
1323
|
* @__NO_SIDE_EFFECTS__
|
|
1247
1324
|
*/
|
|
1248
1325
|
export declare function firestoreObjectArray<T extends object, O extends object = FirestoreModelData<T>>(config: FirestoreObjectArrayFieldConfig<T, O>): FirestoreModelFieldMapFunctionsConfig<T[], O[]>;
|
|
@@ -1269,10 +1346,15 @@ export type FirestoreSubObjectFieldMapFunctionsConfig<T extends object, O extend
|
|
|
1269
1346
|
* conversion of embedded documents. The `objectField` defines the conversion rules for
|
|
1270
1347
|
* the nested object's fields using the same converter patterns.
|
|
1271
1348
|
*
|
|
1349
|
+
* @param config - Configuration including nested field conversions.
|
|
1350
|
+
* @returns A field mapping configuration with both field config and map functions.
|
|
1351
|
+
*
|
|
1352
|
+
* @dbxModelSnapshotField
|
|
1353
|
+
* @dbxModelSnapshotFieldCategory object
|
|
1354
|
+
* @dbxModelSnapshotFieldTags object, nested, embedded, structured, factory
|
|
1355
|
+
* @dbxModelSnapshotFieldRelated firestore-object-array
|
|
1272
1356
|
* @template T - The nested model type
|
|
1273
1357
|
* @template O - The nested Firestore data type (defaults to FirestoreModelData<T>)
|
|
1274
|
-
* @param config - Configuration including nested field conversions
|
|
1275
|
-
* @returns A field mapping configuration with both field config and map functions
|
|
1276
1358
|
*
|
|
1277
1359
|
* @example
|
|
1278
1360
|
* ```ts
|
|
@@ -1285,15 +1367,12 @@ export type FirestoreSubObjectFieldMapFunctionsConfig<T extends object, O extend
|
|
|
1285
1367
|
* }
|
|
1286
1368
|
* });
|
|
1287
1369
|
* ```
|
|
1288
|
-
*
|
|
1289
|
-
* @dbxModelSnapshotFieldCategory object
|
|
1290
|
-
* @dbxModelSnapshotFieldTags object, nested, embedded, structured, factory
|
|
1291
|
-
* @dbxModelSnapshotFieldRelated firestore-object-array
|
|
1370
|
+
*
|
|
1292
1371
|
* @__NO_SIDE_EFFECTS__
|
|
1293
1372
|
*/
|
|
1294
1373
|
export declare function firestoreSubObject<T extends object, O extends object = FirestoreModelData<T>>(config: FirestoreSubObjectFieldConfig<T, O>): FirestoreSubObjectFieldMapFunctionsConfig<T, O>;
|
|
1295
1374
|
export interface FirestoreLatLngStringConfig extends DefaultMapConfiguredFirestoreFieldConfig<LatLngString, LatLngString> {
|
|
1296
|
-
precision?: LatLngPrecision;
|
|
1375
|
+
readonly precision?: LatLngPrecision;
|
|
1297
1376
|
}
|
|
1298
1377
|
/**
|
|
1299
1378
|
* Creates a field mapping configuration for Firestore latitude/longitude string fields.
|
|
@@ -1305,17 +1384,20 @@ export interface FirestoreLatLngStringConfig extends DefaultMapConfiguredFiresto
|
|
|
1305
1384
|
*
|
|
1306
1385
|
* Applies validation and optional precision rounding on both read and write.
|
|
1307
1386
|
*
|
|
1308
|
-
* @param config - Optional precision and default value configuration
|
|
1309
|
-
* @returns A field mapping configuration for LatLngString values
|
|
1387
|
+
* @param config - Optional precision and default value configuration.
|
|
1388
|
+
* @returns A field mapping configuration for LatLngString values.
|
|
1389
|
+
*
|
|
1310
1390
|
* @dbxModelSnapshotField
|
|
1311
1391
|
* @dbxModelSnapshotFieldCategory geo
|
|
1312
1392
|
* @dbxModelSnapshotFieldTags geo, latlng, location, coordinates, coords, geolocation, factory
|
|
1393
|
+
*
|
|
1313
1394
|
* @example
|
|
1314
1395
|
* ```ts
|
|
1315
1396
|
* fields: {
|
|
1316
1397
|
* loc: firestoreLatLngString()
|
|
1317
1398
|
* }
|
|
1318
1399
|
* ```
|
|
1400
|
+
*
|
|
1319
1401
|
* @__NO_SIDE_EFFECTS__
|
|
1320
1402
|
*/
|
|
1321
1403
|
export declare function firestoreLatLngString(config?: FirestoreLatLngStringConfig): FirestoreModelFieldMapFunctionsConfig<`${number},${number}`, `${number},${number}`>;
|
|
@@ -1336,14 +1418,16 @@ export declare const firestoreWebsiteLinkAssignFn: MapFunction<WebsiteLink, Webs
|
|
|
1336
1418
|
/**
|
|
1337
1419
|
* Creates a field mapping configuration for Firestore website link fields.
|
|
1338
1420
|
*
|
|
1339
|
-
* @returns A field mapping configuration for website link values
|
|
1421
|
+
* @returns A field mapping configuration for website link values.
|
|
1422
|
+
*
|
|
1340
1423
|
* @__NO_SIDE_EFFECTS__
|
|
1341
1424
|
*/
|
|
1342
1425
|
export declare function firestoreWebsiteLink(): FirestoreModelFieldMapFunctionsConfig<WebsiteLink, WebsiteLink>;
|
|
1343
1426
|
/**
|
|
1344
1427
|
* Creates a field mapping configuration for Firestore arrays of WebsiteLink values.
|
|
1345
1428
|
*
|
|
1346
|
-
* @returns A field mapping configuration for WebsiteLink array values
|
|
1429
|
+
* @returns A field mapping configuration for WebsiteLink array values.
|
|
1430
|
+
*
|
|
1347
1431
|
* @__NO_SIDE_EFFECTS__
|
|
1348
1432
|
*/
|
|
1349
1433
|
export declare function firestoreWebsiteLinkArray(): FirestoreModelFieldMapFunctionsConfig<WebsiteLink[], WebsiteLink[]>;
|
|
@@ -1353,21 +1437,24 @@ export declare const firestoreWebsiteFileLinkAssignFn: MapFunction<WebsiteFileLi
|
|
|
1353
1437
|
/**
|
|
1354
1438
|
* Creates a field mapping configuration for Firestore website file link fields.
|
|
1355
1439
|
*
|
|
1356
|
-
* @returns A field mapping configuration for website file link values
|
|
1440
|
+
* @returns A field mapping configuration for website file link values.
|
|
1441
|
+
*
|
|
1357
1442
|
* @__NO_SIDE_EFFECTS__
|
|
1358
1443
|
*/
|
|
1359
1444
|
export declare function firestoreWebsiteFileLink(): FirestoreModelFieldMapFunctionsConfig<WebsiteFileLink, WebsiteFileLink>;
|
|
1360
1445
|
/**
|
|
1361
1446
|
* Stores the array of WebsiteFileLink values as an array of objects.
|
|
1362
1447
|
*
|
|
1363
|
-
* @returns A field mapping configuration for WebsiteFileLink array values stored as objects
|
|
1448
|
+
* @returns A field mapping configuration for WebsiteFileLink array values stored as objects.
|
|
1449
|
+
*
|
|
1364
1450
|
* @__NO_SIDE_EFFECTS__
|
|
1365
1451
|
*/
|
|
1366
1452
|
export declare function firestoreWebsiteFileLinkObjectArray(): FirestoreModelFieldMapFunctionsConfig<WebsiteFileLink[], WebsiteFileLink[]>;
|
|
1367
1453
|
/**
|
|
1368
1454
|
* Stores the array of WebsiteFileLink values as an array of EncodedWebsiteFileLink values.
|
|
1369
1455
|
*
|
|
1370
|
-
* @returns A field mapping configuration for WebsiteFileLink array values stored in encoded form
|
|
1456
|
+
* @returns A field mapping configuration for WebsiteFileLink array values stored in encoded form.
|
|
1457
|
+
*
|
|
1371
1458
|
* @__NO_SIDE_EFFECTS__
|
|
1372
1459
|
*/
|
|
1373
1460
|
export declare function firestoreWebsiteFileLinkEncodedArray(): FirestoreModelFieldMapFunctionsConfig<WebsiteFileLink[], string[]>;
|
|
@@ -1377,15 +1464,17 @@ export declare const firestoreDateCellRangeAssignFn: MapFunction<DateCellRange,
|
|
|
1377
1464
|
/**
|
|
1378
1465
|
* Creates a field mapping configuration for Firestore date cell range fields.
|
|
1379
1466
|
*
|
|
1380
|
-
* @returns A field mapping configuration for date cell range values
|
|
1467
|
+
* @returns A field mapping configuration for date cell range values.
|
|
1468
|
+
*
|
|
1381
1469
|
* @__NO_SIDE_EFFECTS__
|
|
1382
1470
|
*/
|
|
1383
1471
|
export declare function firestoreDateCellRange(): FirestoreModelFieldMapFunctionsConfig<DateCellRange, DateCellRange>;
|
|
1384
1472
|
/**
|
|
1385
1473
|
* Creates a field mapping configuration for Firestore arrays of DateCellRange values.
|
|
1386
1474
|
*
|
|
1387
|
-
* @param sort - Whether to sort the array by index number; defaults to true
|
|
1388
|
-
* @returns A field mapping configuration for DateCellRange array values
|
|
1475
|
+
* @param sort - Whether to sort the array by index number; defaults to true.
|
|
1476
|
+
* @returns A field mapping configuration for DateCellRange array values.
|
|
1477
|
+
*
|
|
1389
1478
|
* @__NO_SIDE_EFFECTS__
|
|
1390
1479
|
*/
|
|
1391
1480
|
export declare function firestoreDateCellRangeArray(sort?: boolean): FirestoreModelFieldMapFunctionsConfig<DateCellRange[], DateCellRange[]>;
|
|
@@ -1395,7 +1484,8 @@ export declare const firestoreDateCellScheduleAssignFn: MapFunction<DateCellSche
|
|
|
1395
1484
|
/**
|
|
1396
1485
|
* Creates a field mapping configuration for Firestore date cell schedule fields.
|
|
1397
1486
|
*
|
|
1398
|
-
* @returns A field mapping configuration for date cell schedule values
|
|
1487
|
+
* @returns A field mapping configuration for date cell schedule values.
|
|
1488
|
+
*
|
|
1399
1489
|
* @__NO_SIDE_EFFECTS__
|
|
1400
1490
|
*/
|
|
1401
1491
|
export declare function firestoreDateCellSchedule(): FirestoreModelFieldMapFunctionsConfig<DateCellSchedule, DateCellSchedule>;
|
|
@@ -1407,21 +1497,23 @@ export declare const assignUnitedStatesAddressFunction: import("@dereekb/util").
|
|
|
1407
1497
|
/**
|
|
1408
1498
|
* Function to assign values from an input UnitedStatesAddress to a default UnitedStatesAddress.
|
|
1409
1499
|
*
|
|
1410
|
-
* @param input - The source UnitedStatesAddress to copy values from
|
|
1411
|
-
* @returns A new UnitedStatesAddress with values assigned from the input
|
|
1500
|
+
* @param input - The source UnitedStatesAddress to copy values from.
|
|
1501
|
+
* @returns A new UnitedStatesAddress with values assigned from the input.
|
|
1412
1502
|
*/
|
|
1413
1503
|
export declare const firestoreUnitedStatesAddressAssignFn: MapFunction<UnitedStatesAddress, UnitedStatesAddress>;
|
|
1414
1504
|
/**
|
|
1415
1505
|
* Creates a field mapping configuration for Firestore United States address fields.
|
|
1416
1506
|
*
|
|
1417
|
-
* @returns A field mapping configuration for United States address values
|
|
1507
|
+
* @returns A field mapping configuration for United States address values.
|
|
1508
|
+
*
|
|
1418
1509
|
* @__NO_SIDE_EFFECTS__
|
|
1419
1510
|
*/
|
|
1420
1511
|
export declare function firestoreUnitedStatesAddress(): FirestoreModelFieldMapFunctionsConfig<UnitedStatesAddress, UnitedStatesAddress>;
|
|
1421
1512
|
/**
|
|
1422
1513
|
* Creates a field mapping configuration for optional Firestore United States address fields.
|
|
1423
1514
|
*
|
|
1424
|
-
* @returns A field mapping configuration for optional United States address values
|
|
1515
|
+
* @returns A field mapping configuration for optional United States address values.
|
|
1516
|
+
*
|
|
1425
1517
|
* @__NO_SIDE_EFFECTS__
|
|
1426
1518
|
*/
|
|
1427
1519
|
export declare function optionalFirestoreUnitedStatesAddress(): FirestoreModelFieldMapFunctionsConfig<Maybe<UnitedStatesAddress>, Maybe<UnitedStatesAddress>>;
|
|
@@ -1447,9 +1539,11 @@ export interface FirestoreBitwiseSetConfig<D extends number = number> extends De
|
|
|
1447
1539
|
/**
|
|
1448
1540
|
* Creates a field mapping configuration for Firestore fields that store sets of numbers as bitwise-encoded values.
|
|
1449
1541
|
*
|
|
1542
|
+
* @param config - Configuration for the bitwise set field.
|
|
1543
|
+
* @returns A field mapping configuration for bitwise-encoded set values.
|
|
1544
|
+
*
|
|
1450
1545
|
* @template D - Type of number elements in the set (defaults to number)
|
|
1451
|
-
*
|
|
1452
|
-
* @returns A field mapping configuration for bitwise-encoded set values
|
|
1546
|
+
*
|
|
1453
1547
|
* @__NO_SIDE_EFFECTS__
|
|
1454
1548
|
*/
|
|
1455
1549
|
export declare function firestoreBitwiseSet<D extends number = number>(config: FirestoreBitwiseSetConfig<D>): FirestoreModelFieldMapFunctionsConfig<Set<D>, number>;
|
|
@@ -1468,10 +1562,12 @@ export interface FirestoreBitwiseSetMapConfig<D extends number = number, K exten
|
|
|
1468
1562
|
/**
|
|
1469
1563
|
* Creates a field mapping configuration for Firestore fields that map objects with bitwise-encoded set values.
|
|
1470
1564
|
*
|
|
1565
|
+
* @param config - Configuration for the bitwise set map field.
|
|
1566
|
+
* @returns A field mapping configuration for object maps with bitwise-encoded set values.
|
|
1567
|
+
*
|
|
1471
1568
|
* @template D - Type of number elements in the sets (defaults to number)
|
|
1472
1569
|
* @template K - Type of keys in the object (string)
|
|
1473
|
-
*
|
|
1474
|
-
* @returns A field mapping configuration for object maps with bitwise-encoded set values
|
|
1570
|
+
*
|
|
1475
1571
|
* @__NO_SIDE_EFFECTS__
|
|
1476
1572
|
*/
|
|
1477
1573
|
export declare function firestoreBitwiseSetMap<D extends number = number, K extends string = string>(config: FirestoreBitwiseSetMapConfig<D, K>): FirestoreModelFieldMapFunctionsConfig<FirestoreEncodedObjectMapFieldValueType<Set<D>, K>, FirestoreMapFieldType<number, K>>;
|
|
@@ -1490,10 +1586,12 @@ export interface FirestoreBitwiseObjectMapConfig<T extends object, K extends str
|
|
|
1490
1586
|
/**
|
|
1491
1587
|
* Creates a field mapping configuration for Firestore fields that map objects with bitwise-encoded object values.
|
|
1492
1588
|
*
|
|
1589
|
+
* @param config - Configuration for the bitwise object map field.
|
|
1590
|
+
* @returns A field mapping configuration for object maps with bitwise-encoded object values.
|
|
1591
|
+
*
|
|
1493
1592
|
* @template T - Type of object values in the map
|
|
1494
1593
|
* @template K - Type of keys in the object (string)
|
|
1495
|
-
*
|
|
1496
|
-
* @returns A field mapping configuration for object maps with bitwise-encoded object values
|
|
1594
|
+
*
|
|
1497
1595
|
* @__NO_SIDE_EFFECTS__
|
|
1498
1596
|
*/
|
|
1499
1597
|
export declare function firestoreBitwiseObjectMap<T extends object, K extends string = string>(config: FirestoreBitwiseObjectMapConfig<T, K>): FirestoreModelFieldMapFunctionsConfig<FirestoreEncodedObjectMapFieldValueType<T, K>, FirestoreMapFieldType<number, K>>;
|