@atlantjs/arch 3.2.4 → 3.2.7

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.
@@ -1,4 +1,4 @@
1
- import { DataSource, EntityTarget, FindOptionsWhere, ObjectLiteral } from "typeorm";
1
+ import { DataSource, ObjectLiteral } from "typeorm";
2
2
  import { FindOptionsRelations } from "typeorm";
3
3
  import { Newable } from "../../../../@tool-box/utils/datatypes/generic-types";
4
4
  import { Optional } from "../../../../@tool-box/utils/ducts/optional-type";
@@ -6,21 +6,20 @@ import { Return } from "../../../../@tool-box/utils/ducts/return-type";
6
6
  import { DatabaseConfigAbstract } from "./database.config";
7
7
  import { FailureAbstract } from "../failures/failure.abstract";
8
8
  import { EntityBackendAbstract } from "../../domain/entities/entity-backend.abstract";
9
- type SchemaAbstract = EntityTarget<ObjectLiteral>;
10
- type PropertyEntity<T> = {
11
- [K in keyof InstanceType<Newable<T>>]: InstanceType<Newable<T>>[K];
12
- };
13
9
  export declare abstract class DatabaseHelperAbstract {
14
10
  private database;
15
11
  private queryRunner;
16
12
  connect(db: DatabaseConfigAbstract): Promise<DataSource>;
17
13
  disconnect(): Promise<void>;
18
- read<T extends SchemaAbstract, E extends ObjectLiteral>(schema: T, condition: PropertyEntity<E>, relations: FindOptionsRelations<E>): Promise<Return<Optional<ObjectLiteral[]>, FailureAbstract>>;
19
- write<T extends SchemaAbstract>(schema: T, sortedEntities: EntityBackendAbstract[]): Promise<Return<undefined, undefined>>;
20
- delete<T extends SchemaAbstract>(entity: T, condition: FindOptionsWhere<T>[] | FindOptionsWhere<T>): Promise<Return<undefined, undefined>>;
14
+ read<T extends Newable<ObjectLiteral>, E extends ObjectLiteral>(schema: T, condition: {
15
+ [K in keyof InstanceType<T>]?: InstanceType<T>[K];
16
+ }, relations: FindOptionsRelations<E>): Promise<Return<Optional<ObjectLiteral[]>, FailureAbstract>>;
17
+ write<T extends Newable<ObjectLiteral>>(schema: T, sortedEntities: EntityBackendAbstract[]): Promise<Return<undefined, undefined>>;
18
+ delete<T extends Newable<ObjectLiteral>>(entity: T, condition: {
19
+ [K in keyof InstanceType<T>]?: InstanceType<T>[K];
20
+ }): Promise<Return<undefined, undefined>>;
21
21
  private getManager;
22
22
  private openTransaction;
23
23
  private commit;
24
24
  private rollback;
25
25
  }
26
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlantjs/arch",
3
- "version": "3.2.4",
3
+ "version": "3.2.7",
4
4
  "main": "index.js",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {