tango-api-schema 2.0.128 → 2.0.129

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.
Files changed (38) hide show
  1. package/index.js +74 -74
  2. package/package.json +27 -27
  3. package/schema/applicationDefault.model.js +24 -24
  4. package/schema/assignAudit.model.js +48 -48
  5. package/schema/auditClientData.model.js +45 -45
  6. package/schema/auditLogs.model.js +65 -65
  7. package/schema/auditStoreData.model.js +48 -48
  8. package/schema/authentication.model.js +27 -27
  9. package/schema/basePricing.model.js +29 -29
  10. package/schema/billing.model.js +99 -99
  11. package/schema/camera.model.js +123 -123
  12. package/schema/client.model.js +452 -459
  13. package/schema/clientRequest.model.js +40 -40
  14. package/schema/countryCodes.model.js +28 -28
  15. package/schema/dailyPricing.model.js +85 -85
  16. package/schema/edgeAppVersion.model.js +33 -33
  17. package/schema/edgeappAuth.model.js +32 -32
  18. package/schema/fitting.model.js +52 -52
  19. package/schema/group.model.js +36 -36
  20. package/schema/infraReason.model.js +44 -44
  21. package/schema/internalAuth.model.js +36 -36
  22. package/schema/invoice.model.js +89 -89
  23. package/schema/ipLogs.model.js +39 -39
  24. package/schema/lead.model.js +75 -75
  25. package/schema/matLog.model.js +26 -26
  26. package/schema/otp.model.js +27 -27
  27. package/schema/paymentAccount.model.js +52 -52
  28. package/schema/quality.model.js +57 -57
  29. package/schema/report.model.js +30 -30
  30. package/schema/standaredRole.model.js +56 -56
  31. package/schema/store.model.js +317 -313
  32. package/schema/storeAudit.model.js +54 -54
  33. package/schema/tagging.model.js +38 -38
  34. package/schema/tangoTicket.model.js +210 -210
  35. package/schema/user.model.js +95 -95
  36. package/schema/userAssignedStore.model.js +41 -41
  37. package/schema/userAudit.model.js +69 -69
  38. package/schema/workstation.model.js +77 -77
@@ -1,459 +1,452 @@
1
- import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
-
4
- const client = new mongoose.Schema(
5
- {
6
- clientName: {
7
- type: String,
8
- trim: true,
9
- required: true,
10
- unique: true,
11
- },
12
- clientId: {
13
- type: String,
14
- trim: true,
15
- required: true,
16
- unique: true,
17
- },
18
- tangoId: {
19
- type: Number,
20
- require: true,
21
- },
22
- userId: {
23
- type: mongoose.Types.ObjectId,
24
- required: true,
25
- },
26
- planDetails: {
27
- totalStores: {
28
- type: String,
29
- require: true,
30
- },
31
- storeSize: {
32
- type: String,
33
- require: true,
34
- },
35
- totalCamera: {
36
- type: Number,
37
- require: true,
38
- },
39
- subscriptionPeriod: {
40
- type: String,
41
- enum: ['monthly','quarterly','annual'],
42
- },
43
- subscriptionType: {
44
- type: String,
45
- enum: ['free','premium','enterprise'],
46
- },
47
- paymentStatus: {
48
- type: String,
49
- enum: ['free','trial','paid','unbilled','due'],
50
- },
51
- product: [
52
- {
53
- productName: {
54
- type: String,
55
- },
56
- trialStartDate: {
57
- type: Date,
58
- },
59
- trialEndDate: {
60
- type: Date,
61
- },
62
- subscribedDate: {
63
- type: Date
64
- },
65
- status: {
66
- type: String,
67
- enum: ['trial','live'],
68
- default: 'trial'
69
- }
70
- }
71
- ],
72
- },
73
- status: {
74
- type: String,
75
- enum: ['active','deactive','hold','suspended'],
76
- default: 'active'
77
- },
78
- profileDetails: {
79
- logo: {
80
- type: String
81
- },
82
- registeredCompanyName: {
83
- type: String,
84
- },
85
- industry: {
86
- type: String,
87
- enum: ['apparel','footwear','skincare','foodandbeverage','techstartup','grooming','leather','furniture','mattress','customerelectronics','jewellery','interiordesign','ev','fintech','perfume','fashionaccessories','innerwear','nutrition','fashionandlifestyle','eyewear']
88
- },
89
- clientType: {
90
- type: String,
91
- enum: ['partnership','proprietorship','pvtltd','person']
92
- },
93
- registeredAddress: {
94
- type: String,
95
- },
96
- headQuarters: {
97
- type: String,
98
- },
99
- website: {
100
- type: String,
101
- },
102
- },
103
- billingDetails: {
104
- tradeName: {
105
- type: String,
106
- },
107
- gstNumber: {
108
- type: String,
109
- },
110
- authorityName: {
111
- type: String,
112
- },
113
- authorityEmail: {
114
- type: String,
115
- },
116
- billingAddress: {
117
- type: String,
118
- },
119
- companyName: {
120
- type: String,
121
- },
122
- PlaceOfSupply: {
123
- type: String,
124
- },
125
- },
126
- signatoryDetail: {
127
- name: {
128
- type: String,
129
- },
130
- email: {
131
- type: String,
132
- },
133
- number: {
134
- type: String,
135
- },
136
- designation: {
137
- type: String,
138
- },
139
- },
140
- ticketConfigs: {
141
- installationReAssign: {
142
- type: Number,
143
- default:0
144
- },
145
- downTimeType: {
146
- type: Number, // 0 for one camera and 1 for multi cameras
147
- enum:[0,1],
148
- default:0
149
- },
150
- infraReport:{
151
- start:{
152
- type:String,
153
- default:"09:00"
154
- },
155
- end:{
156
- type:String,
157
- default:"19:00"
158
-
159
- }
160
- },
161
- infraReport:{
162
- start:{
163
- type:String,
164
- default:"9:00"
165
- },
166
- end:{
167
- type:String,
168
- default:"19:00"
169
-
170
- }
171
- },
172
- infraDownTime: {
173
- type: Number,
174
- default:1,
175
- enum:[1,2,3,4,5,6,8,9,10,11,12]
176
- },
177
- MinFilesCount:{
178
- type: Number,
179
- default:0
180
- },
181
- rcaTicketAssign:{// root cause anlysis
182
- type: Number,
183
- enum:[1,2,3,4,5,6,8,9,10,11,12],
184
- default:1
185
- },
186
- refreshAlert:{
187
- type: Number,
188
- default:1,
189
- enum:[0,1,2,3,4,5,6,8,9,10]
190
- },
191
- statusCheckAlert:{
192
- type: Number,
193
- default:1,
194
- enum:[1,2,3,4,5,6,8,9,10,11,12]
195
- },
196
- accuracyPercentage: {
197
- type: Number, // in less than
198
- default:10
199
- },
200
- reTrain: {
201
- type: Number, // calculate no of past days
202
- enum:[1,2,3,4,5,6,8,9,10,11,12],
203
- default:1
204
- },
205
- emailAlert:{
206
- type: Boolean,
207
- default: false
208
- },
209
- matConfig:{
210
- enabled:{
211
- type: Boolean,
212
- default: false
213
- },
214
- configureDays:{
215
- type: Number,
216
- default: 3
217
- },
218
- matFileProgress:{
219
- type: Array,
220
- }
221
- }
222
- },
223
- reportConfigs: {
224
- report: {
225
- type: Boolean,
226
- },
227
- reportName: {
228
- type: String,
229
- },
230
- },
231
- auditConfigs: {
232
- audit: {
233
- type: Boolean,
234
- },
235
- queueName: {
236
- type: String,
237
- },
238
- },
239
- assignedUsers: {
240
- csm: {
241
- type: Object,
242
- },
243
- ops: {
244
- type: Array,
245
- },
246
- },
247
- ssoLogin: {
248
- isEnable: {
249
- type: Boolean,
250
- default: false,
251
- },
252
- domainName: {
253
- type: Array,
254
- },
255
- },
256
- featureConfigs: {
257
- open: {
258
- type: String,
259
- default: "10:00:00"
260
- },
261
- close: {
262
- type: String,
263
- default: "23:00:00"
264
- },
265
- infraAlert: {
266
- condition: {
267
- type: String,
268
- },
269
- value: {
270
- type: Number,
271
- },
272
- },
273
- bouncedLimit: {
274
- condition: {
275
- type: String,
276
- },
277
- value: {
278
- type: Number,
279
- },
280
- },
281
- missedOpportunityFrom: {
282
- condition: {
283
- type: String,
284
- },
285
- value: {
286
- type: Number,
287
- },
288
- },
289
- missedOpportunityTo: {
290
- condition: {
291
- type: String,
292
- },
293
- value: {
294
- type: Number,
295
- },
296
- },
297
- conversion: {
298
- condition: {
299
- type: String,
300
- },
301
- value: {
302
- type: Number,
303
- },
304
- },
305
- billableCalculation: {
306
- type: String,
307
- },
308
- missedOpportunityCalculation: {
309
- type: String,
310
- },
311
- conversionCalculation: {
312
- type: String,
313
- },
314
- isNormalized: {
315
- type: Boolean,
316
- default: false,
317
- },
318
- isPasserByData: {
319
- type: Boolean,
320
- default: false,
321
- },
322
- isFootfallDirectory: {
323
- type: Boolean,
324
- default: false,
325
- },
326
- isExcludedArea:{
327
- type:Boolean,
328
- default:true
329
- },
330
- updateFeatureConfig:{
331
- type:Boolean,
332
- default:true
333
- },
334
- },
335
- document: {
336
- addressProof: {
337
- path: {
338
- type: String,
339
-
340
- },
341
- },
342
- gst: {
343
- number: {
344
- type: String,
345
- },
346
- path: {
347
- type: String,
348
-
349
- },
350
- },
351
- pan: {
352
- number: {
353
- type: String,
354
- },
355
- path: {
356
- type: String,
357
-
358
- },
359
- },
360
- cin: {
361
- number: {
362
- type: String,
363
- },
364
- path: {
365
- type: String,
366
-
367
- },
368
- },
369
-
370
- },
371
- price:{
372
- type:Number
373
- },
374
- paymentInvoice: {
375
- proRate: {
376
- type: String,
377
- enum: ['before15','after15'],
378
- default: 'before15',
379
- },
380
- paymentType: {
381
- type:String,
382
- enum: ['online','banktransfer'],
383
- default: 'online',
384
- },
385
- paymentCycle: {
386
- type:String,
387
- },
388
- currencyType: {
389
- type:String
390
- },
391
- invoiceTo:{
392
- type:Array
393
- },
394
- paymentAgreementTo:{
395
- type:Array
396
- },
397
- invoiceOn: {
398
- type:String,
399
- enum: ['lastday','25th'],
400
- default: '25th',
401
- },
402
- extendPaymentPeriodDays: {
403
- type:Number,
404
- default: 5,
405
- },
406
- invoiceCC:{
407
- type:Array
408
- },
409
- PomNumber:{
410
- type:String
411
- }
412
- },
413
- priceType:{
414
- type:String,
415
- enum: ['standard','step'],
416
- default: 'standard',
417
- },
418
- virtualAccount:{
419
- accountNo:{
420
- type:String
421
- },
422
- ifscCode:{
423
- type:String
424
- },
425
- swiftCode:{
426
- type:String
427
- },
428
- branch:{
429
- type:String
430
- }
431
- },
432
- clientApi: {
433
- apiKey: {
434
- type: String,
435
- default: null,
436
- },
437
- status: {
438
- type: Boolean,
439
- default: false,
440
- },
441
- allowedIps: {
442
- type: Array,
443
- default: [ '*' ],
444
- },
445
- },
446
- notifyCsmAssign: {
447
- type: Boolean,
448
- default:false
449
- },
450
- },
451
- {
452
- strict: true,
453
- versionKey: false,
454
- timestamps: true,
455
- },
456
- );
457
-
458
- client.plugin( mongooseUniqueValidator );
459
- export default mongoose.model( 'client', client );
1
+ import mongoose from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const client = new mongoose.Schema(
5
+ {
6
+ clientName: {
7
+ type: String,
8
+ trim: true,
9
+ required: true,
10
+ unique: true,
11
+ },
12
+ clientId: {
13
+ type: String,
14
+ trim: true,
15
+ required: true,
16
+ unique: true,
17
+ },
18
+ tangoId: {
19
+ type: Number,
20
+ require: true,
21
+ },
22
+ userId: {
23
+ type: mongoose.Types.ObjectId,
24
+ required: true,
25
+ },
26
+ planDetails: {
27
+ totalStores: {
28
+ type: String,
29
+ require: true,
30
+ },
31
+ storeSize: {
32
+ type: String,
33
+ require: true,
34
+ },
35
+ totalCamera: {
36
+ type: Number,
37
+ require: true,
38
+ },
39
+ subscriptionPeriod: {
40
+ type: String,
41
+ enum: ['monthly','quarterly','annual'],
42
+ },
43
+ subscriptionType: {
44
+ type: String,
45
+ enum: ['free','premium','enterprise'],
46
+ },
47
+ paymentStatus: {
48
+ type: String,
49
+ enum: ['free','trial','paid','unbilled','due'],
50
+ },
51
+ product: [
52
+ {
53
+ productName: {
54
+ type: String,
55
+ },
56
+ trialStartDate: {
57
+ type: Date,
58
+ },
59
+ trialEndDate: {
60
+ type: Date,
61
+ },
62
+ subscribedDate: {
63
+ type: Date
64
+ },
65
+ status: {
66
+ type: String,
67
+ enum: ['trial','live'],
68
+ default: 'trial'
69
+ }
70
+ }
71
+ ],
72
+ },
73
+ status: {
74
+ type: String,
75
+ enum: ['active','deactive','hold','suspended'],
76
+ default: 'active'
77
+ },
78
+ profileDetails: {
79
+ logo: {
80
+ type: String
81
+ },
82
+ registeredCompanyName: {
83
+ type: String,
84
+ },
85
+ industry: {
86
+ type: String,
87
+ enum: ['apparel','footwear','skincare','foodandbeverage','techstartup','grooming','leather','furniture','mattress','customerelectronics','jewellery','interiordesign','ev','fintech','perfume','fashionaccessories','innerwear','nutrition','fashionandlifestyle','eyewear']
88
+ },
89
+ clientType: {
90
+ type: String,
91
+ enum: ['partnership','proprietorship','pvtltd','person']
92
+ },
93
+ registeredAddress: {
94
+ type: String,
95
+ },
96
+ headQuarters: {
97
+ type: String,
98
+ },
99
+ website: {
100
+ type: String,
101
+ },
102
+ },
103
+ billingDetails: {
104
+ tradeName: {
105
+ type: String,
106
+ },
107
+ gstNumber: {
108
+ type: String,
109
+ },
110
+ authorityName: {
111
+ type: String,
112
+ },
113
+ authorityEmail: {
114
+ type: String,
115
+ },
116
+ billingAddress: {
117
+ type: String,
118
+ },
119
+ companyName: {
120
+ type: String,
121
+ },
122
+ PlaceOfSupply: {
123
+ type: String,
124
+ },
125
+ },
126
+ signatoryDetail: {
127
+ name: {
128
+ type: String,
129
+ },
130
+ email: {
131
+ type: String,
132
+ },
133
+ number: {
134
+ type: String,
135
+ },
136
+ designation: {
137
+ type: String,
138
+ },
139
+ },
140
+ ticketConfigs: {
141
+ installationReAssign: {
142
+ type: Number,
143
+ default:0
144
+ },
145
+ downTimeType: {
146
+ type: Number, // 0 for one camera and 1 for multi cameras
147
+ enum:[0,1],
148
+ default:0
149
+ },
150
+ infraReport:{
151
+ start:{
152
+ type:String,
153
+ default:"09:00"
154
+ },
155
+ end:{
156
+ type:String,
157
+ default:"19:00"
158
+
159
+ }
160
+ },
161
+ infraReport:{
162
+ start:{
163
+ type:String,
164
+ default:"9:00"
165
+ },
166
+ end:{
167
+ type:String,
168
+ default:"19:00"
169
+
170
+ }
171
+ },
172
+ infraDownTime: {
173
+ type: Number,
174
+ default:1,
175
+ enum:[1,2,3,4,5,6,8,9,10,11,12]
176
+ },
177
+ MinFilesCount:{
178
+ type: Number,
179
+ default:0
180
+ },
181
+ rcaTicketAssign:{// root cause anlysis
182
+ type: Number,
183
+ enum:[1,2,3,4,5,6,8,9,10,11,12],
184
+ default:1
185
+ },
186
+ refreshAlert:{
187
+ type: Number,
188
+ default:1,
189
+ enum:[0,1,2,3,4,5,6,8,9,10]
190
+ },
191
+ statusCheckAlert:{
192
+ type: Number,
193
+ default:1,
194
+ enum:[1,2,3,4,5,6,8,9,10,11,12]
195
+ },
196
+ accuracyPercentage: {
197
+ type: Number, // in less than
198
+ default:10
199
+ },
200
+ reTrain: {
201
+ type: Number, // calculate no of past days
202
+ enum:[1,2,3,4,5,6,8,9,10,11,12],
203
+ default:1
204
+ },
205
+ emailAlert:{
206
+ type: Boolean,
207
+ default: false
208
+ },
209
+ matConfig:{
210
+ enabled:{
211
+ type: Boolean,
212
+ default: false
213
+ }
214
+ }
215
+ },
216
+ reportConfigs: {
217
+ report: {
218
+ type: Boolean,
219
+ },
220
+ reportName: {
221
+ type: String,
222
+ },
223
+ },
224
+ auditConfigs: {
225
+ audit: {
226
+ type: Boolean,
227
+ },
228
+ queueName: {
229
+ type: String,
230
+ },
231
+ },
232
+ assignedUsers: {
233
+ csm: {
234
+ type: Object,
235
+ },
236
+ ops: {
237
+ type: Array,
238
+ },
239
+ },
240
+ ssoLogin: {
241
+ isEnable: {
242
+ type: Boolean,
243
+ default: false,
244
+ },
245
+ domainName: {
246
+ type: Array,
247
+ },
248
+ },
249
+ featureConfigs: {
250
+ open: {
251
+ type: String,
252
+ default: "10:00:00"
253
+ },
254
+ close: {
255
+ type: String,
256
+ default: "23:00:00"
257
+ },
258
+ infraAlert: {
259
+ condition: {
260
+ type: String,
261
+ },
262
+ value: {
263
+ type: Number,
264
+ },
265
+ },
266
+ bouncedLimit: {
267
+ condition: {
268
+ type: String,
269
+ },
270
+ value: {
271
+ type: Number,
272
+ },
273
+ },
274
+ missedOpportunityFrom: {
275
+ condition: {
276
+ type: String,
277
+ },
278
+ value: {
279
+ type: Number,
280
+ },
281
+ },
282
+ missedOpportunityTo: {
283
+ condition: {
284
+ type: String,
285
+ },
286
+ value: {
287
+ type: Number,
288
+ },
289
+ },
290
+ conversion: {
291
+ condition: {
292
+ type: String,
293
+ },
294
+ value: {
295
+ type: Number,
296
+ },
297
+ },
298
+ billableCalculation: {
299
+ type: String,
300
+ },
301
+ missedOpportunityCalculation: {
302
+ type: String,
303
+ },
304
+ conversionCalculation: {
305
+ type: String,
306
+ },
307
+ isNormalized: {
308
+ type: Boolean,
309
+ default: false,
310
+ },
311
+ isPasserByData: {
312
+ type: Boolean,
313
+ default: false,
314
+ },
315
+ isFootfallDirectory: {
316
+ type: Boolean,
317
+ default: false,
318
+ },
319
+ isExcludedArea:{
320
+ type:Boolean,
321
+ default:true
322
+ },
323
+ updateFeatureConfig:{
324
+ type:Boolean,
325
+ default:true
326
+ },
327
+ },
328
+ document: {
329
+ addressProof: {
330
+ path: {
331
+ type: String,
332
+
333
+ },
334
+ },
335
+ gst: {
336
+ number: {
337
+ type: String,
338
+ },
339
+ path: {
340
+ type: String,
341
+
342
+ },
343
+ },
344
+ pan: {
345
+ number: {
346
+ type: String,
347
+ },
348
+ path: {
349
+ type: String,
350
+
351
+ },
352
+ },
353
+ cin: {
354
+ number: {
355
+ type: String,
356
+ },
357
+ path: {
358
+ type: String,
359
+
360
+ },
361
+ },
362
+
363
+ },
364
+ price:{
365
+ type:Number
366
+ },
367
+ paymentInvoice: {
368
+ proRate: {
369
+ type: String,
370
+ enum: ['before15','after15'],
371
+ default: 'before15',
372
+ },
373
+ paymentType: {
374
+ type:String,
375
+ enum: ['online','banktransfer'],
376
+ default: 'online',
377
+ },
378
+ paymentCycle: {
379
+ type:String,
380
+ },
381
+ currencyType: {
382
+ type:String
383
+ },
384
+ invoiceTo:{
385
+ type:Array
386
+ },
387
+ paymentAgreementTo:{
388
+ type:Array
389
+ },
390
+ invoiceOn: {
391
+ type:String,
392
+ enum: ['lastday','25th'],
393
+ default: '25th',
394
+ },
395
+ extendPaymentPeriodDays: {
396
+ type:Number,
397
+ default: 5,
398
+ },
399
+ invoiceCC:{
400
+ type:Array
401
+ },
402
+ PomNumber:{
403
+ type:String
404
+ }
405
+ },
406
+ priceType:{
407
+ type:String,
408
+ enum: ['standard','step'],
409
+ default: 'standard',
410
+ },
411
+ virtualAccount:{
412
+ accountNo:{
413
+ type:String
414
+ },
415
+ ifscCode:{
416
+ type:String
417
+ },
418
+ swiftCode:{
419
+ type:String
420
+ },
421
+ branch:{
422
+ type:String
423
+ }
424
+ },
425
+ clientApi: {
426
+ apiKey: {
427
+ type: String,
428
+ default: null,
429
+ },
430
+ status: {
431
+ type: Boolean,
432
+ default: false,
433
+ },
434
+ allowedIps: {
435
+ type: Array,
436
+ default: [ '*' ],
437
+ },
438
+ },
439
+ notifyCsmAssign: {
440
+ type: Boolean,
441
+ default:false
442
+ },
443
+ },
444
+ {
445
+ strict: true,
446
+ versionKey: false,
447
+ timestamps: true,
448
+ },
449
+ );
450
+
451
+ client.plugin( mongooseUniqueValidator );
452
+ export default mongoose.model( 'client', client );