@mu-cabin/opms-permission 0.4.0 → 0.6.0

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/index.cjs CHANGED
@@ -313,7 +313,7 @@ var Permission = class {
313
313
  return Promise.reject(new Error(msg));
314
314
  }
315
315
  this._userInfo = obj;
316
- return obj;
316
+ return this.userInfo;
317
317
  }
318
318
  /**
319
319
  * Get resources and process to menuList, menuMap, widgetMap (matches app store logic)
package/dist/index.d.mts CHANGED
@@ -1,47 +1,3 @@
1
- interface UserOrganization$1 {
2
- orgId: number;
3
- orgCode: string;
4
- parentOrgId: number | null;
5
- parentOrgCode: string | null;
6
- branchId: number | null;
7
- branchCode: string | null;
8
- orgName: string;
9
- orgShortName: string;
10
- orgType: string;
11
- showOrder: number | null;
12
- orgCodeSearchPath: string;
13
- positionInfo: any[];
14
- orgBindType: string;
15
- csmOrgCode: string | null;
16
- hasPermission: boolean;
17
- canModify: boolean;
18
- nodeLevel: number;
19
- searchPath: string;
20
- children: UserOrganization$1[];
21
- }
22
- interface UserRole {
23
- roleId: number;
24
- roleName: string;
25
- parentRoleId: number | null;
26
- grantType: string;
27
- nodeLevel: number | null;
28
- searchPath: string | null;
29
- children: UserRole[];
30
- }
31
- interface UserInfo$1 {
32
- ehrId: number;
33
- account: string;
34
- crewId: number | null;
35
- crewCode: string | null;
36
- name: string;
37
- individualType: string | null;
38
- individualStatus: string | null;
39
- opmsRole: string;
40
- userOrganizations: UserOrganization$1[];
41
- userRoles: UserRole[];
42
- uniAccount: string;
43
- }
44
-
45
1
  interface Resource {
46
2
  resourceId: number;
47
3
  resourceCode: string;
@@ -111,7 +67,7 @@ declare class Permission {
111
67
  */
112
68
  logout(): Promise<void>;
113
69
  clear(): void;
114
- getUserInfo(): Promise<UserInfo$1>;
70
+ getUserInfo(): Promise<UserInfo | null>;
115
71
  /**
116
72
  * Get resources and process to menuList, menuMap, widgetMap (matches app store logic)
117
73
  */
package/dist/index.d.ts CHANGED
@@ -1,47 +1,3 @@
1
- interface UserOrganization$1 {
2
- orgId: number;
3
- orgCode: string;
4
- parentOrgId: number | null;
5
- parentOrgCode: string | null;
6
- branchId: number | null;
7
- branchCode: string | null;
8
- orgName: string;
9
- orgShortName: string;
10
- orgType: string;
11
- showOrder: number | null;
12
- orgCodeSearchPath: string;
13
- positionInfo: any[];
14
- orgBindType: string;
15
- csmOrgCode: string | null;
16
- hasPermission: boolean;
17
- canModify: boolean;
18
- nodeLevel: number;
19
- searchPath: string;
20
- children: UserOrganization$1[];
21
- }
22
- interface UserRole {
23
- roleId: number;
24
- roleName: string;
25
- parentRoleId: number | null;
26
- grantType: string;
27
- nodeLevel: number | null;
28
- searchPath: string | null;
29
- children: UserRole[];
30
- }
31
- interface UserInfo$1 {
32
- ehrId: number;
33
- account: string;
34
- crewId: number | null;
35
- crewCode: string | null;
36
- name: string;
37
- individualType: string | null;
38
- individualStatus: string | null;
39
- opmsRole: string;
40
- userOrganizations: UserOrganization$1[];
41
- userRoles: UserRole[];
42
- uniAccount: string;
43
- }
44
-
45
1
  interface Resource {
46
2
  resourceId: number;
47
3
  resourceCode: string;
@@ -111,7 +67,7 @@ declare class Permission {
111
67
  */
112
68
  logout(): Promise<void>;
113
69
  clear(): void;
114
- getUserInfo(): Promise<UserInfo$1>;
70
+ getUserInfo(): Promise<UserInfo | null>;
115
71
  /**
116
72
  * Get resources and process to menuList, menuMap, widgetMap (matches app store logic)
117
73
  */
package/dist/index.mjs CHANGED
@@ -275,7 +275,7 @@ var Permission = class {
275
275
  return Promise.reject(new Error(msg));
276
276
  }
277
277
  this._userInfo = obj;
278
- return obj;
278
+ return this.userInfo;
279
279
  }
280
280
  /**
281
281
  * Get resources and process to menuList, menuMap, widgetMap (matches app store logic)
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@mu-cabin/opms-permission",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Frontend SDK for OPMS permission and auth management.",
5
- "main": "dist/index.cjs.js",
6
- "module": "dist/index.mjs.js",
7
- "types": "dist/index.d.ts",
5
+ "main": "./dist/index.cjs.js",
6
+ "module": "./dist/index.mjs.js",
7
+ "types": "./dist/index.d.ts",
8
8
  "files": ["dist"],
9
9
  "scripts": {
10
10
  "build": "tsup src/index.ts --dts --format cjs,esm",
@@ -16,8 +16,13 @@
16
16
  "publishConfig": {
17
17
  "access": "public"
18
18
  },
19
+ "exports": {
20
+ "types": "./dist/index.d.ts",
21
+ "require": "./dist/index.cjs",
22
+ "import": "./dist/index.mjs"
23
+ },
19
24
  "keywords": ["opms", "permission", "auth", "sdk"],
20
- "author": "",
25
+ "author": "wangluluez@gmail.com",
21
26
  "license": "MIT",
22
27
  "devDependencies": {
23
28
  "axios": "^1.6.0",