@sprucelabs/data-stores 16.0.25 → 16.0.28
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.
|
@@ -3,12 +3,13 @@ import AbstractMutexer from '../mutexers/AbstractMutexer';
|
|
|
3
3
|
import { Database } from '../types/database.types';
|
|
4
4
|
import { QueryBuilder, QueryOptions } from '../types/query.types';
|
|
5
5
|
import { PrepareOptions, PrepareResults } from '../types/stores.types';
|
|
6
|
+
declare const operations: readonly ["$push", "$inc", "$min", "$max", "$mul", "$push", "$pull", "$pop"];
|
|
7
|
+
declare type SaveOperation = typeof operations[number];
|
|
8
|
+
declare type SaveOperations = Partial<Record<SaveOperation, Record<string, any>>>;
|
|
6
9
|
declare type Response<FullSchema extends Schema, CreateEntityInstances extends boolean, IncludePrivateFields extends boolean, PF extends SchemaPublicFieldNames<FullSchema>, F extends SchemaFieldNames<FullSchema>> = IsDynamicSchema<FullSchema> extends true ? DynamicSchemaAllValues<FullSchema, CreateEntityInstances> : IncludePrivateFields extends false ? Pick<SchemaPublicValues<FullSchema, CreateEntityInstances>, PF> : Pick<SchemaAllValues<FullSchema, CreateEntityInstances>, F>;
|
|
7
10
|
export default abstract class AbstractStore<FullSchema extends Schema, CreateSchema extends Schema = FullSchema, UpdateSchema extends Schema = CreateSchema, DatabaseSchema extends Schema = FullSchema, DatabaseRecord = SchemaValues<DatabaseSchema> & {
|
|
8
11
|
id: string;
|
|
9
|
-
}, QueryRecord = SchemaPartialValues<FullSchema>, FullRecord = SchemaValues<FullSchema>, CreateRecord = SchemaValues<CreateSchema>, UpdateRecord = SchemaValues<UpdateSchema> & {
|
|
10
|
-
$push?: Record<string, any>;
|
|
11
|
-
}> extends AbstractMutexer {
|
|
12
|
+
}, QueryRecord = SchemaPartialValues<FullSchema>, FullRecord = SchemaValues<FullSchema>, CreateRecord = SchemaValues<CreateSchema>, UpdateRecord = SchemaValues<UpdateSchema> & SaveOperations> extends AbstractMutexer {
|
|
12
13
|
abstract readonly name: string;
|
|
13
14
|
protected abstract collectionName: string;
|
|
14
15
|
protected abstract createSchema: CreateSchema;
|
|
@@ -3,12 +3,13 @@ import AbstractMutexer from '../mutexers/AbstractMutexer';
|
|
|
3
3
|
import { Database } from '../types/database.types';
|
|
4
4
|
import { QueryBuilder, QueryOptions } from '../types/query.types';
|
|
5
5
|
import { PrepareOptions, PrepareResults } from '../types/stores.types';
|
|
6
|
+
declare const operations: readonly ["$push", "$inc", "$min", "$max", "$mul", "$push", "$pull", "$pop"];
|
|
7
|
+
declare type SaveOperation = typeof operations[number];
|
|
8
|
+
declare type SaveOperations = Partial<Record<SaveOperation, Record<string, any>>>;
|
|
6
9
|
declare type Response<FullSchema extends Schema, CreateEntityInstances extends boolean, IncludePrivateFields extends boolean, PF extends SchemaPublicFieldNames<FullSchema>, F extends SchemaFieldNames<FullSchema>> = IsDynamicSchema<FullSchema> extends true ? DynamicSchemaAllValues<FullSchema, CreateEntityInstances> : IncludePrivateFields extends false ? Pick<SchemaPublicValues<FullSchema, CreateEntityInstances>, PF> : Pick<SchemaAllValues<FullSchema, CreateEntityInstances>, F>;
|
|
7
10
|
export default abstract class AbstractStore<FullSchema extends Schema, CreateSchema extends Schema = FullSchema, UpdateSchema extends Schema = CreateSchema, DatabaseSchema extends Schema = FullSchema, DatabaseRecord = SchemaValues<DatabaseSchema> & {
|
|
8
11
|
id: string;
|
|
9
|
-
}, QueryRecord = SchemaPartialValues<FullSchema>, FullRecord = SchemaValues<FullSchema>, CreateRecord = SchemaValues<CreateSchema>, UpdateRecord = SchemaValues<UpdateSchema> & {
|
|
10
|
-
$push?: Record<string, any>;
|
|
11
|
-
}> extends AbstractMutexer {
|
|
12
|
+
}, QueryRecord = SchemaPartialValues<FullSchema>, FullRecord = SchemaValues<FullSchema>, CreateRecord = SchemaValues<CreateSchema>, UpdateRecord = SchemaValues<UpdateSchema> & SaveOperations> extends AbstractMutexer {
|
|
12
13
|
abstract readonly name: string;
|
|
13
14
|
protected abstract collectionName: string;
|
|
14
15
|
protected abstract createSchema: CreateSchema;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "16.0.
|
|
6
|
+
"version": "16.0.28",
|
|
7
7
|
"files": [
|
|
8
8
|
"build/**/*",
|
|
9
9
|
"!build/__tests__",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@sprucelabs/error": "^5.0.467",
|
|
75
75
|
"@sprucelabs/schema": "^28.2.34",
|
|
76
|
-
"@sprucelabs/spruce-core-schemas": "^33.0.
|
|
77
|
-
"@sprucelabs/spruce-skill-utils": "^26.0.
|
|
76
|
+
"@sprucelabs/spruce-core-schemas": "^33.0.22",
|
|
77
|
+
"@sprucelabs/spruce-skill-utils": "^26.0.66",
|
|
78
78
|
"globby": "^11.0.4",
|
|
79
79
|
"just-clone": "^6.0.1",
|
|
80
80
|
"lodash": "^4.17.21",
|