tango-api-schema 2.0.56 → 2.0.57

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,147 +1,147 @@
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
- ticketDetails: {
35
- issueIdentifiedDate: {
36
- type: Date
37
- },
38
- issueIdentifiedBy: {
39
- type: String,
40
- enum: ["client", 'tango', "automated"]
41
- },
42
- addressingClient: {
43
- type: mongoose.Types.ObjectId
44
- },
45
- addressingUser: {
46
- type: mongoose.Types.ObjectId
47
- },
48
- assigntoUser: {
49
- type: Boolean,
50
- default: false,
51
- },
52
- filesCount: {
53
- type: Number
54
- },
55
- issueStatus: {
56
- type: String,
57
- default: 'notidentified',
58
- enum: ['identified', 'notidentified']
59
- },
60
- ticketRefreshTime: {
61
- type: Date
62
- },
63
- ticketType: {
64
- type: String,
65
- enum: ['firsttimeticket', 'refreshticket'],
66
- default: 'firsttimeticket'
67
- }
68
- },
69
- ticketActivity: [
70
- {
71
- statusCheckAlertTime: {
72
- type: Date,
73
- },
74
- statusCheckReply: {
75
- type: String,
76
- },
77
- hibernationDays: {
78
- type: String,
79
- },
80
- actionType: {
81
- type: String
82
- },
83
- timeStamp: {
84
- type: Date,
85
- default: new Date()
86
- },
87
- actionBy: {
88
- type: String
89
- },
90
- actionId: {
91
- type: mongoose.Types.ObjectId
92
- },
93
- comment: {
94
- type: {
95
- String
96
- }
97
- },
98
- reasons: [
99
- {
100
- primaryIssue: {
101
- type: String
102
- },
103
- secondaryIssue: [
104
- {
105
- name: {
106
- type: String
107
- }
108
- }
109
- ]
110
- }]
111
- }
112
- ],
113
- basicDetails: {
114
- storeId: {
115
- type: String
116
- },
117
- storeName: {
118
- type: String,
119
- },
120
- clientId: {
121
- type: String,
122
- trim: true,
123
- },
124
- clientName: {
125
- type: String,
126
- trim: true,
127
- },
128
- address:{
129
- type: String,
130
- trim: true,
131
- }
132
- },
133
- status: {
134
- type: String,
135
- enum: ['open', 'inprogress', 'closed'],
136
- default: 'open',
137
- },
138
- },
139
- {
140
- strict: true,
141
- versionKey: false,
142
- timestamps: true,
143
- },
144
- );
145
-
146
-
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
+ ticketDetails: {
35
+ issueIdentifiedDate: {
36
+ type: Date
37
+ },
38
+ issueIdentifiedBy: {
39
+ type: String,
40
+ enum: ["client", 'tango', "automated"]
41
+ },
42
+ addressingClient: {
43
+ type: mongoose.Types.ObjectId
44
+ },
45
+ addressingUser: {
46
+ type: mongoose.Types.ObjectId
47
+ },
48
+ assigntoUser: {
49
+ type: Boolean,
50
+ default: false,
51
+ },
52
+ filesCount: {
53
+ type: Number
54
+ },
55
+ issueStatus: {
56
+ type: String,
57
+ default: 'notidentified',
58
+ enum: ['identified', 'notidentified']
59
+ },
60
+ ticketRefreshTime: {
61
+ type: Date
62
+ },
63
+ ticketType: {
64
+ type: String,
65
+ enum: ['firsttimeticket', 'refreshticket'],
66
+ default: 'firsttimeticket'
67
+ }
68
+ },
69
+ ticketActivity: [
70
+ {
71
+ statusCheckAlertTime: {
72
+ type: Date,
73
+ },
74
+ statusCheckReply: {
75
+ type: String,
76
+ },
77
+ hibernationDays: {
78
+ type: String,
79
+ },
80
+ actionType: {
81
+ type: String
82
+ },
83
+ timeStamp: {
84
+ type: Date,
85
+ default: new Date()
86
+ },
87
+ actionBy: {
88
+ type: String
89
+ },
90
+ actionId: {
91
+ type: mongoose.Types.ObjectId
92
+ },
93
+ comment: {
94
+ type: {
95
+ String
96
+ }
97
+ },
98
+ reasons: [
99
+ {
100
+ primaryIssue: {
101
+ type: String
102
+ },
103
+ secondaryIssue: [
104
+ {
105
+ name: {
106
+ type: String
107
+ }
108
+ }
109
+ ]
110
+ }]
111
+ }
112
+ ],
113
+ basicDetails: {
114
+ storeId: {
115
+ type: String
116
+ },
117
+ storeName: {
118
+ type: String,
119
+ },
120
+ clientId: {
121
+ type: String,
122
+ trim: true,
123
+ },
124
+ clientName: {
125
+ type: String,
126
+ trim: true,
127
+ },
128
+ address:{
129
+ type: String,
130
+ trim: true,
131
+ }
132
+ },
133
+ status: {
134
+ type: String,
135
+ enum: ['open', 'inprogress', 'closed'],
136
+ default: 'open',
137
+ },
138
+ },
139
+ {
140
+ strict: true,
141
+ versionKey: false,
142
+ timestamps: true,
143
+ },
144
+ );
145
+
146
+
147
147
  export default mongoose.model('tangoTicket', tangoTickets, 'tangoTicket');
@@ -1,90 +1,90 @@
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']
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
-
81
- },
82
- {
83
- strict: true,
84
- versionKey: false,
85
- timestamps: true,
86
- },
87
- );
88
-
89
- user.plugin( mongooseUniqueValidator );
90
- 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']
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
+
81
+ },
82
+ {
83
+ strict: true,
84
+ versionKey: false,
85
+ timestamps: true,
86
+ },
87
+ );
88
+
89
+ user.plugin( mongooseUniqueValidator );
90
+ 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');