Skip to content

Commit ec18f16

Browse files
committed
unifying M2M types
1 parent 226ca00 commit ec18f16

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

server/entities/m2m.entity.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
import { Roles } from "../auth/ability/ability.factory";
12
export class M2M {
2-
isM2M: boolean;
3-
role: {
4-
main: string;
5-
};
6-
scopes: string[];
3+
isM2M: boolean;
4+
clientId: string;
5+
subject: string;
6+
scopes: string[];
7+
role: {
8+
main: Roles;
9+
};
10+
namespace: string;
711
}

server/history/types/history.interfaces.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Roles } from "../../auth/ability/ability.factory";
1+
import { M2M } from "../../entities/m2m.entity";
22
import { HistoryType, TargetModel } from "../schema/history.schema";
33
import { Types } from "mongoose";
44

@@ -33,16 +33,6 @@ interface HistoryItem {
3333
}
3434

3535
type PerformedBy = Types.ObjectId[] | M2M | string | null;
36-
interface M2M {
37-
isM2M: boolean;
38-
clientId: string;
39-
subject: string;
40-
scopes: string[];
41-
role: {
42-
main: Roles.Integration;
43-
};
44-
namespace: string;
45-
}
4636
interface HistoryDetails {
4737
after: AfterAndBeforeType;
4838
before?: AfterAndBeforeType | null;

0 commit comments

Comments
 (0)