tango-api-schema 2.0.90 → 2.0.92

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,422 +1,432 @@
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
- },
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
- default:0
143
- },
144
- infraReport:{
145
- start:{
146
- type:String,
147
- default:"09:00"
148
- },
149
- end:{
150
- type:String,
151
- default:"19:00"
152
-
153
- }
154
- },
155
- infraReport:{
156
- start:{
157
- type:String,
158
- default:"9:00"
159
- },
160
- end:{
161
- type:String,
162
- default:"19:00"
163
-
164
- }
165
- },
166
- infraDownTime: {
167
- type: Number,
168
- default:1,
169
- enum:[1,2,3,4,5,6,8,9,10,11,12]
170
- },
171
- MinFilesCount:{
172
- type: Number,
173
- default:0
174
- },
175
- rcaTicketAssign:{// root cause anlysis
176
- type: Number,
177
- enum:[1,2,3,4,5,6,8,9,10,11,12],
178
- default:1
179
- },
180
- refreshAlert:{
181
- type: Number,
182
- default:1,
183
- enum:[0,1,2,3,4,5,6,8,9,10]
184
- },
185
- statusCheckAlert:{
186
- type: Number,
187
- default:1,
188
- enum:[1,2,3,4,5,6,8,9,10,11,12]
189
- },
190
- accuracyPercentage: {
191
- type: Number, // in less than
192
- default:10
193
- },
194
- reTrain: {
195
- type: Number, // calculate no of past days
196
- enum:[1,2,3,4,5,6,8,9,10,11,12],
197
- default:1
198
- },
199
- emailAlert:{
200
- type: Boolean,
201
- default: false
202
- }
203
- },
204
- reportConfigs: {
205
- report: {
206
- type: Boolean,
207
- },
208
- reportName: {
209
- type: String,
210
- },
211
- },
212
- auditConfigs: {
213
- audit: {
214
- type: Boolean,
215
- },
216
- queueName: {
217
- type: String,
218
- },
219
- },
220
- assignedUsers: {
221
- csm: {
222
- type: Object,
223
- },
224
- ops: {
225
- type: Array,
226
- },
227
- },
228
- ssoLogin: {
229
- isEnable: {
230
- type: Boolean,
231
- default: false,
232
- },
233
- domainName: {
234
- type: Array,
235
- },
236
- },
237
- featureConfigs: {
238
- open: {
239
- type: String,
240
- default: "10:00:00"
241
- },
242
- close: {
243
- type: String,
244
- default: "23:00:00"
245
- },
246
- infraAlert: {
247
- condition: {
248
- type: String,
249
- },
250
- value: {
251
- type: Number,
252
- },
253
- },
254
- bouncedLimit: {
255
- condition: {
256
- type: String,
257
- },
258
- value: {
259
- type: Number,
260
- },
261
- },
262
- missedOpportunityFrom: {
263
- condition: {
264
- type: String,
265
- },
266
- value: {
267
- type: Number,
268
- },
269
- },
270
- missedOpportunityTo: {
271
- condition: {
272
- type: String,
273
- },
274
- value: {
275
- type: Number,
276
- },
277
- },
278
- conversion: {
279
- condition: {
280
- type: String,
281
- },
282
- value: {
283
- type: Number,
284
- },
285
- },
286
- billableCalculation: {
287
- type: String,
288
- },
289
- missedOpportunityCalculation: {
290
- type: String,
291
- },
292
- conversionCalculation: {
293
- type: String,
294
- },
295
- isNormalized: {
296
- type: Boolean,
297
- default: false,
298
- },
299
- isPasserByData: {
300
- type: Boolean,
301
- default: false,
302
- },
303
- isFootfallDirectory: {
304
- type: Boolean,
305
- default: false,
306
- },
307
- },
308
- document: {
309
- addressProof: {
310
- path: {
311
- type: String,
312
-
313
- },
314
- },
315
- gst: {
316
- number: {
317
- type: String,
318
- },
319
- path: {
320
- type: String,
321
-
322
- },
323
- },
324
- pan: {
325
- number: {
326
- type: String,
327
- },
328
- path: {
329
- type: String,
330
-
331
- },
332
- },
333
- cin: {
334
- number: {
335
- type: String,
336
- },
337
- path: {
338
- type: String,
339
-
340
- },
341
- },
342
-
343
- },
344
- price:{
345
- type:Number
346
- },
347
- paymentInvoice: {
348
- proRate: {
349
- type: String,
350
- enum: ['before15','after15'],
351
- default: 'before15',
352
- },
353
- paymentType: {
354
- type:String,
355
- enum: ['online','banktransfer'],
356
- default: 'online',
357
- },
358
- paymentCycle: {
359
- type:String,
360
- },
361
- currencyType: {
362
- type:String
363
- },
364
- invoiceTo:{
365
- type:Array
366
- },
367
- paymentAgreementTo:{
368
- type:Array
369
- },
370
- invoiceOn: {
371
- type:String,
372
- enum: ['lastday','25th'],
373
- default: '25th',
374
- },
375
- extendPaymentPeriodDays: {
376
- type:Number,
377
- default: 5,
378
- }
379
- },
380
- priceType:{
381
- type:String,
382
- enum: ['standard','step'],
383
- default: 'standard',
384
- },
385
- virtualAccount:{
386
- accountNo:{
387
- type:String
388
- },
389
- ifscCode:{
390
- type:String
391
- },
392
- swiftCode:{
393
- type:String
394
- },
395
- branch:{
396
- type:String
397
- }
398
- },
399
- clientApi: {
400
- apiKey: {
401
- type: String,
402
- default: null,
403
- },
404
- status: {
405
- type: Boolean,
406
- default: false,
407
- },
408
- allowedIps: {
409
- type: Array,
410
- default: [ '*' ],
411
- },
412
- }
413
- },
414
- {
415
- strict: true,
416
- versionKey: false,
417
- timestamps: true,
418
- },
419
- );
420
-
421
- client.plugin( mongooseUniqueValidator );
422
- 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
+ },
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
+ default:0
143
+ },
144
+ infraReport:{
145
+ start:{
146
+ type:String,
147
+ default:"09:00"
148
+ },
149
+ end:{
150
+ type:String,
151
+ default:"19:00"
152
+
153
+ }
154
+ },
155
+ infraReport:{
156
+ start:{
157
+ type:String,
158
+ default:"9:00"
159
+ },
160
+ end:{
161
+ type:String,
162
+ default:"19:00"
163
+
164
+ }
165
+ },
166
+ infraDownTime: {
167
+ type: Number,
168
+ default:1,
169
+ enum:[1,2,3,4,5,6,8,9,10,11,12]
170
+ },
171
+ MinFilesCount:{
172
+ type: Number,
173
+ default:0
174
+ },
175
+ rcaTicketAssign:{// root cause anlysis
176
+ type: Number,
177
+ enum:[1,2,3,4,5,6,8,9,10,11,12],
178
+ default:1
179
+ },
180
+ refreshAlert:{
181
+ type: Number,
182
+ default:1,
183
+ enum:[0,1,2,3,4,5,6,8,9,10]
184
+ },
185
+ statusCheckAlert:{
186
+ type: Number,
187
+ default:1,
188
+ enum:[1,2,3,4,5,6,8,9,10,11,12]
189
+ },
190
+ accuracyPercentage: {
191
+ type: Number, // in less than
192
+ default:10
193
+ },
194
+ reTrain: {
195
+ type: Number, // calculate no of past days
196
+ enum:[1,2,3,4,5,6,8,9,10,11,12],
197
+ default:1
198
+ },
199
+ emailAlert:{
200
+ type: Boolean,
201
+ default: false
202
+ },
203
+ matConfig:{
204
+ enabled:{
205
+ type: Boolean,
206
+ default: false
207
+ },
208
+ configureDays:{
209
+ type: Number,
210
+ default: 3
211
+ },
212
+ }
213
+ },
214
+ reportConfigs: {
215
+ report: {
216
+ type: Boolean,
217
+ },
218
+ reportName: {
219
+ type: String,
220
+ },
221
+ },
222
+ auditConfigs: {
223
+ audit: {
224
+ type: Boolean,
225
+ },
226
+ queueName: {
227
+ type: String,
228
+ },
229
+ },
230
+ assignedUsers: {
231
+ csm: {
232
+ type: Object,
233
+ },
234
+ ops: {
235
+ type: Array,
236
+ },
237
+ },
238
+ ssoLogin: {
239
+ isEnable: {
240
+ type: Boolean,
241
+ default: false,
242
+ },
243
+ domainName: {
244
+ type: Array,
245
+ },
246
+ },
247
+ featureConfigs: {
248
+ open: {
249
+ type: String,
250
+ default: "10:00:00"
251
+ },
252
+ close: {
253
+ type: String,
254
+ default: "23:00:00"
255
+ },
256
+ infraAlert: {
257
+ condition: {
258
+ type: String,
259
+ },
260
+ value: {
261
+ type: Number,
262
+ },
263
+ },
264
+ bouncedLimit: {
265
+ condition: {
266
+ type: String,
267
+ },
268
+ value: {
269
+ type: Number,
270
+ },
271
+ },
272
+ missedOpportunityFrom: {
273
+ condition: {
274
+ type: String,
275
+ },
276
+ value: {
277
+ type: Number,
278
+ },
279
+ },
280
+ missedOpportunityTo: {
281
+ condition: {
282
+ type: String,
283
+ },
284
+ value: {
285
+ type: Number,
286
+ },
287
+ },
288
+ conversion: {
289
+ condition: {
290
+ type: String,
291
+ },
292
+ value: {
293
+ type: Number,
294
+ },
295
+ },
296
+ billableCalculation: {
297
+ type: String,
298
+ },
299
+ missedOpportunityCalculation: {
300
+ type: String,
301
+ },
302
+ conversionCalculation: {
303
+ type: String,
304
+ },
305
+ isNormalized: {
306
+ type: Boolean,
307
+ default: false,
308
+ },
309
+ isPasserByData: {
310
+ type: Boolean,
311
+ default: false,
312
+ },
313
+ isFootfallDirectory: {
314
+ type: Boolean,
315
+ default: false,
316
+ },
317
+ },
318
+ document: {
319
+ addressProof: {
320
+ path: {
321
+ type: String,
322
+
323
+ },
324
+ },
325
+ gst: {
326
+ number: {
327
+ type: String,
328
+ },
329
+ path: {
330
+ type: String,
331
+
332
+ },
333
+ },
334
+ pan: {
335
+ number: {
336
+ type: String,
337
+ },
338
+ path: {
339
+ type: String,
340
+
341
+ },
342
+ },
343
+ cin: {
344
+ number: {
345
+ type: String,
346
+ },
347
+ path: {
348
+ type: String,
349
+
350
+ },
351
+ },
352
+
353
+ },
354
+ price:{
355
+ type:Number
356
+ },
357
+ paymentInvoice: {
358
+ proRate: {
359
+ type: String,
360
+ enum: ['before15','after15'],
361
+ default: 'before15',
362
+ },
363
+ paymentType: {
364
+ type:String,
365
+ enum: ['online','banktransfer'],
366
+ default: 'online',
367
+ },
368
+ paymentCycle: {
369
+ type:String,
370
+ },
371
+ currencyType: {
372
+ type:String
373
+ },
374
+ invoiceTo:{
375
+ type:Array
376
+ },
377
+ paymentAgreementTo:{
378
+ type:Array
379
+ },
380
+ invoiceOn: {
381
+ type:String,
382
+ enum: ['lastday','25th'],
383
+ default: '25th',
384
+ },
385
+ extendPaymentPeriodDays: {
386
+ type:Number,
387
+ default: 5,
388
+ }
389
+ },
390
+ priceType:{
391
+ type:String,
392
+ enum: ['standard','step'],
393
+ default: 'standard',
394
+ },
395
+ virtualAccount:{
396
+ accountNo:{
397
+ type:String
398
+ },
399
+ ifscCode:{
400
+ type:String
401
+ },
402
+ swiftCode:{
403
+ type:String
404
+ },
405
+ branch:{
406
+ type:String
407
+ }
408
+ },
409
+ clientApi: {
410
+ apiKey: {
411
+ type: String,
412
+ default: null,
413
+ },
414
+ status: {
415
+ type: Boolean,
416
+ default: false,
417
+ },
418
+ allowedIps: {
419
+ type: Array,
420
+ default: [ '*' ],
421
+ },
422
+ }
423
+ },
424
+ {
425
+ strict: true,
426
+ versionKey: false,
427
+ timestamps: true,
428
+ },
429
+ );
430
+
431
+ client.plugin( mongooseUniqueValidator );
432
+ export default mongoose.model( 'client', client );