@pc-nexus/storage 0.5.0-next.8 → 0.5.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/index.d.ts +2 -1
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/lib/ces/condition-builder/condition.builder.d.ts +10 -9
- package/lib/ces/condition-builder/condition.builder.d.ts.map +1 -1
- package/lib/ces/condition-builder/condition.builder.js +5 -3
- package/lib/ces/condition-builder/index.d.ts +0 -1
- package/lib/ces/condition-builder/index.d.ts.map +1 -1
- package/lib/ces/condition-builder/index.js +0 -1
- package/lib/ces/condition-builder/inner-condition.builder.d.ts +5 -10
- package/lib/ces/condition-builder/inner-condition.builder.d.ts.map +1 -1
- package/lib/ces/condition-builder/inner-condition.builder.js +28 -133
- package/lib/ces/entity-storage.d.ts +7 -6
- package/lib/ces/entity-storage.d.ts.map +1 -1
- package/lib/ces/entity-storage.js +19 -18
- package/lib/kvs/index.d.ts +2 -4
- package/lib/kvs/index.d.ts.map +1 -1
- package/lib/kvs/index.js +2 -4
- package/lib/kvs/kvs.d.ts +10 -0
- package/lib/kvs/kvs.d.ts.map +1 -0
- package/lib/kvs/kvs.js +26 -0
- package/lib/kvs/type.d.ts +12 -0
- package/lib/kvs/type.d.ts.map +1 -0
- package/lib/kvs/type.js +1 -0
- package/lib/nos/nos.js +3 -3
- package/lib/nos/type.d.ts +7 -3
- package/lib/nos/type.d.ts.map +1 -1
- package/package.json +2 -2
- package/lib/ces/condition-builder/type.d.ts +0 -82
- package/lib/ces/condition-builder/type.d.ts.map +0 -1
- package/lib/ces/condition-builder/type.js +0 -20
- package/lib/ces/type.d.ts +0 -46
- package/lib/ces/type.d.ts.map +0 -1
- package/lib/ces/type.js +0 -5
package/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export * from "./lib/ces/type.js";
|
|
2
1
|
export * from "./lib/ces/condition-builder/index.js";
|
|
3
2
|
export * from "./lib/ces/index.js";
|
|
4
3
|
export * from "./lib/kvs/index.js";
|
|
5
4
|
export * from "./lib/nos/index.js";
|
|
5
|
+
export type { Projection, InsertOptions, UpdateOptions, DeleteOptions, FindOptions, SortProperty, Condition, KvsValueType, } from "@pc-nexus/internal";
|
|
6
|
+
export { QueryOperator, LogicalOperator, Direction } from "@pc-nexus/internal";
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,YAAY,EAER,UAAU,EACV,aAAa,EACb,aAAa,EACb,aAAa,EACb,WAAW,EACX,YAAY,EAEZ,SAAS,EACT,YAAY,GACf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./lib/ces/type.js";
|
|
2
1
|
export * from "./lib/ces/condition-builder/index.js";
|
|
3
2
|
export * from "./lib/ces/index.js";
|
|
4
3
|
export * from "./lib/kvs/index.js";
|
|
5
4
|
export * from "./lib/nos/index.js";
|
|
5
|
+
export { QueryOperator, LogicalOperator, Direction } from "@pc-nexus/internal";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { CurrentLevelType, EqOptions,
|
|
1
|
+
import type { CurrentLevelType, EqOptions, KeyChains, LogicalLevelType, Condition, ConditionBuilderOptions, QueryOperatorCondition$contains, RangeOptions, RootLevelType, TypeAtKeyChain, ValueAlternativeType, QueryOperator, Document } from "@pc-nexus/internal";
|
|
2
|
+
import { InnerConditionBuilder } from "./inner-condition.builder.js";
|
|
2
3
|
export interface CommonConditionBuilder<Schema = Document, CurrentLevel extends CurrentLevelType<Schema> = RootLevelType<Schema>> {
|
|
3
4
|
field<TFieldChains extends KeyChains<Schema>>(field: TFieldChains): LimitComparisonConditionBuilder<Schema, TFieldChains, CurrentLevel, TypeAtKeyChain<Schema, TFieldChains>>;
|
|
4
5
|
}
|
|
@@ -8,29 +9,29 @@ export interface LogicalConditionBuilder<Schema = Document, FieldChains extends
|
|
|
8
9
|
and(closure: (andBuilder: LogicalOperatorBuilder<Schema>) => void): LogicalOperatorReturnType<Schema, V, CurrentLevel>;
|
|
9
10
|
or(closure: (orBuilder: LogicalOperatorBuilder<Schema>) => void): LogicalOperatorReturnType<Schema, V, CurrentLevel>;
|
|
10
11
|
}
|
|
11
|
-
type LimitComparisonConditionBuilder<Schema = Document, FieldChains extends KeyChains<Schema> = KeyChains<Schema>, CurrentLevel extends CurrentLevelType<Schema> = RootLevelType<Schema>, V = TypeAtKeyChain<Schema, FieldChains>, FieldType = TypeAtKeyChain<Schema, FieldChains>> = FieldType extends number ? ComparisonConditionBuilder<Schema, FieldChains, CurrentLevel, V> : FieldType extends string ? Pick<ComparisonConditionBuilder<Schema, FieldChains, CurrentLevel, V>, "eq" | "ne" | "exists" | "
|
|
12
|
+
type LimitComparisonConditionBuilder<Schema = Document, FieldChains extends KeyChains<Schema> = KeyChains<Schema>, CurrentLevel extends CurrentLevelType<Schema> = RootLevelType<Schema>, V = TypeAtKeyChain<Schema, FieldChains>, FieldType = TypeAtKeyChain<Schema, FieldChains>> = FieldType extends number ? Pick<ComparisonConditionBuilder<Schema, FieldChains, CurrentLevel, V>, "eq" | "ne" | "exists" | "gt" | "gte" | "lt" | "lte"> : FieldType extends string ? Pick<ComparisonConditionBuilder<Schema, FieldChains, CurrentLevel, V>, "eq" | "ne" | "exists" | "contains" | "notContains"> : FieldType extends boolean ? Pick<ComparisonConditionBuilder<Schema, FieldChains, CurrentLevel, V>, "eq" | "ne" | "exists"> : FieldType extends any[] ? Pick<ComparisonConditionBuilder<Schema, FieldChains, CurrentLevel, V>, "contains" | "notContains" | "eq" | "ne" | "exists"> : FieldType extends Document ? Pick<ComparisonConditionBuilder<Schema, FieldChains, CurrentLevel, V>, "eq" | "ne" | "exists"> : never;
|
|
12
13
|
export type ComparisonConditionBuilderReturnType<Schema = Document, FieldChains extends KeyChains<Schema> = KeyChains<Schema>, CurrentLevel extends CurrentLevelType<Schema> = RootLevelType<Schema>, V = TypeAtKeyChain<Schema, FieldChains>> = LogicalConditionBuilder<Schema, never, CurrentLevel, V> & LimitComparisonConditionBuilder<Schema, FieldChains, CurrentLevel, V>;
|
|
13
14
|
export interface ComparisonConditionBuilder<Schema = Document, FieldChains extends KeyChains<Schema> = KeyChains<Schema>, CurrentLevel extends CurrentLevelType<Schema> = RootLevelType<Schema>, V = TypeAtKeyChain<Schema, FieldChains>> {
|
|
14
|
-
eq(value: ValueAlternativeType<V>, options?: EqOptions<QueryOperator.
|
|
15
|
+
eq(value: ValueAlternativeType<V>, options?: EqOptions<QueryOperator.EQ>): ComparisonConditionBuilderReturnType<Schema, FieldChains, CurrentLevel, V>;
|
|
15
16
|
ne(value: ValueAlternativeType<V>, options?: Omit<EqOptions, "queryOperator">): ComparisonConditionBuilderReturnType<Schema, FieldChains, CurrentLevel, V>;
|
|
16
17
|
gt(value: ValueAlternativeType<V>, options?: RangeOptions): ComparisonConditionBuilderReturnType<Schema, FieldChains, CurrentLevel, V>;
|
|
17
18
|
gte(value: ValueAlternativeType<V>, options?: RangeOptions): ComparisonConditionBuilderReturnType<Schema, FieldChains, CurrentLevel, V>;
|
|
18
19
|
lt(value: ValueAlternativeType<V>, options?: RangeOptions): ComparisonConditionBuilderReturnType<Schema, FieldChains, CurrentLevel, V>;
|
|
19
20
|
lte(value: ValueAlternativeType<V>, options?: RangeOptions): ComparisonConditionBuilderReturnType<Schema, FieldChains, CurrentLevel, V>;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
nin(value: QueryOperatorCondition$in<V>, options?: Omit<InOptions, "queryOperator">): ComparisonConditionBuilderReturnType<Schema, FieldChains, CurrentLevel, V>;
|
|
21
|
+
contains(value: QueryOperatorCondition$contains<V>, options?: ConditionBuilderOptions): ComparisonConditionBuilderReturnType<Schema, FieldChains, CurrentLevel, V>;
|
|
22
|
+
notContains(value: QueryOperatorCondition$contains<V>, options?: ConditionBuilderOptions): ComparisonConditionBuilderReturnType<Schema, FieldChains, CurrentLevel, V>;
|
|
23
23
|
exists(exists?: boolean): ComparisonConditionBuilderReturnType<Schema, FieldChains, CurrentLevel, V>;
|
|
24
24
|
}
|
|
25
25
|
export declare class ConditionBuilder<Schema = Document, FieldChains extends KeyChains<Schema> = KeyChains<Schema>, CurrentLevel extends CurrentLevelType<Schema> = RootLevelType<Schema>, V = TypeAtKeyChain<Schema, FieldChains>> implements LogicalConditionBuilder<Schema, FieldChains, CurrentLevel, V> {
|
|
26
|
-
|
|
27
|
-
private _innerBuilder;
|
|
26
|
+
protected _innerBuilder: InnerConditionBuilder<Schema, FieldChains, CurrentLevel, V>;
|
|
28
27
|
constructor(options?: ConditionBuilderOptions);
|
|
29
28
|
and(closure: (andBuilder: LogicalOperatorBuilder<Schema>) => void): LogicalOperatorReturnType<Schema, never, CurrentLevel>;
|
|
30
29
|
or(closure: (orBuilder: LogicalOperatorBuilder<Schema>) => void): LogicalOperatorReturnType<Schema, never, CurrentLevel>;
|
|
31
30
|
field<TFieldChains extends FieldChains>(field: TFieldChains): LimitComparisonConditionBuilder<Schema, TFieldChains, CurrentLevel, TypeAtKeyChain<Schema, TFieldChains>>;
|
|
31
|
+
}
|
|
32
|
+
export declare class ConditionBuilderHelper<Schema = Document, FieldChains extends KeyChains<Schema> = KeyChains<Schema>, CurrentLevel extends CurrentLevelType<Schema> = RootLevelType<Schema>, V = TypeAtKeyChain<Schema, FieldChains>> extends ConditionBuilder<Schema, FieldChains, CurrentLevel, V> {
|
|
33
|
+
static create<Schema>(options?: ConditionBuilderOptions): ConditionBuilderHelper<Schema>;
|
|
32
34
|
done(reset?: boolean): Condition;
|
|
33
35
|
}
|
|
34
|
-
export type ConditionBuilderApi<Schema> = Omit<ConditionBuilder<Schema>, "done">;
|
|
35
36
|
export {};
|
|
36
37
|
//# sourceMappingURL=condition.builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"condition.builder.d.ts","sourceRoot":"","sources":["../../../../src/lib/ces/condition-builder/condition.builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,
|
|
1
|
+
{"version":3,"file":"condition.builder.d.ts","sourceRoot":"","sources":["../../../../src/lib/ces/condition-builder/condition.builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,uBAAuB,EACvB,+BAA+B,EAC/B,YAAY,EACZ,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,QAAQ,EACX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,MAAM,WAAW,sBAAsB,CAAC,MAAM,GAAG,QAAQ,EAAE,YAAY,SAAS,gBAAgB,CAAC,MAAM,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC;IAC5H,KAAK,CAAC,YAAY,SAAS,SAAS,CAAC,MAAM,CAAC,EACxC,KAAK,EAAE,YAAY,GACpB,+BAA+B,CAAC,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;CAChH;AAED,KAAK,sBAAsB,CAAC,MAAM,IAAI,uBAAuB,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;AACnH,KAAK,yBA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AC,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CAI/G;AAED,qBAAa,sBAAsB,CAC/B,MAAM,GAAG,QAAQ,EACjB,WAAW,SAAS,SAAS,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,EACzD,YAAY,SAAS,gBAAgB,CAAC,MAAM,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC,EACrE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,CACzC,SAAQ,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,CAAC;WAC9C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,uBAAuB,GAAG,sBAAsB,CAAC,MAAM,CAAC;IAGxF,IAAI,CAAC,KAAK,UAAO,GAAG,SAAS;CAGvC"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { InnerConditionBuilder } from "./inner-condition.builder.js";
|
|
2
2
|
export class ConditionBuilder {
|
|
3
|
-
static create(options) {
|
|
4
|
-
return new ConditionBuilder(options);
|
|
5
|
-
}
|
|
6
3
|
_innerBuilder;
|
|
7
4
|
constructor(options) {
|
|
8
5
|
this._innerBuilder = new InnerConditionBuilder(options);
|
|
@@ -19,6 +16,11 @@ export class ConditionBuilder {
|
|
|
19
16
|
this._innerBuilder.field(field);
|
|
20
17
|
return this._innerBuilder;
|
|
21
18
|
}
|
|
19
|
+
}
|
|
20
|
+
export class ConditionBuilderHelper extends ConditionBuilder {
|
|
21
|
+
static create(options) {
|
|
22
|
+
return new ConditionBuilderHelper(options);
|
|
23
|
+
}
|
|
22
24
|
done(reset = true) {
|
|
23
25
|
return this._innerBuilder.done(reset);
|
|
24
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/ces/condition-builder/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/ces/condition-builder/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CurrentLevelType, EqOptions,
|
|
2
|
-
import { QueryOperator } from "
|
|
1
|
+
import type { CurrentLevelType, EqOptions, KeyChains, LogicalLevelType, Query, Condition, ConditionBuilderOptions, QueryOperatorCondition$contains, RangeOptions, RootLevelType, TypeAtKeyChain, ValueAlternativeType } from "@pc-nexus/internal";
|
|
2
|
+
import { QueryOperator } from "@pc-nexus/internal";
|
|
3
3
|
export declare class InnerConditionBuilder<Schema = Record<string, any>, FieldChains extends KeyChains<Schema> = KeyChains<Schema>, CurrentLevel extends CurrentLevelType<Schema> = RootLevelType<Schema>, V = TypeAtKeyChain<Schema, FieldChains>> {
|
|
4
4
|
private _field;
|
|
5
5
|
private baseOptions;
|
|
@@ -26,19 +26,14 @@ export declare class InnerConditionBuilder<Schema = Record<string, any>, FieldCh
|
|
|
26
26
|
private updateQuery;
|
|
27
27
|
field<TFieldChains extends FieldChains>(field: TFieldChains): InnerConditionBuilder<Schema, TFieldChains, CurrentLevel>;
|
|
28
28
|
resetFieldConditions(): this;
|
|
29
|
-
eq<OP extends QueryOperator.
|
|
29
|
+
eq<OP extends QueryOperator.EQ | QueryOperator.NE | QueryOperator.GT | QueryOperator.GTE | QueryOperator.LTE | QueryOperator.LT | QueryOperator.Contains | QueryOperator.NotContains = QueryOperator.EQ>(value: ValueAlternativeType<V>, { queryOperator, ...options }?: EqOptions<OP>): this;
|
|
30
30
|
ne(value: ValueAlternativeType<V>, options?: Omit<EqOptions, "queryOperator">): this;
|
|
31
|
-
range(values: Partial<Record<"gte" | "lte" | "gt" | "lt", ValueAlternativeType<V>>>, { ...options }?: RangeOptions): this;
|
|
32
31
|
gte(value: ValueAlternativeType<V>, { ...options }?: RangeOptions): this;
|
|
33
32
|
gt(value: ValueAlternativeType<V>, { ...options }?: RangeOptions): this;
|
|
34
33
|
lte(value: ValueAlternativeType<V>, { ...options }?: RangeOptions): this;
|
|
35
34
|
lt(value: ValueAlternativeType<V>, { ...options }?: RangeOptions): this;
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
contains(value: QueryOperatorCondition$contains<V>, { ...options }?: ConditionBuilderOptions): this;
|
|
36
|
+
notContains(value: QueryOperatorCondition$contains<V>, { ...options }?: ConditionBuilderOptions): this;
|
|
38
37
|
exists(exists?: boolean): this;
|
|
39
|
-
private toAST;
|
|
40
|
-
private mapLogicalKey;
|
|
41
|
-
private convertTopLevelObject;
|
|
42
|
-
private convertFieldEntry;
|
|
43
38
|
}
|
|
44
39
|
//# sourceMappingURL=inner-condition.builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inner-condition.builder.d.ts","sourceRoot":"","sources":["../../../../src/lib/ces/condition-builder/inner-condition.builder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,gBAAgB,EAChB,SAAS,EACT,SAAS,
|
|
1
|
+
{"version":3,"file":"inner-condition.builder.d.ts","sourceRoot":"","sources":["../../../../src/lib/ces/condition-builder/inner-condition.builder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,gBAAgB,EAChB,SAAS,EACT,SAAS,EAGT,gBAAgB,EAChB,KAAK,EACL,SAAS,EACT,uBAAuB,EAEvB,+BAA+B,EAE/B,YAAY,EACZ,aAAa,EACb,cAAc,EACd,oBAAoB,EACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAuD,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxG,qBAAa,qBAAqB,CAC9B,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5B,WAAW,SAAS,SAAS,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,EACzD,YAAY,SAAS,gBAAgB,CAAC,MAAM,CAAC,GAAG,aA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AE,oBAAoB,CAAC,CAAC,CAAC,EAAE,EAAE,GAAG,OAAO,EAAE,GAAE,YAAiB,GAAG,IAAI;IAK3E,QAAQ,CAAC,KAAK,EAAE,+BAA+B,CAAC,CAAC,CAAC,EAAE,EAAE,GAAG,OAAO,EAAE,GAAE,uBAA4B,GAAG,IAAI;IAKvG,WAAW,CAAC,KAAK,EAAE,+BAA+B,CAAC,CAAC,CAAC,EAAE,EAAE,GAAG,OAAO,EAAE,GAAE,uBAA4B,GAAG,IAAI;IAK1G,MAAM,CAAC,MAAM,UAAO,GAAG,IAAI;CAKrC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { NexusCode, NexusInnerError, NexusInnerErrorType } from "@pc-nexus/internal";
|
|
2
|
-
import { LogicalOperator, logicalOpSymbol, parentLevelSymbol, QueryOperator } from "
|
|
2
|
+
import { LogicalOperator, logicalOpSymbol, parentLevelSymbol, QueryOperator } from "@pc-nexus/internal";
|
|
3
3
|
import _ from "lodash";
|
|
4
4
|
export class InnerConditionBuilder {
|
|
5
5
|
_field;
|
|
6
6
|
baseOptions = { ignoreUndefined: false, keepNaN: false };
|
|
7
7
|
get currentField() {
|
|
8
8
|
if (!this._field) {
|
|
9
|
-
throw new NexusInnerError(NexusCode.
|
|
9
|
+
throw new NexusInnerError(NexusCode.InvalidInput, NexusInnerErrorType.StorageConditionBuilder, `No field specified for condition`);
|
|
10
10
|
}
|
|
11
11
|
return this._field;
|
|
12
12
|
}
|
|
@@ -24,11 +24,18 @@ export class InnerConditionBuilder {
|
|
|
24
24
|
}
|
|
25
25
|
done(reset = true) {
|
|
26
26
|
this.assertAtRootLevel();
|
|
27
|
-
const
|
|
27
|
+
const root = _.cloneDeep(this.root);
|
|
28
|
+
const result = {};
|
|
29
|
+
for (const [key, value] of Object.entries(root)) {
|
|
30
|
+
if (key && !result.and) {
|
|
31
|
+
result.and = [];
|
|
32
|
+
}
|
|
33
|
+
result.and?.push({ [key]: value });
|
|
34
|
+
}
|
|
28
35
|
if (reset) {
|
|
29
36
|
this.reset();
|
|
30
37
|
}
|
|
31
|
-
return
|
|
38
|
+
return result;
|
|
32
39
|
}
|
|
33
40
|
reset() {
|
|
34
41
|
const root = {};
|
|
@@ -69,7 +76,7 @@ export class InnerConditionBuilder {
|
|
|
69
76
|
assertAtRootLevel() {
|
|
70
77
|
if (!this.isAtRootLevel()) {
|
|
71
78
|
const logicalOp = this.currentLevel[logicalOpSymbol];
|
|
72
|
-
throw new NexusInnerError(NexusCode.
|
|
79
|
+
throw new NexusInnerError(NexusCode.InvalidInput, NexusInnerErrorType.StorageConditionBuilder, `there is still remaining "${logicalOp}" logical operator opened`);
|
|
73
80
|
}
|
|
74
81
|
}
|
|
75
82
|
assertAtLogicalLevel(expect) {
|
|
@@ -77,11 +84,11 @@ export class InnerConditionBuilder {
|
|
|
77
84
|
const isRootLevel = _.isNil(logicalOp);
|
|
78
85
|
if (expect) {
|
|
79
86
|
if (logicalOp !== expect) {
|
|
80
|
-
throw new NexusInnerError(NexusCode.
|
|
87
|
+
throw new NexusInnerError(NexusCode.InvalidInput, NexusInnerErrorType.StorageConditionBuilder, `there is no "${expect}" logical operator opened`);
|
|
81
88
|
}
|
|
82
89
|
}
|
|
83
90
|
else if (isRootLevel) {
|
|
84
|
-
throw new NexusInnerError(NexusCode.
|
|
91
|
+
throw new NexusInnerError(NexusCode.InvalidInput, NexusInnerErrorType.StorageConditionBuilder, `there is no any logical operator opened`);
|
|
85
92
|
}
|
|
86
93
|
}
|
|
87
94
|
logicalClosure(logicalOp, closure) {
|
|
@@ -118,10 +125,10 @@ export class InnerConditionBuilder {
|
|
|
118
125
|
return that;
|
|
119
126
|
}
|
|
120
127
|
and(closure) {
|
|
121
|
-
return this.logicalClosure(LogicalOperator.
|
|
128
|
+
return this.logicalClosure(LogicalOperator.And, closure);
|
|
122
129
|
}
|
|
123
130
|
or(closure) {
|
|
124
|
-
return this.logicalClosure(LogicalOperator.
|
|
131
|
+
return this.logicalClosure(LogicalOperator.Or, closure);
|
|
125
132
|
}
|
|
126
133
|
shouldReserveValue(value, options) {
|
|
127
134
|
options = { ...this.baseOptions, ...options };
|
|
@@ -179,7 +186,7 @@ export class InnerConditionBuilder {
|
|
|
179
186
|
}
|
|
180
187
|
return this;
|
|
181
188
|
}
|
|
182
|
-
eq(value, { queryOperator = QueryOperator.
|
|
189
|
+
eq(value, { queryOperator = QueryOperator.EQ, ...options } = {}) {
|
|
183
190
|
const field = this.currentField;
|
|
184
191
|
if (!this.shouldReserveValue(value, options)) {
|
|
185
192
|
return this;
|
|
@@ -188,147 +195,35 @@ export class InnerConditionBuilder {
|
|
|
188
195
|
return this;
|
|
189
196
|
}
|
|
190
197
|
ne(value, options = {}) {
|
|
191
|
-
return this.eq(value, { ...options, queryOperator: QueryOperator.
|
|
192
|
-
}
|
|
193
|
-
range(values, { ...options } = {}) {
|
|
194
|
-
const condition = {};
|
|
195
|
-
const setCondition = (key, value) => {
|
|
196
|
-
if (value !== undefined && this.shouldReserveValue(value, options)) {
|
|
197
|
-
condition[key] = value;
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
setCondition("gte", values.gte);
|
|
201
|
-
setCondition("gt", values.gt);
|
|
202
|
-
setCondition("lte", values.lte);
|
|
203
|
-
setCondition("lt", values.lt);
|
|
204
|
-
if (!_.isEmpty(condition)) {
|
|
205
|
-
this.updateQuery(this.currentField, condition);
|
|
206
|
-
}
|
|
207
|
-
return this;
|
|
198
|
+
return this.eq(value, { ...options, queryOperator: QueryOperator.NE });
|
|
208
199
|
}
|
|
209
200
|
gte(value, { ...options } = {}) {
|
|
210
|
-
this.eq(value, { queryOperator: QueryOperator.
|
|
201
|
+
this.eq(value, { queryOperator: QueryOperator.GTE, ...options });
|
|
211
202
|
return this;
|
|
212
203
|
}
|
|
213
204
|
gt(value, { ...options } = {}) {
|
|
214
|
-
this.eq(value, { queryOperator: QueryOperator.
|
|
205
|
+
this.eq(value, { queryOperator: QueryOperator.GT, ...options });
|
|
215
206
|
return this;
|
|
216
207
|
}
|
|
217
208
|
lte(value, { ...options } = {}) {
|
|
218
|
-
this.eq(value, { queryOperator: QueryOperator.
|
|
209
|
+
this.eq(value, { queryOperator: QueryOperator.LTE, ...options });
|
|
219
210
|
return this;
|
|
220
211
|
}
|
|
221
212
|
lt(value, { ...options } = {}) {
|
|
222
|
-
this.eq(value, { queryOperator: QueryOperator.
|
|
213
|
+
this.eq(value, { queryOperator: QueryOperator.LT, ...options });
|
|
223
214
|
return this;
|
|
224
215
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
if (value === undefined) {
|
|
228
|
-
if (this.shouldReserveValue(value, options)) {
|
|
229
|
-
throw new NexusInnerError(NexusCode.invalidInput, NexusInnerErrorType.storageConditionBuilder, `${queryOperator} needs an array`);
|
|
230
|
-
}
|
|
231
|
-
else {
|
|
232
|
-
return this;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
else if (!_.isArray(value)) {
|
|
236
|
-
throw new NexusInnerError(NexusCode.invalidInput, NexusInnerErrorType.storageConditionBuilder, `${queryOperator} needs an array`);
|
|
237
|
-
}
|
|
238
|
-
if (options.ignoreEmpty && _.isEmpty(value)) {
|
|
239
|
-
return this;
|
|
240
|
-
}
|
|
241
|
-
this.updateQuery(field, {
|
|
242
|
-
[queryOperator]: value.filter((ele) => this.shouldReserveValue(ele, options)),
|
|
243
|
-
});
|
|
216
|
+
contains(value, { ...options } = {}) {
|
|
217
|
+
this.eq(value, { queryOperator: QueryOperator.Contains, ...options });
|
|
244
218
|
return this;
|
|
245
219
|
}
|
|
246
|
-
|
|
247
|
-
|
|
220
|
+
notContains(value, { ...options } = {}) {
|
|
221
|
+
this.eq(value, { queryOperator: QueryOperator.NotContains, ...options });
|
|
222
|
+
return this;
|
|
248
223
|
}
|
|
249
224
|
exists(exists = true) {
|
|
250
225
|
const field = this.currentField;
|
|
251
|
-
this.updateQuery(field, { [QueryOperator.
|
|
226
|
+
this.updateQuery(field, { [QueryOperator.Exists]: !!exists });
|
|
252
227
|
return this;
|
|
253
228
|
}
|
|
254
|
-
toAST(query) {
|
|
255
|
-
const nodes = [];
|
|
256
|
-
const entries = Object.entries(query);
|
|
257
|
-
for (const [key, value] of entries) {
|
|
258
|
-
if (key in LogicalOperator) {
|
|
259
|
-
const group = {
|
|
260
|
-
kind: "group",
|
|
261
|
-
op: this.mapLogicalKey(key),
|
|
262
|
-
nodes: [],
|
|
263
|
-
};
|
|
264
|
-
const arr = value;
|
|
265
|
-
for (const ele of arr) {
|
|
266
|
-
const subNodes = this.convertTopLevelObject(ele);
|
|
267
|
-
group.nodes.push(...subNodes);
|
|
268
|
-
}
|
|
269
|
-
if (group.nodes.length > 0) {
|
|
270
|
-
nodes.push(group);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
else {
|
|
274
|
-
const fieldNodes = this.convertFieldEntry(key, value);
|
|
275
|
-
if (fieldNodes.length > 0)
|
|
276
|
-
nodes.push(...fieldNodes);
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
if (nodes.length === 1) {
|
|
280
|
-
return nodes[0];
|
|
281
|
-
}
|
|
282
|
-
return { kind: "group", op: LogicalOperator.and, nodes };
|
|
283
|
-
}
|
|
284
|
-
mapLogicalKey(key) {
|
|
285
|
-
return key;
|
|
286
|
-
}
|
|
287
|
-
convertTopLevelObject(obj) {
|
|
288
|
-
const out = [];
|
|
289
|
-
for (const [k, v] of Object.entries(obj)) {
|
|
290
|
-
if (k in LogicalOperator) {
|
|
291
|
-
const group = {
|
|
292
|
-
kind: "group",
|
|
293
|
-
op: this.mapLogicalKey(k),
|
|
294
|
-
nodes: [],
|
|
295
|
-
};
|
|
296
|
-
for (const ele of v) {
|
|
297
|
-
group.nodes.push(...this.convertTopLevelObject(ele));
|
|
298
|
-
}
|
|
299
|
-
out.push(group);
|
|
300
|
-
}
|
|
301
|
-
else {
|
|
302
|
-
const fieldNodes = this.convertFieldEntry(k, v);
|
|
303
|
-
out.push(...fieldNodes);
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
return out;
|
|
307
|
-
}
|
|
308
|
-
convertFieldEntry(field, condition) {
|
|
309
|
-
const out = [];
|
|
310
|
-
if (_.isPlainObject(condition) && !_.isRegExp(condition)) {
|
|
311
|
-
const supported = {
|
|
312
|
-
[QueryOperator.eq]: true,
|
|
313
|
-
[QueryOperator.ne]: true,
|
|
314
|
-
[QueryOperator.gt]: true,
|
|
315
|
-
[QueryOperator.gte]: true,
|
|
316
|
-
[QueryOperator.lt]: true,
|
|
317
|
-
[QueryOperator.lte]: true,
|
|
318
|
-
[QueryOperator.in]: true,
|
|
319
|
-
[QueryOperator.nin]: true,
|
|
320
|
-
[QueryOperator.exists]: true,
|
|
321
|
-
};
|
|
322
|
-
for (const [k, val] of Object.entries(condition)) {
|
|
323
|
-
const op = k;
|
|
324
|
-
if (!supported[op])
|
|
325
|
-
continue;
|
|
326
|
-
out.push({ kind: "field", field, op, value: op === QueryOperator.exists ? !!val : val });
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
else {
|
|
330
|
-
out.push({ kind: "field", field, op: QueryOperator.eq, value: condition });
|
|
331
|
-
}
|
|
332
|
-
return out;
|
|
333
|
-
}
|
|
334
229
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { DeleteOptions, FindOptions, InsertOptions, UpdateOptions } from "
|
|
1
|
+
import { ConditionBuilder } from "./condition-builder/index.js";
|
|
2
|
+
import type { DeleteOptions, FindOptions, InsertOptions, UpdateOptions } from "@pc-nexus/internal";
|
|
3
3
|
/**
|
|
4
4
|
* Entity storage API implementation, provides CRUD operations for entities via CES hook
|
|
5
5
|
* @template T Entity type extending Entity
|
|
6
6
|
*/
|
|
7
7
|
export declare class CustomEntityStorage<T> {
|
|
8
|
+
#private;
|
|
8
9
|
private readonly entityName;
|
|
9
10
|
/**
|
|
10
11
|
* @param entityName Entity name defined in manifest
|
|
@@ -24,7 +25,7 @@ export declare class CustomEntityStorage<T> {
|
|
|
24
25
|
* @param options Find options, e.g. projection, hint, includes
|
|
25
26
|
* @returns Matching entities
|
|
26
27
|
*/
|
|
27
|
-
find(condition
|
|
28
|
+
find(condition?: (conditionBuilder: ConditionBuilder<T>) => void, options?: FindOptions<T>): Promise<T[]>;
|
|
28
29
|
/**
|
|
29
30
|
* Update all records matching the condition
|
|
30
31
|
* @param condition Query condition
|
|
@@ -32,19 +33,19 @@ export declare class CustomEntityStorage<T> {
|
|
|
32
33
|
* @param options Update options, e.g. returnValue, upsert, hint
|
|
33
34
|
* @returns void
|
|
34
35
|
*/
|
|
35
|
-
update(condition: (conditionBuilder:
|
|
36
|
+
update(condition: (conditionBuilder: ConditionBuilder<T>) => void, value?: Partial<T>, options?: UpdateOptions): Promise<void>;
|
|
36
37
|
/**
|
|
37
38
|
* Count records matching the condition
|
|
38
39
|
* @param condition Query condition
|
|
39
40
|
* @returns Record count
|
|
40
41
|
*/
|
|
41
|
-
count(condition
|
|
42
|
+
count(condition?: (conditionBuilder: ConditionBuilder<T>) => void): Promise<number>;
|
|
42
43
|
/**
|
|
43
44
|
* Delete records matching the condition (soft delete)
|
|
44
45
|
* @param condition Query condition
|
|
45
46
|
* @param options Delete options, e.g. justOne
|
|
46
47
|
* @returns void
|
|
47
48
|
*/
|
|
48
|
-
delete(condition: (conditionBuilder:
|
|
49
|
+
delete(condition: (conditionBuilder: ConditionBuilder<T>) => void, options?: DeleteOptions): Promise<void>;
|
|
49
50
|
}
|
|
50
51
|
//# sourceMappingURL=entity-storage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-storage.d.ts","sourceRoot":"","sources":["../../../src/lib/ces/entity-storage.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"entity-storage.d.ts","sourceRoot":"","sources":["../../../src/lib/ces/entity-storage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAA0B,MAAM,8BAA8B,CAAC;AACxF,OA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{
|
|
2
|
+
import { ConditionBuilderHelper } from "./condition-builder/index.js";
|
|
3
3
|
/**
|
|
4
4
|
* Entity storage API implementation, provides CRUD operations for entities via CES hook
|
|
5
5
|
* @template T Entity type extending Entity
|
|
@@ -12,10 +12,19 @@ export class CustomEntityStorage {
|
|
|
12
12
|
constructor(entityName) {
|
|
13
13
|
this.entityName = entityName;
|
|
14
14
|
}
|
|
15
|
+
#buildCondition(condition, options) {
|
|
16
|
+
let result = {};
|
|
17
|
+
if (condition) {
|
|
18
|
+
const conditionBuilder = ConditionBuilderHelper.create();
|
|
19
|
+
condition(conditionBuilder);
|
|
20
|
+
result = conditionBuilder.done();
|
|
21
|
+
}
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
15
24
|
async insert(value, options) {
|
|
16
25
|
const response = await invoke("storage/ces", "insert", {
|
|
17
26
|
body: {
|
|
18
|
-
|
|
27
|
+
entity_name: this.entityName,
|
|
19
28
|
value: value,
|
|
20
29
|
options: options,
|
|
21
30
|
},
|
|
@@ -30,12 +39,10 @@ export class CustomEntityStorage {
|
|
|
30
39
|
* @returns Matching entities
|
|
31
40
|
*/
|
|
32
41
|
async find(condition, options) {
|
|
33
|
-
const
|
|
34
|
-
condition(conditionBuilder);
|
|
35
|
-
const ast = conditionBuilder.done();
|
|
42
|
+
const ast = this.#buildCondition(condition);
|
|
36
43
|
const response = await invoke("storage/ces", "find", {
|
|
37
44
|
body: {
|
|
38
|
-
|
|
45
|
+
entity_name: this.entityName,
|
|
39
46
|
condition: ast,
|
|
40
47
|
options: options,
|
|
41
48
|
},
|
|
@@ -51,12 +58,10 @@ export class CustomEntityStorage {
|
|
|
51
58
|
* @returns void
|
|
52
59
|
*/
|
|
53
60
|
async update(condition, value, options) {
|
|
54
|
-
const
|
|
55
|
-
condition(conditionBuilder);
|
|
56
|
-
const ast = conditionBuilder.done();
|
|
61
|
+
const ast = this.#buildCondition(condition);
|
|
57
62
|
const response = await invoke("storage/ces", "update", {
|
|
58
63
|
body: {
|
|
59
|
-
|
|
64
|
+
entity_name: this.entityName,
|
|
60
65
|
condition: ast,
|
|
61
66
|
value: value,
|
|
62
67
|
options: options,
|
|
@@ -70,12 +75,10 @@ export class CustomEntityStorage {
|
|
|
70
75
|
* @returns Record count
|
|
71
76
|
*/
|
|
72
77
|
async count(condition) {
|
|
73
|
-
const
|
|
74
|
-
condition(conditionBuilder);
|
|
75
|
-
const ast = conditionBuilder.done();
|
|
78
|
+
const ast = this.#buildCondition(condition);
|
|
76
79
|
const response = await invoke("storage/ces", "count", {
|
|
77
80
|
body: {
|
|
78
|
-
|
|
81
|
+
entity_name: this.entityName,
|
|
79
82
|
condition: ast,
|
|
80
83
|
},
|
|
81
84
|
});
|
|
@@ -89,12 +92,10 @@ export class CustomEntityStorage {
|
|
|
89
92
|
* @returns void
|
|
90
93
|
*/
|
|
91
94
|
async delete(condition, options) {
|
|
92
|
-
const
|
|
93
|
-
condition(conditionBuilder);
|
|
94
|
-
const ast = conditionBuilder.done();
|
|
95
|
+
const ast = this.#buildCondition(condition);
|
|
95
96
|
const response = await invoke("storage/ces", "delete", {
|
|
96
97
|
body: {
|
|
97
|
-
|
|
98
|
+
entity_name: this.entityName,
|
|
98
99
|
condition: ast,
|
|
99
100
|
options: options,
|
|
100
101
|
},
|
package/lib/kvs/index.d.ts
CHANGED
package/lib/kvs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/kvs/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/kvs/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
package/lib/kvs/index.js
CHANGED
package/lib/kvs/kvs.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { KvsValueType } from "@pc-nexus/internal";
|
|
2
|
+
import { KvsGetOptions, KvsSetResult, KvsSetOptions } from "./type.js";
|
|
3
|
+
declare class Kvs {
|
|
4
|
+
set<T extends KvsValueType>(key: string, value: T, options?: KvsSetOptions): Promise<KvsSetResult<T>>;
|
|
5
|
+
get<T extends KvsValueType>(key: string, options?: KvsGetOptions): Promise<T | undefined>;
|
|
6
|
+
delete(key: string): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export declare const kvs: Kvs;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=kvs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kvs.d.ts","sourceRoot":"","sources":["../../../src/lib/kvs/kvs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAgC,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEvE,cAAM,GAAG;IACQ,GAAG,CAAC,CAAC,SAAS,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAUrG,GAAG,CAAC,CAAC,SAAS,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IASzF,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAKlD;AACD,eAAO,MAAM,GAAG,KAAY,CAAC"}
|
package/lib/kvs/kvs.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { invoke } from "@pc-nexus/internal";
|
|
2
|
+
class Kvs {
|
|
3
|
+
async set(key, value, options) {
|
|
4
|
+
const response = await invoke("storage/kvs", "set", {
|
|
5
|
+
key,
|
|
6
|
+
value,
|
|
7
|
+
options,
|
|
8
|
+
});
|
|
9
|
+
const result = (await response.json());
|
|
10
|
+
return result.value;
|
|
11
|
+
}
|
|
12
|
+
async get(key, options) {
|
|
13
|
+
const response = await invoke("storage/kvs", "get", {
|
|
14
|
+
key,
|
|
15
|
+
options,
|
|
16
|
+
});
|
|
17
|
+
const result = (await response.json());
|
|
18
|
+
return result.value;
|
|
19
|
+
}
|
|
20
|
+
async delete(key) {
|
|
21
|
+
await invoke("storage/kvs", "delete", {
|
|
22
|
+
key,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export const kvs = new Kvs();
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface KvsSetOptions {
|
|
2
|
+
policy?: "OVERRIDE" | "FAIL_IF_EXISTS";
|
|
3
|
+
secret?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface KvsSetResult<T> {
|
|
6
|
+
key: string;
|
|
7
|
+
value: T;
|
|
8
|
+
}
|
|
9
|
+
export interface KvsGetOptions {
|
|
10
|
+
secret?: boolean;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/lib/kvs/type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC1B,MAAM,CAAC,EAAE,UAAU,GAAG,gBAAgB,CAAC;IACvC,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,YAAY,CAAC,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,CAAC,CAAC;CACZ;AAED,MAAM,WAAW,aAAa;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
package/lib/kvs/type.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/nos/nos.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { invoke } from "@pc-nexus/internal";
|
|
2
2
|
class NOS {
|
|
3
3
|
async createUploadUrl(body) {
|
|
4
|
-
const response = await invoke("storage/nos", "
|
|
4
|
+
const response = await invoke("storage/nos", "create-upload-url", {
|
|
5
5
|
body,
|
|
6
6
|
});
|
|
7
7
|
const result = (await response.json());
|
|
8
8
|
return result.value;
|
|
9
9
|
}
|
|
10
10
|
async createDownloadUrl(key) {
|
|
11
|
-
const response = await invoke("storage/nos", "
|
|
11
|
+
const response = await invoke("storage/nos", "create-download-url", {
|
|
12
12
|
key,
|
|
13
13
|
});
|
|
14
14
|
const result = (await response.json());
|
|
15
15
|
return result.value;
|
|
16
16
|
}
|
|
17
17
|
async getMetadata(key) {
|
|
18
|
-
const response = await invoke("storage/nos", "
|
|
18
|
+
const response = await invoke("storage/nos", "get-metadata", {
|
|
19
19
|
key,
|
|
20
20
|
});
|
|
21
21
|
const result = (await response.json());
|
package/lib/nos/type.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
export type ChecksumType = "SHA1" | "SHA256" | "CRC32" | "CRC32C";
|
|
1
2
|
export interface UploadUrlBody {
|
|
2
3
|
key: string;
|
|
3
|
-
|
|
4
|
+
size: number;
|
|
4
5
|
checksum: string;
|
|
5
|
-
checksum_type:
|
|
6
|
+
checksum_type: ChecksumType;
|
|
6
7
|
overwrite?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export interface PresignedUrlResponse {
|
|
@@ -14,6 +15,9 @@ export interface ObjectMetadata {
|
|
|
14
15
|
mime_type?: string;
|
|
15
16
|
checksum: string;
|
|
16
17
|
size: number;
|
|
17
|
-
created_at?:
|
|
18
|
+
created_at?: number;
|
|
18
19
|
}
|
|
20
|
+
export type GenerateUploadUrlPayload = Pick<UploadUrlBody, "size" | "checksum" | "checksum_type">;
|
|
21
|
+
export type PresignedURLToObjectMetadataMap = Record<string, UploadUrlBody>;
|
|
22
|
+
export type PresignedURLToObjectKeyMap = Record<string, string>;
|
|
19
23
|
//# sourceMappingURL=type.d.ts.map
|
package/lib/nos/type.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/lib/nos/type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/lib/nos/type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAElE,MAAM,WAAW,aAAa;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,YAAY,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACjC,GAAG,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,UAAU,GAAG,eAAe,CAAC,CAAC;AAElG,MAAM,MAAM,+BAA+B,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAE5E,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pc-nexus/storage",
|
|
3
|
-
"version": "0.5.0
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"type": "module",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@pc-nexus/internal": "0.5.0
|
|
33
|
+
"@pc-nexus/internal": "0.5.0",
|
|
34
34
|
"lodash": "^4.17.21"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {},
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
export type NestedPathsIterator<Type, WalkedType> = Required<NonNullable<Type>> extends Required<WalkedType> ? [] | (string | (WalkedType extends readonly unknown[] ? ArrayIndexes : never))[] : Type extends (...args: any[]) => any ? never : Type extends string | number | boolean | Date | RegExp | Buffer | Uint8Array | {
|
|
2
|
-
_bsontype: string;
|
|
3
|
-
} ? [] : Type extends readonly (infer EleType)[] ? [ArrayIndexes<Type>, ...NestedPathsIterator<EleType, WalkedType | Type>] | [...NestedPathsIterator<EleType, WalkedType | Type>] : Type extends object ? {
|
|
4
|
-
[Key in Extract<keyof Type, string>]: [Key, ...NestedPathsIterator<Type[Key], WalkedType | Type>];
|
|
5
|
-
}[Extract<keyof Type, string>] | [] : [];
|
|
6
|
-
export type NestedPaths<Type> = NestedPathsIterator<Type, never>;
|
|
7
|
-
export type KeyChains<T> = Exclude<NestedPaths<T>, []> extends infer Paths ? Paths extends readonly (string | number)[] ? Paths extends readonly [infer First, ...infer Rest] ? First extends string | number ? Rest extends readonly (string | number)[] ? `${First}${Rest extends readonly [] ? "" : "."}${KeyChainsJoin<Rest>}` : never : never : "" : never : never;
|
|
8
|
-
type KeyChainsJoin<Paths extends readonly (string | number)[]> = Paths extends readonly [infer First, ...infer Rest] ? First extends string | number ? Rest extends readonly (string | number)[] ? `${First}${Rest extends readonly [] ? "" : "."}${KeyChainsJoin<Rest>}` : never : never : "";
|
|
9
|
-
export type IntegerListAsc<Len extends number = 10, Result extends readonly number[] = []> = Result["length"] extends Len ? Result : IntegerListAsc<Len, [...Result, Result["length"]]>;
|
|
10
|
-
export type Integer = IntegerListAsc[number];
|
|
11
|
-
export type ArrayIndexes<Array extends readonly any[] = readonly any[]> = number extends any[]["length"] ? Integer : any[] extends [infer Ele, ...infer RestArray] ? ArrayIndexes<RestArray> | RestArray["length"] : never;
|
|
12
|
-
export type Document = Record<string, any>;
|
|
13
|
-
export declare const parentLevelSymbol: unique symbol;
|
|
14
|
-
export declare const logicalOpSymbol: unique symbol;
|
|
15
|
-
export declare enum QueryOperator {
|
|
16
|
-
eq = "eq",
|
|
17
|
-
ne = "ne",
|
|
18
|
-
gt = "gt",
|
|
19
|
-
gte = "gte",
|
|
20
|
-
lt = "lt",
|
|
21
|
-
lte = "lte",
|
|
22
|
-
in = "in",
|
|
23
|
-
nin = "nin",
|
|
24
|
-
exists = "exists"
|
|
25
|
-
}
|
|
26
|
-
export type MaybeRegExp<T> = T extends string ? RegExp | T : T;
|
|
27
|
-
export type ValueAlternativeType<V> = V extends (infer E)[] ? MaybeRegExp<E> | V : MaybeRegExp<V>;
|
|
28
|
-
export type QueryOperatorCondition$in<V> = readonly ValueAlternativeType<V>[];
|
|
29
|
-
export type QueryOperatorConditions<V> = Partial<Record<QueryOperator.eq | QueryOperator.ne | QueryOperator.gt | QueryOperator.gte | QueryOperator.lt | QueryOperator.lte, ValueAlternativeType<V>>> & Partial<Record<QueryOperator.in | QueryOperator.nin, QueryOperatorCondition$in<V>>> & {
|
|
30
|
-
[QueryOperator.exists]?: boolean;
|
|
31
|
-
};
|
|
32
|
-
export type QueryConditions<Schema> = {
|
|
33
|
-
[KeyChain in KeyChains<Schema>]?: QueryOperatorConditions<TypeAtKeyChain<Schema, KeyChain>> | ValueAlternativeType<TypeAtKeyChain<Schema, KeyChain>>;
|
|
34
|
-
};
|
|
35
|
-
export declare enum LogicalOperator {
|
|
36
|
-
and = "and",
|
|
37
|
-
or = "or"
|
|
38
|
-
}
|
|
39
|
-
export type LogicalCondition<Schema> = (QueryConditions<Schema> | LogicalConditions<Schema>)[];
|
|
40
|
-
export type LogicalConditions<Schema> = Record<LogicalOperator, LogicalCondition<Schema>>;
|
|
41
|
-
export type Query<Schema> = QueryConditions<Schema> & LogicalConditions<Schema>;
|
|
42
|
-
export type LogicalLevelType<Schema> = {
|
|
43
|
-
[logicalOpSymbol]: LogicalOperator;
|
|
44
|
-
[parentLevelSymbol]: CurrentLevelType<Schema>;
|
|
45
|
-
} & LogicalCondition<Schema>;
|
|
46
|
-
export type RootLevelType<Schema> = {
|
|
47
|
-
[logicalOpSymbol]?: never;
|
|
48
|
-
} & Query<Schema>;
|
|
49
|
-
export type CurrentLevelType<Schema> = RootLevelType<Schema> | LogicalLevelType<Schema>;
|
|
50
|
-
export interface ConditionBuilderOptions {
|
|
51
|
-
ignoreUndefined?: boolean;
|
|
52
|
-
keepNaN?: boolean;
|
|
53
|
-
}
|
|
54
|
-
export type RangeOptions = ConditionBuilderOptions;
|
|
55
|
-
export type EqOptions<OP extends QueryOperator = QueryOperator.eq> = {
|
|
56
|
-
queryOperator?: OP;
|
|
57
|
-
} & ConditionBuilderOptions;
|
|
58
|
-
export type InOptions = {
|
|
59
|
-
queryOperator?: QueryOperator.in | QueryOperator.nin;
|
|
60
|
-
ignoreEmpty?: boolean;
|
|
61
|
-
} & ConditionBuilderOptions;
|
|
62
|
-
export type TryConvertToInt<T extends string> = T extends `${Integer}` ? IntegerListAsc[T] : T extends `${number}` ? number : T;
|
|
63
|
-
export type TypeAtKey<T extends Document | readonly unknown[], K> = T extends readonly unknown[] ? K extends number ? T[K] : never : K extends keyof T ? T[K] : never;
|
|
64
|
-
export type ParseKeyChainToPath<KeyChain extends string, Separator extends string = "."> = KeyChain extends `${infer Key}${Separator}${infer Rest}` ? [TryConvertToInt<Key>, ...ParseKeyChainToPath<Rest>] : [TryConvertToInt<KeyChain>];
|
|
65
|
-
export type TypeAtKeyPath<T, KeyPath> = KeyPath extends (string | ArrayIndexes)[] ? KeyPath extends [infer Key, ...infer RestKeyPath] ? T extends readonly (infer E)[] ? Key extends ArrayIndexes<T> ? TypeAtKeyPath<TypeAtKey<T, Key>, RestKeyPath> : TypeAtKeyPath<E, KeyPath> : T extends Document ? TypeAtKeyPath<TypeAtKey<T, Key>, RestKeyPath> : never : T : never;
|
|
66
|
-
export type TypeAtKeyChain<T, KeyChain extends string, Separator extends string = "."> = TypeAtKeyPath<T, ParseKeyChainToPath<KeyChain, Separator>>;
|
|
67
|
-
export interface ConditionFieldNode {
|
|
68
|
-
kind: "field";
|
|
69
|
-
field: string;
|
|
70
|
-
op: QueryOperator;
|
|
71
|
-
value: any;
|
|
72
|
-
}
|
|
73
|
-
export interface ConditionGroupNode {
|
|
74
|
-
kind: "group";
|
|
75
|
-
op: LogicalOperator;
|
|
76
|
-
nodes: ConditionNode[];
|
|
77
|
-
}
|
|
78
|
-
export type ConditionNode = ConditionFieldNode | ConditionGroupNode;
|
|
79
|
-
export type Condition = ConditionNode;
|
|
80
|
-
export declare const NEXUS_STORAGE_CONDITION_BUILDER_ERROR_TYPE = "NEXUS_STORAGE_CONDITION_BUILDER";
|
|
81
|
-
export {};
|
|
82
|
-
//# sourceMappingURL=type.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../../src/lib/ces/condition-builder/type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,CAAC,IAAI,EAAE,UAAU,IAC5C,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,SAAS,QAAQ,CAAC,UAAU,CAAC,GAClD,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,UAAU,SAAS,SAAS,OAAO,EAAE,GAAG,YAAY,GAAG,KAAK,CAAC,CAAC,EAAE,GAChF,IAAI,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAClC,KAAK,GACL,IAAI,SACI,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,MAAM,GACN,MAAM,GACN,UAAU,GACV;IACI,SAAS,EAAE,MAA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AE,SAAS,SAAS,MAAM,GAAG,GAAG,IAAI,aAAa,CAClG,CAAC,EACD,mBAAmB,CAAC,QAAQ,EAAE,SAAS,CAAC,CAC3C,CAAC;AAEF,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,aAAa,CAAC;IAClB,KAAK,EAAE,GAAG,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,EAAE,EAAE,eAAe,CAAC;IACpB,KAAK,EAAE,aAAa,EAAE,CAAC;CAC1B;AAED,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AAEpE,MAAM,MAAM,SAAS,GAAG,aAAa,CAAC;AAEtC,eAAO,MAAM,0CAA0C,oCAAoC,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export const parentLevelSymbol = Symbol("parentLevel");
|
|
2
|
-
export const logicalOpSymbol = Symbol("logicalOp");
|
|
3
|
-
export var QueryOperator;
|
|
4
|
-
(function (QueryOperator) {
|
|
5
|
-
QueryOperator["eq"] = "eq";
|
|
6
|
-
QueryOperator["ne"] = "ne";
|
|
7
|
-
QueryOperator["gt"] = "gt";
|
|
8
|
-
QueryOperator["gte"] = "gte";
|
|
9
|
-
QueryOperator["lt"] = "lt";
|
|
10
|
-
QueryOperator["lte"] = "lte";
|
|
11
|
-
QueryOperator["in"] = "in";
|
|
12
|
-
QueryOperator["nin"] = "nin";
|
|
13
|
-
QueryOperator["exists"] = "exists";
|
|
14
|
-
})(QueryOperator || (QueryOperator = {}));
|
|
15
|
-
export var LogicalOperator;
|
|
16
|
-
(function (LogicalOperator) {
|
|
17
|
-
LogicalOperator["and"] = "and";
|
|
18
|
-
LogicalOperator["or"] = "or";
|
|
19
|
-
})(LogicalOperator || (LogicalOperator = {}));
|
|
20
|
-
export const NEXUS_STORAGE_CONDITION_BUILDER_ERROR_TYPE = "NEXUS_STORAGE_CONDITION_BUILDER";
|
package/lib/ces/type.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export type Projection<TSchema = string> = (TSchema extends string ? TSchema : keyof TSchema)[];
|
|
2
|
-
export interface InsertOptions {
|
|
3
|
-
/** Whether to insert in order, default is false */
|
|
4
|
-
ordered?: boolean;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Options for entity().updateOne or entity().updateMany
|
|
8
|
-
*/
|
|
9
|
-
export interface UpdateOptions {
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Options for entity().delete
|
|
13
|
-
*/
|
|
14
|
-
export interface DeleteOptions {
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Options for find operations that return multiple records
|
|
18
|
-
* @template T Entity type extending Entity
|
|
19
|
-
*/
|
|
20
|
-
export interface FindOptions<TSchema = string> {
|
|
21
|
-
/** Number of records to skip */
|
|
22
|
-
skip?: number;
|
|
23
|
-
/** Maximum number of records to return */
|
|
24
|
-
limit?: number;
|
|
25
|
-
/** Sort order specification, multiple sort properties are supported */
|
|
26
|
-
sort?: SortProperty<TSchema>[];
|
|
27
|
-
/** Index hint for query optimization */
|
|
28
|
-
hint?: string;
|
|
29
|
-
/** Fields to include or exclude in the result */
|
|
30
|
-
projection?: Projection<TSchema>;
|
|
31
|
-
/** Whether to include metadata in the result
|
|
32
|
-
* 1: default is false not include metadata
|
|
33
|
-
* 2: true include metadata [_created_by, _created_at, _is_deleted,_updated_by, _updated_at, _deleted_by, _deleted_at] */
|
|
34
|
-
includes?: {
|
|
35
|
-
metadata: boolean;
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
export interface SortProperty<TSchema = string> {
|
|
39
|
-
propertyKey: TSchema extends string ? TSchema : keyof TSchema;
|
|
40
|
-
order: Direction;
|
|
41
|
-
}
|
|
42
|
-
export declare enum Direction {
|
|
43
|
-
ascending = 1,
|
|
44
|
-
descending = -1
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=type.d.ts.map
|
package/lib/ces/type.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/lib/ces/type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,CAAC,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,SAAS,MAAM,GAAG,OAAO,GAAG,MAAM,OAAO,CAAC,EAAE,CAAC;AAEhG,MAAM,WAAW,aAAa;IAC1B,mDAAmD;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;CAAG;AAEjC;;GAEG;AACH,MAAM,WAAW,aAAa;CAAG;AAEjC;;;GAGG;AACH,MAAM,WAAW,WAAW,CAAC,OAAO,GAAG,MAAM;IACzC,gCAAgC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,IAAI,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC;IAC/B,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,UAAU,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IACjC;;6HAEyH;IACzH,QAAQ,CAAC,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC;CACpC;AAED,MAAM,WAAW,YAAY,CAAC,OAAO,GAAG,MAAM;IAC1C,WAAW,EAAE,OAAO,SAAS,MAAM,GAAG,OAAO,GAAG,MAAM,OAAO,CAAC;IAC9D,KAAK,EAAE,SAAS,CAAC;CACpB;AAED,oBAAY,SAAS;IACjB,SAAS,IAAI;IACb,UAAU,KAAK;CAClB"}
|