@punks/backend-entity-manager 0.0.400 → 0.0.402
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/cjs/index.js +13 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/abstractions/repository.d.ts +2 -0
- package/dist/cjs/types/integrations/repository/typeorm/repository.d.ts +2 -0
- package/dist/cjs/types/testing/mocks/repository.d.ts +2 -0
- package/dist/esm/index.js +13 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/abstractions/repository.d.ts +2 -0
- package/dist/esm/types/integrations/repository/typeorm/repository.d.ts +2 -0
- package/dist/esm/types/testing/mocks/repository.d.ts +2 -0
- package/dist/index.d.ts +4 -0
- package/package.json +1 -1
|
@@ -9,6 +9,8 @@ export interface IEntityRepository<TEntity, TEntityId, TGetConditions, TFindCond
|
|
|
9
9
|
getBy(condition: TGetConditions): Promise<TEntity | undefined>;
|
|
10
10
|
all(): Promise<TEntity[]>;
|
|
11
11
|
find(condition: TFindCondition): Promise<TEntity[]>;
|
|
12
|
+
findOne(condition: TFindCondition): Promise<TEntity | undefined>;
|
|
13
|
+
findOneOrFail(condition: TFindCondition): Promise<TEntity>;
|
|
12
14
|
findById(id: TEntityId[]): Promise<TEntity[]>;
|
|
13
15
|
count(condition: TFindCondition): Promise<number>;
|
|
14
16
|
delete(id: TEntityId): Promise<void>;
|
|
@@ -18,6 +18,8 @@ export declare class TypeOrmRepository<TEntity extends ObjectLiteral, TEntityId>
|
|
|
18
18
|
all(): Promise<TEntity[]>;
|
|
19
19
|
count(condition: FindManyOptions<TEntity>): Promise<number>;
|
|
20
20
|
find(condition: FindManyOptions<TEntity>): Promise<TEntity[]>;
|
|
21
|
+
findOne(condition: FindManyOptions<TEntity>): Promise<TEntity | undefined>;
|
|
22
|
+
findOneOrFail(condition: FindManyOptions<TEntity>): Promise<TEntity>;
|
|
21
23
|
findById(id: TEntityId[]): Promise<TEntity[]>;
|
|
22
24
|
delete(id: TEntityId): Promise<void>;
|
|
23
25
|
deleteBy(condition: DeleteCriteria<TEntity>): Promise<IEntitiesDeleteResult>;
|
|
@@ -8,6 +8,8 @@ export declare class InMemoryRepository<TEntity> implements IEntityRepository<TE
|
|
|
8
8
|
getBy(condition: FilterExpression<TEntity>): Promise<TEntity | undefined>;
|
|
9
9
|
all(): Promise<TEntity[]>;
|
|
10
10
|
find(condition: FilterExpression<TEntity>): Promise<TEntity[]>;
|
|
11
|
+
findOne(condition: FilterExpression<TEntity>): Promise<TEntity | undefined>;
|
|
12
|
+
findOneOrFail(condition: FilterExpression<TEntity>): Promise<TEntity>;
|
|
11
13
|
count(condition: FilterExpression<TEntity>): Promise<number>;
|
|
12
14
|
findById(id: string[]): Promise<TEntity[]>;
|
|
13
15
|
delete(id: string): Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -922,6 +922,8 @@ interface IEntityRepository<TEntity, TEntityId, TGetConditions, TFindCondition,
|
|
|
922
922
|
getBy(condition: TGetConditions): Promise<TEntity | undefined>;
|
|
923
923
|
all(): Promise<TEntity[]>;
|
|
924
924
|
find(condition: TFindCondition): Promise<TEntity[]>;
|
|
925
|
+
findOne(condition: TFindCondition): Promise<TEntity | undefined>;
|
|
926
|
+
findOneOrFail(condition: TFindCondition): Promise<TEntity>;
|
|
925
927
|
findById(id: TEntityId[]): Promise<TEntity[]>;
|
|
926
928
|
count(condition: TFindCondition): Promise<number>;
|
|
927
929
|
delete(id: TEntityId): Promise<void>;
|
|
@@ -3071,6 +3073,8 @@ declare class TypeOrmRepository<TEntity extends ObjectLiteral, TEntityId> implem
|
|
|
3071
3073
|
all(): Promise<TEntity[]>;
|
|
3072
3074
|
count(condition: FindManyOptions<TEntity>): Promise<number>;
|
|
3073
3075
|
find(condition: FindManyOptions<TEntity>): Promise<TEntity[]>;
|
|
3076
|
+
findOne(condition: FindManyOptions<TEntity>): Promise<TEntity | undefined>;
|
|
3077
|
+
findOneOrFail(condition: FindManyOptions<TEntity>): Promise<TEntity>;
|
|
3074
3078
|
findById(id: TEntityId[]): Promise<TEntity[]>;
|
|
3075
3079
|
delete(id: TEntityId): Promise<void>;
|
|
3076
3080
|
deleteBy(condition: DeleteCriteria<TEntity>): Promise<IEntitiesDeleteResult>;
|