tango-api-schema 2.0.25 → 2.0.27

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.
@@ -1,468 +1,468 @@
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', 'enterprice' ],
46
- },
47
- paymentStatus: {
48
- type: String,
49
- },
50
- product: [
51
- {
52
- productName: {
53
- type: String,
54
- },
55
- trail: {
56
- type: Boolean,
57
- },
58
- initDate: {
59
- type: Date,
60
- },
61
- CompletedDate: {
62
- type: Date,
63
- },
64
- },
65
- ],
66
- subscribedFeatures: {
67
- tangoTraffic: {
68
- active: {
69
- type:Boolean,
70
- default:true
71
- },
72
- status:{
73
- type:String,
74
- enum: ["pending", "trail", "live"],
75
- default:"pending"
76
- },
77
- trailStartDate:{
78
- type:Date,
79
- },
80
- trailEndDate: {
81
- type:Date
82
- },
83
- subscribedDate:{
84
- type:Date
85
- },
86
- Price:{
87
- type:Number
88
- }
89
- },
90
- tangoZone: {
91
- active: {
92
- type: Boolean,
93
- default: false
94
- },
95
- status: {
96
- type: String,
97
- enum: ["pending", "trail", "live"],
98
- default: "pending"
99
- },
100
- trailStartDate: {
101
- type: Date,
102
- },
103
- trailEndDate: {
104
- type: Date
105
- },
106
- subscribedDate: {
107
- type: Date
108
- },
109
- Price: {
110
- type: Number
111
- },
112
- },
113
- revops: {
114
- active: {
115
- type: Boolean,
116
- default: false
117
- },
118
- status: {
119
- type: String,
120
- enum: ["pending", "trail", "live"],
121
- default: "pending"
122
- },
123
- trailStartDate: {
124
- type: Date,
125
- },
126
- trailEndDate: {
127
- type: Date
128
- },
129
- subscribedDate: {
130
- type: Date
131
- },
132
- Price: {
133
- type: Number
134
- },
135
- },
136
- sop: {
137
- active: {
138
- type: Boolean,
139
- default: false
140
- },
141
- status: {
142
- type: String,
143
- enum: ["pending", "trail", "live"],
144
- default: "pending"
145
- },
146
- trailStartDate: {
147
- type: Date,
148
- },
149
- trailEndDate: {
150
- type: Date
151
- },
152
- subscribedDate: {
153
- type: Date
154
- },
155
- Price: {
156
- type: Number
157
- },
158
- },
159
- support: {
160
- active: {
161
- type: Boolean,
162
- default: false
163
- },
164
- status: {
165
- type: String,
166
- enum: ["pending", "trail", "live"],
167
- default: "pending"
168
- },
169
- trailStartDate: {
170
- type: Date,
171
- },
172
- trailEndDate: {
173
- type: Date
174
- },
175
- subscribedDate: {
176
- type: Date
177
- },
178
- Price: {
179
- type: Number
180
- },
181
- }
182
- },
183
- },
184
- status: {
185
- type: String,
186
- enum: [ 'active', 'deactive', 'hold', 'suspended' ],
187
- default: 'active'
188
- },
189
- profileDetails: {
190
- logo: {
191
- type: String
192
- },
193
- registeredCompanyName: {
194
- type: String,
195
- },
196
- industry: {
197
- type: String,
198
- enum:['apparel','footwear','skincare','foodandbeverage','techstartup','grooming','leather','furniture','mattress',' customerelectronics','jewellery','interiordesign','ev','fintech','perfume','fashionaccessories','innerwear','nutrition','fashionandlifestyle','eyewear']
199
- },
200
- clientType: {
201
- type: String,
202
- enum:['partnership', 'proprietorship', 'pvtltd', 'person']
203
- },
204
- registeredAddress: {
205
- type: String,
206
- },
207
- headQuarters: {
208
- type: String,
209
- },
210
- website: {
211
- type: String,
212
- },
213
-
214
- },
215
- billingDetails: {
216
- tradeName: {
217
- type: String,
218
- },
219
- gstNumber: {
220
- type: String,
221
- },
222
- authorityName: {
223
- type: String,
224
- },
225
- authorityEmail: {
226
- type: String,
227
- },
228
- billingAddress: {
229
- type: String,
230
- },
231
- },
232
- signatoryDetail: {
233
- name: {
234
- type: String,
235
- },
236
- email: {
237
- type: String,
238
- },
239
- number: {
240
- type: String,
241
- },
242
- designation: {
243
- type: String,
244
- },
245
- },
246
- ticketConfigs: {
247
- installationReAssign: {
248
- type: Number,
249
- default:0
250
- },
251
- downTimeType: {
252
- type: Number, // 0 for one camera and 1 for multi cameras
253
- enum:[0,1]
254
- },
255
- infraDownTime: {
256
- type: Number,
257
- default:1,
258
- enum:[1,2,3,4,5,6,8,9,10,11,12]
259
- },
260
- MinFilesCount:{
261
- type: Number,
262
- default:0
263
- },
264
- rcaTicketAssign:{// root cause anlysis
265
- type: Number,
266
- enum:[1,2,3,4,5,6,8,9,10,11,12]
267
- },
268
- refreshAlert:{
269
- type: Number,
270
- default:1,
271
- enum:[0,1,2,3,4,5,6,8,9,10]
272
- },
273
- statusCheckAlert:{
274
- type: Number,
275
- default:1,
276
- enum:[1,2,3,4,5,6,8,9,10,11,12]
277
- },
278
- accuracyPercentage: {
279
- type: Number, // in less than
280
- },
281
- reTrain: {
282
- type: Number, // calculate no of past days
283
- enum:[1,2,3,4,5,6,8,9,10,11,12]
284
- },
285
-
286
- },
287
- reportConfigs: {
288
- report: {
289
- type: Boolean,
290
- },
291
- reportName: {
292
- type: String,
293
- },
294
- },
295
- auditConfigs: {
296
- audit: {
297
- type: Boolean,
298
- },
299
- queueName: {
300
- type: String,
301
- },
302
- },
303
- assignedUsers: {
304
- csm: {
305
- type: Object,
306
- },
307
- ops: {
308
- type: Array,
309
- },
310
- },
311
- ssoLogin: {
312
- isEnable: {
313
- type: Boolean,
314
- default: false,
315
- },
316
- domainName: {
317
- type: Array,
318
- },
319
- },
320
- featureConfigs: {
321
- open: {
322
- type: String,
323
- },
324
- close: {
325
- type: String,
326
- },
327
- infraAlert: {
328
- condition: {
329
- type: String,
330
- },
331
- value: {
332
- type: Number,
333
- },
334
- },
335
- bouncedLimit: {
336
- condition: {
337
- type: String,
338
- },
339
- value: {
340
- type: Number,
341
- },
342
- },
343
- missedOpportunityFrom: {
344
- condition: {
345
- type: String,
346
- },
347
- value: {
348
- type: Number,
349
- },
350
- },
351
- missedOpportunityTo: {
352
- condition: {
353
- type: String,
354
- },
355
- value: {
356
- type: Number,
357
- },
358
- },
359
- conversion: {
360
- condition: {
361
- type: String,
362
- },
363
- value: {
364
- type: Number,
365
- },
366
- },
367
- billableCalculation: {
368
- type: String,
369
- },
370
- missedOpportunityCalculation: {
371
- type: String,
372
- },
373
- conversionCalculation: {
374
- type: String,
375
- },
376
- isNormalized: {
377
- type: Boolean,
378
- default: false,
379
- },
380
- isPasserByData: {
381
- type: Boolean,
382
- default: false,
383
- },
384
- isFootfallDirectory: {
385
- type: Boolean,
386
- default: false,
387
- },
388
- },
389
- document: {
390
- addressProof: {
391
- path: {
392
- type: String,
393
-
394
- },
395
- },
396
- gst: {
397
- number: {
398
- type: String,
399
- },
400
- path: {
401
- type: String,
402
-
403
- },
404
- },
405
- pan: {
406
- number: {
407
- type: String,
408
- },
409
- path: {
410
- type: String,
411
-
412
- },
413
- },
414
- cin: {
415
- number: {
416
- type: String,
417
- },
418
- path: {
419
- type: String,
420
-
421
- },
422
- },
423
-
424
- },
425
- paymentInvoic: {
426
- paymentCycle: {
427
- type:String,
428
- },
429
- paymentType: {
430
- type:String
431
- },
432
- extendPaymentPeriodDays: {
433
- type:Number
434
- },
435
- currencyType: {
436
- type:String
437
- },
438
- invoiceTo:{
439
- type:Array
440
- },
441
- paymentAgreementTo:{
442
- type:Array
443
- },
444
- invoiceOn: {
445
- date: {
446
- type:Date
447
- },
448
- type: {
449
- type:String
450
- }
451
- },
452
- proRate:{
453
- type:Boolean
454
- }
455
- },
456
- price:{
457
- type:Number
458
- }
459
- },
460
- {
461
- strict: true,
462
- versionKey: false,
463
- timestamps: true,
464
- },
465
- );
466
-
467
- client.plugin( mongooseUniqueValidator );
468
- 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', 'enterprice' ],
46
+ },
47
+ paymentStatus: {
48
+ type: String,
49
+ },
50
+ product: [
51
+ {
52
+ productName: {
53
+ type: String,
54
+ },
55
+ trail: {
56
+ type: Boolean,
57
+ },
58
+ initDate: {
59
+ type: Date,
60
+ },
61
+ CompletedDate: {
62
+ type: Date,
63
+ },
64
+ },
65
+ ],
66
+ subscribedFeatures: {
67
+ tangoTraffic: {
68
+ active: {
69
+ type:Boolean,
70
+ default:true
71
+ },
72
+ status:{
73
+ type:String,
74
+ enum: ["pending", "trail", "live"],
75
+ default:"pending"
76
+ },
77
+ trailStartDate:{
78
+ type:Date,
79
+ },
80
+ trailEndDate: {
81
+ type:Date
82
+ },
83
+ subscribedDate:{
84
+ type:Date
85
+ },
86
+ Price:{
87
+ type:Number
88
+ }
89
+ },
90
+ tangoZone: {
91
+ active: {
92
+ type: Boolean,
93
+ default: false
94
+ },
95
+ status: {
96
+ type: String,
97
+ enum: ["pending", "trail", "live"],
98
+ default: "pending"
99
+ },
100
+ trailStartDate: {
101
+ type: Date,
102
+ },
103
+ trailEndDate: {
104
+ type: Date
105
+ },
106
+ subscribedDate: {
107
+ type: Date
108
+ },
109
+ Price: {
110
+ type: Number
111
+ },
112
+ },
113
+ revops: {
114
+ active: {
115
+ type: Boolean,
116
+ default: false
117
+ },
118
+ status: {
119
+ type: String,
120
+ enum: ["pending", "trail", "live"],
121
+ default: "pending"
122
+ },
123
+ trailStartDate: {
124
+ type: Date,
125
+ },
126
+ trailEndDate: {
127
+ type: Date
128
+ },
129
+ subscribedDate: {
130
+ type: Date
131
+ },
132
+ Price: {
133
+ type: Number
134
+ },
135
+ },
136
+ sop: {
137
+ active: {
138
+ type: Boolean,
139
+ default: false
140
+ },
141
+ status: {
142
+ type: String,
143
+ enum: ["pending", "trail", "live"],
144
+ default: "pending"
145
+ },
146
+ trailStartDate: {
147
+ type: Date,
148
+ },
149
+ trailEndDate: {
150
+ type: Date
151
+ },
152
+ subscribedDate: {
153
+ type: Date
154
+ },
155
+ Price: {
156
+ type: Number
157
+ },
158
+ },
159
+ support: {
160
+ active: {
161
+ type: Boolean,
162
+ default: false
163
+ },
164
+ status: {
165
+ type: String,
166
+ enum: ["pending", "trail", "live"],
167
+ default: "pending"
168
+ },
169
+ trailStartDate: {
170
+ type: Date,
171
+ },
172
+ trailEndDate: {
173
+ type: Date
174
+ },
175
+ subscribedDate: {
176
+ type: Date
177
+ },
178
+ Price: {
179
+ type: Number
180
+ },
181
+ }
182
+ },
183
+ },
184
+ status: {
185
+ type: String,
186
+ enum: [ 'active', 'deactive', 'hold', 'suspended' ],
187
+ default: 'active'
188
+ },
189
+ profileDetails: {
190
+ logo: {
191
+ type: String
192
+ },
193
+ registeredCompanyName: {
194
+ type: String,
195
+ },
196
+ industry: {
197
+ type: String,
198
+ enum:['apparel','footwear','skincare','foodandbeverage','techstartup','grooming','leather','furniture','mattress',' customerelectronics','jewellery','interiordesign','ev','fintech','perfume','fashionaccessories','innerwear','nutrition','fashionandlifestyle','eyewear']
199
+ },
200
+ clientType: {
201
+ type: String,
202
+ enum:['partnership', 'proprietorship', 'pvtltd', 'person']
203
+ },
204
+ registeredAddress: {
205
+ type: String,
206
+ },
207
+ headQuarters: {
208
+ type: String,
209
+ },
210
+ website: {
211
+ type: String,
212
+ },
213
+
214
+ },
215
+ billingDetails: {
216
+ tradeName: {
217
+ type: String,
218
+ },
219
+ gstNumber: {
220
+ type: String,
221
+ },
222
+ authorityName: {
223
+ type: String,
224
+ },
225
+ authorityEmail: {
226
+ type: String,
227
+ },
228
+ billingAddress: {
229
+ type: String,
230
+ },
231
+ },
232
+ signatoryDetail: {
233
+ name: {
234
+ type: String,
235
+ },
236
+ email: {
237
+ type: String,
238
+ },
239
+ number: {
240
+ type: String,
241
+ },
242
+ designation: {
243
+ type: String,
244
+ },
245
+ },
246
+ ticketConfigs: {
247
+ installationReAssign: {
248
+ type: Number,
249
+ default:0
250
+ },
251
+ downTimeType: {
252
+ type: Number, // 0 for one camera and 1 for multi cameras
253
+ enum:[0,1]
254
+ },
255
+ infraDownTime: {
256
+ type: Number,
257
+ default:1,
258
+ enum:[1,2,3,4,5,6,8,9,10,11,12]
259
+ },
260
+ MinFilesCount:{
261
+ type: Number,
262
+ default:0
263
+ },
264
+ rcaTicketAssign:{// root cause anlysis
265
+ type: Number,
266
+ enum:[1,2,3,4,5,6,8,9,10,11,12]
267
+ },
268
+ refreshAlert:{
269
+ type: Number,
270
+ default:1,
271
+ enum:[0,1,2,3,4,5,6,8,9,10]
272
+ },
273
+ statusCheckAlert:{
274
+ type: Number,
275
+ default:1,
276
+ enum:[1,2,3,4,5,6,8,9,10,11,12]
277
+ },
278
+ accuracyPercentage: {
279
+ type: Number, // in less than
280
+ },
281
+ reTrain: {
282
+ type: Number, // calculate no of past days
283
+ enum:[1,2,3,4,5,6,8,9,10,11,12]
284
+ },
285
+
286
+ },
287
+ reportConfigs: {
288
+ report: {
289
+ type: Boolean,
290
+ },
291
+ reportName: {
292
+ type: String,
293
+ },
294
+ },
295
+ auditConfigs: {
296
+ audit: {
297
+ type: Boolean,
298
+ },
299
+ queueName: {
300
+ type: String,
301
+ },
302
+ },
303
+ assignedUsers: {
304
+ csm: {
305
+ type: Object,
306
+ },
307
+ ops: {
308
+ type: Array,
309
+ },
310
+ },
311
+ ssoLogin: {
312
+ isEnable: {
313
+ type: Boolean,
314
+ default: false,
315
+ },
316
+ domainName: {
317
+ type: Array,
318
+ },
319
+ },
320
+ featureConfigs: {
321
+ open: {
322
+ type: String,
323
+ },
324
+ close: {
325
+ type: String,
326
+ },
327
+ infraAlert: {
328
+ condition: {
329
+ type: String,
330
+ },
331
+ value: {
332
+ type: Number,
333
+ },
334
+ },
335
+ bouncedLimit: {
336
+ condition: {
337
+ type: String,
338
+ },
339
+ value: {
340
+ type: Number,
341
+ },
342
+ },
343
+ missedOpportunityFrom: {
344
+ condition: {
345
+ type: String,
346
+ },
347
+ value: {
348
+ type: Number,
349
+ },
350
+ },
351
+ missedOpportunityTo: {
352
+ condition: {
353
+ type: String,
354
+ },
355
+ value: {
356
+ type: Number,
357
+ },
358
+ },
359
+ conversion: {
360
+ condition: {
361
+ type: String,
362
+ },
363
+ value: {
364
+ type: Number,
365
+ },
366
+ },
367
+ billableCalculation: {
368
+ type: String,
369
+ },
370
+ missedOpportunityCalculation: {
371
+ type: String,
372
+ },
373
+ conversionCalculation: {
374
+ type: String,
375
+ },
376
+ isNormalized: {
377
+ type: Boolean,
378
+ default: false,
379
+ },
380
+ isPasserByData: {
381
+ type: Boolean,
382
+ default: false,
383
+ },
384
+ isFootfallDirectory: {
385
+ type: Boolean,
386
+ default: false,
387
+ },
388
+ },
389
+ document: {
390
+ addressProof: {
391
+ path: {
392
+ type: String,
393
+
394
+ },
395
+ },
396
+ gst: {
397
+ number: {
398
+ type: String,
399
+ },
400
+ path: {
401
+ type: String,
402
+
403
+ },
404
+ },
405
+ pan: {
406
+ number: {
407
+ type: String,
408
+ },
409
+ path: {
410
+ type: String,
411
+
412
+ },
413
+ },
414
+ cin: {
415
+ number: {
416
+ type: String,
417
+ },
418
+ path: {
419
+ type: String,
420
+
421
+ },
422
+ },
423
+
424
+ },
425
+ paymentInvoic: {
426
+ paymentCycle: {
427
+ type:String,
428
+ },
429
+ paymentType: {
430
+ type:String
431
+ },
432
+ extendPaymentPeriodDays: {
433
+ type:Number
434
+ },
435
+ currencyType: {
436
+ type:String
437
+ },
438
+ invoiceTo:{
439
+ type:Array
440
+ },
441
+ paymentAgreementTo:{
442
+ type:Array
443
+ },
444
+ invoiceOn: {
445
+ date: {
446
+ type:Date
447
+ },
448
+ type: {
449
+ type:String
450
+ }
451
+ },
452
+ proRate:{
453
+ type:Boolean
454
+ }
455
+ },
456
+ price:{
457
+ type:Number
458
+ }
459
+ },
460
+ {
461
+ strict: true,
462
+ versionKey: false,
463
+ timestamps: true,
464
+ },
465
+ );
466
+
467
+ client.plugin( mongooseUniqueValidator );
468
+ export default mongoose.model( 'client', client );