node-opcua-client 2.97.0 → 2.98.1

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 (78) hide show
  1. package/dist/alarms_and_conditions/client_alarm.d.ts +49 -49
  2. package/dist/alarms_and_conditions/client_alarm.js +109 -109
  3. package/dist/alarms_and_conditions/client_alarm_list.d.ts +25 -25
  4. package/dist/alarms_and_conditions/client_alarm_list.js +97 -97
  5. package/dist/alarms_and_conditions/client_alarm_tools.d.ts +4 -4
  6. package/dist/alarms_and_conditions/client_alarm_tools.js +156 -156
  7. package/dist/alarms_and_conditions/client_alarm_tools_acknowledge_all_conditions.d.ts +18 -18
  8. package/dist/alarms_and_conditions/client_alarm_tools_acknowledge_all_conditions.js +192 -192
  9. package/dist/alarms_and_conditions/client_alarm_tools_dump_event.d.ts +9 -9
  10. package/dist/alarms_and_conditions/client_alarm_tools_dump_event.js +72 -72
  11. package/dist/alarms_and_conditions/client_alarm_tools_dump_event.js.map +1 -1
  12. package/dist/alarms_and_conditions/client_alarm_tools_extractConditionFields.d.ts +3 -3
  13. package/dist/alarms_and_conditions/client_alarm_tools_extractConditionFields.js +118 -118
  14. package/dist/alarms_and_conditions/client_tools.d.ts +7 -7
  15. package/dist/alarms_and_conditions/client_tools.js +179 -179
  16. package/dist/client_base.d.ts +277 -277
  17. package/dist/client_base.js +14 -14
  18. package/dist/client_base.js.map +1 -1
  19. package/dist/client_monitored_item.d.ts +21 -21
  20. package/dist/client_monitored_item.js +11 -11
  21. package/dist/client_monitored_item_base.d.ts +39 -39
  22. package/dist/client_monitored_item_base.js +2 -2
  23. package/dist/client_monitored_item_group.d.ts +21 -21
  24. package/dist/client_monitored_item_group.js +13 -13
  25. package/dist/client_monitored_item_toolbox.d.ts +15 -15
  26. package/dist/client_monitored_item_toolbox.js +116 -116
  27. package/dist/client_session.d.ts +529 -529
  28. package/dist/client_session.js +10 -10
  29. package/dist/client_session_keepalive_manager.d.ts +34 -34
  30. package/dist/client_session_keepalive_manager.js +149 -149
  31. package/dist/client_subscription.d.ts +241 -241
  32. package/dist/client_subscription.js +14 -14
  33. package/dist/client_subscription.js.map +1 -1
  34. package/dist/client_utils.d.ts +22 -22
  35. package/dist/client_utils.js +87 -87
  36. package/dist/common.d.ts +17 -17
  37. package/dist/common.js +5 -5
  38. package/dist/index.d.ts +56 -56
  39. package/dist/index.js +94 -94
  40. package/dist/opcua_client.d.ts +118 -118
  41. package/dist/opcua_client.js +33 -33
  42. package/dist/private/client_base_impl.d.ts +160 -160
  43. package/dist/private/client_base_impl.js +1348 -1348
  44. package/dist/private/client_monitored_item_base_impl.d.ts +3 -3
  45. package/dist/private/client_monitored_item_base_impl.js +4 -4
  46. package/dist/private/client_monitored_item_group_impl.d.ts +53 -53
  47. package/dist/private/client_monitored_item_group_impl.js +159 -159
  48. package/dist/private/client_monitored_item_impl.d.ts +93 -93
  49. package/dist/private/client_monitored_item_impl.js +304 -304
  50. package/dist/private/client_publish_engine.d.ts +62 -62
  51. package/dist/private/client_publish_engine.js +408 -408
  52. package/dist/private/client_publish_engine.js.map +1 -1
  53. package/dist/private/client_session_impl.d.ts +631 -631
  54. package/dist/private/client_session_impl.js +1348 -1348
  55. package/dist/private/client_subscription_impl.d.ts +93 -93
  56. package/dist/private/client_subscription_impl.js +763 -763
  57. package/dist/private/i_private_client.d.ts +21 -21
  58. package/dist/private/i_private_client.js +2 -2
  59. package/dist/private/opcua_client_impl.d.ts +166 -166
  60. package/dist/private/opcua_client_impl.js +1000 -1000
  61. package/dist/private/opcua_client_impl.js.map +1 -1
  62. package/dist/private/performance.d.ts +1 -1
  63. package/dist/private/performance.js +18 -18
  64. package/dist/reconnection.d.ts +9 -9
  65. package/dist/reconnection.js +381 -381
  66. package/dist/tools/findservers.d.ts +20 -20
  67. package/dist/tools/findservers.js +61 -61
  68. package/dist/tools/read_history_server_capabilities.d.ts +6 -6
  69. package/dist/tools/read_history_server_capabilities.js +98 -98
  70. package/dist/user_identity_info.d.ts +1 -1
  71. package/dist/user_identity_info.js +2 -2
  72. package/dist/verify.d.ts +5 -5
  73. package/dist/verify.js +134 -134
  74. package/package.json +49 -45
  75. package/source/alarms_and_conditions/client_alarm_tools_dump_event.ts +1 -1
  76. package/.nycrc.json +0 -14
  77. package/test_helpers/create_certificates.js +0 -1
  78. package/typedoc.js +0 -20
@@ -1,21 +1,21 @@
1
- import { ClientSecureChannelLayer } from "node-opcua-secure-channel";
2
- import { EndpointDescription } from "node-opcua-service-endpoints";
3
- import { IBasicTransportSettings } from "node-opcua-pseudo-session";
4
- import { ClientSession, ResponseCallback } from "../client_session";
5
- import { Request, Response } from "../common";
6
- import { UserIdentityInfo } from "../user_identity_info";
7
- import { ClientSessionImpl } from "./client_session_impl";
8
- export interface IClientBase {
9
- __createSession_step2(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
10
- _activateSession(session: ClientSessionImpl, userIdentity: UserIdentityInfo, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
11
- _removeSession(session: ClientSessionImpl): void;
12
- closeSession(session: ClientSession, deleteSubscription: any, arg2: (err?: Error | undefined) => void): void;
13
- performMessageTransaction(request: Request, callback: ResponseCallback<Response>): void;
14
- endpoint?: EndpointDescription;
15
- readonly isReconnecting: boolean;
16
- _secureChannel: ClientSecureChannelLayer | null;
17
- getSessions(): ClientSession[];
18
- endpointUrl: string;
19
- _sessions: ClientSessionImpl[];
20
- getTransportSettings(): IBasicTransportSettings;
21
- }
1
+ import { ClientSecureChannelLayer } from "node-opcua-secure-channel";
2
+ import { EndpointDescription } from "node-opcua-service-endpoints";
3
+ import { IBasicTransportSettings } from "node-opcua-pseudo-session";
4
+ import { ClientSession, ResponseCallback } from "../client_session";
5
+ import { Request, Response } from "../common";
6
+ import { UserIdentityInfo } from "../user_identity_info";
7
+ import { ClientSessionImpl } from "./client_session_impl";
8
+ export interface IClientBase {
9
+ __createSession_step2(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
10
+ _activateSession(session: ClientSessionImpl, userIdentity: UserIdentityInfo, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
11
+ _removeSession(session: ClientSessionImpl): void;
12
+ closeSession(session: ClientSession, deleteSubscription: any, arg2: (err?: Error | undefined) => void): void;
13
+ performMessageTransaction(request: Request, callback: ResponseCallback<Response>): void;
14
+ endpoint?: EndpointDescription;
15
+ readonly isReconnecting: boolean;
16
+ _secureChannel: ClientSecureChannelLayer | null;
17
+ getSessions(): ClientSession[];
18
+ endpointUrl: string;
19
+ _sessions: ClientSessionImpl[];
20
+ getTransportSettings(): IBasicTransportSettings;
21
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=i_private_client.js.map
@@ -1,166 +1,166 @@
1
- /**
2
- * @module node-opcua-client-private
3
- */
4
- import { EndpointDescription } from "node-opcua-service-endpoints";
5
- import { CallbackT, StatusCode } from "node-opcua-status-code";
6
- import { Callback } from "node-opcua-status-code";
7
- import { ClientSession } from "../client_session";
8
- import { ClientSubscription, ClientSubscriptionOptions } from "../client_subscription";
9
- import { OPCUAClient, OPCUAClientOptions, WithSessionFuncP, WithSubscriptionFuncP, EndpointWithUserIdentity } from "../opcua_client";
10
- import { UserIdentityInfo } from "../user_identity_info";
11
- import { ClientBaseImpl } from "./client_base_impl";
12
- import { ClientSessionImpl } from "./client_session_impl";
13
- /***
14
- * @constructor
15
- * @internal
16
- */
17
- export declare class OPCUAClientImpl extends ClientBaseImpl implements OPCUAClient {
18
- static minimumRevisedSessionTimeout: number;
19
- static create(options: OPCUAClientOptions): OPCUAClient;
20
- endpoint?: EndpointDescription;
21
- private endpointMustExist;
22
- private requestedSessionTimeout;
23
- private ___sessionName_counter;
24
- private serverUri?;
25
- private clientNonce?;
26
- constructor(options?: OPCUAClientOptions);
27
- /**
28
- * create and activate a new session
29
- * @async
30
- * @method createSession
31
- *
32
- *
33
- * @example
34
- * // create a anonymous session
35
- * const session = await client.createSession();
36
- *
37
- * @example
38
- * // create a session with a userName and password
39
- * const session = await client.createSession({
40
- * type: UserTokenType.UserName,
41
- * userName: "JoeDoe",
42
- * password:"secret"
43
- * });
44
- *
45
- */
46
- createSession(userIdentityInfo?: UserIdentityInfo): Promise<ClientSession>;
47
- createSession(userIdentityInfo: UserIdentityInfo, callback: Callback<ClientSession>): void;
48
- createSession(callback: Callback<ClientSession>): void;
49
- /**
50
- * createSession2 create a session with persistance
51
- *
52
- * - if the server returns BadTooManySession, the method will make an other attempt
53
- * unitl create session succeed or connection is closed.
54
- *
55
- * @experiemental
56
- * @param userIdentityInfo
57
- */
58
- createSession2(userIdentityInfo?: UserIdentityInfo): Promise<ClientSession>;
59
- createSession2(userIdentityInfo: UserIdentityInfo, callback: Callback<ClientSession>): void;
60
- createSession2(callback: Callback<ClientSession>): void;
61
- /**
62
- * @deprecated use session.changeUser instead
63
- */
64
- changeSessionIdentity(session: ClientSession, userIdentityInfo: UserIdentityInfo): Promise<StatusCode>;
65
- changeSessionIdentity(session: ClientSession, userIdentityInfo: UserIdentityInfo, callback: CallbackT<StatusCode>): void;
66
- /**
67
- *
68
- * @method closeSession
69
- * @async
70
- * @param session - the created client session
71
- * @param deleteSubscriptions - whether to delete subscriptions or not
72
- */
73
- closeSession(session: ClientSession, deleteSubscriptions: boolean): Promise<void>;
74
- closeSession(session: ClientSession, deleteSubscriptions: boolean, callback: (err?: Error) => void): void;
75
- toString(): string;
76
- /**
77
- *
78
- * @example
79
- *
80
- * ```javascript
81
- *
82
- * const session = await OPCUAClient.createSession(endpointUrl);
83
- * const dataValue = await session.read({ nodeId, attributeId: AttributeIds.Value });
84
- * await session.close();
85
- *
86
- * ```
87
- * @stability experimental
88
- *
89
- * @param endpointUrl
90
- * @param userIdentity
91
- * @returns session
92
- *
93
- *
94
- * const create
95
- */
96
- static createSession(endpointUrl: string, userIdentity?: UserIdentityInfo, clientOptions?: OPCUAClientOptions): Promise<ClientSession>;
97
- /**
98
- * @method withSession
99
- */
100
- withSession<T>(endpointUrl: string | EndpointWithUserIdentity, inner_func: (session: ClientSession) => Promise<T>): Promise<T>;
101
- withSession(endpointUrl: string | EndpointWithUserIdentity, inner_func: (session: ClientSession, done: (err?: Error) => void) => void, callback: (err?: Error) => void): void;
102
- withSubscription(endpointUrl: string | EndpointWithUserIdentity, subscriptionParameters: ClientSubscriptionOptions, innerFunc: (session: ClientSession, subscription: ClientSubscription, done: (err?: Error) => void) => void, callback: (err?: Error) => void): void;
103
- withSessionAsync(connectionPoint: string | EndpointWithUserIdentity, func: WithSessionFuncP<any>): Promise<any>;
104
- withSubscriptionAsync(connectionPoint: string | EndpointWithUserIdentity, parameters: ClientSubscriptionOptions, func: WithSubscriptionFuncP<any>): Promise<any>;
105
- /**
106
- * transfer session to this client
107
- * @method reactivateSession
108
- * @param session
109
- * @param callback
110
- * @return {*}
111
- */
112
- reactivateSession(session: ClientSession): Promise<void>;
113
- reactivateSession(session: ClientSession, callback: (err?: Error) => void): void;
114
- /**
115
- * @internal
116
- * @private
117
- */
118
- _on_connection_reestablished(callback: (err?: Error) => void): void;
119
- /**
120
- *
121
- * @internal
122
- * @private
123
- */
124
- __createSession_step3(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
125
- /**
126
- *
127
- * @internal
128
- * @private
129
- */
130
- __createSession_step2(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
131
- /**
132
- * @internal
133
- * @private
134
- */
135
- _activateSession(session: ClientSessionImpl, userIdentityInfo: UserIdentityInfo, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
136
- /**
137
- *
138
- * @private
139
- */
140
- private _nextSessionName;
141
- /**
142
- *
143
- * @private
144
- */
145
- private _getApplicationUri;
146
- /**
147
- *
148
- * @private
149
- */
150
- private __resolveEndPoint;
151
- /**
152
- *
153
- * @private
154
- */
155
- private _createSession;
156
- /**
157
- *
158
- * @private
159
- */
160
- private computeClientSignature;
161
- /**
162
- *
163
- * @private
164
- */
165
- private createUserIdentityToken;
166
- }
1
+ /**
2
+ * @module node-opcua-client-private
3
+ */
4
+ import { EndpointDescription } from "node-opcua-service-endpoints";
5
+ import { CallbackT, StatusCode } from "node-opcua-status-code";
6
+ import { Callback } from "node-opcua-status-code";
7
+ import { ClientSession } from "../client_session";
8
+ import { ClientSubscription, ClientSubscriptionOptions } from "../client_subscription";
9
+ import { OPCUAClient, OPCUAClientOptions, WithSessionFuncP, WithSubscriptionFuncP, EndpointWithUserIdentity } from "../opcua_client";
10
+ import { UserIdentityInfo } from "../user_identity_info";
11
+ import { ClientBaseImpl } from "./client_base_impl";
12
+ import { ClientSessionImpl } from "./client_session_impl";
13
+ /***
14
+ * @constructor
15
+ * @internal
16
+ */
17
+ export declare class OPCUAClientImpl extends ClientBaseImpl implements OPCUAClient {
18
+ static minimumRevisedSessionTimeout: number;
19
+ static create(options: OPCUAClientOptions): OPCUAClient;
20
+ endpoint?: EndpointDescription;
21
+ private endpointMustExist;
22
+ private requestedSessionTimeout;
23
+ private ___sessionName_counter;
24
+ private serverUri?;
25
+ private clientNonce?;
26
+ constructor(options?: OPCUAClientOptions);
27
+ /**
28
+ * create and activate a new session
29
+ * @async
30
+ * @method createSession
31
+ *
32
+ *
33
+ * @example
34
+ * // create a anonymous session
35
+ * const session = await client.createSession();
36
+ *
37
+ * @example
38
+ * // create a session with a userName and password
39
+ * const session = await client.createSession({
40
+ * type: UserTokenType.UserName,
41
+ * userName: "JoeDoe",
42
+ * password:"secret"
43
+ * });
44
+ *
45
+ */
46
+ createSession(userIdentityInfo?: UserIdentityInfo): Promise<ClientSession>;
47
+ createSession(userIdentityInfo: UserIdentityInfo, callback: Callback<ClientSession>): void;
48
+ createSession(callback: Callback<ClientSession>): void;
49
+ /**
50
+ * createSession2 create a session with persistance
51
+ *
52
+ * - if the server returns BadTooManySession, the method will make an other attempt
53
+ * unitl create session succeed or connection is closed.
54
+ *
55
+ * @experiemental
56
+ * @param userIdentityInfo
57
+ */
58
+ createSession2(userIdentityInfo?: UserIdentityInfo): Promise<ClientSession>;
59
+ createSession2(userIdentityInfo: UserIdentityInfo, callback: Callback<ClientSession>): void;
60
+ createSession2(callback: Callback<ClientSession>): void;
61
+ /**
62
+ * @deprecated use session.changeUser instead
63
+ */
64
+ changeSessionIdentity(session: ClientSession, userIdentityInfo: UserIdentityInfo): Promise<StatusCode>;
65
+ changeSessionIdentity(session: ClientSession, userIdentityInfo: UserIdentityInfo, callback: CallbackT<StatusCode>): void;
66
+ /**
67
+ *
68
+ * @method closeSession
69
+ * @async
70
+ * @param session - the created client session
71
+ * @param deleteSubscriptions - whether to delete subscriptions or not
72
+ */
73
+ closeSession(session: ClientSession, deleteSubscriptions: boolean): Promise<void>;
74
+ closeSession(session: ClientSession, deleteSubscriptions: boolean, callback: (err?: Error) => void): void;
75
+ toString(): string;
76
+ /**
77
+ *
78
+ * @example
79
+ *
80
+ * ```javascript
81
+ *
82
+ * const session = await OPCUAClient.createSession(endpointUrl);
83
+ * const dataValue = await session.read({ nodeId, attributeId: AttributeIds.Value });
84
+ * await session.close();
85
+ *
86
+ * ```
87
+ * @stability experimental
88
+ *
89
+ * @param endpointUrl
90
+ * @param userIdentity
91
+ * @returns session
92
+ *
93
+ *
94
+ * const create
95
+ */
96
+ static createSession(endpointUrl: string, userIdentity?: UserIdentityInfo, clientOptions?: OPCUAClientOptions): Promise<ClientSession>;
97
+ /**
98
+ * @method withSession
99
+ */
100
+ withSession<T>(endpointUrl: string | EndpointWithUserIdentity, inner_func: (session: ClientSession) => Promise<T>): Promise<T>;
101
+ withSession(endpointUrl: string | EndpointWithUserIdentity, inner_func: (session: ClientSession, done: (err?: Error) => void) => void, callback: (err?: Error) => void): void;
102
+ withSubscription(endpointUrl: string | EndpointWithUserIdentity, subscriptionParameters: ClientSubscriptionOptions, innerFunc: (session: ClientSession, subscription: ClientSubscription, done: (err?: Error) => void) => void, callback: (err?: Error) => void): void;
103
+ withSessionAsync(connectionPoint: string | EndpointWithUserIdentity, func: WithSessionFuncP<any>): Promise<any>;
104
+ withSubscriptionAsync(connectionPoint: string | EndpointWithUserIdentity, parameters: ClientSubscriptionOptions, func: WithSubscriptionFuncP<any>): Promise<any>;
105
+ /**
106
+ * transfer session to this client
107
+ * @method reactivateSession
108
+ * @param session
109
+ * @param callback
110
+ * @return {*}
111
+ */
112
+ reactivateSession(session: ClientSession): Promise<void>;
113
+ reactivateSession(session: ClientSession, callback: (err?: Error) => void): void;
114
+ /**
115
+ * @internal
116
+ * @private
117
+ */
118
+ _on_connection_reestablished(callback: (err?: Error) => void): void;
119
+ /**
120
+ *
121
+ * @internal
122
+ * @private
123
+ */
124
+ __createSession_step3(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
125
+ /**
126
+ *
127
+ * @internal
128
+ * @private
129
+ */
130
+ __createSession_step2(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
131
+ /**
132
+ * @internal
133
+ * @private
134
+ */
135
+ _activateSession(session: ClientSessionImpl, userIdentityInfo: UserIdentityInfo, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
136
+ /**
137
+ *
138
+ * @private
139
+ */
140
+ private _nextSessionName;
141
+ /**
142
+ *
143
+ * @private
144
+ */
145
+ private _getApplicationUri;
146
+ /**
147
+ *
148
+ * @private
149
+ */
150
+ private __resolveEndPoint;
151
+ /**
152
+ *
153
+ * @private
154
+ */
155
+ private _createSession;
156
+ /**
157
+ *
158
+ * @private
159
+ */
160
+ private computeClientSignature;
161
+ /**
162
+ *
163
+ * @private
164
+ */
165
+ private createUserIdentityToken;
166
+ }