tango-api-schema 2.0.38 → 2.0.39

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,127 +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
- infraTicketDetails: {
22
- issueIdentifiedBy:{
23
- type:String,
24
- enum:["client",'tango',"automated"]
25
- },
26
- addressingClient: {
27
- type: mongoose.Types.ObjectId
28
- },
29
- addressingUser: {
30
- type: mongoose.Types.ObjectId
31
- },
32
- assigntoUser: {
33
- type: Boolean,
34
- default: false,
35
- },
36
- filesCount: {
37
- type: Number
38
- },
39
- issueStatus: {
40
- type: String,
41
- default: 'notidentified',
42
- enum: ['identified', 'notidentified']
43
- },
44
- ticketRefreshTime: {
45
- type: Date
46
- },
47
- ticketType: {
48
- type: String,
49
- enum: ['firsttimeticket', 'refreshticket'],
50
- default: 'firsttimeticket'
51
- }
52
- },
53
- infraActivity: [
54
- {
55
- statusCheckAlertTime:{
56
- type: Date,
57
- },
58
- statusCheckReply:{
59
- type: String,
60
- },
61
- hibernationDays:{
62
- type: String,
63
- },
64
- actionType: {
65
- type: String
66
- },
67
- timeStamp: {
68
- type: Date,
69
- default: new Date()
70
- },
71
- actionBy: {
72
- type: String
73
- },
74
- actionId: {
75
- type: mongoose.Types.ObjectId
76
- },
77
- comment: {
78
- type: {
79
- String
80
- }
81
- },
82
- reasons:[
83
- {
84
- primaryIssue: {
85
- type: String
86
- },
87
- secondaryIssue: [
88
- {
89
- name: {
90
- type: String
91
- }
92
- }
93
- ]
94
- }]
95
- }
96
- ],
97
- basicDetails: {
98
- storeId: {
99
- type: String
100
- },
101
- storeName: {
102
- type: String,
103
- },
104
- clientId: {
105
- type: String,
106
- trim: true,
107
- },
108
- clientName: {
109
- type: String,
110
- trim: true,
111
- },
112
- },
113
- status: {
114
- type: String,
115
- enum: ['open', 'inprogress', 'closed'],
116
- default: 'open',
117
- },
118
- },
119
- {
120
- strict: true,
121
- versionKey: false,
122
- timestamps: true,
123
- },
124
- );
125
-
126
-
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
+ infraTicketDetails: {
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
+ infraActivity: [
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
+
127
130
  export default mongoose.model('tangoTicket', tangoTickets, 'tangoTicket');
@@ -1,73 +1,73 @@
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
- // Assigned: {
37
- // type: {
38
- // type: String,
39
- // enum: [ 'store', 'group' ],
40
- // },
41
- // list: {
42
- // type: Array,
43
- // },
44
- // },
45
- userType:{
46
- type: String,
47
- enum:['tango','client']
48
- },
49
- password: {
50
- typ: String
51
- },
52
- refreshToken:{
53
- type: String
54
- },
55
- twoFactorAuthentication : {
56
- code: {
57
- type: String
58
- },
59
- isEnable : {
60
- type: Boolean
61
- }
62
- }
63
-
64
- },
65
- {
66
- strict: true,
67
- versionKey: false,
68
- timestamps: true,
69
- },
70
- );
71
-
72
- user.plugin( mongooseUniqueValidator );
73
- 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
+ // Assigned: {
37
+ // type: {
38
+ // type: String,
39
+ // enum: [ 'store', 'group' ],
40
+ // },
41
+ // list: {
42
+ // type: Array,
43
+ // },
44
+ // },
45
+ userType:{
46
+ type: String,
47
+ enum:['tango','client']
48
+ },
49
+ password: {
50
+ typ: String
51
+ },
52
+ refreshToken:{
53
+ type: String
54
+ },
55
+ twoFactorAuthentication : {
56
+ code: {
57
+ type: String
58
+ },
59
+ isEnable : {
60
+ type: Boolean
61
+ }
62
+ }
63
+
64
+ },
65
+ {
66
+ strict: true,
67
+ versionKey: false,
68
+ timestamps: true,
69
+ },
70
+ );
71
+
72
+ user.plugin( mongooseUniqueValidator );
73
+ export default mongoose.model( 'user', user );
@@ -1,37 +1,37 @@
1
- import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
-
4
- const userAssigned = new mongoose.Schema(
5
- {
6
- userEmail: {
7
- type: String,
8
- required: true,
9
- unique: true,
10
- },
11
- clientId:{
12
- type: String
13
- },
14
- Assigned: {
15
- type: {
16
- type: String,
17
- enum: [ 'store', 'group' , 'client'],
18
- },
19
- list: {
20
- type: Array,
21
- },
22
- },
23
- userType:{
24
- type: String,
25
- enum:['tango','client']
26
- },
27
-
28
- },
29
- {
30
- strict: true,
31
- versionKey: false,
32
- timestamps: true,
33
- },
34
- );
35
-
36
- userAssigned.plugin( mongooseUniqueValidator );
37
- export default mongoose.model( 'userAssignedStore', userAssigned ,'userAssignedStore');
1
+ import mongoose from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const userAssigned = new mongoose.Schema(
5
+ {
6
+ userEmail: {
7
+ type: String,
8
+ required: true,
9
+ unique: true,
10
+ },
11
+ clientId:{
12
+ type: String
13
+ },
14
+ Assigned: {
15
+ type: {
16
+ type: String,
17
+ enum: [ 'store', 'group' , 'client'],
18
+ },
19
+ list: {
20
+ type: Array,
21
+ },
22
+ },
23
+ userType:{
24
+ type: String,
25
+ enum:['tango','client']
26
+ },
27
+
28
+ },
29
+ {
30
+ strict: true,
31
+ versionKey: false,
32
+ timestamps: true,
33
+ },
34
+ );
35
+
36
+ userAssigned.plugin( mongooseUniqueValidator );
37
+ export default mongoose.model( 'userAssignedStore', userAssigned ,'userAssignedStore');
@@ -1,71 +1,71 @@
1
- import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
-
4
- const userPermission = new mongoose.Schema(
5
- {
6
- userName: {
7
- type: String,
8
- },
9
- email: {
10
- type: String,
11
- required: true,
12
- unique: true,
13
- },
14
- clientId:{
15
- type: String
16
- },
17
- role: {
18
- type: String,
19
- enum: [ 'superadmin', 'admin', 'user' ],
20
- default: 'user',
21
- },
22
- // Assigned: {
23
- // type: {
24
- // type: String,
25
- // enum: [ 'store', 'group' ],
26
- // },
27
- // list: {
28
- // type: Array,
29
- // },
30
- // },
31
- userType:{
32
- type: String,
33
- enum:['tango','client']
34
- },
35
- permission: [
36
- {
37
- featureName: {
38
- type: String,
39
- },
40
- product: [
41
- {
42
- name: {
43
- type: String,
44
- },
45
- isView: {
46
- type: Boolean,
47
- },
48
- isEdit: {
49
- type: Boolean,
50
- },
51
- isDownload: {
52
- type: Boolean,
53
- },
54
- isDelete: {
55
- type: Boolean,
56
- },
57
- },
58
- ],
59
- },
60
- ],
61
-
62
- },
63
- {
64
- strict: true,
65
- versionKey: false,
66
- timestamps: true,
67
- },
68
- );
69
-
70
- userPermission.plugin( mongooseUniqueValidator );
71
- export default mongoose.model( 'userPermission', userPermission ,'userPermission');
1
+ import mongoose from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const userPermission = new mongoose.Schema(
5
+ {
6
+ userName: {
7
+ type: String,
8
+ },
9
+ email: {
10
+ type: String,
11
+ required: true,
12
+ unique: true,
13
+ },
14
+ clientId:{
15
+ type: String
16
+ },
17
+ role: {
18
+ type: String,
19
+ enum: [ 'superadmin', 'admin', 'user' ],
20
+ default: 'user',
21
+ },
22
+ // Assigned: {
23
+ // type: {
24
+ // type: String,
25
+ // enum: [ 'store', 'group' ],
26
+ // },
27
+ // list: {
28
+ // type: Array,
29
+ // },
30
+ // },
31
+ userType:{
32
+ type: String,
33
+ enum:['tango','client']
34
+ },
35
+ permission: [
36
+ {
37
+ featureName: {
38
+ type: String,
39
+ },
40
+ product: [
41
+ {
42
+ name: {
43
+ type: String,
44
+ },
45
+ isView: {
46
+ type: Boolean,
47
+ },
48
+ isEdit: {
49
+ type: Boolean,
50
+ },
51
+ isDownload: {
52
+ type: Boolean,
53
+ },
54
+ isDelete: {
55
+ type: Boolean,
56
+ },
57
+ },
58
+ ],
59
+ },
60
+ ],
61
+
62
+ },
63
+ {
64
+ strict: true,
65
+ versionKey: false,
66
+ timestamps: true,
67
+ },
68
+ );
69
+
70
+ userPermission.plugin( mongooseUniqueValidator );
71
+ export default mongoose.model( 'userPermission', userPermission ,'userPermission');
@@ -1,34 +1,34 @@
1
- import mongoose, { Mongoose } from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
-
4
- const vitualSchema = new mongoose.Schema({
5
- paymentType: {
6
- type:String,
7
- required:true
8
- },
9
- accNo:{
10
- type:String,
11
- required:true
12
- },
13
- IFSCCode:{
14
- type: String,
15
- required: true
16
- },
17
- swiftCode:{
18
- type: String,
19
- required: true
20
- },
21
- branch:{
22
- type: String,
23
- required: true
24
- }
25
- }, {
26
- strict: true,
27
- versionKey: false,
28
- timestamps: true,
29
- },)
30
- vitualSchema.plugin(mongooseUniqueValidator);
31
-
32
- const vitualModel = mongoose.model('virtualAccount',vitualSchema);
33
-
1
+ import mongoose, { Mongoose } from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const vitualSchema = new mongoose.Schema({
5
+ paymentType: {
6
+ type:String,
7
+ required:true
8
+ },
9
+ accNo:{
10
+ type:String,
11
+ required:true
12
+ },
13
+ IFSCCode:{
14
+ type: String,
15
+ required: true
16
+ },
17
+ swiftCode:{
18
+ type: String,
19
+ required: true
20
+ },
21
+ branch:{
22
+ type: String,
23
+ required: true
24
+ }
25
+ }, {
26
+ strict: true,
27
+ versionKey: false,
28
+ timestamps: true,
29
+ },)
30
+ vitualSchema.plugin(mongooseUniqueValidator);
31
+
32
+ const vitualModel = mongoose.model('virtualAccount',vitualSchema);
33
+
34
34
  export default vitualModel;