tango-api-schema 2.1.84 → 2.1.86

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
@@ -69,6 +69,7 @@ import taskQuestionModel from './schema/taskQuestion.model.js';
69
69
  import taskAssignModel from './schema/taskAssign.model.js';
70
70
  import taskProcessedModel from './schema/taskProcessed.model.js';
71
71
  import taskProcessedConfigModel from './schema/taskProcessedConfig.model.js';
72
+ import traxApproverModel from './schema/traxApprover.model.js';
72
73
 
73
74
  export default {
74
75
  leadModel,
@@ -141,5 +142,6 @@ export default {
141
142
  taskQuestionModel,
142
143
  taskAssignModel,
143
144
  taskProcessedModel,
144
- taskProcessedConfigModel
145
+ taskProcessedConfigModel,
146
+ traxApproverModel
145
147
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-api-schema",
3
- "version": "2.1.84",
3
+ "version": "2.1.86",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -11,6 +11,10 @@ let clusterSchema = new mongoose.Schema(
11
11
  description: {
12
12
  type: String
13
13
  },
14
+ isDefaults:{
15
+ type:Boolean,
16
+ default:false
17
+ },
14
18
  teams:[
15
19
  {
16
20
  name: {
@@ -1,68 +1,68 @@
1
- import mongoose from 'mongoose';
2
-
3
- const taskassignconfigSchema = new mongoose.Schema({
4
- store_id: {
5
- type: String,
6
- required:true,
7
- default:''
8
- },
9
- storeName: {
10
- type: String,
11
- required:true,
12
- default:''
13
- },
14
- userId: {
15
- type: mongoose.SchemaTypes.ObjectId,
16
- },
17
- userEmail: {
18
- type: String,
19
- },
20
- userName: {
21
- type: String,
22
- },
23
- userPhone:{
24
- type:String,
25
- },
26
- city:{
27
- type:String
28
- },
29
- country:{
30
- type:String
31
- },
32
- checkFlag: {
33
- type: Boolean,
34
- default:true
35
- },
36
- checkListId: {
37
- type: mongoose.SchemaTypes.ObjectId,
38
- required:true
39
- },
40
- checkListName: {
41
- type: String,
42
- required:true
43
- },
44
- client_id: {
45
- type: String,
46
- required:true
47
- },
48
- createdAt: {
49
- type: Date,
50
- default: Date.now
51
- },
52
- updatedAt: {
53
- type: Date,
54
- default: Date.now
55
- },
56
- isdeleted: {
57
- type: Boolean,
58
- default: false
59
- }
60
- },
61
- {
62
- strict: true,
63
- versionKey: false,
64
- timestamps: true,
65
- },
66
- );
67
-
1
+ import mongoose from 'mongoose';
2
+
3
+ const taskassignconfigSchema = new mongoose.Schema({
4
+ store_id: {
5
+ type: String,
6
+ required:true,
7
+ default:''
8
+ },
9
+ storeName: {
10
+ type: String,
11
+ required:true,
12
+ default:''
13
+ },
14
+ userId: {
15
+ type: mongoose.SchemaTypes.ObjectId,
16
+ },
17
+ userEmail: {
18
+ type: String,
19
+ },
20
+ userName: {
21
+ type: String,
22
+ },
23
+ userPhone:{
24
+ type:String,
25
+ },
26
+ city:{
27
+ type:String
28
+ },
29
+ country:{
30
+ type:String
31
+ },
32
+ checkFlag: {
33
+ type: Boolean,
34
+ default:true
35
+ },
36
+ checkListId: {
37
+ type: mongoose.SchemaTypes.ObjectId,
38
+ required:true
39
+ },
40
+ checkListName: {
41
+ type: String,
42
+ required:true
43
+ },
44
+ client_id: {
45
+ type: String,
46
+ required:true
47
+ },
48
+ createdAt: {
49
+ type: Date,
50
+ default: Date.now
51
+ },
52
+ updatedAt: {
53
+ type: Date,
54
+ default: Date.now
55
+ },
56
+ isdeleted: {
57
+ type: Boolean,
58
+ default: false
59
+ }
60
+ },
61
+ {
62
+ strict: true,
63
+ versionKey: false,
64
+ timestamps: true,
65
+ },
66
+ );
67
+
68
68
  export default mongoose.model( 'taskAssignConfig', taskassignconfigSchema);
@@ -1,96 +1,100 @@
1
- import mongoose from 'mongoose';
2
-
3
- const taskSchema = new mongoose.Schema(
4
- {
5
- checkListName: {
6
- type: String,
7
- },
8
- checkListDescription:{
9
- type: String,
10
- },
11
- createdBy: {
12
- type: mongoose.SchemaTypes.ObjectId,
13
- required: true
14
- },
15
- createdByName: {
16
- type: String,
17
- required: true
18
- },
19
- publish: {
20
- type: Boolean,
21
- default: false
22
- },
23
- scheduleEndTime: {
24
- type: String,
25
- default: ''
26
- },
27
- scheduleEndTimeISO: {
28
- type: Date
29
- },
30
- scheduleDate: {
31
- type: Date,
32
- default: Date.now
33
- },
34
- client_id: {
35
- type: String
36
- },
37
- questionCount: {
38
- type: Number,
39
- default:0
40
- },
41
- storeCount: {
42
- type: Number,
43
- default: 0
44
- },
45
- publishDate: {
46
- type: Date,
47
- },
48
- locationCount:{
49
- type:Number
50
- },
51
- checkListType:{
52
- type:String,
53
- default:"task",
54
- enum: ['task']
55
- },
56
- createdAt: {
57
- type: Date,
58
- default: Date.now
59
- },
60
- updatedAt: {
61
- type: Date,
62
- default: Date.now
63
- },
64
- isdeleted: {
65
- type: Boolean,
66
- default: false
67
- },
68
- markasread:{
69
- type:Boolean,
70
- default:false
71
- },
72
- priorityType:{
73
- type:String,
74
- enum:['hight','medium','low']
75
- },
76
- approver:{
77
- type:Array,
78
- default:[]
79
- },
80
- remainder:{
81
- type:Array,
82
- default:[]
83
- },
84
- restrictAttendance:{
85
- type:Boolean,
86
- default:false
87
- }
88
- },
89
- {
90
- strict: true,
91
- versionKey: false,
92
- timestamps: true,
93
- },
94
- );
95
-
1
+ import mongoose from 'mongoose';
2
+
3
+ const taskSchema = new mongoose.Schema(
4
+ {
5
+ checkListName: {
6
+ type: String,
7
+ },
8
+ checkListDescription:{
9
+ type: String,
10
+ },
11
+ createdBy: {
12
+ type: mongoose.SchemaTypes.ObjectId,
13
+ required: true
14
+ },
15
+ createdByName: {
16
+ type: String,
17
+ required: true
18
+ },
19
+ publish: {
20
+ type: Boolean,
21
+ default: false
22
+ },
23
+ scheduleEndTime: {
24
+ type: String,
25
+ default: ''
26
+ },
27
+ scheduleEndTimeISO: {
28
+ type: Date
29
+ },
30
+ scheduleDate: {
31
+ type: Date,
32
+ default: Date.now
33
+ },
34
+ client_id: {
35
+ type: String
36
+ },
37
+ questionCount: {
38
+ type: Number,
39
+ default:0
40
+ },
41
+ storeCount: {
42
+ type: Number,
43
+ default: 0
44
+ },
45
+ publishDate: {
46
+ type: Date,
47
+ },
48
+ locationCount:{
49
+ type:Number
50
+ },
51
+ checkListType:{
52
+ type:String,
53
+ default:"task",
54
+ enum: ['task','cctv']
55
+ },
56
+ createdAt: {
57
+ type: Date,
58
+ default: Date.now
59
+ },
60
+ updatedAt: {
61
+ type: Date,
62
+ default: Date.now
63
+ },
64
+ isdeleted: {
65
+ type: Boolean,
66
+ default: false
67
+ },
68
+ markasread:{
69
+ type:Boolean,
70
+ default:false
71
+ },
72
+ priorityType:{
73
+ type:String,
74
+ enum:['hight','medium','low']
75
+ },
76
+ approver:{
77
+ type:Array,
78
+ default:[]
79
+ },
80
+ remainder:{
81
+ type:Array,
82
+ default:[]
83
+ },
84
+ restrictAttendance:{
85
+ type:Boolean,
86
+ default:false
87
+ },
88
+ allowedStoreLocation: {
89
+ type: Boolean,
90
+ default:false
91
+ },
92
+ },
93
+ {
94
+ strict: true,
95
+ versionKey: false,
96
+ timestamps: true,
97
+ },
98
+ );
99
+
96
100
  export default mongoose.model( 'taskConfig', taskSchema);
@@ -1,177 +1,177 @@
1
- import mongoose from 'mongoose';
2
-
3
- const processedTaskSchema = new mongoose.Schema(
4
- {
5
- client_id: {
6
- type: String,
7
- required:true
8
- },
9
- date_iso: {
10
- type: Date,
11
- },
12
- date_string: {
13
- type: String,
14
- },
15
- sourceCheckList_id: {
16
- type: mongoose.SchemaTypes.ObjectId,
17
- ref: 'taskConfig'
18
- },
19
- checkListName: {
20
- type: String,
21
- required:true
22
- },
23
- scheduleStartTime: {
24
- type: String
25
- },
26
- scheduleEndTime: {
27
- type: String
28
- },
29
- scheduleStartTime_iso: {
30
- type: Date
31
- },
32
- scheduleEndTime_iso: {
33
- type: Date
34
- },
35
- allowedOverTime: {
36
- type: Boolean,
37
- default:false
38
- },
39
- allowedStoreLocation: {
40
- type: Boolean,
41
- default:false
42
- },
43
- createdBy: {
44
- type: mongoose.SchemaTypes.ObjectId,
45
- },
46
- createdByName: {
47
- type: String,
48
- },
49
- questionAnswers: {
50
- type: Array
51
- },
52
- createdAt: {
53
- type: Date,
54
- default: Date.now
55
- },
56
- updatedAt: {
57
- type: Date,
58
- default: Date.now
59
- },
60
- isdeleted: {
61
- type: Boolean,
62
- default: false
63
- },
64
- questionCount: {
65
- type: Number,
66
- default: 0
67
- },
68
- storeCount: {
69
- type: Number,
70
- default: 0
71
- },
72
- publishDate: {
73
- type: Date,
74
- },
75
- locationCount: {
76
- type: Number
77
- },
78
- checkListType: {
79
- type: String,
80
- default: "custom",
81
- enum: ["task"]
82
- },
83
- store_id: {
84
- type: String,
85
- default:''
86
- },
87
- country: {
88
- type: String,
89
- required:false,
90
- default:''
91
- },
92
- storeName: {
93
- type: String,
94
- default:''
95
- },
96
- userId: {
97
- type: mongoose.SchemaTypes.ObjectId,
98
- },
99
- userName: {
100
- type: String,
101
- },
102
- userEmail: {
103
- type: String,
104
- },
105
- checkListId: {
106
- type: mongoose.SchemaTypes.ObjectId,
107
- required:true
108
- },
109
- checklistStatus: {
110
- type: String,
111
- enum: ['open', 'inprogress', 'submit'],
112
- default: 'open'
113
- },
114
- startTime:{
115
- type: Date,
116
- },
117
- submitTime:{
118
- type: Date,
119
- },
120
- startTime_string:{
121
- type: String,
122
- },
123
- submitTime_string:{
124
- type: String,
125
- },
126
- timeFlagStatus:{
127
- type: Boolean,
128
- default: true
129
- },
130
- timeFlag:{
131
- type: Number,
132
- default: 0
133
- },
134
- questionFlag:{
135
- type: Number,
136
- default: 0
137
- },
138
- mobileDetectionFlag:{
139
- type: Number,
140
- default: 0
141
- },
142
- storeOpenCloseFlag:{
143
- type: Number,
144
- default: 0
145
- },
146
- reinitiateStatus:{
147
- type:Boolean,
148
- default: false
149
- },
150
- markasread:{
151
- type:Boolean,
152
- default:false
153
- },
154
- uniformDetectionFlag:{
155
- type: Number,
156
- default: 0
157
- },
158
- scheduleRepeatedType: {
159
- type: String,
160
- default: '',
161
- enum: ["daily"]
162
- },
163
- startMobileTime:{
164
- type:String
165
- },
166
- submitMobileTime:{
167
- type:String
168
- },
169
- },
170
- {
171
- strict: true,
172
- versionKey: false,
173
- timestamps: true,
174
- },
175
- );
176
-
1
+ import mongoose from 'mongoose';
2
+
3
+ const processedTaskSchema = new mongoose.Schema(
4
+ {
5
+ client_id: {
6
+ type: String,
7
+ required:true
8
+ },
9
+ date_iso: {
10
+ type: Date,
11
+ },
12
+ date_string: {
13
+ type: String,
14
+ },
15
+ sourceCheckList_id: {
16
+ type: mongoose.SchemaTypes.ObjectId,
17
+ ref: 'taskConfig'
18
+ },
19
+ checkListName: {
20
+ type: String,
21
+ required:true
22
+ },
23
+ scheduleStartTime: {
24
+ type: String
25
+ },
26
+ scheduleEndTime: {
27
+ type: String
28
+ },
29
+ scheduleStartTime_iso: {
30
+ type: Date
31
+ },
32
+ scheduleEndTime_iso: {
33
+ type: Date
34
+ },
35
+ allowedOverTime: {
36
+ type: Boolean,
37
+ default:false
38
+ },
39
+ allowedStoreLocation: {
40
+ type: Boolean,
41
+ default:false
42
+ },
43
+ createdBy: {
44
+ type: mongoose.SchemaTypes.ObjectId,
45
+ },
46
+ createdByName: {
47
+ type: String,
48
+ },
49
+ questionAnswers: {
50
+ type: Array
51
+ },
52
+ createdAt: {
53
+ type: Date,
54
+ default: Date.now
55
+ },
56
+ updatedAt: {
57
+ type: Date,
58
+ default: Date.now
59
+ },
60
+ isdeleted: {
61
+ type: Boolean,
62
+ default: false
63
+ },
64
+ questionCount: {
65
+ type: Number,
66
+ default: 0
67
+ },
68
+ storeCount: {
69
+ type: Number,
70
+ default: 0
71
+ },
72
+ publishDate: {
73
+ type: Date,
74
+ },
75
+ locationCount: {
76
+ type: Number
77
+ },
78
+ checkListType: {
79
+ type: String,
80
+ default: "custom",
81
+ enum: ["task","cctv"]
82
+ },
83
+ store_id: {
84
+ type: String,
85
+ default:''
86
+ },
87
+ country: {
88
+ type: String,
89
+ required:false,
90
+ default:''
91
+ },
92
+ storeName: {
93
+ type: String,
94
+ default:''
95
+ },
96
+ userId: {
97
+ type: mongoose.SchemaTypes.ObjectId,
98
+ },
99
+ userName: {
100
+ type: String,
101
+ },
102
+ userEmail: {
103
+ type: String,
104
+ },
105
+ checkListId: {
106
+ type: mongoose.SchemaTypes.ObjectId,
107
+ required:true
108
+ },
109
+ checklistStatus: {
110
+ type: String,
111
+ enum: ['open', 'inprogress', 'submit'],
112
+ default: 'open'
113
+ },
114
+ startTime:{
115
+ type: Date,
116
+ },
117
+ submitTime:{
118
+ type: Date,
119
+ },
120
+ startTime_string:{
121
+ type: String,
122
+ },
123
+ submitTime_string:{
124
+ type: String,
125
+ },
126
+ timeFlagStatus:{
127
+ type: Boolean,
128
+ default: true
129
+ },
130
+ timeFlag:{
131
+ type: Number,
132
+ default: 0
133
+ },
134
+ questionFlag:{
135
+ type: Number,
136
+ default: 0
137
+ },
138
+ mobileDetectionFlag:{
139
+ type: Number,
140
+ default: 0
141
+ },
142
+ storeOpenCloseFlag:{
143
+ type: Number,
144
+ default: 0
145
+ },
146
+ reinitiateStatus:{
147
+ type:Boolean,
148
+ default: false
149
+ },
150
+ markasread:{
151
+ type:Boolean,
152
+ default:false
153
+ },
154
+ uniformDetectionFlag:{
155
+ type: Number,
156
+ default: 0
157
+ },
158
+ scheduleRepeatedType: {
159
+ type: String,
160
+ default: '',
161
+ enum: ["daily"]
162
+ },
163
+ startMobileTime:{
164
+ type:String
165
+ },
166
+ submitMobileTime:{
167
+ type:String
168
+ },
169
+ },
170
+ {
171
+ strict: true,
172
+ versionKey: false,
173
+ timestamps: true,
174
+ },
175
+ );
176
+
177
177
  export default mongoose.model( 'processedTask', processedTaskSchema);
@@ -1,106 +1,106 @@
1
- import mongoose from 'mongoose';
2
-
3
- const processestaskconfigSchema = new mongoose.Schema({
4
- client_id: {
5
- type: String,
6
- required:true
7
- },
8
- date_iso: {
9
- type: Date,
10
- },
11
- date_string: {
12
- type: String,
13
- },
14
- sourceCheckList_id: {
15
- type: mongoose.Schema.Types.ObjectId,
16
- ref: 'taskConfig'
17
- },
18
- checkListName: {
19
- type: String,
20
- required:true
21
- },
22
- scheduleStartTime: {
23
- type: String
24
- },
25
- scheduleEndTime: {
26
- type: String
27
- },
28
- scheduleStartTime_iso: {
29
- type: Date
30
- },
31
- scheduleEndTime_iso: {
32
- type: Date
33
- },
34
- allowedOverTime: {
35
- type: Boolean,
36
- default:false
37
- },
38
- allowedStoreLocation: {
39
- type: Boolean,
40
- default:false
41
- },
42
- createdBy: {
43
- type: mongoose.SchemaTypes.ObjectId,
44
- },
45
- createdByName: {
46
- type: String,
47
- },
48
- questionAnswers: {
49
- type: Array
50
- },
51
- createdAt: {
52
- type: Date,
53
- default: Date.now
54
- },
55
- updatedAt: {
56
- type: Date,
57
- default: Date.now
58
- },
59
- isdeleted: {
60
- type: Boolean,
61
- default: false
62
- },
63
- questionCount: {
64
- type: Number,
65
- default: 0
66
- },
67
- storeCount: {
68
- type: Number,
69
- default: 0
70
- },
71
- publishDate: {
72
- type: Date,
73
- },
74
- locationCount: {
75
- type: Number
76
- },
77
- checkListType: {
78
- type: String,
79
- default: "task",
80
- enum: ['task']
81
- },
82
- startTime:{
83
- type:Date
84
- },
85
- scheduleRepeatedType: {
86
- type: String,
87
- default: '',
88
- enum: ["daily"]
89
- },
90
- allowedMultiSubmit: {
91
- type: Boolean,
92
- default:false
93
- },
94
- approver:{
95
- type:Array,
96
- default:[]
97
- },
98
- },
99
- {
100
- strict: true,
101
- versionKey: false,
102
- timestamps: true,
103
- },
104
- );
105
-
1
+ import mongoose from 'mongoose';
2
+
3
+ const processestaskconfigSchema = new mongoose.Schema({
4
+ client_id: {
5
+ type: String,
6
+ required:true
7
+ },
8
+ date_iso: {
9
+ type: Date,
10
+ },
11
+ date_string: {
12
+ type: String,
13
+ },
14
+ sourceCheckList_id: {
15
+ type: mongoose.Schema.Types.ObjectId,
16
+ ref: 'taskConfig'
17
+ },
18
+ checkListName: {
19
+ type: String,
20
+ required:true
21
+ },
22
+ scheduleStartTime: {
23
+ type: String
24
+ },
25
+ scheduleEndTime: {
26
+ type: String
27
+ },
28
+ scheduleStartTime_iso: {
29
+ type: Date
30
+ },
31
+ scheduleEndTime_iso: {
32
+ type: Date
33
+ },
34
+ allowedOverTime: {
35
+ type: Boolean,
36
+ default:false
37
+ },
38
+ allowedStoreLocation: {
39
+ type: Boolean,
40
+ default:false
41
+ },
42
+ createdBy: {
43
+ type: mongoose.SchemaTypes.ObjectId,
44
+ },
45
+ createdByName: {
46
+ type: String,
47
+ },
48
+ questionAnswers: {
49
+ type: Array
50
+ },
51
+ createdAt: {
52
+ type: Date,
53
+ default: Date.now
54
+ },
55
+ updatedAt: {
56
+ type: Date,
57
+ default: Date.now
58
+ },
59
+ isdeleted: {
60
+ type: Boolean,
61
+ default: false
62
+ },
63
+ questionCount: {
64
+ type: Number,
65
+ default: 0
66
+ },
67
+ storeCount: {
68
+ type: Number,
69
+ default: 0
70
+ },
71
+ publishDate: {
72
+ type: Date,
73
+ },
74
+ locationCount: {
75
+ type: Number
76
+ },
77
+ checkListType: {
78
+ type: String,
79
+ default: "task",
80
+ enum: ['task','cctv']
81
+ },
82
+ startTime:{
83
+ type:Date
84
+ },
85
+ scheduleRepeatedType: {
86
+ type: String,
87
+ default: '',
88
+ enum: ["daily"]
89
+ },
90
+ allowedMultiSubmit: {
91
+ type: Boolean,
92
+ default:false
93
+ },
94
+ approver:{
95
+ type:Array,
96
+ default:[]
97
+ },
98
+ },
99
+ {
100
+ strict: true,
101
+ versionKey: false,
102
+ timestamps: true,
103
+ },
104
+ );
105
+
106
106
  export default mongoose.model( 'processedTaskConfig', processestaskconfigSchema);
@@ -1,44 +1,44 @@
1
- import mongoose from 'mongoose';
2
-
3
- const taskQuestionconfigSchema = new mongoose.Schema({
4
- question: {
5
- type: Array,
6
- required:true
7
- },
8
- section: {
9
- type: String,
10
- required:true
11
- },
12
- checkList: {
13
- type: String,
14
- required: true
15
- },
16
- checkListId: {
17
- type: mongoose.SchemaTypes.ObjectId,
18
- required: true
19
- },
20
- client_id: {
21
- type: String,
22
- required: true
23
- },
24
- createdAt: {
25
- type: Date,
26
- default: Date.now
27
- },
28
- updatedAt: {
29
- type: Date,
30
- default: Date.now
31
- },
32
- isdeleted: {
33
- type: Boolean,
34
- default: false
35
- },
36
- },
37
- {
38
- strict: true,
39
- versionKey: false,
40
- timestamps: true,
41
- },
42
- );
43
-
1
+ import mongoose from 'mongoose';
2
+
3
+ const taskQuestionconfigSchema = new mongoose.Schema({
4
+ question: {
5
+ type: Array,
6
+ required:true
7
+ },
8
+ section: {
9
+ type: String,
10
+ required:true
11
+ },
12
+ checkList: {
13
+ type: String,
14
+ required: true
15
+ },
16
+ checkListId: {
17
+ type: mongoose.SchemaTypes.ObjectId,
18
+ required: true
19
+ },
20
+ client_id: {
21
+ type: String,
22
+ required: true
23
+ },
24
+ createdAt: {
25
+ type: Date,
26
+ default: Date.now
27
+ },
28
+ updatedAt: {
29
+ type: Date,
30
+ default: Date.now
31
+ },
32
+ isdeleted: {
33
+ type: Boolean,
34
+ default: false
35
+ },
36
+ },
37
+ {
38
+ strict: true,
39
+ versionKey: false,
40
+ timestamps: true,
41
+ },
42
+ );
43
+
44
44
  export default mongoose.model( 'taskQuestionsConfig', taskQuestionconfigSchema);
@@ -0,0 +1,28 @@
1
+ import mongoose from 'mongoose';
2
+
3
+ const traxApproverSchema = new mongoose.Schema({
4
+ userEmail:{
5
+ type:String,
6
+ require:true
7
+ },
8
+ checkListId:{
9
+ type:mongoose.Types.ObjectId,
10
+ required:true
11
+ },
12
+ isDeleted:{
13
+ type:Boolean,
14
+ default:false
15
+ },
16
+ type:{
17
+ type:String,
18
+ enum:['checklist','task']
19
+ }
20
+ },
21
+ {
22
+ strict: true,
23
+ versionKey: false,
24
+ timestamps: true,
25
+ },
26
+ );
27
+
28
+ export default mongoose.model( 'traxApprover', traxApproverSchema);