tango-api-schema 2.6.8 → 2.6.10

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.6.8",
3
+ "version": "2.6.10",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -50,8 +50,13 @@ const billingSchema = new mongoose.Schema(
50
50
  },
51
51
  proRata: {
52
52
  type: String,
53
- enum: ['before15','after15'],
54
- default: 'after15'
53
+ // 'prorate' = always bill for actual working days (no bump).
54
+ // 'flat' = always bill for the full month regardless of working days.
55
+ // 'before15' / 'after15' = legacy values, still accepted for backward
56
+ // compatibility. Backend reads before15 as flat and after15 as
57
+ // prorate at invoice-generation time.
58
+ enum: ['prorate','flat','before15','after15'],
59
+ default: 'prorate'
55
60
  },
56
61
  paymentCategory: {
57
62
  type: String,
@@ -681,6 +681,33 @@ const checklistconfigSchema = new mongoose.Schema({
681
681
  }
682
682
  }
683
683
  },
684
+ detectionConfig:[
685
+ {
686
+ detectionType:{
687
+ type:String
688
+ },
689
+ enabled: {
690
+ type: Boolean,
691
+ default: false
692
+ },
693
+ duration: {
694
+ type: Number,
695
+ default: 2
696
+ },
697
+ condition: {
698
+ type: String,
699
+ enum: ['<', '>', '=', '!=', '>=', '<='],
700
+ default: '>'
701
+ },
702
+ detections: {
703
+ type: Number,
704
+ default: 0
705
+ },
706
+
707
+ }
708
+
709
+
710
+ ]
684
711
  },
685
712
  rawVideoUpload: {
686
713
  type: Boolean,
@@ -600,6 +600,53 @@ const processedchecklistconfigSchema = new mongoose.Schema({
600
600
  },
601
601
  },
602
602
  },
603
+ schedule:{
604
+ scheduletype: {
605
+ type: String
606
+ },
607
+ times:{
608
+ type:Array
609
+ },
610
+ recurrence: {
611
+ status: {
612
+ type: Boolean,
613
+ default: false
614
+ },
615
+ time: {
616
+ type: Number
617
+ },
618
+ type: {
619
+ type: String
620
+ }
621
+ }
622
+ },
623
+ detectionConfig:[
624
+ {
625
+ detectionType:{
626
+ type:String
627
+ },
628
+ enabled: {
629
+ type: Boolean,
630
+ default: false
631
+ },
632
+ duration: {
633
+ type: Number,
634
+ default: 2
635
+ },
636
+ condition: {
637
+ type: String,
638
+ enum: ['<', '>', '=', '!=', '>=', '<='],
639
+ default: '>'
640
+ },
641
+ detections: {
642
+ type: Number,
643
+ default: 0
644
+ },
645
+
646
+ }
647
+
648
+
649
+ ]
603
650
  },
604
651
  rawVideoUpload: {
605
652
  type: Boolean,
@@ -1,31 +1,31 @@
1
- import mongoose from 'mongoose';
2
- import { randomUUID } from 'crypto';
3
-
4
- // schema
5
- const collection = new mongoose.Schema({
6
- apiKey: {
7
- type: String,
8
- required: true,
9
- unique: true,
10
- default: () => randomUUID()
11
- },
12
- countryName: {
13
- type: String,
14
- },
15
- countryCode: {
16
- type: String,
17
- },
18
- clientId: {
19
- type: String,
20
- },
21
- },
22
- {
23
- timestamps: true,
24
- strict: true,
25
- versionKey: false,
26
- });
27
-
28
-
29
- collection.index({ apiKey: 1 });
30
-
31
- export default mongoose.model('regionKey', collection, 'regionKey');
1
+ import mongoose from 'mongoose';
2
+ import { randomUUID } from 'crypto';
3
+
4
+ // schema
5
+ const collection = new mongoose.Schema({
6
+ apiKey: {
7
+ type: String,
8
+ required: true,
9
+ unique: true,
10
+ default: () => randomUUID()
11
+ },
12
+ countryName: {
13
+ type: String,
14
+ },
15
+ countryCode: {
16
+ type: String,
17
+ },
18
+ clientId: {
19
+ type: String,
20
+ },
21
+ },
22
+ {
23
+ timestamps: true,
24
+ strict: true,
25
+ versionKey: false,
26
+ });
27
+
28
+
29
+ collection.index({ apiKey: 1 });
30
+
31
+ export default mongoose.model('regionKey', collection, 'regionKey');