firetender 0.15.3 → 0.16.1
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/dist/FiretenderCollection.d.ts +28 -8
- package/dist/FiretenderCollection.d.ts.map +1 -1
- package/dist/FiretenderCollection.js +44 -13
- package/dist/FiretenderCollection.js.map +1 -1
- package/dist/FiretenderDoc.d.ts +110 -37
- package/dist/FiretenderDoc.d.ts.map +1 -1
- package/dist/FiretenderDoc.js +128 -37
- package/dist/FiretenderDoc.js.map +1 -1
- package/dist/__tests__/FiretenderCollection.spec.js +25 -5
- package/dist/__tests__/FiretenderCollection.spec.js.map +1 -1
- package/dist/__tests__/FiretenderDoc.spec.js +372 -33
- package/dist/__tests__/FiretenderDoc.spec.js.map +1 -1
- package/dist/firestore-deps-admin.d.ts +6 -6
- package/dist/firestore-deps-admin.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/ts-helpers.d.ts +8 -0
- package/dist/ts-helpers.d.ts.map +1 -1
- package/package.json +17 -16
- package/src/FiretenderCollection.ts +56 -18
- package/src/FiretenderDoc.ts +244 -77
- package/src/index.ts +8 -1
- package/src/ts-helpers.ts +11 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { CollectionReference, DocumentReference, Firestore, QueryConstraint } from "./firestore-deps.js";
|
|
3
|
-
import { FiretenderDoc, FiretenderDocOptions
|
|
3
|
+
import { AfterParse, BeforeParse, BeforeWrite, FiretenderDoc, FiretenderDocOptions } from "./FiretenderDoc.js";
|
|
4
4
|
import { DeepPartial, DeepReadonly } from "./ts-helpers.js";
|
|
5
5
|
/**
|
|
6
6
|
* A representation of a Firestore collection or subcollection.
|
|
@@ -94,12 +94,11 @@ export declare class FiretenderCollection<SchemaType extends z.SomeZodObject> {
|
|
|
94
94
|
/**
|
|
95
95
|
* Adds a list of documents to this collection.
|
|
96
96
|
*
|
|
97
|
-
* @param entries a list of
|
|
98
|
-
* the document ID is omitted, Firestore will generate a random one.
|
|
97
|
+
* @param entries a list of [id, data] tuples.
|
|
99
98
|
*
|
|
100
99
|
* @returns a list of `FiretenderDoc` objects for the new entries.
|
|
101
100
|
*/
|
|
102
|
-
createBatch(entries: [string | string
|
|
101
|
+
createBatch(entries: [string[] | string, DeepReadonly<z.input<SchemaType>>][]): Promise<FiretenderDoc<SchemaType>[]>;
|
|
103
102
|
/**
|
|
104
103
|
* Deletes the specified documents from this collection.
|
|
105
104
|
*/
|
|
@@ -117,11 +116,32 @@ export declare class FiretenderCollection<SchemaType extends z.SomeZodObject> {
|
|
|
117
116
|
*/
|
|
118
117
|
makeCollectionRef(id?: string[] | string | undefined): CollectionReference;
|
|
119
118
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
119
|
+
* Adds a function that can modify the raw data of this collection's documents
|
|
120
|
+
* prior to parsing.
|
|
121
|
+
*
|
|
122
|
+
* `beforeParse` hooks can also be given in the options argument of the class
|
|
123
|
+
* constructor. They are executed first, followed by any hooks added with
|
|
124
|
+
* this method.
|
|
125
|
+
*/
|
|
126
|
+
addBeforeParseHook(hook: BeforeParse): void;
|
|
127
|
+
/**
|
|
128
|
+
* Adds a function that can update the this collection's documents after they
|
|
129
|
+
* are read and parsed.
|
|
130
|
+
*
|
|
131
|
+
* `afterParse` hooks can also be given in the options argument of the class
|
|
132
|
+
* constructor. They are executed first, followed by any hooks added with
|
|
133
|
+
* this method.
|
|
134
|
+
*/
|
|
135
|
+
addAfterParseHook(hook: AfterParse<SchemaType>): void;
|
|
136
|
+
/**
|
|
137
|
+
* Adds a function that can update the this collection's documents before they
|
|
138
|
+
* are written.
|
|
139
|
+
*
|
|
140
|
+
* `beforeWrite` hooks can also be given in the options argument of the class
|
|
141
|
+
* constructor. They are executed first, followed by any hooks added with
|
|
142
|
+
* this method.
|
|
123
143
|
*/
|
|
124
|
-
|
|
144
|
+
addBeforeWriteHook(hook: BeforeWrite<SchemaType>): void;
|
|
125
145
|
/**
|
|
126
146
|
* Builds a doc ref from the given IDs, or returns "undefined" if the IDs do
|
|
127
147
|
* not correctly specify a doc path.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FiretenderCollection.d.ts","sourceRoot":"","sources":["../src/FiretenderCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAGL,mBAAmB,EAGnB,iBAAiB,EACjB,SAAS,EAIT,eAAe,EAGhB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,aAAa,EACb,oBAAoB,
|
|
1
|
+
{"version":3,"file":"FiretenderCollection.d.ts","sourceRoot":"","sources":["../src/FiretenderCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAGL,mBAAmB,EAGnB,iBAAiB,EACjB,SAAS,EAIT,eAAe,EAGhB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,UAAU,EACV,WAAW,EACX,WAAW,EACX,aAAa,EACb,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE5D;;;;;;GAMG;AACH,qBAAa,oBAAoB,CAAC,UAAU,SAAS,CAAC,CAAC,aAAa;IAClE,iEAAiE;IACjE,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAE5B,+DAA+D;IAC/D,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAE9B,wEAAwE;IACxE,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;IAElC,0EAA0E;IAC1E,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAEzB;IAEd,0DAA0D;IAC1D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAmC;IAErE;;;;;;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EAAE,GAAG,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,GAChE,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,CAAC;IA2BvC;;OAEG;IACG,WAAW,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAqB/D;;;;OAIG;IACH,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,iBAAiB;IAapD;;;;OAIG;IACH,iBAAiB,CACf,EAAE,GAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAqB,GAC5C,mBAAmB;IAatB;;;;;;;OAOG;IACH,kBAAkB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI;IAQ3C;;;;;;;OAOG;IACH,iBAAiB,CAAC,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,GAAG,IAAI;IAQrD;;;;;;;OAOG;IACH,kBAAkB,CAAC,IAAI,EAAE,WAAW,CAAC,UAAU,CAAC,GAAG,IAAI;IAWvD;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAQ1B;;;OAGG;IACH,OAAO,CAAC,yBAAyB;IAUjC;;;OAGG;YACW,cAAc;CAwB7B"}
|
|
@@ -163,8 +163,7 @@ export class FiretenderCollection {
|
|
|
163
163
|
/**
|
|
164
164
|
* Adds a list of documents to this collection.
|
|
165
165
|
*
|
|
166
|
-
* @param entries a list of
|
|
167
|
-
* the document ID is omitted, Firestore will generate a random one.
|
|
166
|
+
* @param entries a list of [id, data] tuples.
|
|
168
167
|
*
|
|
169
168
|
* @returns a list of `FiretenderDoc` objects for the new entries.
|
|
170
169
|
*/
|
|
@@ -242,16 +241,51 @@ export class FiretenderCollection {
|
|
|
242
241
|
return ref;
|
|
243
242
|
}
|
|
244
243
|
/**
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
244
|
+
* Adds a function that can modify the raw data of this collection's documents
|
|
245
|
+
* prior to parsing.
|
|
246
|
+
*
|
|
247
|
+
* `beforeParse` hooks can also be given in the options argument of the class
|
|
248
|
+
* constructor. They are executed first, followed by any hooks added with
|
|
249
|
+
* this method.
|
|
250
|
+
*/
|
|
251
|
+
addBeforeParseHook(hook) {
|
|
252
|
+
if (!this.defaultDocOptions.beforeParse) {
|
|
253
|
+
this.defaultDocOptions.beforeParse = [hook];
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
this.defaultDocOptions.beforeParse.push(hook);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Adds a function that can update the this collection's documents after they
|
|
261
|
+
* are read and parsed.
|
|
262
|
+
*
|
|
263
|
+
* `afterParse` hooks can also be given in the options argument of the class
|
|
264
|
+
* constructor. They are executed first, followed by any hooks added with
|
|
265
|
+
* this method.
|
|
248
266
|
*/
|
|
249
|
-
|
|
250
|
-
if (!this.defaultDocOptions.
|
|
251
|
-
this.defaultDocOptions.
|
|
267
|
+
addAfterParseHook(hook) {
|
|
268
|
+
if (!this.defaultDocOptions.afterParse) {
|
|
269
|
+
this.defaultDocOptions.afterParse = [hook];
|
|
252
270
|
}
|
|
253
271
|
else {
|
|
254
|
-
this.defaultDocOptions.
|
|
272
|
+
this.defaultDocOptions.afterParse.push(hook);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Adds a function that can update the this collection's documents before they
|
|
277
|
+
* are written.
|
|
278
|
+
*
|
|
279
|
+
* `beforeWrite` hooks can also be given in the options argument of the class
|
|
280
|
+
* constructor. They are executed first, followed by any hooks added with
|
|
281
|
+
* this method.
|
|
282
|
+
*/
|
|
283
|
+
addBeforeWriteHook(hook) {
|
|
284
|
+
if (!this.defaultDocOptions.beforeWrite) {
|
|
285
|
+
this.defaultDocOptions.beforeWrite = [hook];
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
this.defaultDocOptions.beforeWrite.push(hook);
|
|
255
289
|
}
|
|
256
290
|
}
|
|
257
291
|
//////////////////////////////////////////////////////////////////////////////
|
|
@@ -291,10 +325,7 @@ export class FiretenderCollection {
|
|
|
291
325
|
addContextToError(error, "getDocs", query instanceof CollectionReference ? query : undefined);
|
|
292
326
|
throw error;
|
|
293
327
|
}
|
|
294
|
-
return querySnapshot.docs.map((queryDoc) => new FiretenderDoc(this.schema, queryDoc.ref,
|
|
295
|
-
...this.defaultDocOptions,
|
|
296
|
-
rawData: queryDoc.data(),
|
|
297
|
-
}));
|
|
328
|
+
return Promise.all(querySnapshot.docs.map((queryDoc) => new FiretenderDoc(this.schema, queryDoc.ref, this.defaultDocOptions).loadRawData(queryDoc.data())));
|
|
298
329
|
}
|
|
299
330
|
}
|
|
300
331
|
//# sourceMappingURL=FiretenderCollection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FiretenderCollection.js","sourceRoot":"","sources":["../src/FiretenderCollection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EACL,UAAU,EACV,eAAe,EACf,mBAAmB,EACnB,SAAS,EACT,GAAG,EAGH,OAAO,EAEP,KAAK,EAGL,UAAU,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,
|
|
1
|
+
{"version":3,"file":"FiretenderCollection.js","sourceRoot":"","sources":["../src/FiretenderCollection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EACL,UAAU,EACV,eAAe,EACf,mBAAmB,EACnB,SAAS,EACT,GAAG,EAGH,OAAO,EAEP,KAAK,EAGL,UAAU,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAIL,aAAa,GAEd,MAAM,oBAAoB,CAAC;AAG5B;;;;;;GAMG;AACH,MAAM,OAAO,oBAAoB;IAkB/B;;;;;;;;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,CACF,CAAC;IACJ,CAAC;CACF"}
|
package/dist/FiretenderDoc.d.ts
CHANGED
|
@@ -1,40 +1,78 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { CollectionReference, DocumentReference, DocumentSnapshot } from "./firestore-deps.js";
|
|
3
|
-
import { DeepReadonly } from "./ts-helpers.js";
|
|
4
|
-
export type
|
|
3
|
+
import type { AsyncOrSync, DeepReadonly } from "./ts-helpers.js";
|
|
4
|
+
export type BeforeParse = (data: Record<string, any>, docPath: string[]) => AsyncOrSync<void | boolean | "write-soon" | "write-now">;
|
|
5
|
+
export type AfterParse<SchemaType extends z.SomeZodObject> = (data: z.infer<SchemaType>, docPath: string[]) => AsyncOrSync<void | false | "write-soon" | "write-now">;
|
|
6
|
+
export type BeforeWrite<SchemaType extends z.SomeZodObject> = (data: z.infer<SchemaType>, docPath: string[]) => void;
|
|
5
7
|
/**
|
|
6
8
|
* Public options for initializing a FiretenderDoc object.
|
|
7
9
|
*/
|
|
8
10
|
export type FiretenderDocOptions<SchemaType extends z.SomeZodObject> = {
|
|
9
11
|
/**
|
|
10
12
|
* If set, using the `.w` accessor or `.update()` method will throw an error
|
|
11
|
-
* and
|
|
13
|
+
* and changes made by hooks will not be written.
|
|
12
14
|
*/
|
|
13
15
|
readonly?: boolean;
|
|
14
16
|
/**
|
|
15
|
-
*
|
|
17
|
+
* Functions to modify the data from Firestore before it is parsed by Zod.
|
|
18
|
+
* They are called in order, waiting for any asynchronous functions to
|
|
19
|
+
* complete before calling the next.
|
|
20
|
+
*
|
|
21
|
+
* The function's return type indicates if/when changes should be written:
|
|
22
|
+
* - `false` or `undefined` - no changes that should be written were made.
|
|
23
|
+
* - `true` - write the full document if/when the next write occurs.
|
|
24
|
+
* - `"write-soon"` - write the full document after a delay of
|
|
25
|
+
* `writeSoonDelay` (default: 100 ms).
|
|
26
|
+
* - `"write-now"` - write the full document immediately. This write is
|
|
27
|
+
* synchronous; `load()` does not return until it has completed.
|
|
28
|
+
*
|
|
29
|
+
* The highest write priority is used. Writing occurs after all `beforeParse`
|
|
30
|
+
* and `afterParse` functions have been called.
|
|
31
|
+
*
|
|
32
|
+
* CAUTION: If any `beforeParse` function is truthy, the entire document will
|
|
33
|
+
* be written. If one function makes a change blocked by the Firestore rules
|
|
34
|
+
* and returns `false`, but another returns `true`, all writes will fail.
|
|
35
|
+
*/
|
|
36
|
+
beforeParse?: BeforeParse[];
|
|
37
|
+
/**
|
|
38
|
+
* Functions that can update the document after it has been read and parsed.
|
|
39
|
+
* They are called in order, waiting for any asynchronous functions to
|
|
40
|
+
* complete before calling the next.
|
|
41
|
+
*
|
|
42
|
+
* @returns A value indicating if/when any changes should be written:
|
|
43
|
+
* - `false` or `undefined` - apply updates (if any) at the next write.
|
|
44
|
+
* - `"write-soon"` - update the document after a delay of `writeSoonDelay`
|
|
45
|
+
* (default: 100 ms).
|
|
46
|
+
* - `"write-now"` - update document immediately. This write is synchronous;
|
|
47
|
+
* `load()` does not return until it has completed.
|
|
48
|
+
*
|
|
49
|
+
* The highest write priority is used. Writing occurs after all the functions
|
|
50
|
+
* have been called.
|
|
51
|
+
*/
|
|
52
|
+
afterParse?: AfterParse<SchemaType>[];
|
|
53
|
+
/**
|
|
54
|
+
* Functions that can modify the document before it is written to Firestore.
|
|
16
55
|
*
|
|
17
56
|
* For example, this hook could set a last-modified timestamp at every write.
|
|
18
57
|
*/
|
|
19
|
-
beforeWrite?:
|
|
58
|
+
beforeWrite?: BeforeWrite<SchemaType>[];
|
|
20
59
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* output of the previous. The output of the last is fed to Zod.
|
|
60
|
+
* Milliseconds before writing to Firestore for `"write-soon"`. Defaults to
|
|
61
|
+
* 100 ms.
|
|
24
62
|
*
|
|
25
|
-
*
|
|
26
|
-
* on Firestore after a delay of `savePatchAfterDelay`, if it hasn't already
|
|
27
|
-
* been written back. Only return true if the Firestore rules allow updating
|
|
28
|
-
* all patched fields; otherwise all subsequent writes will fail.
|
|
63
|
+
* This delay can help avoid extra writes for quick read/modify/write cycles.
|
|
29
64
|
*/
|
|
30
|
-
|
|
65
|
+
writeSoonDelay?: number;
|
|
31
66
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
67
|
+
* Use the document's data as-is when it is loaded or provided; don't parse
|
|
68
|
+
* and validate it.
|
|
69
|
+
*
|
|
70
|
+
* The `beforeParse` and `afterParse` hooks will still be called.
|
|
71
|
+
*
|
|
72
|
+
* WARNING: This option breaks type safety. It is intended for debugging and
|
|
73
|
+
* fixing incidents during schema migration.
|
|
36
74
|
*/
|
|
37
|
-
|
|
75
|
+
disableValidation?: boolean;
|
|
38
76
|
};
|
|
39
77
|
/**
|
|
40
78
|
* All options when initializing a FiretenderDoc object.
|
|
@@ -50,13 +88,12 @@ export type AllFiretenderDocOptions<SchemaType extends z.SomeZodObject> = Firete
|
|
|
50
88
|
/**
|
|
51
89
|
* The document's initial data, which must define a valid instance of the
|
|
52
90
|
* document according to its schema.
|
|
91
|
+
*
|
|
92
|
+
* The `beforeParse` and `afterParse` hooks are not called on this data. To
|
|
93
|
+
* initialize the document with data to be patched, use {@link loadRawData}
|
|
94
|
+
* instead.
|
|
53
95
|
*/
|
|
54
96
|
initialData?: DeepReadonly<Record<string, unknown>>;
|
|
55
|
-
/**
|
|
56
|
-
* The document's raw data, as it would be read from Firestore. Unlike
|
|
57
|
-
* `initialData`, the given record is patched in place prior to parsing.
|
|
58
|
-
*/
|
|
59
|
-
rawData?: Record<string, unknown>;
|
|
60
97
|
};
|
|
61
98
|
/**
|
|
62
99
|
* Options for loading an existing document.
|
|
@@ -97,29 +134,36 @@ type InternalLoadOptions<FiretenderDocType> = LoadOptions<FiretenderDocType> & {
|
|
|
97
134
|
* A local representation of a Firestore document.
|
|
98
135
|
*/
|
|
99
136
|
export declare class FiretenderDoc<SchemaType extends z.SomeZodObject> {
|
|
100
|
-
/** Zod schema used to parse and validate the document's data */
|
|
137
|
+
/** Zod schema used to parse and validate the document's data. */
|
|
101
138
|
readonly schema: SchemaType;
|
|
102
|
-
/** Firestore reference to this doc, or collection in which to create it */
|
|
139
|
+
/** Firestore reference to this doc, or collection in which to create it. */
|
|
103
140
|
private ref;
|
|
104
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* Firestore document ID, which is the last part of the document path.
|
|
143
|
+
* Undefined for new docs not yet on Firestore.
|
|
144
|
+
*/
|
|
105
145
|
private docID;
|
|
106
146
|
/** If set, writes will throw and patches will not be written. */
|
|
107
147
|
readonly isReadonly: boolean;
|
|
148
|
+
/** If set, document data is copied rather than parsed and validated. */
|
|
149
|
+
readonly isParsingDisabled: boolean;
|
|
108
150
|
/** Is this a doc we presume does not yet exist in Firestore? */
|
|
109
151
|
private isNewDoc;
|
|
110
152
|
/** Use addDoc or setDoc to write all the data? If not, use updateDoc. */
|
|
111
153
|
private isSettingNewContents;
|
|
112
|
-
/**
|
|
154
|
+
/** Hooks to modify the raw data prior to parsing. */
|
|
155
|
+
private readonly beforeParse;
|
|
156
|
+
/** Hooks to update the document after reading and parsing. */
|
|
157
|
+
private readonly afterParse;
|
|
158
|
+
/** Hooks to update the document before writing it to Firestore. */
|
|
113
159
|
private readonly beforeWrite;
|
|
114
|
-
/**
|
|
115
|
-
private readonly
|
|
116
|
-
/** Don't save patches if false; delay in milliseconds if set. */
|
|
117
|
-
private readonly savePatchAfterDelay;
|
|
160
|
+
/** Delay before writing changes with `"write-soon"`. Default is 100 ms. */
|
|
161
|
+
private readonly writeSoonDelay;
|
|
118
162
|
/** Local copy of the document data, parsed into the Zod type */
|
|
119
163
|
private data;
|
|
120
|
-
/** Proxy to intercept write (.w) access to the data and track the changes */
|
|
164
|
+
/** Proxy to intercept write (.w) access to the data and track the changes. */
|
|
121
165
|
private dataProxy;
|
|
122
|
-
/** Map from the dot-delimited field path (per updateDoc()) to new value */
|
|
166
|
+
/** Map from the dot-delimited field path (per updateDoc()) to new value. */
|
|
123
167
|
private updates;
|
|
124
168
|
/** Function to unsubscribe from changes to the doc, if we're listening. */
|
|
125
169
|
private detachListener;
|
|
@@ -180,7 +224,7 @@ export declare class FiretenderDoc<SchemaType extends z.SomeZodObject> {
|
|
|
180
224
|
*/
|
|
181
225
|
copy(dest?: DocumentReference | CollectionReference | string | string[] | undefined, options?: AllFiretenderDocOptions<SchemaType>): FiretenderDoc<SchemaType>;
|
|
182
226
|
/**
|
|
183
|
-
* The document's ID string.
|
|
227
|
+
* The document's ID string, which is the last part of the document path.
|
|
184
228
|
*
|
|
185
229
|
* @throws Throws an error if the document does not yet have an ID.
|
|
186
230
|
*/
|
|
@@ -208,6 +252,13 @@ export declare class FiretenderDoc<SchemaType extends z.SomeZodObject> {
|
|
|
208
252
|
* Are we listening for changes to this document?
|
|
209
253
|
*/
|
|
210
254
|
get isListening(): boolean;
|
|
255
|
+
/**
|
|
256
|
+
* Loads raw data, as read from Firestore, into the document.
|
|
257
|
+
*
|
|
258
|
+
* @param rawData the data to be loaded. It may be modified in place by
|
|
259
|
+
* `beforeParse` hooks.
|
|
260
|
+
*/
|
|
261
|
+
loadRawData(rawData: Record<string, unknown>): Promise<this>;
|
|
211
262
|
/**
|
|
212
263
|
* Loads this document's data from Firestore.
|
|
213
264
|
*
|
|
@@ -250,6 +301,8 @@ export declare class FiretenderDoc<SchemaType extends z.SomeZodObject> {
|
|
|
250
301
|
*/
|
|
251
302
|
update(mutator: (data: z.infer<SchemaType>) => void): Promise<this>;
|
|
252
303
|
private throwIfReadonly;
|
|
304
|
+
/** Parses or clones the given data, depending on `isParsingDisabled`. */
|
|
305
|
+
private parseOrClone;
|
|
253
306
|
/**
|
|
254
307
|
* Given a snapshot, patch it, parse it, and save it as this doc's data. If
|
|
255
308
|
* not called from a listener, the patched data may be written to Firestore
|
|
@@ -260,10 +313,30 @@ export declare class FiretenderDoc<SchemaType extends z.SomeZodObject> {
|
|
|
260
313
|
*/
|
|
261
314
|
private loadFromSnapshot;
|
|
262
315
|
/**
|
|
263
|
-
* Applies
|
|
264
|
-
*
|
|
316
|
+
* Applies patches to the given raw data. Marks the entire document for
|
|
317
|
+
* writing if any patcher returns a truthy value.
|
|
318
|
+
*
|
|
319
|
+
* @returns the priority for writing the revised document.
|
|
320
|
+
*/
|
|
321
|
+
private runBeforeParseHooks;
|
|
322
|
+
/**
|
|
323
|
+
* Applies patches to the document after reading and parsing. The .w proxy is
|
|
324
|
+
* used to track changes for writable documents, so it's safe for documents
|
|
325
|
+
* with protected fields.
|
|
326
|
+
*
|
|
327
|
+
* @returns the priority for writing the updates.
|
|
328
|
+
*/
|
|
329
|
+
private runAfterParseHooks;
|
|
330
|
+
/**
|
|
331
|
+
* Depending on the priority, does nothing, schedules a write, or writes the
|
|
332
|
+
* document immediately.
|
|
333
|
+
*/
|
|
334
|
+
private writePatches;
|
|
335
|
+
/**
|
|
336
|
+
* Applies the beforeWrite updates to the document. The .w proxy is used to
|
|
337
|
+
* track changes, making it safe for documents with protected fields.
|
|
265
338
|
*/
|
|
266
|
-
private
|
|
339
|
+
private runBeforeWriteHooks;
|
|
267
340
|
/**
|
|
268
341
|
* Adds a field and its new value to the list of updates to be passed to
|
|
269
342
|
* Firestore's updateDoc(). Called when the proxies detect changes to the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FiretenderDoc.d.ts","sourceRoot":"","sources":["../src/FiretenderDoc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,EAGL,mBAAmB,EAEnB,iBAAiB,EACjB,gBAAgB,EAOjB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,
|
|
1
|
+
{"version":3,"file":"FiretenderDoc.d.ts","sourceRoot":"","sources":["../src/FiretenderDoc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,EAGL,mBAAmB,EAEnB,iBAAiB,EACjB,gBAAgB,EAOjB,MAAM,qBAAqB,CA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