tango-api-schema 2.0.50 → 2.0.52-dev

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