tango-api-schema 1.0.66 → 1.0.67

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/schema/client.model.js +213 -215
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-api-schema",
3
- "version": "1.0.66",
3
+ "version": "1.0.67",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1,254 +1,252 @@
1
- import mongoose from 'mongoose';
2
- import uniqueValidator from 'mongoose-unique-validator';
1
+ import mongoose from "mongoose";
2
+ import uniqueValidator from "mongoose-unique-validator";
3
3
 
4
4
  const clientSchema = new mongoose.Schema(
5
- {
6
- brandName: {
5
+ {
6
+ brandName: {
7
+ type: String,
8
+ trim: true,
9
+ required: true,
10
+ unique: true,
11
+ },
12
+ brandIndex: {
13
+ type: Number,
14
+ },
15
+ clientId: {
16
+ // client_Id changed to clientId
17
+ type: String,
18
+ trim: true,
19
+ },
20
+ userDetail: {
21
+ userId: {
22
+ type: mongoose.Schema.Types.ObjectId,
23
+ ref: "User",
24
+ },
25
+ },
26
+ active: {
27
+ type: Boolean,
28
+ default: true,
29
+ },
30
+ profileDetail: {
31
+ image: {
7
32
  type: String,
8
33
  trim: true,
9
- required: true,
10
- unique: true,
11
34
  },
12
- brandIndex: {
13
- type: Number,
35
+ registeredCompanyName: {
36
+ type: String,
37
+ trim: true,
14
38
  },
15
- clientId: {
16
- // client_Id changed to clientId
39
+ industry: {
17
40
  type: String,
18
41
  trim: true,
19
42
  },
20
- userDetail: {
21
- userId: {
22
- type: mongoose.Schema.Types.ObjectId,
23
- ref: 'User',
24
- },
43
+ subIndustry: {
44
+ type: String,
45
+ trim: true,
46
+ },
47
+ headQuarters: {
48
+ type: String,
49
+ trim: true,
25
50
  },
26
- active: {
51
+ CINNumber: {
52
+ type: String,
53
+ trim: true,
54
+ },
55
+ registeredAddress: {
56
+ type: String,
57
+ trim: true,
58
+ },
59
+ website: {
60
+ type: String,
61
+ },
62
+ open: {
63
+ type: String,
64
+ default: "10:00:00",
65
+ },
66
+ close: {
67
+ type: String,
68
+ default: "22:00:00",
69
+ },
70
+ },
71
+ clientApi: {
72
+ apiKey: {
73
+ type: String,
74
+ default: null,
75
+ },
76
+ status: {
27
77
  type: Boolean,
28
- default: true,
78
+ default: false,
29
79
  },
30
- profileDetail: {
31
- image: {
32
- type: String,
33
- trim: true,
34
- },
35
- registeredCompanyName: {
36
- type: String,
37
- trim: true,
38
- },
39
- industry: {
40
- type: String,
41
- trim: true,
42
- },
43
- subIndustry: {
44
- type: String,
45
- trim: true,
46
- },
47
- headQuarters: {
48
- type: String,
49
- trim: true,
50
- },
51
- CINNumber: {
52
- type: String,
53
- trim: true,
54
- },
55
- registeredAddress: {
56
- type: String,
57
- trim: true,
58
- },
59
- website: {
60
- type: String,
80
+ allowedIps: {
81
+ type: Array,
82
+ default: ["*"],
83
+ },
84
+ reverseAPI: {
85
+ status: {
86
+ type: Boolean,
61
87
  },
62
- open: {
88
+ api: {
63
89
  type: String,
64
- default: '10:00:00',
65
90
  },
66
- close: {
91
+ apiType: {
92
+ enum: ["receiving", "collection"],
67
93
  type: String,
68
- default: '22:00:00',
69
94
  },
70
- },
71
- clientApi: {
72
95
  apiKey: {
73
96
  type: String,
74
- default: null,
75
- },
76
- status: {
77
- type: Boolean,
78
- default: false,
79
- },
80
- allowedIps: {
81
- type: Array,
82
- default: [ '*' ],
83
- },
84
- reverseAPI: {
85
- status: {
86
- type: Boolean,
87
- },
88
- api: {
89
- type: String,
90
- },
91
- apiType: {
92
- enum: [ 'receiving', 'collection' ],
93
- type: String,
94
- },
95
- apiKey: {
96
- type: String,
97
- },
98
97
  },
99
98
  },
100
- clientStatus: {
99
+ },
100
+ clientStatus: {
101
+ type: String,
102
+ enum: ["pending", "live", "hold", "suspended", "deactivated", "rejected"],
103
+ default: "pending",
104
+ trim: true,
105
+ },
106
+ accountType: {
107
+ // client_type changed to accountType
108
+ type: String,
109
+ enum: ["free", "trial", "paid"],
110
+ trim: true,
111
+ default: "trial",
112
+ },
113
+ assignedUsers: {
114
+ csm: {
115
+ type: Object,
116
+ },
117
+ ops: {
118
+ type: Array,
119
+ },
120
+ },
121
+ reportConfigs: {
122
+ report: {
123
+ type: Boolean,
124
+ default: true,
125
+ },
126
+ reportName: {
101
127
  type: String,
102
- enum: [ 'pending', 'live', 'hold', 'suspended', 'deactivated', 'rejected' ],
103
- default: 'pending',
104
- trim: true,
128
+ default: "",
105
129
  },
106
- accountType: {
107
- // client_type changed to accountType
130
+ liveMetrics: {
108
131
  type: String,
109
- enum: [ 'free', 'trial', 'paid' ],
110
- trim: true,
111
- default: 'trial',
132
+ default: "",
112
133
  },
113
- assignedUsers: {
114
- csm: {
115
- type: Object,
116
- },
117
- ops: {
118
- type: Array,
119
- },
134
+ },
135
+ auditConfigs: {
136
+ count: {
137
+ type: Number,
138
+ default: 200,
120
139
  },
121
- reportConfigs: {
122
- report: {
123
- type: Boolean,
124
- default: true,
125
- },
126
- reportName: {
127
- type: String,
128
- default: '',
129
- },
130
- reportColumn:{
131
- liveMetrics:{
132
- type: String,
133
- default: '',
134
- }
135
- }
136
- },
137
- auditConfigs: {
138
- count: {
139
- type: Number,
140
- default: 200,
141
- },
142
- audit: {
143
- type: Boolean,
144
- default: true,
145
- },
146
- default: {
147
- type: Boolean,
148
- default: true,
149
- },
150
- queueName: {
151
- type: String,
152
- default: '',
153
- },
154
- ratio: {
155
- type: mongoose.Schema.Types.Number,
156
- default: 0.75,
157
- },
140
+ audit: {
141
+ type: Boolean,
142
+ default: true,
158
143
  },
159
- ticketConfigs: {
160
- liveTickets: {
161
- type: Boolean,
162
- default: true,
163
- },
164
- infraTickets: {
144
+ default: {
145
+ type: Boolean,
146
+ default: true,
147
+ },
148
+ queueName: {
149
+ type: String,
150
+ default: "",
151
+ },
152
+ ratio: {
153
+ type: mongoose.Schema.Types.Number,
154
+ default: 0.75,
155
+ },
156
+ },
157
+ ticketConfigs: {
158
+ liveTickets: {
159
+ type: Boolean,
160
+ default: true,
161
+ },
162
+ infraTickets: {
165
163
  // infratickets needs to create for a day t-1
166
- type: Boolean,
167
- default: false,
168
- },
169
- infraLimit: {
170
- type: Number,
171
- },
172
- autoGenerate: {
164
+ type: Boolean,
165
+ default: false,
166
+ },
167
+ infraLimit: {
168
+ type: Number,
169
+ },
170
+ autoGenerate: {
173
171
  // if its 2 day downtime is past two days reach the infralimit then will need to create ticket
174
- type: Number,
175
- default: 0,
176
- },
177
- ticketPeriod: {
172
+ type: Number,
173
+ default: 0,
174
+ },
175
+ ticketPeriod: {
178
176
  // live ticket period in minutes
179
- type: Number,
180
- default: 120, // in minutes
181
- },
182
- ReInstallation: {
183
- type: Number,
184
- default: 0,
185
- },
186
- ticketReopen: {
187
- type: Number,
188
- default: 0,
189
- },
190
- liveTicketTime: {
191
- type: Date,
192
- },
177
+ type: Number,
178
+ default: 120, // in minutes
193
179
  },
194
- clientConfig: {
195
- missedOpportunityStartTime: {
196
- type: String,
197
- default: '>1',
198
- },
199
- bouncedConfigTime: {
200
- type: String,
201
- default: '<=1',
202
- },
203
- missedOpportunityEndTime: {
204
- type: String,
205
- default: '<=5',
206
- },
207
- conversionConfigTime: {
208
- type: String,
209
- default: '>5',
210
- },
211
- missedOpportunityCalculate: {
212
- type: String,
213
- enum: [ 'engagers-conversion', 'group-conversion' ],
214
- default: 'engagers-conversion',
215
- },
216
- conversionCalculate: {
217
- type: String,
218
- enum: [ 'footfall-count', 'engagers-count', 'billable-entities' ],
219
- default: 'engagers-count',
220
- },
221
- billableCalculate: {
222
- type: String,
223
- enum: [ 'footfall-count', 'engagers-count' ],
224
- default: 'engagers-count',
225
- },
226
- downtimeConsiderCameraCount: {
227
- type: String,
228
- },
229
- normalizedDowntime: {
230
- type: Number,
231
- default: 300,
232
- },
180
+ ReInstallation: {
181
+ type: Number,
182
+ default: 0,
233
183
  },
234
- finance: {
235
- costPerStore: {
236
- type: Number,
237
- },
184
+ ticketReopen: {
185
+ type: Number,
186
+ default: 0,
238
187
  },
239
- store_added_status: {
240
- // if it is true after add a store against brand
241
- type: Boolean,
242
- default: false,
188
+ liveTicketTime: {
189
+ type: Date,
190
+ },
191
+ },
192
+ clientConfig: {
193
+ missedOpportunityStartTime: {
194
+ type: String,
195
+ default: ">1",
196
+ },
197
+ bouncedConfigTime: {
198
+ type: String,
199
+ default: "<=1",
200
+ },
201
+ missedOpportunityEndTime: {
202
+ type: String,
203
+ default: "<=5",
204
+ },
205
+ conversionConfigTime: {
206
+ type: String,
207
+ default: ">5",
208
+ },
209
+ missedOpportunityCalculate: {
210
+ type: String,
211
+ enum: ["engagers-conversion", "group-conversion"],
212
+ default: "engagers-conversion",
213
+ },
214
+ conversionCalculate: {
215
+ type: String,
216
+ enum: ["footfall-count", "engagers-count", "billable-entities"],
217
+ default: "engagers-count",
218
+ },
219
+ billableCalculate: {
220
+ type: String,
221
+ enum: ["footfall-count", "engagers-count"],
222
+ default: "engagers-count",
223
+ },
224
+ downtimeConsiderCameraCount: {
225
+ type: String,
226
+ },
227
+ normalizedDowntime: {
228
+ type: Number,
229
+ default: 300,
243
230
  },
244
231
  },
245
- {
246
- strict: true,
247
- versionKey: false,
248
- timestamps: true,
232
+ finance: {
233
+ costPerStore: {
234
+ type: Number,
235
+ },
236
+ },
237
+ store_added_status: {
238
+ // if it is true after add a store against brand
239
+ type: Boolean,
240
+ default: false,
249
241
  },
242
+ },
243
+ {
244
+ strict: true,
245
+ versionKey: false,
246
+ timestamps: true,
247
+ }
250
248
  );
251
249
 
252
- clientSchema.plugin( uniqueValidator );
250
+ clientSchema.plugin(uniqueValidator);
253
251
 
254
- export default mongoose.model( 'Client', clientSchema );
252
+ export default mongoose.model("Client", clientSchema);