tango-api-schema 2.0.85 → 2.0.87

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,414 +1,414 @@
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
-
200
- },
201
- reportConfigs: {
202
- report: {
203
- type: Boolean,
204
- },
205
- reportName: {
206
- type: String,
207
- },
208
- },
209
- auditConfigs: {
210
- audit: {
211
- type: Boolean,
212
- },
213
- queueName: {
214
- type: String,
215
- },
216
- },
217
- assignedUsers: {
218
- csm: {
219
- type: Object,
220
- },
221
- ops: {
222
- type: Array,
223
- },
224
- },
225
- ssoLogin: {
226
- isEnable: {
227
- type: Boolean,
228
- default: false,
229
- },
230
- domainName: {
231
- type: Array,
232
- },
233
- },
234
- featureConfigs: {
235
- open: {
236
- type: String,
237
- default: "10:00:00"
238
- },
239
- close: {
240
- type: String,
241
- default: "23:00:00"
242
- },
243
- infraAlert: {
244
- condition: {
245
- type: String,
246
- },
247
- value: {
248
- type: Number,
249
- },
250
- },
251
- bouncedLimit: {
252
- condition: {
253
- type: String,
254
- },
255
- value: {
256
- type: Number,
257
- },
258
- },
259
- missedOpportunityFrom: {
260
- condition: {
261
- type: String,
262
- },
263
- value: {
264
- type: Number,
265
- },
266
- },
267
- missedOpportunityTo: {
268
- condition: {
269
- type: String,
270
- },
271
- value: {
272
- type: Number,
273
- },
274
- },
275
- conversion: {
276
- condition: {
277
- type: String,
278
- },
279
- value: {
280
- type: Number,
281
- },
282
- },
283
- billableCalculation: {
284
- type: String,
285
- },
286
- missedOpportunityCalculation: {
287
- type: String,
288
- },
289
- conversionCalculation: {
290
- type: String,
291
- },
292
- isNormalized: {
293
- type: Boolean,
294
- default: false,
295
- },
296
- isPasserByData: {
297
- type: Boolean,
298
- default: false,
299
- },
300
- isFootfallDirectory: {
301
- type: Boolean,
302
- default: false,
303
- },
304
- },
305
- document: {
306
- addressProof: {
307
- path: {
308
- type: String,
309
-
310
- },
311
- },
312
- gst: {
313
- number: {
314
- type: String,
315
- },
316
- path: {
317
- type: String,
318
-
319
- },
320
- },
321
- pan: {
322
- number: {
323
- type: String,
324
- },
325
- path: {
326
- type: String,
327
-
328
- },
329
- },
330
- cin: {
331
- number: {
332
- type: String,
333
- },
334
- path: {
335
- type: String,
336
-
337
- },
338
- },
339
-
340
- },
341
- price:{
342
- type:Number
343
- },
344
- paymentInvoice: {
345
- proRate: {
346
- type: String,
347
- enum: ['before15','after15']
348
- },
349
- paymentType: {
350
- type:String,
351
- enum: ['online','banktransfer']
352
- },
353
- paymentCycle: {
354
- type:String,
355
- },
356
- currencyType: {
357
- type:String
358
- },
359
- invoiceTo:{
360
- type:Array
361
- },
362
- paymentAgreementTo:{
363
- type:Array
364
- },
365
- invoiceOn: {
366
- type:String,
367
- enum: ['lastday','25th']
368
- },
369
- extendPaymentPeriodDays: {
370
- type:Number
371
- }
372
- },
373
- priceType:{
374
- type:String,
375
- enum: ['standard','step']
376
- },
377
- virtualAccount:{
378
- accountNo:{
379
- type:String
380
- },
381
- ifscCode:{
382
- type:String
383
- },
384
- swiftCode:{
385
- type:String
386
- },
387
- branch:{
388
- type:String
389
- }
390
- },
391
- clientApi: {
392
- apiKey: {
393
- type: String,
394
- default: null,
395
- },
396
- status: {
397
- type: Boolean,
398
- default: false,
399
- },
400
- allowedIps: {
401
- type: Array,
402
- default: [ '*' ],
403
- },
404
- },
405
- },
406
- {
407
- strict: true,
408
- versionKey: false,
409
- timestamps: true,
410
- },
411
- );
412
-
413
- client.plugin( mongooseUniqueValidator );
414
- 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
+
200
+ },
201
+ reportConfigs: {
202
+ report: {
203
+ type: Boolean,
204
+ },
205
+ reportName: {
206
+ type: String,
207
+ },
208
+ },
209
+ auditConfigs: {
210
+ audit: {
211
+ type: Boolean,
212
+ },
213
+ queueName: {
214
+ type: String,
215
+ },
216
+ },
217
+ assignedUsers: {
218
+ csm: {
219
+ type: Object,
220
+ },
221
+ ops: {
222
+ type: Array,
223
+ },
224
+ },
225
+ ssoLogin: {
226
+ isEnable: {
227
+ type: Boolean,
228
+ default: false,
229
+ },
230
+ domainName: {
231
+ type: Array,
232
+ },
233
+ },
234
+ featureConfigs: {
235
+ open: {
236
+ type: String,
237
+ default: "10:00:00"
238
+ },
239
+ close: {
240
+ type: String,
241
+ default: "23:00:00"
242
+ },
243
+ infraAlert: {
244
+ condition: {
245
+ type: String,
246
+ },
247
+ value: {
248
+ type: Number,
249
+ },
250
+ },
251
+ bouncedLimit: {
252
+ condition: {
253
+ type: String,
254
+ },
255
+ value: {
256
+ type: Number,
257
+ },
258
+ },
259
+ missedOpportunityFrom: {
260
+ condition: {
261
+ type: String,
262
+ },
263
+ value: {
264
+ type: Number,
265
+ },
266
+ },
267
+ missedOpportunityTo: {
268
+ condition: {
269
+ type: String,
270
+ },
271
+ value: {
272
+ type: Number,
273
+ },
274
+ },
275
+ conversion: {
276
+ condition: {
277
+ type: String,
278
+ },
279
+ value: {
280
+ type: Number,
281
+ },
282
+ },
283
+ billableCalculation: {
284
+ type: String,
285
+ },
286
+ missedOpportunityCalculation: {
287
+ type: String,
288
+ },
289
+ conversionCalculation: {
290
+ type: String,
291
+ },
292
+ isNormalized: {
293
+ type: Boolean,
294
+ default: false,
295
+ },
296
+ isPasserByData: {
297
+ type: Boolean,
298
+ default: false,
299
+ },
300
+ isFootfallDirectory: {
301
+ type: Boolean,
302
+ default: false,
303
+ },
304
+ },
305
+ document: {
306
+ addressProof: {
307
+ path: {
308
+ type: String,
309
+
310
+ },
311
+ },
312
+ gst: {
313
+ number: {
314
+ type: String,
315
+ },
316
+ path: {
317
+ type: String,
318
+
319
+ },
320
+ },
321
+ pan: {
322
+ number: {
323
+ type: String,
324
+ },
325
+ path: {
326
+ type: String,
327
+
328
+ },
329
+ },
330
+ cin: {
331
+ number: {
332
+ type: String,
333
+ },
334
+ path: {
335
+ type: String,
336
+
337
+ },
338
+ },
339
+
340
+ },
341
+ price:{
342
+ type:Number
343
+ },
344
+ paymentInvoice: {
345
+ proRate: {
346
+ type: String,
347
+ enum: ['before15','after15']
348
+ },
349
+ paymentType: {
350
+ type:String,
351
+ enum: ['online','banktransfer']
352
+ },
353
+ paymentCycle: {
354
+ type:String,
355
+ },
356
+ currencyType: {
357
+ type:String
358
+ },
359
+ invoiceTo:{
360
+ type:Array
361
+ },
362
+ paymentAgreementTo:{
363
+ type:Array
364
+ },
365
+ invoiceOn: {
366
+ type:String,
367
+ enum: ['lastday','25th']
368
+ },
369
+ extendPaymentPeriodDays: {
370
+ type:Number
371
+ }
372
+ },
373
+ priceType:{
374
+ type:String,
375
+ enum: ['standard','step']
376
+ },
377
+ virtualAccount:{
378
+ accountNo:{
379
+ type:String
380
+ },
381
+ ifscCode:{
382
+ type:String
383
+ },
384
+ swiftCode:{
385
+ type:String
386
+ },
387
+ branch:{
388
+ type:String
389
+ }
390
+ },
391
+ clientApi: {
392
+ apiKey: {
393
+ type: String,
394
+ default: null,
395
+ },
396
+ status: {
397
+ type: Boolean,
398
+ default: false,
399
+ },
400
+ allowedIps: {
401
+ type: Array,
402
+ default: [ '*' ],
403
+ },
404
+ },
405
+ },
406
+ {
407
+ strict: true,
408
+ versionKey: false,
409
+ timestamps: true,
410
+ },
411
+ );
412
+
413
+ client.plugin( mongooseUniqueValidator );
414
+ export default mongoose.model( 'client', client );