@dereekb/dbx-components-mcp 13.11.2 → 13.11.4
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/dbx-components-mcp.js +2260 -902
- package/generated/dereekb-date.utils.mcp.generated.json +1574 -0
- package/generated/dereekb-dbx-firebase.ui-components.mcp.generated.json +33 -0
- package/generated/dereekb-firebase.model-snapshot-fields.mcp.generated.json +915 -0
- package/generated/dereekb-firebase.utils.mcp.generated.json +1429 -0
- package/generated/dereekb-util.utils.mcp.generated.json +10825 -3037
- package/package.json +11 -11
|
@@ -0,0 +1,915 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"source": "@dereekb/firebase",
|
|
4
|
+
"module": "@dereekb/firebase",
|
|
5
|
+
"generatedAt": "1970-01-01T00:00:00.000Z",
|
|
6
|
+
"generator": "@dereekb/dbx-components-mcp/scripts/generate-manifests.mjs",
|
|
7
|
+
"entries": [
|
|
8
|
+
{
|
|
9
|
+
"slug": "firestore-field",
|
|
10
|
+
"name": "firestoreField",
|
|
11
|
+
"kind": "factory",
|
|
12
|
+
"category": "primitive",
|
|
13
|
+
"module": "@dereekb/firebase",
|
|
14
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
15
|
+
"signature": "firestoreField(config: FirestoreFieldConfig<V, D>): FirestoreModelFieldMapFunctionsConfig<V, D>",
|
|
16
|
+
"description": "Creates a Firestore field mapping configuration.\n\nThis is the low-level building block that all other field converters (e.g., {@link firestoreString},\n{@link firestoreDate}) delegate to. It generates `from`/`to` mapping functions that handle defaults\nand conversions in both directions.\n\nUse the higher-level field converters for common types; use this directly only when you need a\ncustom conversion not covered by the built-in converters.",
|
|
17
|
+
"optional": false,
|
|
18
|
+
"params": [
|
|
19
|
+
{
|
|
20
|
+
"name": "config",
|
|
21
|
+
"type": "FirestoreFieldConfig<V, D>",
|
|
22
|
+
"description": "- Configuration for the Firestore field",
|
|
23
|
+
"optional": false
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"returns": "A configured mapping between model and Firestore data",
|
|
27
|
+
"tags": [
|
|
28
|
+
"base",
|
|
29
|
+
"custom",
|
|
30
|
+
"transform",
|
|
31
|
+
"default",
|
|
32
|
+
"factory",
|
|
33
|
+
"primitive",
|
|
34
|
+
"firestore",
|
|
35
|
+
"field",
|
|
36
|
+
"firestorefield"
|
|
37
|
+
],
|
|
38
|
+
"example": "// Custom field that stores a Set<string> as a comma-separated string\nconst tagsField = firestoreField<Set<string>, string>({\n default: () => new Set(),\n fromData: (csv) => new Set(csv.split(',')),\n toData: (set) => [...set].join(',')\n});",
|
|
39
|
+
"relatedSlugs": [
|
|
40
|
+
"optional-firestore-field"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"slug": "firestore-passthrough-field",
|
|
45
|
+
"name": "FIRESTORE_PASSTHROUGH_FIELD",
|
|
46
|
+
"kind": "const",
|
|
47
|
+
"category": "primitive",
|
|
48
|
+
"module": "@dereekb/firebase",
|
|
49
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
50
|
+
"signature": "const FIRESTORE_PASSTHROUGH_FIELD: ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
51
|
+
"description": "A pre-built passthrough field mapping that stores and reads values unchanged.\n\nDefaults to `null` when the field is missing. Used internally by {@link firestorePassThroughField}\nand as a fallback for {@link optionalFirestoreField} when no config is provided.",
|
|
52
|
+
"optional": false,
|
|
53
|
+
"params": [],
|
|
54
|
+
"returns": "ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
55
|
+
"tags": [
|
|
56
|
+
"passthrough",
|
|
57
|
+
"identity",
|
|
58
|
+
"raw",
|
|
59
|
+
"untransformed",
|
|
60
|
+
"builtin",
|
|
61
|
+
"primitive",
|
|
62
|
+
"firestore",
|
|
63
|
+
"field",
|
|
64
|
+
"firestore_passthrough_field"
|
|
65
|
+
],
|
|
66
|
+
"example": "fields: {\n raw: FIRESTORE_PASSTHROUGH_FIELD\n}"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"slug": "firestore-pass-through-field",
|
|
70
|
+
"name": "firestorePassThroughField",
|
|
71
|
+
"kind": "factory",
|
|
72
|
+
"category": "primitive",
|
|
73
|
+
"module": "@dereekb/firebase",
|
|
74
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
75
|
+
"signature": "firestorePassThroughField(): ModelFieldMapFunctionsConfig<T, T>",
|
|
76
|
+
"description": "Creates a pass-through field mapping configuration that doesn't transform the data.\n\nThis is useful when the model field and Firestore field are the same type and\nno transformation is needed in either direction.",
|
|
77
|
+
"optional": false,
|
|
78
|
+
"params": [],
|
|
79
|
+
"returns": "A field mapping configuration that passes values through unchanged",
|
|
80
|
+
"tags": [
|
|
81
|
+
"passthrough",
|
|
82
|
+
"identity",
|
|
83
|
+
"raw",
|
|
84
|
+
"untransformed",
|
|
85
|
+
"factory",
|
|
86
|
+
"primitive",
|
|
87
|
+
"firestore",
|
|
88
|
+
"pass",
|
|
89
|
+
"through",
|
|
90
|
+
"field",
|
|
91
|
+
"firestorepassthroughfield"
|
|
92
|
+
],
|
|
93
|
+
"example": "fields: {\n payload: firestorePassThroughField<MyType>()\n}"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"slug": "firestore-string",
|
|
97
|
+
"name": "firestoreString",
|
|
98
|
+
"kind": "factory",
|
|
99
|
+
"category": "primitive",
|
|
100
|
+
"module": "@dereekb/firebase",
|
|
101
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
102
|
+
"signature": "firestoreString(config?: FirestoreStringConfig<S>): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
103
|
+
"description": "Creates a field mapping configuration for Firestore string fields.\n\nDefaults to empty string `''` when the field is missing. Supports optional string\ntransformation (e.g., lowercase, trim) applied on both read and write.",
|
|
104
|
+
"optional": false,
|
|
105
|
+
"params": [
|
|
106
|
+
{
|
|
107
|
+
"name": "config",
|
|
108
|
+
"type": "FirestoreStringConfig<S>",
|
|
109
|
+
"description": "- Configuration for the string field",
|
|
110
|
+
"optional": true
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"returns": "A field mapping configuration for string values",
|
|
114
|
+
"tags": [
|
|
115
|
+
"string",
|
|
116
|
+
"text",
|
|
117
|
+
"transform",
|
|
118
|
+
"lowercase",
|
|
119
|
+
"factory",
|
|
120
|
+
"primitive",
|
|
121
|
+
"firestore",
|
|
122
|
+
"firestorestring"
|
|
123
|
+
],
|
|
124
|
+
"example": "// Simple string field with default\nconst nameField = firestoreString({ default: 'unnamed' });\n\n// String field with lowercase transformation\nconst emailField = firestoreString({ transform: 'lowercase' });",
|
|
125
|
+
"relatedSlugs": [
|
|
126
|
+
"optional-firestore-string"
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"slug": "optional-firestore-string",
|
|
131
|
+
"name": "optionalFirestoreString",
|
|
132
|
+
"kind": "factory",
|
|
133
|
+
"category": "primitive",
|
|
134
|
+
"module": "@dereekb/firebase",
|
|
135
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
136
|
+
"signature": "optionalFirestoreString(config?: OptionalFirestoreString<S>): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
137
|
+
"description": "Creates a field mapping configuration for optional Firestore string fields.",
|
|
138
|
+
"optional": true,
|
|
139
|
+
"params": [
|
|
140
|
+
{
|
|
141
|
+
"name": "config",
|
|
142
|
+
"type": "OptionalFirestoreString<S>",
|
|
143
|
+
"description": "- Configuration for the optional string field",
|
|
144
|
+
"optional": true
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
"returns": "A field mapping configuration for optional string values",
|
|
148
|
+
"tags": [
|
|
149
|
+
"string",
|
|
150
|
+
"text",
|
|
151
|
+
"optional",
|
|
152
|
+
"transform",
|
|
153
|
+
"factory",
|
|
154
|
+
"primitive",
|
|
155
|
+
"firestore",
|
|
156
|
+
"optionalfirestorestring"
|
|
157
|
+
],
|
|
158
|
+
"example": "fields: {\n nickname: optionalFirestoreString()\n}",
|
|
159
|
+
"relatedSlugs": [
|
|
160
|
+
"firestore-string"
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"slug": "firestore-enum",
|
|
165
|
+
"name": "firestoreEnum",
|
|
166
|
+
"kind": "factory",
|
|
167
|
+
"category": "primitive",
|
|
168
|
+
"module": "@dereekb/firebase",
|
|
169
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
170
|
+
"signature": "firestoreEnum(config: FirestoreEnumConfig<S>): FirestoreModelFieldMapFunctionsConfig<S, S>",
|
|
171
|
+
"description": "Creates a field mapping configuration for Firestore enum fields.",
|
|
172
|
+
"optional": false,
|
|
173
|
+
"params": [
|
|
174
|
+
{
|
|
175
|
+
"name": "config",
|
|
176
|
+
"type": "FirestoreEnumConfig<S>",
|
|
177
|
+
"description": "- Configuration for the enum field",
|
|
178
|
+
"optional": false
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"returns": "A field mapping configuration for enum values",
|
|
182
|
+
"tags": [
|
|
183
|
+
"enum",
|
|
184
|
+
"string",
|
|
185
|
+
"number",
|
|
186
|
+
"factory",
|
|
187
|
+
"primitive",
|
|
188
|
+
"firestore",
|
|
189
|
+
"firestoreenum"
|
|
190
|
+
],
|
|
191
|
+
"example": "fields: {\n status: firestoreEnum<UserStatus>({ default: UserStatus.Pending })\n}",
|
|
192
|
+
"relatedSlugs": [
|
|
193
|
+
"optional-firestore-enum"
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"slug": "optional-firestore-enum",
|
|
198
|
+
"name": "optionalFirestoreEnum",
|
|
199
|
+
"kind": "factory",
|
|
200
|
+
"category": "primitive",
|
|
201
|
+
"module": "@dereekb/firebase",
|
|
202
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
203
|
+
"signature": "optionalFirestoreEnum(config?: OptionalFirestoreEnumConfig<S>): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
204
|
+
"description": "Creates a field mapping configuration for optional Firestore enum fields.",
|
|
205
|
+
"optional": true,
|
|
206
|
+
"params": [
|
|
207
|
+
{
|
|
208
|
+
"name": "config",
|
|
209
|
+
"type": "OptionalFirestoreEnumConfig<S>",
|
|
210
|
+
"description": "- Configuration for the optional enum field",
|
|
211
|
+
"optional": true
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
"returns": "A field mapping configuration for optional enum values",
|
|
215
|
+
"tags": [
|
|
216
|
+
"enum",
|
|
217
|
+
"optional",
|
|
218
|
+
"string",
|
|
219
|
+
"number",
|
|
220
|
+
"factory",
|
|
221
|
+
"primitive",
|
|
222
|
+
"firestore",
|
|
223
|
+
"optionalfirestoreenum"
|
|
224
|
+
],
|
|
225
|
+
"relatedSlugs": [
|
|
226
|
+
"firestore-enum"
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"slug": "firestore-uid",
|
|
231
|
+
"name": "firestoreUID",
|
|
232
|
+
"kind": "factory",
|
|
233
|
+
"category": "model-key",
|
|
234
|
+
"module": "@dereekb/firebase",
|
|
235
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
236
|
+
"signature": "firestoreUID(): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
237
|
+
"description": "Creates a field mapping configuration for Firestore UID fields.",
|
|
238
|
+
"optional": false,
|
|
239
|
+
"params": [],
|
|
240
|
+
"returns": "A field mapping configuration for Firebase Auth user IDs",
|
|
241
|
+
"tags": [
|
|
242
|
+
"uid",
|
|
243
|
+
"user",
|
|
244
|
+
"owner",
|
|
245
|
+
"account",
|
|
246
|
+
"auth",
|
|
247
|
+
"string",
|
|
248
|
+
"factory",
|
|
249
|
+
"model-key",
|
|
250
|
+
"firestore",
|
|
251
|
+
"firestoreuid"
|
|
252
|
+
],
|
|
253
|
+
"example": "fields: {\n uid: firestoreUID()\n}",
|
|
254
|
+
"relatedSlugs": [
|
|
255
|
+
"optional-firestore-uid"
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"slug": "optional-firestore-uid",
|
|
260
|
+
"name": "optionalFirestoreUID",
|
|
261
|
+
"kind": "factory",
|
|
262
|
+
"category": "model-key",
|
|
263
|
+
"module": "@dereekb/firebase",
|
|
264
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
265
|
+
"signature": "optionalFirestoreUID(): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
266
|
+
"description": "Creates a field mapping configuration for optional Firestore UID fields.",
|
|
267
|
+
"optional": true,
|
|
268
|
+
"params": [],
|
|
269
|
+
"returns": "A field mapping configuration for optional Firebase Auth user IDs",
|
|
270
|
+
"tags": [
|
|
271
|
+
"uid",
|
|
272
|
+
"user",
|
|
273
|
+
"owner",
|
|
274
|
+
"account",
|
|
275
|
+
"auth",
|
|
276
|
+
"optional",
|
|
277
|
+
"string",
|
|
278
|
+
"factory",
|
|
279
|
+
"model-key",
|
|
280
|
+
"firestore",
|
|
281
|
+
"optionalfirestoreuid"
|
|
282
|
+
],
|
|
283
|
+
"relatedSlugs": [
|
|
284
|
+
"firestore-uid"
|
|
285
|
+
]
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"slug": "firestore-model-key-string",
|
|
289
|
+
"name": "firestoreModelKeyString",
|
|
290
|
+
"kind": "const",
|
|
291
|
+
"category": "model-key",
|
|
292
|
+
"module": "@dereekb/firebase",
|
|
293
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
294
|
+
"signature": "const firestoreModelKeyString: ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
295
|
+
"description": "Pre-built field mapping for Firestore model key strings. Defaults to empty string.",
|
|
296
|
+
"optional": false,
|
|
297
|
+
"params": [],
|
|
298
|
+
"returns": "ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
299
|
+
"tags": [
|
|
300
|
+
"model",
|
|
301
|
+
"key",
|
|
302
|
+
"string",
|
|
303
|
+
"reference",
|
|
304
|
+
"ref",
|
|
305
|
+
"pointer",
|
|
306
|
+
"builtin",
|
|
307
|
+
"model-key",
|
|
308
|
+
"firestore",
|
|
309
|
+
"firestoremodelkeystring"
|
|
310
|
+
],
|
|
311
|
+
"example": "fields: {\n m: firestoreModelKeyString\n}"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"slug": "firestore-model-id-string",
|
|
315
|
+
"name": "firestoreModelIdString",
|
|
316
|
+
"kind": "const",
|
|
317
|
+
"category": "model-key",
|
|
318
|
+
"module": "@dereekb/firebase",
|
|
319
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
320
|
+
"signature": "const firestoreModelIdString: ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
321
|
+
"description": "Pre-built field mapping for Firestore model ID strings. Defaults to empty string.",
|
|
322
|
+
"optional": false,
|
|
323
|
+
"params": [],
|
|
324
|
+
"returns": "ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
325
|
+
"tags": [
|
|
326
|
+
"model",
|
|
327
|
+
"id",
|
|
328
|
+
"string",
|
|
329
|
+
"reference",
|
|
330
|
+
"pointer",
|
|
331
|
+
"builtin",
|
|
332
|
+
"model-key",
|
|
333
|
+
"firestore",
|
|
334
|
+
"firestoremodelidstring"
|
|
335
|
+
],
|
|
336
|
+
"example": "fields: {\n id: firestoreModelIdString\n}"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"slug": "firestore-date",
|
|
340
|
+
"name": "firestoreDate",
|
|
341
|
+
"kind": "factory",
|
|
342
|
+
"category": "date",
|
|
343
|
+
"module": "@dereekb/firebase",
|
|
344
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
345
|
+
"signature": "firestoreDate(config?: FirestoreDateFieldConfig): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
346
|
+
"description": "Creates a field mapping configuration for Firestore date fields.\n\nHandles conversion between JavaScript Date objects and ISO8601 strings stored in Firestore.\nDefaults to `new Date()` when the field is missing. Use `saveDefaultAsNow` to automatically\nstore the current timestamp when a new document is created.",
|
|
347
|
+
"optional": false,
|
|
348
|
+
"params": [
|
|
349
|
+
{
|
|
350
|
+
"name": "config",
|
|
351
|
+
"type": "FirestoreDateFieldConfig",
|
|
352
|
+
"description": "- Configuration for the date field",
|
|
353
|
+
"optional": true
|
|
354
|
+
}
|
|
355
|
+
],
|
|
356
|
+
"returns": "A field mapping configuration for Date values",
|
|
357
|
+
"tags": [
|
|
358
|
+
"date",
|
|
359
|
+
"time",
|
|
360
|
+
"iso",
|
|
361
|
+
"timestamp",
|
|
362
|
+
"factory",
|
|
363
|
+
"firestore",
|
|
364
|
+
"firestoredate"
|
|
365
|
+
],
|
|
366
|
+
"example": "// Date field that auto-saves current time on creation\nconst createdAtField = firestoreDate({ saveDefaultAsNow: true });\n\n// Date field with a fixed default\nconst startDateField = firestoreDate({ default: new Date('2020-01-01') });",
|
|
367
|
+
"relatedSlugs": [
|
|
368
|
+
"optional-firestore-date",
|
|
369
|
+
"firestore-date-number"
|
|
370
|
+
]
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"slug": "optional-firestore-date",
|
|
374
|
+
"name": "optionalFirestoreDate",
|
|
375
|
+
"kind": "factory",
|
|
376
|
+
"category": "date",
|
|
377
|
+
"module": "@dereekb/firebase",
|
|
378
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
379
|
+
"signature": "optionalFirestoreDate(config?: OptionalFirestoreDateFieldConfig): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
380
|
+
"description": "Creates a field mapping configuration for optional Firestore date fields.\n\nHandles conversion between JavaScript Date objects and ISO8601 strings stored in Firestore.",
|
|
381
|
+
"optional": true,
|
|
382
|
+
"params": [
|
|
383
|
+
{
|
|
384
|
+
"name": "config",
|
|
385
|
+
"type": "OptionalFirestoreDateFieldConfig",
|
|
386
|
+
"description": "- Configuration for the optional date field",
|
|
387
|
+
"optional": true
|
|
388
|
+
}
|
|
389
|
+
],
|
|
390
|
+
"returns": "A field mapping configuration for optional Date values",
|
|
391
|
+
"tags": [
|
|
392
|
+
"date",
|
|
393
|
+
"time",
|
|
394
|
+
"iso",
|
|
395
|
+
"optional",
|
|
396
|
+
"factory",
|
|
397
|
+
"firestore",
|
|
398
|
+
"optionalfirestoredate"
|
|
399
|
+
],
|
|
400
|
+
"example": "fields: {\n deletedAt: optionalFirestoreDate()\n}",
|
|
401
|
+
"relatedSlugs": [
|
|
402
|
+
"firestore-date"
|
|
403
|
+
]
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"slug": "firestore-date-number",
|
|
407
|
+
"name": "firestoreDateNumber",
|
|
408
|
+
"kind": "factory",
|
|
409
|
+
"category": "date",
|
|
410
|
+
"module": "@dereekb/firebase",
|
|
411
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
412
|
+
"signature": "firestoreDateNumber(config: FirestoreDateNumberFieldConfig): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
413
|
+
"description": "Creates a field mapping configuration for Firestore date fields stored as numbers.\n\nHandles conversion between JavaScript Date objects and numeric representations\nusing the provided `fromDate`/`toDate` conversion functions.",
|
|
414
|
+
"optional": false,
|
|
415
|
+
"params": [
|
|
416
|
+
{
|
|
417
|
+
"name": "config",
|
|
418
|
+
"type": "FirestoreDateNumberFieldConfig",
|
|
419
|
+
"description": "- Configuration including custom Date-to-number conversion functions",
|
|
420
|
+
"optional": false
|
|
421
|
+
}
|
|
422
|
+
],
|
|
423
|
+
"returns": "A field mapping configuration for Date values stored as numbers",
|
|
424
|
+
"tags": [
|
|
425
|
+
"date",
|
|
426
|
+
"number",
|
|
427
|
+
"timestamp",
|
|
428
|
+
"factory",
|
|
429
|
+
"firestore",
|
|
430
|
+
"firestoredatenumber"
|
|
431
|
+
],
|
|
432
|
+
"relatedSlugs": [
|
|
433
|
+
"optional-firestore-date-number",
|
|
434
|
+
"firestore-unix-date-time-seconds-number"
|
|
435
|
+
]
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"slug": "optional-firestore-date-number",
|
|
439
|
+
"name": "optionalFirestoreDateNumber",
|
|
440
|
+
"kind": "factory",
|
|
441
|
+
"category": "date",
|
|
442
|
+
"module": "@dereekb/firebase",
|
|
443
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
444
|
+
"signature": "optionalFirestoreDateNumber(config: OptionalFirestoreDateNumberFieldConfig): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
445
|
+
"description": "Creates a field mapping configuration for optional Firestore date field that is stored as a number.",
|
|
446
|
+
"optional": true,
|
|
447
|
+
"params": [
|
|
448
|
+
{
|
|
449
|
+
"name": "config",
|
|
450
|
+
"type": "OptionalFirestoreDateNumberFieldConfig",
|
|
451
|
+
"description": "- Configuration for the optional date field",
|
|
452
|
+
"optional": false
|
|
453
|
+
}
|
|
454
|
+
],
|
|
455
|
+
"returns": "A field mapping configuration for optional Date values",
|
|
456
|
+
"tags": [
|
|
457
|
+
"date",
|
|
458
|
+
"number",
|
|
459
|
+
"timestamp",
|
|
460
|
+
"optional",
|
|
461
|
+
"factory",
|
|
462
|
+
"firestore",
|
|
463
|
+
"optionalfirestoredatenumber"
|
|
464
|
+
],
|
|
465
|
+
"relatedSlugs": [
|
|
466
|
+
"firestore-date-number"
|
|
467
|
+
]
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"slug": "firestore-boolean",
|
|
471
|
+
"name": "firestoreBoolean",
|
|
472
|
+
"kind": "factory",
|
|
473
|
+
"category": "primitive",
|
|
474
|
+
"module": "@dereekb/firebase",
|
|
475
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
476
|
+
"signature": "firestoreBoolean(config: FirestoreBooleanFieldConfig): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
477
|
+
"description": "Creates a field mapping configuration for Firestore boolean fields.",
|
|
478
|
+
"optional": false,
|
|
479
|
+
"params": [
|
|
480
|
+
{
|
|
481
|
+
"name": "config",
|
|
482
|
+
"type": "FirestoreBooleanFieldConfig",
|
|
483
|
+
"description": "- Configuration for the boolean field",
|
|
484
|
+
"optional": false
|
|
485
|
+
}
|
|
486
|
+
],
|
|
487
|
+
"returns": "A field mapping configuration for boolean values",
|
|
488
|
+
"tags": [
|
|
489
|
+
"boolean",
|
|
490
|
+
"flag",
|
|
491
|
+
"factory",
|
|
492
|
+
"primitive",
|
|
493
|
+
"firestore",
|
|
494
|
+
"firestoreboolean"
|
|
495
|
+
],
|
|
496
|
+
"example": "fields: {\n active: firestoreBoolean({ default: true })\n}",
|
|
497
|
+
"relatedSlugs": [
|
|
498
|
+
"optional-firestore-boolean"
|
|
499
|
+
]
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"slug": "optional-firestore-boolean",
|
|
503
|
+
"name": "optionalFirestoreBoolean",
|
|
504
|
+
"kind": "factory",
|
|
505
|
+
"category": "primitive",
|
|
506
|
+
"module": "@dereekb/firebase",
|
|
507
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
508
|
+
"signature": "optionalFirestoreBoolean(config?: OptionalFirestoreBooleanFieldConfig): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
509
|
+
"description": "Creates a field mapping configuration for optional Firestore boolean fields.",
|
|
510
|
+
"optional": true,
|
|
511
|
+
"params": [
|
|
512
|
+
{
|
|
513
|
+
"name": "config",
|
|
514
|
+
"type": "OptionalFirestoreBooleanFieldConfig",
|
|
515
|
+
"description": "- Configuration for the optional boolean field",
|
|
516
|
+
"optional": true
|
|
517
|
+
}
|
|
518
|
+
],
|
|
519
|
+
"returns": "A field mapping configuration for optional boolean values",
|
|
520
|
+
"tags": [
|
|
521
|
+
"boolean",
|
|
522
|
+
"flag",
|
|
523
|
+
"optional",
|
|
524
|
+
"dontstore",
|
|
525
|
+
"factory",
|
|
526
|
+
"primitive",
|
|
527
|
+
"firestore",
|
|
528
|
+
"optionalfirestoreboolean"
|
|
529
|
+
],
|
|
530
|
+
"example": "fields: {\n ns: optionalFirestoreBoolean()\n}",
|
|
531
|
+
"relatedSlugs": [
|
|
532
|
+
"firestore-boolean"
|
|
533
|
+
]
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"slug": "firestore-number",
|
|
537
|
+
"name": "firestoreNumber",
|
|
538
|
+
"kind": "factory",
|
|
539
|
+
"category": "primitive",
|
|
540
|
+
"module": "@dereekb/firebase",
|
|
541
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
542
|
+
"signature": "firestoreNumber(config: FirestoreNumberConfig<N>): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
543
|
+
"description": "Creates a field mapping configuration for Firestore number fields.",
|
|
544
|
+
"optional": false,
|
|
545
|
+
"params": [
|
|
546
|
+
{
|
|
547
|
+
"name": "config",
|
|
548
|
+
"type": "FirestoreNumberConfig<N>",
|
|
549
|
+
"description": "- Configuration for the number field",
|
|
550
|
+
"optional": false
|
|
551
|
+
}
|
|
552
|
+
],
|
|
553
|
+
"returns": "A field mapping configuration for number values",
|
|
554
|
+
"tags": [
|
|
555
|
+
"number",
|
|
556
|
+
"integer",
|
|
557
|
+
"transform",
|
|
558
|
+
"factory",
|
|
559
|
+
"primitive",
|
|
560
|
+
"firestore",
|
|
561
|
+
"firestorenumber"
|
|
562
|
+
],
|
|
563
|
+
"example": "fields: {\n count: firestoreNumber({ default: 0 })\n}",
|
|
564
|
+
"relatedSlugs": [
|
|
565
|
+
"optional-firestore-number"
|
|
566
|
+
]
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
"slug": "optional-firestore-number",
|
|
570
|
+
"name": "optionalFirestoreNumber",
|
|
571
|
+
"kind": "factory",
|
|
572
|
+
"category": "primitive",
|
|
573
|
+
"module": "@dereekb/firebase",
|
|
574
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
575
|
+
"signature": "optionalFirestoreNumber(config?: OptionalFirestoreNumberFieldConfig<N>): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
576
|
+
"description": "Creates a field mapping configuration for optional Firestore number fields.",
|
|
577
|
+
"optional": true,
|
|
578
|
+
"params": [
|
|
579
|
+
{
|
|
580
|
+
"name": "config",
|
|
581
|
+
"type": "OptionalFirestoreNumberFieldConfig<N>",
|
|
582
|
+
"description": "- Configuration for the optional number field",
|
|
583
|
+
"optional": true
|
|
584
|
+
}
|
|
585
|
+
],
|
|
586
|
+
"returns": "A field mapping configuration for optional number values",
|
|
587
|
+
"tags": [
|
|
588
|
+
"number",
|
|
589
|
+
"integer",
|
|
590
|
+
"optional",
|
|
591
|
+
"transform",
|
|
592
|
+
"factory",
|
|
593
|
+
"primitive",
|
|
594
|
+
"firestore",
|
|
595
|
+
"optionalfirestorenumber"
|
|
596
|
+
],
|
|
597
|
+
"relatedSlugs": [
|
|
598
|
+
"firestore-number"
|
|
599
|
+
]
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
"slug": "firestore-array",
|
|
603
|
+
"name": "firestoreArray",
|
|
604
|
+
"kind": "factory",
|
|
605
|
+
"category": "array",
|
|
606
|
+
"module": "@dereekb/firebase",
|
|
607
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
608
|
+
"signature": "firestoreArray(config: FirestoreArrayFieldConfig<T>): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
609
|
+
"description": "Creates a field mapping configuration for Firestore array fields.\n\nDefaults to an empty array when the field is missing. Supports optional sorting\nvia `sortWith` which is applied on both read and write.",
|
|
610
|
+
"optional": false,
|
|
611
|
+
"params": [
|
|
612
|
+
{
|
|
613
|
+
"name": "config",
|
|
614
|
+
"type": "FirestoreArrayFieldConfig<T>",
|
|
615
|
+
"description": "- Configuration for the array field",
|
|
616
|
+
"optional": false
|
|
617
|
+
}
|
|
618
|
+
],
|
|
619
|
+
"returns": "A field mapping configuration for array values",
|
|
620
|
+
"tags": [
|
|
621
|
+
"array",
|
|
622
|
+
"list",
|
|
623
|
+
"sort",
|
|
624
|
+
"factory",
|
|
625
|
+
"firestore",
|
|
626
|
+
"firestorearray"
|
|
627
|
+
],
|
|
628
|
+
"example": "// Array of strings sorted alphabetically\nconst tagsField = firestoreArray<string>({\n sortWith: (a, b) => a.localeCompare(b)\n});",
|
|
629
|
+
"relatedSlugs": [
|
|
630
|
+
"optional-firestore-array",
|
|
631
|
+
"firestore-unique-array"
|
|
632
|
+
]
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"slug": "optional-firestore-array",
|
|
636
|
+
"name": "optionalFirestoreArray",
|
|
637
|
+
"kind": "factory",
|
|
638
|
+
"category": "array",
|
|
639
|
+
"module": "@dereekb/firebase",
|
|
640
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
641
|
+
"signature": "optionalFirestoreArray(config?: OptionalFirestoreArrayFieldConfig<T>): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
642
|
+
"description": "Creates a field mapping configuration for optional Firestore array fields.\n\nSupports unique filtering and conditional storage based on array content.",
|
|
643
|
+
"optional": true,
|
|
644
|
+
"params": [
|
|
645
|
+
{
|
|
646
|
+
"name": "config",
|
|
647
|
+
"type": "OptionalFirestoreArrayFieldConfig<T>",
|
|
648
|
+
"description": "- Configuration for the optional array field",
|
|
649
|
+
"optional": true
|
|
650
|
+
}
|
|
651
|
+
],
|
|
652
|
+
"returns": "A field mapping configuration for optional array values",
|
|
653
|
+
"tags": [
|
|
654
|
+
"array",
|
|
655
|
+
"list",
|
|
656
|
+
"optional",
|
|
657
|
+
"unique",
|
|
658
|
+
"dontstore",
|
|
659
|
+
"factory",
|
|
660
|
+
"firestore",
|
|
661
|
+
"optionalfirestorearray"
|
|
662
|
+
],
|
|
663
|
+
"example": "fields: {\n tags: optionalFirestoreArray<string>({ filterUnique: true, dontStoreIfEmpty: true })\n}",
|
|
664
|
+
"relatedSlugs": [
|
|
665
|
+
"firestore-array"
|
|
666
|
+
]
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"slug": "firestore-enum-array",
|
|
670
|
+
"name": "firestoreEnumArray",
|
|
671
|
+
"kind": "factory",
|
|
672
|
+
"category": "array",
|
|
673
|
+
"module": "@dereekb/firebase",
|
|
674
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
675
|
+
"signature": "firestoreEnumArray(config?: FirestoreEnumArrayFieldConfig<S>): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
676
|
+
"description": "Creates a field mapping configuration for Firestore array fields of unique enum values.",
|
|
677
|
+
"optional": false,
|
|
678
|
+
"params": [
|
|
679
|
+
{
|
|
680
|
+
"name": "config",
|
|
681
|
+
"type": "FirestoreEnumArrayFieldConfig<S>",
|
|
682
|
+
"description": "- Configuration for the enum array field",
|
|
683
|
+
"optional": true
|
|
684
|
+
}
|
|
685
|
+
],
|
|
686
|
+
"returns": "A field mapping configuration for enum array values",
|
|
687
|
+
"tags": [
|
|
688
|
+
"array",
|
|
689
|
+
"enum",
|
|
690
|
+
"unique",
|
|
691
|
+
"flags",
|
|
692
|
+
"tags",
|
|
693
|
+
"factory",
|
|
694
|
+
"firestore",
|
|
695
|
+
"firestoreenumarray"
|
|
696
|
+
]
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
"slug": "firestore-model-key-array-field",
|
|
700
|
+
"name": "firestoreModelKeyArrayField",
|
|
701
|
+
"kind": "const",
|
|
702
|
+
"category": "model-key",
|
|
703
|
+
"module": "@dereekb/firebase",
|
|
704
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
705
|
+
"signature": "const firestoreModelKeyArrayField: ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
706
|
+
"description": "Pre-built field mapping for arrays of unique Firestore model key strings.",
|
|
707
|
+
"optional": false,
|
|
708
|
+
"params": [],
|
|
709
|
+
"returns": "ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
710
|
+
"tags": [
|
|
711
|
+
"model",
|
|
712
|
+
"key",
|
|
713
|
+
"array",
|
|
714
|
+
"unique",
|
|
715
|
+
"reference",
|
|
716
|
+
"ref",
|
|
717
|
+
"pointer",
|
|
718
|
+
"builtin",
|
|
719
|
+
"model-key",
|
|
720
|
+
"firestore",
|
|
721
|
+
"field",
|
|
722
|
+
"firestoremodelkeyarrayfield"
|
|
723
|
+
],
|
|
724
|
+
"example": "fields: {\n b: firestoreModelKeyArrayField\n}"
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
"slug": "firestore-model-id-array-field",
|
|
728
|
+
"name": "firestoreModelIdArrayField",
|
|
729
|
+
"kind": "const",
|
|
730
|
+
"category": "model-key",
|
|
731
|
+
"module": "@dereekb/firebase",
|
|
732
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
733
|
+
"signature": "const firestoreModelIdArrayField: ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
734
|
+
"description": "Pre-built field mapping for arrays of unique Firestore model ID strings.\nAlias for {@link firestoreModelKeyArrayField}.",
|
|
735
|
+
"optional": false,
|
|
736
|
+
"params": [],
|
|
737
|
+
"returns": "ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
738
|
+
"tags": [
|
|
739
|
+
"model",
|
|
740
|
+
"id",
|
|
741
|
+
"array",
|
|
742
|
+
"unique",
|
|
743
|
+
"reference",
|
|
744
|
+
"pointer",
|
|
745
|
+
"builtin",
|
|
746
|
+
"model-key",
|
|
747
|
+
"firestore",
|
|
748
|
+
"field",
|
|
749
|
+
"firestoremodelidarrayfield"
|
|
750
|
+
]
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"slug": "firestore-map",
|
|
754
|
+
"name": "firestoreMap",
|
|
755
|
+
"kind": "factory",
|
|
756
|
+
"category": "map",
|
|
757
|
+
"module": "@dereekb/firebase",
|
|
758
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
759
|
+
"signature": "firestoreMap(config?: FirestoreMapFieldConfig<T, K>): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
760
|
+
"description": "Creates a field mapping configuration for Firestore map-type (key-value object) fields.\n\nBy default, removes all null/undefined keys from the object before saving to Firestore.\nDefaults to an empty object `{}` when the field is missing.",
|
|
761
|
+
"optional": false,
|
|
762
|
+
"params": [
|
|
763
|
+
{
|
|
764
|
+
"name": "config",
|
|
765
|
+
"type": "FirestoreMapFieldConfig<T, K>",
|
|
766
|
+
"description": "- Configuration for the map field",
|
|
767
|
+
"optional": true
|
|
768
|
+
}
|
|
769
|
+
],
|
|
770
|
+
"returns": "A field mapping configuration for map values",
|
|
771
|
+
"tags": [
|
|
772
|
+
"map",
|
|
773
|
+
"record",
|
|
774
|
+
"dictionary",
|
|
775
|
+
"dict",
|
|
776
|
+
"factory",
|
|
777
|
+
"firestore",
|
|
778
|
+
"firestoremap"
|
|
779
|
+
],
|
|
780
|
+
"example": "// Map of user preferences\nconst prefsField = firestoreMap<string>({\n mapFilter: KeyValueTypleValueFilter.EMPTY\n});"
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
"slug": "firestore-array-map",
|
|
784
|
+
"name": "firestoreArrayMap",
|
|
785
|
+
"kind": "factory",
|
|
786
|
+
"category": "map",
|
|
787
|
+
"module": "@dereekb/firebase",
|
|
788
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
789
|
+
"signature": "firestoreArrayMap(config?: FirestoreArrayMapFieldConfig<T, K>): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
790
|
+
"description": "Creates a field mapping configuration for Firestore map fields where each value is an array.\n\nDefaults to filtering empty arrays and null/undefined elements from each array before saving.",
|
|
791
|
+
"optional": false,
|
|
792
|
+
"params": [
|
|
793
|
+
{
|
|
794
|
+
"name": "config",
|
|
795
|
+
"type": "FirestoreArrayMapFieldConfig<T, K>",
|
|
796
|
+
"description": "- Configuration for the array map field",
|
|
797
|
+
"optional": true
|
|
798
|
+
}
|
|
799
|
+
],
|
|
800
|
+
"returns": "A field mapping configuration for map values with array entries",
|
|
801
|
+
"tags": [
|
|
802
|
+
"map",
|
|
803
|
+
"array",
|
|
804
|
+
"lookup",
|
|
805
|
+
"multi-value",
|
|
806
|
+
"factory",
|
|
807
|
+
"firestore",
|
|
808
|
+
"firestorearraymap"
|
|
809
|
+
]
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
"slug": "firestore-object-array",
|
|
813
|
+
"name": "firestoreObjectArray",
|
|
814
|
+
"kind": "factory",
|
|
815
|
+
"category": "object",
|
|
816
|
+
"module": "@dereekb/firebase",
|
|
817
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
818
|
+
"signature": "firestoreObjectArray(config: FirestoreObjectArrayFieldConfig<T, O>): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
819
|
+
"description": "Creates a field mapping configuration for Firestore arrays of complex objects.\n\nEach element in the array is converted using its own set of field converters (via `objectField`\nor `firestoreField`), enabling type-safe conversion of embedded document arrays.\nSupports optional unique filtering and sorting.\n\nOn write, null/undefined values are filtered from each object to match Firestore semantics.",
|
|
820
|
+
"optional": false,
|
|
821
|
+
"params": [
|
|
822
|
+
{
|
|
823
|
+
"name": "config",
|
|
824
|
+
"type": "FirestoreObjectArrayFieldConfig<T, O>",
|
|
825
|
+
"description": "- Configuration including element conversions and optional filtering/sorting",
|
|
826
|
+
"optional": false
|
|
827
|
+
}
|
|
828
|
+
],
|
|
829
|
+
"returns": "A field mapping configuration for object array values",
|
|
830
|
+
"tags": [
|
|
831
|
+
"array",
|
|
832
|
+
"object",
|
|
833
|
+
"embedded",
|
|
834
|
+
"nested",
|
|
835
|
+
"structured",
|
|
836
|
+
"factory",
|
|
837
|
+
"firestore",
|
|
838
|
+
"firestoreobjectarray"
|
|
839
|
+
],
|
|
840
|
+
"example": "// Array of embedded item objects\nconst itemsField = firestoreObjectArray<NotificationItem>({\n objectField: notificationItemFields,\n sortWith: sortAscendingIndexNumberRefFunction()\n});",
|
|
841
|
+
"relatedSlugs": [
|
|
842
|
+
"firestore-sub-object"
|
|
843
|
+
]
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
"slug": "firestore-sub-object",
|
|
847
|
+
"name": "firestoreSubObject",
|
|
848
|
+
"kind": "factory",
|
|
849
|
+
"category": "object",
|
|
850
|
+
"module": "@dereekb/firebase",
|
|
851
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
852
|
+
"signature": "firestoreSubObject(config: FirestoreSubObjectFieldConfig<T, O>): FirestoreSubObjectFieldMapFunctionsConfig<T, O>",
|
|
853
|
+
"description": "Creates a field mapping configuration for nested Firestore object fields.\n\nMaps a nested object using its own set of field converters, enabling recursive type-safe\nconversion of embedded documents. The `objectField` defines the conversion rules for\nthe nested object's fields using the same converter patterns.",
|
|
854
|
+
"optional": false,
|
|
855
|
+
"params": [
|
|
856
|
+
{
|
|
857
|
+
"name": "config",
|
|
858
|
+
"type": "FirestoreSubObjectFieldConfig<T, O>",
|
|
859
|
+
"description": "- Configuration including nested field conversions",
|
|
860
|
+
"optional": false
|
|
861
|
+
}
|
|
862
|
+
],
|
|
863
|
+
"returns": "A field mapping configuration with both field config and map functions",
|
|
864
|
+
"tags": [
|
|
865
|
+
"object",
|
|
866
|
+
"nested",
|
|
867
|
+
"embedded",
|
|
868
|
+
"structured",
|
|
869
|
+
"factory",
|
|
870
|
+
"firestore",
|
|
871
|
+
"sub",
|
|
872
|
+
"firestoresubobject"
|
|
873
|
+
],
|
|
874
|
+
"example": "// Nested address object with its own converters\nconst addressField = firestoreSubObject<Address>({\n objectField: {\n street: firestoreString(),\n city: firestoreString(),\n zip: firestoreString()\n }\n});",
|
|
875
|
+
"relatedSlugs": [
|
|
876
|
+
"firestore-object-array"
|
|
877
|
+
]
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
"slug": "firestore-lat-lng-string",
|
|
881
|
+
"name": "firestoreLatLngString",
|
|
882
|
+
"kind": "factory",
|
|
883
|
+
"category": "geo",
|
|
884
|
+
"module": "@dereekb/firebase",
|
|
885
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
886
|
+
"signature": "firestoreLatLngString(config?: FirestoreLatLngStringConfig): ModelFieldMapFunctionsWithDefaultsConfig<V, Maybe<D>>",
|
|
887
|
+
"description": "Creates a field mapping configuration for Firestore latitude/longitude string fields.\n\nStores lat/lng as a single string rather than a lat/lng object or value pair. This is preferred\nbecause Firestore cannot efficiently sort/search lat and lng together, making indexing on separate\nfields useless. As a single string field, it integrates with the {@link LatLngStringRef} interface\nand can be mapped using `latLngDataPointFunction()`.\n\nApplies validation and optional precision rounding on both read and write.",
|
|
888
|
+
"optional": false,
|
|
889
|
+
"params": [
|
|
890
|
+
{
|
|
891
|
+
"name": "config",
|
|
892
|
+
"type": "FirestoreLatLngStringConfig",
|
|
893
|
+
"description": "- Optional precision and default value configuration",
|
|
894
|
+
"optional": true
|
|
895
|
+
}
|
|
896
|
+
],
|
|
897
|
+
"returns": "A field mapping configuration for LatLngString values",
|
|
898
|
+
"tags": [
|
|
899
|
+
"geo",
|
|
900
|
+
"latlng",
|
|
901
|
+
"location",
|
|
902
|
+
"coordinates",
|
|
903
|
+
"coords",
|
|
904
|
+
"geolocation",
|
|
905
|
+
"factory",
|
|
906
|
+
"firestore",
|
|
907
|
+
"lat",
|
|
908
|
+
"lng",
|
|
909
|
+
"string",
|
|
910
|
+
"firestorelatlngstring"
|
|
911
|
+
],
|
|
912
|
+
"example": "fields: {\n loc: firestoreLatLngString()\n}"
|
|
913
|
+
}
|
|
914
|
+
]
|
|
915
|
+
}
|