tango-api-schema 2.0.78 → 2.0.80

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