tango-api-schema 2.5.1 → 2.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-api-schema",
3
- "version": "2.5.1",
3
+ "version": "2.5.2",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -520,44 +520,45 @@ const client = new mongoose.Schema(
520
520
  type: String,
521
521
  default: "95%"
522
522
  },
523
+
523
524
  taggingLimitation: {
524
- type: [
525
- {
526
- type: {
527
- type: String,
528
- default: ""
529
- },
530
- value: {
531
- type: Number,
532
- default: 0
533
- },
534
- unit: {
535
- type: String,
536
- default: "%"
537
- },
538
- name: {
539
- type: String,
540
- default: ""
541
- },
542
- key: {
543
- type: String,
544
- default: ""
525
+ type: [
526
+ {
527
+ effectiveFrom: {
528
+ type: String, // yyyy-mm-dd
529
+ required: true
530
+ },
531
+
532
+ values: [
533
+ {
534
+ type: { type: String, default: "" },
535
+ value: { type: Number, default: 0 },
536
+ unit: { type: String, default: "%" },
537
+ name: { type: String, default: "" },
538
+ key: { type: String, default: "" },
539
+ iconName: { type: String, default: "" }
540
+ }
541
+ ]
542
+ }
543
+ ],
544
+
545
+ default: function () {
546
+ const today = new Date().toISOString().substring(0, 10);
547
+
548
+ return [
549
+ {
550
+ effectiveFrom: today,
551
+ values: [
552
+ { type: "duplicate", value: 10, unit: "%", name: "Duplicate", iconName: "duplicateTag", key: "d" },
553
+ { type: "employee", value: 5, unit: "%", name: "Employee", iconName: "employeeTag", key: "e" },
554
+ { type: "houseKeeping", value: 2, unit: "%", name: "House keeping", iconName: "houseKeepingTag", key: "h" },
555
+ { type: "junk", value: 5, unit: "%", name: "Junk", iconName: "junkTag", key: "j" }
556
+ ]
557
+ }
558
+ ];
559
+ }
545
560
  },
546
- iconName: {
547
- type: String,
548
- default: ""
549
- }
550
- }
551
- ],
552
- default: function () {
553
- return [
554
- { type: "duplicate", value: 10, unit: "%", name:"Duplicate", iconName:"duplicateTag", key:"d" },
555
- { type: "employee", value: 5, unit: "%", name:"Employee", iconName:"employeeTag", key:"e" },
556
- { type: "houseKeeping", value: 1, unit: "%", name:"House keeping", iconName:"houseKeepingTag", key:"h" },
557
- { type: "junk", value: 5, unit: "%", name:"Junk", iconName:"junkTag", key:"j" }
558
- ];
559
- }
560
- },
561
+
561
562
  accuracyBreach: {
562
563
  ticketCount: {
563
564
  type: String,