tango-api-schema 2.0.121 → 2.0.123

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 (37) hide show
  1. package/index.js +72 -70
  2. package/package.json +27 -27
  3. package/schema/applicationDefault.model.js +24 -24
  4. package/schema/assignAudit.model.js +49 -49
  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 +459 -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 +37 -0
  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/quality.model.js +57 -57
  28. package/schema/report.model.js +30 -30
  29. package/schema/standaredRole.model.js +54 -54
  30. package/schema/store.model.js +317 -317
  31. package/schema/storeAudit.model.js +54 -54
  32. package/schema/tagging.model.js +38 -38
  33. package/schema/tangoTicket.model.js +210 -210
  34. package/schema/user.model.js +95 -95
  35. package/schema/userAssignedStore.model.js +41 -41
  36. package/schema/userAudit.model.js +69 -69
  37. package/schema/workstation.model.js +77 -77
@@ -1,459 +1,459 @@
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
+ 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 );