@awarevue/agent-sdk 1.0.2 → 1.0.3
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 +5 -11
- package/dist/agent.d.ts +2 -2
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/agent-app.js
CHANGED
|
@@ -99,17 +99,11 @@ class AgentApp {
|
|
|
99
99
|
const applyOb$ = !this.agent.applyAccessChange$
|
|
100
100
|
? (0, rxjs_1.throwError)(() => new Error(`Agent ${context.provider} does not support access change application`))
|
|
101
101
|
: this.agent.applyAccessChange$(context, message);
|
|
102
|
-
return applyOb$.pipe((0, rxjs_1.map)((result) =>
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
: {
|
|
109
|
-
kind: 'apply-change-complete',
|
|
110
|
-
requestId: message.id,
|
|
111
|
-
refs: result,
|
|
112
|
-
}), (0, rxjs_1.catchError)((error) => {
|
|
102
|
+
return applyOb$.pipe((0, rxjs_1.map)((result) => ({
|
|
103
|
+
kind: 'apply-change-complete',
|
|
104
|
+
requestId: message.id,
|
|
105
|
+
refs: result,
|
|
106
|
+
})), (0, rxjs_1.catchError)((error) => {
|
|
113
107
|
var _a;
|
|
114
108
|
return (0, rxjs_1.of)({
|
|
115
109
|
kind: 'error-rs',
|
package/dist/agent.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValidateProviderConfigRs, DeviceDiscoveryDto, RunCommandRq, AccessValidateChangeRq, AccessChangeIssue, AccessApplyChange } from '@awarevue/api-types';
|
|
1
|
+
import { ValidateProviderConfigRs, DeviceDiscoveryDto, RunCommandRq, AccessValidateChangeRq, AccessChangeIssue, AccessApplyChange, AccessRefMap } from '@awarevue/api-types';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { DeviceActivity } from './agent-app';
|
|
4
4
|
export type Context = {
|
|
@@ -15,5 +15,5 @@ export interface Agent {
|
|
|
15
15
|
run$: (context: RunContext) => Observable<DeviceActivity>;
|
|
16
16
|
runCommand$: (context: Context, command: RunCommandRq) => Observable<unknown>;
|
|
17
17
|
validateAccessChange$?: (context: Context, change: AccessValidateChangeRq) => Observable<AccessChangeIssue[]>;
|
|
18
|
-
applyAccessChange$?: (context: Context, change: AccessApplyChange) => Observable<
|
|
18
|
+
applyAccessChange$?: (context: Context, change: AccessApplyChange) => Observable<AccessRefMap>;
|
|
19
19
|
}
|
package/dist/package.json
CHANGED