@sedni/cloud_common 2.1.0 → 3.0.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.
package/dist/index.cjs CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,15 +17,295 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // app/index.ts
21
31
  var index_exports = {};
22
32
  __export(index_exports, {
23
- Types: () => Types
33
+ Docs: () => docs_default,
34
+ Mimics: () => Mimics,
35
+ MimicsRequest: () => MimicsRequest,
36
+ MimicsResponse: () => MimicsResponse,
37
+ Schemas: () => Schemas,
38
+ Types: () => Types,
39
+ default: () => index_default
24
40
  });
25
41
  module.exports = __toCommonJS(index_exports);
26
42
 
43
+ // app/models/Channel.ts
44
+ var import_mongoose = __toESM(require("mongoose"), 1);
45
+ var import_mongoose_aggregate_paginate_v2 = __toESM(require("mongoose-aggregate-paginate-v2"), 1);
46
+ var import_mongoose_autopopulate = __toESM(require("mongoose-autopopulate"), 1);
47
+ var import_mongoose_paginate_v2 = __toESM(require("mongoose-paginate-v2"), 1);
48
+ var channelSchema = new import_mongoose.default.Schema({
49
+ channel_tag: {
50
+ type: String,
51
+ required: true
52
+ },
53
+ channel_description: {
54
+ type: String,
55
+ required: true
56
+ },
57
+ channel_unit_id: {
58
+ type: import_mongoose.default.Schema.Types.ObjectId,
59
+ ref: "Unit",
60
+ required: true,
61
+ autopopulate: true
62
+ },
63
+ channel_parsed: {
64
+ type: Object,
65
+ required: true
66
+ },
67
+ channel_last_bucket_sync: {
68
+ type: Date,
69
+ required: false
70
+ }
71
+ }, {
72
+ timestamps: {
73
+ createdAt: true,
74
+ updatedAt: true
75
+ },
76
+ collection: "channels",
77
+ toJSON: {
78
+ transform: function(_doc, ret) {
79
+ ret.id = ret._id;
80
+ ret.channel_unit = ret.channel_unit_id;
81
+ ret.channel_unit_id = ret.channel_unit_id.unit_id;
82
+ delete ret._id;
83
+ delete ret.__v;
84
+ }
85
+ }
86
+ });
87
+ channelSchema.index({ channel_tag: 1 }, { unique: true });
88
+ channelSchema.index({ channel_description: 1 });
89
+ channelSchema.plugin(import_mongoose_paginate_v2.default);
90
+ channelSchema.plugin(import_mongoose_aggregate_paginate_v2.default);
91
+ channelSchema.plugin(import_mongoose_autopopulate.default);
92
+ var Channel_default = channelSchema;
93
+
94
+ // app/models/ChannelDataBucket.ts
95
+ var import_mongoose2 = __toESM(require("mongoose"), 1);
96
+ var import_mongoose_paginate_v22 = __toESM(require("mongoose-paginate-v2"), 1);
97
+ var import_mongoose_aggregate_paginate_v22 = __toESM(require("mongoose-aggregate-paginate-v2"), 1);
98
+ var dataPointSchema = new import_mongoose2.default.Schema({
99
+ channel_id: {
100
+ type: String,
101
+ required: true,
102
+ index: true
103
+ },
104
+ timestamp: {
105
+ type: Number,
106
+ required: true
107
+ },
108
+ value: {
109
+ type: Number,
110
+ required: true
111
+ }
112
+ }, {
113
+ _id: false
114
+ });
115
+ var channeldataBucketSchema = new import_mongoose2.default.Schema({
116
+ start_date: {
117
+ type: Date,
118
+ required: true,
119
+ default: Date.now
120
+ },
121
+ end_date: {
122
+ type: Date,
123
+ required: true,
124
+ default: function() {
125
+ return new Date(Date.now() + 1e3 * 60 * 60);
126
+ }
127
+ },
128
+ data: {
129
+ type: [dataPointSchema],
130
+ required: true,
131
+ default: []
132
+ },
133
+ size: {
134
+ type: Number,
135
+ required: true,
136
+ default: 0
137
+ },
138
+ synced: {
139
+ type: Number,
140
+ required: true,
141
+ default: 0
142
+ },
143
+ sum: {
144
+ type: Number,
145
+ required: true,
146
+ default: 0
147
+ }
148
+ }, {
149
+ toJSON: {
150
+ transform: function(doc, ret) {
151
+ ret.id = ret._id;
152
+ delete ret._id;
153
+ delete ret.__v;
154
+ ret.start_date = ret.start_date.getTime();
155
+ ret.end_date = ret.end_date.getTime();
156
+ ret.avg = ret.sum / ret.size;
157
+ }
158
+ },
159
+ versionKey: false
160
+ });
161
+ channeldataBucketSchema.index({ start_date: 1, end_date: 1 }, { background: true });
162
+ channeldataBucketSchema.index({ "start_date": 1, "end_date": 1, "data.channel_id": 1 }, { background: true });
163
+ channeldataBucketSchema.index({ start_date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 365, background: true });
164
+ channeldataBucketSchema.plugin(import_mongoose_paginate_v22.default);
165
+ channeldataBucketSchema.plugin(import_mongoose_aggregate_paginate_v22.default);
166
+ var ChannelDataBucket_default = channeldataBucketSchema;
167
+
168
+ // app/models/ChannelDataPoint.ts
169
+ var import_mongoose3 = __toESM(require("mongoose"), 1);
170
+ var import_mongoose_paginate_v23 = __toESM(require("mongoose-paginate-v2"), 1);
171
+ var import_mongoose_aggregate_paginate_v23 = __toESM(require("mongoose-aggregate-paginate-v2"), 1);
172
+ var channelDataPointSchema = new import_mongoose3.default.Schema({
173
+ c: {
174
+ type: String,
175
+ required: true,
176
+ index: true,
177
+ alias: "channel_id"
178
+ },
179
+ t: {
180
+ type: Date,
181
+ required: true,
182
+ alias: "timestamp"
183
+ },
184
+ v: {
185
+ type: Number,
186
+ required: true,
187
+ alias: "value"
188
+ }
189
+ }, {
190
+ collection: "channel_data_points",
191
+ timestamps: false,
192
+ timeseries: {
193
+ timeField: "t",
194
+ metaField: "c",
195
+ granularity: "seconds"
196
+ },
197
+ toJSON: { getters: true },
198
+ toObject: { getters: true },
199
+ versionKey: false
200
+ });
201
+ channelDataPointSchema.index({ c: 1, t: 1 });
202
+ var oneYear = 60 * 60 * 24 * 365;
203
+ channelDataPointSchema.addTTLIndex = function(expirationTimeInSeconds = oneYear, ttlField = "t", metaField = "c") {
204
+ this.index({
205
+ [ttlField]: 1
206
+ }, {
207
+ expireAfterSeconds: expirationTimeInSeconds,
208
+ partialFilterExpression: {
209
+ [metaField]: {
210
+ $exists: true
211
+ }
212
+ },
213
+ name: "ttl_index_" + ttlField
214
+ });
215
+ };
216
+ channelDataPointSchema.plugin(import_mongoose_paginate_v23.default);
217
+ channelDataPointSchema.plugin(import_mongoose_aggregate_paginate_v23.default);
218
+ var ChannelDataPoint_default = channelDataPointSchema;
219
+
220
+ // app/models/Event.ts
221
+ var import_mongoose4 = __toESM(require("mongoose"), 1);
222
+ var import_mongoose_paginate_v24 = __toESM(require("mongoose-paginate-v2"), 1);
223
+ var import_mongoose_aggregate_paginate_v24 = __toESM(require("mongoose-aggregate-paginate-v2"), 1);
224
+
225
+ // app/types/event.types.ts
226
+ var EventCategories = {
227
+ ACCESS_CONTROL: "AccessControl",
228
+ REQUEST_ERROR: "RequestErrors",
229
+ OS: "OperatingSystemEvents",
230
+ CONTROL: "ControlSystemEvents",
231
+ BACKUP: "BackupAndRestoreEvents",
232
+ CONFIG_CHANGE: "ConfigurationChanges",
233
+ LOGS: "AuditLogEvents",
234
+ POTENTIAL_ATTACK: "PotentialAttackActivity"
235
+ };
236
+ var EventCriticalities = {
237
+ VERBOSE: "Verbose",
238
+ INFO: "Info",
239
+ WARNING: "Warning",
240
+ ERROR: "Error",
241
+ CRITICAL: "Critical"
242
+ };
243
+
244
+ // app/models/Event.ts
245
+ var eventSchema = new import_mongoose4.default.Schema({
246
+ event_message: {
247
+ type: String,
248
+ required: true
249
+ },
250
+ event_source: {
251
+ type: String,
252
+ required: true
253
+ },
254
+ event_user: {
255
+ type: String,
256
+ required: false
257
+ },
258
+ event_category: {
259
+ type: String,
260
+ required: true,
261
+ enum: Object.values(EventCategories)
262
+ },
263
+ event_criticality: {
264
+ type: String,
265
+ required: true,
266
+ enum: Object.values(EventCriticalities)
267
+ },
268
+ event_type: {
269
+ type: String,
270
+ required: true
271
+ },
272
+ event_timestamp: {
273
+ type: Date,
274
+ default: Date.now
275
+ },
276
+ event_data: {
277
+ type: Object
278
+ }
279
+ }, {
280
+ timestamps: {
281
+ createdAt: true,
282
+ updatedAt: false
283
+ },
284
+ versionKey: false,
285
+ toJSON: {
286
+ transform: function(doc, ret) {
287
+ ret.id = ret._id;
288
+ delete ret._id;
289
+ delete ret.createdAt;
290
+ ret.event_timestamp = ret.event_timestamp.getTime();
291
+ }
292
+ }
293
+ });
294
+ eventSchema.index({ event_type: 1 });
295
+ eventSchema.index({ event_category: 1 });
296
+ var oneYear2 = 60 * 60 * 24 * 365;
297
+ eventSchema.addTTLIndex = function(expirationTimeInSeconds = oneYear2, ttlField = "event_timestamp") {
298
+ this.index({ [ttlField]: 1 }, { expireAfterSeconds: expirationTimeInSeconds });
299
+ };
300
+ eventSchema.plugin(import_mongoose_paginate_v24.default);
301
+ eventSchema.plugin(import_mongoose_aggregate_paginate_v24.default);
302
+ var Event_default = eventSchema;
303
+
304
+ // app/models/History.ts
305
+ var import_mongoose5 = __toESM(require("mongoose"), 1);
306
+ var import_mongoose_paginate_v25 = __toESM(require("mongoose-paginate-v2"), 1);
307
+ var import_mongoose_aggregate_paginate_v25 = __toESM(require("mongoose-aggregate-paginate-v2"), 1);
308
+
27
309
  // app/types/alarm.types.ts
28
310
  var AlarmPriorities = {
29
311
  CRITICAL: "Critical",
@@ -64,6 +346,1775 @@ var AlarmTypes = {
64
346
  ALARM_UNK: "AlarmUnk"
65
347
  };
66
348
 
349
+ // app/models/History.ts
350
+ var historySchema = new import_mongoose5.default.Schema({
351
+ channel_tag: {
352
+ type: String,
353
+ required: true
354
+ },
355
+ alarm_timestamp: {
356
+ type: Date,
357
+ required: true,
358
+ default: Date.now
359
+ },
360
+ alarm_priority: {
361
+ type: String,
362
+ required: true,
363
+ enum: Object.values(AlarmPriorities)
364
+ },
365
+ alarm_original_state: {
366
+ type: String,
367
+ required: true,
368
+ enum: Object.values(DiamarAlarmStates)
369
+ },
370
+ alarm_state: {
371
+ type: String,
372
+ required: true,
373
+ enum: Object.values(CloudAlarmStates)
374
+ },
375
+ alarm_type: {
376
+ type: String,
377
+ required: true,
378
+ enum: Object.values(AlarmTypes)
379
+ },
380
+ alarm_value: {
381
+ type: Number,
382
+ required: false
383
+ },
384
+ alarm_message: {
385
+ type: String,
386
+ required: false
387
+ },
388
+ alarm_data: {
389
+ type: Object,
390
+ required: false
391
+ }
392
+ }, {
393
+ timestamps: {
394
+ createdAt: false,
395
+ updatedAt: false
396
+ },
397
+ versionKey: false,
398
+ collection: "history",
399
+ toJSON: {
400
+ transform: function(doc, ret) {
401
+ ret.id = ret._id;
402
+ delete ret._id;
403
+ delete ret.__v;
404
+ ret.alarm_timestamp = new Date(ret.alarm_timestamp).getTime();
405
+ ret.alarm = {
406
+ alarm_priority: ret.alarm_priority,
407
+ alarm_state: ret.alarm_original_state ?? "Inactive",
408
+ alarm_type: ret.alarm_type,
409
+ alarm_value: ret.alarm_value === null ? "inf" : `${ret.alarm_value}`,
410
+ alarm_timestamp: new Date(ret.alarm_timestamp).getTime()
411
+ };
412
+ }
413
+ }
414
+ });
415
+ historySchema.index({ channel_tag: 1 });
416
+ var oneYear3 = 60 * 60 * 24 * 365;
417
+ historySchema.addTTLIndex = function(expirationTimeInSeconds = oneYear3, ttlField = "alarm_timestamp") {
418
+ this.index({ [ttlField]: 1 }, { expireAfterSeconds: expirationTimeInSeconds });
419
+ };
420
+ historySchema.plugin(import_mongoose_paginate_v25.default);
421
+ historySchema.plugin(import_mongoose_aggregate_paginate_v25.default);
422
+ var History_default = historySchema;
423
+
424
+ // app/models/Unit.ts
425
+ var import_mongoose6 = __toESM(require("mongoose"), 1);
426
+ var import_mongoose_paginate_v26 = __toESM(require("mongoose-paginate-v2"), 1);
427
+ var import_mongoose_aggregate_paginate_v26 = __toESM(require("mongoose-aggregate-paginate-v2"), 1);
428
+
429
+ // app/types/unit.types.ts
430
+ var UnitTypes = {
431
+ AIM18: "Aim18",
432
+ DIM36: "Dim36",
433
+ DIOM24: "Diom24",
434
+ KLIM: "Klim",
435
+ LUM: "Lum",
436
+ PMM: "Pmm",
437
+ SLIM: "Slim",
438
+ TIM28: "Tim28"
439
+ };
440
+
441
+ // app/models/Unit.ts
442
+ var unitSchema = new import_mongoose6.default.Schema({
443
+ unit_id: {
444
+ type: String,
445
+ required: true
446
+ },
447
+ unit_enabled: {
448
+ type: Boolean,
449
+ required: true
450
+ },
451
+ unit_type: {
452
+ type: String,
453
+ required: true,
454
+ enum: Object.values(UnitTypes)
455
+ },
456
+ unit_internal_description: {
457
+ type: String,
458
+ required: true
459
+ },
460
+ unit_cabinet_id: {
461
+ type: String,
462
+ required: false
463
+ }
464
+ }, {
465
+ timestamps: true,
466
+ collection: "units",
467
+ toJSON: {
468
+ transform: function(doc, ret) {
469
+ ret.id = ret._id;
470
+ delete ret._id;
471
+ delete ret.__v;
472
+ }
473
+ }
474
+ });
475
+ unitSchema.index({ unit_id: 1 }, { unique: true });
476
+ unitSchema.index({ unit_internal_description: 1 });
477
+ unitSchema.plugin(import_mongoose_paginate_v26.default);
478
+ unitSchema.plugin(import_mongoose_aggregate_paginate_v26.default);
479
+ var Unit_default = unitSchema;
480
+
481
+ // app/models/docs/Channel.json
482
+ var Channel_default2 = {
483
+ components: {
484
+ schemas: {
485
+ Channel: {
486
+ type: "object",
487
+ properties: {
488
+ id: {
489
+ type: "string",
490
+ format: "ObjectId",
491
+ description: "MongoDB ObjectId",
492
+ example: "507f1f77bcf86cd799439011",
493
+ readOnly: true
494
+ },
495
+ channel_tag: {
496
+ type: "string",
497
+ description: "Channel tag",
498
+ example: "MOTOR_PS_TEMP",
499
+ readOnly: true
500
+ },
501
+ channel_description: {
502
+ type: "string",
503
+ description: "Channel description",
504
+ example: "Motor Power Supply Temperature",
505
+ readOnly: true
506
+ },
507
+ channel_unit_id: {
508
+ type: "string",
509
+ format: "ObjectId",
510
+ description: "Unit of the channel",
511
+ example: "507f1f77bcf86cd799439011",
512
+ readOnly: true
513
+ },
514
+ channel_parsed: {
515
+ type: "object",
516
+ description: "Parsed channel data",
517
+ readOnly: true
518
+ }
519
+ },
520
+ required: [
521
+ "channel_tag",
522
+ "channel_description",
523
+ "channel_unit_id",
524
+ "channel_parsed"
525
+ ]
526
+ }
527
+ },
528
+ examples: {
529
+ Channel: {
530
+ value: {
531
+ id: "507f1f77bcf86cd799439011",
532
+ channel_tag: "MOTOR_PS_TEMP",
533
+ channel_description: "Motor Power Supply Temperature",
534
+ channel_type: "Analogic"
535
+ }
536
+ }
537
+ }
538
+ }
539
+ };
540
+
541
+ // app/models/docs/ChannelDataBucket.json
542
+ var ChannelDataBucket_default2 = {
543
+ components: {
544
+ schemas: {
545
+ ChannelData: {
546
+ type: "object",
547
+ description: "ChannelData object. This is the bucket where the data is stored, in batches of 1 hour.",
548
+ properties: {
549
+ id: {
550
+ type: "string",
551
+ format: "ObjectId",
552
+ description: "MongoDB ObjectId",
553
+ example: "507f1f77bcf86cd799439011",
554
+ readOnly: true
555
+ },
556
+ start_date: {
557
+ type: "string",
558
+ format: "date-time",
559
+ description: "Start date of the data",
560
+ example: "2024-07-03T10:15:30Z",
561
+ readOnly: true
562
+ },
563
+ end_date: {
564
+ type: "string",
565
+ format: "date-time",
566
+ description: "End date of the data",
567
+ example: "2024-07-03T11:15:30Z",
568
+ readOnly: true
569
+ },
570
+ data: {
571
+ type: "array",
572
+ description: "Data array of DataPoint objects",
573
+ items: {
574
+ $ref: "#/components/schemas/DataPoint"
575
+ },
576
+ readOnly: false
577
+ },
578
+ size: {
579
+ type: "integer",
580
+ format: "int64",
581
+ description: "Size of the data array",
582
+ example: 60,
583
+ readOnly: true
584
+ },
585
+ synced: {
586
+ type: "TODO",
587
+ description: "TODO",
588
+ example: "TODO",
589
+ readOnly: true
590
+ },
591
+ sum: {
592
+ type: "number",
593
+ format: "double",
594
+ description: "Sum of the data",
595
+ example: 69.42,
596
+ readOnly: true
597
+ }
598
+ }
599
+ }
600
+ },
601
+ examples: {
602
+ ChannelData: {
603
+ id: "507f1f77bcf86cd799439011",
604
+ start_date: "2024-07-03T10:15:30Z",
605
+ end_date: "2024-07-03T11:15:30Z",
606
+ data: [
607
+ {
608
+ t: 1710251647e3,
609
+ v: 69.42
610
+ }
611
+ ],
612
+ size: 60,
613
+ synced: "TODO",
614
+ sum: 69.42
615
+ }
616
+ }
617
+ }
618
+ };
619
+
620
+ // app/models/docs/ChannelWithData.json
621
+ var ChannelWithData_default = {
622
+ components: {
623
+ schemas: {
624
+ ChannelWithData: {
625
+ allOf: [
626
+ {
627
+ $ref: "#/components/schemas/Channel"
628
+ },
629
+ {
630
+ type: "object",
631
+ properties: {
632
+ channel_latest_value: {
633
+ type: "string",
634
+ description: "Latest value of the channel",
635
+ example: "25.0",
636
+ readOnly: true
637
+ },
638
+ channel_latest_timestamp: {
639
+ type: "string",
640
+ format: "date-time",
641
+ description: "Timestamp of the latest value",
642
+ example: 1700034034,
643
+ readOnly: true
644
+ },
645
+ channel_alarm_state: {
646
+ type: "string",
647
+ description: "Alarm state of the channel",
648
+ example: "NoAlarm",
649
+ readOnly: true
650
+ }
651
+ }
652
+ }
653
+ ],
654
+ required: [
655
+ "channel_tag",
656
+ "channel_description",
657
+ "channel_type",
658
+ "channel_latest_value",
659
+ "channel_latest_timestamp",
660
+ "channel_alarm_state"
661
+ ]
662
+ }
663
+ },
664
+ examples: {
665
+ ChannelWithData: {
666
+ value: {
667
+ id: "507f1f77bcf86cd799439011",
668
+ channel_tag: "MOTOR_PS_TEMP",
669
+ channel_description: "Motor Power Supply Temperature",
670
+ channel_type: "Analogic",
671
+ channel_latest_value: 420.69,
672
+ channel_latest_timestamp: 1700034034,
673
+ channel_alarm_state: "NoAlarm"
674
+ }
675
+ }
676
+ }
677
+ }
678
+ };
679
+
680
+ // app/models/docs/ChannelDataPoint.json
681
+ var ChannelDataPoint_default2 = {
682
+ components: {
683
+ schemas: {
684
+ ChannelDataPoint: {
685
+ type: "object",
686
+ description: "ChannelDataPoint object. This is the object that is sent to and from the API. It includes only the timestamp and the value. No id is included because the data is stored inside a larger bucket in the database.",
687
+ properties: {
688
+ c: {
689
+ type: "string",
690
+ description: "Channel ID associated with the data point",
691
+ example: "U001_001",
692
+ readOnly: true
693
+ },
694
+ t: {
695
+ type: "integer",
696
+ format: "int64",
697
+ description: "Timestamp of the data",
698
+ example: 1710251647e3,
699
+ readOnly: true
700
+ },
701
+ v: {
702
+ type: "number",
703
+ format: "double",
704
+ description: "Value of the data",
705
+ example: 69.42,
706
+ readOnly: true
707
+ }
708
+ }
709
+ }
710
+ },
711
+ examples: {
712
+ ChannelDataPoint: {
713
+ c: "U001_001",
714
+ t: 1710251647e3,
715
+ v: 69.42
716
+ }
717
+ }
718
+ }
719
+ };
720
+
721
+ // app/models/docs/Event.json
722
+ var Event_default2 = {
723
+ components: {
724
+ schemas: {
725
+ Event: {
726
+ type: "object",
727
+ description: "Event object. This is the object that is sent to and from the API. It includes the id as a string, the timestamp as a number and the creation timestamp is not included.",
728
+ properties: {
729
+ id: {
730
+ type: "string",
731
+ format: "ObjectId",
732
+ description: "MongoDB ObjectId",
733
+ example: "507f1f77bcf86cd799439011",
734
+ readOnly: true
735
+ },
736
+ event_message: {
737
+ type: "string",
738
+ format: "text",
739
+ description: "Event message",
740
+ example: "Event message"
741
+ },
742
+ event_source: {
743
+ type: "string",
744
+ format: "text",
745
+ description: "Hostname of the source of the event",
746
+ example: "RMS1"
747
+ },
748
+ event_category: {
749
+ type: "string",
750
+ format: "text",
751
+ description: "Event category",
752
+ example: "Login",
753
+ enum: "%%EVENT_CATEGORY_ENUM%%"
754
+ },
755
+ event_type: {
756
+ type: "string",
757
+ format: "text",
758
+ description: "Event type",
759
+ example: "Login"
760
+ },
761
+ event_timestamp: {
762
+ type: "number",
763
+ format: "timestamp",
764
+ description: "Event timestamp",
765
+ example: 1709899759
766
+ },
767
+ event_data: {
768
+ type: "object",
769
+ description: "Event data. Not validated, just stored"
770
+ }
771
+ },
772
+ required: [
773
+ "event_message",
774
+ "event_source",
775
+ "event_category",
776
+ "event_type",
777
+ "event_timestamp"
778
+ ]
779
+ }
780
+ },
781
+ examples: {
782
+ Event: {
783
+ value: {
784
+ id: "507f1f77bcf86cd799439011",
785
+ event_message: "Profile Root logged in for the next 600 seconds, replacing profile Root.",
786
+ event_source: "RMS1",
787
+ event_category: "Login",
788
+ event_type: "LoiginSuccessful",
789
+ event_timestamp: 1709899759,
790
+ event_data: {
791
+ profile: "Root",
792
+ duration: 600,
793
+ replaced_profile: "Monitor"
794
+ }
795
+ }
796
+ }
797
+ }
798
+ }
799
+ };
800
+
801
+ // app/models/docs/History.json
802
+ var History_default2 = {
803
+ components: {
804
+ schemas: {
805
+ History: {
806
+ type: "object",
807
+ properties: {
808
+ id: {
809
+ type: "string",
810
+ format: "ObjectId",
811
+ description: "MongoDB ObjectId",
812
+ example: "507f1f77bcf86cd799439011",
813
+ readOnly: true
814
+ },
815
+ channel_tag: {
816
+ type: "string",
817
+ format: "text",
818
+ description: "Channel tag",
819
+ example: "Channel tag",
820
+ readOnly: true
821
+ },
822
+ alarm_timestamp: {
823
+ type: "string",
824
+ format: "date-time",
825
+ description: "Alarm timestamp",
826
+ example: "2020-12-31T23:59:59Z",
827
+ readOnly: true
828
+ },
829
+ alarm_priority: {
830
+ type: "string",
831
+ format: "text",
832
+ description: "Alarm priority",
833
+ example: "Alarm",
834
+ enum: "%%ALARM_PRIORITY_ENUM%%",
835
+ readOnly: true
836
+ },
837
+ alarm_original_state: {
838
+ type: "string",
839
+ format: "text",
840
+ description: "Alarm original state",
841
+ example: "Inactive",
842
+ enum: "%%DIAMAR_ALARM_STATE_ENUM%%",
843
+ readOnly: true
844
+ },
845
+ alarm_state: {
846
+ type: "string",
847
+ format: "text",
848
+ description: "Alarm new state",
849
+ example: "Inactive",
850
+ enum: "%%CLOUD_ALARM_STATE_ENUM%%",
851
+ readOnly: true
852
+ },
853
+ alarm_type: {
854
+ type: "string",
855
+ format: "text",
856
+ description: "Alarm type",
857
+ example: "AlarmOpen",
858
+ enum: "%%ALARM_TYPE_ENUM%%",
859
+ readOnly: true
860
+ },
861
+ alarm_value: {
862
+ type: "number",
863
+ format: "double",
864
+ description: "Alarm value",
865
+ example: 0,
866
+ readOnly: true
867
+ },
868
+ alarm_message: {
869
+ type: "string",
870
+ format: "text",
871
+ description: "Alarm message",
872
+ example: "Alarm message",
873
+ readOnly: true
874
+ }
875
+ },
876
+ required: [
877
+ "channel_tag",
878
+ "alarm_timestamp",
879
+ "alarm_priority",
880
+ "alarm_original_state",
881
+ "alarm_state",
882
+ "alarm_type",
883
+ "alarm_value",
884
+ "alarm_message"
885
+ ]
886
+ }
887
+ },
888
+ examples: {
889
+ History: {
890
+ value: {
891
+ id: "507f1f77bcf86cd799439011",
892
+ channel_tag: "Channel tag",
893
+ alarm_timestamp: "2020-12-31T23:59:59Z",
894
+ alarm_priority: "Alarm",
895
+ alarm_original_state: "Inactive",
896
+ alarm_state: "Inactive",
897
+ alarm_type: "AlarmOpen",
898
+ alarm_value: 0,
899
+ alarm_message: "AlarmOpen Value: [OP]"
900
+ }
901
+ }
902
+ }
903
+ }
904
+ };
905
+
906
+ // app/models/docs/Unit.json
907
+ var Unit_default2 = {
908
+ components: {
909
+ schemas: {
910
+ Unit: {
911
+ type: "object",
912
+ properties: {
913
+ id: {
914
+ type: "string",
915
+ format: "ObjectId",
916
+ description: "MongoDB ObjectId",
917
+ example: "507f1f77bcf86cd799439011",
918
+ readOnly: true
919
+ },
920
+ unit_id: {
921
+ type: "string",
922
+ description: "Unit identifier in Diamar",
923
+ example: "127",
924
+ readOnly: true
925
+ },
926
+ unit_internal_description: {
927
+ type: "string",
928
+ description: "Unit description",
929
+ example: "Motor Power Supply",
930
+ readOnly: true
931
+ },
932
+ unit_enabled: {
933
+ type: "boolean",
934
+ description: "Unit enabled",
935
+ example: true,
936
+ readOnly: true
937
+ },
938
+ unit_type: {
939
+ type: "string",
940
+ description: "Unit type",
941
+ example: "DIM36",
942
+ readOnly: true
943
+ },
944
+ unit_cabinet_id: {
945
+ type: "string",
946
+ description: "Cabinet identifier",
947
+ example: "Cabinet 1",
948
+ readOnly: true
949
+ }
950
+ },
951
+ required: [
952
+ "unit_id",
953
+ "unit_internal_description",
954
+ "unit_enabled",
955
+ "unit_type",
956
+ "unit_cabinet_id"
957
+ ]
958
+ }
959
+ },
960
+ examples: {
961
+ Unit: {
962
+ value: {
963
+ id: "507f1f77bcf86cd799439011",
964
+ unit_id: "127",
965
+ unit_internal_description: "Motor Power Supply",
966
+ unit_enabled: true,
967
+ unit_type: "DIM36",
968
+ unit_cabinet_id: "Cabinet 1"
969
+ }
970
+ }
971
+ }
972
+ }
973
+ };
974
+
975
+ // app/models/docs/index.ts
976
+ History_default2.components.schemas.History.properties.alarm_priority.enum = Object.values(AlarmPriorities);
977
+ History_default2.components.schemas.History.properties.alarm_state.enum = Object.values(CloudAlarmStates);
978
+ History_default2.components.schemas.History.properties.alarm_original_state.enum = Object.values(DiamarAlarmStates);
979
+ History_default2.components.schemas.History.properties.alarm_type.enum = Object.values(AlarmTypes);
980
+ Event_default2.components.schemas.Event.properties.event_category.enum = Object.values(EventCategories);
981
+ var Docs = {
982
+ ChannelDocs: Channel_default2,
983
+ ChannelDataBucketDocs: ChannelDataBucket_default2,
984
+ ChannelWithDataDocs: ChannelWithData_default,
985
+ ChannelDataPointDocs: ChannelDataPoint_default2,
986
+ EventDocs: Event_default2,
987
+ HistoryDocs: History_default2,
988
+ UnitDocs: Unit_default2
989
+ };
990
+ var docs_default = Docs;
991
+
992
+ // app/types/mimics.types.ts
993
+ var MimicElementTypes = {
994
+ // Auxiliary
995
+ IMAGE: "Image",
996
+ LINE: "Line",
997
+ SQUARE: "Square",
998
+ LINK: "Link",
999
+ POLYLINE: "Polyline",
1000
+ TEXT: "Text",
1001
+ // Elements
1002
+ ALARM_INDICATOR: "AlarmIndicator",
1003
+ BREAKER: "Breaker",
1004
+ COMMAND: "Command",
1005
+ COMPRESSOR: "Compressor",
1006
+ DAMPER: "Damper",
1007
+ DIAL: "Dial",
1008
+ DIGITAL: "Digital",
1009
+ DISPLAY: "Display",
1010
+ FAN: "Fan",
1011
+ GENERATOR: "Generator",
1012
+ LEVEL_BAR: "LevelBar",
1013
+ PUMP: "Pump",
1014
+ SHAFT: "Shaft",
1015
+ TEXT_CHANNEL: "TextChannel",
1016
+ DYNAMIC_TEXT: "DynamicText",
1017
+ TANK: "Tank",
1018
+ VALVE: "Valve",
1019
+ SLIDER: "Slider",
1020
+ TOGGLE: "Toggle",
1021
+ // IAS
1022
+ UNIT: "Unit",
1023
+ REPEATER: "Repeater",
1024
+ STATION: "Station",
1025
+ CABINET: "Cabinet",
1026
+ // ElementsPms
1027
+ BREAKER_PMS: "BreakerPms",
1028
+ GENERATOR_PMS: "GeneratorPms",
1029
+ OPERATION_MODES_PMS: "OperationModesPms",
1030
+ PMS_PRIORITIES: "PmsPriorities",
1031
+ // ElementsAutomated
1032
+ VALVE_AUTOMATED: "ValveAutomated",
1033
+ DAMPER_AUTOMATED: "DamperAutomated",
1034
+ PUMP_AUTOMATED: "PumpAutomated"
1035
+ };
1036
+ var ZDepths = {
1037
+ BACKGROUND: "Background",
1038
+ LOW: "Low",
1039
+ NORMAL: "Normal",
1040
+ HIGH: "High"
1041
+ };
1042
+ var TitleAligns = {
1043
+ BOTTOM: "Bottom",
1044
+ LEFT: "Left",
1045
+ RIGHT: "Right",
1046
+ TOP: "Top"
1047
+ };
1048
+ var DigitalStates = {
1049
+ NO_VALUE: "NoValue",
1050
+ OPEN: "Open",
1051
+ CLOSE: "Close",
1052
+ UNDEFINED: "Undefined"
1053
+ };
1054
+ var DigitalAlarmStates = {
1055
+ NO_ALARM: "NoAlarm",
1056
+ ALARM: "Alarm",
1057
+ UNDEFINED: "Undefined"
1058
+ };
1059
+ var AlarmStates = {
1060
+ ALARM: 1,
1061
+ WARNING: 2,
1062
+ UNACKNOWLEDGED_ALARM: 3,
1063
+ UNACKNOWLEDGED_WARNING: 4,
1064
+ ACKNOWLEDGED_ALARM: 5,
1065
+ ACKNOWLEDGED_WARNING: 6,
1066
+ INHIBITED: 7,
1067
+ OFF_SCAN: 8,
1068
+ NORMAL: 9,
1069
+ OFFLINE: 10
1070
+ };
1071
+ var MimicAlarmStates = {
1072
+ ALARM: "Alarm",
1073
+ WARNING: "Warning",
1074
+ UNACKNOWLEDGED_ALARM: "UnacknowledgedAlarm",
1075
+ UNACKNOWLEDGED_WARNING: "UnacknowledgedWarning",
1076
+ ACKNOWLEDGED_ALARM: "AcknowledgedAlarm",
1077
+ ACKNOWLEDGED_WARNING: "AcknowledgedWarning",
1078
+ INHIBITED: "Inhibited",
1079
+ OFF_SCAN: "OffScan",
1080
+ NORMAL: "Normal",
1081
+ OFFLINE: "Offline"
1082
+ };
1083
+ var MimicControlStates = {
1084
+ NO_VALUE: "NoValue",
1085
+ LOCAL: "Local",
1086
+ AUTOMATIC: "Automatic",
1087
+ SEMI_AUTOMATIC: "SemiAuto",
1088
+ UNDEFINED: "Undefined"
1089
+ };
1090
+ var ActivationModes = {
1091
+ ALARM: "Alarm",
1092
+ LOGIC: "Logic",
1093
+ VALUE: "Value"
1094
+ };
1095
+ var TextAnchorPoints = {
1096
+ LEFT: "Left",
1097
+ CENTER: "Center",
1098
+ RIGHT: "Right"
1099
+ };
1100
+ var ValveDesigns = {
1101
+ MECHANIC: "Mechanic",
1102
+ NORMAL: "Normal"
1103
+ };
1104
+ var FanDesigns = {
1105
+ NORMAL: "Normal",
1106
+ BLADED: "Bladed"
1107
+ };
1108
+ var FanRunStates = {
1109
+ NO_VALUE: "NoValue",
1110
+ UNDEFINED: "Undefined",
1111
+ STOPPED: "Stopped",
1112
+ RUNNING: "Running",
1113
+ RUNNING_FAST: "RunningFast"
1114
+ };
1115
+ var FanDirections = {
1116
+ NO_VALUE: "NoValue",
1117
+ UNDEFINED: "Undefined",
1118
+ SUPPLY: "Supply",
1119
+ EXHAUST: "Exhaust"
1120
+ };
1121
+ var FanTypes = {
1122
+ SIMPLE: "Simple",
1123
+ SIMPLE_WITH_FAST: "SimpleWithFast",
1124
+ REVERSIBLE: "Reversible",
1125
+ REVERSIBLE_WITH_FAST: "ReversibleWithFast"
1126
+ };
1127
+ var LevelBarOrientations = {
1128
+ VERTICAL: "Vertical",
1129
+ HORIZONTAL: "Horizontal"
1130
+ };
1131
+ var SliderOrientations = {
1132
+ VERTICAL: "Vertical",
1133
+ HORIZONTAL: "Horizontal"
1134
+ };
1135
+ var CompressorDesigns = {
1136
+ CENTRIFUGAL: "Centrifugal",
1137
+ MECHANIC: "Mechanic",
1138
+ NORMAL: "Normal",
1139
+ PISTONS: "Pistons",
1140
+ ROTATORY_SCREW: "RotatoryScrew",
1141
+ SCROLL: "Scroll",
1142
+ VANES: "Vanes"
1143
+ };
1144
+ var LedTypes = {
1145
+ CIRCLE: "Circle",
1146
+ SQUARE: "Square"
1147
+ };
1148
+ var InfoLocations = {
1149
+ BOTTOM: "Bottom",
1150
+ LEFT: "Left",
1151
+ RIGHT: "Right",
1152
+ TOP: "Top"
1153
+ };
1154
+ var MarkTypes = {
1155
+ LARGE_LINE: "LargeLine",
1156
+ SHORT_LINE: "ShortLine",
1157
+ TRIANGLE: "Triangle"
1158
+ };
1159
+ var ScalePositions = {
1160
+ LEFT: "Left",
1161
+ RIGHT: "Right"
1162
+ };
1163
+ var ValueTypes = {
1164
+ PERCENTAGE: "Percentage",
1165
+ RAW: "Raw"
1166
+ };
1167
+ var OperationModeStates = {
1168
+ ACTIVE: 0,
1169
+ INACTIVE: 1,
1170
+ IN_TRANSITION: 2,
1171
+ FAILED: 3
1172
+ };
1173
+ var UnitDesigns = {
1174
+ IMAGE: "Image",
1175
+ MODERN: "Modern"
1176
+ };
1177
+ var StationDesigns = {
1178
+ IMAGE: "Image",
1179
+ MONITOR: "Monitor",
1180
+ SCREEN: "Screen"
1181
+ };
1182
+ var RepeaterDesigns = {
1183
+ IMAGE: "Image",
1184
+ SLIM: "SLim",
1185
+ DIAMAR_REPEATER: "DiamarRepeater"
1186
+ };
1187
+ var CabinetDesigns = {
1188
+ IMAGE: "Image",
1189
+ MODERN: "Modern"
1190
+ };
1191
+ var LinkDesigns = {
1192
+ BUTTON: "Button",
1193
+ IMAGE: "Image"
1194
+ };
1195
+ var OpClStates = {
1196
+ NO_VALUE: "NoValue",
1197
+ OPEN: "Open",
1198
+ CLOSE: "Close",
1199
+ UNDEFINED: "Undefined"
1200
+ };
1201
+ var RunningStoppedStates = {
1202
+ NO_VALUE: "NoValue",
1203
+ RUNNING: "Running",
1204
+ STOPPED: "Stopped",
1205
+ UNDEFINED: "Undefined"
1206
+ };
1207
+ var AutoSemiAutoStates = {
1208
+ NO_VALUE: "NoValue",
1209
+ AUTOMATIC: "Automatic",
1210
+ SEMI_AUTOMATIC: "SemiAuto",
1211
+ UNDEFINED: "Undefined"
1212
+ };
1213
+ var RemoteLocalStates = {
1214
+ NO_VALUE: "NoValue",
1215
+ REMOTE: "Remote",
1216
+ LOCAL: "Local",
1217
+ UNDEFINED: "Undefined"
1218
+ };
1219
+
1220
+ // app/models/mimics/MimicSupport.ts
1221
+ var AddedAlarmsJson = {
1222
+ Channels: []
1223
+ };
1224
+ var BackgroundJson = {
1225
+ Show: false
1226
+ };
1227
+ var LineJson = {
1228
+ Color: "#000000",
1229
+ Width: 1,
1230
+ Start: { X: 0, Y: 0 },
1231
+ End: { X: 0, Y: 0 }
1232
+ };
1233
+ var LocalizedTextJson = {
1234
+ English: "",
1235
+ Spanish: "",
1236
+ French: "",
1237
+ German: ""
1238
+ };
1239
+ var LocationJson = {
1240
+ X: 0,
1241
+ Y: 0,
1242
+ Z: 0,
1243
+ Rotation: 0
1244
+ };
1245
+ var LogicExpressionJson = {
1246
+ Expression: "",
1247
+ Value: void 0,
1248
+ Variables: []
1249
+ };
1250
+ var LogicExpressionsJson = {
1251
+ LogicExpressions: []
1252
+ };
1253
+ var ScaleJson = {
1254
+ Show: false,
1255
+ TextHeight: 12,
1256
+ Color: "#000000",
1257
+ Position: "Bottom",
1258
+ LineWidth: 1,
1259
+ DivisionsNumber: 3,
1260
+ SubdivisionsNumber: 2
1261
+ };
1262
+ var TextAttributesJson = {
1263
+ AnchorPoint: TextAnchorPoints.LEFT,
1264
+ Color: "#000000",
1265
+ HasUnderline: false,
1266
+ UnderlineColor: "#000000",
1267
+ UnderlineLength: 10,
1268
+ UnderlineWidth: 1
1269
+ };
1270
+ var TitleJson = {
1271
+ Show: false,
1272
+ Height: 20,
1273
+ Padding: 5,
1274
+ Align: TitleAligns.LEFT,
1275
+ Color: "#000000",
1276
+ Text: LocalizedTextJson,
1277
+ Location: LocationJson
1278
+ };
1279
+
1280
+ // app/models/mimics/AuxiliaryElements.ts
1281
+ var ImageAuxiliaryJson = {
1282
+ DefaultImageName: "image.png",
1283
+ ImageLogic: LogicExpressionsJson
1284
+ };
1285
+ var LineAuxiliaryJson = {
1286
+ Line: LineJson,
1287
+ LineColorLogic: LogicExpressionsJson
1288
+ };
1289
+ var LinkAuxiliaryJson = {
1290
+ DefaultImageName: "default.png",
1291
+ MimicId: "",
1292
+ ImageLogic: LogicExpressionsJson,
1293
+ Design: "Default",
1294
+ ButtonColor: "#FFFFFF",
1295
+ TextColor: "#000000",
1296
+ TextHeight: 12,
1297
+ ButtonTexts: LocalizedTextJson
1298
+ };
1299
+ var PolylineAuxiliaryJson = {
1300
+ Lines: [],
1301
+ LineColorLogic: LogicExpressionsJson
1302
+ };
1303
+ var SquareAuxiliaryJson = {
1304
+ Lines: [],
1305
+ ColorBorder: "#000000",
1306
+ ColorFill: "#FFFFFF",
1307
+ LineColorLogic: LogicExpressionsJson
1308
+ };
1309
+ var TextAuxiliaryJson = {
1310
+ TextAttributes: TextAttributesJson,
1311
+ Text: LocalizedTextJson
1312
+ };
1313
+
1314
+ // app/models/mimics/ChannelMimic.ts
1315
+ var ChannelJson = {
1316
+ WithBackup: false,
1317
+ Main: null,
1318
+ Backup: null,
1319
+ Max: 100,
1320
+ Min: 0,
1321
+ Units: ""
1322
+ };
1323
+
1324
+ // app/models/mimics/MimicTraits.ts
1325
+ var AutomaticSemiAutoJson = {
1326
+ withAutomatic: false,
1327
+ automaticCommand: ChannelJson,
1328
+ semiAutoCommand: ChannelJson,
1329
+ automaticFeedback: ChannelJson,
1330
+ hasSemiAutoFeedback: false,
1331
+ semiAutoFeedback: ChannelJson
1332
+ };
1333
+ var CommandsOpClJson = {
1334
+ commandOpen: ChannelJson,
1335
+ commandClose: ChannelJson
1336
+ };
1337
+ var CommandsStartStopJson = {
1338
+ commandStart: ChannelJson,
1339
+ commandStop: ChannelJson
1340
+ };
1341
+ var ControlLockJson = {
1342
+ hasControlLock: false,
1343
+ controlLock: ChannelJson
1344
+ };
1345
+ var FeedbackOpClJson = {
1346
+ openFeedback: ChannelJson,
1347
+ closeFeedback: ChannelJson
1348
+ };
1349
+ var FeedbackRunningStoppedJson = {
1350
+ runFeedback: ChannelJson,
1351
+ hasStoppedFeedback: false,
1352
+ stoppedFeedback: ChannelJson
1353
+ };
1354
+ var OrderOpClJson = {
1355
+ openOrder: ChannelJson,
1356
+ closeOrder: ChannelJson
1357
+ };
1358
+ var OrderStartStopJson = {
1359
+ startOrder: ChannelJson,
1360
+ stopOrder: ChannelJson
1361
+ };
1362
+ var RemoteLocalJson = {
1363
+ remoteFeedback: ChannelJson,
1364
+ hasLocalFeedback: false,
1365
+ localFeedback: ChannelJson
1366
+ };
1367
+ var TripResetJson = {
1368
+ tripFeedback: ChannelJson,
1369
+ withCommandReset: false,
1370
+ resetCommand: ChannelJson
1371
+ };
1372
+
1373
+ // app/models/mimics/ControlElements.ts
1374
+ var CompressorJson = {
1375
+ AutomaticSemiAuto: AutomaticSemiAutoJson,
1376
+ CommandsStartStop: CommandsStartStopJson,
1377
+ ControlLock: ControlLockJson,
1378
+ FeedbackRunningStopped: FeedbackRunningStoppedJson,
1379
+ OrderStartStop: OrderStartStopJson,
1380
+ RemoteLocal: RemoteLocalJson,
1381
+ TripReset: TripResetJson,
1382
+ IsControl: false,
1383
+ CompressorDesign: CompressorDesigns.NORMAL
1384
+ };
1385
+ var DamperJson = {
1386
+ FeedbackAutoSemiAuto: AutomaticSemiAutoJson,
1387
+ FeedbackOpCl: FeedbackOpClJson,
1388
+ CommandsOpCl: CommandsOpClJson,
1389
+ ControlLock: ControlLockJson,
1390
+ OrderOpCl: OrderOpClJson,
1391
+ RemoteLocal: RemoteLocalJson,
1392
+ TripReset: TripResetJson,
1393
+ IsControl: false
1394
+ };
1395
+ var DamperAutomatedJson = {
1396
+ Damper: "",
1397
+ FeedbackOpCl: FeedbackOpClJson,
1398
+ TripReset: TripResetJson
1399
+ };
1400
+ var FanJson = {
1401
+ AutomaticSemiAuto: AutomaticSemiAutoJson,
1402
+ ControlLock: ControlLockJson,
1403
+ RemoteLocal: RemoteLocalJson,
1404
+ TripReset: TripResetJson,
1405
+ FanMode: FanTypes.SIMPLE,
1406
+ FanDesign: FanDesigns.NORMAL,
1407
+ SpeedFeedback: ChannelJson,
1408
+ ConsignedSpeed: ChannelJson,
1409
+ UserConsignedSpeed: ChannelJson,
1410
+ RunFeedbackSupply: ChannelJson,
1411
+ RunFeedbackSupplyFast: ChannelJson,
1412
+ RunFeedbackExhaust: ChannelJson,
1413
+ RunFeedbackExhaustFast: ChannelJson,
1414
+ StoppedFeedback: ChannelJson,
1415
+ StartOrderSupply: ChannelJson,
1416
+ StartOrderSupplyFast: ChannelJson,
1417
+ StartOrderExhaust: ChannelJson,
1418
+ StartOrderExhaustFast: ChannelJson,
1419
+ StopOrder: ChannelJson,
1420
+ StartCommandSupply: ChannelJson,
1421
+ StartCommandSupplyFast: ChannelJson,
1422
+ StartCommandExhaust: ChannelJson,
1423
+ StartCommandExhaustFast: ChannelJson,
1424
+ StopCommand: ChannelJson,
1425
+ StartCommandSupplyConfirmation: LocalizedTextJson,
1426
+ StartCommandSupplyFastConfirmation: LocalizedTextJson,
1427
+ StartCommandExhaustConfirmation: LocalizedTextJson,
1428
+ StartCommandExhaustFastConfirmation: LocalizedTextJson,
1429
+ StopCommandConfirmation: LocalizedTextJson
1430
+ };
1431
+ var PumpJson = {
1432
+ AutomaticSemiAuto: AutomaticSemiAutoJson,
1433
+ ControlLock: ControlLockJson,
1434
+ CommandsStartStop: CommandsStartStopJson,
1435
+ FeedbackRunningStopped: FeedbackRunningStoppedJson,
1436
+ OrderStartStop: OrderStartStopJson,
1437
+ RemoteLocal: RemoteLocalJson,
1438
+ TripReset: TripResetJson,
1439
+ IsControl: false,
1440
+ PumpDesign: CompressorDesigns.NORMAL
1441
+ };
1442
+ var PumpAutomatedJson = {
1443
+ Pump: "",
1444
+ PumpDesign: CompressorDesigns.NORMAL,
1445
+ AutomaticSemiAuto: AutomaticSemiAutoJson,
1446
+ FeedbackRunningStopped: FeedbackRunningStoppedJson,
1447
+ RemoteLocal: RemoteLocalJson,
1448
+ TripReset: TripResetJson
1449
+ };
1450
+ var TankJson = {
1451
+ TankName: "",
1452
+ VolumeChannel: ChannelJson,
1453
+ LocationInfo: InfoLocations.RIGHT,
1454
+ ShowVolume: true,
1455
+ ShowVolumeInPercent: false,
1456
+ ShowVolumeInMeters: false,
1457
+ ShowVolumeInLitres: false,
1458
+ ShowWeight: false,
1459
+ ShowSounding: false,
1460
+ TextValueHeight: 12,
1461
+ TextValuePadding: 2,
1462
+ BackgroundColor: "#FFFFFF",
1463
+ ContentColor: "#000000",
1464
+ ShowAlarmLimits: false,
1465
+ MarkType: MarkTypes.SHORT_LINE,
1466
+ Scale: ScaleJson
1467
+ };
1468
+ var ValveJson = {
1469
+ IsControl: false,
1470
+ ValveDesign: ValveDesigns.NORMAL,
1471
+ FeedbackOpCl: FeedbackOpClJson,
1472
+ CommandsOpCl: CommandsOpClJson,
1473
+ OrderOpCl: OrderOpClJson,
1474
+ ControlLock: ControlLockJson,
1475
+ RemoteLocal: RemoteLocalJson,
1476
+ TripReset: TripResetJson
1477
+ };
1478
+ var ValveAutomatedJson = {
1479
+ Valve: "",
1480
+ ValveDesign: ValveDesigns.NORMAL,
1481
+ FeedbackOpCl: FeedbackOpClJson,
1482
+ TripReset: TripResetJson
1483
+ };
1484
+
1485
+ // app/models/mimics/Elements.ts
1486
+ var AlarmIndicatorJson = {
1487
+ TextHeight: 12,
1488
+ TextColor: "#FFFFFF",
1489
+ Texts: LocalizedTextJson,
1490
+ AlarmFeedback: ChannelJson
1491
+ };
1492
+ var CommandJson = {
1493
+ TextHeight: 12,
1494
+ MessageColor: "#FFFFFF",
1495
+ TimeoutCommandCheck: 5,
1496
+ CommandCheckColor: "#00FF00",
1497
+ TimeoutCommandResult: 10,
1498
+ CommandOkColor: "#00FF00",
1499
+ CommandErrorColor: "#FF0000",
1500
+ HasConfirmation: false,
1501
+ HasPassword: false,
1502
+ CommandChannel: ChannelJson,
1503
+ CloseChannel: ChannelJson,
1504
+ Messages: LocalizedTextJson,
1505
+ ConfirmationMessages: LocalizedTextJson
1506
+ };
1507
+ var DialJson = {
1508
+ Color: "#FFFFFF",
1509
+ ShowTextValue: false,
1510
+ Factor: 100,
1511
+ ShowAlarmLimits: false,
1512
+ ShowFactor: false,
1513
+ DivisionsNumber: 3,
1514
+ SubdivisionsNumber: 2,
1515
+ Channel: ChannelJson
1516
+ };
1517
+ var DigitalJson = {
1518
+ TextHeight: 12,
1519
+ LedType: LedTypes.CIRCLE,
1520
+ OpenLedColor: "#00FF00",
1521
+ CloseLedColor: "#FF0000",
1522
+ OpenTexts: LocalizedTextJson,
1523
+ CloseTexts: LocalizedTextJson,
1524
+ FeedbackOpCl: FeedbackOpClJson
1525
+ };
1526
+ var DisplayJson = {
1527
+ HeightText: 12,
1528
+ TextColor: "#FFFFFF",
1529
+ ShowMeasureUnit: false,
1530
+ NumCharactersDisplay: 8,
1531
+ Channel: ChannelJson
1532
+ };
1533
+ var DynamicTextJson = {
1534
+ TextAttributes: TextAttributesJson,
1535
+ DefaultTextColor: "#FFFFFF",
1536
+ DefaultText: LocalizedTextJson,
1537
+ TextLogic: LogicExpressionsJson
1538
+ };
1539
+ var LevelBarJson = {
1540
+ Orientation: LevelBarOrientations.VERTICAL,
1541
+ BackgroundColor: "#000000",
1542
+ ForegroundColor: "#00FF00",
1543
+ ShowTextValue: false,
1544
+ TextValueHeight: 12,
1545
+ ValueType: ValueTypes.RAW,
1546
+ ShowAlarmLimits: false,
1547
+ MarkType: MarkTypes.LARGE_LINE,
1548
+ Scale: ScaleJson,
1549
+ LevelChannel: ChannelJson
1550
+ };
1551
+ var SliderJson = {
1552
+ Orientation: SliderOrientations.VERTICAL,
1553
+ Steps: 10,
1554
+ ColorBackground: "#FFFFFF",
1555
+ ColorValue: "#00FF00",
1556
+ ColorValueCircle: "#0000FF",
1557
+ HasTextValue: false,
1558
+ ColorTextValue: "#000000",
1559
+ TextValueFontSize: 12,
1560
+ IsVisualizationOnly: false,
1561
+ Channel: ChannelJson
1562
+ };
1563
+ var TextChannelJson = {
1564
+ TextAttributes: TextAttributesJson,
1565
+ Channel: ChannelJson
1566
+ };
1567
+ var ToggleJson = {
1568
+ ColorCircle: "#FFFFFF",
1569
+ ColorOnBackground: "#00FF00",
1570
+ ColorOffBackground: "#FF0000",
1571
+ DisplayValue: false,
1572
+ OnTextValue: "ON",
1573
+ OnTextValueColor: "#00FF00",
1574
+ OffTextValue: "OFF",
1575
+ OffTextValueColor: "#FF0000",
1576
+ IsVisualizationOnly: false,
1577
+ Channel: ChannelJson,
1578
+ CommandOnChannel: ChannelJson,
1579
+ CommandOffChannel: ChannelJson
1580
+ };
1581
+
1582
+ // app/models/mimics/IasElements.ts
1583
+ var CabinetJson = {
1584
+ Design: CabinetDesigns.IMAGE,
1585
+ ImageName: "cabinet.png",
1586
+ CabinetId: ""
1587
+ };
1588
+ var RepeaterJson = {
1589
+ Design: RepeaterDesigns.IMAGE,
1590
+ ImageName: "repeater.png",
1591
+ RepeaterId: ""
1592
+ };
1593
+ var StationJson = {
1594
+ Design: StationDesigns.IMAGE,
1595
+ ImageName: "station.png",
1596
+ StationId: ""
1597
+ };
1598
+ var UnitJson = {
1599
+ Design: UnitDesigns.IMAGE,
1600
+ ImageName: "unit.png",
1601
+ UnitId: ""
1602
+ };
1603
+
1604
+ // app/models/mimics/PmsElements.ts
1605
+ var BreakerJson = {
1606
+ FeedbackOpCl: FeedbackOpClJson,
1607
+ CommandsOpCl: CommandsOpClJson,
1608
+ ControlLock: ControlLockJson,
1609
+ OrderOpCl: OrderOpClJson,
1610
+ RemoteLocal: RemoteLocalJson,
1611
+ TripReset: TripResetJson,
1612
+ AutomaticManual: AutomaticSemiAutoJson,
1613
+ IsControl: false,
1614
+ RemoteIconSize: 24
1615
+ };
1616
+ var BreakerPmsJson = {
1617
+ Breaker: "",
1618
+ RemoteIconSize: 24,
1619
+ FeedbackOpCl: FeedbackOpClJson,
1620
+ RemoteLocal: RemoteLocalJson,
1621
+ TripReset: TripResetJson
1622
+ };
1623
+ var GeneratorJson = {
1624
+ AutomaticSemiAuto: AutomaticSemiAutoJson,
1625
+ CommandsStartStop: CommandsStartStopJson,
1626
+ FeedbackRunningStopped: FeedbackRunningStoppedJson,
1627
+ OrderStartStop: OrderStartStopJson,
1628
+ RemoteLocal: RemoteLocalJson,
1629
+ TripReset: TripResetJson,
1630
+ OrderAuto: ChannelJson,
1631
+ OrderSemiAuto: ChannelJson,
1632
+ IsControl: false
1633
+ };
1634
+ var GeneratorPmsJson = {
1635
+ Generator: "",
1636
+ GeneratorNameColor: "#FFFFFF",
1637
+ PowerChannel: ChannelJson,
1638
+ FrequencyChannel: ChannelJson,
1639
+ PriorityChannel: ChannelJson,
1640
+ AutomaticSemiAuto: AutomaticSemiAutoJson,
1641
+ FeedbackRunningStopped: FeedbackRunningStoppedJson,
1642
+ RemoteLocal: RemoteLocalJson,
1643
+ TripReset: TripResetJson
1644
+ };
1645
+ var OperationModesJson = {
1646
+ TextHeight: 12,
1647
+ ModeToReach: "",
1648
+ Messages: LocalizedTextJson
1649
+ };
1650
+ var PriorityDataJson = {
1651
+ Name: "",
1652
+ ChannelPriority: "",
1653
+ ChannelPriorityFeedback: ""
1654
+ };
1655
+ var PrioritiesJson = {
1656
+ TextHeight: 12,
1657
+ HasPassword: false,
1658
+ Texts: LocalizedTextJson,
1659
+ Priorities: []
1660
+ };
1661
+ var ShaftJson = {
1662
+ WithFeedbackOpen: false,
1663
+ ActivationMode: "",
1664
+ ActivationValue: false,
1665
+ OpenFeedback: ChannelJson,
1666
+ CloseFeedback: ChannelJson
1667
+ };
1668
+
1669
+ // app/network/requests/mimics/MimicSupport.ts
1670
+ var LocalizedTextRequest = {
1671
+ English: "",
1672
+ Spanish: "",
1673
+ French: "",
1674
+ German: ""
1675
+ };
1676
+ var LocationRequest = {
1677
+ X: 0,
1678
+ Y: 0,
1679
+ Z: 0,
1680
+ Rotation: 0
1681
+ };
1682
+ var LogicExpressionsRequest = {
1683
+ LogicExpressions: []
1684
+ };
1685
+ var TextAttributesRequest = {
1686
+ AnchorPoint: TextAnchorPoints.LEFT,
1687
+ Color: "#000000",
1688
+ HasUnderline: false,
1689
+ UnderlineColor: "#000000",
1690
+ UnderlineLength: 10,
1691
+ UnderlineWidth: 1
1692
+ };
1693
+ var TitleRequest = {
1694
+ Show: false,
1695
+ Height: 20,
1696
+ Padding: 5,
1697
+ Align: TitleAligns.LEFT,
1698
+ Color: "#000000",
1699
+ Text: LocalizedTextRequest,
1700
+ Location: LocationRequest
1701
+ };
1702
+
1703
+ // app/network/requests/mimics/AuxiliaryElements.ts
1704
+ var ImageAuxiliaryRequest = {
1705
+ DefaultImageName: "image.png",
1706
+ ImageLogic: LogicExpressionsRequest
1707
+ };
1708
+ var LineAuxiliaryRequest = {
1709
+ LineColor: "#0000",
1710
+ LineColorLogic: LogicExpressionsRequest
1711
+ };
1712
+ var LinkAuxiliaryRequest = {
1713
+ DefaultImageName: "default.png",
1714
+ ImageLogic: LogicExpressionsRequest
1715
+ };
1716
+ var PolylineAuxiliaryRequest = {
1717
+ LinesColor: "#0000",
1718
+ LineColorLogic: LogicExpressionsRequest
1719
+ };
1720
+ var SquareAuxiliaryRequest = {
1721
+ ColorBorder: "#000000",
1722
+ ColorFill: "#FFFFFF",
1723
+ LineColorLogic: LogicExpressionsRequest
1724
+ };
1725
+ var TextAuxiliaryRequest = {};
1726
+
1727
+ // app/network/requests/mimics/ChannelMimic.ts
1728
+ var ChannelRequest = {
1729
+ WithBackup: false,
1730
+ Main: null,
1731
+ Backup: null,
1732
+ Max: 100,
1733
+ Min: 0,
1734
+ Units: ""
1735
+ };
1736
+
1737
+ // app/network/requests/mimics/MimicTraits.ts
1738
+ var AutomaticSemiAutoRequest = {
1739
+ withAutomatic: false,
1740
+ automaticFeedback: null,
1741
+ hasSemiAutoFeedback: false,
1742
+ semiAutoFeedback: null
1743
+ };
1744
+ var CommandsOpClRequest = {
1745
+ commandOpen: null,
1746
+ commandClose: null
1747
+ };
1748
+ var CommandsStartStopRequest = {
1749
+ commandStart: null,
1750
+ commandStop: null
1751
+ };
1752
+ var ControlLockRequest = {
1753
+ hasControlLock: false,
1754
+ controlLock: null
1755
+ };
1756
+ var FeedbackOpClRequest = {
1757
+ openFeedback: null,
1758
+ closeFeedback: null
1759
+ };
1760
+ var FeedbackRunningStoppedRequest = {
1761
+ runFeedback: null,
1762
+ hasStoppedFeedback: false,
1763
+ stoppedFeedback: null
1764
+ };
1765
+ var OrderOpClRequest = {
1766
+ openOrder: null,
1767
+ closeOrder: null
1768
+ };
1769
+ var OrderStartStopRequest = {
1770
+ startOrder: null,
1771
+ stopOrder: null
1772
+ };
1773
+ var RemoteLocalRequest = {
1774
+ remoteFeedback: null,
1775
+ hasLocalFeedback: false,
1776
+ localFeedback: null
1777
+ };
1778
+ var TripResetRequest = {
1779
+ tripFeedback: null,
1780
+ withCommandReset: false,
1781
+ resetCommand: null
1782
+ };
1783
+
1784
+ // app/network/requests/mimics/ControlElements.ts
1785
+ var CompressorRequest = {
1786
+ AutomaticSemiAuto: AutomaticSemiAutoRequest,
1787
+ FeedbackRunningStopped: FeedbackRunningStoppedRequest,
1788
+ RemoteLocal: RemoteLocalRequest,
1789
+ TripReset: TripResetRequest,
1790
+ IsControl: false
1791
+ };
1792
+ var DamperRequest = {
1793
+ AutomaticSemiAuto: AutomaticSemiAutoRequest,
1794
+ FeedbackOpCl: FeedbackOpClRequest,
1795
+ RemoteLocal: RemoteLocalRequest,
1796
+ TripReset: TripResetRequest,
1797
+ IsControl: false
1798
+ };
1799
+ var DamperAutomatedRequest = {
1800
+ Damper: "",
1801
+ FeedbackOpCl: FeedbackOpClRequest,
1802
+ TripReset: TripResetRequest
1803
+ };
1804
+ var FanRequest = {
1805
+ AutomaticSemiAuto: AutomaticSemiAutoRequest,
1806
+ RemoteLocal: RemoteLocalRequest,
1807
+ RunFeedbackSupply: ChannelRequest,
1808
+ RunFeedbackSupplyFast: ChannelRequest,
1809
+ RunFeedbackExhaust: ChannelRequest,
1810
+ RunFeedbackExhaustFast: ChannelRequest,
1811
+ StoppedFeedback: ChannelRequest
1812
+ };
1813
+ var PumpRequest = {
1814
+ AutomaticSemiAuto: AutomaticSemiAutoRequest,
1815
+ FeedbackRunningStopped: FeedbackRunningStoppedRequest,
1816
+ RemoteLocal: RemoteLocalRequest,
1817
+ TripReset: TripResetRequest,
1818
+ IsControl: false
1819
+ };
1820
+ var PumpAutomatedRequest = {
1821
+ Pump: "",
1822
+ AutomaticSemiAuto: AutomaticSemiAutoRequest,
1823
+ FeedbackRunningStopped: FeedbackRunningStoppedRequest,
1824
+ RemoteLocal: RemoteLocalRequest,
1825
+ TripReset: TripResetRequest
1826
+ };
1827
+ var TankRequest = {
1828
+ TankName: "",
1829
+ VolumeChannel: null
1830
+ };
1831
+ var ValveRequest = {
1832
+ IsControl: false,
1833
+ FeedbackOpCl: FeedbackOpClRequest,
1834
+ RemoteLocal: RemoteLocalRequest,
1835
+ TripReset: TripResetRequest
1836
+ };
1837
+ var ValveAutomatedRequest = {
1838
+ Valve: "",
1839
+ FeedbackOpCl: FeedbackOpClRequest,
1840
+ TripReset: TripResetRequest
1841
+ };
1842
+
1843
+ // app/network/requests/mimics/Elements.ts
1844
+ var AlarmIndicatorRequest = {
1845
+ AlarmFeedback: null
1846
+ };
1847
+ var CommandRequest = {
1848
+ CommandChannel: null,
1849
+ CloseChannel: null
1850
+ };
1851
+ var DialRequest = {
1852
+ Channel: null
1853
+ };
1854
+ var DigitalRequest = {
1855
+ FeedbackOpCl: FeedbackOpClRequest
1856
+ };
1857
+ var DisplayRequest = {
1858
+ Channel: null
1859
+ };
1860
+ var DynamicTextRequest = {
1861
+ TextAttributes: TextAttributesRequest,
1862
+ DefaultTextColor: "#FFFFFF",
1863
+ DefaultText: LocalizedTextRequest,
1864
+ TextLogic: LogicExpressionsRequest
1865
+ };
1866
+ var LevelBarRequest = {
1867
+ LevelChannel: null
1868
+ };
1869
+ var SliderRequest = {
1870
+ Channel: null
1871
+ };
1872
+ var TextChannelRequest = {
1873
+ Channel: null
1874
+ };
1875
+ var ToggleRequest = {
1876
+ Channel: null
1877
+ };
1878
+
1879
+ // app/network/requests/mimics/IasElements.ts
1880
+ var CabinetRequest = {
1881
+ CabinetId: ""
1882
+ };
1883
+ var RepeaterRequest = {
1884
+ RepeaterId: ""
1885
+ };
1886
+ var StationRequest = {
1887
+ StationId: ""
1888
+ };
1889
+ var UnitRequest = {
1890
+ UnitId: ""
1891
+ };
1892
+
1893
+ // app/network/requests/mimics/PmsElements.ts
1894
+ var BreakerRequest = {
1895
+ FeedbackOpCl: FeedbackOpClRequest,
1896
+ RemoteLocal: RemoteLocalRequest,
1897
+ TripReset: TripResetRequest,
1898
+ AutomaticSemiAuto: AutomaticSemiAutoRequest,
1899
+ IsControl: false
1900
+ };
1901
+ var BreakerPmsRequest = {
1902
+ Breaker: "",
1903
+ FeedbackOpCl: FeedbackOpClRequest,
1904
+ RemoteLocal: RemoteLocalRequest,
1905
+ TripReset: TripResetRequest
1906
+ };
1907
+ var GeneratorRequest = {
1908
+ AutomaticSemiAuto: AutomaticSemiAutoRequest,
1909
+ FeedbackRunningStopped: FeedbackRunningStoppedRequest,
1910
+ RemoteLocal: RemoteLocalRequest,
1911
+ TripReset: TripResetRequest,
1912
+ IsControl: false
1913
+ };
1914
+ var GeneratorPmsRequest = {
1915
+ Generator: "",
1916
+ PowerChannel: null,
1917
+ FrequencyChannel: null,
1918
+ PriorityChannel: null,
1919
+ AutomaticSemiAuto: AutomaticSemiAutoRequest,
1920
+ FeedbackRunningStopped: FeedbackRunningStoppedRequest,
1921
+ RemoteLocal: RemoteLocalRequest,
1922
+ TripResetTrait: TripResetRequest
1923
+ };
1924
+ var OperationModesRequest = {
1925
+ ModeToReach: ""
1926
+ };
1927
+ var PriorityDataRequest = {
1928
+ Name: "",
1929
+ ChannelPriority: null,
1930
+ ChannelPriorityFeedback: null
1931
+ };
1932
+ var PrioritiesRequest = {
1933
+ Priorities: []
1934
+ };
1935
+ var ShaftRequest = {
1936
+ WithFeedbackOpen: false,
1937
+ ActivationMode: "",
1938
+ ActivationValue: false,
1939
+ OpenFeedback: ChannelRequest,
1940
+ CloseFeedback: ChannelRequest
1941
+ };
1942
+
1943
+ // app/network/responses/mimics/AuxiliaryElements.ts
1944
+ var ImageAuxiliaryResponse = {
1945
+ ImageName: "image.png"
1946
+ };
1947
+ var LineAuxiliaryResponse = {
1948
+ LineColor: "#0000"
1949
+ };
1950
+ var LinkAuxiliaryResponse = {
1951
+ ImageName: "default.png"
1952
+ };
1953
+ var PolylineAuxiliaryResponse = {
1954
+ LinesColor: "#0000"
1955
+ };
1956
+ var SquareAuxiliaryResponse = {
1957
+ ColorBorder: "#000000",
1958
+ ColorFill: "#FFFFFF"
1959
+ };
1960
+ var TextAuxiliaryResponse = {};
1961
+
1962
+ // app/network/responses/mimics/ControlElements.ts
1963
+ var CompressorResponse = {
1964
+ AlarmState: MimicAlarmStates.OFFLINE,
1965
+ ControlState: MimicControlStates.NO_VALUE,
1966
+ Value: RunningStoppedStates.NO_VALUE,
1967
+ Active: false
1968
+ };
1969
+ var DamperResponse = {
1970
+ AlarmState: MimicAlarmStates.OFFLINE,
1971
+ ControlState: MimicControlStates.NO_VALUE,
1972
+ Value: OpClStates.NO_VALUE,
1973
+ Active: false
1974
+ };
1975
+ var DamperAutomatedResponse = {
1976
+ AlarmState: MimicAlarmStates.OFFLINE,
1977
+ Value: OpClStates.NO_VALUE,
1978
+ Active: false
1979
+ };
1980
+ var FanResponse = {
1981
+ AlarmState: MimicAlarmStates.OFFLINE,
1982
+ ControlState: MimicControlStates.NO_VALUE,
1983
+ RunState: FanRunStates.NO_VALUE,
1984
+ FanDirection: FanDirections.NO_VALUE,
1985
+ Active: false
1986
+ };
1987
+ var PumpResponse = {
1988
+ AlarmState: MimicAlarmStates.OFFLINE,
1989
+ ControlState: MimicControlStates.NO_VALUE,
1990
+ Value: RunningStoppedStates.NO_VALUE,
1991
+ Active: false
1992
+ };
1993
+ var PumpAutomatedResponse = {
1994
+ AlarmState: MimicAlarmStates.OFFLINE,
1995
+ ControlState: MimicControlStates.NO_VALUE,
1996
+ Value: RunningStoppedStates.NO_VALUE,
1997
+ Active: false
1998
+ };
1999
+ var TankResponse = {
2000
+ AlarmState: MimicAlarmStates.OFFLINE,
2001
+ Volume: null,
2002
+ Sounding: null,
2003
+ Percentage: null
2004
+ };
2005
+ var ValveResponse = {
2006
+ AlarmState: MimicAlarmStates.OFFLINE,
2007
+ ControlState: MimicControlStates.NO_VALUE,
2008
+ Value: OpClStates.NO_VALUE,
2009
+ Active: false
2010
+ };
2011
+ var ValveAutomatedResponse = {
2012
+ AlarmState: MimicAlarmStates.OFFLINE,
2013
+ Value: OpClStates.NO_VALUE,
2014
+ Active: false
2015
+ };
2016
+
2017
+ // app/network/responses/mimics/Elements.ts
2018
+ var AlarmIndicatorResponse = {
2019
+ AlarmState: MimicAlarmStates.OFFLINE,
2020
+ Active: false
2021
+ };
2022
+ var CommandResponse = {
2023
+ AlarmState: MimicAlarmStates.OFFLINE,
2024
+ Active: false
2025
+ };
2026
+ var DialResponse = {
2027
+ AlarmState: MimicAlarmStates.OFFLINE,
2028
+ Value: null,
2029
+ Active: false
2030
+ };
2031
+ var DigitalResponse = {
2032
+ AlarmState: MimicAlarmStates.OFFLINE,
2033
+ Value: DigitalStates.NO_VALUE,
2034
+ Active: false
2035
+ };
2036
+ var DisplayResponse = {
2037
+ AlarmState: MimicAlarmStates.OFFLINE,
2038
+ Value: null,
2039
+ Active: false
2040
+ };
2041
+ var DynamicTextResponse = {
2042
+ TextColor: "#FFFFFF",
2043
+ Text: ""
2044
+ };
2045
+ var LevelBarResponse = {
2046
+ AlarmState: MimicAlarmStates.OFFLINE,
2047
+ Value: null,
2048
+ Active: false
2049
+ };
2050
+ var SliderResponse = {
2051
+ AlarmState: MimicAlarmStates.OFFLINE,
2052
+ Value: null,
2053
+ Active: false
2054
+ };
2055
+ var TextChannelResponse = {
2056
+ AlarmState: MimicAlarmStates.OFFLINE,
2057
+ Value: null,
2058
+ Active: false
2059
+ };
2060
+ var ToggleResponse = {
2061
+ AlarmState: MimicAlarmStates.OFFLINE,
2062
+ Value: null,
2063
+ Active: false
2064
+ };
2065
+
2066
+ // app/network/responses/mimics/IasElements.ts
2067
+ var CabinetResponse = {
2068
+ AlarmState: MimicAlarmStates.OFFLINE
2069
+ };
2070
+ var RepeaterResponse = {
2071
+ AlarmState: MimicAlarmStates.OFFLINE
2072
+ };
2073
+ var StationResponse = {
2074
+ AlarmState: MimicAlarmStates.OFFLINE
2075
+ };
2076
+ var UnitResponse = {
2077
+ AlarmState: MimicAlarmStates.OFFLINE
2078
+ };
2079
+
2080
+ // app/network/responses/mimics/PmsElements.ts
2081
+ var BreakerResponse = {
2082
+ AlarmState: MimicAlarmStates.OFFLINE,
2083
+ ControlState: MimicControlStates.NO_VALUE,
2084
+ Value: OpClStates.NO_VALUE,
2085
+ Active: false
2086
+ };
2087
+ var BreakerPmsResponse = {
2088
+ AlarmState: MimicAlarmStates.OFFLINE,
2089
+ ControlState: MimicControlStates.NO_VALUE,
2090
+ Value: OpClStates.NO_VALUE,
2091
+ Active: false
2092
+ };
2093
+ var GeneratorResponse = {
2094
+ AlarmState: MimicAlarmStates.OFFLINE,
2095
+ ControlState: MimicControlStates.NO_VALUE,
2096
+ Value: RunningStoppedStates.NO_VALUE,
2097
+ Active: false
2098
+ };
2099
+ var GeneratorPmsResponse = {
2100
+ AlarmState: MimicAlarmStates.OFFLINE,
2101
+ ControlState: MimicControlStates.NO_VALUE,
2102
+ Value: RunningStoppedStates.NO_VALUE,
2103
+ PowerValue: null,
2104
+ FrequencyValue: null,
2105
+ PriorityValue: null,
2106
+ Active: false
2107
+ };
2108
+ var OperationModesResponse = {
2109
+ AlarmState: OperationModeStates.INACTIVE,
2110
+ Active: false
2111
+ };
2112
+ var PrioritiesResponse = {};
2113
+ var ShaftResponse = {
2114
+ AlarmState: MimicAlarmStates.OFFLINE,
2115
+ Active: false
2116
+ };
2117
+
67
2118
  // app/types/channel.types.ts
68
2119
  var ChannelBaseTypes = {
69
2120
  VIRTUAL_ANALOG: "VirtualAnalog",
@@ -96,38 +2147,222 @@ var ChannelSpecificTypes = {
96
2147
  SERIAL_ANALOG_OUTPUT: "SerialAnalogOutput"
97
2148
  };
98
2149
 
99
- // app/types/event.types.ts
100
- var EventCategories = {
101
- ACCESS_CONTROL: "AccessControl",
102
- REQUEST_ERROR: "RequestErrors",
103
- OS: "OperatingSystemEvents",
104
- CONTROL: "ControlSystemEvents",
105
- BACKUP: "BackupAndRestoreEvents",
106
- CONFIG_CHANGE: "ConfigurationChanges",
107
- LOGS: "AuditLogEvents",
108
- POTENTIAL_ATTACK: "PotentialAttackActivity"
2150
+ // app/index.ts
2151
+ var import_mongoose7 = __toESM(require("mongoose"), 1);
2152
+ var import_mongoose_aggregate_paginate_v27 = __toESM(require("mongoose-aggregate-paginate-v2"), 1);
2153
+ var import_mongoose_autopopulate2 = __toESM(require("mongoose-autopopulate"), 1);
2154
+ var import_mongoose_paginate_v27 = __toESM(require("mongoose-paginate-v2"), 1);
2155
+ var Schemas = {
2156
+ Channel: Channel_default,
2157
+ ChannelDataBucket: ChannelDataBucket_default,
2158
+ ChannelDataPoint: ChannelDataPoint_default,
2159
+ Event: Event_default,
2160
+ History: History_default,
2161
+ Unit: Unit_default
109
2162
  };
110
- var EventCriticalities = {
111
- VERBOSE: "Verbose",
112
- INFO: "Info",
113
- WARNING: "Warning",
114
- ERROR: "Error",
115
- CRITICAL: "Critical"
2163
+ var Mimics = {
2164
+ // Auxiliary
2165
+ ImageAuxiliaryJson,
2166
+ LineAuxiliaryJson,
2167
+ LinkAuxiliaryJson,
2168
+ PolylineAuxiliaryJson,
2169
+ SquareAuxiliaryJson,
2170
+ TextAuxiliaryJson,
2171
+ // Channel
2172
+ ChannelJson,
2173
+ // Control elements
2174
+ CompressorJson,
2175
+ DamperJson,
2176
+ DamperAutomatedJson,
2177
+ FanJson,
2178
+ PumpJson,
2179
+ PumpAutomatedJson,
2180
+ TankJson,
2181
+ ValveJson,
2182
+ ValveAutomatedJson,
2183
+ // Elements
2184
+ AlarmIndicatorJson,
2185
+ CommandJson,
2186
+ DialJson,
2187
+ DigitalJson,
2188
+ DisplayJson,
2189
+ DynamicTextJson,
2190
+ LevelBarJson,
2191
+ SliderJson,
2192
+ TextChannelJson,
2193
+ ToggleJson,
2194
+ // IAS elements
2195
+ CabinetJson,
2196
+ RepeaterJson,
2197
+ StationJson,
2198
+ UnitJson,
2199
+ // Support
2200
+ AddedAlarmsJson,
2201
+ BackgroundJson,
2202
+ LineJson,
2203
+ LocalizedTextJson,
2204
+ LocationJson,
2205
+ LogicExpressionJson,
2206
+ LogicExpressionsJson,
2207
+ ScaleJson,
2208
+ TextAttributesJson,
2209
+ TitleJson,
2210
+ // Traits
2211
+ AutomaticSemiAutoJson,
2212
+ CommandsOpClJson,
2213
+ CommandsStartStopJson,
2214
+ ControlLockJson,
2215
+ FeedbackOpClJson,
2216
+ FeedbackRunningStoppedJson,
2217
+ OrderOpClJson,
2218
+ OrderStartStopJson,
2219
+ RemoteLocalJson,
2220
+ TripResetJson,
2221
+ // PMS elements
2222
+ BreakerJson,
2223
+ BreakerPmsJson,
2224
+ GeneratorJson,
2225
+ GeneratorPmsJson,
2226
+ OperationModesJson,
2227
+ PriorityDataJson,
2228
+ PrioritiesJson,
2229
+ ShaftJson
116
2230
  };
117
-
118
- // app/types/unit.types.ts
119
- var UnitTypes = {
120
- AIM18: "Aim18",
121
- DIM36: "Dim36",
122
- DIOM24: "Diom24",
123
- KLIM: "Klim",
124
- LUM: "Lum",
125
- PMM: "Pmm",
126
- SLIM: "Slim",
127
- TIM28: "Tim28"
2231
+ var MimicsRequest = {
2232
+ // Auxiliary
2233
+ ImageAuxiliaryRequest,
2234
+ LineAuxiliaryRequest,
2235
+ LinkAuxiliaryRequest,
2236
+ PolylineAuxiliaryRequest,
2237
+ SquareAuxiliaryRequest,
2238
+ TextAuxiliaryRequest,
2239
+ // Channel
2240
+ ChannelRequest,
2241
+ // Control elements
2242
+ CompressorRequest,
2243
+ DamperRequest,
2244
+ DamperAutomatedRequest,
2245
+ FanRequest,
2246
+ PumpRequest,
2247
+ PumpAutomatedRequest,
2248
+ TankRequest,
2249
+ ValveRequest,
2250
+ ValveAutomatedRequest,
2251
+ // Elements
2252
+ AlarmIndicatorRequest,
2253
+ CommandRequest,
2254
+ DialRequest,
2255
+ DigitalRequest,
2256
+ DisplayRequest,
2257
+ DynamicTextRequest,
2258
+ LevelBarRequest,
2259
+ SliderRequest,
2260
+ TextChannelRequest,
2261
+ ToggleRequest,
2262
+ // IAS elements
2263
+ CabinetRequest,
2264
+ RepeaterRequest,
2265
+ StationRequest,
2266
+ UnitRequest,
2267
+ // Traits
2268
+ AutomaticSemiAutoRequest,
2269
+ CommandsOpClRequest,
2270
+ CommandsStartStopRequest,
2271
+ ControlLockRequest,
2272
+ FeedbackOpClRequest,
2273
+ FeedbackRunningStoppedRequest,
2274
+ OrderOpClRequest,
2275
+ OrderStartStopRequest,
2276
+ RemoteLocalRequest,
2277
+ TripResetRequest,
2278
+ // PMS elements
2279
+ BreakerRequest,
2280
+ BreakerPmsRequest,
2281
+ GeneratorRequest,
2282
+ GeneratorPmsRequest,
2283
+ OperationModesRequest,
2284
+ PriorityDataRequest,
2285
+ PrioritiesRequest,
2286
+ ShaftRequest
2287
+ };
2288
+ var MimicsResponse = {
2289
+ // Auxiliary
2290
+ ImageAuxiliaryResponse,
2291
+ LineAuxiliaryResponse,
2292
+ LinkAuxiliaryResponse,
2293
+ PolylineAuxiliaryResponse,
2294
+ SquareAuxiliaryResponse,
2295
+ TextAuxiliaryResponse,
2296
+ // Control elements
2297
+ CompressorResponse,
2298
+ DamperResponse,
2299
+ DamperAutomatedResponse,
2300
+ FanResponse,
2301
+ PumpResponse,
2302
+ PumpAutomatedResponse,
2303
+ TankResponse,
2304
+ ValveResponse,
2305
+ ValveAutomatedResponse,
2306
+ // Elements
2307
+ AlarmIndicatorResponse,
2308
+ CommandResponse,
2309
+ DialResponse,
2310
+ DigitalResponse,
2311
+ DisplayResponse,
2312
+ DynamicTextResponse,
2313
+ LevelBarResponse,
2314
+ SliderResponse,
2315
+ TextChannelResponse,
2316
+ ToggleResponse,
2317
+ // IAS elements
2318
+ CabinetResponse,
2319
+ RepeaterResponse,
2320
+ StationResponse,
2321
+ UnitResponse,
2322
+ // PMS elements
2323
+ BreakerResponse,
2324
+ BreakerPmsResponse,
2325
+ GeneratorResponse,
2326
+ GeneratorPmsResponse,
2327
+ OperationModesResponse,
2328
+ PrioritiesResponse,
2329
+ ShaftResponse
2330
+ };
2331
+ var MimicsTypes = {
2332
+ MimicElementTypes,
2333
+ ZDepths,
2334
+ TitleAligns,
2335
+ DigitalStates,
2336
+ DigitalAlarmStates,
2337
+ AlarmStates,
2338
+ MimicAlarmStates,
2339
+ MimicControlStates,
2340
+ ActivationModes,
2341
+ TextAnchorPoints,
2342
+ ValveDesigns,
2343
+ FanDesigns,
2344
+ FanRunStates,
2345
+ FanDirections,
2346
+ FanTypes,
2347
+ LevelBarOrientations,
2348
+ SliderOrientations,
2349
+ CompressorDesigns,
2350
+ LedTypes,
2351
+ InfoLocations,
2352
+ MarkTypes,
2353
+ ScalePositions,
2354
+ ValueTypes,
2355
+ OperationModeStates,
2356
+ UnitDesigns,
2357
+ StationDesigns,
2358
+ RepeaterDesigns,
2359
+ CabinetDesigns,
2360
+ LinkDesigns,
2361
+ OpClStates,
2362
+ RunningStoppedStates,
2363
+ AutoSemiAutoStates,
2364
+ RemoteLocalStates
128
2365
  };
129
-
130
- // app/index.ts
131
2366
  var Types = {
132
2367
  AlarmTypes,
133
2368
  AlarmPriorities,
@@ -137,9 +2372,21 @@ var Types = {
137
2372
  ChannelSpecificTypes,
138
2373
  EventCategories,
139
2374
  EventCriticalities,
140
- UnitTypes
2375
+ UnitTypes,
2376
+ Mimics: MimicsTypes
2377
+ };
2378
+ var index_default = {
2379
+ mongoose: import_mongoose7.default,
2380
+ mongoosePaginate: import_mongoose_paginate_v27.default,
2381
+ mongooseAggregatePaginate: import_mongoose_aggregate_paginate_v27.default,
2382
+ mongooseAutopopulate: import_mongoose_autopopulate2.default
141
2383
  };
142
2384
  // Annotate the CommonJS export names for ESM import in node:
143
2385
  0 && (module.exports = {
2386
+ Docs,
2387
+ Mimics,
2388
+ MimicsRequest,
2389
+ MimicsResponse,
2390
+ Schemas,
144
2391
  Types
145
2392
  });