tango-api-schema 2.0.78 → 2.0.80

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');
@@ -1,47 +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);
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
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,57 +1,60 @@
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
- stores: {
13
- type:Number
14
- },
15
- products:{
16
- type:Array
17
- },
18
- amount:{
19
- type:Number
20
- },
21
- totalAmount:{
22
- type:Number
23
- },
24
- revisedAmount:{
25
- type:Number
26
- },
27
- discount:{
28
- type:Number
29
- },
30
- status:{
31
- type:String
32
- },
33
- receivedAmount:{
34
- type:Number
35
- },
36
- billingDate:{
37
- type:Date
38
- },
39
- dueDate:{
40
- type:Date
41
- },
42
- paidDate:{
43
- type:Date
44
- },
45
- paymentType: {
46
- type:String,
47
- enum: ['online','banktransfer']
48
- },
49
- },{
50
- strict: true,
51
- versionKey: false,
52
- timestamps: true,
53
- }
54
- )
55
-
56
- 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
+ stores: {
13
+ type:Number
14
+ },
15
+ products:{
16
+ type:Array
17
+ },
18
+ amount:{
19
+ type:Number
20
+ },
21
+ totalAmount:{
22
+ type:Number
23
+ },
24
+ revisedAmount:{
25
+ type:Number
26
+ },
27
+ discount:{
28
+ type:Number
29
+ },
30
+ status:{
31
+ type:String
32
+ },
33
+ receivedAmount:{
34
+ type:Number
35
+ },
36
+ billingDate:{
37
+ type:Date
38
+ },
39
+ dueDate:{
40
+ type:Date
41
+ },
42
+ paidDate:{
43
+ type:Date
44
+ },
45
+ paymentType: {
46
+ type:String,
47
+ enum: ['online','banktransfer']
48
+ },
49
+ paymentReferenceId: {
50
+ type:String
51
+ },
52
+ },{
53
+ strict: true,
54
+ versionKey: false,
55
+ timestamps: true,
56
+ }
57
+ )
58
+
59
+ invoiceSchema.plugin(mongooseUniqueValidator);
57
60
  export default mongoose.model('invoice', invoiceSchema);