tango-api-schema 2.0.27 → 2.0.29
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/edgeAppVersion.model.js +3 -1
- package/schema/store.model.js +207 -204
package/package.json
CHANGED
package/schema/store.model.js
CHANGED
|
@@ -1,241 +1,244 @@
|
|
|
1
|
-
import mongoose from
|
|
2
|
-
import mongooseUniqueValidator from
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
import mongooseUniqueValidator from "mongoose-unique-validator";
|
|
3
3
|
|
|
4
4
|
const store = new mongoose.Schema(
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
{
|
|
6
|
+
storeId: {
|
|
7
|
+
type: String,
|
|
8
|
+
trim: true,
|
|
9
|
+
required: true,
|
|
10
|
+
unique: true,
|
|
11
|
+
},
|
|
12
|
+
storeName: {
|
|
13
|
+
type: String,
|
|
14
|
+
require: true,
|
|
15
|
+
},
|
|
16
|
+
appId: {
|
|
17
|
+
type: String,
|
|
18
|
+
trim: true,
|
|
19
|
+
required: true,
|
|
20
|
+
unique: true,
|
|
21
|
+
},
|
|
22
|
+
clientId: {
|
|
23
|
+
type: String,
|
|
24
|
+
trim: true,
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
client: {
|
|
28
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
businessType: {
|
|
32
|
+
type: String,
|
|
33
|
+
},
|
|
34
|
+
storeType: {
|
|
35
|
+
type: {
|
|
36
|
+
type: String,
|
|
37
|
+
},
|
|
38
|
+
name: {
|
|
39
|
+
type: String,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
storeProfile: {
|
|
44
|
+
storeCode: {
|
|
45
|
+
type: String,
|
|
46
|
+
},
|
|
47
|
+
address: {
|
|
48
|
+
type: String,
|
|
49
|
+
},
|
|
50
|
+
country: {
|
|
51
|
+
type: String,
|
|
52
|
+
},
|
|
53
|
+
state: {
|
|
54
|
+
type: String,
|
|
55
|
+
},
|
|
56
|
+
city: {
|
|
57
|
+
type: String,
|
|
58
|
+
},
|
|
59
|
+
pincode: {
|
|
60
|
+
type: String,
|
|
61
|
+
},
|
|
62
|
+
timeZone: {
|
|
63
|
+
type: String,
|
|
64
|
+
},
|
|
65
|
+
open: {
|
|
66
|
+
type: String,
|
|
67
|
+
},
|
|
68
|
+
close: {
|
|
69
|
+
type: String,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
status: {
|
|
73
|
+
type: String,
|
|
74
|
+
enum: ["active", "suspend", "deactive"],
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
edge: {
|
|
78
|
+
timeZone: {
|
|
79
|
+
type: String,
|
|
80
|
+
required: false,
|
|
81
|
+
},
|
|
82
|
+
firstFileDate: {
|
|
83
|
+
type: Date,
|
|
84
|
+
},
|
|
85
|
+
firstFile: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
},
|
|
88
|
+
status: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
},
|
|
91
|
+
timeDownload: {
|
|
92
|
+
type: Date,
|
|
93
|
+
},
|
|
94
|
+
hibernet: {
|
|
95
|
+
type: Object,
|
|
96
|
+
},
|
|
97
|
+
appVersion: {
|
|
7
98
|
type: String,
|
|
8
99
|
trim: true,
|
|
9
|
-
required: true,
|
|
10
|
-
unique: true,
|
|
11
100
|
},
|
|
12
|
-
|
|
101
|
+
architecture: {
|
|
13
102
|
type: String,
|
|
14
|
-
|
|
103
|
+
trim: true,
|
|
104
|
+
enum: ["x32", "x64"],
|
|
15
105
|
},
|
|
16
|
-
|
|
106
|
+
updateAppVersion: {
|
|
17
107
|
type: String,
|
|
18
108
|
trim: true,
|
|
19
|
-
required: true,
|
|
20
|
-
unique: true,
|
|
21
109
|
},
|
|
22
|
-
|
|
110
|
+
triggerProcessId: {
|
|
23
111
|
type: String,
|
|
112
|
+
},
|
|
113
|
+
isRestartRequired: {
|
|
114
|
+
type: Boolean,
|
|
115
|
+
},
|
|
116
|
+
serverType: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
},
|
|
119
|
+
deleteInterval: {
|
|
120
|
+
type: Number,
|
|
121
|
+
},
|
|
122
|
+
timeElapsed: {
|
|
123
|
+
type: Number,
|
|
24
124
|
trim: true,
|
|
25
|
-
required: true,
|
|
26
125
|
},
|
|
27
|
-
|
|
28
|
-
type:
|
|
29
|
-
required: true,
|
|
126
|
+
lastLoginAt: {
|
|
127
|
+
type: Date,
|
|
30
128
|
},
|
|
31
|
-
|
|
129
|
+
macId: {
|
|
32
130
|
type: String,
|
|
131
|
+
trim: true,
|
|
33
132
|
},
|
|
34
|
-
|
|
35
|
-
type:
|
|
36
|
-
type: String,
|
|
37
|
-
},
|
|
38
|
-
name: {
|
|
39
|
-
type: String,
|
|
40
|
-
},
|
|
133
|
+
handShake: {
|
|
134
|
+
type: Boolean,
|
|
41
135
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
storeCode: {
|
|
45
|
-
type: String,
|
|
46
|
-
},
|
|
47
|
-
address: {
|
|
48
|
-
type: String,
|
|
49
|
-
},
|
|
50
|
-
country: {
|
|
51
|
-
type: String,
|
|
52
|
-
},
|
|
53
|
-
state: {
|
|
54
|
-
type: String,
|
|
55
|
-
},
|
|
56
|
-
city: {
|
|
57
|
-
type: String,
|
|
58
|
-
},
|
|
59
|
-
pincode: {
|
|
60
|
-
type: String,
|
|
61
|
-
},
|
|
62
|
-
timeZone: {
|
|
63
|
-
type: String,
|
|
64
|
-
},
|
|
65
|
-
open: {
|
|
66
|
-
type: String,
|
|
67
|
-
},
|
|
68
|
-
close: {
|
|
69
|
-
type: String,
|
|
70
|
-
},
|
|
136
|
+
speedTest: {
|
|
137
|
+
type: Object,
|
|
71
138
|
},
|
|
72
|
-
|
|
139
|
+
dataUpload: {
|
|
140
|
+
type: Object,
|
|
141
|
+
},
|
|
142
|
+
preRequisiteStartedAt: {
|
|
143
|
+
type: Date,
|
|
144
|
+
},
|
|
145
|
+
preRequisite: {
|
|
146
|
+
type: Boolean,
|
|
147
|
+
},
|
|
148
|
+
deviceSpec: {
|
|
149
|
+
type: Object,
|
|
150
|
+
},
|
|
151
|
+
systemUtil: {
|
|
152
|
+
type: Object,
|
|
153
|
+
},
|
|
154
|
+
camCred: {
|
|
155
|
+
type: Object,
|
|
156
|
+
},
|
|
157
|
+
deleteExe: {
|
|
158
|
+
type: Boolean,
|
|
159
|
+
},
|
|
160
|
+
camDetails: {
|
|
161
|
+
type: Array,
|
|
162
|
+
},
|
|
163
|
+
secertKey: {
|
|
73
164
|
type: String,
|
|
74
|
-
|
|
165
|
+
trim: true,
|
|
75
166
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
architecture: {
|
|
102
|
-
type: String,
|
|
103
|
-
trim: true,
|
|
104
|
-
enum: [ 'x32', 'x64' ],
|
|
105
|
-
},
|
|
106
|
-
updateAppVersion: {
|
|
107
|
-
type: String,
|
|
108
|
-
trim: true,
|
|
109
|
-
},
|
|
110
|
-
triggerProcessId: {
|
|
111
|
-
type: String,
|
|
112
|
-
},
|
|
113
|
-
isRestartRequired: {
|
|
114
|
-
type: Boolean,
|
|
115
|
-
},
|
|
116
|
-
serverType: {
|
|
117
|
-
type: Boolean,
|
|
118
|
-
},
|
|
119
|
-
deleteInterval: {
|
|
120
|
-
type: Number,
|
|
121
|
-
},
|
|
122
|
-
timeElapsed: {
|
|
123
|
-
type: Number,
|
|
124
|
-
trim: true,
|
|
125
|
-
},
|
|
126
|
-
lastLoginAt: {
|
|
127
|
-
type: Date,
|
|
128
|
-
},
|
|
129
|
-
macId: {
|
|
167
|
+
ipListStatus: {
|
|
168
|
+
type: Boolean,
|
|
169
|
+
},
|
|
170
|
+
ipManufacturerStatus: {
|
|
171
|
+
type: Boolean,
|
|
172
|
+
},
|
|
173
|
+
frameRTSP: {
|
|
174
|
+
type: Boolean,
|
|
175
|
+
},
|
|
176
|
+
installEdge: {
|
|
177
|
+
type: Boolean,
|
|
178
|
+
},
|
|
179
|
+
systemTimeZone: {
|
|
180
|
+
type: String,
|
|
181
|
+
},
|
|
182
|
+
configurationStage: {
|
|
183
|
+
type: String,
|
|
184
|
+
},
|
|
185
|
+
isSocketEnable:{
|
|
186
|
+
type: Boolean,
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
spocDetails: [
|
|
190
|
+
{
|
|
191
|
+
name: {
|
|
130
192
|
type: String,
|
|
131
|
-
|
|
132
|
-
},
|
|
133
|
-
handShake: {
|
|
134
|
-
type: Boolean,
|
|
135
|
-
},
|
|
136
|
-
speedTest: {
|
|
137
|
-
type: Object,
|
|
138
|
-
},
|
|
139
|
-
dataUpload: {
|
|
140
|
-
type: Object,
|
|
141
|
-
},
|
|
142
|
-
preRequisiteStartedAt: {
|
|
143
|
-
type: Date,
|
|
144
|
-
},
|
|
145
|
-
preRequisite: {
|
|
146
|
-
type: Boolean,
|
|
147
|
-
},
|
|
148
|
-
deviceSpec: {
|
|
149
|
-
type: Object,
|
|
150
|
-
},
|
|
151
|
-
systemUtil: {
|
|
152
|
-
type: Object,
|
|
193
|
+
required: true,
|
|
153
194
|
},
|
|
154
|
-
|
|
155
|
-
type: Object,
|
|
156
|
-
},
|
|
157
|
-
deleteExe: {
|
|
158
|
-
type: Boolean,
|
|
159
|
-
},
|
|
160
|
-
camDetails: {
|
|
161
|
-
type: Array,
|
|
162
|
-
},
|
|
163
|
-
secertKey: {
|
|
195
|
+
email: {
|
|
164
196
|
type: String,
|
|
165
|
-
|
|
166
|
-
},
|
|
167
|
-
ipListStatus: {
|
|
168
|
-
type: Boolean,
|
|
169
|
-
},
|
|
170
|
-
ipManufacturerStatus: {
|
|
171
|
-
type: Boolean,
|
|
197
|
+
required: true,
|
|
172
198
|
},
|
|
173
|
-
|
|
174
|
-
type: Boolean,
|
|
175
|
-
},
|
|
176
|
-
installEdge: {
|
|
177
|
-
type: Boolean,
|
|
178
|
-
},
|
|
179
|
-
systemTimeZone: {
|
|
199
|
+
contact: {
|
|
180
200
|
type: String,
|
|
201
|
+
required: true,
|
|
181
202
|
},
|
|
182
|
-
|
|
203
|
+
designation: {
|
|
183
204
|
type: String,
|
|
184
205
|
},
|
|
185
206
|
},
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
required: true,
|
|
195
|
-
},
|
|
196
|
-
contact: {
|
|
197
|
-
type: String,
|
|
198
|
-
required: true,
|
|
199
|
-
},
|
|
200
|
-
designation: {
|
|
201
|
-
type: String,
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
],
|
|
205
|
-
storeConnectionId: {
|
|
206
|
-
type: String,
|
|
207
|
+
],
|
|
208
|
+
storeConnectionId: {
|
|
209
|
+
type: String,
|
|
210
|
+
},
|
|
211
|
+
auditConfigs: {
|
|
212
|
+
count: {
|
|
213
|
+
type: Number,
|
|
214
|
+
default: 200,
|
|
207
215
|
},
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
default: 200,
|
|
212
|
-
},
|
|
213
|
-
iteration: {
|
|
214
|
-
type: Number,
|
|
215
|
-
default: 1,
|
|
216
|
-
},
|
|
217
|
-
ratio: {
|
|
218
|
-
type: mongoose.Schema.Types.Number,
|
|
219
|
-
default: 0.75,
|
|
220
|
-
},
|
|
216
|
+
iteration: {
|
|
217
|
+
type: Number,
|
|
218
|
+
default: 1,
|
|
221
219
|
},
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
},
|
|
226
|
-
hibernation:{
|
|
227
|
-
type:Date
|
|
228
|
-
}
|
|
220
|
+
ratio: {
|
|
221
|
+
type: mongoose.Schema.Types.Number,
|
|
222
|
+
default: 0.75,
|
|
229
223
|
},
|
|
230
224
|
},
|
|
231
|
-
{
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
225
|
+
ticketConfigs: {
|
|
226
|
+
nextTicektGenerationTime: {
|
|
227
|
+
type: Date,
|
|
228
|
+
},
|
|
229
|
+
hibernation: {
|
|
230
|
+
type: Date,
|
|
231
|
+
},
|
|
235
232
|
},
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
strict: true,
|
|
236
|
+
versionKey: false,
|
|
237
|
+
timestamps: true,
|
|
238
|
+
}
|
|
236
239
|
);
|
|
237
240
|
|
|
238
|
-
store.index(
|
|
239
|
-
store.plugin(
|
|
241
|
+
store.index({ storeId: 1, clientId: 1, appId: 1 });
|
|
242
|
+
store.plugin(mongooseUniqueValidator);
|
|
240
243
|
|
|
241
|
-
export default mongoose.model(
|
|
244
|
+
export default mongoose.model("store", store);
|