@awarevue/agent-sdk 1.0.33 → 1.0.35

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.
@@ -8,15 +8,21 @@ const createValidator = (agent) => {
8
8
  // check object ref contains all related objects
9
9
  const personIds = [
10
10
  ...new Set(req.mutations.flatMap((m) => {
11
- var _a;
11
+ var _a, _b, _c;
12
12
  return m.kind === 'merge' && m.objectKind === 'accessRule'
13
- ? ((_a = m.props.appliedTo) !== null && _a !== void 0 ? _a : [])
13
+ ? [...((_a = m.props.appliedTo) !== null && _a !== void 0 ? _a : []), ...((_c = (_b = m.original) === null || _b === void 0 ? void 0 : _b.appliedTo) !== null && _c !== void 0 ? _c : [])]
14
14
  : [];
15
15
  })),
16
16
  ];
17
17
  const scheduleIds = [
18
18
  ...new Set(req.mutations.flatMap((m) => m.kind === 'merge' && m.objectKind === 'accessRule'
19
19
  ? [
20
+ ...(m.original === null
21
+ ? []
22
+ : m.original.permissions.map((p) => p.scheduleId)),
23
+ ...(m.original === null
24
+ ? []
25
+ : m.original.groupPermissions.map((p) => p.scheduleId)),
20
26
  ...(m.props.permissions || []).map((p) => p.scheduleId),
21
27
  ...(m.props.groupPermissions || []).map((p) => p.scheduleId),
22
28
  ]
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awarevue/agent-sdk",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
4
4
  "description": "SDK for building Agent implementations that speak the Aware protocol.",
5
5
  "author": "Yaser Awajan",
6
6
  "license": "MIT",
@@ -27,7 +27,7 @@
27
27
  "lint:fix": "yarn lint --fix"
28
28
  },
29
29
  "dependencies": {
30
- "@awarevue/api-types": "^1.0.33",
30
+ "@awarevue/api-types": "^1.0.35",
31
31
  "rxjs": "^7.8.2",
32
32
  "ws": "^8",
33
33
  "zod": "3.24.2"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awarevue/agent-sdk",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
4
4
  "description": "SDK for building Agent implementations that speak the Aware protocol.",
5
5
  "author": "Yaser Awajan",
6
6
  "license": "MIT",
@@ -27,7 +27,7 @@
27
27
  "lint:fix": "yarn lint --fix"
28
28
  },
29
29
  "dependencies": {
30
- "@awarevue/api-types": "^1.0.33",
30
+ "@awarevue/api-types": "^1.0.35",
31
31
  "rxjs": "^7.8.2",
32
32
  "ws": "^8",
33
33
  "zod": "3.24.2"