@duvdu-v1/duvdu 1.1.186 → 1.1.187

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.
@@ -21,7 +21,8 @@ const uploadProjectMedia = (folder) => (0, multer_1.default)({
21
21
  file.mimetype.startsWith('video') ||
22
22
  file.mimetype === 'application/pdf' ||
23
23
  file.mimetype === 'audio/mpeg' ||
24
- file.mimetype === 'audio/wav')
24
+ file.mimetype === 'audio/wav' ||
25
+ file.mimetype === 'audio/x-wav')
25
26
  return callback(null, true);
26
27
  return callback(new bad_request_error_1.BadRequestError('invalid file format'));
27
28
  },
@@ -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
- categories: [{ type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.category, default: null }],
41
+ category: { 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 },
@@ -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: { type: Number, default: null },
28
+ insurance: Number,
29
29
  showOnHome: { type: Boolean, default: true },
30
30
  projectScale: {
31
31
  unit: { type: String, enum: RentalUnits },
@@ -86,4 +86,5 @@ export declare const permissions: {
86
86
  setting: PERMISSIONS[];
87
87
  producer: PERMISSIONS[];
88
88
  dashboard: PERMISSIONS[];
89
+ producerPlatform: PERMISSIONS[];
89
90
  };
@@ -168,4 +168,9 @@ exports.permissions = {
168
168
  ],
169
169
  producer: [PERMISSIONS.getProducerAnalysis],
170
170
  dashboard: [PERMISSIONS.accessDashboard],
171
+ producerPlatform: [
172
+ PERMISSIONS.getProducerAnalysis,
173
+ PERMISSIONS.createPlatform,
174
+ PERMISSIONS.updatePlatform,
175
+ ]
171
176
  };
@@ -64,7 +64,7 @@ export interface Iuser {
64
64
  type: 'Point';
65
65
  coordinates: [number, number];
66
66
  };
67
- categories?: (Types.ObjectId | Icategory)[];
67
+ category?: Types.ObjectId | Icategory;
68
68
  acceptedProjectsCounter: number;
69
69
  profileViews: number;
70
70
  about?: string;
package/package.json CHANGED
@@ -1,56 +1,56 @@
1
- {
2
- "name": "@duvdu-v1/duvdu",
3
- "version": "1.1.186",
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.187",
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
+ }