tango-api-schema 2.0.37 → 2.0.38

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