libshv-js 3.3.2 → 3.3.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/ws-client.ts +5 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libshv-js",
3
- "version": "3.3.2",
3
+ "version": "3.3.3",
4
4
  "description": "Typescript implementation of libshv",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
package/src/ws-client.ts CHANGED
@@ -178,6 +178,7 @@ class WsClient {
178
178
  });
179
179
  }
180
180
 
181
+ callRpcMethod(shv_path: '.broker/currentClient', method: 'accessGrantForMethodCall', params: [string, string]): Promise<RpcResponse<string>>;
181
182
  callRpcMethod(shv_path: string | undefined, method: 'dir', params?: RpcValue): Promise<RpcResponse<DirResult>>;
182
183
  callRpcMethod(shv_path: string | undefined, method: 'ls', params?: RpcValue): Promise<RpcResponse<LsResult>>;
183
184
  callRpcMethod(shv_path: string | undefined, method: string, params?: RpcValue): Promise<RpcResponse>;
@@ -268,6 +269,10 @@ class WsClient {
268
269
  });
269
270
  }
270
271
 
272
+ accessGrantForMethodCall(path: string, method: string) {
273
+ return this.callRpcMethod('.broker/currentClient', 'accessGrantForMethodCall', [path, method]);
274
+ }
275
+
271
276
  close() {
272
277
  this.websocket.close();
273
278
  }