tango-api-schema 2.0.74 → 2.0.76

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,159 +1,159 @@
1
- import mongoose from 'mongoose';
2
-
3
- const tangoTickets = new mongoose.Schema(
4
- {
5
- ticketId: {
6
- type: String,
7
- },
8
- issueDate: {
9
- type: Date
10
- },
11
- issueClosedDate: {
12
- type: Date
13
- },
14
- issueType: {
15
- type: String,
16
- enum: ['infra', 'highcount', 'lowcount', 'installation']
17
- },
18
- hibernation: {
19
- type: Date
20
- },
21
- attachments: [
22
- {
23
- fileName:{
24
- type: String
25
- },
26
- filePath: {
27
- type: String
28
- },
29
- signedUrl:{
30
- type: String
31
- }
32
- }
33
- ],
34
- cameraList:[],
35
- ticketDetails: {
36
- issueIdentifiedDate: {
37
- type: Date
38
- },
39
- issueIdentifiedBy: {
40
- type: String,
41
- enum: ["client", 'tango', "automated"]
42
- },
43
- addressingClient: {
44
- type: mongoose.Types.ObjectId
45
- },
46
- addressingUser: {
47
- type: mongoose.Types.ObjectId
48
- },
49
- assigntoUser: {
50
- type: Boolean,
51
- default: false,
52
- },
53
- filesCount: {
54
- type: Number
55
- },
56
- installationStatus:{
57
- type: String,
58
- default: 'onboareded',
59
- enum: ['onboareded', 'paired','installationfailed','live']
60
- },
61
- issueStatus: {
62
- type: String,
63
- default: 'notidentified',
64
- enum: ['identified', 'notidentified']
65
- },
66
- refreshTicketStatus: {
67
- type: String,
68
- default: 'notidentified',
69
- enum: ['identified', 'notidentified']
70
- },
71
- ticketRefreshTime: {
72
- type: Date
73
- },
74
- ticketType: {
75
- type: String,
76
- enum: ['firsttimeticket', 'refreshticket'],
77
- default: 'firsttimeticket'
78
- }
79
- },
80
- ticketActivity: [
81
- {
82
- statusCheckAlertTime: {
83
- type: Date,
84
- },
85
- statusCheckReply: {
86
- type: String,
87
- },
88
- hibernationDays: {
89
- type: String,
90
- },
91
- actionType: {
92
- type: String
93
- },
94
- IdentifiedBy: {
95
- type: String,
96
- },
97
- timeStamp: {
98
- type: Date,
99
- default: new Date()
100
- },
101
- actionBy: {
102
- type: String
103
- },
104
- actionId: {
105
- type: mongoose.Types.ObjectId
106
- },
107
- comment: {
108
- type: String
109
- },
110
- reasons: [
111
- {
112
- primaryIssue: {
113
- type: String
114
- },
115
- secondaryIssue: [
116
- {
117
- name: {
118
- type: String
119
- }
120
- }
121
- ]
122
- }]
123
- }
124
- ],
125
- basicDetails: {
126
- storeId: {
127
- type: String
128
- },
129
- storeName: {
130
- type: String,
131
- },
132
- clientId: {
133
- type: String,
134
- trim: true,
135
- },
136
- clientName: {
137
- type: String,
138
- trim: true,
139
- },
140
- address:{
141
- type: String,
142
- trim: true,
143
- }
144
- },
145
- status: {
146
- type: String,
147
- enum: ['open', 'inprogress', 'closed'],
148
- default: 'open',
149
- },
150
- },
151
- {
152
- strict: true,
153
- versionKey: false,
154
- timestamps: true,
155
- },
156
- );
157
-
158
-
1
+ import mongoose from 'mongoose';
2
+
3
+ const tangoTickets = new mongoose.Schema(
4
+ {
5
+ ticketId: {
6
+ type: String,
7
+ },
8
+ issueDate: {
9
+ type: Date
10
+ },
11
+ issueClosedDate: {
12
+ type: Date
13
+ },
14
+ issueType: {
15
+ type: String,
16
+ enum: ['infra', 'highcount', 'lowcount', 'installation']
17
+ },
18
+ hibernation: {
19
+ type: Date
20
+ },
21
+ attachments: [
22
+ {
23
+ fileName:{
24
+ type: String
25
+ },
26
+ filePath: {
27
+ type: String
28
+ },
29
+ signedUrl:{
30
+ type: String
31
+ }
32
+ }
33
+ ],
34
+ cameraList:[],
35
+ ticketDetails: {
36
+ issueIdentifiedDate: {
37
+ type: Date
38
+ },
39
+ issueIdentifiedBy: {
40
+ type: String,
41
+ enum: ["client", 'tango', "automated"]
42
+ },
43
+ addressingClient: {
44
+ type: mongoose.Types.ObjectId
45
+ },
46
+ addressingUser: {
47
+ type: mongoose.Types.ObjectId
48
+ },
49
+ assigntoUser: {
50
+ type: Boolean,
51
+ default: false,
52
+ },
53
+ filesCount: {
54
+ type: Number
55
+ },
56
+ installationStatus:{
57
+ type: String,
58
+ default: 'onboareded',
59
+ enum: ['onboareded', 'paired','installationfailed','live']
60
+ },
61
+ issueStatus: {
62
+ type: String,
63
+ default: 'notidentified',
64
+ enum: ['identified', 'notidentified']
65
+ },
66
+ refreshTicketStatus: {
67
+ type: String,
68
+ default: 'notidentified',
69
+ enum: ['identified', 'notidentified']
70
+ },
71
+ ticketRefreshTime: {
72
+ type: Date
73
+ },
74
+ ticketType: {
75
+ type: String,
76
+ enum: ['firsttimeticket', 'refreshticket'],
77
+ default: 'firsttimeticket'
78
+ }
79
+ },
80
+ ticketActivity: [
81
+ {
82
+ statusCheckAlertTime: {
83
+ type: Date,
84
+ },
85
+ statusCheckReply: {
86
+ type: String,
87
+ },
88
+ hibernationDays: {
89
+ type: String,
90
+ },
91
+ actionType: {
92
+ type: String
93
+ },
94
+ IdentifiedBy: {
95
+ type: String,
96
+ },
97
+ timeStamp: {
98
+ type: Date,
99
+ default: new Date()
100
+ },
101
+ actionBy: {
102
+ type: String
103
+ },
104
+ actionId: {
105
+ type: mongoose.Types.ObjectId
106
+ },
107
+ comment: {
108
+ type: String
109
+ },
110
+ reasons: [
111
+ {
112
+ primaryIssue: {
113
+ type: String
114
+ },
115
+ secondaryIssue: [
116
+ {
117
+ name: {
118
+ type: String
119
+ }
120
+ }
121
+ ]
122
+ }]
123
+ }
124
+ ],
125
+ basicDetails: {
126
+ storeId: {
127
+ type: String
128
+ },
129
+ storeName: {
130
+ type: String,
131
+ },
132
+ clientId: {
133
+ type: String,
134
+ trim: true,
135
+ },
136
+ clientName: {
137
+ type: String,
138
+ trim: true,
139
+ },
140
+ address:{
141
+ type: String,
142
+ trim: true,
143
+ }
144
+ },
145
+ status: {
146
+ type: String,
147
+ enum: ['open', 'inprogress', 'closed'],
148
+ default: 'open',
149
+ },
150
+ },
151
+ {
152
+ strict: true,
153
+ versionKey: false,
154
+ timestamps: true,
155
+ },
156
+ );
157
+
158
+
159
159
  export default mongoose.model('tangoTicket', tangoTickets, 'tangoTicket');
@@ -1,95 +1,95 @@
1
- import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
-
4
- const user = new mongoose.Schema(
5
- {
6
- userName: {
7
- type: String,
8
- },
9
- email: {
10
- type: String,
11
- required: true,
12
- unique: true,
13
- },
14
- userProfile:{
15
- type:String
16
- },
17
- countryCode: {
18
- type: String,
19
- },
20
- mobileNumber: {
21
- type: String,
22
- required: true,
23
- },
24
- clientId: {
25
- type: String,
26
- },
27
- role: {
28
- type: String,
29
- enum: [ 'superadmin', 'admin', 'user' ],
30
- default: 'user',
31
- },
32
- isActive: {
33
- type: Boolean,
34
- default: true,
35
- },
36
- permission: [
37
- {
38
- featureName: {
39
- type: String,
40
- },
41
- product: [
42
- {
43
- name: {
44
- type: String,
45
- },
46
- isView: {
47
- type: Boolean,
48
- },
49
- isEdit: {
50
- type: Boolean,
51
- },
52
- isDownload: {
53
- type: Boolean,
54
- },
55
- isDelete: {
56
- type: Boolean,
57
- },
58
- },
59
- ],
60
- },
61
- ],
62
- userType:{
63
- type: String,
64
- enum:['tango','client','lead']
65
- },
66
- password: {
67
- type: String
68
- },
69
- refreshToken:{
70
- type: String
71
- },
72
- twoFactorAuthentication : {
73
- code: {
74
- type: String
75
- },
76
- isEnable : {
77
- type: Boolean
78
- }
79
- },
80
- emailAlert: {
81
- infra: {
82
- type: Boolean,
83
- default: false
84
- }
85
- },
86
- },
87
- {
88
- strict: true,
89
- versionKey: false,
90
- timestamps: true,
91
- },
92
- );
93
-
94
- user.plugin( mongooseUniqueValidator );
95
- export default mongoose.model( 'user', user );
1
+ import mongoose from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const user = new mongoose.Schema(
5
+ {
6
+ userName: {
7
+ type: String,
8
+ },
9
+ email: {
10
+ type: String,
11
+ required: true,
12
+ unique: true,
13
+ },
14
+ userProfile:{
15
+ type:String
16
+ },
17
+ countryCode: {
18
+ type: String,
19
+ },
20
+ mobileNumber: {
21
+ type: String,
22
+ required: true,
23
+ },
24
+ clientId: {
25
+ type: String,
26
+ },
27
+ role: {
28
+ type: String,
29
+ enum: [ 'superadmin', 'admin', 'user' ],
30
+ default: 'user',
31
+ },
32
+ isActive: {
33
+ type: Boolean,
34
+ default: true,
35
+ },
36
+ permission: [
37
+ {
38
+ featureName: {
39
+ type: String,
40
+ },
41
+ product: [
42
+ {
43
+ name: {
44
+ type: String,
45
+ },
46
+ isView: {
47
+ type: Boolean,
48
+ },
49
+ isEdit: {
50
+ type: Boolean,
51
+ },
52
+ isDownload: {
53
+ type: Boolean,
54
+ },
55
+ isDelete: {
56
+ type: Boolean,
57
+ },
58
+ },
59
+ ],
60
+ },
61
+ ],
62
+ userType:{
63
+ type: String,
64
+ enum:['tango','client','lead']
65
+ },
66
+ password: {
67
+ type: String
68
+ },
69
+ refreshToken:{
70
+ type: String
71
+ },
72
+ twoFactorAuthentication : {
73
+ code: {
74
+ type: String
75
+ },
76
+ isEnable : {
77
+ type: Boolean
78
+ }
79
+ },
80
+ emailAlert: {
81
+ infra: {
82
+ type: Boolean,
83
+ default: false
84
+ }
85
+ },
86
+ },
87
+ {
88
+ strict: true,
89
+ versionKey: false,
90
+ timestamps: true,
91
+ },
92
+ );
93
+
94
+ user.plugin( mongooseUniqueValidator );
95
+ export default mongoose.model( 'user', user );
@@ -1,38 +1,38 @@
1
- import mongoose from 'mongoose';
2
-
3
-
4
- const userAssigned = new mongoose.Schema(
5
- {
6
- userEmail: {
7
- type: String,
8
- required: true,
9
- },
10
- clientId:{
11
- type: String
12
- },
13
- assignedType: {
14
- type: String,
15
- enum: [ 'store', 'group', 'client'],
16
- },
17
- assignedValue: {
18
- type: String
19
- },
20
- userType:{
21
- type: String,
22
- enum:['tango','client']
23
- },
24
- tangoUserType: {
25
- type: String,
26
- enum: ['user', 'csm'],
27
- default: 'user'
28
- }
29
-
30
- },
31
- {
32
- strict: true,
33
- versionKey: false,
34
- timestamps: true,
35
- },
36
- );
37
-
38
- export default mongoose.model( 'userAssignedStore', userAssigned ,'userAssignedStore');
1
+ import mongoose from 'mongoose';
2
+
3
+
4
+ const userAssigned = new mongoose.Schema(
5
+ {
6
+ userEmail: {
7
+ type: String,
8
+ required: true,
9
+ },
10
+ clientId:{
11
+ type: String
12
+ },
13
+ assignedType: {
14
+ type: String,
15
+ enum: [ 'store', 'group', 'client'],
16
+ },
17
+ assignedValue: {
18
+ type: String
19
+ },
20
+ userType:{
21
+ type: String,
22
+ enum:['tango','client']
23
+ },
24
+ tangoUserType: {
25
+ type: String,
26
+ enum: ['user', 'csm'],
27
+ default: 'user'
28
+ }
29
+
30
+ },
31
+ {
32
+ strict: true,
33
+ versionKey: false,
34
+ timestamps: true,
35
+ },
36
+ );
37
+
38
+ export default mongoose.model( 'userAssignedStore', userAssigned ,'userAssignedStore');
@@ -1,44 +1,44 @@
1
- import { Schema, model } from "mongoose";
2
- import mongooseUniqueValidator from "mongoose-unique-validator";
3
- const workStationModel = new Schema(
4
- {
5
- workStationId: {
6
- type: String,
7
- trim: true,
8
- required: true,
9
- unique: true,
10
- },
11
- appId: {
12
- type: String,
13
- trim: true,
14
- required: true,
15
- unique: true,
16
- },
17
- ip: {
18
- type: String,
19
- require: true,
20
- },
21
- macAddress: {
22
- type: String,
23
- require: true,
24
- },
25
- serverType: {
26
- type: Boolean,
27
- default: false,
28
- },
29
- active: {
30
- type: Boolean,
31
- default: true,
32
- },
33
- },
34
- {
35
- strict: true,
36
- versionKey: false,
37
- timestamps: true,
38
- }
39
- );
40
-
41
- workStationModel.index({ workStationId: 1, appId: 1 });
42
- workStationModel.plugin(mongooseUniqueValidator);
43
-
44
- export default model("workstation", workStationModel);
1
+ import { Schema, model } from "mongoose";
2
+ import mongooseUniqueValidator from "mongoose-unique-validator";
3
+ const workStationModel = new Schema(
4
+ {
5
+ workStationId: {
6
+ type: String,
7
+ trim: true,
8
+ required: true,
9
+ unique: true,
10
+ },
11
+ appId: {
12
+ type: String,
13
+ trim: true,
14
+ required: true,
15
+ unique: true,
16
+ },
17
+ ip: {
18
+ type: String,
19
+ require: true,
20
+ },
21
+ macAddress: {
22
+ type: String,
23
+ require: true,
24
+ },
25
+ serverType: {
26
+ type: Boolean,
27
+ default: false,
28
+ },
29
+ active: {
30
+ type: Boolean,
31
+ default: true,
32
+ },
33
+ },
34
+ {
35
+ strict: true,
36
+ versionKey: false,
37
+ timestamps: true,
38
+ }
39
+ );
40
+
41
+ workStationModel.index({ workStationId: 1, appId: 1 });
42
+ workStationModel.plugin(mongooseUniqueValidator);
43
+
44
+ export default model("workstation", workStationModel);