tango-api-schema 2.0.50 → 2.0.52-dev

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,372 +1,372 @@
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
- priceType:{
346
- type:String,
347
- enum: ['standard','step']
348
- },
349
- virtualAccount:{
350
- accountNo:{
351
- type:String
352
- },
353
- ifscCode:{
354
- type:String
355
- },
356
- swiftCode:{
357
- type:String
358
- },
359
- branch:{
360
- type:String
361
- }
362
- }
363
- },
364
- {
365
- strict: true,
366
- versionKey: false,
367
- timestamps: true,
368
- },
369
- );
370
-
371
- client.plugin( mongooseUniqueValidator );
372
- 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','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
+ priceType:{
346
+ type:String,
347
+ enum: ['standard','step']
348
+ },
349
+ virtualAccount:{
350
+ accountNo:{
351
+ type:String
352
+ },
353
+ ifscCode:{
354
+ type:String
355
+ },
356
+ swiftCode:{
357
+ type:String
358
+ },
359
+ branch:{
360
+ type:String
361
+ }
362
+ }
363
+ },
364
+ {
365
+ strict: true,
366
+ versionKey: false,
367
+ timestamps: true,
368
+ },
369
+ );
370
+
371
+ client.plugin( mongooseUniqueValidator );
372
+ export default mongoose.model( 'client', client );