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
package/schema/lead.model.js
CHANGED
|
@@ -1,75 +1,71 @@
|
|
|
1
|
-
import mongoose from 'mongoose';
|
|
2
|
-
import mongooseUniqueValidator from 'mongoose-unique-validator';
|
|
3
|
-
|
|
4
|
-
const lead = new mongoose.Schema(
|
|
5
|
-
{
|
|
6
|
-
clientName: {
|
|
7
|
-
type: String,
|
|
8
|
-
trim: true,
|
|
9
|
-
required: true,
|
|
10
|
-
unique: true,
|
|
11
|
-
},
|
|
12
|
-
firstName: {
|
|
13
|
-
type: String,
|
|
14
|
-
required: true,
|
|
15
|
-
},
|
|
16
|
-
lastName: {
|
|
17
|
-
type: String,
|
|
18
|
-
},
|
|
19
|
-
corporateEmail: {
|
|
20
|
-
type: String,
|
|
21
|
-
required: true,
|
|
22
|
-
unique: true,
|
|
23
|
-
},
|
|
24
|
-
countryCode: {
|
|
25
|
-
type: String,
|
|
26
|
-
},
|
|
27
|
-
mobileNumber: {
|
|
28
|
-
type: Number,
|
|
29
|
-
required: true,
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
type: String,
|
|
38
|
-
required: true,
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
type:
|
|
42
|
-
required: true,
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
type:
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
type: String,
|
|
50
|
-
enum: [ '
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
type:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
);
|
|
73
|
-
|
|
74
|
-
lead.plugin( mongooseUniqueValidator );
|
|
75
|
-
export default mongoose.model( 'lead', lead );
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
import mongooseUniqueValidator from 'mongoose-unique-validator';
|
|
3
|
+
|
|
4
|
+
const lead = new mongoose.Schema(
|
|
5
|
+
{
|
|
6
|
+
clientName: {
|
|
7
|
+
type: String,
|
|
8
|
+
trim: true,
|
|
9
|
+
required: true,
|
|
10
|
+
unique: true,
|
|
11
|
+
},
|
|
12
|
+
firstName: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
16
|
+
lastName: {
|
|
17
|
+
type: String,
|
|
18
|
+
},
|
|
19
|
+
corporateEmail: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: true,
|
|
22
|
+
unique: true,
|
|
23
|
+
},
|
|
24
|
+
countryCode: {
|
|
25
|
+
type: String,
|
|
26
|
+
},
|
|
27
|
+
mobileNumber: {
|
|
28
|
+
type: Number,
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
planDetails: {
|
|
32
|
+
totalStores: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: true,
|
|
35
|
+
},
|
|
36
|
+
storeSize: {
|
|
37
|
+
type: String,
|
|
38
|
+
required: true,
|
|
39
|
+
},
|
|
40
|
+
totalCamera: {
|
|
41
|
+
type: Number,
|
|
42
|
+
required: true,
|
|
43
|
+
},
|
|
44
|
+
subscriptionPeriod: {
|
|
45
|
+
type: String,
|
|
46
|
+
enum: [ 'monthly', 'quarterly', 'annual' ],
|
|
47
|
+
},
|
|
48
|
+
subscriptionType: {
|
|
49
|
+
type: String,
|
|
50
|
+
enum: [ 'free', 'premium', 'enterprise' ],
|
|
51
|
+
},
|
|
52
|
+
product: {
|
|
53
|
+
type: Array,
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
},
|
|
57
|
+
status: {
|
|
58
|
+
type: String,
|
|
59
|
+
enum: [ 'pending', 'rejected', 'approved' ],
|
|
60
|
+
default: 'pending',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
strict: true,
|
|
65
|
+
versionKey: false,
|
|
66
|
+
timestamps: true,
|
|
67
|
+
},
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
lead.plugin( mongooseUniqueValidator );
|
|
71
|
+
export default mongoose.model( 'lead', lead );
|
package/schema/otp.model.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import uniqueValidator from 'mongoose-unique-validator';
|
|
2
|
-
import mongoose from 'mongoose';
|
|
3
|
-
|
|
4
|
-
// schema
|
|
5
|
-
const collection = new mongoose.Schema( {
|
|
6
|
-
email: {
|
|
7
|
-
type: String,
|
|
8
|
-
trim: true,
|
|
9
|
-
unique: true,
|
|
10
|
-
},
|
|
11
|
-
otp: {
|
|
12
|
-
type: Number,
|
|
13
|
-
},
|
|
14
|
-
type: {
|
|
15
|
-
type: String,
|
|
16
|
-
enum: [ 'signup' ],
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
timestamps: true,
|
|
21
|
-
strict: true,
|
|
22
|
-
versionKey: false,
|
|
23
|
-
} );
|
|
24
|
-
|
|
25
|
-
collection.plugin( uniqueValidator );
|
|
26
|
-
collection.index( { createdAt: 1 }, { expires: '1d' } );
|
|
27
|
-
collection.index( { type: 1, email: 1 } );
|
|
28
|
-
|
|
1
|
+
import uniqueValidator from 'mongoose-unique-validator';
|
|
2
|
+
import mongoose from 'mongoose';
|
|
3
|
+
|
|
4
|
+
// schema
|
|
5
|
+
const collection = new mongoose.Schema( {
|
|
6
|
+
email: {
|
|
7
|
+
type: String,
|
|
8
|
+
trim: true,
|
|
9
|
+
unique: true,
|
|
10
|
+
},
|
|
11
|
+
otp: {
|
|
12
|
+
type: Number,
|
|
13
|
+
},
|
|
14
|
+
type: {
|
|
15
|
+
type: String,
|
|
16
|
+
enum: [ 'signup' ],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
timestamps: true,
|
|
21
|
+
strict: true,
|
|
22
|
+
versionKey: false,
|
|
23
|
+
} );
|
|
24
|
+
|
|
25
|
+
collection.plugin( uniqueValidator );
|
|
26
|
+
collection.index( { createdAt: 1 }, { expires: '1d' } );
|
|
27
|
+
collection.index( { type: 1, email: 1 } );
|
|
28
|
+
|
|
29
29
|
export default mongoose.model( 'otp', collection );
|
package/schema/report.model.js
CHANGED
|
@@ -1,33 +1,30 @@
|
|
|
1
|
-
import { Schema, model } from 'mongoose';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const reportschema = new Schema( {
|
|
5
|
-
fileName: {
|
|
6
|
-
type: String,
|
|
7
|
-
required: true,
|
|
8
|
-
},
|
|
9
|
-
fileType: {
|
|
10
|
-
type: String,
|
|
11
|
-
required: true,
|
|
12
|
-
},
|
|
13
|
-
reportName: {
|
|
14
|
-
type: String,
|
|
15
|
-
},
|
|
16
|
-
email: {
|
|
17
|
-
type: Array,
|
|
18
|
-
required: true,
|
|
19
|
-
},
|
|
20
|
-
clientId: {
|
|
21
|
-
type: String,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} );
|
|
32
|
-
|
|
33
|
-
export default model( 'report', reportschema );
|
|
1
|
+
import { Schema, model } from 'mongoose';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const reportschema = new Schema( {
|
|
5
|
+
fileName: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
fileType: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
reportName: {
|
|
14
|
+
type: String,
|
|
15
|
+
},
|
|
16
|
+
email: {
|
|
17
|
+
type: Array,
|
|
18
|
+
required: true,
|
|
19
|
+
},
|
|
20
|
+
clientId: {
|
|
21
|
+
type: String,
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
strict: true,
|
|
26
|
+
versionKey: false,
|
|
27
|
+
timestamps: true,
|
|
28
|
+
} );
|
|
29
|
+
|
|
30
|
+
export default model( 'report', reportschema );
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import mongoose from 'mongoose';
|
|
2
|
-
|
|
3
|
-
const roles = new mongoose.Schema(
|
|
4
|
-
{
|
|
5
|
-
roleName: {
|
|
6
|
-
type: String,
|
|
7
|
-
enum: [ 'superadmin', 'admin', 'user' ],
|
|
8
|
-
},
|
|
9
|
-
userType: {
|
|
10
|
-
type: String,
|
|
11
|
-
enum: [ 'client', 'tango' ],
|
|
12
|
-
},
|
|
13
|
-
isActive: {
|
|
14
|
-
type: Boolean,
|
|
15
|
-
default: true,
|
|
16
|
-
},
|
|
17
|
-
// AssignedUsers: {
|
|
18
|
-
// type:Array
|
|
19
|
-
// },
|
|
20
|
-
permission: [
|
|
21
|
-
{
|
|
22
|
-
featureName: {
|
|
23
|
-
type: String,
|
|
24
|
-
},
|
|
25
|
-
product: [
|
|
26
|
-
{
|
|
27
|
-
name: {
|
|
28
|
-
type: String,
|
|
29
|
-
},
|
|
30
|
-
isView: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
},
|
|
33
|
-
isEdit: {
|
|
34
|
-
type: Boolean,
|
|
35
|
-
},
|
|
36
|
-
isDownload: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
},
|
|
39
|
-
isDelete: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
strict: true,
|
|
49
|
-
versionKey: false,
|
|
50
|
-
timestamps: true,
|
|
51
|
-
},
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
export default mongoose.model( 'standaredRoles', roles ,'standaredRoles');
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
const roles = new mongoose.Schema(
|
|
4
|
+
{
|
|
5
|
+
roleName: {
|
|
6
|
+
type: String,
|
|
7
|
+
enum: [ 'superadmin', 'admin', 'user' ],
|
|
8
|
+
},
|
|
9
|
+
userType: {
|
|
10
|
+
type: String,
|
|
11
|
+
enum: [ 'client', 'tango', 'lead' ],
|
|
12
|
+
},
|
|
13
|
+
isActive: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: true,
|
|
16
|
+
},
|
|
17
|
+
// AssignedUsers: {
|
|
18
|
+
// type:Array
|
|
19
|
+
// },
|
|
20
|
+
permission: [
|
|
21
|
+
{
|
|
22
|
+
featureName: {
|
|
23
|
+
type: String,
|
|
24
|
+
},
|
|
25
|
+
product: [
|
|
26
|
+
{
|
|
27
|
+
name: {
|
|
28
|
+
type: String,
|
|
29
|
+
},
|
|
30
|
+
isView: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
},
|
|
33
|
+
isEdit: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
},
|
|
36
|
+
isDownload: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
},
|
|
39
|
+
isDelete: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
strict: true,
|
|
49
|
+
versionKey: false,
|
|
50
|
+
timestamps: true,
|
|
51
|
+
},
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
export default mongoose.model( 'standaredRoles', roles ,'standaredRoles');
|