tango-api-schema 2.0.3 → 2.0.4

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.3",
3
+ "version": "2.0.4",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -71,21 +71,11 @@ const client = new mongoose.Schema(
71
71
  },
72
72
  industry: {
73
73
  type: String,
74
+ enum:['apparel','footwear','skincare','foodandbeverage','techstartup','grooming','leather','furniture','mattress',' customerelectronics','jewellery','interiordesign','ev','fintech','perfume','fashionaccessories','innerwear','nutrition','fashionandlifestyle','eyewear']
74
75
  },
75
76
  clientType: {
76
77
  type: String,
77
- },
78
- corporateEmail: {
79
- type: String,
80
- require: true,
81
- },
82
- countryCode: {
83
- type: String,
84
- require: true,
85
- },
86
- mobileNumber: {
87
- type: String,
88
- require: true,
78
+ enum:['partnership', 'proprietorship', 'pvtltd', 'person']
89
79
  },
90
80
  registeredAddress: {
91
81
  type: String,
@@ -132,32 +122,41 @@ const client = new mongoose.Schema(
132
122
  ticketConfigs: {
133
123
  installationReAssign: {
134
124
  type: Number,
125
+ default:0
135
126
  },
136
- isInfraTickets: {
137
- type: Boolean,
138
- default: true,
127
+ downTimeType: {
128
+ type: Number, // 0 for one camera and 1 for multi cameras
129
+ enum:[0,1]
139
130
  },
140
- infraReAssign: {
131
+ infraDownTime: {
141
132
  type: Number,
133
+ default:60,
134
+ enum:[60,120,180,240,300,360,420,480,540,600,660,720]
142
135
  },
143
- infraDownTime: {
136
+ MinFilesCount:{
144
137
  type: Number,
138
+ default:0
145
139
  },
146
- isLiveTickets: {
147
- type: Boolean,
148
- default: false,
140
+ rcaTicketAssign:{// root cause anlysis
141
+ type: Number,
142
+ enum:[1,2,3,4,5,6,8,9,10,11,12]
149
143
  },
150
- downTimeType: {
151
- type: Number, // 0 for one camera and 1 for multi cameras
144
+ refreshAlert:{
145
+ type: Number,
146
+ default:1,
147
+ enum:[0,1,2,3,4,5,6,8,9,10]
152
148
  },
153
- downTimeHour: {
149
+ statusCheckAlert:{
154
150
  type: Number,
151
+ default:1,
152
+ enum:[1,2,3,4,5,6,8,9,10,11,12]
155
153
  },
156
154
  accuracyPercentage: {
157
155
  type: Number, // in less than
158
156
  },
159
157
  reTrain: {
160
158
  type: Number, // calculate no of past days
159
+ enum:[1,2,3,4,5,6,8,9,10,11,12]
161
160
  },
162
161
 
163
162
  },
@@ -25,4 +25,4 @@ const countryCodes = new mongoose.Schema(
25
25
  );
26
26
 
27
27
  countryCodes.plugin( mongooseUniqueValidator );
28
- export default mongoose.model( 'countryCodes', countryCodes );
28
+ export default mongoose.model( 'countryCodes', countryCodes , 'countryCodes');
@@ -0,0 +1,27 @@
1
+ import mongoose from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const edgeAppVersion = new mongoose.Schema(
5
+ {
6
+ appVersion: {
7
+ type: String,
8
+ unique: true,
9
+ },
10
+ isActive: {
11
+ type: Boolean,
12
+ default: true,
13
+ },
14
+ isDefault: {
15
+ type: Boolean,
16
+ },
17
+
18
+ },
19
+ {
20
+ strict: true,
21
+ versionKey: false,
22
+ timestamps: true,
23
+ },
24
+ );
25
+
26
+ edgeAppVersion.plugin( mongooseUniqueValidator );
27
+ export default mongoose.model( 'edgeappVersion', edgeAppVersion, 'edgeappVersion' );
@@ -23,7 +23,6 @@ const lead = new mongoose.Schema(
23
23
  },
24
24
  countryCode: {
25
25
  type: String,
26
- required: true,
27
26
  },
28
27
  mobileNumber: {
29
28
  type: Number,
@@ -65,6 +65,10 @@ const store = new mongoose.Schema(
65
65
  type: String,
66
66
  },
67
67
  },
68
+ status: {
69
+ type: String,
70
+ enum: ['active','suspend','deactive']
71
+ },
68
72
  edge: {
69
73
  camDetails: {
70
74
  cameras: {
@@ -94,6 +98,20 @@ const store = new mongoose.Schema(
94
98
  storeConnectionId: {
95
99
  type: String,
96
100
  },
101
+ auditConfigs:{
102
+ count: {
103
+ type: Number,
104
+ default: 200,
105
+ },
106
+ iteration: {
107
+ type: Number,
108
+ default: 1,
109
+ },
110
+ ratio: {
111
+ type: mongoose.Schema.Types.Number,
112
+ default: 0.75,
113
+ },
114
+ }
97
115
  },
98
116
  {
99
117
  strict: true,
@@ -0,0 +1,74 @@
1
+ import mongoose from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const user = new mongoose.Schema(
5
+ {
6
+ userName: {
7
+ type: String,
8
+ },
9
+ email: {
10
+ type: String,
11
+ required: true,
12
+ unique: true,
13
+ },
14
+ countryCode: {
15
+ type: String,
16
+ },
17
+ mobileNumber: {
18
+ type: String,
19
+ required: true,
20
+ },
21
+ role: {
22
+ type: String,
23
+ enum: [ 'superAdmin', 'Admin', 'user' ],
24
+ default: 'user',
25
+ },
26
+ isActive: {
27
+ type: Boolean,
28
+ default: false,
29
+ },
30
+ Assigned: {
31
+ type: {
32
+ type: String,
33
+ enum: [ 'store', 'group' ],
34
+ },
35
+ list: {
36
+ type: Array,
37
+ },
38
+ },
39
+ permission: [
40
+ {
41
+ featureName: {
42
+ type: String,
43
+ },
44
+ product: [
45
+ {
46
+ name: {
47
+ type: String,
48
+ },
49
+ isView: {
50
+ type: Boolean,
51
+ },
52
+ isEdit: {
53
+ type: Boolean,
54
+ },
55
+ isDownload: {
56
+ type: Boolean,
57
+ },
58
+ isDelete: {
59
+ type: Boolean,
60
+ },
61
+ },
62
+ ],
63
+ },
64
+ ],
65
+ },
66
+ {
67
+ strict: true,
68
+ versionKey: false,
69
+ timestamps: true,
70
+ },
71
+ );
72
+
73
+ user.plugin( mongooseUniqueValidator );
74
+ export default mongoose.model( 'user', user );