tango-api-schema 1.0.78 → 1.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.
Files changed (35) hide show
  1. package/index.js +85 -83
  2. package/package.json +27 -27
  3. package/schema/activitylog.model.js +42 -42
  4. package/schema/applicationDefault.model.js +24 -24
  5. package/schema/dailyWorkLog.model.js +152 -152
  6. package/schema/dlProcessedDaily.model.js +507 -507
  7. package/schema/dlZone.model.js +135 -135
  8. package/schema/edgeappVersion.model.js +23 -23
  9. package/schema/eyeTest.model.js +19 -19
  10. package/schema/eyeTestData.model.js +44 -44
  11. package/schema/finance.model.js +100 -100
  12. package/schema/hotjar.model.js +19 -19
  13. package/schema/liveDetectionData.model.js +38 -38
  14. package/schema/liveProcessedData.model.js +359 -359
  15. package/schema/noSourceNormalizedDaily.model.js +568 -568
  16. package/schema/noSourceNormalizedHourly.model.js +185 -185
  17. package/schema/nob.model.js +8 -0
  18. package/schema/nobHourly.model.js +47 -47
  19. package/schema/normalizedProcessHour.model.js +186 -186
  20. package/schema/normalizedProcessedDaily.model.js +559 -559
  21. package/schema/planoCrestLog.model.js +18 -0
  22. package/schema/processedCheckList.model.js +164 -164
  23. package/schema/processedDaily.model.js +569 -569
  24. package/schema/processedDetection.model.js +77 -77
  25. package/schema/processedHourly.model.js +186 -186
  26. package/schema/reportParameter.model.js +13 -13
  27. package/schema/revop.model.js +92 -92
  28. package/schema/source.model.js +8 -8
  29. package/schema/sourceNormalizedDaily.model.js +565 -565
  30. package/schema/sourceNormalizedHourly.model.js +193 -193
  31. package/schema/storeOperation.model.js +65 -65
  32. package/schema/ticket.model.js +113 -113
  33. package/schema/user.model.js +95 -95
  34. package/schema/userRole.model.js +28 -28
  35. package/schema/zone.model.js +209 -209
@@ -1,114 +1,114 @@
1
- /**
2
- * @name api_tickets_models
3
- * @description Tickets Schema
4
- */
5
- import { Schema, model } from 'mongoose';
6
- import uniqueValidator from 'mongoose-unique-validator';
7
-
8
- // Schema
9
- const collection = new Schema( {
10
- TicketId: {
11
- type: String,
12
- trim: true,
13
- required: true,
14
- unique: true,
15
- },
16
- IssueType: {
17
- type: String,
18
- enum: [ 'Infra', 'Installation', 'Live' ],
19
- trim: true,
20
- },
21
- Date: {
22
- type: Date,
23
- },
24
- brandId: {
25
- type: String,
26
- },
27
- brand: {
28
- type: Schema.Types.ObjectId,
29
- ref: 'Brand',
30
- required: true,
31
- },
32
- storeId: {
33
- type: String,
34
- },
35
- store: {
36
- type: Schema.Types.ObjectId,
37
- ref: 'store',
38
- required: true,
39
- },
40
- storeName: {
41
- type: String,
42
- },
43
- createdby: {
44
- type: Schema.Types.ObjectId,
45
- ref: 'User',
46
- },
47
- downtime: {
48
- type: Number,
49
- trim: true,
50
- },
51
- config_down_time: {
52
- type: Number,
53
- trim: true,
54
- },
55
- status: {
56
- type: String,
57
- enum: [ 'NotIdentified', 'PendingFromClient', 'PendingFromTango', 'Addressed', 'Installed', 'Onboarded', 'Paired' ],
58
- default: 'NotIdentified',
59
- },
60
- Reason: [
61
- {
62
- comment: {
63
- type: String,
64
- },
65
- AddressedBy: {
66
- type: Schema.Types.ObjectId,
67
- ref: 'users',
68
- },
69
- attachments: {
70
- type: String,
71
- },
72
- callBackDays: {
73
- type: Number,
74
- },
75
- updatedAt: {
76
- type: Date,
77
- default: Date.now(),
78
- },
79
- status: {
80
- type: String,
81
- enum: [ 'PendingFromClient', 'PendingFromTango' ],
82
- },
83
- issue: [
84
- {
85
- parent: {
86
- type: Schema.Types.ObjectId,
87
- ref: 'categories',
88
- },
89
- primary: {
90
- type: Boolean,
91
- default: false,
92
- },
93
- subIssue: {
94
- type: Schema.Types.ObjectId,
95
- ref: 'categories',
96
- },
97
- },
98
- ],
99
- },
100
- ],
101
- assigned: {
102
- type: Schema.Types.ObjectId,
103
- ref: 'User',
104
- },
105
- }, {
106
- strict: true,
107
- versionKey: false,
108
- timestamps: true,
109
- } );
110
-
111
-
112
- collection.plugin( uniqueValidator );
113
-
1
+ /**
2
+ * @name api_tickets_models
3
+ * @description Tickets Schema
4
+ */
5
+ import { Schema, model } from 'mongoose';
6
+ import uniqueValidator from 'mongoose-unique-validator';
7
+
8
+ // Schema
9
+ const collection = new Schema( {
10
+ TicketId: {
11
+ type: String,
12
+ trim: true,
13
+ required: true,
14
+ unique: true,
15
+ },
16
+ IssueType: {
17
+ type: String,
18
+ enum: [ 'Infra', 'Installation', 'Live' ],
19
+ trim: true,
20
+ },
21
+ Date: {
22
+ type: Date,
23
+ },
24
+ brandId: {
25
+ type: String,
26
+ },
27
+ brand: {
28
+ type: Schema.Types.ObjectId,
29
+ ref: 'Brand',
30
+ required: true,
31
+ },
32
+ storeId: {
33
+ type: String,
34
+ },
35
+ store: {
36
+ type: Schema.Types.ObjectId,
37
+ ref: 'store',
38
+ required: true,
39
+ },
40
+ storeName: {
41
+ type: String,
42
+ },
43
+ createdby: {
44
+ type: Schema.Types.ObjectId,
45
+ ref: 'User',
46
+ },
47
+ downtime: {
48
+ type: Number,
49
+ trim: true,
50
+ },
51
+ config_down_time: {
52
+ type: Number,
53
+ trim: true,
54
+ },
55
+ status: {
56
+ type: String,
57
+ enum: [ 'NotIdentified', 'PendingFromClient', 'PendingFromTango', 'Addressed', 'Installed', 'Onboarded', 'Paired' ],
58
+ default: 'NotIdentified',
59
+ },
60
+ Reason: [
61
+ {
62
+ comment: {
63
+ type: String,
64
+ },
65
+ AddressedBy: {
66
+ type: Schema.Types.ObjectId,
67
+ ref: 'users',
68
+ },
69
+ attachments: {
70
+ type: String,
71
+ },
72
+ callBackDays: {
73
+ type: Number,
74
+ },
75
+ updatedAt: {
76
+ type: Date,
77
+ default: Date.now(),
78
+ },
79
+ status: {
80
+ type: String,
81
+ enum: [ 'PendingFromClient', 'PendingFromTango' ],
82
+ },
83
+ issue: [
84
+ {
85
+ parent: {
86
+ type: Schema.Types.ObjectId,
87
+ ref: 'categories',
88
+ },
89
+ primary: {
90
+ type: Boolean,
91
+ default: false,
92
+ },
93
+ subIssue: {
94
+ type: Schema.Types.ObjectId,
95
+ ref: 'categories',
96
+ },
97
+ },
98
+ ],
99
+ },
100
+ ],
101
+ assigned: {
102
+ type: Schema.Types.ObjectId,
103
+ ref: 'User',
104
+ },
105
+ }, {
106
+ strict: true,
107
+ versionKey: false,
108
+ timestamps: true,
109
+ } );
110
+
111
+
112
+ collection.plugin( uniqueValidator );
113
+
114
114
  export default model( 'TangoTicket', collection );
@@ -1,95 +1,95 @@
1
- /**
2
- * @name api_auth_models_user
3
- * @description User Model
4
- */
5
-
6
- // NPM Modules
7
- import mongoose from "mongoose";
8
- import uniqueValidator from "mongoose-unique-validator";
9
-
10
- // Model
11
- const collection = new mongoose.Schema(
12
- {
13
- userBrand: [
14
- {
15
- type: mongoose.Schema.Types.ObjectId,
16
- ref: "Brand",
17
- },
18
- ],
19
- name: {
20
- type: String,
21
- trim: true,
22
- },
23
- phone: {
24
- type: String,
25
- trim: true,
26
- required: true,
27
- unique: true,
28
- },
29
- dialCode: {
30
- type: String,
31
- trim: true,
32
- },
33
- email: {
34
- type: String,
35
- trim: true,
36
- required: true,
37
- unique: true,
38
- },
39
- password: {
40
- type: String,
41
- },
42
- userType: {
43
- type: String,
44
- enum: ["client", "admin"],
45
- },
46
- roleId: {
47
- type: mongoose.Schema.Types.ObjectId,
48
- ref: "userRole",
49
- required: true,
50
- },
51
- emailVerify: {
52
- type: Boolean,
53
- default: false,
54
- },
55
- phoneVerify: {
56
- type: Boolean,
57
- default: false,
58
- },
59
- groups: [
60
- {
61
- type: mongoose.Schema.Types.ObjectId,
62
- ref: "Group",
63
- },
64
- ],
65
- active: {
66
- type: Boolean,
67
- default: false,
68
- },
69
- authentication: {
70
- user2faCode: {
71
- type: String,
72
- },
73
- user2faEnabled: {
74
- type: Boolean,
75
- },
76
- },
77
-
78
- refreshToken: {
79
- type: String,
80
- },
81
- login: {
82
- type: Boolean,
83
- },
84
- },
85
- {
86
- timestamps: true,
87
- strict: true,
88
- versionKey: false,
89
- }
90
- );
91
-
92
- // Plugins
93
- collection.plugin(uniqueValidator);
94
-
95
- export default mongoose.model("User", collection);
1
+ /**
2
+ * @name api_auth_models_user
3
+ * @description User Model
4
+ */
5
+
6
+ // NPM Modules
7
+ import mongoose from "mongoose";
8
+ import uniqueValidator from "mongoose-unique-validator";
9
+
10
+ // Model
11
+ const collection = new mongoose.Schema(
12
+ {
13
+ userBrand: [
14
+ {
15
+ type: mongoose.Schema.Types.ObjectId,
16
+ ref: "Brand",
17
+ },
18
+ ],
19
+ name: {
20
+ type: String,
21
+ trim: true,
22
+ },
23
+ phone: {
24
+ type: String,
25
+ trim: true,
26
+ required: true,
27
+ unique: true,
28
+ },
29
+ dialCode: {
30
+ type: String,
31
+ trim: true,
32
+ },
33
+ email: {
34
+ type: String,
35
+ trim: true,
36
+ required: true,
37
+ unique: true,
38
+ },
39
+ password: {
40
+ type: String,
41
+ },
42
+ userType: {
43
+ type: String,
44
+ enum: ["client", "admin"],
45
+ },
46
+ roleId: {
47
+ type: mongoose.Schema.Types.ObjectId,
48
+ ref: "userRole",
49
+ required: true,
50
+ },
51
+ emailVerify: {
52
+ type: Boolean,
53
+ default: false,
54
+ },
55
+ phoneVerify: {
56
+ type: Boolean,
57
+ default: false,
58
+ },
59
+ groups: [
60
+ {
61
+ type: mongoose.Schema.Types.ObjectId,
62
+ ref: "Group",
63
+ },
64
+ ],
65
+ active: {
66
+ type: Boolean,
67
+ default: false,
68
+ },
69
+ authentication: {
70
+ user2faCode: {
71
+ type: String,
72
+ },
73
+ user2faEnabled: {
74
+ type: Boolean,
75
+ },
76
+ },
77
+
78
+ refreshToken: {
79
+ type: String,
80
+ },
81
+ login: {
82
+ type: Boolean,
83
+ },
84
+ },
85
+ {
86
+ timestamps: true,
87
+ strict: true,
88
+ versionKey: false,
89
+ }
90
+ );
91
+
92
+ // Plugins
93
+ collection.plugin(uniqueValidator);
94
+
95
+ export default mongoose.model("User", collection);
@@ -1,28 +1,28 @@
1
- import mongoose from 'mongoose';
2
-
3
- const collection =new mongoose.Schema( {
4
- roleName: {
5
- type: String,
6
- },
7
- roleType: {
8
- type: String,
9
- },
10
- createdId: {
11
- type: mongoose.Schema.Types.ObjectId,
12
- ref: 'User',
13
- },
14
- access: [ {
15
- type: mongoose.Schema.Types.ObjectId,
16
- ref: 'applicationDefault',
17
- } ],
18
- active: {
19
- type: Boolean,
20
- default: true,
21
- },
22
- }, {
23
- timestamps: true,
24
- strict: true,
25
- versionKey: false,
26
- } );
27
-
28
- export default mongoose.model( 'userRole', collection );
1
+ import mongoose from 'mongoose';
2
+
3
+ const collection =new mongoose.Schema( {
4
+ roleName: {
5
+ type: String,
6
+ },
7
+ roleType: {
8
+ type: String,
9
+ },
10
+ createdId: {
11
+ type: mongoose.Schema.Types.ObjectId,
12
+ ref: 'User',
13
+ },
14
+ access: [ {
15
+ type: mongoose.Schema.Types.ObjectId,
16
+ ref: 'applicationDefault',
17
+ } ],
18
+ active: {
19
+ type: Boolean,
20
+ default: true,
21
+ },
22
+ }, {
23
+ timestamps: true,
24
+ strict: true,
25
+ versionKey: false,
26
+ } );
27
+
28
+ export default mongoose.model( 'userRole', collection );