@awarevue/agent-sdk 1.0.35 → 1.0.36

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/agent-app.js CHANGED
@@ -113,7 +113,6 @@ class AgentApp {
113
113
  return issues.length > 0
114
114
  ? (0, rxjs_1.of)(issues)
115
115
  : this.agent.validateAccessChange$(validationContext, message);
116
- return (0, rxjs_1.of)(issues);
117
116
  }));
118
117
  return validateOb$.pipe((0, rxjs_1.map)((issues) => ({
119
118
  kind: 'validate-change-rs',
@@ -28,8 +28,8 @@ const createValidator = (agent) => {
28
28
  ]
29
29
  : [])),
30
30
  ];
31
- const notFoundPersonIds = personIds.filter((p) => !req.refMap['person'][p]);
32
- const notFoundScheduleIds = scheduleIds.filter((s) => !req.refMap['schedule'][s]);
31
+ const notFoundPersonIds = personIds.filter((p) => !req.refMap['person'][p] || !req.refMap['person'][p].length);
32
+ const notFoundScheduleIds = scheduleIds.filter((s) => !req.refMap['schedule'][s] || !req.refMap['schedule'][s].length);
33
33
  return [
34
34
  ...notFoundPersonIds.map((id) => ({
35
35
  code: 'NOT_FOUND',
@@ -45,7 +45,15 @@ const createValidator = (agent) => {
45
45
  };
46
46
  const getBadReferenceIssues$ = (context, req) => {
47
47
  if (!agent.find$)
48
- return [];
48
+ return (0, rxjs_1.of)([
49
+ [],
50
+ {
51
+ person: emptyMap,
52
+ schedule: emptyMap,
53
+ accessRule: emptyMap,
54
+ zone: emptyMap,
55
+ },
56
+ ]);
49
57
  const personIds = Object.entries(req.refMap['person'] || {}).flatMap(([objectId, refs]) => refs.map((ref) => ({ objectId, ref })));
50
58
  const scheduleIds = Object.entries(req.refMap['schedule'] || {}).flatMap(([objectId, refs]) => refs.map((ref) => ({ objectId, ref })));
51
59
  const ruleIds = Object.entries(req.refMap['accessRule'] || {}).flatMap(([objectId, refs]) => refs.map((ref) => ({ objectId, ref })));
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awarevue/agent-sdk",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
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.35",
30
+ "@awarevue/api-types": "^1.0.36",
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.35",
3
+ "version": "1.0.36",
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.35",
30
+ "@awarevue/api-types": "^1.0.36",
31
31
  "rxjs": "^7.8.2",
32
32
  "ws": "^8",
33
33
  "zod": "3.24.2"