libshv-js 5.0.1 → 5.1.0

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.
@@ -217,6 +217,7 @@ declare class WsClient {
217
217
  private readonly timeout;
218
218
  constructor(options: WsClientOptions<MethodHandler>);
219
219
  callRpcMethod(shvPath: '.broker/currentClient', method: 'accessGrantForMethodCall', params: [string, string], delayCallback?: (progress: number) => void): RpcRequestPromise<ResultOrError<string>>;
220
+ callRpcMethod(shvPath: '.broker/currentClient', method: 'accessLevelForMethodCall', params: [string, string], delayCallback?: (progress: number) => void): RpcRequestPromise<ResultOrError<number>>;
220
221
  callRpcMethod(shvPath: string | undefined, method: 'dir', params?: RpcValue, delayCallback?: (progress: number) => void): RpcRequestPromise<ResultOrError<DirResult>>;
221
222
  callRpcMethod(shvPath: string | undefined, method: 'ls', params?: RpcValue, delayCallback?: (progress: number) => void): RpcRequestPromise<ResultOrError<LsResult>>;
222
223
  callRpcMethod(shvPath: string | undefined, method: string, params?: RpcValue, delayCallback?: (progress: number) => void): RpcRequestPromise<ResultOrError>;
@@ -225,6 +226,7 @@ declare class WsClient {
225
226
  unsubscribe(subscriber: string, pathGetter: StringGetter, method: string): Promise<void>;
226
227
  sendPing(): void;
227
228
  accessGrantForMethodCall(path: string, method: string): RpcRequestPromise<ResultOrError<string>>;
229
+ accessLevelForMethodCall(path: string, method: string): RpcRequestPromise<ResultOrError<number>>;
228
230
  close(): void;
229
231
  protected logDebug(...args: string[]): void;
230
232
  private workflowsProcedure;
package/dist/ws-client.js CHANGED
@@ -466,6 +466,9 @@ class WsClient {
466
466
  accessGrantForMethodCall(path, method) {
467
467
  return this.callRpcMethod('.broker/currentClient', 'accessGrantForMethodCall', [path, method]);
468
468
  }
469
+ accessLevelForMethodCall(path, method) {
470
+ return this.callRpcMethod('.broker/currentClient', 'accessLevelForMethodCall', [path, method]);
471
+ }
469
472
  close() {
470
473
  this.websocket.close();
471
474
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libshv-js",
3
- "version": "5.0.1",
3
+ "version": "5.1.0",
4
4
  "description": "Typescript implementation of libshv",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",