tango-api-schema 2.0.31 → 2.0.33

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.0.31",
3
+ "version": "2.0.33",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1,119 +1,121 @@
1
- import { Schema, model } from 'mongoose';
1
+ import { Schema, model } from "mongoose";
2
+ import mongooseUniqueValidator from "mongoose-unique-validator";
2
3
 
3
4
  const collection = new Schema(
4
- {
5
- store: {
6
- type: Schema.Types.ObjectId,
7
- ref: 'Store',
8
- required: true,
9
- },
10
- storeId: {
11
- type: String,
12
- trim: true,
13
- },
14
- masterServer: {
15
- type: String,
16
- trim: true,
17
- },
18
- clientId: {
19
- type: String,
20
- trim: true,
21
- },
22
- client: {
23
- type: Schema.Types.ObjectId,
24
- ref: 'client',
25
- required: true,
26
- },
27
- // tagging: [ // need to disscuss with praveen
28
- // {
29
- // type: Schema.Types.ObjectId,
30
- // ref: 'Tagging',
31
- // },
32
- // ],
33
- ip: {
34
- type: String,
35
- trim: true,
36
- },
37
- manufacture: {
38
- type: String,
39
- trim: true,
40
- },
41
- camNumber: {
42
- type: String,
43
- trim: true,
44
- },
45
- userName: {
46
- type: String,
47
- trim: true,
48
- },
49
- password: {
50
- type: String,
51
- trim: true,
52
- },
53
- subType: {
54
- type: String,
55
- trim: true,
56
- },
57
- RTSP: {
58
- type: String,
59
- trim: true,
60
- },
61
- retentionPeriod: {
62
- type: Number,
63
- },
64
- streamName: {
65
- type: String,
66
- trim: true,
67
- unique: true,
68
- },
69
- thumbnailImage: {
70
- type: String,
71
- trim: true,
72
- },
73
- status: {
74
- type: String,
75
- trim: true,
76
- },
77
- isActivated: {
78
- type: Boolean,
79
- },
80
- isUp: {
81
- type: Boolean,
82
- },
83
- captureAt: {
84
- type: Date,
85
- default: Date.now,
86
- },
87
- macId: {
5
+ {
6
+ storeId: {
7
+ type: String,
8
+ trim: true,
9
+ },
10
+ masterServer: {
11
+ type: String,
12
+ trim: true,
13
+ },
14
+ clientId: {
15
+ type: String,
16
+ trim: true,
17
+ },
18
+ ip: {
19
+ type: String,
20
+ trim: true,
21
+ },
22
+ manufacture: {
23
+ type: String,
24
+ trim: true,
25
+ },
26
+ camNumber: {
27
+ type: String,
28
+ trim: true,
29
+ },
30
+ username: {
31
+ type: String,
32
+ trim: true,
33
+ },
34
+ password: {
35
+ type: String,
36
+ trim: true,
37
+ },
38
+ subType: {
39
+ type: String,
40
+ trim: true,
41
+ },
42
+ RTSP: {
43
+ type: String,
44
+ trim: true,
45
+ },
46
+ retentionPeriod: {
47
+ type: Number,
48
+ },
49
+ streamName: {
50
+ type: String,
51
+ trim: true,
52
+ unique: true,
53
+ },
54
+ thumbnailImage: {
55
+ type: String,
56
+ trim: true,
57
+ },
58
+ status: {
59
+ type: String,
60
+ trim: true,
61
+ },
62
+ isActivated: {
63
+ type: Boolean,
64
+ },
65
+ isUp: {
66
+ type: Boolean,
67
+ },
68
+ captureAt: {
69
+ type: Date,
70
+ default: Date.now,
71
+ },
72
+ macId: {
73
+ type: String,
74
+ },
75
+ timeElapsed: {
76
+ type: Number,
77
+ default: 13,
78
+ },
79
+ camName: {
80
+ type: String,
81
+ trim: true,
82
+ },
83
+ filters: {
84
+ yolo: {
88
85
  type: String,
86
+ default: true,
89
87
  },
90
- timeElapsed: {
91
- type: Number,
92
- default: 13,
93
- },
94
- dataProcess: {
95
- type: Boolean,
96
- default: false,
97
- },
98
- camName: {
88
+ yoloProcess: {
99
89
  type: String,
100
- trim: true,
101
- },
102
- filters: {
103
- yolo: {
104
- type: String,
105
- default: true
106
- },
107
- yoloProcess: {
108
- type: String,
109
- default: 10
110
- }
90
+ default: 10,
111
91
  },
92
+ productModules:{
93
+ type:Array,
94
+ }
95
+ },
96
+ productModule: {
97
+ type: Array,
112
98
  },
113
- {
114
- strict: true,
115
- versionKey: false,
116
- timestamps: true
117
- } );
99
+ IsVideoStream: {
100
+ type: Boolean,
101
+ default: false,
102
+ },
103
+ },
104
+ {
105
+ strict: true,
106
+ versionKey: false,
107
+ timestamps: true,
108
+ }
109
+ );
110
+
111
+ collection.index({
112
+ storeId: 1,
113
+ clientId: 1,
114
+ streamName: 1,
115
+ isActivated: 1,
116
+ isUp: 1,
117
+ });
118
+
119
+ collection.plugin(mongooseUniqueValidator);
118
120
 
119
- export default model( 'camera', collection );
121
+ export default model("camera", collection);
@@ -72,7 +72,6 @@ const store = new mongoose.Schema(
72
72
  type: String,
73
73
  enum: ["active", "suspend", "deactive"],
74
74
  },
75
-
76
75
  edge: {
77
76
  timeZone: {
78
77
  type: String,
@@ -16,6 +16,10 @@ const tangoTickets = new mongoose.Schema(
16
16
  enum: ['infra', 'highcount', 'lowcount', 'installation']
17
17
  },
18
18
  infraTicketDetails: {
19
+ issueIdentifiedBy:{
20
+ type:String,
21
+ enum:["client",'tango',"automated"]
22
+ },
19
23
  addressingClient: {
20
24
  type: mongoose.Types.ObjectId
21
25
  },
@@ -96,7 +100,7 @@ const tangoTickets = new mongoose.Schema(
96
100
  },
97
101
  status: {
98
102
  type: String,
99
- enum: ['open', 'inprogress', 'close'],
103
+ enum: ['open', 'inprogress', 'closed'],
100
104
  default: 'open',
101
105
  },
102
106
  },
@@ -11,6 +11,9 @@ const user = new mongoose.Schema(
11
11
  required: true,
12
12
  unique: true,
13
13
  },
14
+ userProfile:{
15
+ type:String
16
+ },
14
17
  countryCode: {
15
18
  type: String,
16
19
  },
@@ -40,14 +43,22 @@ const user = new mongoose.Schema(
40
43
  // },
41
44
  // },
42
45
  userType:{
43
- type: String,
44
- enum:['tango','client']
46
+ type: String,
47
+ enum:['tango','client']
45
48
  },
46
49
  password: {
47
50
  typ: String
48
51
  },
49
52
  refreshToken:{
50
53
  type: String
54
+ },
55
+ twoFactorAuthentication : {
56
+ code: {
57
+ type: String
58
+ },
59
+ isEnable : {
60
+ type: Boolean
61
+ }
51
62
  }
52
63
 
53
64
  },