tango-api-schema 2.0.135 → 2.0.137

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 +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 +146 -146
  12. package/schema/client.model.js +465 -465
  13. package/schema/clientRequest.model.js +40 -40
  14. package/schema/countryCodes.model.js +28 -28
  15. package/schema/dailyPricing.model.js +88 -88
  16. package/schema/edgeAppVersion.model.js +33 -33
  17. package/schema/edgeappAuth.model.js +32 -32
  18. package/schema/externalParameter.model.js +202 -202
  19. package/schema/fitting.model.js +52 -52
  20. package/schema/group.model.js +36 -36
  21. package/schema/infraReason.model.js +44 -44
  22. package/schema/internalAuth.model.js +36 -36
  23. package/schema/invoice.model.js +89 -89
  24. package/schema/ipLogs.model.js +39 -39
  25. package/schema/lead.model.js +75 -75
  26. package/schema/matLog.model.js +26 -26
  27. package/schema/otp.model.js +27 -27
  28. package/schema/paymentAccount.model.js +52 -52
  29. package/schema/quality.model.js +57 -57
  30. package/schema/report.model.js +30 -30
  31. package/schema/standaredRole.model.js +56 -56
  32. package/schema/store.model.js +304 -332
  33. package/schema/storeAudit.model.js +54 -54
  34. package/schema/tagging.model.js +38 -38
  35. package/schema/tangoTicket.model.js +210 -210
  36. package/schema/user.model.js +95 -95
  37. package/schema/userAssignedStore.model.js +41 -41
  38. package/schema/userAudit.model.js +69 -69
  39. package/schema/workstation.model.js +77 -77
@@ -1,465 +1,465 @@
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
- default:"<"
262
- },
263
- value: {
264
- type: Number,
265
- default:"1"
266
- },
267
- },
268
- bouncedLimit: {
269
- condition: {
270
- type: String,
271
- default:'<='
272
- },
273
- value: {
274
- type: Number,
275
- default: "1"
276
- },
277
- },
278
- missedOpportunityFrom: {
279
- condition: {
280
- type: String,
281
- default: '>'
282
- },
283
- value: {
284
- type: Number,
285
- default:'1'
286
- },
287
- },
288
- missedOpportunityTo: {
289
- condition: {
290
- type: String,
291
- default:"<="
292
- },
293
- value: {
294
- type: Number,
295
- default:"5"
296
- },
297
- },
298
- conversion: {
299
- condition: {
300
- type: String,
301
- default:">"
302
- },
303
- value: {
304
- type: Number,
305
- default:'5'
306
- },
307
- },
308
- billableCalculation: {
309
- type: String,
310
- default:"engagers-count"
311
- },
312
- missedOpportunityCalculation: {
313
- type: String,
314
- default:"engagers-conversion"
315
- },
316
- conversionCalculation: {
317
- type: String,
318
- default:"engagers-count"
319
- },
320
- isNormalized: {
321
- type: Boolean,
322
- default: false,
323
- },
324
- isPasserByData: {
325
- type: Boolean,
326
- default: false,
327
- },
328
- isFootfallDirectory: {
329
- type: Boolean,
330
- default: false,
331
- },
332
- isExcludedArea:{
333
- type:Boolean,
334
- default:true
335
- },
336
- updateFeatureConfig:{
337
- type:Boolean,
338
- default:true
339
- },
340
- },
341
- document: {
342
- addressProof: {
343
- path: {
344
- type: String,
345
-
346
- },
347
- },
348
- gst: {
349
- number: {
350
- type: String,
351
- },
352
- path: {
353
- type: String,
354
-
355
- },
356
- },
357
- pan: {
358
- number: {
359
- type: String,
360
- },
361
- path: {
362
- type: String,
363
-
364
- },
365
- },
366
- cin: {
367
- number: {
368
- type: String,
369
- },
370
- path: {
371
- type: String,
372
-
373
- },
374
- },
375
-
376
- },
377
- price:{
378
- type:Number
379
- },
380
- paymentInvoice: {
381
- proRate: {
382
- type: String,
383
- enum: ['before15','after15'],
384
- default: 'before15',
385
- },
386
- paymentType: {
387
- type:String,
388
- enum: ['online','banktransfer'],
389
- default: 'online',
390
- },
391
- paymentCycle: {
392
- type:String,
393
- },
394
- currencyType: {
395
- type:String
396
- },
397
- invoiceTo:{
398
- type:Array
399
- },
400
- paymentAgreementTo:{
401
- type:Array
402
- },
403
- invoiceOn: {
404
- type:String,
405
- enum: ['lastday','25th'],
406
- default: '25th',
407
- },
408
- extendPaymentPeriodDays: {
409
- type:Number,
410
- default: 5,
411
- },
412
- invoiceCC:{
413
- type:Array
414
- },
415
- PomNumber:{
416
- type:String
417
- }
418
- },
419
- priceType:{
420
- type:String,
421
- enum: ['standard','step'],
422
- default: 'standard',
423
- },
424
- virtualAccount:{
425
- accountNo:{
426
- type:String
427
- },
428
- ifscCode:{
429
- type:String
430
- },
431
- swiftCode:{
432
- type:String
433
- },
434
- branch:{
435
- type:String
436
- }
437
- },
438
- clientApi: {
439
- apiKey: {
440
- type: String,
441
- default: null,
442
- },
443
- status: {
444
- type: Boolean,
445
- default: false,
446
- },
447
- allowedIps: {
448
- type: Array,
449
- default: [ '*' ],
450
- },
451
- },
452
- notifyCsmAssign: {
453
- type: Boolean,
454
- default:false
455
- },
456
- },
457
- {
458
- strict: true,
459
- versionKey: false,
460
- timestamps: true,
461
- },
462
- );
463
-
464
- client.plugin( mongooseUniqueValidator );
465
- 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
+ default:"<"
262
+ },
263
+ value: {
264
+ type: Number,
265
+ default:"1"
266
+ },
267
+ },
268
+ bouncedLimit: {
269
+ condition: {
270
+ type: String,
271
+ default:'<='
272
+ },
273
+ value: {
274
+ type: Number,
275
+ default: "1"
276
+ },
277
+ },
278
+ missedOpportunityFrom: {
279
+ condition: {
280
+ type: String,
281
+ default: '>'
282
+ },
283
+ value: {
284
+ type: Number,
285
+ default:'1'
286
+ },
287
+ },
288
+ missedOpportunityTo: {
289
+ condition: {
290
+ type: String,
291
+ default:"<="
292
+ },
293
+ value: {
294
+ type: Number,
295
+ default:"5"
296
+ },
297
+ },
298
+ conversion: {
299
+ condition: {
300
+ type: String,
301
+ default:">"
302
+ },
303
+ value: {
304
+ type: Number,
305
+ default:'5'
306
+ },
307
+ },
308
+ billableCalculation: {
309
+ type: String,
310
+ default:"engagers-count"
311
+ },
312
+ missedOpportunityCalculation: {
313
+ type: String,
314
+ default:"engagers-conversion"
315
+ },
316
+ conversionCalculation: {
317
+ type: String,
318
+ default:"engagers-count"
319
+ },
320
+ isNormalized: {
321
+ type: Boolean,
322
+ default: false,
323
+ },
324
+ isPasserByData: {
325
+ type: Boolean,
326
+ default: false,
327
+ },
328
+ isFootfallDirectory: {
329
+ type: Boolean,
330
+ default: false,
331
+ },
332
+ isExcludedArea:{
333
+ type:Boolean,
334
+ default:true
335
+ },
336
+ updateFeatureConfig:{
337
+ type:Boolean,
338
+ default:true
339
+ },
340
+ },
341
+ document: {
342
+ addressProof: {
343
+ path: {
344
+ type: String,
345
+
346
+ },
347
+ },
348
+ gst: {
349
+ number: {
350
+ type: String,
351
+ },
352
+ path: {
353
+ type: String,
354
+
355
+ },
356
+ },
357
+ pan: {
358
+ number: {
359
+ type: String,
360
+ },
361
+ path: {
362
+ type: String,
363
+
364
+ },
365
+ },
366
+ cin: {
367
+ number: {
368
+ type: String,
369
+ },
370
+ path: {
371
+ type: String,
372
+
373
+ },
374
+ },
375
+
376
+ },
377
+ price:{
378
+ type:Number
379
+ },
380
+ paymentInvoice: {
381
+ proRate: {
382
+ type: String,
383
+ enum: ['before15','after15'],
384
+ default: 'before15',
385
+ },
386
+ paymentType: {
387
+ type:String,
388
+ enum: ['online','banktransfer'],
389
+ default: 'online',
390
+ },
391
+ paymentCycle: {
392
+ type:String,
393
+ },
394
+ currencyType: {
395
+ type:String
396
+ },
397
+ invoiceTo:{
398
+ type:Array
399
+ },
400
+ paymentAgreementTo:{
401
+ type:Array
402
+ },
403
+ invoiceOn: {
404
+ type:String,
405
+ enum: ['lastday','25th'],
406
+ default: '25th',
407
+ },
408
+ extendPaymentPeriodDays: {
409
+ type:Number,
410
+ default: 5,
411
+ },
412
+ invoiceCC:{
413
+ type:Array
414
+ },
415
+ PomNumber:{
416
+ type:String
417
+ }
418
+ },
419
+ priceType:{
420
+ type:String,
421
+ enum: ['standard','step'],
422
+ default: 'standard',
423
+ },
424
+ virtualAccount:{
425
+ accountNo:{
426
+ type:String
427
+ },
428
+ ifscCode:{
429
+ type:String
430
+ },
431
+ swiftCode:{
432
+ type:String
433
+ },
434
+ branch:{
435
+ type:String
436
+ }
437
+ },
438
+ clientApi: {
439
+ apiKey: {
440
+ type: String,
441
+ default: null,
442
+ },
443
+ status: {
444
+ type: Boolean,
445
+ default: false,
446
+ },
447
+ allowedIps: {
448
+ type: Array,
449
+ default: [ '*' ],
450
+ },
451
+ },
452
+ notifyCsmAssign: {
453
+ type: Boolean,
454
+ default:false
455
+ },
456
+ },
457
+ {
458
+ strict: true,
459
+ versionKey: false,
460
+ timestamps: true,
461
+ },
462
+ );
463
+
464
+ client.plugin( mongooseUniqueValidator );
465
+ export default mongoose.model( 'client', client );