@armi-wave/common 1.23.4 → 1.23.5

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.
@@ -14,5 +14,5 @@ declare global {
14
14
  }
15
15
  }
16
16
  }
17
- export declare const currentUser: (req: Request, res: Response, next: NextFunction) => any;
17
+ export declare const currentUser: (req: Request, res: Response, next: NextFunction) => void;
18
18
  export {};
@@ -1,2 +1,2 @@
1
1
  import { Request, Response, NextFunction } from 'express';
2
- export declare const errorHandler: (err: Error, req: Request, res: Response, next: NextFunction) => any;
2
+ export declare const errorHandler: (err: Error, req: Request, res: Response, next: NextFunction) => Response<any, Record<string, any>> | undefined;
@@ -1,7 +1,7 @@
1
1
  import mongoose, { Document, Model } from 'mongoose';
2
2
  interface Follow extends Document {
3
- follower: mongoose.Types.ObjectId;
4
- following: mongoose.Types.ObjectId;
3
+ followerId: mongoose.Types.ObjectId;
4
+ followingId: mongoose.Types.ObjectId;
5
5
  createdAt: Date;
6
6
  }
7
7
  interface FollowModel extends Model<Follow> {
@@ -36,13 +36,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  const mongoose_1 = __importStar(require("mongoose"));
37
37
  // Define the schema
38
38
  const followSchema = new mongoose_1.Schema({
39
- follower: {
39
+ followerId: {
40
40
  type: mongoose_1.Schema.Types.ObjectId,
41
41
  ref: 'User',
42
42
  required: true,
43
43
  index: true,
44
44
  },
45
- following: {
45
+ followingId: {
46
46
  type: mongoose_1.Schema.Types.ObjectId,
47
47
  ref: 'User',
48
48
  required: true,
@@ -59,7 +59,7 @@ const followSchema = new mongoose_1.Schema({
59
59
  },
60
60
  });
61
61
  // Ensure a user cannot follow the same person multiple times
62
- followSchema.index({ follower: 1, following: 1 }, { unique: true });
62
+ followSchema.index({ followerId: 1, followingId: 1 }, { unique: true });
63
63
  // Create and export the model
64
64
  const Follow = mongoose_1.default.model('Follow', followSchema);
65
65
  exports.default = Follow;
@@ -1,3 +1,4 @@
1
- declare const minioClient: any;
1
+ import { Client } from 'minio';
2
+ declare const minioClient: Client;
2
3
  declare const ensureBucketExists: (bucketName: string) => Promise<void>;
3
4
  export { minioClient, ensureBucketExists };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@armi-wave/common",
3
- "version": "1.23.4",
3
+ "version": "1.23.5",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -16,14 +16,10 @@
16
16
  "author": "Armiron Kurbalaj",
17
17
  "license": "ISC",
18
18
  "dependencies": {
19
- "@types/multer": "^1.4.12",
20
- "express": "^4.18.1",
21
- "express-validator": "^6.14.2",
22
- "jsonwebtoken": "^8.5.1",
19
+ "express": "^4.21.2",
20
+ "express-validator": "^7.2.1",
21
+ "jsonwebtoken": "^9.0.2",
23
22
  "minio": "^8.0.4",
24
23
  "multer": "^1.4.5-lts.1"
25
- },
26
- "devDependencies": {
27
- "@types/jsonwebtoken": "^9.0.8"
28
24
  }
29
25
  }