tango-api-schema 2.0.74 → 2.0.76

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,41 +1,41 @@
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
- enum: [ 'pending','completed' ],
27
- },
28
- markasRead:{
29
- type:Boolean,
30
- default:false
31
- }
32
- },
33
- {
34
- strict: true,
35
- versionKey: false,
36
- timestamps: true,
37
- },
38
- );
39
-
40
- 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
+ enum: [ 'pending','completed' ],
27
+ },
28
+ markasRead:{
29
+ type:Boolean,
30
+ default:false
31
+ }
32
+ },
33
+ {
34
+ strict: true,
35
+ versionKey: false,
36
+ timestamps: true,
37
+ },
38
+ );
39
+
40
+ clientRequestSchema.plugin(mongooseUniqueValidator);
41
41
  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');
@@ -0,0 +1,47 @@
1
+ import mongoose from 'mongoose'
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator'
3
+
4
+ let pricingSchema = new mongoose.Schema(
5
+ {
6
+ clientId: {
7
+ type:String
8
+ },
9
+ stores: [
10
+ {
11
+ storeId: {
12
+ type: String,
13
+ },
14
+ products: [
15
+ {
16
+ productName: {
17
+ type: String,
18
+ },
19
+ status: {
20
+ type: String,
21
+ },
22
+ price: {
23
+ type: Number,
24
+ },
25
+ featureStoreCount: {
26
+ type: Number,
27
+ }
28
+ }
29
+ ]
30
+ }
31
+ ],
32
+ dateString:{
33
+ type:String
34
+ },
35
+ dateISO:{
36
+ type:Date
37
+ }
38
+ },
39
+ {
40
+ strict: true,
41
+ versionKey: false,
42
+ timestamps: true,
43
+ }
44
+ )
45
+
46
+ pricingSchema.plugin(mongooseUniqueValidator);
47
+ export default mongoose.model('dailypricing', pricingSchema);
@@ -1,33 +1,33 @@
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
- version:{
21
- type: String,
22
- unique: true,
23
- }
24
- },
25
- {
26
- strict: true,
27
- versionKey: false,
28
- timestamps: true,
29
- },
30
- );
31
-
32
- edgeAppVersion.plugin( mongooseUniqueValidator );
33
- 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
+ version:{
21
+ type: String,
22
+ unique: true,
23
+ }
24
+ },
25
+ {
26
+ strict: true,
27
+ versionKey: false,
28
+ timestamps: true,
29
+ },
30
+ );
31
+
32
+ edgeAppVersion.plugin( mongooseUniqueValidator );
33
+ 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' );
@@ -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');
@@ -1,44 +1,44 @@
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
- totalAmount:{
25
- type:Number
26
- },
27
- revisedAmount:{
28
- type:Number
29
- },
30
- discount:{
31
- type:Number
32
- },
33
- status:{
34
- type:String
35
- }
36
- },{
37
- strict: true,
38
- versionKey: false,
39
- timestamps: true,
40
- }
41
- )
42
-
43
- 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
+ totalAmount:{
25
+ type:Number
26
+ },
27
+ revisedAmount:{
28
+ type:Number
29
+ },
30
+ discount:{
31
+ type:Number
32
+ },
33
+ status:{
34
+ type:String
35
+ }
36
+ },{
37
+ strict: true,
38
+ versionKey: false,
39
+ timestamps: true,
40
+ }
41
+ )
42
+
43
+ invoiceSchema.plugin(mongooseUniqueValidator);
44
44
  export default mongoose.model('invoice', invoiceSchema);
@@ -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' );