@duvdu-v1/duvdu 1.1.116 → 1.1.118

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
@@ -69,6 +69,7 @@ export * from './models/all-contracts.model';
69
69
  export * from './services/category.service';
70
70
  export * from './services/projectView.service';
71
71
  export * from './types/notification.type';
72
+ export * from './types/notification_details';
72
73
  export * from './events/new-notification.event';
73
74
  export * from './events/base-listener';
74
75
  export * from './events/base-publisher';
package/build/index.js CHANGED
@@ -86,6 +86,7 @@ __exportStar(require("./models/all-contracts.model"), exports);
86
86
  __exportStar(require("./services/category.service"), exports);
87
87
  __exportStar(require("./services/projectView.service"), exports);
88
88
  __exportStar(require("./types/notification.type"), exports);
89
+ __exportStar(require("./types/notification_details"), exports);
89
90
  // events
90
91
  __exportStar(require("./events/new-notification.event"), exports);
91
92
  __exportStar(require("./events/base-listener"), exports);
@@ -5,8 +5,8 @@ const multer_1 = require("multer");
5
5
  const custom_error_1 = require("../errors/custom-error");
6
6
  // eslint-disable-next-line
7
7
  const globalErrorHandlingMiddleware = (err, req, res, next) => {
8
- if (process.env.NODE_ENV === 'development')
9
- console.log(err);
8
+ // if (process.env.NODE_ENV === 'development') console.log(err);
9
+ console.log(err);
10
10
  // custom error
11
11
  if (err instanceof custom_error_1.CustomError) {
12
12
  return res.status(err.statusCode).json({ errors: err.serializeError() });
@@ -23,7 +23,7 @@
23
23
  /// <reference types="mongoose/types/virtuals" />
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  import { Iuser } from '@duvdu-v1/duvdu';
26
- import { Types, Schema } from 'mongoose';
26
+ import { Types } from 'mongoose';
27
27
  export interface Icontract {
28
28
  id: string;
29
29
  customer: Types.ObjectId | Iuser;
@@ -31,38 +31,6 @@ export interface Icontract {
31
31
  contract: Types.ObjectId;
32
32
  ref: string;
33
33
  }
34
- export declare const Contracts: import("mongoose").Model<{
35
- ref?: string | null | undefined;
36
- customer?: Types.ObjectId | null | undefined;
37
- sp?: Types.ObjectId | null | undefined;
38
- contract?: Types.ObjectId | null | undefined;
39
- }, {}, {}, {}, import("mongoose").Document<unknown, {}, {
40
- ref?: string | null | undefined;
41
- customer?: Types.ObjectId | null | undefined;
42
- sp?: Types.ObjectId | null | undefined;
43
- contract?: Types.ObjectId | null | undefined;
44
- }> & {
45
- ref?: string | null | undefined;
46
- customer?: Types.ObjectId | null | undefined;
47
- sp?: Types.ObjectId | null | undefined;
48
- contract?: Types.ObjectId | null | undefined;
49
- } & {
34
+ export declare const Contracts: import("mongoose").Model<Icontract, {}, {}, {}, import("mongoose").Document<unknown, {}, Icontract> & Icontract & {
50
35
  _id: Types.ObjectId;
51
- }, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
52
- ref?: string | null | undefined;
53
- customer?: Types.ObjectId | null | undefined;
54
- sp?: Types.ObjectId | null | undefined;
55
- contract?: Types.ObjectId | null | undefined;
56
- }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
57
- ref?: string | null | undefined;
58
- customer?: Types.ObjectId | null | undefined;
59
- sp?: Types.ObjectId | null | undefined;
60
- contract?: Types.ObjectId | null | undefined;
61
- }>> & import("mongoose").FlatRecord<{
62
- ref?: string | null | undefined;
63
- customer?: Types.ObjectId | null | undefined;
64
- sp?: Types.ObjectId | null | undefined;
65
- contract?: Types.ObjectId | null | undefined;
66
- }> & {
67
- _id: Types.ObjectId;
68
- }>>;
36
+ }, any>;
@@ -1,4 +1,6 @@
1
1
  export declare enum NotificationType {
2
2
  new_message = "new_message",
3
- new_follower = "new_follower"
3
+ new_follower = "new_follower",
4
+ new_producer_contract = "new_producer_contract",
5
+ updated_producer_contract = "updated_producer_contract"
4
6
  }
@@ -5,4 +5,6 @@ var NotificationType;
5
5
  (function (NotificationType) {
6
6
  NotificationType["new_message"] = "new_message";
7
7
  NotificationType["new_follower"] = "new_follower";
8
+ NotificationType["new_producer_contract"] = "new_producer_contract";
9
+ NotificationType["updated_producer_contract"] = "updated_producer_contract";
8
10
  })(NotificationType || (exports.NotificationType = NotificationType = {}));
@@ -0,0 +1,22 @@
1
+ export declare const NotificationDetails: {
2
+ newFollow: {
3
+ title: string;
4
+ message: string;
5
+ };
6
+ newMessage: {
7
+ title: string;
8
+ message: string;
9
+ };
10
+ messageUpdated: {
11
+ title: string;
12
+ message: string;
13
+ };
14
+ newProducerContract: {
15
+ title: string;
16
+ message: string;
17
+ };
18
+ updatedProducerContract: {
19
+ title: string;
20
+ message: string;
21
+ };
22
+ };
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotificationDetails = void 0;
4
+ exports.NotificationDetails = {
5
+ newFollow: {
6
+ title: 'new follow',
7
+ message: 'new follow'
8
+ },
9
+ newMessage: {
10
+ title: 'new message',
11
+ message: 'new message'
12
+ },
13
+ messageUpdated: {
14
+ title: 'updated message',
15
+ message: 'updated message'
16
+ },
17
+ newProducerContract: {
18
+ title: 'new producer contract',
19
+ message: 'new producer contract'
20
+ },
21
+ updatedProducerContract: {
22
+ title: 'update producer contract',
23
+ message: 'update producer contract'
24
+ }
25
+ };
@@ -1,4 +1,6 @@
1
1
  export declare enum Channels {
2
2
  new_message = "new_message",
3
- new_follower = "new_follower"
3
+ new_follower = "new_follower",
4
+ new_producer_contract = "new_producer_contract",
5
+ updated_producer_contract = "updated_producer_contract"
4
6
  }
@@ -5,4 +5,6 @@ var Channels;
5
5
  (function (Channels) {
6
6
  Channels["new_message"] = "new_message";
7
7
  Channels["new_follower"] = "new_follower";
8
+ Channels["new_producer_contract"] = "new_producer_contract";
9
+ Channels["updated_producer_contract"] = "updated_producer_contract";
8
10
  })(Channels || (exports.Channels = Channels = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duvdu-v1/duvdu",
3
- "version": "1.1.116",
3
+ "version": "1.1.118",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [
@@ -19,7 +19,7 @@
19
19
  "author": "motemed khaled",
20
20
  "license": "ISC",
21
21
  "dependencies": {
22
- "@duvdu-v1/duvdu": "^1.1.4",
22
+ "@duvdu-v1/duvdu": "^1.1.116",
23
23
  "@types/express": "^4.17.21",
24
24
  "@types/express-session": "^1.18.0",
25
25
  "@types/jsonwebtoken": "^9.0.5",