@duvdu-v1/duvdu 1.1.187 → 1.1.188
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/build/models/User.model.js +1 -1
- package/build/models/messages.model.d.ts +5 -1
- package/build/models/messages.model.js +5 -4
- package/build/models/producer.model.js +1 -1
- package/build/models/producerPlatform.model.js +8 -4
- package/build/models/rental.model.js +1 -1
- package/build/models/teamProject.model.js +1 -1
- package/build/types/Permissions.js +1 -1
- package/build/types/User.d.ts +1 -1
- package/package.json +56 -56
|
@@ -38,7 +38,7 @@ const userSchema = new mongoose_1.Schema({
|
|
|
38
38
|
type: { type: String, default: 'Point' },
|
|
39
39
|
coordinates: { type: [Number], default: [31.2357, 30.0444] },
|
|
40
40
|
},
|
|
41
|
-
|
|
41
|
+
categories: [{ type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.category, default: null }],
|
|
42
42
|
acceptedProjectsCounter: { type: Number, default: 0 },
|
|
43
43
|
profileViews: { type: Number, default: 0 },
|
|
44
44
|
about: { type: String, default: null },
|
|
@@ -28,6 +28,10 @@ interface Ireaction {
|
|
|
28
28
|
type: string;
|
|
29
29
|
user: Types.ObjectId | Iuser;
|
|
30
30
|
}
|
|
31
|
+
export interface IWatcher {
|
|
32
|
+
user: Types.ObjectId | Iuser;
|
|
33
|
+
watched: boolean;
|
|
34
|
+
}
|
|
31
35
|
export interface ImessageDoc {
|
|
32
36
|
sender: Types.ObjectId | Iuser;
|
|
33
37
|
receiver: Types.ObjectId | Iuser;
|
|
@@ -39,8 +43,8 @@ export interface ImessageDoc {
|
|
|
39
43
|
}
|
|
40
44
|
];
|
|
41
45
|
reactions: Ireaction[];
|
|
42
|
-
watched: boolean;
|
|
43
46
|
updated: boolean;
|
|
47
|
+
watchers: IWatcher[];
|
|
44
48
|
}
|
|
45
49
|
export declare const Message: import("mongoose").Model<ImessageDoc, {}, {}, {}, import("mongoose").Document<unknown, {}, ImessageDoc> & ImessageDoc & {
|
|
46
50
|
_id: Types.ObjectId;
|
|
@@ -7,6 +7,10 @@ const reactionSchema = new mongoose_1.Schema({
|
|
|
7
7
|
type: { type: String, required: true },
|
|
8
8
|
user: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.user, required: true },
|
|
9
9
|
});
|
|
10
|
+
const watcherSchema = new mongoose_1.Schema({
|
|
11
|
+
user: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.user, required: true },
|
|
12
|
+
watched: { type: Boolean, default: false },
|
|
13
|
+
});
|
|
10
14
|
exports.Message = (0, mongoose_1.model)(model_names_1.MODELS.messages, new mongoose_1.Schema({
|
|
11
15
|
sender: {
|
|
12
16
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
@@ -23,6 +27,7 @@ exports.Message = (0, mongoose_1.model)(model_names_1.MODELS.messages, new mongo
|
|
|
23
27
|
default: null,
|
|
24
28
|
},
|
|
25
29
|
reactions: [reactionSchema],
|
|
30
|
+
watchers: [watcherSchema],
|
|
26
31
|
media: [
|
|
27
32
|
{
|
|
28
33
|
type: {
|
|
@@ -35,10 +40,6 @@ exports.Message = (0, mongoose_1.model)(model_names_1.MODELS.messages, new mongo
|
|
|
35
40
|
},
|
|
36
41
|
},
|
|
37
42
|
],
|
|
38
|
-
watched: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
default: false,
|
|
41
|
-
},
|
|
42
43
|
updated: {
|
|
43
44
|
type: Boolean,
|
|
44
45
|
default: false,
|
|
@@ -21,5 +21,5 @@ exports.Producer = (0, mongoose_1.model)(model_names_1.MODELS.producer, new mong
|
|
|
21
21
|
minBudget: { type: Number, default: null },
|
|
22
22
|
maxBudget: { type: Number, default: null },
|
|
23
23
|
searchKeywords: [String],
|
|
24
|
-
platforms: [{ type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.producerPlatforms }]
|
|
24
|
+
platforms: [{ type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.producerPlatforms }],
|
|
25
25
|
}, { timestamps: true, collection: model_names_1.MODELS.producer }));
|
|
@@ -5,10 +5,14 @@ const mongoose_1 = require("mongoose");
|
|
|
5
5
|
const model_names_1 = require("../types/model-names");
|
|
6
6
|
exports.ProducerPlatform = (0, mongoose_1.model)(model_names_1.MODELS.producerPlatforms, new mongoose_1.Schema({
|
|
7
7
|
name: { ar: { type: String, default: null }, en: { type: String, default: null } },
|
|
8
|
-
image: String
|
|
9
|
-
}, {
|
|
8
|
+
image: String,
|
|
9
|
+
}, {
|
|
10
|
+
timestamps: true,
|
|
11
|
+
collection: model_names_1.MODELS.producerPlatforms,
|
|
12
|
+
toJSON: {
|
|
10
13
|
transform(doc, ret) {
|
|
11
14
|
if (ret.image)
|
|
12
15
|
ret.image = process.env.BUCKET_HOST + '/' + ret.image;
|
|
13
|
-
}
|
|
14
|
-
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
}));
|
|
@@ -25,7 +25,7 @@ exports.Rentals = (0, mongoose_1.model)('rentals', new mongoose_1.Schema({
|
|
|
25
25
|
location: { lat: Number, lng: Number },
|
|
26
26
|
address: String,
|
|
27
27
|
searchKeywords: [String],
|
|
28
|
-
insurance: Number,
|
|
28
|
+
insurance: { type: Number, default: null },
|
|
29
29
|
showOnHome: { type: Boolean, default: true },
|
|
30
30
|
projectScale: {
|
|
31
31
|
unit: { type: String, enum: RentalUnits },
|
|
@@ -92,5 +92,5 @@ exports.TeamContract = (0, mongoose_1.model)('team_contracts', new mongoose_1.Sc
|
|
|
92
92
|
cycle: { type: String, default: cycles_1.CYCLES.teamProject },
|
|
93
93
|
paymentAmount: { type: Number, default: 0 },
|
|
94
94
|
attachments: [String],
|
|
95
|
-
totalCheckoutAt: Date
|
|
95
|
+
totalCheckoutAt: Date,
|
|
96
96
|
}, { timestamps: true, collection: 'team_contracts' }));
|
package/build/types/User.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@duvdu-v1/duvdu",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"main": "./build/index.js",
|
|
5
|
-
"types": "./build/index.d.ts",
|
|
6
|
-
"files": [
|
|
7
|
-
"build/**/*"
|
|
8
|
-
],
|
|
9
|
-
"scripts": {
|
|
10
|
-
"clean": "rimraf ./build",
|
|
11
|
-
"build": "npm run clean && tsc",
|
|
12
|
-
"fix:build": "mv ./build/common/src/* ./build && rm -rf ./build/auth ./build/common",
|
|
13
|
-
"pub": "git add . && git commit -m \"updates\" && npm version patch && npm run build && npm publish",
|
|
14
|
-
"lint": "eslint .",
|
|
15
|
-
"lint:fix": "eslint --fix .",
|
|
16
|
-
"format": "prettier --write ."
|
|
17
|
-
},
|
|
18
|
-
"keywords": [],
|
|
19
|
-
"author": "motemed khaled",
|
|
20
|
-
"license": "ISC",
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"@types/express": "^4.17.21",
|
|
23
|
-
"@types/express-session": "^1.18.0",
|
|
24
|
-
"@types/jsonwebtoken": "^9.0.5",
|
|
25
|
-
"@types/multer": "^1.4.11",
|
|
26
|
-
"@types/node": "^20.11.0",
|
|
27
|
-
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
28
|
-
"@typescript-eslint/parser": "^6.19.0",
|
|
29
|
-
"aws-sdk": "^2.1595.0",
|
|
30
|
-
"connect-redis": "^7.1.1",
|
|
31
|
-
"express": "^4.18.2",
|
|
32
|
-
"express-async-errors": "^3.1.1",
|
|
33
|
-
"express-session": "^1.18.0",
|
|
34
|
-
"express-validator": "^7.0.1",
|
|
35
|
-
"jsonwebtoken": "^9.0.2",
|
|
36
|
-
"mongoose": "^8.0.4",
|
|
37
|
-
"multer": "^1.4.5-lts.1",
|
|
38
|
-
"node-nats-streaming": "^0.3.2",
|
|
39
|
-
"redis": "^4.6.13",
|
|
40
|
-
"rimraf": "^5.0.5",
|
|
41
|
-
"typescript": "^5.3.3",
|
|
42
|
-
"uuid": "^9.0.1",
|
|
43
|
-
"winston": "^3.13.0",
|
|
44
|
-
"winston-daily-rotate-file": "^5.0.0"
|
|
45
|
-
},
|
|
46
|
-
"devDependencies": {
|
|
47
|
-
"@types/uuid": "^9.0.8",
|
|
48
|
-
"del-cli": "^5.1.0",
|
|
49
|
-
"eslint": "^8.56.0",
|
|
50
|
-
"eslint-config-prettier": "^9.1.0",
|
|
51
|
-
"eslint-plugin-import": "^2.29.1",
|
|
52
|
-
"eslint-plugin-prettier": "^5.1.3",
|
|
53
|
-
"prettier": "^3.2.4"
|
|
54
|
-
},
|
|
55
|
-
"description": ""
|
|
56
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@duvdu-v1/duvdu",
|
|
3
|
+
"version": "1.1.188",
|
|
4
|
+
"main": "./build/index.js",
|
|
5
|
+
"types": "./build/index.d.ts",
|
|
6
|
+
"files": [
|
|
7
|
+
"build/**/*"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"clean": "rimraf ./build",
|
|
11
|
+
"build": "npm run clean && tsc",
|
|
12
|
+
"fix:build": "mv ./build/common/src/* ./build && rm -rf ./build/auth ./build/common",
|
|
13
|
+
"pub": "git add . && git commit -m \"updates\" && npm version patch && npm run build && npm publish",
|
|
14
|
+
"lint": "eslint .",
|
|
15
|
+
"lint:fix": "eslint --fix .",
|
|
16
|
+
"format": "prettier --write ."
|
|
17
|
+
},
|
|
18
|
+
"keywords": [],
|
|
19
|
+
"author": "motemed khaled",
|
|
20
|
+
"license": "ISC",
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@types/express": "^4.17.21",
|
|
23
|
+
"@types/express-session": "^1.18.0",
|
|
24
|
+
"@types/jsonwebtoken": "^9.0.5",
|
|
25
|
+
"@types/multer": "^1.4.11",
|
|
26
|
+
"@types/node": "^20.11.0",
|
|
27
|
+
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
28
|
+
"@typescript-eslint/parser": "^6.19.0",
|
|
29
|
+
"aws-sdk": "^2.1595.0",
|
|
30
|
+
"connect-redis": "^7.1.1",
|
|
31
|
+
"express": "^4.18.2",
|
|
32
|
+
"express-async-errors": "^3.1.1",
|
|
33
|
+
"express-session": "^1.18.0",
|
|
34
|
+
"express-validator": "^7.0.1",
|
|
35
|
+
"jsonwebtoken": "^9.0.2",
|
|
36
|
+
"mongoose": "^8.0.4",
|
|
37
|
+
"multer": "^1.4.5-lts.1",
|
|
38
|
+
"node-nats-streaming": "^0.3.2",
|
|
39
|
+
"redis": "^4.6.13",
|
|
40
|
+
"rimraf": "^5.0.5",
|
|
41
|
+
"typescript": "^5.3.3",
|
|
42
|
+
"uuid": "^9.0.1",
|
|
43
|
+
"winston": "^3.13.0",
|
|
44
|
+
"winston-daily-rotate-file": "^5.0.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/uuid": "^9.0.8",
|
|
48
|
+
"del-cli": "^5.1.0",
|
|
49
|
+
"eslint": "^8.56.0",
|
|
50
|
+
"eslint-config-prettier": "^9.1.0",
|
|
51
|
+
"eslint-plugin-import": "^2.29.1",
|
|
52
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
53
|
+
"prettier": "^3.2.4"
|
|
54
|
+
},
|
|
55
|
+
"description": ""
|
|
56
|
+
}
|