Add applicationId to syncableEntity and fix syncApp deletion (#15170)
## Context - All flatEntity should extend SyncableEntity - SyncableEntity should now have applicationId and application relation - Fix syncApp deletion, should now properly use migration v2 to delete syncable entities
This commit is contained in:
+3
-4
@@ -1,3 +1,4 @@
|
||||
import { type FlatEntityFrom } from 'src/engine/metadata-modules/flat-entity/types/flat-entity.type';
|
||||
import { type RoleEntity } from 'src/engine/metadata-modules/role/role.entity';
|
||||
|
||||
export const roleEntityRelationProperties = [
|
||||
@@ -10,9 +11,7 @@ export const roleEntityRelationProperties = [
|
||||
export type RoleEntityRelationProperties =
|
||||
(typeof roleEntityRelationProperties)[number];
|
||||
|
||||
export type FlatRole = Omit<
|
||||
export type FlatRole = FlatEntityFrom<
|
||||
RoleEntity,
|
||||
RoleEntityRelationProperties | 'createdAt' | 'updatedAt'
|
||||
> & {
|
||||
universalIdentifier: string;
|
||||
};
|
||||
>;
|
||||
|
||||
+1
@@ -20,5 +20,6 @@ export const fromRoleEntityToFlatRole = (role: RoleEntity): FlatRole => {
|
||||
canBeAssignedToApiKeys: role.canBeAssignedToApiKeys,
|
||||
workspaceId: role.workspaceId,
|
||||
universalIdentifier: role.standardId || role.id,
|
||||
applicationId: role.applicationId ?? null,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user