@uns-kit/core 1.0.3 → 1.0.5
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/uns/uns-asset.d.ts +2 -0
- package/dist/uns/uns-asset.d.ts.map +1 -0
- package/dist/uns/uns-asset.js +2 -0
- package/dist/uns/uns-asset.js.map +1 -0
- package/dist/uns/uns-attributes.d.ts +143 -2
- package/dist/uns/uns-attributes.d.ts.map +1 -1
- package/dist/uns/uns-attributes.js +141 -107
- package/dist/uns/uns-attributes.js.map +1 -1
- package/dist/uns/uns-interfaces.d.ts +7 -4
- package/dist/uns/uns-interfaces.d.ts.map +1 -1
- package/dist/uns/uns-interfaces.js.map +1 -1
- package/dist/uns/uns-object.d.ts +40 -1
- package/dist/uns/uns-object.d.ts.map +1 -1
- package/dist/uns/uns-object.js +41 -4
- package/dist/uns/uns-object.js.map +1 -1
- package/dist/uns/uns-proxy.d.ts.map +1 -1
- package/dist/uns/uns-proxy.js +1 -0
- package/dist/uns/uns-proxy.js.map +1 -1
- package/dist/uns-grpc/uns-gateway-server.d.ts.map +1 -1
- package/dist/uns-grpc/uns-gateway-server.js +4 -0
- package/dist/uns-grpc/uns-gateway-server.js.map +1 -1
- package/dist/uns-mqtt/uns-mqtt-proxy.d.ts.map +1 -1
- package/dist/uns-mqtt/uns-mqtt-proxy.js +22 -19
- package/dist/uns-mqtt/uns-mqtt-proxy.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uns-asset.d.ts","sourceRoot":"","sources":["../../src/uns/uns-asset.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,EAAE,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uns-asset.js","sourceRoot":"","sources":["../../src/uns/uns-asset.ts"],"names":[],"mappings":"","sourcesContent":["export type UnsAsset = \"\" | (string & {});\n"]}
|
|
@@ -1,3 +1,144 @@
|
|
|
1
|
-
export declare const knownUnsAttributes: readonly ["measured-temperature", "measured-vibration", "measured-pressure", "measured-flow", "status", "operating-hours", "fault-code", "speed", "energy-consumption", "power", "voltage", "current", "lot", "lot-id", "batch-number", "material-type", "quantity", "location", "presence", "task-id", "assigned-task", "role", "start-time", "end-time", "duration", "output-quantity", "inspection-result", "deviation", "pass-fail", "surface-defect", "hardness", "tensile-strength", "pressure", "flow", "consumption", "alarm"];
|
|
2
|
-
export
|
|
1
|
+
export declare const knownUnsAttributes: readonly ["measured-temperature", "measured-vibration", "measured-pressure", "measured-flow", "temperature", "status", "operating-hours", "fault-code", "speed", "energy-consumption", "power", "voltage", "current", "energy", "lot", "lot-id", "batch-number", "material-type", "quantity", "location", "presence", "task-id", "assigned-task", "role", "start-time", "end-time", "duration", "output-quantity", "product-code", "revision", "specification", "target-parameters", "material-composition", "version-history", "inspection-result", "deviation", "pass-fail", "surface-defect", "hardness", "tensile-strength", "work-order-id", "task-list", "planned-start", "planned-end", "assigned-to", "instruction-url", "pressure", "flow", "consumption", "alarm", "availability", "utilization", "downtime", "maintenance-status", "frequency", "cost", "total-flow", "conductivity", "ph", "level", "consumption-rate", "refill-required", "last-refill"];
|
|
2
|
+
export type KnownUnsAttributeName = typeof knownUnsAttributes[number];
|
|
3
|
+
export type UnsAttribute = KnownUnsAttributeName | (string & {});
|
|
4
|
+
export declare const EquipmentAttributes: {
|
|
5
|
+
readonly Status: "status";
|
|
6
|
+
readonly MeasuredTemperature: "measured-temperature";
|
|
7
|
+
readonly MeasuredVibration: "measured-vibration";
|
|
8
|
+
readonly MeasuredPressure: "measured-pressure";
|
|
9
|
+
readonly MeasuredFlow: "measured-flow";
|
|
10
|
+
readonly OperatingHours: "operating-hours";
|
|
11
|
+
readonly FaultCode: "fault-code";
|
|
12
|
+
readonly Speed: "speed";
|
|
13
|
+
readonly EnergyConsumption: "energy-consumption";
|
|
14
|
+
readonly Power: "power";
|
|
15
|
+
readonly Voltage: "voltage";
|
|
16
|
+
readonly Current: "current";
|
|
17
|
+
readonly Energy: "energy";
|
|
18
|
+
};
|
|
19
|
+
export type EquipmentAttributeName = typeof EquipmentAttributes[keyof typeof EquipmentAttributes];
|
|
20
|
+
export declare const MaterialAttributes: {
|
|
21
|
+
readonly Lot: "lot";
|
|
22
|
+
readonly LotId: "lot-id";
|
|
23
|
+
readonly BatchNumber: "batch-number";
|
|
24
|
+
readonly MaterialType: "material-type";
|
|
25
|
+
readonly Quantity: "quantity";
|
|
26
|
+
readonly Location: "location";
|
|
27
|
+
readonly Status: "status";
|
|
28
|
+
};
|
|
29
|
+
export type MaterialAttributeName = typeof MaterialAttributes[keyof typeof MaterialAttributes];
|
|
30
|
+
export declare const PersonnelAttributes: {
|
|
31
|
+
readonly Presence: "presence";
|
|
32
|
+
readonly TaskId: "task-id";
|
|
33
|
+
readonly AssignedTask: "assigned-task";
|
|
34
|
+
readonly Role: "role";
|
|
35
|
+
readonly Status: "status";
|
|
36
|
+
};
|
|
37
|
+
export type PersonnelAttributeName = typeof PersonnelAttributes[keyof typeof PersonnelAttributes];
|
|
38
|
+
export declare const ProcessSegmentAttributes: {
|
|
39
|
+
readonly StartTime: "start-time";
|
|
40
|
+
readonly EndTime: "end-time";
|
|
41
|
+
readonly Duration: "duration";
|
|
42
|
+
readonly Status: "status";
|
|
43
|
+
readonly OutputQuantity: "output-quantity";
|
|
44
|
+
};
|
|
45
|
+
export type ProcessSegmentAttributeName = typeof ProcessSegmentAttributes[keyof typeof ProcessSegmentAttributes];
|
|
46
|
+
export declare const ProductDefinitionAttributes: {
|
|
47
|
+
readonly ProductCode: "product-code";
|
|
48
|
+
readonly Revision: "revision";
|
|
49
|
+
readonly Specification: "specification";
|
|
50
|
+
readonly TargetParameters: "target-parameters";
|
|
51
|
+
readonly MaterialComposition: "material-composition";
|
|
52
|
+
readonly VersionHistory: "version-history";
|
|
53
|
+
};
|
|
54
|
+
export type ProductDefinitionAttributeName = typeof ProductDefinitionAttributes[keyof typeof ProductDefinitionAttributes];
|
|
55
|
+
export declare const ProductQualityAttributes: {
|
|
56
|
+
readonly InspectionResult: "inspection-result";
|
|
57
|
+
readonly Deviation: "deviation";
|
|
58
|
+
readonly PassFail: "pass-fail";
|
|
59
|
+
readonly SurfaceDefect: "surface-defect";
|
|
60
|
+
readonly Hardness: "hardness";
|
|
61
|
+
readonly TensileStrength: "tensile-strength";
|
|
62
|
+
};
|
|
63
|
+
export type ProductQualityAttributeName = typeof ProductQualityAttributes[keyof typeof ProductQualityAttributes];
|
|
64
|
+
export declare const WorkDefinitionAttributes: {
|
|
65
|
+
readonly WorkOrderId: "work-order-id";
|
|
66
|
+
readonly TaskList: "task-list";
|
|
67
|
+
readonly PlannedStart: "planned-start";
|
|
68
|
+
readonly PlannedEnd: "planned-end";
|
|
69
|
+
readonly AssignedTo: "assigned-to";
|
|
70
|
+
readonly InstructionUrl: "instruction-url";
|
|
71
|
+
};
|
|
72
|
+
export type WorkDefinitionAttributeName = typeof WorkDefinitionAttributes[keyof typeof WorkDefinitionAttributes];
|
|
73
|
+
export declare const ResourceStatusAttributes: {
|
|
74
|
+
readonly Availability: "availability";
|
|
75
|
+
readonly Utilization: "utilization";
|
|
76
|
+
readonly Downtime: "downtime";
|
|
77
|
+
readonly Status: "status";
|
|
78
|
+
readonly MaintenanceStatus: "maintenance-status";
|
|
79
|
+
};
|
|
80
|
+
export type ResourceStatusAttributeName = typeof ResourceStatusAttributes[keyof typeof ResourceStatusAttributes];
|
|
81
|
+
export declare const EnergyResourceAttributes: {
|
|
82
|
+
readonly Power: "power";
|
|
83
|
+
readonly Energy: "energy";
|
|
84
|
+
readonly Voltage: "voltage";
|
|
85
|
+
readonly Current: "current";
|
|
86
|
+
readonly Frequency: "frequency";
|
|
87
|
+
readonly Cost: "cost";
|
|
88
|
+
};
|
|
89
|
+
export type EnergyResourceAttributeName = typeof EnergyResourceAttributes[keyof typeof EnergyResourceAttributes];
|
|
90
|
+
export declare const UtilityResourceAttributes: {
|
|
91
|
+
readonly Pressure: "pressure";
|
|
92
|
+
readonly Flow: "flow";
|
|
93
|
+
readonly Consumption: "consumption";
|
|
94
|
+
readonly Status: "status";
|
|
95
|
+
readonly Alarm: "alarm";
|
|
96
|
+
};
|
|
97
|
+
export type UtilityResourceAttributeName = typeof UtilityResourceAttributes[keyof typeof UtilityResourceAttributes];
|
|
98
|
+
export declare const FluidResourceAttributes: {
|
|
99
|
+
readonly Flow: "flow";
|
|
100
|
+
readonly Pressure: "pressure";
|
|
101
|
+
readonly Temperature: "temperature";
|
|
102
|
+
readonly TotalFlow: "total-flow";
|
|
103
|
+
readonly Conductivity: "conductivity";
|
|
104
|
+
readonly PH: "ph";
|
|
105
|
+
};
|
|
106
|
+
export type FluidResourceAttributeName = typeof FluidResourceAttributes[keyof typeof FluidResourceAttributes];
|
|
107
|
+
export declare const ConsumableResourceAttributes: {
|
|
108
|
+
readonly Level: "level";
|
|
109
|
+
readonly ConsumptionRate: "consumption-rate";
|
|
110
|
+
readonly RefillRequired: "refill-required";
|
|
111
|
+
readonly LastRefill: "last-refill";
|
|
112
|
+
readonly Status: "status";
|
|
113
|
+
};
|
|
114
|
+
export type ConsumableResourceAttributeName = typeof ConsumableResourceAttributes[keyof typeof ConsumableResourceAttributes];
|
|
115
|
+
export declare const LineAttributes: {
|
|
116
|
+
readonly Status: "status";
|
|
117
|
+
};
|
|
118
|
+
export type LineAttributeName = typeof LineAttributes[keyof typeof LineAttributes];
|
|
119
|
+
export declare const AreaAttributes: {
|
|
120
|
+
readonly Status: "status";
|
|
121
|
+
};
|
|
122
|
+
export type AreaAttributeName = typeof AreaAttributes[keyof typeof AreaAttributes];
|
|
123
|
+
export declare const SiteAttributes: {
|
|
124
|
+
readonly Status: "status";
|
|
125
|
+
};
|
|
126
|
+
export type SiteAttributeName = typeof SiteAttributes[keyof typeof SiteAttributes];
|
|
127
|
+
export declare const EnterpriseAttributes: {
|
|
128
|
+
readonly Status: "status";
|
|
129
|
+
};
|
|
130
|
+
export type EnterpriseAttributeName = typeof EnterpriseAttributes[keyof typeof EnterpriseAttributes];
|
|
131
|
+
export declare const AssetAttributes: {
|
|
132
|
+
readonly Status: "status";
|
|
133
|
+
};
|
|
134
|
+
export type AssetAttributeName = typeof AssetAttributes[keyof typeof AssetAttributes];
|
|
135
|
+
export declare const SensorAttributes: {
|
|
136
|
+
readonly Status: "status";
|
|
137
|
+
readonly MeasuredTemperature: "measured-temperature";
|
|
138
|
+
readonly MeasuredVibration: "measured-vibration";
|
|
139
|
+
readonly MeasuredPressure: "measured-pressure";
|
|
140
|
+
readonly MeasuredFlow: "measured-flow";
|
|
141
|
+
readonly Temperature: "temperature";
|
|
142
|
+
};
|
|
143
|
+
export type SensorAttributeName = typeof SensorAttributes[keyof typeof SensorAttributes];
|
|
3
144
|
//# sourceMappingURL=uns-attributes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uns-attributes.d.ts","sourceRoot":"","sources":["../../src/uns/uns-attributes.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"uns-attributes.d.ts","sourceRoot":"","sources":["../../src/uns/uns-attributes.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB,u6BAgErB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAGtE,MAAM,MAAM,YAAY,GAAG,qBAAqB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAGjE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;CActB,CAAC;AACX,MAAM,MAAM,sBAAsB,GAAG,OAAO,mBAAmB,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAElG,eAAO,MAAM,kBAAkB;;;;;;;;CAQrB,CAAC;AACX,MAAM,MAAM,qBAAqB,GAAG,OAAO,kBAAkB,CAAC,MAAM,OAAO,kBAAkB,CAAC,CA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AC;AACX,MAAM,MAAM,+BAA+B,GAAG,OAAO,4BAA4B,CAAC,MAAM,OAAO,4BAA4B,CAAC,CAAC;AAG7H,eAAO,MAAM,cAAc;;CAAgC,CAAC;AAC5D,MAAM,MAAM,iBAAiB,GAAG,OAAO,cAAc,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEnF,eAAO,MAAM,cAAc;;CAAgC,CAAC;AAC5D,MAAM,MAAM,iBAAiB,GAAG,OAAO,cAAc,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEnF,eAAO,MAAM,cAAc;;CAAgC,CAAC;AAC5D,MAAM,MAAM,iBAAiB,GAAG,OAAO,cAAc,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEnF,eAAO,MAAM,oBAAoB;;CAAgC,CAAC;AAClE,MAAM,MAAM,uBAAuB,GAAG,OAAO,oBAAoB,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAErG,eAAO,MAAM,eAAe;;CAAgC,CAAC;AAC7D,MAAM,MAAM,kBAAkB,GAAG,OAAO,eAAe,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAEtF,eAAO,MAAM,gBAAgB;;;;;;;CAOnB,CAAC;AACX,MAAM,MAAM,mBAAmB,GAAG,OAAO,gBAAgB,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Flat list of common UNS attributes (add your own as needed).
|
|
2
2
|
export const knownUnsAttributes = [
|
|
3
|
-
// Equipment measurements and status
|
|
4
3
|
"measured-temperature",
|
|
5
4
|
"measured-vibration",
|
|
6
5
|
"measured-pressure",
|
|
7
6
|
"measured-flow",
|
|
7
|
+
"temperature",
|
|
8
8
|
"status",
|
|
9
9
|
"operating-hours",
|
|
10
10
|
"fault-code",
|
|
@@ -13,135 +13,169 @@ export const knownUnsAttributes = [
|
|
|
13
13
|
"power",
|
|
14
14
|
"voltage",
|
|
15
15
|
"current",
|
|
16
|
-
|
|
16
|
+
"energy",
|
|
17
17
|
"lot",
|
|
18
18
|
"lot-id",
|
|
19
19
|
"batch-number",
|
|
20
20
|
"material-type",
|
|
21
21
|
"quantity",
|
|
22
22
|
"location",
|
|
23
|
-
// Personnel
|
|
24
23
|
"presence",
|
|
25
24
|
"task-id",
|
|
26
25
|
"assigned-task",
|
|
27
26
|
"role",
|
|
28
|
-
// Process segment
|
|
29
27
|
"start-time",
|
|
30
28
|
"end-time",
|
|
31
29
|
"duration",
|
|
32
30
|
"output-quantity",
|
|
33
|
-
|
|
31
|
+
"product-code",
|
|
32
|
+
"revision",
|
|
33
|
+
"specification",
|
|
34
|
+
"target-parameters",
|
|
35
|
+
"material-composition",
|
|
36
|
+
"version-history",
|
|
34
37
|
"inspection-result",
|
|
35
38
|
"deviation",
|
|
36
39
|
"pass-fail",
|
|
37
40
|
"surface-defect",
|
|
38
41
|
"hardness",
|
|
39
42
|
"tensile-strength",
|
|
40
|
-
|
|
43
|
+
"work-order-id",
|
|
44
|
+
"task-list",
|
|
45
|
+
"planned-start",
|
|
46
|
+
"planned-end",
|
|
47
|
+
"assigned-to",
|
|
48
|
+
"instruction-url",
|
|
41
49
|
"pressure",
|
|
42
50
|
"flow",
|
|
43
51
|
"consumption",
|
|
44
52
|
"alarm",
|
|
53
|
+
"availability",
|
|
54
|
+
"utilization",
|
|
55
|
+
"downtime",
|
|
56
|
+
"maintenance-status",
|
|
57
|
+
"frequency",
|
|
58
|
+
"cost",
|
|
59
|
+
"total-flow",
|
|
60
|
+
"conductivity",
|
|
61
|
+
"ph",
|
|
62
|
+
"level",
|
|
63
|
+
"consumption-rate",
|
|
64
|
+
"refill-required",
|
|
65
|
+
"last-refill",
|
|
45
66
|
];
|
|
46
|
-
//
|
|
47
|
-
export const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
67
|
+
// Convenience attribute groups per object type (optional to use).
|
|
68
|
+
export const EquipmentAttributes = {
|
|
69
|
+
Status: "status",
|
|
70
|
+
MeasuredTemperature: "measured-temperature",
|
|
71
|
+
MeasuredVibration: "measured-vibration",
|
|
72
|
+
MeasuredPressure: "measured-pressure",
|
|
73
|
+
MeasuredFlow: "measured-flow",
|
|
74
|
+
OperatingHours: "operating-hours",
|
|
75
|
+
FaultCode: "fault-code",
|
|
76
|
+
Speed: "speed",
|
|
77
|
+
EnergyConsumption: "energy-consumption",
|
|
78
|
+
Power: "power",
|
|
79
|
+
Voltage: "voltage",
|
|
80
|
+
Current: "current",
|
|
81
|
+
Energy: "energy",
|
|
82
|
+
};
|
|
83
|
+
export const MaterialAttributes = {
|
|
84
|
+
Lot: "lot",
|
|
85
|
+
LotId: "lot-id",
|
|
86
|
+
BatchNumber: "batch-number",
|
|
87
|
+
MaterialType: "material-type",
|
|
88
|
+
Quantity: "quantity",
|
|
89
|
+
Location: "location",
|
|
90
|
+
Status: "status",
|
|
91
|
+
};
|
|
92
|
+
export const PersonnelAttributes = {
|
|
93
|
+
Presence: "presence",
|
|
94
|
+
TaskId: "task-id",
|
|
95
|
+
AssignedTask: "assigned-task",
|
|
96
|
+
Role: "role",
|
|
97
|
+
Status: "status",
|
|
98
|
+
};
|
|
99
|
+
export const ProcessSegmentAttributes = {
|
|
100
|
+
StartTime: "start-time",
|
|
101
|
+
EndTime: "end-time",
|
|
102
|
+
Duration: "duration",
|
|
103
|
+
Status: "status",
|
|
104
|
+
OutputQuantity: "output-quantity",
|
|
105
|
+
};
|
|
106
|
+
export const ProductDefinitionAttributes = {
|
|
107
|
+
ProductCode: "product-code",
|
|
108
|
+
Revision: "revision",
|
|
109
|
+
Specification: "specification",
|
|
110
|
+
TargetParameters: "target-parameters",
|
|
111
|
+
MaterialComposition: "material-composition",
|
|
112
|
+
VersionHistory: "version-history",
|
|
113
|
+
};
|
|
114
|
+
export const ProductQualityAttributes = {
|
|
115
|
+
InspectionResult: "inspection-result",
|
|
116
|
+
Deviation: "deviation",
|
|
117
|
+
PassFail: "pass-fail",
|
|
118
|
+
SurfaceDefect: "surface-defect",
|
|
119
|
+
Hardness: "hardness",
|
|
120
|
+
TensileStrength: "tensile-strength",
|
|
121
|
+
};
|
|
122
|
+
export const WorkDefinitionAttributes = {
|
|
123
|
+
WorkOrderId: "work-order-id",
|
|
124
|
+
TaskList: "task-list",
|
|
125
|
+
PlannedStart: "planned-start",
|
|
126
|
+
PlannedEnd: "planned-end",
|
|
127
|
+
AssignedTo: "assigned-to",
|
|
128
|
+
InstructionUrl: "instruction-url",
|
|
129
|
+
};
|
|
130
|
+
export const ResourceStatusAttributes = {
|
|
131
|
+
Availability: "availability",
|
|
132
|
+
Utilization: "utilization",
|
|
133
|
+
Downtime: "downtime",
|
|
134
|
+
Status: "status",
|
|
135
|
+
MaintenanceStatus: "maintenance-status",
|
|
136
|
+
};
|
|
137
|
+
export const EnergyResourceAttributes = {
|
|
138
|
+
Power: "power",
|
|
139
|
+
Energy: "energy",
|
|
140
|
+
Voltage: "voltage",
|
|
141
|
+
Current: "current",
|
|
142
|
+
Frequency: "frequency",
|
|
143
|
+
Cost: "cost",
|
|
144
|
+
};
|
|
145
|
+
export const UtilityResourceAttributes = {
|
|
146
|
+
Pressure: "pressure",
|
|
147
|
+
Flow: "flow",
|
|
148
|
+
Consumption: "consumption",
|
|
149
|
+
Status: "status",
|
|
150
|
+
Alarm: "alarm",
|
|
151
|
+
};
|
|
152
|
+
export const FluidResourceAttributes = {
|
|
153
|
+
Flow: "flow",
|
|
154
|
+
Pressure: "pressure",
|
|
155
|
+
Temperature: "temperature",
|
|
156
|
+
TotalFlow: "total-flow",
|
|
157
|
+
Conductivity: "conductivity",
|
|
158
|
+
PH: "ph",
|
|
159
|
+
};
|
|
160
|
+
export const ConsumableResourceAttributes = {
|
|
161
|
+
Level: "level",
|
|
162
|
+
ConsumptionRate: "consumption-rate",
|
|
163
|
+
RefillRequired: "refill-required",
|
|
164
|
+
LastRefill: "last-refill",
|
|
165
|
+
Status: "status",
|
|
166
|
+
};
|
|
167
|
+
// Generic fallbacks for structural types
|
|
168
|
+
export const LineAttributes = { Status: "status" };
|
|
169
|
+
export const AreaAttributes = { Status: "status" };
|
|
170
|
+
export const SiteAttributes = { Status: "status" };
|
|
171
|
+
export const EnterpriseAttributes = { Status: "status" };
|
|
172
|
+
export const AssetAttributes = { Status: "status" };
|
|
173
|
+
export const SensorAttributes = {
|
|
174
|
+
Status: "status",
|
|
175
|
+
MeasuredTemperature: "measured-temperature",
|
|
176
|
+
MeasuredVibration: "measured-vibration",
|
|
177
|
+
MeasuredPressure: "measured-pressure",
|
|
178
|
+
MeasuredFlow: "measured-flow",
|
|
179
|
+
Temperature: "temperature",
|
|
146
180
|
};
|
|
147
181
|
//# sourceMappingURL=uns-attributes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uns-attributes.js","sourceRoot":"","sources":["../../src/uns/uns-attributes.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,oCAAoC;IACpC,sBAAsB;IACtB,oBAAoB;IACpB,mBAAmB;IACnB,eAAe;IACf,QAAQ;IACR,iBAAiB;IACjB,YAAY;IACZ,OAAO;IACP,oBAAoB;IACpB,OAAO;IACP,SAAS;IACT,SAAS;IACT,wBAAwB;IACxB,KAAK;IACL,QAAQ;IACR,cAAc;IACd,eAAe;IACf,UAAU;IACV,UAAU;IACV,YAAY;IACZ,UAAU;IACV,SAAS;IACT,eAAe;IACf,MAAM;IACN,kBAAkB;IAClB,YAAY;IACZ,UAAU;IACV,UAAU;IACV,iBAAiB;IACjB,UAAU;IACV,mBAAmB;IACnB,WAAW;IACX,WAAW;IACX,gBAAgB;IAChB,UAAU;IACV,kBAAkB;IAClB,qBAAqB;IACrB,UAAU;IACV,MAAM;IACN,aAAa;IACb,OAAO;CACC,CAAC;AAEX,gGAAgG;AAChG,MAAM,CAAC,MAAM,2BAA2B,GAAsC;IAC5E,SAAS,EAAE;QACT,QAAQ;QACR,sBAAsB;QACtB,oBAAoB;QACpB,mBAAmB;QACnB,eAAe;QACf,iBAAiB;QACjB,YAAY;QACZ,OAAO;QACP,oBAAoB;QACpB,OAAO;QACP,SAAS;QACT,SAAS;KACV;IACD,QAAQ,EAAE;QACR,KAAK;QACL,QAAQ;QACR,cAAc;QACd,eAAe;QACf,UAAU;QACV,UAAU;QACV,QAAQ;KACT;IACD,SAAS,EAAE;QACT,UAAU;QACV,SAAS;QACT,eAAe;QACf,MAAM;QACN,QAAQ;KACT;IACD,iBAAiB,EAAE;QACjB,YAAY;QACZ,UAAU;QACV,UAAU;QACV,QAAQ;QACR,iBAAiB;KAClB;IACD,oBAAoB,EAAE;QACpB,cAAc;QACd,UAAU;QACV,eAAe;QACf,mBAAmB;QACnB,sBAAsB;QACtB,iBAAiB;KAClB;IACD,iBAAiB,EAAE;QACjB,mBAAmB;QACnB,WAAW;QACX,WAAW;QACX,gBAAgB;QAChB,UAAU;QACV,kBAAkB;KACnB;IACD,iBAAiB,EAAE;QACjB,eAAe;QACf,WAAW;QACX,eAAe;QACf,aAAa;QACb,aAAa;QACb,iBAAiB;KAClB;IACD,iBAAiB,EAAE;QACjB,cAAc;QACd,aAAa;QACb,UAAU;QACV,QAAQ;QACR,oBAAoB;KACrB;IACD,iBAAiB,EAAE;QACjB,OAAO;QACP,QAAQ;QACR,SAAS;QACT,SAAS;QACT,WAAW;QACX,MAAM;KACP;IACD,kBAAkB,EAAE;QAClB,UAAU;QACV,MAAM;QACN,aAAa;QACb,QAAQ;QACR,OAAO;KACR;IACD,gBAAgB,EAAE;QAChB,MAAM;QACN,UAAU;QACV,aAAa;QACb,YAAY;QACZ,cAAc;QACd,IAAI;KACL;IACD,qBAAqB,EAAE;QACrB,OAAO;QACP,kBAAkB;QAClB,iBAAiB;QACjB,aAAa;QACb,QAAQ;KACT;CACF,CAAC","sourcesContent":["// Shared list of common UNS attributes to improve IntelliSense while allowing custom values.\nexport const knownUnsAttributes = [\n // Equipment measurements and status\n \"measured-temperature\",\n \"measured-vibration\",\n \"measured-pressure\",\n \"measured-flow\",\n \"status\",\n \"operating-hours\",\n \"fault-code\",\n \"speed\",\n \"energy-consumption\",\n \"power\",\n \"voltage\",\n \"current\",\n // Material and lot info\n \"lot\",\n \"lot-id\",\n \"batch-number\",\n \"material-type\",\n \"quantity\",\n \"location\",\n // Personnel\n \"presence\",\n \"task-id\",\n \"assigned-task\",\n \"role\",\n // Process segment\n \"start-time\",\n \"end-time\",\n \"duration\",\n \"output-quantity\",\n // Quality\n \"inspection-result\",\n \"deviation\",\n \"pass-fail\",\n \"surface-defect\",\n \"hardness\",\n \"tensile-strength\",\n // Utilities / energy\n \"pressure\",\n \"flow\",\n \"consumption\",\n \"alarm\",\n] as const;\n\n// Contextual hints by object type. This is advisory only; unknown attributes are still allowed.\nexport const KnownAttributesByObjectType: Record<string, readonly string[]> = {\n equipment: [\n \"status\",\n \"measured-temperature\",\n \"measured-vibration\",\n \"measured-pressure\",\n \"measured-flow\",\n \"operating-hours\",\n \"fault-code\",\n \"speed\",\n \"energy-consumption\",\n \"power\",\n \"voltage\",\n \"current\",\n ],\n material: [\n \"lot\",\n \"lot-id\",\n \"batch-number\",\n \"material-type\",\n \"quantity\",\n \"location\",\n \"status\",\n ],\n personnel: [\n \"presence\",\n \"task-id\",\n \"assigned-task\",\n \"role\",\n \"status\",\n ],\n \"process-segment\": [\n \"start-time\",\n \"end-time\",\n \"duration\",\n \"status\",\n \"output-quantity\",\n ],\n \"product-definition\": [\n \"product-code\",\n \"revision\",\n \"specification\",\n \"target-parameters\",\n \"material-composition\",\n \"version-history\",\n ],\n \"product-quality\": [\n \"inspection-result\",\n \"deviation\",\n \"pass-fail\",\n \"surface-defect\",\n \"hardness\",\n \"tensile-strength\",\n ],\n \"work-definition\": [\n \"work-order-id\",\n \"task-list\",\n \"planned-start\",\n \"planned-end\",\n \"assigned-to\",\n \"instruction-url\",\n ],\n \"resource-status\": [\n \"availability\",\n \"utilization\",\n \"downtime\",\n \"status\",\n \"maintenance-status\",\n ],\n \"energy-resource\": [\n \"power\",\n \"energy\",\n \"voltage\",\n \"current\",\n \"frequency\",\n \"cost\",\n ],\n \"utility-resource\": [\n \"pressure\",\n \"flow\",\n \"consumption\",\n \"status\",\n \"alarm\",\n ],\n \"fluid-resource\": [\n \"flow\",\n \"pressure\",\n \"temperature\",\n \"total-flow\",\n \"conductivity\",\n \"ph\",\n ],\n \"consumable-resource\": [\n \"level\",\n \"consumption-rate\",\n \"refill-required\",\n \"last-refill\",\n \"status\",\n ],\n};\n"]}
|
|
1
|
+
{"version":3,"file":"uns-attributes.js","sourceRoot":"","sources":["../../src/uns/uns-attributes.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,sBAAsB;IACtB,oBAAoB;IACpB,mBAAmB;IACnB,eAAe;IACf,aAAa;IACb,QAAQ;IACR,iBAAiB;IACjB,YAAY;IACZ,OAAO;IACP,oBAAoB;IACpB,OAAO;IACP,SAAS;IACT,SAAS;IACT,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,cAAc;IACd,eAAe;IACf,UAAU;IACV,UAAU;IACV,UAAU;IACV,SAAS;IACT,eAAe;IACf,MAAM;IACN,YAAY;IACZ,UAAU;IACV,UAAU;IACV,iBAAiB;IACjB,cAAc;IACd,UAAU;IACV,eAAe;IACf,mBAAmB;IACnB,sBAAsB;IACtB,iBAAiB;IACjB,mBAAmB;IACnB,WAAW;IACX,WAAW;IACX,gBAAgB;IAChB,UAAU;IACV,kBAAkB;IAClB,eAAe;IACf,WAAW;IACX,eAAe;IACf,aAAa;IACb,aAAa;IACb,iBAAiB;IACjB,UAAU;IACV,MAAM;IACN,aAAa;IACb,OAAO;IACP,cAAc;IACd,aAAa;IACb,UAAU;IACV,oBAAoB;IACpB,WAAW;IACX,MAAM;IACN,YAAY;IACZ,cAAc;IACd,IAAI;IACJ,OAAO;IACP,kBAAkB;IAClB,iBAAiB;IACjB,aAAa;CACL,CAAC;AAOX,kEAAkE;AAClE,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,MAAM,EAAE,QAAQ;IAChB,mBAAmB,EAAE,sBAA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EAAE,MAAM,EAAE,QAAQ,EAAW,CAAC;AAG5D,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAW,CAAC;AAG5D,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAW,CAAC;AAG5D,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAW,CAAC;AAGlE,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAW,CAAC;AAG7D,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,MAAM,EAAE,QAAQ;IAChB,mBAAmB,EAAE,sBAAsB;IAC3C,iBAAiB,EAAE,oBAAoB;IACvC,gBAAgB,EAAE,mBAAmB;IACrC,YAAY,EAAE,eAAe;IAC7B,WAAW,EAAE,aAAa;CAClB,CAAC","sourcesContent":["// Flat list of common UNS attributes (add your own as needed).\nexport const knownUnsAttributes = [\n \"measured-temperature\",\n \"measured-vibration\",\n \"measured-pressure\",\n \"measured-flow\",\n \"temperature\",\n \"status\",\n \"operating-hours\",\n \"fault-code\",\n \"speed\",\n \"energy-consumption\",\n \"power\",\n \"voltage\",\n \"current\",\n \"energy\",\n \"lot\",\n \"lot-id\",\n \"batch-number\",\n \"material-type\",\n \"quantity\",\n \"location\",\n \"presence\",\n \"task-id\",\n \"assigned-task\",\n \"role\",\n \"start-time\",\n \"end-time\",\n \"duration\",\n \"output-quantity\",\n \"product-code\",\n \"revision\",\n \"specification\",\n \"target-parameters\",\n \"material-composition\",\n \"version-history\",\n \"inspection-result\",\n \"deviation\",\n \"pass-fail\",\n \"surface-defect\",\n \"hardness\",\n \"tensile-strength\",\n \"work-order-id\",\n \"task-list\",\n \"planned-start\",\n \"planned-end\",\n \"assigned-to\",\n \"instruction-url\",\n \"pressure\",\n \"flow\",\n \"consumption\",\n \"alarm\",\n \"availability\",\n \"utilization\",\n \"downtime\",\n \"maintenance-status\",\n \"frequency\",\n \"cost\",\n \"total-flow\",\n \"conductivity\",\n \"ph\",\n \"level\",\n \"consumption-rate\",\n \"refill-required\",\n \"last-refill\",\n] as const;\n\nexport type KnownUnsAttributeName = typeof knownUnsAttributes[number];\n\n// Allow known attribute names while still allowing arbitrary strings.\nexport type UnsAttribute = KnownUnsAttributeName | (string & {});\n\n// Convenience attribute groups per object type (optional to use).\nexport const EquipmentAttributes = {\n Status: \"status\",\n MeasuredTemperature: \"measured-temperature\",\n MeasuredVibration: \"measured-vibration\",\n MeasuredPressure: \"measured-pressure\",\n MeasuredFlow: \"measured-flow\",\n OperatingHours: \"operating-hours\",\n FaultCode: \"fault-code\",\n Speed: \"speed\",\n EnergyConsumption: \"energy-consumption\",\n Power: \"power\",\n Voltage: \"voltage\",\n Current: \"current\",\n Energy: \"energy\",\n} as const;\nexport type EquipmentAttributeName = typeof EquipmentAttributes[keyof typeof EquipmentAttributes];\n\nexport const MaterialAttributes = {\n Lot: \"lot\",\n LotId: \"lot-id\",\n BatchNumber: \"batch-number\",\n MaterialType: \"material-type\",\n Quantity: \"quantity\",\n Location: \"location\",\n Status: \"status\",\n} as const;\nexport type MaterialAttributeName = typeof MaterialAttributes[keyof typeof MaterialAttributes];\n\nexport const PersonnelAttributes = {\n Presence: \"presence\",\n TaskId: \"task-id\",\n AssignedTask: \"assigned-task\",\n Role: \"role\",\n Status: \"status\",\n} as const;\nexport type PersonnelAttributeName = typeof PersonnelAttributes[keyof typeof PersonnelAttributes];\n\nexport const ProcessSegmentAttributes = {\n StartTime: \"start-time\",\n EndTime: \"end-time\",\n Duration: \"duration\",\n Status: \"status\",\n OutputQuantity: \"output-quantity\",\n} as const;\nexport type ProcessSegmentAttributeName = typeof ProcessSegmentAttributes[keyof typeof ProcessSegmentAttributes];\n\nexport const ProductDefinitionAttributes = {\n ProductCode: \"product-code\",\n Revision: \"revision\",\n Specification: \"specification\",\n TargetParameters: \"target-parameters\",\n MaterialComposition: \"material-composition\",\n VersionHistory: \"version-history\",\n} as const;\nexport type ProductDefinitionAttributeName = typeof ProductDefinitionAttributes[keyof typeof ProductDefinitionAttributes];\n\nexport const ProductQualityAttributes = {\n InspectionResult: \"inspection-result\",\n Deviation: \"deviation\",\n PassFail: \"pass-fail\",\n SurfaceDefect: \"surface-defect\",\n Hardness: \"hardness\",\n TensileStrength: \"tensile-strength\",\n} as const;\nexport type ProductQualityAttributeName = typeof ProductQualityAttributes[keyof typeof ProductQualityAttributes];\n\nexport const WorkDefinitionAttributes = {\n WorkOrderId: \"work-order-id\",\n TaskList: \"task-list\",\n PlannedStart: \"planned-start\",\n PlannedEnd: \"planned-end\",\n AssignedTo: \"assigned-to\",\n InstructionUrl: \"instruction-url\",\n} as const;\nexport type WorkDefinitionAttributeName = typeof WorkDefinitionAttributes[keyof typeof WorkDefinitionAttributes];\n\nexport const ResourceStatusAttributes = {\n Availability: \"availability\",\n Utilization: \"utilization\",\n Downtime: \"downtime\",\n Status: \"status\",\n MaintenanceStatus: \"maintenance-status\",\n} as const;\nexport type ResourceStatusAttributeName = typeof ResourceStatusAttributes[keyof typeof ResourceStatusAttributes];\n\nexport const EnergyResourceAttributes = {\n Power: \"power\",\n Energy: \"energy\",\n Voltage: \"voltage\",\n Current: \"current\",\n Frequency: \"frequency\",\n Cost: \"cost\",\n} as const;\nexport type EnergyResourceAttributeName = typeof EnergyResourceAttributes[keyof typeof EnergyResourceAttributes];\n\nexport const UtilityResourceAttributes = {\n Pressure: \"pressure\",\n Flow: \"flow\",\n Consumption: \"consumption\",\n Status: \"status\",\n Alarm: \"alarm\",\n} as const;\nexport type UtilityResourceAttributeName = typeof UtilityResourceAttributes[keyof typeof UtilityResourceAttributes];\n\nexport const FluidResourceAttributes = {\n Flow: \"flow\",\n Pressure: \"pressure\",\n Temperature: \"temperature\",\n TotalFlow: \"total-flow\",\n Conductivity: \"conductivity\",\n PH: \"ph\",\n} as const;\nexport type FluidResourceAttributeName = typeof FluidResourceAttributes[keyof typeof FluidResourceAttributes];\n\nexport const ConsumableResourceAttributes = {\n Level: \"level\",\n ConsumptionRate: \"consumption-rate\",\n RefillRequired: \"refill-required\",\n LastRefill: \"last-refill\",\n Status: \"status\",\n} as const;\nexport type ConsumableResourceAttributeName = typeof ConsumableResourceAttributes[keyof typeof ConsumableResourceAttributes];\n\n// Generic fallbacks for structural types\nexport const LineAttributes = { Status: \"status\" } as const;\nexport type LineAttributeName = typeof LineAttributes[keyof typeof LineAttributes];\n\nexport const AreaAttributes = { Status: \"status\" } as const;\nexport type AreaAttributeName = typeof AreaAttributes[keyof typeof AreaAttributes];\n\nexport const SiteAttributes = { Status: \"status\" } as const;\nexport type SiteAttributeName = typeof SiteAttributes[keyof typeof SiteAttributes];\n\nexport const EnterpriseAttributes = { Status: \"status\" } as const;\nexport type EnterpriseAttributeName = typeof EnterpriseAttributes[keyof typeof EnterpriseAttributes];\n\nexport const AssetAttributes = { Status: \"status\" } as const;\nexport type AssetAttributeName = typeof AssetAttributes[keyof typeof AssetAttributes];\n\nexport const SensorAttributes = {\n Status: \"status\",\n MeasuredTemperature: \"measured-temperature\",\n MeasuredVibration: \"measured-vibration\",\n MeasuredPressure: \"measured-pressure\",\n MeasuredFlow: \"measured-flow\",\n Temperature: \"temperature\",\n} as const;\nexport type SensorAttributeName = typeof SensorAttributes[keyof typeof SensorAttributes];\n"]}
|
|
@@ -2,11 +2,12 @@ import { UnsAttributeType } from "../graphql/schema.js";
|
|
|
2
2
|
import { MeasurementUnit } from "./uns-measurements.js";
|
|
3
3
|
import { UnsTags } from "./uns-tags.js";
|
|
4
4
|
import type { UnsObjectId, UnsObjectType } from "./uns-object.js";
|
|
5
|
+
import type { UnsAsset } from "./uns-asset.js";
|
|
5
6
|
import { UnsTopics } from "./uns-topics.js";
|
|
6
|
-
import {
|
|
7
|
+
import { type KnownUnsAttributeName } from "./uns-attributes.js";
|
|
7
8
|
export type ISO8601 = `${number}-${string}-${string}T${string}:${string}:${string}.${string}Z`;
|
|
8
9
|
export declare function isIOS8601Type(value: string): value is ISO8601;
|
|
9
|
-
export type UnsAttribute =
|
|
10
|
+
export type UnsAttribute = KnownUnsAttributeName | (string & {});
|
|
10
11
|
export declare const valueTypes: string[];
|
|
11
12
|
export type ValueTypeString = typeof valueTypes[number];
|
|
12
13
|
export type ValueType = string | number;
|
|
@@ -89,8 +90,9 @@ export interface IUnsCommand {
|
|
|
89
90
|
export interface IMqttMessage {
|
|
90
91
|
topic: UnsTopics;
|
|
91
92
|
attribute: UnsAttribute;
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
asset: UnsAsset;
|
|
94
|
+
objectType: UnsObjectType;
|
|
95
|
+
objectId: UnsObjectId;
|
|
94
96
|
description?: string;
|
|
95
97
|
tags?: UnsTags[];
|
|
96
98
|
packet: IUnsPacket;
|
|
@@ -125,6 +127,7 @@ export interface ITopicObject {
|
|
|
125
127
|
dataGroup: string;
|
|
126
128
|
tags: string[] | null;
|
|
127
129
|
attributeNeedsPersistence: boolean | null;
|
|
130
|
+
asset?: UnsAsset;
|
|
128
131
|
objectType?: UnsObjectType;
|
|
129
132
|
objectId?: UnsObjectId;
|
|
130
133
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uns-interfaces.d.ts","sourceRoot":"","sources":["../../src/uns/uns-interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,
|
|
1
|
+
{"version":3,"file":"uns-interfaces.d.ts","sourceRoot":"","sources":["../../src/uns/uns-interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC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,CAAC;QACzB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,CAAC,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC,EAAE,CAAC;KAC9C,CAAC;CACH;AAED,MAAM,WAAW,mBAAmB;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,CAAC,EAAE,aAAa,EAAE,CAAC;CAC/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uns-interfaces.js","sourceRoot":"","sources":["../../src/uns/uns-interfaces.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"uns-interfaces.js","sourceRoot":"","sources":["../../src/uns/uns-interfaces.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,MAAM,YAAY,GAAG,+CAA+C,CAAC;IACrE,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAClC,CAAC;AAID,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["import { UnsAttributeType } from \"../graphql/schema.js\";\nimport { MeasurementUnit } from \"./uns-measurements.js\";\nimport { UnsTags } from \"./uns-tags.js\";\nimport type { UnsObjectId, UnsObjectType } from \"./uns-object.js\";\nimport type { UnsAsset } from \"./uns-asset.js\";\nimport { UnsTopics } from \"./uns-topics.js\";\nimport { knownUnsAttributes, type KnownUnsAttributeName } from \"./uns-attributes.js\";\n\nexport type ISO8601 = `${number}-${string}-${string}T${string}:${string}:${string}.${string}Z`;\nexport function isIOS8601Type(value: string): value is ISO8601 {\n const iso8601Regex = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$/;\n return iso8601Regex.test(value);\n}\n// Known attribute names (with IntelliSense) while still allowing arbitrary strings.\nexport type UnsAttribute = KnownUnsAttributeName | (string & {});\n\nexport const valueTypes = [\"string\", \"number\"];\nexport type ValueTypeString = typeof valueTypes[number];\nexport type ValueType = string | number;\n\nexport interface IUnsParameters {\n mqttSubToTopics?: string | string[];\n username?: string;\n password?: string;\n mqttSSL?: boolean;\n publishThrottlingDelay?: number; // Delay in milliseconds; default is 1ms\n subscribeThrottlingDelay?: number; // Delay in milliseconds; default is 1ms\n}\n\nexport interface IUnsProcessParameters {\n processName?: string | undefined;\n mqttSubToTopics?: string | string[];\n username?: string;\n password?: string;\n mqttSSL?: boolean;\n}\n\nexport interface UnsEvents {\n // Emitters in MqttProxy, UnsMqttProxy\n input: { topic: string; message: string, packet: any };\n mqttProxyStatus: { event: string, value: number, uom: MeasurementUnit, statusTopic: string };\n \n // Emitters in MqttProxy\n error: { code: number; message: string };\n \n // Emitters in UnsMqttProxy\n mqttWorker: { command: string, instanceName: string; batchSize: number, referenceHash: string };\n\n // Emitter in UnsCronProxy\n cronEvent: {};\n\n // Emitters in UnsApiProxy\n apiGetEvent: {req: any, res: any};\n\n // Emitters in UnsProxy\n unsProxyProducedTopics: { producedTopics: ITopicObject[], statusTopic: string };\n\n // Emitters in UnsProxy\n unsProxyProducedApiEndpoints: { producedApiEndpoints: IApiObject[], statusTopic: string };\n}\n\nexport interface IUnsExtendedData extends IUnsData {\n valueType: ValueTypeString;\n}\n\nexport interface IUnsData {\n time: ISO8601;\n value: ValueType;\n dataGroup?: string;\n uom?: MeasurementUnit;\n foreignEventKey?: string;\n}\n\nexport interface IUnsEvent {\n time: ISO8601;\n dataGroup?: string;\n details?: string;\n uniqueEventId?: string;\n}\n\nexport interface IUnsTable {\n time: ISO8601;\n values: Record<string, string | number | undefined | null>\n dataGroup?: string;\n}\n\nexport interface IUnsCommand {\n time: ISO8601;\n details?: string;\n}\n\nexport interface IMqttMessage {\n topic: UnsTopics;\n attribute: UnsAttribute;\n asset: UnsAsset;\n objectType: UnsObjectType;\n objectId: UnsObjectId;\n description?: string;\n tags?: UnsTags[];\n packet: IUnsPacket;\n attributeNeedsPersistence?: boolean | null;\n}\n\n// This interface represents a packet for a UNS system\nexport interface IUnsPacket {\n // The message object of the packet\n message: IUnsExtendedMessage;\n \n // The HMAC signature of the message\n messageSignature?: string;\n\n // Automatically calculated interval between two packets in ms\n interval?: number;\n\n // Current library version\n readonly version: string;\n\n // Autogenerated sequence number\n sequenceId?: number;\n}\n\nexport interface IUnsPackatParameters {\n\n}\n\nexport interface IUnsMessage {\n command?: IUnsCommand;\n data?: IUnsData;\n event?: IUnsEvent;\n table?: IUnsTable;\n expiresAt?: ISO8601;\n createdAt?: ISO8601;\n}\n\nexport interface IUnsExtendedMessage extends IUnsMessage {\n data?: IUnsExtendedData;\n}\n\nexport interface ITopicObject {\n timestamp: string;\n attribute:string;\n attributeType: UnsAttributeType;\n topic:string;\n description:string;\n dataGroup:string;\n tags:string[] | null;\n attributeNeedsPersistence: boolean | null;\n asset?: UnsAsset;\n objectType?: UnsObjectType;\n objectId?: UnsObjectId;\n}\n\n// API Interfaces below\nexport interface IApiObject {\n timestamp: string;\n attribute:string;\n topic:string;\n attributeType: UnsAttributeType;\n apiDescription?: string; // Optional description for the API endpoint\n apiHost: string; // Hostname of the service\n apiEndpoint: string; // API endpoint for virtual topics\n apiSwaggerEndpoint: string; // Swagger endpoint for API documentation\n apiMethod: \"GET\" | \"POST\" | \"PUT\" | \"DELETE\"; // HTTP method for API endpoint\n apiQueryParams: QueryParamDef[]; // query parameters for the API endpoint\n}\n\nexport interface QueryParamDef {\n name: string;\n type: \"string\" | \"number\" | \"boolean\";\n required?: boolean;\n description?: string;\n}\n\nexport interface IApiProxyOptions {\n jwtSecret?: string;\n jwks?: {\n wellKnownJwksUrl: string;\n activeKidUrl?: string;\n cacheTtlMs?: number;\n algorithms?: (\"RS256\" | \"RS384\" | \"RS512\")[];\n };\n}\n\nexport interface IGetEndpointOptions {\n apiDescription?: string;\n tags?: string[];\n queryParams?: QueryParamDef[];\n}\n"]}
|