tango-api-schema 2.0.115 → 2.0.117
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.
- package/index.js +17 -13
- package/package.json +1 -1
- package/schema/assignAudit.model.js +1 -1
- package/schema/{auditFilesCount.model.js → auditClientData.model.js} +5 -4
- package/schema/auditStoreData.model.js +48 -0
- package/schema/billing.model.js +100 -0
- package/schema/store.model.js +11 -0
- package/schema/storeAudit.model.js +54 -0
- package/schema/{audit.model.js → userAudit.model.js} +5 -10
- package/schema/auditLogs.model.js +0 -73
package/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import leadModel from "./schema/lead.model.js";
|
|
2
2
|
import otpModel from "./schema/otp.model.js";
|
|
3
3
|
import storeModel from "./schema/store.model.js";
|
|
4
|
-
import countryCodesModel from
|
|
4
|
+
import countryCodesModel from "./schema/countryCodes.model.js";
|
|
5
5
|
import clientModel from "./schema/client.model.js";
|
|
6
6
|
import tangoTicketModel from "./schema/tangoTicket.model.js";
|
|
7
7
|
import ipLogModel from "./schema/ipLogs.model.js";
|
|
8
8
|
import userModel from "./schema/user.model.js";
|
|
9
|
-
import edgeAppVersionModel from
|
|
9
|
+
import edgeAppVersionModel from "./schema/edgeAppVersion.model.js";
|
|
10
10
|
import applicationDefaultModel from "./schema/applicationDefault.model.js";
|
|
11
11
|
import cameraModel from "./schema/camera.model.js";
|
|
12
12
|
import reportModel from "./schema/report.model.js";
|
|
13
13
|
import standaredRoleModel from "./schema/standaredRole.model.js";
|
|
14
14
|
import infraReasonModel from "./schema/infraReason.model.js";
|
|
15
|
-
import groupModel from
|
|
16
|
-
import authenticationModel from
|
|
15
|
+
import groupModel from "./schema/group.model.js";
|
|
16
|
+
import authenticationModel from "./schema/authentication.model.js";
|
|
17
17
|
import userAssignedStoreModel from "./schema/userAssignedStore.model.js";
|
|
18
18
|
import edgeappAuthModel from "./schema/edgeappAuth.model.js";
|
|
19
19
|
import clientRequestModel from "./schema/clientRequest.model.js";
|
|
@@ -21,14 +21,16 @@ import basePricingModel from "./schema/basePricing.model.js";
|
|
|
21
21
|
import invoiceModel from "./schema/invoice.model.js";
|
|
22
22
|
import workstationModel from "./schema/workstation.model.js";
|
|
23
23
|
import dailyPricingModel from "./schema/dailyPricing.model.js";
|
|
24
|
-
import fittingModel from
|
|
25
|
-
import qualityCheckModel from
|
|
24
|
+
import fittingModel from "./schema/fitting.model.js";
|
|
25
|
+
import qualityCheckModel from "./schema/quality.model.js";
|
|
26
26
|
import taggingModel from "./schema/tagging.model.js";
|
|
27
|
-
import
|
|
28
|
-
import
|
|
27
|
+
import userAuditModel from "./schema/userAudit.model.js";
|
|
28
|
+
import storeAuditModel from "./schema/storeAudit.model.js";
|
|
29
29
|
import assignAuditModel from "./schema/assignAudit.model.js";
|
|
30
|
-
import
|
|
30
|
+
import auditStoreDataModel from "./schema/auditStoreData.model.js";
|
|
31
31
|
import matLogModel from "./schema/matLog.model.js";
|
|
32
|
+
import billingModel from "./schema/billing.model.js";
|
|
33
|
+
import auditClientDataModel from "./schema/auditClientData.model.js";
|
|
32
34
|
|
|
33
35
|
export default {
|
|
34
36
|
leadModel,
|
|
@@ -57,9 +59,11 @@ export default {
|
|
|
57
59
|
fittingModel,
|
|
58
60
|
qualityCheckModel,
|
|
59
61
|
taggingModel,
|
|
60
|
-
|
|
62
|
+
userAuditModel,
|
|
63
|
+
storeAuditModel,
|
|
61
64
|
assignAuditModel,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
matLogModel
|
|
65
|
+
auditStoreDataModel,
|
|
66
|
+
auditClientDataModel,
|
|
67
|
+
matLogModel,
|
|
68
|
+
billingModel
|
|
65
69
|
};
|
package/package.json
CHANGED
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
// NPM Modules
|
|
6
6
|
import mongoose from 'mongoose';
|
|
7
|
-
import mongooseUniqueValidator from 'mongoose-unique-validator';
|
|
8
7
|
|
|
9
8
|
// Schema
|
|
10
|
-
const
|
|
9
|
+
const auditClientData = new mongoose.Schema( {
|
|
11
10
|
|
|
12
11
|
clientId: {
|
|
13
12
|
type: String,
|
|
@@ -32,6 +31,9 @@ const auditFilesCount = new mongoose.Schema( {
|
|
|
32
31
|
totalFilesCount: {
|
|
33
32
|
type: Number,
|
|
34
33
|
},
|
|
34
|
+
storeList:{
|
|
35
|
+
type:Array
|
|
36
|
+
},
|
|
35
37
|
},
|
|
36
38
|
{
|
|
37
39
|
timestamps: true,
|
|
@@ -39,6 +41,5 @@ const auditFilesCount = new mongoose.Schema( {
|
|
|
39
41
|
versionKey: false,
|
|
40
42
|
} );
|
|
41
43
|
|
|
42
|
-
auditFilesCount.plugin( mongooseUniqueValidator );
|
|
43
44
|
|
|
44
|
-
export default mongoose.model( '
|
|
45
|
+
export default mongoose.model( 'auditClientData', auditClientData, 'auditClientData' );
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name api_audit
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// NPM Modules
|
|
6
|
+
import mongoose from 'mongoose';
|
|
7
|
+
|
|
8
|
+
// Schema
|
|
9
|
+
const auditStoreData = new mongoose.Schema( {
|
|
10
|
+
|
|
11
|
+
clientId: {
|
|
12
|
+
type: String,
|
|
13
|
+
},
|
|
14
|
+
clientName: {
|
|
15
|
+
type: String,
|
|
16
|
+
trim:true
|
|
17
|
+
},
|
|
18
|
+
fileDate: {
|
|
19
|
+
type: String,
|
|
20
|
+
},
|
|
21
|
+
fileDateISO: {
|
|
22
|
+
type: Date,
|
|
23
|
+
},
|
|
24
|
+
queueName: {
|
|
25
|
+
type: String,
|
|
26
|
+
trim:true
|
|
27
|
+
},
|
|
28
|
+
installedStore: {
|
|
29
|
+
type: Number,
|
|
30
|
+
},
|
|
31
|
+
totalFilesCount: {
|
|
32
|
+
type: Number,
|
|
33
|
+
},
|
|
34
|
+
storeId:{
|
|
35
|
+
type:String
|
|
36
|
+
},
|
|
37
|
+
sqs:{
|
|
38
|
+
type:Object
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
timestamps: true,
|
|
43
|
+
strict: true,
|
|
44
|
+
versionKey: false,
|
|
45
|
+
} );
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
export default mongoose.model( 'auditStoreData', auditStoreData, 'auditStoreData' );
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
const billingSchema = new mongoose.Schema(
|
|
4
|
+
{
|
|
5
|
+
clientId: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
groupName: {
|
|
10
|
+
type: String,
|
|
11
|
+
default:'Default Group'
|
|
12
|
+
},
|
|
13
|
+
groupTag: {
|
|
14
|
+
type: String,
|
|
15
|
+
enum: ['store','gst'],
|
|
16
|
+
default: 'store'
|
|
17
|
+
},
|
|
18
|
+
registeredCompanyName: {
|
|
19
|
+
type: String,
|
|
20
|
+
},
|
|
21
|
+
gst: {
|
|
22
|
+
type: String,
|
|
23
|
+
},
|
|
24
|
+
addressLineOne: {
|
|
25
|
+
type: String,
|
|
26
|
+
},
|
|
27
|
+
addressLineTwo: {
|
|
28
|
+
type: String,
|
|
29
|
+
},
|
|
30
|
+
city: {
|
|
31
|
+
type: String,
|
|
32
|
+
},
|
|
33
|
+
state: {
|
|
34
|
+
type: String,
|
|
35
|
+
},
|
|
36
|
+
country: {
|
|
37
|
+
type: String,
|
|
38
|
+
},
|
|
39
|
+
pinCode: {
|
|
40
|
+
type: String,
|
|
41
|
+
},
|
|
42
|
+
placeOfSupply: {
|
|
43
|
+
type: String,
|
|
44
|
+
},
|
|
45
|
+
po: {
|
|
46
|
+
type: String,
|
|
47
|
+
},
|
|
48
|
+
stores: {
|
|
49
|
+
type: Array,
|
|
50
|
+
},
|
|
51
|
+
proRata: {
|
|
52
|
+
type: String,
|
|
53
|
+
enum: ['b15','a15'],
|
|
54
|
+
default: 'a15'
|
|
55
|
+
},
|
|
56
|
+
paymentCategory: {
|
|
57
|
+
type: String,
|
|
58
|
+
enum: ['pre','post'],
|
|
59
|
+
default: 'post'
|
|
60
|
+
},
|
|
61
|
+
currency: {
|
|
62
|
+
type: String,
|
|
63
|
+
enum: ['dollar','inr'],
|
|
64
|
+
},
|
|
65
|
+
isInstallationOneTime: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: false
|
|
68
|
+
},
|
|
69
|
+
installationFee: {
|
|
70
|
+
type: Number,
|
|
71
|
+
},
|
|
72
|
+
paymentCycle: {
|
|
73
|
+
type: String,
|
|
74
|
+
enum: ['monthly','quarter', 'halfYearly', 'yearly'],
|
|
75
|
+
default: 'monthly'
|
|
76
|
+
},
|
|
77
|
+
paymentTerm: {
|
|
78
|
+
type: Number,
|
|
79
|
+
enum: [30, 45, 60, 90],
|
|
80
|
+
default: 30
|
|
81
|
+
},
|
|
82
|
+
generateInvoiceTo: {
|
|
83
|
+
type: Array,
|
|
84
|
+
},
|
|
85
|
+
attachAnnexure: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default:false
|
|
88
|
+
},
|
|
89
|
+
isPrimary: {
|
|
90
|
+
type: Boolean
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
strict: true,
|
|
95
|
+
versionKey: false,
|
|
96
|
+
timestamps: true,
|
|
97
|
+
},
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
export default mongoose.model( 'billing', billingSchema);
|
package/schema/store.model.js
CHANGED
|
@@ -192,6 +192,10 @@ const store = new mongoose.Schema(
|
|
|
192
192
|
},
|
|
193
193
|
serialNumber:{
|
|
194
194
|
type: String,
|
|
195
|
+
},
|
|
196
|
+
reScanIp:{
|
|
197
|
+
type:Boolean,
|
|
198
|
+
default:false
|
|
195
199
|
}
|
|
196
200
|
},
|
|
197
201
|
spocDetails: [
|
|
@@ -290,6 +294,13 @@ const store = new mongoose.Schema(
|
|
|
290
294
|
fileCount:{
|
|
291
295
|
type: Number
|
|
292
296
|
}
|
|
297
|
+
},
|
|
298
|
+
featurePackage:{
|
|
299
|
+
controlCenter: {
|
|
300
|
+
type: Boolean,
|
|
301
|
+
default: false
|
|
302
|
+
},
|
|
303
|
+
|
|
293
304
|
}
|
|
294
305
|
},
|
|
295
306
|
{
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name api_audit
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// NPM Modules
|
|
6
|
+
import mongoose from 'mongoose';
|
|
7
|
+
|
|
8
|
+
// Schema
|
|
9
|
+
const storeAuditSchema = new mongoose.Schema( {
|
|
10
|
+
userId: {
|
|
11
|
+
type:Array,
|
|
12
|
+
},
|
|
13
|
+
storeId: {
|
|
14
|
+
type: String,
|
|
15
|
+
},
|
|
16
|
+
auditType: {
|
|
17
|
+
type: String,
|
|
18
|
+
},
|
|
19
|
+
fileDate: {
|
|
20
|
+
type: String,
|
|
21
|
+
},
|
|
22
|
+
timeSpent: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: 0,
|
|
25
|
+
},
|
|
26
|
+
status: {
|
|
27
|
+
type: String,
|
|
28
|
+
enum: [ 'completed', 'inprogress', 'not_assign', 'drafted', 'skipped', 'assigned' ],
|
|
29
|
+
default: 'inprogress',
|
|
30
|
+
},
|
|
31
|
+
beforeCount: {
|
|
32
|
+
type: Number,
|
|
33
|
+
},
|
|
34
|
+
afterCount: {
|
|
35
|
+
type: Number,
|
|
36
|
+
},
|
|
37
|
+
clientId: {
|
|
38
|
+
type: String,
|
|
39
|
+
},
|
|
40
|
+
queueName: {
|
|
41
|
+
type: String,
|
|
42
|
+
},
|
|
43
|
+
fileDateISO: {
|
|
44
|
+
type: Date,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
timestamps: true,
|
|
49
|
+
strict: true,
|
|
50
|
+
versionKey: false,
|
|
51
|
+
} );
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
export default mongoose.model( 'storeAudit', storeAuditSchema, 'storeAudit' );
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import mongoose from 'mongoose';
|
|
7
7
|
|
|
8
8
|
// Schema
|
|
9
|
-
const
|
|
9
|
+
const userAuditSchem = new mongoose.Schema( {
|
|
10
10
|
userId: {
|
|
11
11
|
type: mongoose.Schema.Types.ObjectId,
|
|
12
12
|
},
|
|
@@ -33,18 +33,10 @@ const auditSchema = new mongoose.Schema( {
|
|
|
33
33
|
startTime: {
|
|
34
34
|
type: Date,
|
|
35
35
|
},
|
|
36
|
-
storeStatus: {
|
|
37
|
-
type: String,
|
|
38
|
-
enum: [ 'completed', 'inprogress', 'not_assign', 'drafted', 'skipped', 'assigned' ],
|
|
39
|
-
default: 'inprogress',
|
|
40
|
-
},
|
|
41
36
|
auditStatus: {
|
|
42
37
|
type: String,
|
|
43
38
|
enum: [ 'inprogress', 'drafted', 'completed', 'skipped' ],
|
|
44
39
|
},
|
|
45
|
-
storeBC: {
|
|
46
|
-
type: Number,
|
|
47
|
-
},
|
|
48
40
|
beforeCount: {
|
|
49
41
|
type: Number,
|
|
50
42
|
},
|
|
@@ -63,6 +55,9 @@ const auditSchema = new mongoose.Schema( {
|
|
|
63
55
|
fileDateISO: {
|
|
64
56
|
type: Date,
|
|
65
57
|
},
|
|
58
|
+
dueHour: {
|
|
59
|
+
type: String
|
|
60
|
+
}
|
|
66
61
|
},
|
|
67
62
|
{
|
|
68
63
|
timestamps: true,
|
|
@@ -71,4 +66,4 @@ const auditSchema = new mongoose.Schema( {
|
|
|
71
66
|
} );
|
|
72
67
|
|
|
73
68
|
|
|
74
|
-
export default mongoose.model( '
|
|
69
|
+
export default mongoose.model( 'userAudit', userAuditSchem, 'userAudit' );
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @name api_audit_logs
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
// NPM Modules
|
|
6
|
-
import mongoose from 'mongoose';
|
|
7
|
-
|
|
8
|
-
// Schema
|
|
9
|
-
const auditLogs = new mongoose.Schema(
|
|
10
|
-
{
|
|
11
|
-
userId: {
|
|
12
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
13
|
-
},
|
|
14
|
-
storeId: {
|
|
15
|
-
type: String,
|
|
16
|
-
},
|
|
17
|
-
userMsg: {
|
|
18
|
-
type: String,
|
|
19
|
-
},
|
|
20
|
-
auditId: {
|
|
21
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
22
|
-
ref: 'audit',
|
|
23
|
-
},
|
|
24
|
-
auditType: {
|
|
25
|
-
type: String,
|
|
26
|
-
},
|
|
27
|
-
fileDate: {
|
|
28
|
-
type: String,
|
|
29
|
-
},
|
|
30
|
-
clientId: {
|
|
31
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
32
|
-
},
|
|
33
|
-
queueName: {
|
|
34
|
-
type: String,
|
|
35
|
-
},
|
|
36
|
-
totalCount: {
|
|
37
|
-
type: Number,
|
|
38
|
-
},
|
|
39
|
-
junkCount: {
|
|
40
|
-
type: Number,
|
|
41
|
-
},
|
|
42
|
-
junk: {
|
|
43
|
-
type: Array,
|
|
44
|
-
},
|
|
45
|
-
employeeCount: {
|
|
46
|
-
type: Number,
|
|
47
|
-
},
|
|
48
|
-
employee: {
|
|
49
|
-
type: Array,
|
|
50
|
-
},
|
|
51
|
-
customerCount: {
|
|
52
|
-
type: Number,
|
|
53
|
-
},
|
|
54
|
-
customer: {
|
|
55
|
-
type: Array,
|
|
56
|
-
},
|
|
57
|
-
retagImage: {
|
|
58
|
-
type: Array,
|
|
59
|
-
},
|
|
60
|
-
retagCount: {
|
|
61
|
-
type: Number,
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
timestamps: true,
|
|
66
|
-
strict: true,
|
|
67
|
-
versionKey: false,
|
|
68
|
-
expires: '2d',
|
|
69
|
-
},
|
|
70
|
-
);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
export default mongoose.model( 'auditLogs', auditLogs, 'auditLogs' );
|