node-opcua-factory 2.76.0 → 2.76.2

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 (66) hide show
  1. package/dist/base_ua_object.d.ts +53 -53
  2. package/dist/base_ua_object.js +535 -535
  3. package/dist/basic_type.d.ts +40 -40
  4. package/dist/basic_type.js +118 -118
  5. package/dist/builtin_types.d.ts +46 -46
  6. package/dist/builtin_types.js +283 -283
  7. package/dist/builtin_types_special.d.ts +5 -5
  8. package/dist/builtin_types_special.js +45 -45
  9. package/dist/constructor_type.d.ts +15 -0
  10. package/dist/constructor_type.js +3 -0
  11. package/dist/constructor_type.js.map +1 -0
  12. package/dist/datatype_factory.d.ts +36 -36
  13. package/dist/datatype_factory.js +307 -307
  14. package/dist/encode_decode.d.ts +9 -9
  15. package/dist/encode_decode.js +39 -39
  16. package/dist/enumerations.d.ts +32 -32
  17. package/dist/enumerations.js +77 -77
  18. package/dist/factories_baseobject.d.ts +56 -0
  19. package/dist/factories_baseobject.js +535 -0
  20. package/dist/factories_baseobject.js.map +1 -0
  21. package/dist/factories_basic_type.d.ts +40 -0
  22. package/dist/factories_basic_type.js +136 -0
  23. package/dist/factories_basic_type.js.map +1 -0
  24. package/dist/factories_builtin_types.d.ts +32 -0
  25. package/dist/factories_builtin_types.js +262 -0
  26. package/dist/factories_builtin_types.js.map +1 -0
  27. package/dist/factories_builtin_types_special.d.ts +5 -0
  28. package/dist/factories_builtin_types_special.js +46 -0
  29. package/dist/factories_builtin_types_special.js.map +1 -0
  30. package/dist/factories_enumerations.d.ts +31 -0
  31. package/dist/factories_enumerations.js +78 -0
  32. package/dist/factories_enumerations.js.map +1 -0
  33. package/dist/factories_factories.d.ts +17 -0
  34. package/dist/factories_factories.js +54 -0
  35. package/dist/factories_factories.js.map +1 -0
  36. package/dist/factories_id_generator.d.ts +3 -0
  37. package/dist/factories_id_generator.js +22 -0
  38. package/dist/factories_id_generator.js.map +1 -0
  39. package/dist/factories_schema_helpers.d.ts +27 -0
  40. package/dist/factories_schema_helpers.js +122 -0
  41. package/dist/factories_schema_helpers.js.map +1 -0
  42. package/dist/factories_structuredTypeSchema.d.ts +45 -0
  43. package/dist/factories_structuredTypeSchema.js +277 -0
  44. package/dist/factories_structuredTypeSchema.js.map +1 -0
  45. package/dist/get_built_in_type.js +1 -1
  46. package/dist/get_standard_data_type_factory.d.ts +12 -12
  47. package/dist/get_standard_data_type_factory.js +34 -34
  48. package/dist/get_structured_type_schema.d.ts +4 -4
  49. package/dist/get_structured_type_schema.js +12 -12
  50. package/dist/id_generator.d.ts +3 -3
  51. package/dist/id_generator.js +21 -21
  52. package/dist/index.d.ts +18 -18
  53. package/dist/index.js +34 -34
  54. package/dist/nodeid_type.d.ts +13 -13
  55. package/dist/nodeid_type.js +18 -18
  56. package/dist/parameters.d.ts +3 -3
  57. package/dist/parameters.js +6 -6
  58. package/dist/register_class_definition.d.ts +3 -3
  59. package/dist/register_class_definition.js +8 -8
  60. package/dist/schema_helpers.d.ts +24 -24
  61. package/dist/schema_helpers.js +99 -99
  62. package/dist/structured_type_schema.d.ts +44 -44
  63. package/dist/structured_type_schema.js +278 -278
  64. package/dist/types.d.ts +151 -151
  65. package/dist/types.js +9 -9
  66. package/package.json +9 -9
package/dist/types.d.ts CHANGED
@@ -1,151 +1,151 @@
1
- /**
2
- * @module node-opcua-factory
3
- */
4
- import { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream";
5
- import { Enum } from "node-opcua-enum";
6
- import { ExpandedNodeId, NodeId } from "node-opcua-nodeid";
7
- export declare enum FieldCategory {
8
- enumeration = "enumeration",
9
- complex = "complex",
10
- basic = "basic"
11
- }
12
- export interface CommonInterface {
13
- name: string;
14
- defaultValue?: any;
15
- encode?: (value: any, stream: OutputBinaryStream) => void;
16
- decode?: (stream: BinaryStream) => any;
17
- coerce?: (value: any) => any;
18
- toJSON?: (value: any) => any;
19
- category: FieldCategory;
20
- random?: () => any;
21
- validate?: (value: any) => void;
22
- computer_default_value(defaultValue: any): any;
23
- subType: string;
24
- isAbstract: boolean;
25
- isSubTypeOf(type: CommonInterface): boolean;
26
- }
27
- export interface FieldInterfaceOptions {
28
- name: string;
29
- defaultValue?: any | DefaultValueFunc;
30
- fieldType: string;
31
- isArray?: boolean;
32
- documentation?: string;
33
- category?: FieldCategory;
34
- schema?: CommonInterface;
35
- switchBit?: number;
36
- switchValue?: number;
37
- allowSubType?: boolean;
38
- dataType?: NodeId;
39
- basicDataType?: number;
40
- }
41
- export declare type Func1<T> = (value: any, field: StructuredTypeField, data: T, args?: any) => void;
42
- export interface DecodeDebugOptions {
43
- tracer: any;
44
- name: string;
45
- }
46
- export interface IBaseUAObject {
47
- schema: IStructuredTypeSchema;
48
- encode(stream: OutputBinaryStream): void;
49
- decode(stream: BinaryStream): void;
50
- binaryStoreSize(): number;
51
- toString(...args: any[]): string;
52
- isValid(): boolean;
53
- explore(): string;
54
- applyOnAllFields<T>(func: Func1<T>, data: T): void;
55
- toJSON(): any;
56
- decodeDebug(stream: BinaryStream, options: DecodeDebugOptions): void;
57
- clone(): IBaseUAObject;
58
- }
59
- declare type BaseUAObjectConstructable = new (options?: any) => IBaseUAObject;
60
- export declare type ConstructorFunc = BaseUAObjectConstructable;
61
- export interface ConstructorFuncWithSchema extends ConstructorFunc {
62
- schema: IStructuredTypeSchema;
63
- possibleFields: string[];
64
- encodingDefaultBinary: ExpandedNodeId;
65
- encodingDefaultXml: ExpandedNodeId;
66
- encodingDefaultJson?: ExpandedNodeId;
67
- }
68
- export interface StructuredTypeField {
69
- name: string;
70
- originalName: string;
71
- fieldType: string;
72
- isArray?: boolean;
73
- documentation?: string;
74
- category: FieldCategory;
75
- defaultValue?: any | DefaultValueFunc;
76
- schema: CommonInterface;
77
- switchBit?: number;
78
- switchValue?: number;
79
- allowSubType?: boolean;
80
- dataType?: NodeId;
81
- basicDataType?: number;
82
- fieldTypeConstructor?: ConstructorFunc;
83
- subType?: string;
84
- validate?: (value: any) => boolean;
85
- decode?: (stream: BinaryStream) => any;
86
- }
87
- export interface FieldEnumeration extends StructuredTypeField {
88
- }
89
- export interface FieldComplex extends StructuredTypeField {
90
- }
91
- export interface FieldBasic extends StructuredTypeField {
92
- }
93
- export declare type FieldType = FieldEnumeration | FieldComplex | FieldBasic;
94
- export declare type DefaultValueFunc = () => any;
95
- export interface StructuredTypeOptions {
96
- name: string;
97
- id?: number | NodeId;
98
- fields: FieldInterfaceOptions[];
99
- documentation?: string;
100
- baseType: string;
101
- _resolved?: boolean;
102
- bitFields?: any[];
103
- base?: StructuredTypeOptions;
104
- }
105
- export interface TypeSchemaConstructorOptions {
106
- name: string;
107
- subType?: string;
108
- isAbstract?: boolean;
109
- category?: FieldCategory;
110
- defaultValue?: any;
111
- encode?: (value: any, stream: OutputBinaryStream) => void;
112
- decode?: (stream: BinaryStream) => any;
113
- coerce?: (value: any) => any;
114
- }
115
- export interface BasicTypeDefinitionOptionsB extends TypeSchemaConstructorOptions {
116
- toJSON?: (value: any) => any;
117
- random?: () => any;
118
- validate?: (value: any) => void;
119
- }
120
- export interface BasicTypeDefinitionOptionsBase extends BasicTypeDefinitionOptionsB {
121
- }
122
- export interface BasicTypeDefinitionOptions extends BasicTypeDefinitionOptionsB {
123
- subType: string;
124
- }
125
- export interface BasicTypeDefinition extends CommonInterface {
126
- subType: string;
127
- }
128
- export interface BuiltInTypeDefinition extends BasicTypeDefinition {
129
- }
130
- export interface EnumerationDefinition extends CommonInterface {
131
- typedEnum: Enum;
132
- documentation?: string;
133
- }
134
- export declare type TypeDefinition = BuiltInTypeDefinition | EnumerationDefinition | BasicTypeDefinition | CommonInterface;
135
- export interface IStructuredTypeSchema extends CommonInterface {
136
- fields: FieldType[];
137
- id: NodeId;
138
- dataTypeNodeId: NodeId;
139
- baseType: string;
140
- _possibleFields: string[];
141
- _baseSchema: IStructuredTypeSchema | null;
142
- documentation?: string;
143
- isValid?: (options: any) => boolean;
144
- decodeDebug?: (stream: BinaryStream, options: any) => any;
145
- constructHook?: (options: any) => any;
146
- encodingDefaultBinary?: ExpandedNodeId;
147
- encodingDefaultXml?: ExpandedNodeId;
148
- encodingDefaultJson?: ExpandedNodeId;
149
- bitFields?: any[];
150
- }
151
- export {};
1
+ /**
2
+ * @module node-opcua-factory
3
+ */
4
+ import { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream";
5
+ import { Enum } from "node-opcua-enum";
6
+ import { ExpandedNodeId, NodeId } from "node-opcua-nodeid";
7
+ export declare enum FieldCategory {
8
+ enumeration = "enumeration",
9
+ complex = "complex",
10
+ basic = "basic"
11
+ }
12
+ export interface CommonInterface {
13
+ name: string;
14
+ defaultValue?: any;
15
+ encode?: (value: any, stream: OutputBinaryStream) => void;
16
+ decode?: (stream: BinaryStream) => any;
17
+ coerce?: (value: any) => any;
18
+ toJSON?: (value: any) => any;
19
+ category: FieldCategory;
20
+ random?: () => any;
21
+ validate?: (value: any) => void;
22
+ computer_default_value(defaultValue: any): any;
23
+ subType: string;
24
+ isAbstract: boolean;
25
+ isSubTypeOf(type: CommonInterface): boolean;
26
+ }
27
+ export interface FieldInterfaceOptions {
28
+ name: string;
29
+ defaultValue?: any | DefaultValueFunc;
30
+ fieldType: string;
31
+ isArray?: boolean;
32
+ documentation?: string;
33
+ category?: FieldCategory;
34
+ schema?: CommonInterface;
35
+ switchBit?: number;
36
+ switchValue?: number;
37
+ allowSubType?: boolean;
38
+ dataType?: NodeId;
39
+ basicDataType?: number;
40
+ }
41
+ export declare type Func1<T> = (value: any, field: StructuredTypeField, data: T, args?: any) => void;
42
+ export interface DecodeDebugOptions {
43
+ tracer: any;
44
+ name: string;
45
+ }
46
+ export interface IBaseUAObject {
47
+ schema: IStructuredTypeSchema;
48
+ encode(stream: OutputBinaryStream): void;
49
+ decode(stream: BinaryStream): void;
50
+ binaryStoreSize(): number;
51
+ toString(...args: any[]): string;
52
+ isValid(): boolean;
53
+ explore(): string;
54
+ applyOnAllFields<T>(func: Func1<T>, data: T): void;
55
+ toJSON(): any;
56
+ decodeDebug(stream: BinaryStream, options: DecodeDebugOptions): void;
57
+ clone(): IBaseUAObject;
58
+ }
59
+ declare type BaseUAObjectConstructable = new (options?: any) => IBaseUAObject;
60
+ export declare type ConstructorFunc = BaseUAObjectConstructable;
61
+ export interface ConstructorFuncWithSchema extends ConstructorFunc {
62
+ schema: IStructuredTypeSchema;
63
+ possibleFields: string[];
64
+ encodingDefaultBinary: ExpandedNodeId;
65
+ encodingDefaultXml: ExpandedNodeId;
66
+ encodingDefaultJson?: ExpandedNodeId;
67
+ }
68
+ export interface StructuredTypeField {
69
+ name: string;
70
+ originalName: string;
71
+ fieldType: string;
72
+ isArray?: boolean;
73
+ documentation?: string;
74
+ category: FieldCategory;
75
+ defaultValue?: any | DefaultValueFunc;
76
+ schema: CommonInterface;
77
+ switchBit?: number;
78
+ switchValue?: number;
79
+ allowSubType?: boolean;
80
+ dataType?: NodeId;
81
+ basicDataType?: number;
82
+ fieldTypeConstructor?: ConstructorFunc;
83
+ subType?: string;
84
+ validate?: (value: any) => boolean;
85
+ decode?: (stream: BinaryStream) => any;
86
+ }
87
+ export interface FieldEnumeration extends StructuredTypeField {
88
+ }
89
+ export interface FieldComplex extends StructuredTypeField {
90
+ }
91
+ export interface FieldBasic extends StructuredTypeField {
92
+ }
93
+ export declare type FieldType = FieldEnumeration | FieldComplex | FieldBasic;
94
+ export declare type DefaultValueFunc = () => any;
95
+ export interface StructuredTypeOptions {
96
+ name: string;
97
+ id?: number | NodeId;
98
+ fields: FieldInterfaceOptions[];
99
+ documentation?: string;
100
+ baseType: string;
101
+ _resolved?: boolean;
102
+ bitFields?: any[];
103
+ base?: StructuredTypeOptions;
104
+ }
105
+ export interface TypeSchemaConstructorOptions {
106
+ name: string;
107
+ subType?: string;
108
+ isAbstract?: boolean;
109
+ category?: FieldCategory;
110
+ defaultValue?: any;
111
+ encode?: (value: any, stream: OutputBinaryStream) => void;
112
+ decode?: (stream: BinaryStream) => any;
113
+ coerce?: (value: any) => any;
114
+ }
115
+ export interface BasicTypeDefinitionOptionsB extends TypeSchemaConstructorOptions {
116
+ toJSON?: (value: any) => any;
117
+ random?: () => any;
118
+ validate?: (value: any) => void;
119
+ }
120
+ export interface BasicTypeDefinitionOptionsBase extends BasicTypeDefinitionOptionsB {
121
+ }
122
+ export interface BasicTypeDefinitionOptions extends BasicTypeDefinitionOptionsB {
123
+ subType: string;
124
+ }
125
+ export interface BasicTypeDefinition extends CommonInterface {
126
+ subType: string;
127
+ }
128
+ export interface BuiltInTypeDefinition extends BasicTypeDefinition {
129
+ }
130
+ export interface EnumerationDefinition extends CommonInterface {
131
+ typedEnum: Enum;
132
+ documentation?: string;
133
+ }
134
+ export declare type TypeDefinition = BuiltInTypeDefinition | EnumerationDefinition | BasicTypeDefinition | CommonInterface;
135
+ export interface IStructuredTypeSchema extends CommonInterface {
136
+ fields: FieldType[];
137
+ id: NodeId;
138
+ dataTypeNodeId: NodeId;
139
+ baseType: string;
140
+ _possibleFields: string[];
141
+ _baseSchema: IStructuredTypeSchema | null;
142
+ documentation?: string;
143
+ isValid?: (options: any) => boolean;
144
+ decodeDebug?: (stream: BinaryStream, options: any) => any;
145
+ constructHook?: (options: any) => any;
146
+ encodingDefaultBinary?: ExpandedNodeId;
147
+ encodingDefaultXml?: ExpandedNodeId;
148
+ encodingDefaultJson?: ExpandedNodeId;
149
+ bitFields?: any[];
150
+ }
151
+ export {};
package/dist/types.js CHANGED
@@ -1,10 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FieldCategory = void 0;
4
- var FieldCategory;
5
- (function (FieldCategory) {
6
- FieldCategory["enumeration"] = "enumeration";
7
- FieldCategory["complex"] = "complex";
8
- FieldCategory["basic"] = "basic";
9
- })(FieldCategory = exports.FieldCategory || (exports.FieldCategory = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldCategory = void 0;
4
+ var FieldCategory;
5
+ (function (FieldCategory) {
6
+ FieldCategory["enumeration"] = "enumeration";
7
+ FieldCategory["complex"] = "complex";
8
+ FieldCategory["basic"] = "basic";
9
+ })(FieldCategory = exports.FieldCategory || (exports.FieldCategory = {}));
10
10
  //# sourceMappingURL=types.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-opcua-factory",
3
- "version": "2.76.0",
3
+ "version": "2.76.2",
4
4
  "description": "pure nodejs OPCUA SDK - module -factory",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -17,14 +17,14 @@
17
17
  "dependencies": {
18
18
  "chalk": "4.1.2",
19
19
  "node-opcua-assert": "2.76.0",
20
- "node-opcua-basic-types": "2.76.0",
21
- "node-opcua-binary-stream": "2.76.0",
20
+ "node-opcua-basic-types": "2.76.2",
21
+ "node-opcua-binary-stream": "2.76.2",
22
22
  "node-opcua-constants": "2.74.0",
23
- "node-opcua-debug": "2.76.0",
24
- "node-opcua-enum": "2.76.0",
25
- "node-opcua-guid": "2.76.0",
26
- "node-opcua-nodeid": "2.76.0",
27
- "node-opcua-status-code": "2.76.0",
23
+ "node-opcua-debug": "2.76.2",
24
+ "node-opcua-enum": "2.76.2",
25
+ "node-opcua-guid": "2.76.2",
26
+ "node-opcua-nodeid": "2.76.2",
27
+ "node-opcua-status-code": "2.76.2",
28
28
  "node-opcua-utils": "2.76.0"
29
29
  },
30
30
  "author": "Etienne Rossignon",
@@ -42,5 +42,5 @@
42
42
  "internet of things"
43
43
  ],
44
44
  "homepage": "http://node-opcua.github.io/",
45
- "gitHead": "75d9b8cf894c8fbadf77d2c4a48a730d055465e7"
45
+ "gitHead": "acb5ecaf1e1c71af3b63e80909d58447f3f298e7"
46
46
  }