skyllful-auth-integration 1.0.2 → 1.0.4

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/README.md CHANGED
@@ -14,7 +14,7 @@ npm install skyllful-auth-integration
14
14
  import { getUserInfo } from 'skyllful-auth-integration';
15
15
 
16
16
  // In browser environment
17
- // Current URL: https://app.example.com/?userId=456&firstName=Jane&lastName=Smith&permissions=simulator,iq
17
+ // Current URL: https://app.example.com/?userId=456&firstName=Jane&lastName=Smith&permissions=simulator,iq,admin
18
18
  const userInfo = await getUserInfo();
19
19
 
20
20
  console.log(userInfo);
@@ -24,7 +24,8 @@ console.log(userInfo);
24
24
  // lastName: 'Smith',
25
25
  // hasSimulatorPermission: true,
26
26
  // hasIqPermission: true,
27
- // hasStudioPermission: false
27
+ // hasStudioPermission: false,
28
+ // hasAdminPermission: true
28
29
  // }
29
30
  ```
30
31
 
@@ -49,6 +50,7 @@ Get user information from the current browser URL.
49
50
  - `hasSimulatorPermission` (boolean): True if `permissions` includes "simulator"
50
51
  - `hasIqPermission` (boolean): True if `permissions` includes "iq"
51
52
  - `hasStudioPermission` (boolean): True if `permissions` includes "studio"
53
+ - `hasAdminPermission` (boolean): True if `permissions` includes "admin"
52
54
 
53
55
  **Note:** This function only works in browser environments and will throw an error in Node.js.
54
56
 
@@ -56,7 +58,7 @@ Get user information from the current browser URL.
56
58
  - `userId` - The user ID
57
59
  - `firstName` - The user's first name
58
60
  - `lastName` - The user's last name
59
- - `permissions` - Comma-separated list of permissions (e.g., `simulator,iq,studio`)
61
+ - `permissions` - Comma-separated list of permissions (e.g., `simulator,iq,studio,admin`)
60
62
 
61
63
  ## TypeScript
62
64
 
@@ -70,6 +72,7 @@ interface UserInfo {
70
72
  hasSimulatorPermission: boolean;
71
73
  hasIqPermission: boolean;
72
74
  hasStudioPermission: boolean;
75
+ hasAdminPermission: boolean;
73
76
  }
74
77
  ```
75
78
 
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export interface UserInfo {
5
5
  hasSimulatorPermission: boolean;
6
6
  hasIqPermission: boolean;
7
7
  hasStudioPermission: boolean;
8
+ hasAdminPermission: boolean;
8
9
  }
9
10
  /**
10
11
  * Get user information from the current browser URL
package/dist/index.js CHANGED
@@ -109,7 +109,8 @@ async function getUserInfo() {
109
109
  lastName,
110
110
  hasSimulatorPermission: permissions.includes('simulator'),
111
111
  hasIqPermission: permissions.includes('iq'),
112
- hasStudioPermission: permissions.includes('studio')
112
+ hasStudioPermission: permissions.includes('studio'),
113
+ hasAdminPermission: permissions.includes('admin')
113
114
  };
114
115
  }
115
116
  exports.default = getUserInfo;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skyllful-auth-integration",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Parse authentication parameters from URL and extract user information",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",