firetender-admin 0.15.3 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/FiretenderCollection.d.ts +28 -8
- package/dist/FiretenderCollection.d.ts.map +1 -1
- package/dist/FiretenderCollection.js +45 -12
- package/dist/FiretenderCollection.js.map +1 -1
- package/dist/FiretenderDoc.d.ts +96 -38
- package/dist/FiretenderDoc.d.ts.map +1 -1
- package/dist/FiretenderDoc.js +117 -32
- 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 +313 -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/firestore-deps.d.ts +6 -6
- package/dist/firestore-deps.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 +15 -15
- package/src/FiretenderCollection.ts +52 -16
- package/src/FiretenderDoc.ts +216 -73
- 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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AC;IAelD;;;;;;OAMG;IACG,WAAW,CACf,OAAO,EAAE,CAAC,MAAM,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;CAsB7B"}
|
|
@@ -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.
|
|
266
|
+
*/
|
|
267
|
+
addAfterParseHook(hook) {
|
|
268
|
+
if (!this.defaultDocOptions.afterParse) {
|
|
269
|
+
this.defaultDocOptions.afterParse = [hook];
|
|
270
|
+
}
|
|
271
|
+
else {
|
|
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.
|
|
248
282
|
*/
|
|
249
|
-
|
|
250
|
-
if (!this.defaultDocOptions.
|
|
251
|
-
this.defaultDocOptions.
|
|
283
|
+
addBeforeWriteHook(hook) {
|
|
284
|
+
if (!this.defaultDocOptions.beforeWrite) {
|
|
285
|
+
this.defaultDocOptions.beforeWrite = [hook];
|
|
252
286
|
}
|
|
253
287
|
else {
|
|
254
|
-
this.defaultDocOptions.
|
|
288
|
+
this.defaultDocOptions.beforeWrite.push(hook);
|
|
255
289
|
}
|
|
256
290
|
}
|
|
257
291
|
//////////////////////////////////////////////////////////////////////////////
|
|
@@ -291,10 +325,9 @@ 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, {
|
|
328
|
+
return Promise.all(querySnapshot.docs.map((queryDoc) => new FiretenderDoc(this.schema, queryDoc.ref, {
|
|
295
329
|
...this.defaultDocOptions,
|
|
296
|
-
|
|
297
|
-
}));
|
|
330
|
+
}).loadRawData(queryDoc.data())));
|
|
298
331
|
}
|
|
299
332
|
}
|
|
300
333
|
//# 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;;;;;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iB;SAC1B,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAChC,CACF,CAAC;IACJ,CAAC;CACF"}
|
package/dist/FiretenderDoc.d.ts
CHANGED
|
@@ -1,40 +1,68 @@
|
|
|
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 | "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.
|
|
16
20
|
*
|
|
17
|
-
*
|
|
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.
|
|
18
35
|
*/
|
|
19
|
-
|
|
36
|
+
beforeParse?: BeforeParse[];
|
|
20
37
|
/**
|
|
21
|
-
* Functions that
|
|
22
|
-
*
|
|
23
|
-
*
|
|
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.
|
|
24
48
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* been written back. Only return true if the Firestore rules allow updating
|
|
28
|
-
* all patched fields; otherwise all subsequent writes will fail.
|
|
49
|
+
* The highest write priority is used. Writing occurs after all the functions
|
|
50
|
+
* have been called.
|
|
29
51
|
*/
|
|
30
|
-
|
|
52
|
+
afterParse?: AfterParse<SchemaType>[];
|
|
31
53
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* Defaults to 500, for a half-second delay.
|
|
54
|
+
* Functions that can modify the document before it is written to Firestore.
|
|
55
|
+
*
|
|
56
|
+
* For example, this hook could set a last-modified timestamp at every write.
|
|
36
57
|
*/
|
|
37
|
-
|
|
58
|
+
beforeWrite?: BeforeWrite<SchemaType>[];
|
|
59
|
+
/**
|
|
60
|
+
* Milliseconds before writing to Firestore for `"write-soon"`. Defaults to
|
|
61
|
+
* 100 ms.
|
|
62
|
+
*
|
|
63
|
+
* This delay can help avoid extra writes for quick read/modify/write cycles.
|
|
64
|
+
*/
|
|
65
|
+
writeSoonDelay?: number;
|
|
38
66
|
};
|
|
39
67
|
/**
|
|
40
68
|
* All options when initializing a FiretenderDoc object.
|
|
@@ -50,13 +78,12 @@ export type AllFiretenderDocOptions<SchemaType extends z.SomeZodObject> = Firete
|
|
|
50
78
|
/**
|
|
51
79
|
* The document's initial data, which must define a valid instance of the
|
|
52
80
|
* document according to its schema.
|
|
81
|
+
*
|
|
82
|
+
* The `beforeParse` and `afterParse` hooks are not called on this data. To
|
|
83
|
+
* initialize the document with data to be patched, use {@link loadRawData}
|
|
84
|
+
* instead.
|
|
53
85
|
*/
|
|
54
86
|
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
87
|
};
|
|
61
88
|
/**
|
|
62
89
|
* Options for loading an existing document.
|
|
@@ -97,11 +124,14 @@ type InternalLoadOptions<FiretenderDocType> = LoadOptions<FiretenderDocType> & {
|
|
|
97
124
|
* A local representation of a Firestore document.
|
|
98
125
|
*/
|
|
99
126
|
export declare class FiretenderDoc<SchemaType extends z.SomeZodObject> {
|
|
100
|
-
/** Zod schema used to parse and validate the document's data */
|
|
127
|
+
/** Zod schema used to parse and validate the document's data. */
|
|
101
128
|
readonly schema: SchemaType;
|
|
102
|
-
/** Firestore reference to this doc, or collection in which to create it */
|
|
129
|
+
/** Firestore reference to this doc, or collection in which to create it. */
|
|
103
130
|
private ref;
|
|
104
|
-
/**
|
|
131
|
+
/**
|
|
132
|
+
* Firestore document ID, which is the last part of the document path.
|
|
133
|
+
* Undefined for new docs not yet on Firestore.
|
|
134
|
+
*/
|
|
105
135
|
private docID;
|
|
106
136
|
/** If set, writes will throw and patches will not be written. */
|
|
107
137
|
readonly isReadonly: boolean;
|
|
@@ -109,17 +139,19 @@ export declare class FiretenderDoc<SchemaType extends z.SomeZodObject> {
|
|
|
109
139
|
private isNewDoc;
|
|
110
140
|
/** Use addDoc or setDoc to write all the data? If not, use updateDoc. */
|
|
111
141
|
private isSettingNewContents;
|
|
112
|
-
/**
|
|
142
|
+
/** Hooks to modify the raw data prior to parsing. */
|
|
143
|
+
private readonly beforeParse;
|
|
144
|
+
/** Hooks to update the document after reading and parsing. */
|
|
145
|
+
private readonly afterParse;
|
|
146
|
+
/** Hooks to update the document before writing it to Firestore. */
|
|
113
147
|
private readonly beforeWrite;
|
|
114
|
-
/**
|
|
115
|
-
private readonly
|
|
116
|
-
/** Don't save patches if false; delay in milliseconds if set. */
|
|
117
|
-
private readonly savePatchAfterDelay;
|
|
148
|
+
/** Delay before writing changes with `"write-soon"`. Default is 100 ms. */
|
|
149
|
+
private readonly writeSoonDelay;
|
|
118
150
|
/** Local copy of the document data, parsed into the Zod type */
|
|
119
151
|
private data;
|
|
120
|
-
/** Proxy to intercept write (.w) access to the data and track the changes */
|
|
152
|
+
/** Proxy to intercept write (.w) access to the data and track the changes. */
|
|
121
153
|
private dataProxy;
|
|
122
|
-
/** Map from the dot-delimited field path (per updateDoc()) to new value */
|
|
154
|
+
/** Map from the dot-delimited field path (per updateDoc()) to new value. */
|
|
123
155
|
private updates;
|
|
124
156
|
/** Function to unsubscribe from changes to the doc, if we're listening. */
|
|
125
157
|
private detachListener;
|
|
@@ -180,7 +212,7 @@ export declare class FiretenderDoc<SchemaType extends z.SomeZodObject> {
|
|
|
180
212
|
*/
|
|
181
213
|
copy(dest?: DocumentReference | CollectionReference | string | string[] | undefined, options?: AllFiretenderDocOptions<SchemaType>): FiretenderDoc<SchemaType>;
|
|
182
214
|
/**
|
|
183
|
-
* The document's ID string.
|
|
215
|
+
* The document's ID string, which is the last part of the document path.
|
|
184
216
|
*
|
|
185
217
|
* @throws Throws an error if the document does not yet have an ID.
|
|
186
218
|
*/
|
|
@@ -208,6 +240,13 @@ export declare class FiretenderDoc<SchemaType extends z.SomeZodObject> {
|
|
|
208
240
|
* Are we listening for changes to this document?
|
|
209
241
|
*/
|
|
210
242
|
get isListening(): boolean;
|
|
243
|
+
/**
|
|
244
|
+
* Loads raw data, as read from Firestore, into the document.
|
|
245
|
+
*
|
|
246
|
+
* @param rawData the data to be loaded. It may be modified in place by
|
|
247
|
+
* `beforeParse` hooks.
|
|
248
|
+
*/
|
|
249
|
+
loadRawData(rawData: Record<string, unknown>): Promise<this>;
|
|
211
250
|
/**
|
|
212
251
|
* Loads this document's data from Firestore.
|
|
213
252
|
*
|
|
@@ -260,10 +299,29 @@ export declare class FiretenderDoc<SchemaType extends z.SomeZodObject> {
|
|
|
260
299
|
*/
|
|
261
300
|
private loadFromSnapshot;
|
|
262
301
|
/**
|
|
263
|
-
* Applies
|
|
264
|
-
*
|
|
302
|
+
* Applies patches to the given raw data. Marks the entire document for
|
|
303
|
+
* writing if any patcher returns a truthy value.
|
|
304
|
+
*
|
|
305
|
+
* @returns the priority for writing the revised document.
|
|
306
|
+
*/
|
|
307
|
+
private runBeforeParseHooks;
|
|
308
|
+
/**
|
|
309
|
+
* Applies patches to the document after reading and parsing. The .w proxy is
|
|
310
|
+
* used to track changes, so it's safe for documents with protected fields.
|
|
311
|
+
*
|
|
312
|
+
* @returns the priority for writing the updates.
|
|
313
|
+
*/
|
|
314
|
+
private runAfterParseHooks;
|
|
315
|
+
/**
|
|
316
|
+
* Depending on the priority, does nothing, schedules a write, or writes the
|
|
317
|
+
* document immediately.
|
|
318
|
+
*/
|
|
319
|
+
private writePatches;
|
|
320
|
+
/**
|
|
321
|
+
* Applies the beforeWrite updates to the document. The .w proxy is used to
|
|
322
|
+
* track changes, making it safe for documents with protected fields.
|
|
265
323
|
*/
|
|
266
|
-
private
|
|
324
|
+
private runBeforeWriteHooks;
|
|
267
325
|
/**
|
|
268
326
|
* Adds a field and its new value to the list of updates to be passed to
|
|
269
327
|
* 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,CAAC;AAE7B,OAAO,KAAK,EACV,WAAW,EAEX,YAAY,EACb,MAAM,iBAAiB,CAAC;AAKzB,MAAM,MAAM,WAAW,GAAG,CACxB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,OAAO,EAAE,MAAM,EAAE,KACd,WAAW,CAAC,IAAI,GAAG,OAAO,GAAG,YAAY,GAAG,WAAW,CAAC,CAAC;AAO9D,MAAM,MAAM,UAAU,CAAC,UAAU,SAAS,CAAC,CAAC,aAAa,IAAI,CAC3D,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,EACzB,OAAO,EAAE,MAAM,EAAE,KACd,WAAW,CAAC,IAAI,GAAG,YAAY,GAAG,WAAW,CAAC,CAAC;AAKpD,MAAM,MAAM,WAAW,CAAC,UAAU,SAAS,CAAC,CAAC,aAAa,IAAI,CAC5D,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,EACzB,OAAO,EAAE,MAAM,EA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