@tomei/sso 0.31.0 → 0.31.2

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomei/sso",
3
- "version": "0.31.0",
3
+ "version": "0.31.2",
4
4
  "description": "Tomei SSO Package",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -141,7 +141,16 @@ export class Group extends ObjectBase {
141
141
  ...options,
142
142
  where: queryObj,
143
143
  };
144
- return await Group._Repo.findAllWithPagination(options);
144
+
145
+ const result = await Group._Repo.findAllWithPagination(options);
146
+
147
+ //Map the result to Group instance
148
+ return {
149
+ Count: result.count,
150
+ Companies: result.rows.map(
151
+ (group) => new Group(group.get({ plain: true })),
152
+ ),
153
+ };
145
154
  }
146
155
  }
147
156
 
@@ -12,5 +12,6 @@ export * from './user-object-privilege';
12
12
  export * from './group-privilege';
13
13
  export * from './group-object-privilege';
14
14
  export * from './system-privilege';
15
+ export * from './group';
15
16
 
16
17
  //test ci
@@ -3,6 +3,6 @@ import { GroupTypeEnum } from '../enum/group-type.enum';
3
3
  export interface IGroupSearchAttr {
4
4
  GroupCode?: string;
5
5
  Name?: string;
6
- Type?: string;
7
- Status?: GroupTypeEnum;
6
+ Type?: GroupTypeEnum;
7
+ Status?: string;
8
8
  }