tango-api-schema 2.0.8 → 2.0.10

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.
package/index.js CHANGED
@@ -3,7 +3,8 @@ import otpModel from "./schema/otp.model.js";
3
3
  import storeModel from "./schema/store.model.js";
4
4
  import countryCodesModel from './schema/countryCodes.model.js';
5
5
  import clientModel from "./schema/client.model.js";
6
- import tangoTicket from "./schema/tangoTicket.model.js"
6
+ import tangoTicketModel from "./schema/tangoTicket.model.js"
7
+ import virtualAccountModel from "./schema/virtualAccount.model.js"
7
8
 
8
9
  export default {
9
10
  leadModel,
@@ -11,5 +12,6 @@ export default {
11
12
  storeModel,
12
13
  countryCodesModel,
13
14
  clientModel,
14
- tangoTicket
15
+ tangoTicketModel,
16
+ virtualAccountModel,
15
17
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-api-schema",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -0,0 +1,24 @@
1
+ import { Schema, model } from 'mongoose';
2
+
3
+ const collection = new Schema(
4
+ {
5
+ type: {
6
+ type: String,
7
+ },
8
+ subType: {
9
+ type: String,
10
+ },
11
+ data: {
12
+ type: Object,
13
+ },
14
+ active: {
15
+ type: Boolean,
16
+ },
17
+ },
18
+ {
19
+ timestamps: true,
20
+ strict: true,
21
+ versionKey: false,
22
+ } );
23
+
24
+ export default model( 'applicationDefault', collection, 'applicationDefault' );
@@ -0,0 +1,119 @@
1
+ import { Schema, model } from 'mongoose';
2
+
3
+ const collection = new Schema(
4
+ {
5
+ store: {
6
+ type: Schema.Types.ObjectId,
7
+ ref: 'Store',
8
+ required: true,
9
+ },
10
+ storeId: {
11
+ type: String,
12
+ trim: true,
13
+ },
14
+ masterServer: {
15
+ type: String,
16
+ trim: true,
17
+ },
18
+ clientId: {
19
+ type: String,
20
+ trim: true,
21
+ },
22
+ client: {
23
+ type: Schema.Types.ObjectId,
24
+ ref: 'client',
25
+ required: true,
26
+ },
27
+ // tagging: [ // need to disscuss with praveen
28
+ // {
29
+ // type: Schema.Types.ObjectId,
30
+ // ref: 'Tagging',
31
+ // },
32
+ // ],
33
+ ip: {
34
+ type: String,
35
+ trim: true,
36
+ },
37
+ manufacture: {
38
+ type: String,
39
+ trim: true,
40
+ },
41
+ camNumber: {
42
+ type: String,
43
+ trim: true,
44
+ },
45
+ userName: {
46
+ type: String,
47
+ trim: true,
48
+ },
49
+ password: {
50
+ type: String,
51
+ trim: true,
52
+ },
53
+ subType: {
54
+ type: String,
55
+ trim: true,
56
+ },
57
+ RTSP: {
58
+ type: String,
59
+ trim: true,
60
+ },
61
+ retentionPeriod: {
62
+ type: Number,
63
+ },
64
+ streamName: {
65
+ type: String,
66
+ trim: true,
67
+ unique: true,
68
+ },
69
+ thumbnailImage: {
70
+ type: String,
71
+ trim: true,
72
+ },
73
+ status: {
74
+ type: String,
75
+ trim: true,
76
+ },
77
+ isActivated: {
78
+ type: Boolean,
79
+ },
80
+ isUp: {
81
+ type: Boolean,
82
+ },
83
+ captureAt: {
84
+ type: Date,
85
+ default: Date.now,
86
+ },
87
+ macId: {
88
+ type: String,
89
+ },
90
+ timeElapsed: {
91
+ type: Number,
92
+ default: 13,
93
+ },
94
+ dataProcess: {
95
+ type: Boolean,
96
+ default: false,
97
+ },
98
+ camName: {
99
+ type: String,
100
+ trim: true,
101
+ },
102
+ filters: {
103
+ yolo: {
104
+ type: String,
105
+ default: true
106
+ },
107
+ yoloProcess: {
108
+ type: String,
109
+ default: 10
110
+ }
111
+ },
112
+ },
113
+ {
114
+ strict: true,
115
+ versionKey: false,
116
+ timestamps: true
117
+ } );
118
+
119
+ export default model( 'camera', collection );
@@ -63,11 +63,127 @@ const client = new mongoose.Schema(
63
63
  },
64
64
  },
65
65
  ],
66
-
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
+ },
67
183
  },
68
184
  status: {
69
185
  type: String,
70
- enum: [ 'active', 'deactive', 'hold' ],
186
+ enum: [ 'active', 'deactive', 'hold', 'suspended' ],
71
187
  default: 'active'
72
188
  },
73
189
  profileDetails: {
@@ -194,7 +310,7 @@ const client = new mongoose.Schema(
194
310
  type: Boolean,
195
311
  default: false,
196
312
  },
197
- domaiName: {
313
+ domainName: {
198
314
  type: Array,
199
315
  },
200
316
  },
@@ -221,7 +337,15 @@ const client = new mongoose.Schema(
221
337
  type: Number,
222
338
  },
223
339
  },
224
- missedOpportunity: {
340
+ missedOpportunityFrom: {
341
+ condition: {
342
+ type: String,
343
+ },
344
+ value: {
345
+ type: Number,
346
+ },
347
+ },
348
+ missedOpportunityTo: {
225
349
  condition: {
226
350
  type: String,
227
351
  },
@@ -295,6 +419,40 @@ const client = new mongoose.Schema(
295
419
  },
296
420
 
297
421
  },
422
+ paymentInvoic: {
423
+ paymentCycle: {
424
+ type:String,
425
+ },
426
+ paymentType: {
427
+ type:String
428
+ },
429
+ extendPaymentPeriodDays: {
430
+ type:Number
431
+ },
432
+ currencyType: {
433
+ type:String
434
+ },
435
+ invoiceTo:{
436
+ type:Array
437
+ },
438
+ paymentAgreementTo:{
439
+ type:Array
440
+ },
441
+ invoiceOn: {
442
+ date: {
443
+ type:Date
444
+ },
445
+ type: {
446
+ type:String
447
+ }
448
+ },
449
+ proRate:{
450
+ type:Boolean
451
+ }
452
+ },
453
+ price:{
454
+ type:Number
455
+ }
298
456
  },
299
457
  {
300
458
  strict: true,
@@ -0,0 +1,40 @@
1
+ import mongoose from 'mongoose';
2
+ import uniqueValidator from 'mongoose-unique-validator';
3
+ const collection = new mongoose.Schema(
4
+ {
5
+ ipDetails: [
6
+ {
7
+ ip: {
8
+ type: String,
9
+ trim: true,
10
+ },
11
+ manufacturer: {
12
+ type: String,
13
+ trim: true,
14
+ },
15
+ macId: {
16
+ type: String,
17
+ trim: true,
18
+ },
19
+ },
20
+ ],
21
+ storeId: {
22
+ type: mongoose.Schema.Types.ObjectId,
23
+ ref: 'Store',
24
+ },
25
+ brandId: {
26
+ type: mongoose.Schema.Types.ObjectId,
27
+ ref: 'Brand',
28
+ },
29
+ },
30
+ {
31
+ timestamps: true,
32
+ versionKey: false,
33
+ strict: true,
34
+ },
35
+ );
36
+ collection.index( { createdAt: 1 }, { expires: '1d' } );
37
+ collection.index( { storeId: 1 } );
38
+ collection.plugin( uniqueValidator );
39
+
40
+ export default mongoose.model( 'ipLog', collection, 'ipLog' );
@@ -0,0 +1,33 @@
1
+ import { Schema, model } from 'mongoose';
2
+
3
+
4
+ const reportschema = new Schema( {
5
+ fileName: {
6
+ type: String,
7
+ required: true,
8
+ },
9
+ fileType: {
10
+ type: String,
11
+ required: true,
12
+ },
13
+ reportName: {
14
+ type: String,
15
+ },
16
+ email: {
17
+ type: Array,
18
+ required: true,
19
+ },
20
+ clientId: {
21
+ type: String,
22
+ },
23
+ client: {
24
+ type: Schema.Types.ObjectId,
25
+ },
26
+ },
27
+ {
28
+ strict: true,
29
+ versionKey: false,
30
+ timestamps: true,
31
+ } );
32
+
33
+ export default model( 'report', reportschema );
@@ -24,6 +24,10 @@ const store = new mongoose.Schema(
24
24
  trim: true,
25
25
  required: true,
26
26
  },
27
+ client: {
28
+ type: mongoose.Schema.Types.ObjectId,
29
+ required: true,
30
+ },
27
31
  businessType: {
28
32
  type: String,
29
33
  },
@@ -69,11 +73,114 @@ const store = new mongoose.Schema(
69
73
  type: String,
70
74
  enum: ['active','suspend','deactive']
71
75
  },
76
+
72
77
  edge: {
78
+ timeZone: {
79
+ type: String,
80
+ required: false,
81
+ },
82
+ firstFileDate: {
83
+ type: Date,
84
+ },
85
+ firstFile: {
86
+ type: Boolean,
87
+ },
88
+ status: {
89
+ type: Boolean,
90
+ },
91
+ timeDownload: {
92
+ type: Date,
93
+ },
94
+ hibernet: {
95
+ type: Object,
96
+ },
97
+ appVersion: {
98
+ type: String,
99
+ trim: true,
100
+ },
101
+ architecture: {
102
+ type: String,
103
+ trim: true,
104
+ enum: [ 'x32', 'x64' ],
105
+ },
106
+ updateAppVersion: {
107
+ type: String,
108
+ trim: true,
109
+ },
110
+ triggerProcessId: {
111
+ type: String,
112
+ },
113
+ isRestartRequired: {
114
+ type: Boolean,
115
+ },
116
+ serverType: {
117
+ type: Boolean,
118
+ },
119
+ deleteInterval: {
120
+ type: Number,
121
+ },
122
+ timeElapsed: {
123
+ type: Number,
124
+ trim: true,
125
+ },
126
+ lastLoginAt: {
127
+ type: Date,
128
+ },
129
+ macId: {
130
+ type: String,
131
+ trim: true,
132
+ },
133
+ handShake: {
134
+ type: Boolean,
135
+ },
136
+ speedTest: {
137
+ type: Object,
138
+ },
139
+ dataUpload: {
140
+ type: Object,
141
+ },
142
+ preRequisiteStartedAt: {
143
+ type: Date,
144
+ },
145
+ preRequisite: {
146
+ type: Boolean,
147
+ },
148
+ deviceSpec: {
149
+ type: Object,
150
+ },
151
+ systemUtil: {
152
+ type: Object,
153
+ },
154
+ camCred: {
155
+ type: Object,
156
+ },
157
+ deleteExe: {
158
+ type: Boolean,
159
+ },
73
160
  camDetails: {
74
- cameras: {
75
- type: String,
76
- },
161
+ type: Array,
162
+ },
163
+ secertKey: {
164
+ type: String,
165
+ trim: true,
166
+ },
167
+ ipListStatus: {
168
+ type: Boolean,
169
+ },
170
+ ipManufacturerStatus: {
171
+ type: Boolean,
172
+ },
173
+ frameRTSP: {
174
+ type: Boolean,
175
+ },
176
+ installEdge: {
177
+ type: Boolean,
178
+ },
179
+ systemTimeZone: {
180
+ type: String,
181
+ },
182
+ configurationStage: {
183
+ type: String,
77
184
  },
78
185
  },
79
186
  spocDetails: [
@@ -0,0 +1,34 @@
1
+ import mongoose, { Mongoose } from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const vitualSchema = new mongoose.Schema({
5
+ paymentType: {
6
+ type:String,
7
+ required:true
8
+ },
9
+ accNo:{
10
+ type:String,
11
+ required:true
12
+ },
13
+ IFSCCode:{
14
+ type: String,
15
+ required: true
16
+ },
17
+ swiftCode:{
18
+ type: String,
19
+ required: true
20
+ },
21
+ branch:{
22
+ type: String,
23
+ required: true
24
+ }
25
+ }, {
26
+ strict: true,
27
+ versionKey: false,
28
+ timestamps: true,
29
+ },)
30
+ vitualSchema.plugin(mongooseUniqueValidator);
31
+
32
+ const vitualModel = mongoose.model('virtualAccount',vitualSchema);
33
+
34
+ export default vitualModel;