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.
- package/index.js +44 -44
- package/package.json +27 -27
- package/schema/applicationDefault.model.js +24 -24
- package/schema/authentication.model.js +27 -27
- package/schema/basePricing.model.js +29 -29
- package/schema/camera.model.js +117 -117
- package/schema/client.model.js +372 -372
- package/schema/clientRequest.model.js +39 -39
- package/schema/countryCodes.model.js +28 -28
- package/schema/edgeAppVersion.model.js +29 -29
- package/schema/edgeappAuth.model.js +32 -32
- package/schema/group.model.js +31 -31
- package/schema/infraReason.model.js +44 -44
- package/schema/invoice.model.js +34 -34
- package/schema/ipLogs.model.js +39 -39
- package/schema/lead.model.js +71 -75
- package/schema/otp.model.js +28 -28
- package/schema/report.model.js +30 -33
- package/schema/standaredRole.model.js +54 -54
- package/schema/store.model.js +296 -296
- package/schema/tangoTicket.model.js +129 -129
- package/schema/user.model.js +90 -90
- package/schema/userAssignedStore.model.js +38 -38
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import mongoose from 'mongoose';
|
|
2
|
-
import mongooseUniqueValidator from 'mongoose-unique-validator'
|
|
3
|
-
|
|
4
|
-
const clientRequestSchema = new mongoose.Schema(
|
|
5
|
-
{
|
|
6
|
-
clientId: {
|
|
7
|
-
type:String
|
|
8
|
-
},
|
|
9
|
-
user:{
|
|
10
|
-
type:mongoose.SchemaTypes.ObjectId
|
|
11
|
-
},
|
|
12
|
-
name:{
|
|
13
|
-
type:String
|
|
14
|
-
},
|
|
15
|
-
reason:{
|
|
16
|
-
type:String
|
|
17
|
-
},
|
|
18
|
-
description:{
|
|
19
|
-
type:String
|
|
20
|
-
},
|
|
21
|
-
category:{
|
|
22
|
-
type:String
|
|
23
|
-
},
|
|
24
|
-
status:{
|
|
25
|
-
type:String
|
|
26
|
-
},
|
|
27
|
-
markasRead:{
|
|
28
|
-
type:Boolean,
|
|
29
|
-
default:false
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
strict: true,
|
|
34
|
-
versionKey: false,
|
|
35
|
-
timestamps: true,
|
|
36
|
-
},
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
clientRequestSchema.plugin(mongooseUniqueValidator);
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
import mongooseUniqueValidator from 'mongoose-unique-validator'
|
|
3
|
+
|
|
4
|
+
const clientRequestSchema = new mongoose.Schema(
|
|
5
|
+
{
|
|
6
|
+
clientId: {
|
|
7
|
+
type:String
|
|
8
|
+
},
|
|
9
|
+
user:{
|
|
10
|
+
type:mongoose.SchemaTypes.ObjectId
|
|
11
|
+
},
|
|
12
|
+
name:{
|
|
13
|
+
type:String
|
|
14
|
+
},
|
|
15
|
+
reason:{
|
|
16
|
+
type:String
|
|
17
|
+
},
|
|
18
|
+
description:{
|
|
19
|
+
type:String
|
|
20
|
+
},
|
|
21
|
+
category:{
|
|
22
|
+
type:String
|
|
23
|
+
},
|
|
24
|
+
status:{
|
|
25
|
+
type:String
|
|
26
|
+
},
|
|
27
|
+
markasRead:{
|
|
28
|
+
type:Boolean,
|
|
29
|
+
default:false
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
strict: true,
|
|
34
|
+
versionKey: false,
|
|
35
|
+
timestamps: true,
|
|
36
|
+
},
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
clientRequestSchema.plugin(mongooseUniqueValidator);
|
|
40
40
|
export default mongoose.model('clientRequest', clientRequestSchema)
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import mongoose from 'mongoose';
|
|
2
|
-
import mongooseUniqueValidator from 'mongoose-unique-validator';
|
|
3
|
-
|
|
4
|
-
const countryCodes = new mongoose.Schema(
|
|
5
|
-
{
|
|
6
|
-
countryName: {
|
|
7
|
-
type: String,
|
|
8
|
-
required: true,
|
|
9
|
-
unique: true,
|
|
10
|
-
},
|
|
11
|
-
countryAlpha2Code: {
|
|
12
|
-
type: String,
|
|
13
|
-
required: true,
|
|
14
|
-
},
|
|
15
|
-
countryCode: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: true,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
strict: true,
|
|
22
|
-
versionKey: false,
|
|
23
|
-
timestamps: true,
|
|
24
|
-
},
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
countryCodes.plugin( mongooseUniqueValidator );
|
|
28
|
-
export default mongoose.model( 'countryCodes', countryCodes , 'countryCodes');
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
import mongooseUniqueValidator from 'mongoose-unique-validator';
|
|
3
|
+
|
|
4
|
+
const countryCodes = new mongoose.Schema(
|
|
5
|
+
{
|
|
6
|
+
countryName: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
unique: true,
|
|
10
|
+
},
|
|
11
|
+
countryAlpha2Code: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
countryCode: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: true,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
strict: true,
|
|
22
|
+
versionKey: false,
|
|
23
|
+
timestamps: true,
|
|
24
|
+
},
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
countryCodes.plugin( mongooseUniqueValidator );
|
|
28
|
+
export default mongoose.model( 'countryCodes', countryCodes , 'countryCodes');
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import mongoose from 'mongoose';
|
|
2
|
-
import mongooseUniqueValidator from 'mongoose-unique-validator';
|
|
3
|
-
|
|
4
|
-
const edgeAppVersion = new mongoose.Schema(
|
|
5
|
-
{
|
|
6
|
-
appVersion: {
|
|
7
|
-
type: String,
|
|
8
|
-
unique: true,
|
|
9
|
-
},
|
|
10
|
-
isActive: {
|
|
11
|
-
type: Boolean,
|
|
12
|
-
default: true,
|
|
13
|
-
},
|
|
14
|
-
isDefault: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
},
|
|
17
|
-
exeName:{
|
|
18
|
-
type: String,
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
strict: true,
|
|
23
|
-
versionKey: false,
|
|
24
|
-
timestamps: true,
|
|
25
|
-
},
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
edgeAppVersion.plugin( mongooseUniqueValidator );
|
|
29
|
-
export default mongoose.model( 'edgeappVersion', edgeAppVersion, 'edgeappVersion' );
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
import mongooseUniqueValidator from 'mongoose-unique-validator';
|
|
3
|
+
|
|
4
|
+
const edgeAppVersion = new mongoose.Schema(
|
|
5
|
+
{
|
|
6
|
+
appVersion: {
|
|
7
|
+
type: String,
|
|
8
|
+
unique: true,
|
|
9
|
+
},
|
|
10
|
+
isActive: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: true,
|
|
13
|
+
},
|
|
14
|
+
isDefault: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
},
|
|
17
|
+
exeName:{
|
|
18
|
+
type: String,
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
strict: true,
|
|
23
|
+
versionKey: false,
|
|
24
|
+
timestamps: true,
|
|
25
|
+
},
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
edgeAppVersion.plugin( mongooseUniqueValidator );
|
|
29
|
+
export default mongoose.model( 'edgeappVersion', edgeAppVersion, 'edgeappVersion' );
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import mongoose from "mongoose";
|
|
2
|
-
import uniqueValidator from "mongoose-unique-validator";
|
|
3
|
-
|
|
4
|
-
const edgeappAuth = new mongoose.Schema(
|
|
5
|
-
{
|
|
6
|
-
token: {
|
|
7
|
-
type: String,
|
|
8
|
-
trim: true,
|
|
9
|
-
unique: true,
|
|
10
|
-
required: true,
|
|
11
|
-
},
|
|
12
|
-
type: {
|
|
13
|
-
type: String,
|
|
14
|
-
enum: ["edgeappAuth-token"],
|
|
15
|
-
default: "edgeappAuth-token",
|
|
16
|
-
},
|
|
17
|
-
storeId: {
|
|
18
|
-
type: String,
|
|
19
|
-
trim: true,
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
strict: true,
|
|
24
|
-
versionKey: false,
|
|
25
|
-
timestamps: true,
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
edgeappAuth.plugin(uniqueValidator)
|
|
30
|
-
edgeappAuth.index( { createdAt: 1 }, { expires: '1d' })
|
|
31
|
-
edgeappAuth.index( { storeId: 1 })
|
|
32
|
-
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
import uniqueValidator from "mongoose-unique-validator";
|
|
3
|
+
|
|
4
|
+
const edgeappAuth = new mongoose.Schema(
|
|
5
|
+
{
|
|
6
|
+
token: {
|
|
7
|
+
type: String,
|
|
8
|
+
trim: true,
|
|
9
|
+
unique: true,
|
|
10
|
+
required: true,
|
|
11
|
+
},
|
|
12
|
+
type: {
|
|
13
|
+
type: String,
|
|
14
|
+
enum: ["edgeappAuth-token"],
|
|
15
|
+
default: "edgeappAuth-token",
|
|
16
|
+
},
|
|
17
|
+
storeId: {
|
|
18
|
+
type: String,
|
|
19
|
+
trim: true,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
strict: true,
|
|
24
|
+
versionKey: false,
|
|
25
|
+
timestamps: true,
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
edgeappAuth.plugin(uniqueValidator)
|
|
30
|
+
edgeappAuth.index( { createdAt: 1 }, { expires: '1d' })
|
|
31
|
+
edgeappAuth.index( { storeId: 1 })
|
|
32
|
+
|
|
33
33
|
export default mongoose.model( 'edgeappAuth', edgeappAuth,'edgeappAuth' );
|
package/schema/group.model.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import mongoose from 'mongoose';
|
|
2
|
-
import mongooseUniqueValidator from 'mongoose-unique-validator';
|
|
3
|
-
|
|
4
|
-
const group = new mongoose.Schema(
|
|
5
|
-
{
|
|
6
|
-
groupName: {
|
|
7
|
-
type: String,
|
|
8
|
-
},
|
|
9
|
-
storeList: {
|
|
10
|
-
type:Array
|
|
11
|
-
},
|
|
12
|
-
clientId:{
|
|
13
|
-
type: String
|
|
14
|
-
},
|
|
15
|
-
description: {
|
|
16
|
-
type: String
|
|
17
|
-
},
|
|
18
|
-
isActive: {
|
|
19
|
-
type: Boolean,
|
|
20
|
-
default: true
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
strict: true,
|
|
25
|
-
versionKey: false,
|
|
26
|
-
timestamps: true,
|
|
27
|
-
},
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
group.plugin( mongooseUniqueValidator );
|
|
31
|
-
export default mongoose.model( 'group', group);
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
import mongooseUniqueValidator from 'mongoose-unique-validator';
|
|
3
|
+
|
|
4
|
+
const group = new mongoose.Schema(
|
|
5
|
+
{
|
|
6
|
+
groupName: {
|
|
7
|
+
type: String,
|
|
8
|
+
},
|
|
9
|
+
storeList: {
|
|
10
|
+
type:Array
|
|
11
|
+
},
|
|
12
|
+
clientId:{
|
|
13
|
+
type: String
|
|
14
|
+
},
|
|
15
|
+
description: {
|
|
16
|
+
type: String
|
|
17
|
+
},
|
|
18
|
+
isActive: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: true
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
strict: true,
|
|
25
|
+
versionKey: false,
|
|
26
|
+
timestamps: true,
|
|
27
|
+
},
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
group.plugin( mongooseUniqueValidator );
|
|
31
|
+
export default mongoose.model( 'group', group);
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import mongoose from 'mongoose';
|
|
2
|
-
|
|
3
|
-
const infraReasons = new mongoose.Schema(
|
|
4
|
-
{
|
|
5
|
-
name: {
|
|
6
|
-
type: String,
|
|
7
|
-
},
|
|
8
|
-
parentId: {
|
|
9
|
-
type: mongoose.Types.ObjectId
|
|
10
|
-
},
|
|
11
|
-
parentName: {
|
|
12
|
-
type: String
|
|
13
|
-
},
|
|
14
|
-
order: {
|
|
15
|
-
type: Number
|
|
16
|
-
},
|
|
17
|
-
toolTips: [
|
|
18
|
-
{
|
|
19
|
-
name: {
|
|
20
|
-
type: String
|
|
21
|
-
},
|
|
22
|
-
order: {
|
|
23
|
-
type: Number
|
|
24
|
-
},
|
|
25
|
-
}
|
|
26
|
-
],
|
|
27
|
-
stepstoResolve: [{
|
|
28
|
-
name: {
|
|
29
|
-
type: String
|
|
30
|
-
},
|
|
31
|
-
order: {
|
|
32
|
-
type: Number
|
|
33
|
-
},
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
strict: true,
|
|
39
|
-
versionKey: false,
|
|
40
|
-
timestamps: true,
|
|
41
|
-
},
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
const infraReasons = new mongoose.Schema(
|
|
4
|
+
{
|
|
5
|
+
name: {
|
|
6
|
+
type: String,
|
|
7
|
+
},
|
|
8
|
+
parentId: {
|
|
9
|
+
type: mongoose.Types.ObjectId
|
|
10
|
+
},
|
|
11
|
+
parentName: {
|
|
12
|
+
type: String
|
|
13
|
+
},
|
|
14
|
+
order: {
|
|
15
|
+
type: Number
|
|
16
|
+
},
|
|
17
|
+
toolTips: [
|
|
18
|
+
{
|
|
19
|
+
name: {
|
|
20
|
+
type: String
|
|
21
|
+
},
|
|
22
|
+
order: {
|
|
23
|
+
type: Number
|
|
24
|
+
},
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
stepstoResolve: [{
|
|
28
|
+
name: {
|
|
29
|
+
type: String
|
|
30
|
+
},
|
|
31
|
+
order: {
|
|
32
|
+
type: Number
|
|
33
|
+
},
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
strict: true,
|
|
39
|
+
versionKey: false,
|
|
40
|
+
timestamps: true,
|
|
41
|
+
},
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
|
|
45
45
|
export default mongoose.model('infraReasons', infraReasons, 'infraReasons');
|
package/schema/invoice.model.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import mongoose from 'mongoose';
|
|
2
|
-
import mongooseUniqueValidator from 'mongoose-unique-validator';
|
|
3
|
-
|
|
4
|
-
const invoiceSchema = new mongoose.Schema(
|
|
5
|
-
{
|
|
6
|
-
clientId: {
|
|
7
|
-
type:String
|
|
8
|
-
},
|
|
9
|
-
invoice: {
|
|
10
|
-
type:String,
|
|
11
|
-
},
|
|
12
|
-
billingDate:{
|
|
13
|
-
type:Date
|
|
14
|
-
},
|
|
15
|
-
stores: {
|
|
16
|
-
type:Number
|
|
17
|
-
},
|
|
18
|
-
products:{
|
|
19
|
-
type:Array
|
|
20
|
-
},
|
|
21
|
-
amount:{
|
|
22
|
-
type:Number
|
|
23
|
-
},
|
|
24
|
-
status:{
|
|
25
|
-
type:String
|
|
26
|
-
}
|
|
27
|
-
},{
|
|
28
|
-
strict: true,
|
|
29
|
-
versionKey: false,
|
|
30
|
-
timestamps: true,
|
|
31
|
-
}
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
invoiceSchema.plugin(mongooseUniqueValidator);
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
import mongooseUniqueValidator from 'mongoose-unique-validator';
|
|
3
|
+
|
|
4
|
+
const invoiceSchema = new mongoose.Schema(
|
|
5
|
+
{
|
|
6
|
+
clientId: {
|
|
7
|
+
type:String
|
|
8
|
+
},
|
|
9
|
+
invoice: {
|
|
10
|
+
type:String,
|
|
11
|
+
},
|
|
12
|
+
billingDate:{
|
|
13
|
+
type:Date
|
|
14
|
+
},
|
|
15
|
+
stores: {
|
|
16
|
+
type:Number
|
|
17
|
+
},
|
|
18
|
+
products:{
|
|
19
|
+
type:Array
|
|
20
|
+
},
|
|
21
|
+
amount:{
|
|
22
|
+
type:Number
|
|
23
|
+
},
|
|
24
|
+
status:{
|
|
25
|
+
type:String
|
|
26
|
+
}
|
|
27
|
+
},{
|
|
28
|
+
strict: true,
|
|
29
|
+
versionKey: false,
|
|
30
|
+
timestamps: true,
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
invoiceSchema.plugin(mongooseUniqueValidator);
|
|
35
35
|
export default mongoose.model('invoice', invoiceSchema);
|
package/schema/ipLogs.model.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import mongoose from 'mongoose';
|
|
2
|
-
import uniqueValidator from 'mongoose-unique-validator';
|
|
3
|
-
const collection = new mongoose.Schema(
|
|
4
|
-
{
|
|
5
|
-
ipDetails: [
|
|
6
|
-
{
|
|
7
|
-
ip: {
|
|
8
|
-
type: String,
|
|
9
|
-
trim: true,
|
|
10
|
-
},
|
|
11
|
-
manufacturer: {
|
|
12
|
-
type: String,
|
|
13
|
-
trim: true,
|
|
14
|
-
},
|
|
15
|
-
macId: {
|
|
16
|
-
type: String,
|
|
17
|
-
trim: true,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
storeId: {
|
|
22
|
-
type: String,
|
|
23
|
-
trim: true,
|
|
24
|
-
},
|
|
25
|
-
clientId: {
|
|
26
|
-
type: String,
|
|
27
|
-
trim: true,
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
timestamps: true,
|
|
32
|
-
versionKey: false,
|
|
33
|
-
strict: true,
|
|
34
|
-
},
|
|
35
|
-
);
|
|
36
|
-
collection.index( { createdAt: 1 }, { expires: '1d' } );
|
|
37
|
-
collection.index( { storeId: 1 } );
|
|
38
|
-
collection.plugin( uniqueValidator );
|
|
39
|
-
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
import uniqueValidator from 'mongoose-unique-validator';
|
|
3
|
+
const collection = new mongoose.Schema(
|
|
4
|
+
{
|
|
5
|
+
ipDetails: [
|
|
6
|
+
{
|
|
7
|
+
ip: {
|
|
8
|
+
type: String,
|
|
9
|
+
trim: true,
|
|
10
|
+
},
|
|
11
|
+
manufacturer: {
|
|
12
|
+
type: String,
|
|
13
|
+
trim: true,
|
|
14
|
+
},
|
|
15
|
+
macId: {
|
|
16
|
+
type: String,
|
|
17
|
+
trim: true,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
storeId: {
|
|
22
|
+
type: String,
|
|
23
|
+
trim: true,
|
|
24
|
+
},
|
|
25
|
+
clientId: {
|
|
26
|
+
type: String,
|
|
27
|
+
trim: true,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
timestamps: true,
|
|
32
|
+
versionKey: false,
|
|
33
|
+
strict: true,
|
|
34
|
+
},
|
|
35
|
+
);
|
|
36
|
+
collection.index( { createdAt: 1 }, { expires: '1d' } );
|
|
37
|
+
collection.index( { storeId: 1 } );
|
|
38
|
+
collection.plugin( uniqueValidator );
|
|
39
|
+
|
|
40
40
|
export default mongoose.model( 'ipLog', collection, 'ipLog' );
|