tango-api-schema 2.0.152 → 2.0.154

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 (39) hide show
  1. package/index.js +76 -76
  2. package/package.json +27 -27
  3. package/schema/applicationDefault.model.js +24 -24
  4. package/schema/assignAudit.model.js +55 -55
  5. package/schema/auditLogs.model.js +72 -72
  6. package/schema/auditStoreData.model.js +54 -54
  7. package/schema/authentication.model.js +27 -27
  8. package/schema/basePricing.model.js +29 -29
  9. package/schema/billing.model.js +99 -99
  10. package/schema/camera.model.js +146 -146
  11. package/schema/client.model.js +479 -479
  12. package/schema/clientRequest.model.js +40 -40
  13. package/schema/countryCodes.model.js +28 -28
  14. package/schema/dailyPricing.model.js +88 -88
  15. package/schema/edgeAppVersion.model.js +33 -33
  16. package/schema/edgeappAuth.model.js +32 -32
  17. package/schema/externalParameter.model.js +202 -202
  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 +106 -106
  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 +60 -60
  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 +318 -314
  32. package/schema/storeAudit.model.js +61 -61
  33. package/schema/tagging.model.js +38 -38
  34. package/schema/tangoTicket.model.js +210 -210
  35. package/schema/transaction.model.js +54 -51
  36. package/schema/user.model.js +95 -95
  37. package/schema/userAssignedStore.model.js +41 -41
  38. package/schema/userAudit.model.js +76 -76
  39. package/schema/workstation.model.js +77 -77
@@ -1,479 +1,479 @@
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
- zoneQueueName: {
232
- type: String,
233
- },
234
- trafficQueueName: {
235
- type: String,
236
- },
237
- },
238
- assignedUsers: {
239
- csm: {
240
- type: Object,
241
- },
242
- ops: {
243
- type: Array,
244
- },
245
- },
246
- ssoLogin: {
247
- isEnable: {
248
- type: Boolean,
249
- default: false,
250
- },
251
- domainName: {
252
- type: Array,
253
- },
254
- },
255
- featureConfigs: {
256
- open: {
257
- type: String,
258
- default: "10:00:00"
259
- },
260
- close: {
261
- type: String,
262
- default: "23:00:00"
263
- },
264
- infraAlert: {
265
- condition: {
266
- type: String,
267
- default:"<"
268
- },
269
- value: {
270
- type: Number,
271
- default:"1"
272
- },
273
- },
274
- bouncedLimit: {
275
- condition: {
276
- type: String,
277
- default:'<='
278
- },
279
- value: {
280
- type: Number,
281
- default: "1"
282
- },
283
- },
284
- missedOpportunityFrom: {
285
- condition: {
286
- type: String,
287
- default: '>'
288
- },
289
- value: {
290
- type: Number,
291
- default:'1'
292
- },
293
- },
294
- missedOpportunityTo: {
295
- condition: {
296
- type: String,
297
- default:"<="
298
- },
299
- value: {
300
- type: Number,
301
- default:"5"
302
- },
303
- },
304
- conversion: {
305
- condition: {
306
- type: String,
307
- default:">"
308
- },
309
- value: {
310
- type: Number,
311
- default:'5'
312
- },
313
- },
314
- billableCalculation: {
315
- type: String,
316
- default:"engagers-count"
317
- },
318
- missedOpportunityCalculation: {
319
- type: String,
320
- default:"engagers-conversion"
321
- },
322
- conversionCalculation: {
323
- type: String,
324
- default:"engagers-count"
325
- },
326
- isNormalized: {
327
- type: Boolean,
328
- default: false,
329
- },
330
- isPasserByData: {
331
- type: Boolean,
332
- default: false,
333
- },
334
- isFootfallDirectory: {
335
- type: Boolean,
336
- default: false,
337
- },
338
- isExcludedArea:{
339
- type:Boolean,
340
- default:true
341
- },
342
- updateFeatureConfig:{
343
- type:Boolean,
344
- default:true
345
- },
346
- isCameraDisabled:{
347
- type:Boolean,
348
- default:false
349
- },
350
- isbillingDisabled:{
351
- type:Boolean,
352
- default:false
353
- },
354
- },
355
- document: {
356
- addressProof: {
357
- path: {
358
- type: String,
359
-
360
- },
361
- },
362
- gst: {
363
- number: {
364
- type: String,
365
- },
366
- path: {
367
- type: String,
368
-
369
- },
370
- },
371
- pan: {
372
- number: {
373
- type: String,
374
- },
375
- path: {
376
- type: String,
377
-
378
- },
379
- },
380
- cin: {
381
- number: {
382
- type: String,
383
- },
384
- path: {
385
- type: String,
386
-
387
- },
388
- },
389
-
390
- },
391
- price:{
392
- type:Number
393
- },
394
- paymentInvoice: {
395
- proRate: {
396
- type: String,
397
- enum: ['before15','after15'],
398
- default: 'before15',
399
- },
400
- paymentType: {
401
- type:String,
402
- enum: ['online','banktransfer'],
403
- default: 'online',
404
- },
405
- paymentCycle: {
406
- type:String,
407
- },
408
- currencyType: {
409
- type:String
410
- },
411
- invoiceTo:{
412
- type:Array
413
- },
414
- paymentAgreementTo:{
415
- type:Array
416
- },
417
- invoiceOn: {
418
- type:String,
419
- enum: ['lastday','25th'],
420
- default: '25th',
421
- },
422
- extendPaymentPeriodDays: {
423
- type:Number,
424
- default: 5,
425
- },
426
- invoiceCC:{
427
- type:Array
428
- },
429
- PomNumber:{
430
- type:String
431
- }
432
- },
433
- priceType:{
434
- type:String,
435
- enum: ['standard','step'],
436
- default: 'standard',
437
- },
438
- virtualAccount:{
439
- accountNo:{
440
- type:String
441
- },
442
- ifscCode:{
443
- type:String
444
- },
445
- swiftCode:{
446
- type:String
447
- },
448
- branch:{
449
- type:String
450
- }
451
- },
452
- clientApi: {
453
- apiKey: {
454
- type: String,
455
- default: null,
456
- },
457
- status: {
458
- type: Boolean,
459
- default: false,
460
- },
461
- allowedIps: {
462
- type: Array,
463
- default: [ '*' ],
464
- },
465
- },
466
- notifyCsmAssign: {
467
- type: Boolean,
468
- default:false
469
- },
470
- },
471
- {
472
- strict: true,
473
- versionKey: false,
474
- timestamps: true,
475
- },
476
- );
477
-
478
- client.plugin( mongooseUniqueValidator );
479
- 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
+ zoneQueueName: {
232
+ type: String,
233
+ },
234
+ trafficQueueName: {
235
+ type: String,
236
+ },
237
+ },
238
+ assignedUsers: {
239
+ csm: {
240
+ type: Object,
241
+ },
242
+ ops: {
243
+ type: Array,
244
+ },
245
+ },
246
+ ssoLogin: {
247
+ isEnable: {
248
+ type: Boolean,
249
+ default: false,
250
+ },
251
+ domainName: {
252
+ type: Array,
253
+ },
254
+ },
255
+ featureConfigs: {
256
+ open: {
257
+ type: String,
258
+ default: "10:00:00"
259
+ },
260
+ close: {
261
+ type: String,
262
+ default: "23:00:00"
263
+ },
264
+ infraAlert: {
265
+ condition: {
266
+ type: String,
267
+ default:"<"
268
+ },
269
+ value: {
270
+ type: Number,
271
+ default:"1"
272
+ },
273
+ },
274
+ bouncedLimit: {
275
+ condition: {
276
+ type: String,
277
+ default:'<='
278
+ },
279
+ value: {
280
+ type: Number,
281
+ default: "1"
282
+ },
283
+ },
284
+ missedOpportunityFrom: {
285
+ condition: {
286
+ type: String,
287
+ default: '>'
288
+ },
289
+ value: {
290
+ type: Number,
291
+ default:'1'
292
+ },
293
+ },
294
+ missedOpportunityTo: {
295
+ condition: {
296
+ type: String,
297
+ default:"<="
298
+ },
299
+ value: {
300
+ type: Number,
301
+ default:"5"
302
+ },
303
+ },
304
+ conversion: {
305
+ condition: {
306
+ type: String,
307
+ default:">"
308
+ },
309
+ value: {
310
+ type: Number,
311
+ default:'5'
312
+ },
313
+ },
314
+ billableCalculation: {
315
+ type: String,
316
+ default:"engagers-count"
317
+ },
318
+ missedOpportunityCalculation: {
319
+ type: String,
320
+ default:"engagers-conversion"
321
+ },
322
+ conversionCalculation: {
323
+ type: String,
324
+ default:"engagers-count"
325
+ },
326
+ isNormalized: {
327
+ type: Boolean,
328
+ default: false,
329
+ },
330
+ isPasserByData: {
331
+ type: Boolean,
332
+ default: false,
333
+ },
334
+ isFootfallDirectory: {
335
+ type: Boolean,
336
+ default: false,
337
+ },
338
+ isExcludedArea:{
339
+ type:Boolean,
340
+ default:true
341
+ },
342
+ updateFeatureConfig:{
343
+ type:Boolean,
344
+ default:true
345
+ },
346
+ isCameraDisabled:{
347
+ type:Boolean,
348
+ default:false
349
+ },
350
+ isbillingDisabled:{
351
+ type:Boolean,
352
+ default:false
353
+ },
354
+ },
355
+ document: {
356
+ addressProof: {
357
+ path: {
358
+ type: String,
359
+
360
+ },
361
+ },
362
+ gst: {
363
+ number: {
364
+ type: String,
365
+ },
366
+ path: {
367
+ type: String,
368
+
369
+ },
370
+ },
371
+ pan: {
372
+ number: {
373
+ type: String,
374
+ },
375
+ path: {
376
+ type: String,
377
+
378
+ },
379
+ },
380
+ cin: {
381
+ number: {
382
+ type: String,
383
+ },
384
+ path: {
385
+ type: String,
386
+
387
+ },
388
+ },
389
+
390
+ },
391
+ price:{
392
+ type:Number
393
+ },
394
+ paymentInvoice: {
395
+ proRate: {
396
+ type: String,
397
+ enum: ['before15','after15'],
398
+ default: 'before15',
399
+ },
400
+ paymentType: {
401
+ type:String,
402
+ enum: ['online','banktransfer'],
403
+ default: 'online',
404
+ },
405
+ paymentCycle: {
406
+ type:String,
407
+ },
408
+ currencyType: {
409
+ type:String
410
+ },
411
+ invoiceTo:{
412
+ type:Array
413
+ },
414
+ paymentAgreementTo:{
415
+ type:Array
416
+ },
417
+ invoiceOn: {
418
+ type:String,
419
+ enum: ['lastday','25th'],
420
+ default: '25th',
421
+ },
422
+ extendPaymentPeriodDays: {
423
+ type:Number,
424
+ default: 5,
425
+ },
426
+ invoiceCC:{
427
+ type:Array
428
+ },
429
+ PomNumber:{
430
+ type:String
431
+ }
432
+ },
433
+ priceType:{
434
+ type:String,
435
+ enum: ['standard','step'],
436
+ default: 'standard',
437
+ },
438
+ virtualAccount:{
439
+ accountNo:{
440
+ type:String
441
+ },
442
+ ifscCode:{
443
+ type:String
444
+ },
445
+ swiftCode:{
446
+ type:String
447
+ },
448
+ branch:{
449
+ type:String
450
+ }
451
+ },
452
+ clientApi: {
453
+ apiKey: {
454
+ type: String,
455
+ default: null,
456
+ },
457
+ status: {
458
+ type: Boolean,
459
+ default: false,
460
+ },
461
+ allowedIps: {
462
+ type: Array,
463
+ default: [ '*' ],
464
+ },
465
+ },
466
+ notifyCsmAssign: {
467
+ type: Boolean,
468
+ default:false
469
+ },
470
+ },
471
+ {
472
+ strict: true,
473
+ versionKey: false,
474
+ timestamps: true,
475
+ },
476
+ );
477
+
478
+ client.plugin( mongooseUniqueValidator );
479
+ export default mongoose.model( 'client', client );