tango-api-schema 2.1.68 → 2.1.70

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-api-schema",
3
- "version": "2.1.68",
3
+ "version": "2.1.70",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -19,9 +19,7 @@
19
19
  },
20
20
  "homepage": "https://bitbucket.org/tangoeye-retail/tango-api-schema#readme",
21
21
  "dependencies": {
22
- "express": "^4.18.2",
23
- "mongoose": "^7.5.3",
24
- "mongoose-unique-validator": "^4.0.0",
25
- "nodemon": "^3.0.1"
22
+ "express": "^4.21.1",
23
+ "mongoose": "^8.8.2"
26
24
  }
27
25
  }
@@ -1,5 +1,4 @@
1
1
  import mongoose from 'mongoose'
2
- import mongooseUniqueValidator from 'mongoose-unique-validator'
3
2
 
4
3
  let pricingSchema = new mongoose.Schema(
5
4
  {
@@ -26,5 +25,5 @@ let pricingSchema = new mongoose.Schema(
26
25
  }
27
26
  )
28
27
 
29
- pricingSchema.plugin(mongooseUniqueValidator);
28
+
30
29
  export default mongoose.model('basepricing', pricingSchema);
@@ -1,5 +1,4 @@
1
1
  import { Schema, model } from "mongoose";
2
- import mongooseUniqueValidator from "mongoose-unique-validator";
3
2
 
4
3
  const collection = new Schema(
5
4
  {
@@ -141,6 +140,5 @@ collection.index({
141
140
  isUp: 1,
142
141
  });
143
142
 
144
- collection.plugin(mongooseUniqueValidator);
145
143
 
146
144
  export default model("camera", collection);
@@ -1,5 +1,4 @@
1
1
  import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
2
 
4
3
  const client = new mongoose.Schema(
5
4
  {
@@ -541,5 +540,4 @@ const client = new mongoose.Schema(
541
540
  },
542
541
  );
543
542
 
544
- client.plugin( mongooseUniqueValidator );
545
543
  export default mongoose.model( 'client', client );
@@ -1,5 +1,4 @@
1
1
  import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator'
3
2
 
4
3
  const clientRequestSchema = new mongoose.Schema(
5
4
  {
@@ -37,5 +36,4 @@ const clientRequestSchema = new mongoose.Schema(
37
36
  },
38
37
  );
39
38
 
40
- clientRequestSchema.plugin(mongooseUniqueValidator);
41
39
  export default mongoose.model('clientRequest', clientRequestSchema)
@@ -1,5 +1,4 @@
1
1
  import mongoose from 'mongoose'
2
- import mongooseUniqueValidator from 'mongoose-unique-validator'
3
2
 
4
3
  let clusterSchema = new mongoose.Schema(
5
4
  {
@@ -65,5 +64,4 @@ let clusterSchema = new mongoose.Schema(
65
64
  }
66
65
  )
67
66
 
68
- clusterSchema.plugin(mongooseUniqueValidator);
69
67
  export default mongoose.model('cluster', clusterSchema);
@@ -1,5 +1,4 @@
1
1
  import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
2
 
4
3
  const countryCodes = new mongoose.Schema(
5
4
  {
@@ -24,5 +23,4 @@ const countryCodes = new mongoose.Schema(
24
23
  },
25
24
  );
26
25
 
27
- countryCodes.plugin( mongooseUniqueValidator );
28
26
  export default mongoose.model( 'countryCodes', countryCodes , 'countryCodes');
@@ -1,5 +1,4 @@
1
1
  import mongoose from 'mongoose'
2
- import mongooseUniqueValidator from 'mongoose-unique-validator'
3
2
 
4
3
  let pricingSchema = new mongoose.Schema(
5
4
  {
@@ -85,5 +84,4 @@ let pricingSchema = new mongoose.Schema(
85
84
  }
86
85
  )
87
86
 
88
- pricingSchema.plugin(mongooseUniqueValidator);
89
87
  export default mongoose.model('dailypricing', pricingSchema);
@@ -1,5 +1,5 @@
1
1
  import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
2
+
3
3
 
4
4
  const edgeAppVersion = new mongoose.Schema(
5
5
  {
@@ -29,5 +29,5 @@ const edgeAppVersion = new mongoose.Schema(
29
29
  },
30
30
  );
31
31
 
32
- edgeAppVersion.plugin( mongooseUniqueValidator );
32
+
33
33
  export default mongoose.model( 'edgeappVersion', edgeAppVersion, 'edgeappVersion' );
@@ -1,5 +1,4 @@
1
1
  import mongoose from "mongoose";
2
- import uniqueValidator from "mongoose-unique-validator";
3
2
 
4
3
  const edgeappAuth = new mongoose.Schema(
5
4
  {
@@ -26,7 +25,6 @@ const edgeappAuth = new mongoose.Schema(
26
25
  }
27
26
  );
28
27
 
29
- edgeappAuth.plugin(uniqueValidator)
30
28
  edgeappAuth.index( { createdAt: 1 }, { expires: '1d' })
31
29
  edgeappAuth.index( { storeId: 1 })
32
30
 
@@ -1,5 +1,4 @@
1
1
  import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
2
 
4
3
  const group = new mongoose.Schema(
5
4
  {
@@ -32,5 +31,4 @@ const group = new mongoose.Schema(
32
31
  },
33
32
  );
34
33
 
35
- group.plugin( mongooseUniqueValidator );
36
34
  export default mongoose.model( 'group', group);
@@ -1,5 +1,4 @@
1
1
  import mongoose from "mongoose";
2
- import uniqueValidator from "mongoose-unique-validator";
3
2
 
4
3
  const internalAuth = new mongoose.Schema(
5
4
  {
@@ -30,7 +29,7 @@ const internalAuth = new mongoose.Schema(
30
29
  }
31
30
  );
32
31
 
33
- internalAuth.plugin(uniqueValidator)
32
+
34
33
  internalAuth.index( { createdAt: 1 }, { expires: '1d' })
35
34
  internalAuth.index( { name: 1 })
36
35
 
@@ -1,5 +1,4 @@
1
1
  import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
2
 
4
3
  const invoiceSchema = new mongoose.Schema(
5
4
  {
@@ -103,5 +102,4 @@ const invoiceSchema = new mongoose.Schema(
103
102
  }
104
103
  )
105
104
 
106
- invoiceSchema.plugin(mongooseUniqueValidator);
107
105
  export default mongoose.model('invoice', invoiceSchema);
@@ -1,5 +1,4 @@
1
1
  import mongoose from 'mongoose';
2
- import uniqueValidator from 'mongoose-unique-validator';
3
2
  const collection = new mongoose.Schema(
4
3
  {
5
4
  ipDetails: [
@@ -35,6 +34,5 @@ const collection = new mongoose.Schema(
35
34
  );
36
35
  collection.index( { createdAt: 1 }, { expires: '1d' } );
37
36
  collection.index( { storeId: 1 } );
38
- collection.plugin( uniqueValidator );
39
37
 
40
38
  export default mongoose.model( 'ipLog', collection, 'ipLog' );
@@ -1,5 +1,4 @@
1
1
  import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
2
 
4
3
  const lead = new mongoose.Schema(
5
4
  {
@@ -74,5 +73,4 @@ const lead = new mongoose.Schema(
74
73
  },
75
74
  );
76
75
 
77
- lead.plugin( mongooseUniqueValidator );
78
76
  export default mongoose.model( 'lead', lead );
@@ -1,43 +1,46 @@
1
- import {Schema,model} from 'mongoose'
2
-
3
- const liveConnectionSchema=new Schema({
1
+ import mongoose from "mongoose";
4
2
 
3
+ const liveConnectionSchema = new mongoose.Schema(
4
+ {
5
5
  clientId: {
6
- type: String,
7
- required:true
6
+ type: String,
7
+ required: true,
8
+ },
9
+ storeId: {
10
+ type: String,
11
+ required: true,
8
12
  },
9
- storeId:{
10
- type: String,
11
- required:true
13
+ remoteAddress: {
14
+ type: String,
12
15
  },
13
- remoteAddress:{
14
- type: String,
16
+ remotePort: {
17
+ type: Number,
15
18
  },
16
- remotePort:{
17
- type: Number,
19
+ connectedAt: {
20
+ type: Date,
21
+ default: new Date(),
18
22
  },
19
- connectedAt:{
20
- type:Date,
21
- default: new Date()
23
+ streamName: {
24
+ type: String,
22
25
  },
23
- streamName:{
24
- type: String,
26
+ status: {
27
+ type: String,
28
+ enum: ["live", "completed", "idle"],
25
29
  },
26
- status:{
27
- type:String,
28
- enum:["live", "completed","idle"]
30
+ module: {
31
+ type: String,
29
32
  },
30
- module:{
31
- type: String,
32
- }
33
- },{
33
+ },
34
+ {
34
35
  timestamps: true,
35
36
  versionKey: false,
36
- strict: false,
37
- } )
37
+ strict: false,
38
+ }
39
+ );
40
+
41
+ liveConnectionSchema.index({ clientId: 1 });
42
+ liveConnectionSchema.index({ storeId: 1 });
43
+ liveConnectionSchema.index({ status: 1 });
44
+ liveConnectionSchema.index({ createdAt: 1 }, { expires: "2d" });
38
45
 
39
- liveConnectionSchema.index({clientId:1,})
40
- liveConnectionSchema.index({storeId:1})
41
- liveConnectionSchema.index({status:1})
42
- liveConnectionSchema.index( { createdAt: 1 }, { expires: '2d'});
43
- export default model( 'liveConnection', liveConnectionSchema,"liveConnection" );
46
+ export default mongoose.model( 'liveConnection', liveConnectionSchema, 'liveConnection' );
@@ -1,4 +1,3 @@
1
- import uniqueValidator from 'mongoose-unique-validator';
2
1
  import mongoose from 'mongoose';
3
2
 
4
3
  // schema
@@ -39,7 +38,6 @@ const collection = new mongoose.Schema( {
39
38
  versionKey: false,
40
39
  } );
41
40
 
42
- collection.plugin( uniqueValidator );
43
41
  collection.index( { email: 1} );
44
42
 
45
43
  export default mongoose.model( 'mailOnlyUser', collection );
@@ -1,4 +1,3 @@
1
- import uniqueValidator from 'mongoose-unique-validator';
2
1
  import mongoose from 'mongoose';
3
2
 
4
3
  // schema
@@ -21,7 +20,6 @@ const collection = new mongoose.Schema( {
21
20
  versionKey: false,
22
21
  } );
23
22
 
24
- collection.plugin( uniqueValidator );
25
23
  collection.index( { createdAt: 1 }, { expires: '1d' } );
26
24
  collection.index( { type: 1, email: 1 } );
27
25
 
@@ -1,5 +1,4 @@
1
1
  import mongoose from "mongoose";
2
- import mongooseUniqueValidator from "mongoose-unique-validator";
3
2
 
4
3
  const store = new mongoose.Schema(
5
4
  {
@@ -320,6 +319,5 @@ const store = new mongoose.Schema(
320
319
  );
321
320
 
322
321
  store.index({ storeId: 1, clientId: 1, appId: 1 });
323
- store.plugin(mongooseUniqueValidator);
324
322
 
325
323
  export default mongoose.model("store", store);
@@ -1,5 +1,4 @@
1
1
  import mongoose, { Schema, model } from "mongoose";
2
- import mongooseUniqueValidator from "mongoose-unique-validator";
3
2
 
4
3
  const collection = new Schema({
5
4
  clientId:{
@@ -40,6 +39,5 @@ const collection = new Schema({
40
39
  }
41
40
  )
42
41
 
43
- collection.plugin(mongooseUniqueValidator);
44
42
 
45
43
  export default model("tagging", collection);
@@ -1,5 +1,4 @@
1
1
  import mongoose from 'mongoose'
2
- import mongooseUniqueValidator from 'mongoose-unique-validator'
3
2
 
4
3
  let teamsSchema = new mongoose.Schema(
5
4
  {
@@ -45,5 +44,4 @@ let teamsSchema = new mongoose.Schema(
45
44
  }
46
45
  )
47
46
 
48
- teamsSchema.plugin(mongooseUniqueValidator);
49
47
  export default mongoose.model('teams', teamsSchema);
@@ -1,5 +1,4 @@
1
1
  import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
2
 
4
3
  const user = new mongoose.Schema(
5
4
  {
@@ -117,5 +116,5 @@ const user = new mongoose.Schema(
117
116
  },
118
117
  );
119
118
 
120
- user.plugin( mongooseUniqueValidator );
119
+
121
120
  export default mongoose.model( 'user', user );
@@ -1,5 +1,4 @@
1
1
  import { Schema, model } from "mongoose";
2
- import mongooseUniqueValidator from "mongoose-unique-validator";
3
2
  const workStationModel = new Schema(
4
3
  {
5
4
  workStationId: {
@@ -72,6 +71,5 @@ const workStationModel = new Schema(
72
71
  );
73
72
 
74
73
  workStationModel.index({ workStationId: 1, appId: 1 });
75
- workStationModel.plugin(mongooseUniqueValidator);
76
74
 
77
75
  export default model("workstation", workStationModel);