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 +1 -1
- package/schema/camera.model.js +113 -111
- package/schema/store.model.js +0 -1
- package/schema/tangoTicket.model.js +5 -1
- package/schema/user.model.js +13 -2
package/package.json
CHANGED
package/schema/camera.model.js
CHANGED
|
@@ -1,119 +1,121 @@
|
|
|
1
|
-
import { Schema, model } from
|
|
1
|
+
import { Schema, model } from "mongoose";
|
|
2
|
+
import mongooseUniqueValidator from "mongoose-unique-validator";
|
|
2
3
|
|
|
3
4
|
const collection = new Schema(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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(
|
|
121
|
+
export default model("camera", collection);
|
package/schema/store.model.js
CHANGED
|
@@ -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', '
|
|
103
|
+
enum: ['open', 'inprogress', 'closed'],
|
|
100
104
|
default: 'open',
|
|
101
105
|
},
|
|
102
106
|
},
|
package/schema/user.model.js
CHANGED
|
@@ -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
|
},
|