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/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>;