web-dc-api 0.0.75 → 0.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dc.min.js +2 -2
- package/dist/index.cjs.js +2 -2
- package/dist/index.d.ts +8 -0
- package/dist/index.esm.js +2 -2
- package/lib/dc.ts +1 -1
- package/lib/implements/file/manager.ts +22 -2
- package/lib/implements/threaddb/dbmanager.ts +45 -38
- package/lib/implements/threaddb/net/net.ts +70 -40
- package/lib/modules/auth-module.ts +25 -15
- package/lib/modules/database-module.ts +3 -0
- package/lib/modules/keyvalue-module.ts +0 -9
- package/lib/serverless/base_repository.ts +124 -2
- package/lib/util/utils.ts +29 -9
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -28862,6 +28862,12 @@ type FindValuesOptions = {
|
|
|
28862
28862
|
offset?: number;
|
|
28863
28863
|
vaccount?: string;
|
|
28864
28864
|
};
|
|
28865
|
+
type Operator = "=" | ">" | "<" | ">=" | "<=" | "!=";
|
|
28866
|
+
interface WhereCond {
|
|
28867
|
+
field: string;
|
|
28868
|
+
operator: Operator;
|
|
28869
|
+
value: any;
|
|
28870
|
+
}
|
|
28865
28871
|
declare class EntityRepository<T extends BaseEntity> {
|
|
28866
28872
|
private readonly entityCtor;
|
|
28867
28873
|
private readonly ops;
|
|
@@ -28870,6 +28876,8 @@ declare class EntityRepository<T extends BaseEntity> {
|
|
|
28870
28876
|
save(entity: T, vaccount?: string): Promise<number>;
|
|
28871
28877
|
deleteById(id: string, vaccount?: string): Promise<void>;
|
|
28872
28878
|
update(id: string, patch: Partial<T>, vaccount?: string): Promise<T | null>;
|
|
28879
|
+
query(where: WhereCond | string, options?: FindIndexOptions): Promise<T[]>;
|
|
28880
|
+
find(options?: FindIndexOptions): Promise<T[]>;
|
|
28873
28881
|
findById(id: string, writerPubkey?: string, vaccount?: string): Promise<T | null>;
|
|
28874
28882
|
findByIndex(indexKey: string, indexValue: string, options?: FindIndexOptions): Promise<T[]>;
|
|
28875
28883
|
findOneByIndex(indexKey: string, indexValue: string, options?: Omit<FindIndexOptions, "limit">): Promise<T | null>;
|