@punks/backend-entity-manager 0.0.194 → 0.0.196
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 +15 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/integrations/repository/typeorm/permissionsChecker.d.ts +4 -0
- package/dist/cjs/types/integrations/repository/typeorm/queryBuilder.d.ts +2 -0
- package/dist/esm/index.js +15 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/integrations/repository/typeorm/permissionsChecker.d.ts +4 -0
- package/dist/esm/types/integrations/repository/typeorm/queryBuilder.d.ts +2 -0
- package/dist/index.d.ts +5 -0
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ import { QueryClauseBuilder } from "./queryClauseBuilder";
|
|
|
9
9
|
import { BooleanFacetsType, FacetType, NumberFacetsType, StringFacetsType } from "./facets";
|
|
10
10
|
import { QueryBuilderOperation } from "../../../templates/queryBuilder";
|
|
11
11
|
import { ChildrenMap } from "./traverse";
|
|
12
|
+
import { PermissionsChecker } from "./permissionsChecker";
|
|
12
13
|
export type FacetRelations = {
|
|
13
14
|
columns: string[];
|
|
14
15
|
};
|
|
@@ -16,6 +17,7 @@ export declare abstract class TypeOrmQueryBuilder<TEntity extends ObjectLiteral,
|
|
|
16
17
|
private readonly services;
|
|
17
18
|
private repository;
|
|
18
19
|
protected clause: QueryClauseBuilder;
|
|
20
|
+
protected permissions: PermissionsChecker<TUserContext>;
|
|
19
21
|
constructor(services: EntityServiceLocator<TEntity, unknown>);
|
|
20
22
|
get(id: TEntityId, context?: IAuthenticationContext<TUserContext>): Promise<TEntity | undefined>;
|
|
21
23
|
exists(filters: NonNullable<TEntitySearchParameters["filters"]>, context?: IAuthenticationContext<TUserContext> | undefined): Promise<boolean>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1436,6 +1436,10 @@ type ChildrenMap = Record<string, {
|
|
|
1436
1436
|
count: number;
|
|
1437
1437
|
}>;
|
|
1438
1438
|
|
|
1439
|
+
declare class PermissionsChecker<TUserContext> {
|
|
1440
|
+
hasPermission(context: IAuthenticationContext<TUserContext>, permissions: string[]): boolean;
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1439
1443
|
type FacetRelations = {
|
|
1440
1444
|
columns: string[];
|
|
1441
1445
|
};
|
|
@@ -1443,6 +1447,7 @@ declare abstract class TypeOrmQueryBuilder<TEntity extends ObjectLiteral, TEntit
|
|
|
1443
1447
|
private readonly services;
|
|
1444
1448
|
private repository;
|
|
1445
1449
|
protected clause: QueryClauseBuilder;
|
|
1450
|
+
protected permissions: PermissionsChecker<TUserContext>;
|
|
1446
1451
|
constructor(services: EntityServiceLocator<TEntity, unknown>);
|
|
1447
1452
|
get(id: TEntityId, context?: IAuthenticationContext<TUserContext>): Promise<TEntity | undefined>;
|
|
1448
1453
|
exists(filters: NonNullable<TEntitySearchParameters["filters"]>, context?: IAuthenticationContext<TUserContext> | undefined): Promise<boolean>;
|