tango-api-schema 2.0.122 → 2.0.124
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 +3 -1
- package/package.json +1 -1
- package/schema/assignAudit.model.js +1 -2
- package/schema/camera.model.js +2 -2
- package/schema/internalAuth.model.js +37 -0
package/index.js
CHANGED
|
@@ -32,6 +32,7 @@ import matLogModel from "./schema/matLog.model.js";
|
|
|
32
32
|
import billingModel from "./schema/billing.model.js";
|
|
33
33
|
import auditClientDataModel from "./schema/auditClientData.model.js";
|
|
34
34
|
import auditLogsModel from "./schema/auditLogs.model.js";
|
|
35
|
+
import internalAuthModel from "./schema/internalAuth.model.js";
|
|
35
36
|
|
|
36
37
|
export default {
|
|
37
38
|
leadModel,
|
|
@@ -67,5 +68,6 @@ export default {
|
|
|
67
68
|
auditClientDataModel,
|
|
68
69
|
matLogModel,
|
|
69
70
|
billingModel,
|
|
70
|
-
auditLogsModel
|
|
71
|
+
auditLogsModel,
|
|
72
|
+
internalAuthModel
|
|
71
73
|
};
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@ const assignAudit = new mongoose.Schema( {
|
|
|
13
13
|
clientId: {
|
|
14
14
|
type: String,
|
|
15
15
|
},
|
|
16
|
-
|
|
16
|
+
auditType: {
|
|
17
17
|
type: String,
|
|
18
18
|
},
|
|
19
19
|
fileDate: {
|
|
@@ -27,7 +27,6 @@ const assignAudit = new mongoose.Schema( {
|
|
|
27
27
|
},
|
|
28
28
|
userId: {
|
|
29
29
|
type: mongoose.Schema.Types.ObjectId,
|
|
30
|
-
ref: 'users',
|
|
31
30
|
},
|
|
32
31
|
queueName: {
|
|
33
32
|
type: String,
|
package/schema/camera.model.js
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
import uniqueValidator from "mongoose-unique-validator";
|
|
3
|
+
|
|
4
|
+
const internalAuth = 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: ["internal-token"],
|
|
15
|
+
default: "internal-token",
|
|
16
|
+
},
|
|
17
|
+
ip: {
|
|
18
|
+
type: String,
|
|
19
|
+
trim: true,
|
|
20
|
+
},
|
|
21
|
+
name:{
|
|
22
|
+
type: String,
|
|
23
|
+
trim: true,
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
strict: true,
|
|
28
|
+
versionKey: false,
|
|
29
|
+
timestamps: true,
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
internalAuth.plugin(uniqueValidator)
|
|
34
|
+
internalAuth.index( { createdAt: 1 }, { expires: '1d' })
|
|
35
|
+
internalAuth.index( { name: 1 })
|
|
36
|
+
|
|
37
|
+
export default mongoose.model( 'internalAuth', internalAuth,'internalAuth' );
|