shelving 1.77.0 → 1.80.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/{api → modules/api}/Resource.d.ts +0 -0
- package/{api → modules/api}/Resource.js +0 -0
- package/{api → modules/api}/index.d.ts +0 -0
- package/{api → modules/api}/index.js +0 -0
- package/{constraint → modules/constraint}/Constraint.d.ts +0 -0
- package/{constraint → modules/constraint}/Constraint.js +0 -0
- package/{constraint → modules/constraint}/Constraints.d.ts +0 -0
- package/{constraint → modules/constraint}/Constraints.js +2 -2
- package/{constraint → modules/constraint}/FilterConstraint.d.ts +1 -1
- package/{constraint → modules/constraint}/FilterConstraint.js +0 -0
- package/{constraint → modules/constraint}/FilterConstraints.d.ts +0 -0
- package/{constraint → modules/constraint}/FilterConstraints.js +0 -0
- package/{constraint → modules/constraint}/QueryConstraints.d.ts +1 -1
- package/{constraint → modules/constraint}/QueryConstraints.js +1 -1
- package/{constraint → modules/constraint}/SortConstraint.d.ts +0 -0
- package/{constraint → modules/constraint}/SortConstraint.js +0 -0
- package/{constraint → modules/constraint}/SortConstraints.d.ts +0 -0
- package/{constraint → modules/constraint}/SortConstraints.js +0 -0
- package/{constraint → modules/constraint}/index.d.ts +0 -0
- package/{constraint → modules/constraint}/index.js +0 -0
- package/{db → modules/db}/Change.d.ts +9 -12
- package/{db → modules/db}/Change.js +2 -2
- package/{db → modules/db}/Collection.d.ts +34 -6
- package/{db → modules/db}/Collection.js +47 -7
- package/modules/db/Database.d.ts +76 -0
- package/modules/db/Database.js +95 -0
- package/{db → modules/db}/Item.d.ts +9 -9
- package/{db → modules/db}/Item.js +19 -21
- package/{db → modules/db}/Query.d.ts +4 -4
- package/{db → modules/db}/Query.js +2 -3
- package/{db → modules/db}/index.d.ts +0 -0
- package/{db → modules/db}/index.js +0 -0
- package/{error → modules/error}/AssertionError.d.ts +0 -0
- package/{error → modules/error}/AssertionError.js +0 -0
- package/{error → modules/error}/ConditionError.d.ts +0 -0
- package/{error → modules/error}/ConditionError.js +0 -0
- package/{error → modules/error}/PermissionError.d.ts +0 -0
- package/{error → modules/error}/PermissionError.js +0 -0
- package/{error → modules/error}/RequiredError.d.ts +0 -0
- package/{error → modules/error}/RequiredError.js +0 -0
- package/{error → modules/error}/ThroughError.d.ts +0 -0
- package/{error → modules/error}/ThroughError.js +0 -0
- package/{error → modules/error}/UnsupportedError.d.ts +0 -0
- package/{error → modules/error}/UnsupportedError.js +0 -0
- package/{error → modules/error}/ValidationError.d.ts +0 -0
- package/{error → modules/error}/ValidationError.js +0 -0
- package/{error → modules/error}/index.d.ts +0 -0
- package/{error → modules/error}/index.js +0 -0
- package/{feedback → modules/feedback}/ErrorFeedback.d.ts +0 -0
- package/{feedback → modules/feedback}/ErrorFeedback.js +1 -5
- package/{feedback → modules/feedback}/Feedback.d.ts +0 -0
- package/{feedback → modules/feedback}/Feedback.js +1 -5
- package/{feedback → modules/feedback}/InvalidFeedback.d.ts +0 -0
- package/{feedback → modules/feedback}/InvalidFeedback.js +1 -5
- package/{feedback → modules/feedback}/SuccessFeedback.d.ts +0 -0
- package/{feedback → modules/feedback}/SuccessFeedback.js +1 -5
- package/{feedback → modules/feedback}/WarningFeedback.d.ts +0 -0
- package/{feedback → modules/feedback}/WarningFeedback.js +1 -5
- package/{feedback → modules/feedback}/hydrations.d.ts +0 -0
- package/{feedback → modules/feedback}/hydrations.js +0 -0
- package/{feedback → modules/feedback}/index.d.ts +0 -0
- package/{feedback → modules/feedback}/index.js +0 -0
- package/{firestore → modules/firestore}/client/FirestoreClientProvider.d.ts +3 -3
- package/{firestore → modules/firestore}/client/FirestoreClientProvider.js +4 -4
- package/{firestore → modules/firestore}/client/index.d.ts +0 -0
- package/{firestore → modules/firestore}/client/index.js +0 -0
- package/{firestore → modules/firestore}/lite/FirestoreLiteProvider.d.ts +3 -3
- package/{firestore → modules/firestore}/lite/FirestoreLiteProvider.js +4 -4
- package/{firestore → modules/firestore}/lite/index.d.ts +0 -0
- package/{firestore → modules/firestore}/lite/index.js +0 -0
- package/{firestore → modules/firestore}/server/FirestoreServerProvider.d.ts +3 -3
- package/{firestore → modules/firestore}/server/FirestoreServerProvider.js +4 -4
- package/{firestore → modules/firestore}/server/index.d.ts +0 -0
- package/{firestore → modules/firestore}/server/index.js +0 -0
- package/{index.d.ts → modules/index.d.ts} +0 -0
- package/{index.js → modules/index.js} +0 -0
- package/{markup → modules/markup}/index.d.ts +0 -0
- package/{markup → modules/markup}/index.js +0 -0
- package/{markup → modules/markup}/options.d.ts +0 -0
- package/{markup → modules/markup}/options.js +0 -0
- package/{markup → modules/markup}/regexp.d.ts +0 -0
- package/{markup → modules/markup}/regexp.js +0 -0
- package/{markup → modules/markup}/render.d.ts +0 -0
- package/{markup → modules/markup}/render.js +0 -0
- package/{markup → modules/markup}/rules.d.ts +0 -0
- package/{markup → modules/markup}/rules.js +0 -0
- package/{observe → modules/observe}/AbstractObserver.d.ts +0 -0
- package/{observe → modules/observe}/AbstractObserver.js +0 -0
- package/{observe → modules/observe}/AsyncObserver.d.ts +0 -0
- package/{observe → modules/observe}/AsyncObserver.js +0 -0
- package/{observe → modules/observe}/LastSubject.d.ts +0 -0
- package/{observe → modules/observe}/LastSubject.js +0 -0
- package/{observe → modules/observe}/MatchObserver.d.ts +0 -0
- package/{observe → modules/observe}/MatchObserver.js +0 -0
- package/{observe → modules/observe}/MatchableObserver.d.ts +0 -0
- package/{observe → modules/observe}/MatchableObserver.js +0 -0
- package/{observe → modules/observe}/Observable.d.ts +0 -0
- package/{observe → modules/observe}/Observable.js +0 -0
- package/{observe → modules/observe}/Observer.d.ts +0 -0
- package/{observe → modules/observe}/Observer.js +0 -0
- package/{observe → modules/observe}/OnceObserver.d.ts +0 -0
- package/{observe → modules/observe}/OnceObserver.js +0 -0
- package/{observe → modules/observe}/Subject.d.ts +0 -0
- package/{observe → modules/observe}/Subject.js +0 -0
- package/{observe → modules/observe}/ThroughObserver.d.ts +0 -0
- package/{observe → modules/observe}/ThroughObserver.js +0 -0
- package/{observe → modules/observe}/TransformObserver.d.ts +0 -0
- package/{observe → modules/observe}/TransformObserver.js +0 -0
- package/{observe → modules/observe}/TransformableObserver.d.ts +0 -0
- package/{observe → modules/observe}/TransformableObserver.js +0 -0
- package/{observe → modules/observe}/index.d.ts +0 -0
- package/{observe → modules/observe}/index.js +0 -0
- package/{observe → modules/observe}/util.d.ts +0 -0
- package/{observe → modules/observe}/util.js +0 -0
- package/{provider → modules/provider}/BatchProvider.d.ts +0 -0
- package/{provider → modules/provider}/BatchProvider.js +0 -0
- package/{provider → modules/provider}/CacheProvider.d.ts +3 -3
- package/{provider → modules/provider}/CacheProvider.js +6 -6
- package/{provider → modules/provider}/DebugProvider.d.ts +5 -5
- package/{provider → modules/provider}/DebugProvider.js +12 -12
- package/{provider → modules/provider}/MemoryProvider.d.ts +5 -5
- package/{provider → modules/provider}/MemoryProvider.js +9 -8
- package/{provider → modules/provider}/Provider.d.ts +7 -7
- package/{provider → modules/provider}/Provider.js +0 -0
- package/{provider → modules/provider}/ThroughProvider.d.ts +5 -5
- package/{provider → modules/provider}/ThroughProvider.js +4 -4
- package/{provider → modules/provider}/ValidationProvider.d.ts +11 -11
- package/{provider → modules/provider}/ValidationProvider.js +29 -28
- package/{provider → modules/provider}/index.d.ts +0 -0
- package/{provider → modules/provider}/index.js +0 -0
- package/{react → modules/react}/index.d.ts +0 -0
- package/{react → modules/react}/index.js +0 -0
- package/{react → modules/react}/useCache.d.ts +0 -0
- package/{react → modules/react}/useCache.js +0 -0
- package/{react → modules/react}/useInstance.d.ts +0 -0
- package/{react → modules/react}/useInstance.js +0 -0
- package/{react → modules/react}/useItem.d.ts +0 -0
- package/{react → modules/react}/useItem.js +0 -0
- package/{react → modules/react}/useLazy.d.ts +0 -0
- package/{react → modules/react}/useLazy.js +0 -0
- package/{react → modules/react}/useQuery.d.ts +0 -0
- package/{react → modules/react}/useQuery.js +0 -0
- package/{react → modules/react}/useReduce.d.ts +0 -0
- package/{react → modules/react}/useReduce.js +0 -0
- package/{react → modules/react}/useSubscribe.d.ts +0 -0
- package/{react → modules/react}/useSubscribe.js +0 -0
- package/{schema → modules/schema}/AllowSchema.d.ts +0 -0
- package/{schema → modules/schema}/AllowSchema.js +2 -2
- package/{schema → modules/schema}/ArraySchema.d.ts +0 -0
- package/{schema → modules/schema}/ArraySchema.js +0 -0
- package/{schema → modules/schema}/BooleanSchema.d.ts +0 -0
- package/{schema → modules/schema}/BooleanSchema.js +0 -0
- package/{schema → modules/schema}/ColorSchema.d.ts +0 -0
- package/{schema → modules/schema}/ColorSchema.js +0 -0
- package/{schema → modules/schema}/DataSchema.d.ts +5 -1
- package/{schema → modules/schema}/DataSchema.js +0 -0
- package/{schema → modules/schema}/DateSchema.d.ts +0 -0
- package/{schema → modules/schema}/DateSchema.js +0 -0
- package/{schema → modules/schema}/EmailSchema.d.ts +0 -0
- package/{schema → modules/schema}/EmailSchema.js +0 -0
- package/{schema → modules/schema}/KeySchema.d.ts +0 -0
- package/{schema → modules/schema}/KeySchema.js +0 -0
- package/{schema → modules/schema}/LinkSchema.d.ts +0 -0
- package/{schema → modules/schema}/LinkSchema.js +0 -0
- package/{schema → modules/schema}/NumberSchema.d.ts +0 -0
- package/{schema → modules/schema}/NumberSchema.js +0 -0
- package/{schema → modules/schema}/ObjectSchema.d.ts +0 -0
- package/{schema → modules/schema}/ObjectSchema.js +0 -0
- package/{schema → modules/schema}/OptionalSchema.d.ts +0 -0
- package/{schema → modules/schema}/OptionalSchema.js +0 -0
- package/{schema → modules/schema}/PhoneSchema.d.ts +0 -0
- package/{schema → modules/schema}/PhoneSchema.js +0 -0
- package/{schema → modules/schema}/RequiredSchema.d.ts +0 -0
- package/{schema → modules/schema}/RequiredSchema.js +0 -0
- package/{schema → modules/schema}/Schema.d.ts +0 -0
- package/{schema → modules/schema}/Schema.js +0 -0
- package/{schema → modules/schema}/SlugSchema.d.ts +0 -0
- package/{schema → modules/schema}/SlugSchema.js +0 -0
- package/{schema → modules/schema}/StringSchema.d.ts +0 -0
- package/{schema → modules/schema}/StringSchema.js +0 -0
- package/{schema → modules/schema}/ThroughSchema.d.ts +0 -0
- package/{schema → modules/schema}/ThroughSchema.js +0 -0
- package/{schema → modules/schema}/index.d.ts +0 -0
- package/{schema → modules/schema}/index.js +0 -0
- package/{state → modules/state}/ArrayState.d.ts +6 -8
- package/modules/state/ArrayState.js +28 -0
- package/{state → modules/state}/BooleanState.d.ts +0 -0
- package/{state → modules/state}/BooleanState.js +0 -0
- package/{state → modules/state}/DataState.d.ts +3 -3
- package/{state → modules/state}/DataState.js +2 -1
- package/{state → modules/state}/ObjectState.d.ts +1 -1
- package/{state → modules/state}/ObjectState.js +4 -4
- package/{state → modules/state}/SelfClosingState.d.ts +0 -0
- package/{state → modules/state}/SelfClosingState.js +0 -0
- package/{state → modules/state}/State.d.ts +0 -0
- package/{state → modules/state}/State.js +0 -0
- package/{state → modules/state}/index.d.ts +0 -0
- package/{state → modules/state}/index.js +0 -0
- package/{test → modules/test}/basics.d.ts +0 -0
- package/{test → modules/test}/basics.js +0 -0
- package/{test → modules/test}/index.d.ts +0 -0
- package/{test → modules/test}/index.js +0 -0
- package/{test → modules/test}/people.d.ts +0 -0
- package/{test → modules/test}/people.js +0 -0
- package/{test → modules/test}/util.d.ts +0 -0
- package/{test → modules/test}/util.js +0 -0
- package/{update → modules/update}/ArrayUpdate.d.ts +0 -0
- package/{update → modules/update}/ArrayUpdate.js +1 -1
- package/{update → modules/update}/DataUpdate.d.ts +13 -7
- package/{update → modules/update}/DataUpdate.js +29 -22
- package/{update → modules/update}/Delete.d.ts +0 -0
- package/{update → modules/update}/Delete.js +0 -0
- package/{update → modules/update}/Increment.d.ts +0 -0
- package/{update → modules/update}/Increment.js +0 -0
- package/{update → modules/update}/ObjectUpdate.d.ts +0 -0
- package/{update → modules/update}/ObjectUpdate.js +0 -0
- package/{update → modules/update}/Update.d.ts +0 -0
- package/{update → modules/update}/Update.js +0 -0
- package/modules/update/hydrations.d.ts +3 -0
- package/{update → modules/update}/hydrations.js +2 -2
- package/{update → modules/update}/index.d.ts +0 -0
- package/{update → modules/update}/index.js +0 -0
- package/{util → modules/util}/array.d.ts +6 -52
- package/{util → modules/util}/array.js +15 -89
- package/{util → modules/util}/assert.d.ts +0 -0
- package/{util → modules/util}/assert.js +0 -0
- package/{util → modules/util}/async.d.ts +0 -0
- package/{util → modules/util}/async.js +0 -0
- package/{util → modules/util}/boolean.d.ts +0 -0
- package/{util → modules/util}/boolean.js +0 -0
- package/{util → modules/util}/class.d.ts +0 -0
- package/{util → modules/util}/class.js +0 -0
- package/{util → modules/util}/clone.d.ts +0 -0
- package/{util → modules/util}/clone.js +0 -0
- package/{util → modules/util}/color.d.ts +0 -0
- package/{util → modules/util}/color.js +0 -0
- package/modules/util/data.d.ts +74 -0
- package/modules/util/data.js +27 -0
- package/{util → modules/util}/date.d.ts +0 -0
- package/{util → modules/util}/date.js +0 -0
- package/{util → modules/util}/debug.d.ts +0 -0
- package/{util → modules/util}/debug.js +0 -0
- package/{util → modules/util}/diff.d.ts +0 -0
- package/{util → modules/util}/diff.js +0 -0
- package/{util → modules/util}/entry.d.ts +2 -2
- package/{util → modules/util}/entry.js +0 -0
- package/{util → modules/util}/equal.d.ts +0 -0
- package/{util → modules/util}/equal.js +0 -0
- package/{util → modules/util}/error.d.ts +0 -0
- package/{util → modules/util}/error.js +0 -0
- package/{util → modules/util}/filter.d.ts +0 -0
- package/{util → modules/util}/filter.js +0 -0
- package/{util → modules/util}/function.d.ts +0 -0
- package/{util → modules/util}/function.js +0 -0
- package/{util → modules/util}/hydrate.d.ts +0 -0
- package/{util → modules/util}/hydrate.js +0 -0
- package/{util → modules/util}/index.d.ts +0 -0
- package/{util → modules/util}/index.js +0 -0
- package/{util → modules/util}/iterate.d.ts +0 -0
- package/{util → modules/util}/iterate.js +0 -0
- package/{util → modules/util}/jsx.d.ts +0 -0
- package/{util → modules/util}/jsx.js +0 -0
- package/{util → modules/util}/lazy.d.ts +0 -0
- package/{util → modules/util}/lazy.js +0 -0
- package/{util → modules/util}/map.d.ts +0 -0
- package/{util → modules/util}/map.js +0 -0
- package/{util → modules/util}/match.d.ts +0 -0
- package/{util → modules/util}/match.js +0 -0
- package/{util → modules/util}/merge.d.ts +0 -0
- package/{util → modules/util}/merge.js +0 -0
- package/{util → modules/util}/null.d.ts +0 -0
- package/{util → modules/util}/null.js +0 -0
- package/{util → modules/util}/number.d.ts +0 -0
- package/{util → modules/util}/number.js +0 -0
- package/modules/util/object.d.ts +110 -0
- package/modules/util/object.js +124 -0
- package/{util → modules/util}/random.d.ts +0 -0
- package/{util → modules/util}/random.js +0 -0
- package/{util → modules/util}/regexp.d.ts +0 -0
- package/{util → modules/util}/regexp.js +0 -0
- package/{util → modules/util}/serialise.d.ts +0 -0
- package/{util → modules/util}/serialise.js +0 -0
- package/{util → modules/util}/set.d.ts +0 -0
- package/{util → modules/util}/set.js +0 -0
- package/{util → modules/util}/sort.d.ts +0 -0
- package/{util → modules/util}/sort.js +0 -0
- package/{util → modules/util}/source.d.ts +0 -0
- package/{util → modules/util}/source.js +0 -0
- package/{util → modules/util}/string.d.ts +0 -0
- package/{util → modules/util}/string.js +0 -0
- package/{util → modules/util}/template.d.ts +0 -0
- package/{util → modules/util}/template.js +0 -0
- package/{util → modules/util}/timeout.d.ts +0 -0
- package/{util → modules/util}/timeout.js +0 -0
- package/{util → modules/util}/transform.d.ts +10 -14
- package/{util → modules/util}/transform.js +20 -8
- package/{util → modules/util}/undefined.d.ts +0 -0
- package/{util → modules/util}/undefined.js +0 -0
- package/{util → modules/util}/units.d.ts +0 -0
- package/{util → modules/util}/units.js +0 -0
- package/{util → modules/util}/url.d.ts +0 -0
- package/{util → modules/util}/url.js +0 -0
- package/{util → modules/util}/validate.d.ts +2 -2
- package/{util → modules/util}/validate.js +1 -1
- package/package.json +8 -8
- package/db/Database.d.ts +0 -42
- package/db/Database.js +0 -43
- package/state/ArrayState.js +0 -32
- package/update/hydrations.d.ts +0 -3
- package/util/data.d.ts +0 -126
- package/util/data.js +0 -78
- package/util/object.d.ts +0 -102
- package/util/object.js +0 -121
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Dispatch } from "../util/function.js";
|
|
2
2
|
import type { Key, Datas } from "../util/data.js";
|
|
3
|
+
import type { Updates } from "../update/DataUpdate.js";
|
|
3
4
|
import type { PartialObserver } from "../observe/Observer.js";
|
|
4
5
|
import type { Observable, Unsubscribe } from "../observe/Observable.js";
|
|
5
6
|
import type { FilterList } from "../constraint/FilterConstraint.js";
|
|
6
7
|
import type { SortList } from "../constraint/SortConstraint.js";
|
|
7
8
|
import { QueryConstraints } from "../constraint/QueryConstraints.js";
|
|
8
|
-
import { DataUpdate, PropUpdates } from "../update/DataUpdate.js";
|
|
9
9
|
import type { ItemArray, ItemValue, ItemData } from "./Item.js";
|
|
10
10
|
import type { AsyncDatabase, Database } from "./Database.js";
|
|
11
11
|
/** Reference to a set of items in a sync or async provider. */
|
|
@@ -68,7 +68,7 @@ declare abstract class BaseQuery<T extends Datas = Datas, K extends Key<T> = Key
|
|
|
68
68
|
* @param updates `Update` instance or set of updates to apply to every matching item.
|
|
69
69
|
* @return Nothing (possibly promised).
|
|
70
70
|
*/
|
|
71
|
-
abstract update(updates:
|
|
71
|
+
abstract update(updates: Updates<T[K]>): number | PromiseLike<number>;
|
|
72
72
|
/**
|
|
73
73
|
* Delete all matching items.
|
|
74
74
|
* @return Nothing (possibly promised).
|
|
@@ -89,7 +89,7 @@ export declare class Query<T extends Datas = Datas, K extends Key<T> = Key<T>> e
|
|
|
89
89
|
get lastValue(): ItemValue<T[K]>;
|
|
90
90
|
get lastData(): ItemData<T[K]>;
|
|
91
91
|
set(data: T[K]): number;
|
|
92
|
-
update(updates:
|
|
92
|
+
update(updates: Updates<T[K]>): number;
|
|
93
93
|
delete(): number;
|
|
94
94
|
}
|
|
95
95
|
/** Reference to a set of items in a provider. */
|
|
@@ -105,7 +105,7 @@ export declare class AsyncQuery<T extends Datas = Datas, K extends Key<T> = Key<
|
|
|
105
105
|
get lastValue(): Promise<ItemValue<T[K]>>;
|
|
106
106
|
get lastData(): Promise<ItemData<T[K]>>;
|
|
107
107
|
set(data: T[K]): Promise<number>;
|
|
108
|
-
update(updates:
|
|
108
|
+
update(updates: Updates<T[K]>): PromiseLike<number>;
|
|
109
109
|
delete(): PromiseLike<number>;
|
|
110
110
|
}
|
|
111
111
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getFirstItem, getLastItem, getOptionalFirstItem, getOptionalLastItem } from "../util/array.js";
|
|
2
2
|
import { QueryConstraints } from "../constraint/QueryConstraints.js";
|
|
3
3
|
import { countItems, hasItems } from "../util/iterate.js";
|
|
4
|
-
import { DataUpdate } from "../update/DataUpdate.js";
|
|
5
4
|
/** Reference to a set of items in a sync or async provider. */
|
|
6
5
|
class BaseQuery extends QueryConstraints {
|
|
7
6
|
/**
|
|
@@ -51,7 +50,7 @@ export class Query extends BaseQuery {
|
|
|
51
50
|
return this.db.provider.setQuery(this.collection, this, data);
|
|
52
51
|
}
|
|
53
52
|
update(updates) {
|
|
54
|
-
return this.db.provider.updateQuery(this.collection, this, updates
|
|
53
|
+
return this.db.provider.updateQuery(this.collection, this, updates);
|
|
55
54
|
}
|
|
56
55
|
delete() {
|
|
57
56
|
return this.db.provider.deleteQuery(this.collection, this);
|
|
@@ -89,7 +88,7 @@ export class AsyncQuery extends BaseQuery {
|
|
|
89
88
|
return this.db.provider.setQuery(this.collection, this, data);
|
|
90
89
|
}
|
|
91
90
|
update(updates) {
|
|
92
|
-
return this.db.provider.updateQuery(this.collection, this, updates
|
|
91
|
+
return this.db.provider.updateQuery(this.collection, this, updates);
|
|
93
92
|
}
|
|
94
93
|
delete() {
|
|
95
94
|
return this.db.provider.deleteQuery(this.collection, this);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -4,15 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
7
|
import { setPrototype } from "../util/class.js";
|
|
11
8
|
import { Feedback } from "./Feedback.js";
|
|
12
9
|
/** Specific type of `Feedback` to indicate an error (something went wrong). */
|
|
13
10
|
export class ErrorFeedback extends Feedback {
|
|
14
11
|
}
|
|
15
12
|
__decorate([
|
|
16
|
-
setPrototype("name", "ErrorFeedback")
|
|
17
|
-
__metadata("design:type", String)
|
|
13
|
+
setPrototype("name", "ErrorFeedback")
|
|
18
14
|
], ErrorFeedback.prototype, "name", void 0);
|
|
File without changes
|
|
@@ -4,9 +4,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
7
|
import { isObject } from "../util/object.js";
|
|
11
8
|
import { getEntries } from "../util/entry.js";
|
|
12
9
|
import { setPrototype } from "../util/class.js";
|
|
@@ -28,8 +25,7 @@ export class Feedback {
|
|
|
28
25
|
}
|
|
29
26
|
}
|
|
30
27
|
__decorate([
|
|
31
|
-
setPrototype("name", "Feedback")
|
|
32
|
-
__metadata("design:type", String)
|
|
28
|
+
setPrototype("name", "Feedback")
|
|
33
29
|
], Feedback.prototype, "name", void 0);
|
|
34
30
|
/** Is an unknown value a `Feedback` object. */
|
|
35
31
|
export const isFeedback = (v) => isObject(v) && typeof v.name === "string" && v.name.endsWith("Feedback") && typeof v.message === "string";
|
|
File without changes
|
|
@@ -4,15 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
7
|
import { setPrototype } from "../util/class.js";
|
|
11
8
|
import { ErrorFeedback } from "./ErrorFeedback.js";
|
|
12
9
|
/** Specific type of `ErrorFeedback` returned from `validate()` when a value is invalid. */
|
|
13
10
|
export class InvalidFeedback extends ErrorFeedback {
|
|
14
11
|
}
|
|
15
12
|
__decorate([
|
|
16
|
-
setPrototype("name", "InvalidFeedback")
|
|
17
|
-
__metadata("design:type", String)
|
|
13
|
+
setPrototype("name", "InvalidFeedback")
|
|
18
14
|
], InvalidFeedback.prototype, "name", void 0);
|
|
File without changes
|
|
@@ -4,15 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
7
|
import { setPrototype } from "../util/class.js";
|
|
11
8
|
import { Feedback } from "./Feedback.js";
|
|
12
9
|
/** Specific type of `Feedback` to indicate success (something went right!). */
|
|
13
10
|
export class SuccessFeedback extends Feedback {
|
|
14
11
|
}
|
|
15
12
|
__decorate([
|
|
16
|
-
setPrototype("name", "SuccessFeedback")
|
|
17
|
-
__metadata("design:type", String)
|
|
13
|
+
setPrototype("name", "SuccessFeedback")
|
|
18
14
|
], SuccessFeedback.prototype, "name", void 0);
|
|
File without changes
|
|
@@ -4,15 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
7
|
import { setPrototype } from "../util/class.js";
|
|
11
8
|
import { Feedback } from "./Feedback.js";
|
|
12
9
|
/** Specific type of `Feedback` to indicate warning (something might go wrong soon). */
|
|
13
10
|
export class WarningFeedback extends Feedback {
|
|
14
11
|
}
|
|
15
12
|
__decorate([
|
|
16
|
-
setPrototype("name", "WarningFeedback")
|
|
17
|
-
__metadata("design:type", String)
|
|
13
|
+
setPrototype("name", "WarningFeedback")
|
|
18
14
|
], WarningFeedback.prototype, "name", void 0);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -4,7 +4,7 @@ import type { Unsubscribe } from "../../observe/Observable.js";
|
|
|
4
4
|
import type { AsyncProvider } from "../../provider/Provider.js";
|
|
5
5
|
import type { ItemArray, ItemValue, ItemConstraints } from "../../db/Item.js";
|
|
6
6
|
import { Observer, PartialObserver } from "../../observe/Observer.js";
|
|
7
|
-
import {
|
|
7
|
+
import { Updates } from "../../update/DataUpdate.js";
|
|
8
8
|
/**
|
|
9
9
|
* Firestore client database provider.
|
|
10
10
|
* - Works with the Firebase JS SDK.
|
|
@@ -18,11 +18,11 @@ export declare class FirestoreClientProvider implements AsyncProvider {
|
|
|
18
18
|
subscribeItem(collection: string, id: string, observer: PartialObserver<ItemValue>): Unsubscribe;
|
|
19
19
|
addItem(collection: string, data: Data): Promise<string>;
|
|
20
20
|
setItem(collection: string, id: string, data: Data): Promise<void>;
|
|
21
|
-
updateItem(collection: string, id: string,
|
|
21
|
+
updateItem(collection: string, id: string, updates: Updates): Promise<void>;
|
|
22
22
|
deleteItem(collection: string, id: string): Promise<void>;
|
|
23
23
|
getQuery(collection: string, constraints: ItemConstraints): Promise<ItemArray>;
|
|
24
24
|
subscribeQuery(collection: string, constraints: ItemConstraints, observer: Observer<ItemArray>): Unsubscribe;
|
|
25
25
|
setQuery(collection: string, constraints: ItemConstraints, data: Data): Promise<number>;
|
|
26
|
-
updateQuery(collection: string, constraints: ItemConstraints,
|
|
26
|
+
updateQuery(collection: string, constraints: ItemConstraints, updates: Updates): Promise<number>;
|
|
27
27
|
deleteQuery(collection: string, constraints: ItemConstraints): Promise<number>;
|
|
28
28
|
}
|
|
@@ -101,8 +101,8 @@ export class FirestoreClientProvider {
|
|
|
101
101
|
async setItem(collection, id, data) {
|
|
102
102
|
await setDoc(firestoreDocument(this._firestore, collection, id), data);
|
|
103
103
|
}
|
|
104
|
-
async updateItem(collection, id,
|
|
105
|
-
await updateDoc(firestoreDocument(this._firestore, collection, id), ..._getFieldValues(
|
|
104
|
+
async updateItem(collection, id, updates) {
|
|
105
|
+
await updateDoc(firestoreDocument(this._firestore, collection, id), ..._getFieldValues(Object.entries(updates)));
|
|
106
106
|
}
|
|
107
107
|
async deleteItem(collection, id) {
|
|
108
108
|
await deleteDoc(firestoreDocument(this._firestore, collection, id));
|
|
@@ -118,9 +118,9 @@ export class FirestoreClientProvider {
|
|
|
118
118
|
await Promise.all(snapshot.docs.map(s => setDoc(s.ref, data)));
|
|
119
119
|
return snapshot.size;
|
|
120
120
|
}
|
|
121
|
-
async updateQuery(collection, constraints,
|
|
121
|
+
async updateQuery(collection, constraints, updates) {
|
|
122
122
|
const snapshot = await getDocs(_getQuery(this._firestore, collection, constraints));
|
|
123
|
-
const fieldValues = Array.from(_getFieldValues(
|
|
123
|
+
const fieldValues = Array.from(_getFieldValues(Object.entries(updates)));
|
|
124
124
|
await Promise.all(snapshot.docs.map(s => updateDoc(s.ref, ...fieldValues)));
|
|
125
125
|
return snapshot.size;
|
|
126
126
|
}
|
|
File without changes
|
|
File without changes
|
|
@@ -3,7 +3,7 @@ import type { Data } from "../../util/data.js";
|
|
|
3
3
|
import type { Unsubscribe } from "../../observe/Observable.js";
|
|
4
4
|
import type { AsyncProvider } from "../../provider/Provider.js";
|
|
5
5
|
import type { ItemArray, ItemValue, ItemConstraints } from "../../db/Item.js";
|
|
6
|
-
import {
|
|
6
|
+
import { Updates } from "../../update/DataUpdate.js";
|
|
7
7
|
/**
|
|
8
8
|
* Firestore Lite client database provider.
|
|
9
9
|
* - Works with the Firebase JS SDK.
|
|
@@ -17,11 +17,11 @@ export declare class FirestoreLiteProvider implements AsyncProvider {
|
|
|
17
17
|
subscribeItem(): Unsubscribe;
|
|
18
18
|
addItem(collection: string, data: Data): Promise<string>;
|
|
19
19
|
setItem(collection: string, id: string, data: Data): Promise<void>;
|
|
20
|
-
updateItem(collection: string, id: string,
|
|
20
|
+
updateItem(collection: string, id: string, updates: Updates): Promise<void>;
|
|
21
21
|
deleteItem(collection: string, id: string): Promise<void>;
|
|
22
22
|
getQuery(collection: string, constraints: ItemConstraints): Promise<ItemArray>;
|
|
23
23
|
subscribeQuery(): Unsubscribe;
|
|
24
24
|
setQuery(collection: string, constraints: ItemConstraints, data: Data): Promise<number>;
|
|
25
|
-
updateQuery(collection: string, constraints: ItemConstraints,
|
|
25
|
+
updateQuery(collection: string, constraints: ItemConstraints, updates: Updates): Promise<number>;
|
|
26
26
|
deleteQuery(collection: string, constraints: ItemConstraints): Promise<number>;
|
|
27
27
|
}
|
|
@@ -101,8 +101,8 @@ export class FirestoreLiteProvider {
|
|
|
101
101
|
async setItem(collection, id, data) {
|
|
102
102
|
await setDoc(firestoreDocument(this._firestore, collection, id), data);
|
|
103
103
|
}
|
|
104
|
-
async updateItem(collection, id,
|
|
105
|
-
await updateDoc(firestoreDocument(this._firestore, collection, id), ..._getFieldValues(
|
|
104
|
+
async updateItem(collection, id, updates) {
|
|
105
|
+
await updateDoc(firestoreDocument(this._firestore, collection, id), ..._getFieldValues(Object.entries(updates)));
|
|
106
106
|
}
|
|
107
107
|
async deleteItem(collection, id) {
|
|
108
108
|
await deleteDoc(firestoreDocument(this._firestore, collection, id));
|
|
@@ -118,9 +118,9 @@ export class FirestoreLiteProvider {
|
|
|
118
118
|
await Promise.all(snapshot.docs.map(s => setDoc(s.ref, data)));
|
|
119
119
|
return snapshot.size;
|
|
120
120
|
}
|
|
121
|
-
async updateQuery(collection, constraints,
|
|
121
|
+
async updateQuery(collection, constraints, updates) {
|
|
122
122
|
const snapshot = await getDocs(_getQuery(this._firestore, collection, constraints));
|
|
123
|
-
const fieldValues = Array.from(_getFieldValues(
|
|
123
|
+
const fieldValues = Array.from(_getFieldValues(Object.entries(updates)));
|
|
124
124
|
await Promise.all(snapshot.docs.map(s => updateDoc(s.ref, ...fieldValues)));
|
|
125
125
|
return snapshot.size;
|
|
126
126
|
}
|
|
File without changes
|
|
File without changes
|
|
@@ -3,7 +3,7 @@ import type { Unsubscribe } from "../../observe/Observable.js";
|
|
|
3
3
|
import type { AsyncProvider } from "../../provider/Provider.js";
|
|
4
4
|
import type { ItemArray, ItemValue, ItemConstraints } from "../../db/Item.js";
|
|
5
5
|
import { Observer } from "../../observe/Observer.js";
|
|
6
|
-
import {
|
|
6
|
+
import { Updates } from "../../update/DataUpdate.js";
|
|
7
7
|
import { Data } from "../../util/data.js";
|
|
8
8
|
/**
|
|
9
9
|
* Firestore server database provider.
|
|
@@ -16,11 +16,11 @@ export declare class FirestoreServerProvider implements AsyncProvider {
|
|
|
16
16
|
subscribeItem(collection: string, id: string, observer: Observer<ItemValue>): Unsubscribe;
|
|
17
17
|
addItem(collection: string, data: Data): Promise<string>;
|
|
18
18
|
setItem(collection: string, id: string, data: Data): Promise<void>;
|
|
19
|
-
updateItem(collection: string, id: string,
|
|
19
|
+
updateItem(collection: string, id: string, updates: Updates): Promise<void>;
|
|
20
20
|
deleteItem(collection: string, id: string): Promise<void>;
|
|
21
21
|
getQuery(collection: string, constraints: ItemConstraints): Promise<ItemArray>;
|
|
22
22
|
subscribeQuery(collection: string, constraints: ItemConstraints, observer: Observer<ItemArray>): Unsubscribe;
|
|
23
23
|
setQuery(collection: string, constraints: ItemConstraints, data: Data): Promise<number>;
|
|
24
|
-
updateQuery(collection: string, constraints: ItemConstraints,
|
|
24
|
+
updateQuery(collection: string, constraints: ItemConstraints, updates: Updates): Promise<number>;
|
|
25
25
|
deleteQuery(collection: string, constraints: ItemConstraints): Promise<number>;
|
|
26
26
|
}
|
|
@@ -101,11 +101,11 @@ export class FirestoreServerProvider {
|
|
|
101
101
|
async setItem(collection, id, data) {
|
|
102
102
|
await this._firestore.collection(collection).doc(id).set(data);
|
|
103
103
|
}
|
|
104
|
-
async updateItem(collection, id,
|
|
104
|
+
async updateItem(collection, id, updates) {
|
|
105
105
|
await this._firestore
|
|
106
106
|
.collection(collection)
|
|
107
107
|
.doc(id)
|
|
108
|
-
.update(..._getFieldValues(
|
|
108
|
+
.update(..._getFieldValues(Object.entries(updates)));
|
|
109
109
|
}
|
|
110
110
|
async deleteItem(collection, id) {
|
|
111
111
|
await this._firestore.collection(collection).doc(id).delete();
|
|
@@ -119,8 +119,8 @@ export class FirestoreServerProvider {
|
|
|
119
119
|
async setQuery(collection, constraints, data) {
|
|
120
120
|
return await bulkWrite(this._firestore, collection, constraints, (w, s) => void w.set(s.ref, data));
|
|
121
121
|
}
|
|
122
|
-
async updateQuery(collection, constraints,
|
|
123
|
-
const fieldValues = _getFieldValues(
|
|
122
|
+
async updateQuery(collection, constraints, updates) {
|
|
123
|
+
const fieldValues = _getFieldValues(Object.entries(updates));
|
|
124
124
|
return await bulkWrite(this._firestore, collection, constraints, (w, s) => void w.update(s.ref, ...fieldValues));
|
|
125
125
|
}
|
|
126
126
|
async deleteQuery(collection, constraints) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -2,7 +2,7 @@ import type { Datas, Key } from "../util/data.js";
|
|
|
2
2
|
import type { ItemArray, ItemValue, ItemConstraints } from "../db/Item.js";
|
|
3
3
|
import type { PartialObserver } from "../observe/Observer.js";
|
|
4
4
|
import type { Unsubscribe } from "../observe/Observable.js";
|
|
5
|
-
import type {
|
|
5
|
+
import type { Updates } from "../update/DataUpdate.js";
|
|
6
6
|
import type { AsyncProvider } from "./Provider.js";
|
|
7
7
|
import type { AsyncThroughProvider } from "./ThroughProvider.js";
|
|
8
8
|
import { MemoryProvider } from "./MemoryProvider.js";
|
|
@@ -15,11 +15,11 @@ export declare class CacheProvider<T extends Datas> implements AsyncThroughProvi
|
|
|
15
15
|
subscribeItem<K extends Key<T>>(collection: K, id: string, observer: PartialObserver<ItemValue<T[K]>>): Unsubscribe;
|
|
16
16
|
addItem<K extends Key<T>>(collection: K, data: T[K]): Promise<string>;
|
|
17
17
|
setItem<K extends Key<T>>(collection: K, id: string, data: T[K]): Promise<void>;
|
|
18
|
-
updateItem<K extends Key<T>>(collection: K, id: string,
|
|
18
|
+
updateItem<K extends Key<T>>(collection: K, id: string, updates: Updates<T[K]>): Promise<void>;
|
|
19
19
|
deleteItem<K extends Key<T>>(collection: K, id: string): Promise<void>;
|
|
20
20
|
getQuery<K extends Key<T>>(collection: K, constraints: ItemConstraints<T[K]>): Promise<ItemArray<T[K]>>;
|
|
21
21
|
subscribeQuery<K extends Key<T>>(collection: K, constraints: ItemConstraints<T[K]>, observer: PartialObserver<ItemArray<T[K]>>): Unsubscribe;
|
|
22
22
|
setQuery<K extends Key<T>>(collection: K, constraints: ItemConstraints<T[K]>, data: T[K]): Promise<number>;
|
|
23
|
-
updateQuery<K extends Key<T>>(collection: K, constraints: ItemConstraints<T[K]>,
|
|
23
|
+
updateQuery<K extends Key<T>>(collection: K, constraints: ItemConstraints<T[K]>, updates: Updates<T[K]>): Promise<number>;
|
|
24
24
|
deleteQuery<K extends Key<T>>(collection: K, constraints: ItemConstraints<T[K]>): Promise<number>;
|
|
25
25
|
}
|
|
@@ -24,11 +24,11 @@ export class CacheProvider {
|
|
|
24
24
|
await this.source.setItem(collection, id, data);
|
|
25
25
|
this.memory.getTable(collection).setItem(id, data);
|
|
26
26
|
}
|
|
27
|
-
async updateItem(collection, id,
|
|
28
|
-
await this.source.updateItem(collection, id,
|
|
27
|
+
async updateItem(collection, id, updates) {
|
|
28
|
+
await this.source.updateItem(collection, id, updates);
|
|
29
29
|
const table = this.memory.getTable(collection);
|
|
30
30
|
if (table.getItem(id))
|
|
31
|
-
table.updateItem(id,
|
|
31
|
+
table.updateItem(id, updates);
|
|
32
32
|
}
|
|
33
33
|
async deleteItem(collection, id) {
|
|
34
34
|
await this.source.deleteItem(collection, id);
|
|
@@ -49,9 +49,9 @@ export class CacheProvider {
|
|
|
49
49
|
this.memory.getTable(collection).setQuery(constraints, data);
|
|
50
50
|
return count;
|
|
51
51
|
}
|
|
52
|
-
async updateQuery(collection, constraints,
|
|
53
|
-
const count = await this.source.updateQuery(collection, constraints,
|
|
54
|
-
this.memory.getTable(collection).updateQuery(constraints,
|
|
52
|
+
async updateQuery(collection, constraints, updates) {
|
|
53
|
+
const count = await this.source.updateQuery(collection, constraints, updates);
|
|
54
|
+
this.memory.getTable(collection).updateQuery(constraints, updates);
|
|
55
55
|
return count;
|
|
56
56
|
}
|
|
57
57
|
async deleteQuery(collection, constraints) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Datas, Key } from "../util/data.js";
|
|
2
2
|
import type { ItemArray, ItemConstraints, ItemValue } from "../db/Item.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { Updates } from "../update/DataUpdate.js";
|
|
4
4
|
import type { PartialObserver } from "../observe/Observer.js";
|
|
5
5
|
import type { Unsubscribe } from "../observe/Observable.js";
|
|
6
6
|
import { Provider, AsyncProvider } from "./Provider.js";
|
|
@@ -18,11 +18,11 @@ export declare class DebugProvider<T extends Datas> extends AbstractDebugProvide
|
|
|
18
18
|
getItem<K extends Key<T>>(collection: K, id: string): ItemValue<T[K]>;
|
|
19
19
|
addItem<K extends Key<T>>(collection: K, data: T[K]): string;
|
|
20
20
|
setItem<K extends Key<T>>(collection: K, id: string, data: T[K]): void;
|
|
21
|
-
updateItem<K extends Key<T>>(collection: K, id: string,
|
|
21
|
+
updateItem<K extends Key<T>>(collection: K, id: string, updates: Updates<T[K]>): void;
|
|
22
22
|
deleteItem<K extends Key<T>>(collection: K, id: string): void;
|
|
23
23
|
getQuery<K extends Key<T>>(collection: K, constraints: ItemConstraints<T[K]>): ItemArray<T[K]>;
|
|
24
24
|
setQuery<K extends Key<T>>(collection: K, constraints: ItemConstraints<T[K]>, data: T[K]): number;
|
|
25
|
-
updateQuery<K extends Key<T>>(collection: K, constraints: ItemConstraints<T[K]>,
|
|
25
|
+
updateQuery<K extends Key<T>>(collection: K, constraints: ItemConstraints<T[K]>, updates: Updates<T[K]>): number;
|
|
26
26
|
deleteQuery<K extends Key<T>>(collection: K, constraints: ItemConstraints<T[K]>): number;
|
|
27
27
|
}
|
|
28
28
|
/** Provider that logs operations to a synchronous source provider to the console. */
|
|
@@ -32,11 +32,11 @@ export declare class AsyncDebugProvider<T extends Datas> extends AbstractDebugPr
|
|
|
32
32
|
getItem<K extends Key<T>>(collection: K, id: string): Promise<ItemValue<T[K]>>;
|
|
33
33
|
addItem<K extends Key<T>>(collection: K, data: T[K]): Promise<string>;
|
|
34
34
|
setItem<K extends Key<T>>(collection: K, id: string, data: T[K]): Promise<void>;
|
|
35
|
-
updateItem<K extends Key<T>>(collection: K, id: string,
|
|
35
|
+
updateItem<K extends Key<T>>(collection: K, id: string, updates: Updates<T[K]>): Promise<void>;
|
|
36
36
|
deleteItem<K extends Key<T>>(collection: K, id: string): Promise<void>;
|
|
37
37
|
getQuery<K extends Key<T>>(collection: K, constraints: ItemConstraints<T[K]>): Promise<ItemArray<T[K]>>;
|
|
38
38
|
setQuery<K extends Key<T>>(collection: K, constraints: ItemConstraints<T[K]>, data: T[K]): Promise<number>;
|
|
39
|
-
updateQuery<K extends Key<T>>(collection: K, constraints: ItemConstraints<T[K]>,
|
|
39
|
+
updateQuery<K extends Key<T>>(collection: K, constraints: ItemConstraints<T[K]>, updates: Updates<T[K]>): Promise<number>;
|
|
40
40
|
deleteQuery<K extends Key<T>>(collection: K, constraints: ItemConstraints<T[K]>): Promise<number>;
|
|
41
41
|
}
|
|
42
42
|
export {};
|