@mu-cabin/opms-permission 0.3.0 → 0.5.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;
@@ -81,9 +37,8 @@ interface UserOrganization {
81
37
  }
82
38
 
83
39
  interface PermissionOptions {
84
- systemId: number;
40
+ systemId: string;
85
41
  baseUrl: string;
86
- ssoBaseUrl: string;
87
42
  }
88
43
  declare class Permission {
89
44
  private _userInfo;
@@ -112,7 +67,7 @@ declare class Permission {
112
67
  */
113
68
  logout(): Promise<void>;
114
69
  clear(): void;
115
- getUserInfo(): Promise<UserInfo$1>;
70
+ getUserInfo(): Promise<UserInfo | null>;
116
71
  /**
117
72
  * Get resources and process to menuList, menuMap, widgetMap (matches app store logic)
118
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;
@@ -81,9 +37,8 @@ interface UserOrganization {
81
37
  }
82
38
 
83
39
  interface PermissionOptions {
84
- systemId: number;
40
+ systemId: string;
85
41
  baseUrl: string;
86
- ssoBaseUrl: string;
87
42
  }
88
43
  declare class Permission {
89
44
  private _userInfo;
@@ -112,7 +67,7 @@ declare class Permission {
112
67
  */
113
68
  logout(): Promise<void>;
114
69
  clear(): void;
115
- getUserInfo(): Promise<UserInfo$1>;
70
+ getUserInfo(): Promise<UserInfo | null>;
116
71
  /**
117
72
  * Get resources and process to menuList, menuMap, widgetMap (matches app store logic)
118
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@mu-cabin/opms-permission",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Frontend SDK for OPMS permission and auth management.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.mjs.js",
@@ -16,6 +16,11 @@
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
25
  "author": "",
21
26
  "license": "MIT",