@sedni/cloud_common 2.0.0 → 2.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.
@@ -0,0 +1,153 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
6
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
7
+ }) : x)(function(x) {
8
+ if (typeof require !== "undefined") return require.apply(this, arguments);
9
+ throw Error('Dynamic require of "' + x + '" is not supported');
10
+ });
11
+ var __esm = (fn, res) => function __init() {
12
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
13
+ };
14
+ var __commonJS = (cb, mod) => function __require2() {
15
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
16
+ };
17
+ var __export = (target, all) => {
18
+ for (var name in all)
19
+ __defProp(target, name, { get: all[name], enumerable: true });
20
+ };
21
+ var __copyProps = (to, from, except, desc) => {
22
+ if (from && typeof from === "object" || typeof from === "function") {
23
+ for (let key of __getOwnPropNames(from))
24
+ if (!__hasOwnProp.call(to, key) && key !== except)
25
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
26
+ }
27
+ return to;
28
+ };
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+
31
+ // app/types/alarm.types.ts
32
+ var alarm_types_exports = {};
33
+ __export(alarm_types_exports, {
34
+ AlarmPriorities: () => AlarmPriorities,
35
+ AlarmTypes: () => AlarmTypes,
36
+ CloudAlarmStates: () => CloudAlarmStates,
37
+ DiamarAlarmStates: () => DiamarAlarmStates
38
+ });
39
+ var AlarmPriorities, DiamarAlarmStates, CloudAlarmStates, AlarmTypes;
40
+ var init_alarm_types = __esm({
41
+ "app/types/alarm.types.ts"() {
42
+ "use strict";
43
+ AlarmPriorities = {
44
+ CRITICAL: "Critical",
45
+ ALARM: "Alarm",
46
+ WARNING: "Warning"
47
+ };
48
+ DiamarAlarmStates = {
49
+ INACTIVE: "Inactive",
50
+ ACKNOWLEDGED: "Acknowledged",
51
+ ACTIVE: "Active",
52
+ UNACKNOWLEDGED: "Unacknowledged",
53
+ UNDEFINED: "Undefined"
54
+ };
55
+ CloudAlarmStates = {
56
+ INACTIVE: "Inactive",
57
+ ALARM: "Active",
58
+ ALARM_ACK: "Acknowledged",
59
+ WARNING: "WarningActive",
60
+ WARNING_ACK: "WarningAcknowledged",
61
+ RETURN_NO_ACK: "Unacknowledged",
62
+ INHIBITED: "Inhibited",
63
+ OFFSCAN: "Offscan",
64
+ UNDEFINED: "Undefined"
65
+ };
66
+ AlarmTypes = {
67
+ NORMAL: "Normal",
68
+ ALARM_OPEN: "AlarmOpen",
69
+ ALARM_CLOSE: "AlarmClose",
70
+ ALARM_IFH: "AlarmIfh",
71
+ ALARM_HH: "AlarmHh",
72
+ ALARM_H: "AlarmH",
73
+ ALARM_L: "AlarmL",
74
+ ALARM_LL: "AlarmLl",
75
+ ALARM_IFL: "AlarmIfl",
76
+ ALARM_OFFSCAN: "AlarmOffScan",
77
+ ALARM_FAIL: "AlarmFail",
78
+ ALARM_INH: "AlarmInh",
79
+ ALARM_UNK: "AlarmUnk"
80
+ };
81
+ }
82
+ });
83
+
84
+ // app/types/event.types.ts
85
+ var event_types_exports = {};
86
+ __export(event_types_exports, {
87
+ EventCategories: () => EventCategories,
88
+ EventCriticalities: () => EventCriticalities
89
+ });
90
+ var EventCategories, EventCriticalities;
91
+ var init_event_types = __esm({
92
+ "app/types/event.types.ts"() {
93
+ "use strict";
94
+ EventCategories = {
95
+ ACCESS_CONTROL: "AccessControl",
96
+ REQUEST_ERROR: "RequestErrors",
97
+ OS: "OperatingSystemEvents",
98
+ CONTROL: "ControlSystemEvents",
99
+ BACKUP: "BackupAndRestoreEvents",
100
+ CONFIG_CHANGE: "ConfigurationChanges",
101
+ LOGS: "AuditLogEvents",
102
+ POTENTIAL_ATTACK: "PotentialAttackActivity"
103
+ };
104
+ EventCriticalities = {
105
+ VERBOSE: "Verbose",
106
+ INFO: "Info",
107
+ WARNING: "Warning",
108
+ ERROR: "Error",
109
+ CRITICAL: "Critical"
110
+ };
111
+ }
112
+ });
113
+
114
+ // app/types/unit.types.ts
115
+ var unit_types_exports = {};
116
+ __export(unit_types_exports, {
117
+ UnitTypes: () => UnitTypes
118
+ });
119
+ var UnitTypes;
120
+ var init_unit_types = __esm({
121
+ "app/types/unit.types.ts"() {
122
+ "use strict";
123
+ UnitTypes = {
124
+ AIM18: "Aim18",
125
+ DIM36: "Dim36",
126
+ DIOM24: "Diom24",
127
+ KLIM: "Klim",
128
+ LUM: "Lum",
129
+ PMM: "Pmm",
130
+ SLIM: "Slim",
131
+ TIM28: "Tim28"
132
+ };
133
+ }
134
+ });
135
+
136
+ export {
137
+ __require,
138
+ __commonJS,
139
+ __toCommonJS,
140
+ AlarmPriorities,
141
+ DiamarAlarmStates,
142
+ CloudAlarmStates,
143
+ AlarmTypes,
144
+ alarm_types_exports,
145
+ init_alarm_types,
146
+ EventCategories,
147
+ EventCriticalities,
148
+ event_types_exports,
149
+ init_event_types,
150
+ UnitTypes,
151
+ unit_types_exports,
152
+ init_unit_types
153
+ };
package/dist/index.cjs CHANGED
@@ -107,6 +107,13 @@ var EventCategories = {
107
107
  LOGS: "AuditLogEvents",
108
108
  POTENTIAL_ATTACK: "PotentialAttackActivity"
109
109
  };
110
+ var EventCriticalities = {
111
+ VERBOSE: "Verbose",
112
+ INFO: "Info",
113
+ WARNING: "Warning",
114
+ ERROR: "Error",
115
+ CRITICAL: "Critical"
116
+ };
110
117
 
111
118
  // app/types/unit.types.ts
112
119
  var UnitTypes = {
@@ -129,6 +136,7 @@ var Types = {
129
136
  ChannelBaseTypes,
130
137
  ChannelSpecificTypes,
131
138
  EventCategories,
139
+ EventCriticalities,
132
140
  UnitTypes
133
141
  };
134
142
  // Annotate the CommonJS export names for ESM import in node:
package/dist/index.d.cts CHANGED
@@ -1,3 +1,106 @@
1
+ declare const AlarmPriorities: {
2
+ readonly CRITICAL: "Critical";
3
+ readonly ALARM: "Alarm";
4
+ readonly WARNING: "Warning";
5
+ };
6
+ type AlarmPriority = (typeof AlarmPriorities)[keyof typeof AlarmPriorities];
7
+ declare const DiamarAlarmStates: {
8
+ readonly INACTIVE: "Inactive";
9
+ readonly ACKNOWLEDGED: "Acknowledged";
10
+ readonly ACTIVE: "Active";
11
+ readonly UNACKNOWLEDGED: "Unacknowledged";
12
+ readonly UNDEFINED: "Undefined";
13
+ };
14
+ type DiamarAlarmState = (typeof DiamarAlarmStates)[keyof typeof DiamarAlarmStates];
15
+ declare const CloudAlarmStates: {
16
+ readonly INACTIVE: "Inactive";
17
+ readonly ALARM: "Active";
18
+ readonly ALARM_ACK: "Acknowledged";
19
+ readonly WARNING: "WarningActive";
20
+ readonly WARNING_ACK: "WarningAcknowledged";
21
+ readonly RETURN_NO_ACK: "Unacknowledged";
22
+ readonly INHIBITED: "Inhibited";
23
+ readonly OFFSCAN: "Offscan";
24
+ readonly UNDEFINED: "Undefined";
25
+ };
26
+ type CloudAlarmState = (typeof CloudAlarmStates)[keyof typeof CloudAlarmStates];
27
+ declare const AlarmTypes: {
28
+ readonly NORMAL: "Normal";
29
+ readonly ALARM_OPEN: "AlarmOpen";
30
+ readonly ALARM_CLOSE: "AlarmClose";
31
+ readonly ALARM_IFH: "AlarmIfh";
32
+ readonly ALARM_HH: "AlarmHh";
33
+ readonly ALARM_H: "AlarmH";
34
+ readonly ALARM_L: "AlarmL";
35
+ readonly ALARM_LL: "AlarmLl";
36
+ readonly ALARM_IFL: "AlarmIfl";
37
+ readonly ALARM_OFFSCAN: "AlarmOffScan";
38
+ readonly ALARM_FAIL: "AlarmFail";
39
+ readonly ALARM_INH: "AlarmInh";
40
+ readonly ALARM_UNK: "AlarmUnk";
41
+ };
42
+ type AlarmType = (typeof AlarmTypes)[keyof typeof AlarmTypes];
43
+
44
+ declare const ChannelBaseTypes: {
45
+ readonly VIRTUAL_ANALOG: "VirtualAnalog";
46
+ readonly VIRTUAL_DIGITAL: "VirtualDigital";
47
+ readonly VIRTUAL_STRING: "VirtualString";
48
+ readonly WIRED_ANALOG: "WiredAnalog";
49
+ readonly WIRED_DIGITAL: "WiredDigital";
50
+ };
51
+ type ChannelBaseType = (typeof ChannelBaseTypes)[keyof typeof ChannelBaseTypes];
52
+ declare const ChannelSpecificTypes: {
53
+ readonly DIGITAL_INPUT: "DigitalInput";
54
+ readonly DIGITAL_OUTPUT: "DigitalOutput";
55
+ readonly ANALOG_INPUT: "AnalogInput";
56
+ readonly ANALOG_OUTPUT: "AnalogOutput";
57
+ readonly ANALOG_SOFTWARE: "AnalogSoftware";
58
+ readonly DIGITAL_SOFTWARE: "DigitalSoftware";
59
+ readonly VIRTUAL_STRING: "VirtualString";
60
+ readonly COMMAND: "Command";
61
+ readonly BROADCAST_COMMAND: "BroadcastCommand";
62
+ readonly SOFTWARE: "Software";
63
+ readonly ANALOG_TIMER: "AnalogTimer";
64
+ readonly SERIAL_DIGITAL_INPUT: "SerialDigitalInput";
65
+ readonly SERIAL_DIGITAL_OUTPUT: "SerialDigitalOutput";
66
+ readonly SERIAL_LINE_COMMAND: "SerialLineCommand";
67
+ readonly SERIAL_ANALOG_INPUT: "SerialAnalogInput";
68
+ readonly SERIAL_ANALOG_OUTPUT: "SerialAnalogOutput";
69
+ };
70
+ type ChannelSpecificType = (typeof ChannelSpecificTypes)[keyof typeof ChannelSpecificTypes];
71
+
72
+ declare const EventCategories: {
73
+ readonly ACCESS_CONTROL: "AccessControl";
74
+ readonly REQUEST_ERROR: "RequestErrors";
75
+ readonly OS: "OperatingSystemEvents";
76
+ readonly CONTROL: "ControlSystemEvents";
77
+ readonly BACKUP: "BackupAndRestoreEvents";
78
+ readonly CONFIG_CHANGE: "ConfigurationChanges";
79
+ readonly LOGS: "AuditLogEvents";
80
+ readonly POTENTIAL_ATTACK: "PotentialAttackActivity";
81
+ };
82
+ type EventCategory = (typeof EventCategories)[keyof typeof EventCategories];
83
+ declare const EventCriticalities: {
84
+ readonly VERBOSE: "Verbose";
85
+ readonly INFO: "Info";
86
+ readonly WARNING: "Warning";
87
+ readonly ERROR: "Error";
88
+ readonly CRITICAL: "Critical";
89
+ };
90
+ type EventCriticality = (typeof EventCriticalities)[keyof typeof EventCriticalities];
91
+
92
+ declare const UnitTypes: {
93
+ readonly AIM18: "Aim18";
94
+ readonly DIM36: "Dim36";
95
+ readonly DIOM24: "Diom24";
96
+ readonly KLIM: "Klim";
97
+ readonly LUM: "Lum";
98
+ readonly PMM: "Pmm";
99
+ readonly SLIM: "Slim";
100
+ readonly TIM28: "Tim28";
101
+ };
102
+ type UnitType = (typeof UnitTypes)[keyof typeof UnitTypes];
103
+
1
104
  declare const Types: {
2
105
  AlarmTypes: {
3
106
  readonly NORMAL: "Normal";
@@ -72,6 +175,13 @@ declare const Types: {
72
175
  readonly LOGS: "AuditLogEvents";
73
176
  readonly POTENTIAL_ATTACK: "PotentialAttackActivity";
74
177
  };
178
+ EventCriticalities: {
179
+ readonly VERBOSE: "Verbose";
180
+ readonly INFO: "Info";
181
+ readonly WARNING: "Warning";
182
+ readonly ERROR: "Error";
183
+ readonly CRITICAL: "Critical";
184
+ };
75
185
  UnitTypes: {
76
186
  readonly AIM18: "Aim18";
77
187
  readonly DIM36: "Dim36";
@@ -84,4 +194,4 @@ declare const Types: {
84
194
  };
85
195
  };
86
196
 
87
- export { Types };
197
+ export { type AlarmPriority, type AlarmType, type ChannelBaseType, type ChannelSpecificType, type CloudAlarmState, type DiamarAlarmState, type EventCategory, type EventCriticality, Types, type UnitType };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,106 @@
1
+ declare const AlarmPriorities: {
2
+ readonly CRITICAL: "Critical";
3
+ readonly ALARM: "Alarm";
4
+ readonly WARNING: "Warning";
5
+ };
6
+ type AlarmPriority = (typeof AlarmPriorities)[keyof typeof AlarmPriorities];
7
+ declare const DiamarAlarmStates: {
8
+ readonly INACTIVE: "Inactive";
9
+ readonly ACKNOWLEDGED: "Acknowledged";
10
+ readonly ACTIVE: "Active";
11
+ readonly UNACKNOWLEDGED: "Unacknowledged";
12
+ readonly UNDEFINED: "Undefined";
13
+ };
14
+ type DiamarAlarmState = (typeof DiamarAlarmStates)[keyof typeof DiamarAlarmStates];
15
+ declare const CloudAlarmStates: {
16
+ readonly INACTIVE: "Inactive";
17
+ readonly ALARM: "Active";
18
+ readonly ALARM_ACK: "Acknowledged";
19
+ readonly WARNING: "WarningActive";
20
+ readonly WARNING_ACK: "WarningAcknowledged";
21
+ readonly RETURN_NO_ACK: "Unacknowledged";
22
+ readonly INHIBITED: "Inhibited";
23
+ readonly OFFSCAN: "Offscan";
24
+ readonly UNDEFINED: "Undefined";
25
+ };
26
+ type CloudAlarmState = (typeof CloudAlarmStates)[keyof typeof CloudAlarmStates];
27
+ declare const AlarmTypes: {
28
+ readonly NORMAL: "Normal";
29
+ readonly ALARM_OPEN: "AlarmOpen";
30
+ readonly ALARM_CLOSE: "AlarmClose";
31
+ readonly ALARM_IFH: "AlarmIfh";
32
+ readonly ALARM_HH: "AlarmHh";
33
+ readonly ALARM_H: "AlarmH";
34
+ readonly ALARM_L: "AlarmL";
35
+ readonly ALARM_LL: "AlarmLl";
36
+ readonly ALARM_IFL: "AlarmIfl";
37
+ readonly ALARM_OFFSCAN: "AlarmOffScan";
38
+ readonly ALARM_FAIL: "AlarmFail";
39
+ readonly ALARM_INH: "AlarmInh";
40
+ readonly ALARM_UNK: "AlarmUnk";
41
+ };
42
+ type AlarmType = (typeof AlarmTypes)[keyof typeof AlarmTypes];
43
+
44
+ declare const ChannelBaseTypes: {
45
+ readonly VIRTUAL_ANALOG: "VirtualAnalog";
46
+ readonly VIRTUAL_DIGITAL: "VirtualDigital";
47
+ readonly VIRTUAL_STRING: "VirtualString";
48
+ readonly WIRED_ANALOG: "WiredAnalog";
49
+ readonly WIRED_DIGITAL: "WiredDigital";
50
+ };
51
+ type ChannelBaseType = (typeof ChannelBaseTypes)[keyof typeof ChannelBaseTypes];
52
+ declare const ChannelSpecificTypes: {
53
+ readonly DIGITAL_INPUT: "DigitalInput";
54
+ readonly DIGITAL_OUTPUT: "DigitalOutput";
55
+ readonly ANALOG_INPUT: "AnalogInput";
56
+ readonly ANALOG_OUTPUT: "AnalogOutput";
57
+ readonly ANALOG_SOFTWARE: "AnalogSoftware";
58
+ readonly DIGITAL_SOFTWARE: "DigitalSoftware";
59
+ readonly VIRTUAL_STRING: "VirtualString";
60
+ readonly COMMAND: "Command";
61
+ readonly BROADCAST_COMMAND: "BroadcastCommand";
62
+ readonly SOFTWARE: "Software";
63
+ readonly ANALOG_TIMER: "AnalogTimer";
64
+ readonly SERIAL_DIGITAL_INPUT: "SerialDigitalInput";
65
+ readonly SERIAL_DIGITAL_OUTPUT: "SerialDigitalOutput";
66
+ readonly SERIAL_LINE_COMMAND: "SerialLineCommand";
67
+ readonly SERIAL_ANALOG_INPUT: "SerialAnalogInput";
68
+ readonly SERIAL_ANALOG_OUTPUT: "SerialAnalogOutput";
69
+ };
70
+ type ChannelSpecificType = (typeof ChannelSpecificTypes)[keyof typeof ChannelSpecificTypes];
71
+
72
+ declare const EventCategories: {
73
+ readonly ACCESS_CONTROL: "AccessControl";
74
+ readonly REQUEST_ERROR: "RequestErrors";
75
+ readonly OS: "OperatingSystemEvents";
76
+ readonly CONTROL: "ControlSystemEvents";
77
+ readonly BACKUP: "BackupAndRestoreEvents";
78
+ readonly CONFIG_CHANGE: "ConfigurationChanges";
79
+ readonly LOGS: "AuditLogEvents";
80
+ readonly POTENTIAL_ATTACK: "PotentialAttackActivity";
81
+ };
82
+ type EventCategory = (typeof EventCategories)[keyof typeof EventCategories];
83
+ declare const EventCriticalities: {
84
+ readonly VERBOSE: "Verbose";
85
+ readonly INFO: "Info";
86
+ readonly WARNING: "Warning";
87
+ readonly ERROR: "Error";
88
+ readonly CRITICAL: "Critical";
89
+ };
90
+ type EventCriticality = (typeof EventCriticalities)[keyof typeof EventCriticalities];
91
+
92
+ declare const UnitTypes: {
93
+ readonly AIM18: "Aim18";
94
+ readonly DIM36: "Dim36";
95
+ readonly DIOM24: "Diom24";
96
+ readonly KLIM: "Klim";
97
+ readonly LUM: "Lum";
98
+ readonly PMM: "Pmm";
99
+ readonly SLIM: "Slim";
100
+ readonly TIM28: "Tim28";
101
+ };
102
+ type UnitType = (typeof UnitTypes)[keyof typeof UnitTypes];
103
+
1
104
  declare const Types: {
2
105
  AlarmTypes: {
3
106
  readonly NORMAL: "Normal";
@@ -72,6 +175,13 @@ declare const Types: {
72
175
  readonly LOGS: "AuditLogEvents";
73
176
  readonly POTENTIAL_ATTACK: "PotentialAttackActivity";
74
177
  };
178
+ EventCriticalities: {
179
+ readonly VERBOSE: "Verbose";
180
+ readonly INFO: "Info";
181
+ readonly WARNING: "Warning";
182
+ readonly ERROR: "Error";
183
+ readonly CRITICAL: "Critical";
184
+ };
75
185
  UnitTypes: {
76
186
  readonly AIM18: "Aim18";
77
187
  readonly DIM36: "Dim36";
@@ -84,4 +194,4 @@ declare const Types: {
84
194
  };
85
195
  };
86
196
 
87
- export { Types };
197
+ export { type AlarmPriority, type AlarmType, type ChannelBaseType, type ChannelSpecificType, type CloudAlarmState, type DiamarAlarmState, type EventCategory, type EventCriticality, Types, type UnitType };
package/dist/index.js CHANGED
@@ -4,11 +4,12 @@ import {
4
4
  CloudAlarmStates,
5
5
  DiamarAlarmStates,
6
6
  EventCategories,
7
+ EventCriticalities,
7
8
  UnitTypes,
8
9
  init_alarm_types,
9
10
  init_event_types,
10
11
  init_unit_types
11
- } from "./chunk-NCUZ3O3P.js";
12
+ } from "./chunk-AOC7BD5E.js";
12
13
 
13
14
  // app/index.ts
14
15
  init_alarm_types();
@@ -56,6 +57,7 @@ var Types = {
56
57
  ChannelBaseTypes,
57
58
  ChannelSpecificTypes,
58
59
  EventCategories,
60
+ EventCriticalities,
59
61
  UnitTypes
60
62
  };
61
63
  export {
@@ -8,7 +8,7 @@ import {
8
8
  init_event_types,
9
9
  init_unit_types,
10
10
  unit_types_exports
11
- } from "./chunk-NCUZ3O3P.js";
11
+ } from "./chunk-AOC7BD5E.js";
12
12
 
13
13
  // app/models/Channel.cjs
14
14
  var require_Channel = __commonJS({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sedni/cloud_common",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Common package for all types, resources and tools of Diamar Cloud",
5
5
  "type": "module",
6
6
  "main": "./dist/node-entry.cjs",
@@ -16,6 +16,7 @@
16
16
  },
17
17
  "exports": {
18
18
  ".": {
19
+ "types": "./dist/index.d.ts",
19
20
  "import": "./dist/index.js",
20
21
  "require": "./dist/node-entry.cjs"
21
22
  }