node-opcua-address-space-base 2.168.0 → 2.169.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.
- package/dist/session_context.d.ts +20 -12
- package/dist/session_context.js.map +1 -1
- package/package.json +14 -14
- package/source/session_context.ts +23 -14
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Certificate } from "node-opcua-crypto/web";
|
|
2
|
-
import { DataValue } from "node-opcua-data-value";
|
|
3
|
-
import { PreciseClock } from "node-opcua-date-time";
|
|
4
|
-
import { NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { UAObject } from "./ua_object";
|
|
10
|
-
import { UAObjectType } from "./ua_object_type";
|
|
1
|
+
import type { Certificate } from "node-opcua-crypto/web";
|
|
2
|
+
import type { DataValue } from "node-opcua-data-value";
|
|
3
|
+
import type { PreciseClock } from "node-opcua-date-time";
|
|
4
|
+
import type { NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
5
|
+
import type { StatusCode } from "node-opcua-status-code";
|
|
6
|
+
import type { MessageSecurityMode, PermissionType, ReferenceDescription, UserIdentityToken } from "node-opcua-types";
|
|
7
|
+
import type { BaseNode } from "./base_node";
|
|
8
|
+
import type { ContinuationPoint } from "./continuation_point";
|
|
9
|
+
import type { UAObject } from "./ua_object";
|
|
10
|
+
import type { UAObjectType } from "./ua_object_type";
|
|
11
11
|
export declare function getContextMaxMessageSize(context: ISessionContext): number;
|
|
12
12
|
export interface ITransportSettings {
|
|
13
13
|
maxMessageSize: number;
|
|
@@ -46,6 +46,8 @@ export interface ContinuationPointData {
|
|
|
46
46
|
export interface ISessionContext {
|
|
47
47
|
/** The underlying OPC UA session, if available. */
|
|
48
48
|
readonly session?: ISessionBase;
|
|
49
|
+
/** Returns the user name of the current user. */
|
|
50
|
+
getUserName(): string;
|
|
49
51
|
/** Returns the NodeIds of all roles assigned to the current user. */
|
|
50
52
|
getCurrentUserRoles(): NodeId[];
|
|
51
53
|
/** Check whether the current user has the given permission on a node. */
|
|
@@ -60,8 +62,6 @@ export interface ISessionContext {
|
|
|
60
62
|
object?: UAObject | UAObjectType;
|
|
61
63
|
/** Server timestamp at the time the request was received. */
|
|
62
64
|
currentTime?: PreciseClock;
|
|
63
|
-
/** Display name of the authenticated user (e.g. "anonymous"). */
|
|
64
|
-
readonly userIdentity?: string;
|
|
65
65
|
/**
|
|
66
66
|
* The client's application-instance certificate,
|
|
67
67
|
* or `null` if no secure channel is available.
|
|
@@ -73,4 +73,12 @@ export interface ISessionContext {
|
|
|
73
73
|
* unavailable.
|
|
74
74
|
*/
|
|
75
75
|
readonly clientApplicationUri: string | null;
|
|
76
|
+
/**
|
|
77
|
+
* Returns a JSON representation of the context
|
|
78
|
+
*/
|
|
79
|
+
toJSON(): Record<string, string | null>;
|
|
80
|
+
/**
|
|
81
|
+
* Returns a string representation of the context
|
|
82
|
+
*/
|
|
83
|
+
toString(): string;
|
|
76
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session_context.js","sourceRoot":"","sources":["../source/session_context.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"session_context.js","sourceRoot":"","sources":["../source/session_context.ts"],"names":[],"mappings":";;AAWA,4DAIC;AAJD,SAAgB,wBAAwB,CAAC,OAAwB;IAC7D,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,oBAAoB;QAAE,OAAO,CAAC,CAAC;IAC9D,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAC3D,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;AACpC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-address-space-base",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.169.0",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module address-space-base",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -18,20 +18,20 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"node-opcua-assert": "2.164.0",
|
|
21
|
-
"node-opcua-basic-types": "2.
|
|
21
|
+
"node-opcua-basic-types": "2.169.0",
|
|
22
22
|
"node-opcua-constants": "2.157.0",
|
|
23
|
-
"node-opcua-crypto": "5.3.
|
|
24
|
-
"node-opcua-data-model": "2.
|
|
25
|
-
"node-opcua-data-value": "2.
|
|
26
|
-
"node-opcua-date-time": "2.
|
|
23
|
+
"node-opcua-crypto": "5.3.5",
|
|
24
|
+
"node-opcua-data-model": "2.169.0",
|
|
25
|
+
"node-opcua-data-value": "2.169.0",
|
|
26
|
+
"node-opcua-date-time": "2.169.0",
|
|
27
27
|
"node-opcua-debug": "2.168.0",
|
|
28
|
-
"node-opcua-extension-object": "2.
|
|
29
|
-
"node-opcua-nodeid": "2.
|
|
30
|
-
"node-opcua-numeric-range": "2.
|
|
31
|
-
"node-opcua-schemas": "2.
|
|
32
|
-
"node-opcua-status-code": "2.
|
|
33
|
-
"node-opcua-types": "2.
|
|
34
|
-
"node-opcua-variant": "2.
|
|
28
|
+
"node-opcua-extension-object": "2.169.0",
|
|
29
|
+
"node-opcua-nodeid": "2.169.0",
|
|
30
|
+
"node-opcua-numeric-range": "2.169.0",
|
|
31
|
+
"node-opcua-schemas": "2.169.0",
|
|
32
|
+
"node-opcua-status-code": "2.169.0",
|
|
33
|
+
"node-opcua-types": "2.169.0",
|
|
34
|
+
"node-opcua-variant": "2.169.0"
|
|
35
35
|
},
|
|
36
36
|
"author": "Etienne Rossignon",
|
|
37
37
|
"license": "MIT",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"internet of things"
|
|
49
49
|
],
|
|
50
50
|
"homepage": "http://node-opcua.github.io/",
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "82d570d3e95bea689cbbe30096279885c5282245",
|
|
52
52
|
"files": [
|
|
53
53
|
"dist",
|
|
54
54
|
"source"
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { Certificate } from "node-opcua-crypto/web";
|
|
2
|
-
import { DataValue } from "node-opcua-data-value";
|
|
3
|
-
import { PreciseClock } from "node-opcua-date-time";
|
|
4
|
-
import { NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
import { ContinuationPoint } from "./continuation_point";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { UAObjectType } from "./ua_object_type";
|
|
1
|
+
import type { Certificate } from "node-opcua-crypto/web";
|
|
2
|
+
import type { DataValue } from "node-opcua-data-value";
|
|
3
|
+
import type { PreciseClock } from "node-opcua-date-time";
|
|
4
|
+
import type { NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
5
|
+
import type { StatusCode } from "node-opcua-status-code";
|
|
6
|
+
import type { MessageSecurityMode, PermissionType, ReferenceDescription, UserIdentityToken } from "node-opcua-types";
|
|
7
|
+
import type { BaseNode } from "./base_node";
|
|
8
|
+
import type { ContinuationPoint } from "./continuation_point";
|
|
9
|
+
import type { UAObject } from "./ua_object";
|
|
10
|
+
import type { UAObjectType } from "./ua_object_type";
|
|
12
11
|
|
|
13
12
|
export function getContextMaxMessageSize(context: ISessionContext): number {
|
|
14
13
|
if (!context.session?.channel?.getTransportSettings) return 0;
|
|
@@ -67,6 +66,9 @@ export interface ISessionContext {
|
|
|
67
66
|
/** The underlying OPC UA session, if available. */
|
|
68
67
|
readonly session?: ISessionBase;
|
|
69
68
|
|
|
69
|
+
/** Returns the user name of the current user. */
|
|
70
|
+
getUserName(): string;
|
|
71
|
+
|
|
70
72
|
/** Returns the NodeIds of all roles assigned to the current user. */
|
|
71
73
|
getCurrentUserRoles(): NodeId[];
|
|
72
74
|
|
|
@@ -88,9 +90,6 @@ export interface ISessionContext {
|
|
|
88
90
|
/** Server timestamp at the time the request was received. */
|
|
89
91
|
currentTime?: PreciseClock;
|
|
90
92
|
|
|
91
|
-
/** Display name of the authenticated user (e.g. "anonymous"). */
|
|
92
|
-
readonly userIdentity?: string;
|
|
93
|
-
|
|
94
93
|
/**
|
|
95
94
|
* The client's application-instance certificate,
|
|
96
95
|
* or `null` if no secure channel is available.
|
|
@@ -103,4 +102,14 @@ export interface ISessionContext {
|
|
|
103
102
|
* unavailable.
|
|
104
103
|
*/
|
|
105
104
|
readonly clientApplicationUri: string | null;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Returns a JSON representation of the context
|
|
108
|
+
*/
|
|
109
|
+
toJSON(): Record<string, string | null>;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Returns a string representation of the context
|
|
113
|
+
*/
|
|
114
|
+
toString(): string;
|
|
106
115
|
}
|