@laboratory-one/api-components 0.0.32 → 0.0.34

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laboratory-one/api-components",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "description": "API components for Laboratory One",
5
5
  "author": "Laboratory One",
6
6
  "private": false,
@@ -30,6 +30,9 @@ export const mapPermissionToAbility = (
30
30
  case ACTIONS.DELETE:
31
31
  return { action: ACTIONS.DELETE, subject };
32
32
 
33
+ case ACTIONS.ADMIN:
34
+ return { action: ACTIONS.ADMIN, subject };
35
+
33
36
  default:
34
37
  throw new Error(`Invalid permission: ${permission}`);
35
38
  }
@@ -4,6 +4,7 @@ export const ACTIONS = {
4
4
  READ: 'read',
5
5
  UPDATE: 'update',
6
6
  DELETE: 'delete',
7
+ ADMIN: 'admin',
7
8
  } as const;
8
9
 
9
10
  export type Action = (typeof ACTIONS)[keyof typeof ACTIONS];