tango-api-schema 2.0.36 → 2.0.37

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,375 @@
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
+ enum: ['free','trail','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: ['pending','trail','live'],
68
+ default: 'pending'
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
+ },
120
+ signatoryDetail: {
121
+ name: {
122
+ type: String,
123
+ },
124
+ email: {
125
+ type: String,
126
+ },
127
+ number: {
128
+ type: String,
129
+ },
130
+ designation: {
131
+ type: String,
132
+ },
133
+ },
134
+ ticketConfigs: {
135
+ installationReAssign: {
136
+ type: Number,
137
+ default:0
138
+ },
139
+ downTimeType: {
140
+ type: Number, // 0 for one camera and 1 for multi cameras
141
+ enum:[0,1]
142
+ },
143
+ infraDownTime: {
144
+ type: Number,
145
+ default:1,
146
+ enum:[1,2,3,4,5,6,8,9,10,11,12]
147
+ },
148
+ MinFilesCount:{
149
+ type: Number,
150
+ default:0
151
+ },
152
+ rcaTicketAssign:{// root cause anlysis
153
+ type: Number,
154
+ enum:[1,2,3,4,5,6,8,9,10,11,12]
155
+ },
156
+ refreshAlert:{
157
+ type: Number,
158
+ default:1,
159
+ enum:[0,1,2,3,4,5,6,8,9,10]
160
+ },
161
+ statusCheckAlert:{
162
+ type: Number,
163
+ default:1,
164
+ enum:[1,2,3,4,5,6,8,9,10,11,12]
165
+ },
166
+ accuracyPercentage: {
167
+ type: Number, // in less than
168
+ },
169
+ reTrain: {
170
+ type: Number, // calculate no of past days
171
+ enum:[1,2,3,4,5,6,8,9,10,11,12]
172
+ },
173
+
174
+ },
175
+ reportConfigs: {
176
+ report: {
177
+ type: Boolean,
178
+ },
179
+ reportName: {
180
+ type: String,
181
+ },
182
+ },
183
+ auditConfigs: {
184
+ audit: {
185
+ type: Boolean,
186
+ },
187
+ queueName: {
188
+ type: String,
189
+ },
190
+ },
191
+ assignedUsers: {
192
+ csm: {
193
+ type: Object,
194
+ },
195
+ ops: {
196
+ type: Array,
197
+ },
198
+ },
199
+ ssoLogin: {
200
+ isEnable: {
201
+ type: Boolean,
202
+ default: false,
203
+ },
204
+ domainName: {
205
+ type: Array,
206
+ },
207
+ },
208
+ featureConfigs: {
209
+ open: {
210
+ type: String,
211
+ },
212
+ close: {
213
+ type: String,
214
+ },
215
+ infraAlert: {
216
+ condition: {
217
+ type: String,
218
+ },
219
+ value: {
220
+ type: Number,
221
+ },
222
+ },
223
+ bouncedLimit: {
224
+ condition: {
225
+ type: String,
226
+ },
227
+ value: {
228
+ type: Number,
229
+ },
230
+ },
231
+ missedOpportunityFrom: {
232
+ condition: {
233
+ type: String,
234
+ },
235
+ value: {
236
+ type: Number,
237
+ },
238
+ },
239
+ missedOpportunityTo: {
240
+ condition: {
241
+ type: String,
242
+ },
243
+ value: {
244
+ type: Number,
245
+ },
246
+ },
247
+ conversion: {
248
+ condition: {
249
+ type: String,
250
+ },
251
+ value: {
252
+ type: Number,
253
+ },
254
+ },
255
+ billableCalculation: {
256
+ type: String,
257
+ },
258
+ missedOpportunityCalculation: {
259
+ type: String,
260
+ },
261
+ conversionCalculation: {
262
+ type: String,
263
+ },
264
+ isNormalized: {
265
+ type: Boolean,
266
+ default: false,
267
+ },
268
+ isPasserByData: {
269
+ type: Boolean,
270
+ default: false,
271
+ },
272
+ isFootfallDirectory: {
273
+ type: Boolean,
274
+ default: false,
275
+ },
276
+ },
277
+ document: {
278
+ addressProof: {
279
+ path: {
280
+ type: String,
281
+
282
+ },
283
+ },
284
+ gst: {
285
+ number: {
286
+ type: String,
287
+ },
288
+ path: {
289
+ type: String,
290
+
291
+ },
292
+ },
293
+ pan: {
294
+ number: {
295
+ type: String,
296
+ },
297
+ path: {
298
+ type: String,
299
+
300
+ },
301
+ },
302
+ cin: {
303
+ number: {
304
+ type: String,
305
+ },
306
+ path: {
307
+ type: String,
308
+
309
+ },
310
+ },
311
+
312
+ },
313
+ price:{
314
+ type:Number
315
+ },
316
+ paymentInvoice: {
317
+ proRate: {
318
+ type: String,
319
+ enum: ['before15','after15']
320
+ },
321
+ paymentType: {
322
+ type:String,
323
+ enum: ['online','banktransfer']
324
+ },
325
+ paymentCycle: {
326
+ type:String,
327
+ },
328
+ currencyType: {
329
+ type:String
330
+ },
331
+ invoiceTo:{
332
+ type:Array
333
+ },
334
+ paymentAgreementTo:{
335
+ type:Array
336
+ },
337
+ invoiceOn: {
338
+ type:String,
339
+ enum: ['lastday','25th']
340
+ },
341
+ extendPaymentPeriodDays: {
342
+ type:Number
343
+ }
344
+ },
345
+ price:{
346
+ type:Number
347
+ },
348
+ priceType:{
349
+ type:String,
350
+ enum: ['standard','step']
351
+ },
352
+ virtualAccount:{
353
+ accountNo:{
354
+ type:String
355
+ },
356
+ ifscCode:{
357
+ type:String
358
+ },
359
+ swiftCode:{
360
+ type:String
361
+ },
362
+ branch:{
363
+ type:String
364
+ }
365
+ }
366
+ },
367
+ {
368
+ strict: true,
369
+ versionKey: false,
370
+ timestamps: true,
371
+ },
372
+ );
373
+
374
+ client.plugin( mongooseUniqueValidator );
375
+ export default mongoose.model( 'client', client );