@duvdu-v1/duvdu 1.1.72 → 1.1.74

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/index.d.ts CHANGED
@@ -28,7 +28,6 @@ export * from './types/model-names';
28
28
  export * from './types/systemRoles';
29
29
  export * from './types/Bookmarks';
30
30
  export * from './types/Category';
31
- export * from './types/Follow';
32
31
  export * from './types/Pagination';
33
32
  export * from './types/Plan';
34
33
  export * from './types/Projects';
@@ -62,7 +61,9 @@ export * from './models/notification.model';
62
61
  export * from './models/teamProject.model';
63
62
  export * from './models/contracts.model';
64
63
  export * from './models/producer.model';
64
+ export * from './models/follow.model';
65
65
  export * from './services/category.service';
66
+ export * from './types/notification.type';
66
67
  export * from './events/new-notification.event';
67
68
  export * from './events/nats-wrapper';
68
69
  export * from './events/base-listener';
package/build/index.js CHANGED
@@ -44,7 +44,6 @@ __exportStar(require("./types/model-names"), exports);
44
44
  __exportStar(require("./types/systemRoles"), exports);
45
45
  __exportStar(require("./types/Bookmarks"), exports);
46
46
  __exportStar(require("./types/Category"), exports);
47
- __exportStar(require("./types/Follow"), exports);
48
47
  __exportStar(require("./types/Pagination"), exports);
49
48
  __exportStar(require("./types/Plan"), exports);
50
49
  __exportStar(require("./types/Projects"), exports);
@@ -78,7 +77,9 @@ __exportStar(require("./models/notification.model"), exports);
78
77
  __exportStar(require("./models/teamProject.model"), exports);
79
78
  __exportStar(require("./models/contracts.model"), exports);
80
79
  __exportStar(require("./models/producer.model"), exports);
80
+ __exportStar(require("./models/follow.model"), exports);
81
81
  __exportStar(require("./services/category.service"), exports);
82
+ __exportStar(require("./types/notification.type"), exports);
82
83
  // events
83
84
  __exportStar(require("./events/new-notification.event"), exports);
84
85
  __exportStar(require("./events/nats-wrapper"), exports);
@@ -38,6 +38,10 @@ const userSchema = new mongoose_1.Schema({
38
38
  type: String,
39
39
  default: null,
40
40
  },
41
+ followCount: {
42
+ followers: { type: Number, default: 0 },
43
+ following: { type: Number, default: 0 },
44
+ }
41
45
  }, {
42
46
  timestamps: true,
43
47
  collection: model_names_1.MODELS.user,
@@ -23,8 +23,11 @@
23
23
  /// <reference types="mongoose/types/virtuals" />
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  import { Types } from 'mongoose';
26
- import { Iuser } from './User';
26
+ import { Iuser } from '../types/User';
27
27
  export interface Ifollow {
28
- sourceUser: Types.ObjectId | Iuser;
29
- targetUser: Types.ObjectId | Iuser;
28
+ follower: Types.ObjectId | Iuser;
29
+ following: Types.ObjectId | Iuser;
30
30
  }
31
+ export declare const Follow: import("mongoose").Model<Ifollow, {}, {}, {}, import("mongoose").Document<unknown, {}, Ifollow> & Ifollow & {
32
+ _id: Types.ObjectId;
33
+ }, any>;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Follow = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const model_names_1 = require("../types/model-names");
6
+ exports.Follow = (0, mongoose_1.model)(model_names_1.MODELS.follow, new mongoose_1.Schema({
7
+ follower: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.user },
8
+ following: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.user }
9
+ }, { timestamps: true, collection: model_names_1.MODELS.follow }));
@@ -20,5 +20,6 @@ export declare enum MODELS {
20
20
  teamProjectBooking = "teamProjects-booking",
21
21
  contracts = "contracts",
22
22
  producer = "producers",
23
- producerBooking = "producer-booking"
23
+ producerBooking = "producer-booking",
24
+ follow = "follow"
24
25
  }
@@ -25,4 +25,5 @@ var MODELS;
25
25
  MODELS["contracts"] = "contracts";
26
26
  MODELS["producer"] = "producers";
27
27
  MODELS["producerBooking"] = "producer-booking";
28
+ MODELS["follow"] = "follow";
28
29
  })(MODELS || (exports.MODELS = MODELS = {}));
@@ -0,0 +1,3 @@
1
+ export declare enum NotificationType {
2
+ new_message = "new_message"
3
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotificationType = void 0;
4
+ var NotificationType;
5
+ (function (NotificationType) {
6
+ NotificationType["new_message"] = "new_message";
7
+ })(NotificationType || (exports.NotificationType = NotificationType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duvdu-v1/duvdu",
3
- "version": "1.1.72",
3
+ "version": "1.1.74",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });