easywork-common-lib 1.0.488 → 1.0.490

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.
@@ -13,6 +13,13 @@ export declare enum NotificationSubcategory {
13
13
  TASK_APPROVED = "task-approved",
14
14
  TASK_REJECTED = "task-rejected",
15
15
  TASK_UPDATED = "task-updated",
16
+ POLIZA_NEW = "poliza-new",
17
+ POLIZA_RENEW = "poliza-renew",
18
+ POLIZA_EXPIRE = "poliza-expire",
19
+ POLIZA_REJECT = "poliza-reject",
20
+ POLIZA_CANCELLED = "poliza-cancelled",
21
+ POLIZA_UPDATED = "poliza-updated",
22
+ POLIZA_NEW_COMMENT = "poliza-new-comment",
16
23
  CONTACT_NEW_COMMENT = "contact-new-comment",
17
24
  OTP = "otp",
18
25
  DEFAULT = "default"
@@ -28,5 +35,6 @@ export declare enum NotificationCategory {
28
35
  CALENDAR = "calendar",
29
36
  TOOLS = "tools",
30
37
  INFO = "info",
38
+ POLIZA = "poliza",
31
39
  DEFAULT = "default"
32
40
  }
@@ -18,6 +18,13 @@ var NotificationSubcategory;
18
18
  NotificationSubcategory["TASK_APPROVED"] = "task-approved";
19
19
  NotificationSubcategory["TASK_REJECTED"] = "task-rejected";
20
20
  NotificationSubcategory["TASK_UPDATED"] = "task-updated";
21
+ NotificationSubcategory["POLIZA_NEW"] = "poliza-new";
22
+ NotificationSubcategory["POLIZA_RENEW"] = "poliza-renew";
23
+ NotificationSubcategory["POLIZA_EXPIRE"] = "poliza-expire";
24
+ NotificationSubcategory["POLIZA_REJECT"] = "poliza-reject";
25
+ NotificationSubcategory["POLIZA_CANCELLED"] = "poliza-cancelled";
26
+ NotificationSubcategory["POLIZA_UPDATED"] = "poliza-updated";
27
+ NotificationSubcategory["POLIZA_NEW_COMMENT"] = "poliza-new-comment";
21
28
  NotificationSubcategory["CONTACT_NEW_COMMENT"] = "contact-new-comment";
22
29
  NotificationSubcategory["OTP"] = "otp";
23
30
  NotificationSubcategory["DEFAULT"] = "default";
@@ -34,6 +41,7 @@ var NotificationCategory;
34
41
  NotificationCategory["CALENDAR"] = "calendar";
35
42
  NotificationCategory["TOOLS"] = "tools";
36
43
  NotificationCategory["INFO"] = "info";
44
+ NotificationCategory["POLIZA"] = "poliza";
37
45
  NotificationCategory["DEFAULT"] = "default";
38
46
  })(NotificationCategory || (exports.NotificationCategory = NotificationCategory = {}));
39
47
  //# sourceMappingURL=notification.enum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification.enum.js","sourceRoot":"","sources":["../../../src/common/enums/notification.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC3B,sCAAe,CAAA;IACf,kCAAW,CAAA;IACX,oCAAa,CAAA;IACb,kCAAW,CAAA;AACf,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B;AAED,IAAY,uBAYX;AAZD,WAAY,uBAAuB;IAC/B,gDAAqB,CAAA;IACrB,2DAAgC,CAAA;IAChC,wDAA6B,CAAA;IAC7B,0DAA+B,CAAA;IAC/B,gEAAqC,CAAA;IACrC,0DAA+B,CAAA;IAC/B,0DAA+B,CAAA;IAC/B,wDAA6B,CAAA;IAC7B,sEAA2C,CAAA;IAC3C,sCAAW,CAAA;IACX,8CAAmB,CAAA;AACvB,CAAC,EAZW,uBAAuB,uCAAvB,uBAAuB,QAYlC;AAED,IAAY,oBAYX;AAZD,WAAY,oBAAoB;IAC5B,qCAAa,CAAA;IACb,mCAAW,CAAA;IACX,mCAAW,CAAA;IACX,2CAAmB,CAAA;IACnB,uCAAe,CAAA;IACf,uCAAe,CAAA;IACf,uCAAe,CAAA;IACf,6CAAqB,CAAA;IACrB,uCAAe,CAAA;IACf,qCAAa,CAAA;IACb,2CAAmB,CAAA;AACvB,CAAC,EAZW,oBAAoB,oCAApB,oBAAoB,QAY/B"}
1
+ {"version":3,"file":"notification.enum.js","sourceRoot":"","sources":["../../../src/common/enums/notification.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC3B,sCAAe,CAAA;IACf,kCAAW,CAAA;IACX,oCAAa,CAAA;IACb,kCAAW,CAAA;AACf,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B;AAED,IAAY,uBAqBX;AArBD,WAAY,uBAAuB;IAC/B,gDAAqB,CAAA;IACrB,2DAAgC,CAAA;IAChC,wDAA6B,CAAA;IAC7B,0DAA+B,CAAA;IAC/B,gEAAqC,CAAA;IACrC,0DAA+B,CAAA;IAC/B,0DAA+B,CAAA;IAC/B,wDAA6B,CAAA;IAE7B,oDAAyB,CAAA;IACzB,wDAA6B,CAAA;IAC7B,0DAA+B,CAAA;IAC/B,0DAA+B,CAAA;IAC/B,gEAAqC,CAAA;IACrC,4DAAiC,CAAA;IACjC,oEAAyC,CAAA;IAEzC,sEAA2C,CAAA;IAC3C,sCAAW,CAAA;IACX,8CAAmB,CAAA;AACvB,CAAC,EArBW,uBAAuB,uCAAvB,uBAAuB,QAqBlC;AAED,IAAY,oBAaX;AAbD,WAAY,oBAAoB;IAC5B,qCAAa,CAAA;IACb,mCAAW,CAAA;IACX,mCAAW,CAAA;IACX,2CAAmB,CAAA;IACnB,uCAAe,CAAA;IACf,uCAAe,CAAA;IACf,uCAAe,CAAA;IACf,6CAAqB,CAAA;IACrB,uCAAe,CAAA;IACf,qCAAa,CAAA;IACb,yCAAiB,CAAA;IACjB,2CAAmB,CAAA;AACvB,CAAC,EAbW,oBAAoB,oCAApB,oBAAoB,QAa/B"}
@@ -24,8 +24,7 @@ interface DeleteData {
24
24
  export declare class EasyEventService {
25
25
  private readonly amqpConnection;
26
26
  private readonly exchangeName;
27
- private readonly routingKey;
28
- constructor(amqpConnection: AmqpConnection, exchangeName: string, routingKey: string);
27
+ constructor(amqpConnection: AmqpConnection, exchangeName: string);
29
28
  createEvent(data: GeneralData): Promise<void>;
30
29
  updateEvent(data: GeneralData): Promise<void>;
31
30
  deleteEvent(data: DeleteData): Promise<void>;
@@ -19,30 +19,27 @@ const logger = new common_1.Logger("EasyEventService");
19
19
  let EasyEventService = class EasyEventService {
20
20
  amqpConnection;
21
21
  exchangeName;
22
- routingKey;
23
- constructor(amqpConnection, exchangeName, routingKey) {
22
+ constructor(amqpConnection, exchangeName) {
24
23
  this.amqpConnection = amqpConnection;
25
24
  this.exchangeName = exchangeName;
26
- this.routingKey = routingKey;
27
25
  }
28
26
  async createEvent(data) {
29
- logger.debug(`Creating a new event...`, this.exchangeName, this.routingKey);
30
- await this.amqpConnection.publish(this.exchangeName, this.routingKey, data);
27
+ logger.debug(`Creating a new event...`, this.exchangeName, "event.create");
28
+ await this.amqpConnection.publish(this.exchangeName, "event.create", data);
31
29
  }
32
30
  async updateEvent(data) {
33
- logger.debug(`Updating event...`, this.exchangeName, this.routingKey);
34
- await this.amqpConnection.publish(this.exchangeName, this.routingKey, data);
31
+ logger.debug(`Updating event...`, this.exchangeName, "event.update");
32
+ await this.amqpConnection.publish(this.exchangeName, "event.update", data);
35
33
  }
36
34
  async deleteEvent(data) {
37
- logger.debug(`Deleting event...`, this.exchangeName, this.routingKey);
38
- await this.amqpConnection.publish(this.exchangeName, this.routingKey, data);
35
+ logger.debug(`Deleting event...`, this.exchangeName, "event.delete");
36
+ await this.amqpConnection.publish(this.exchangeName, "event.delete", data);
39
37
  }
40
38
  };
41
39
  exports.EasyEventService = EasyEventService;
42
40
  exports.EasyEventService = EasyEventService = __decorate([
43
41
  (0, common_1.Injectable)(),
44
42
  __param(1, (0, common_1.Inject)("EXCHANGE_NAME")),
45
- __param(2, (0, common_1.Inject)("EVENT_ROUTING_KEY")),
46
- __metadata("design:paramtypes", [nestjs_rabbitmq_1.AmqpConnection, String, String])
43
+ __metadata("design:paramtypes", [nestjs_rabbitmq_1.AmqpConnection, String])
47
44
  ], EasyEventService);
48
45
  //# sourceMappingURL=event.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"event.service.js","sourceRoot":"","sources":["../../../src/modules/queue/event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D5B,IAAA,mBAAU,GAAE;IAIR,WAAA,IAAA,eAAM,EAAC,eAAe,CAAC,CAAA;qCADS,gCAAc;GAFtC,gBAAgB,CAoB5B"}
package/package.json CHANGED
@@ -1,45 +1,45 @@
1
- {
2
- "name": "easywork-common-lib",
3
- "version": "1.0.488",
4
- "description": "Librería común de Easywork",
5
- "main": "dist/index.js",
6
- "scripts": {
7
- "build": "tsc && cpx-fixed src/**/*.proto dist/",
8
- "bump": "sh ./scripts/bump.sh",
9
- "bump-win": "cross-env ./scripts/bump.sh"
10
- },
11
- "repository": {
12
- "type": "git",
13
- "url": "git+https://github.com/blindariesgos/easywork-common-lib.git"
14
- },
15
- "keywords": [
16
- "nodejs"
17
- ],
18
- "author": "Rosmer Campos",
19
- "license": "MIT",
20
- "bugs": {
21
- "url": "https://github.com/blindariesgos/easywork-common-lib/issues"
22
- },
23
- "homepage": "https://github.com/blindariesgos/easywork-common-lib#readme",
24
- "dependencies": {
25
- "@golevelup/nestjs-rabbitmq": "^5.3.0",
26
- "@nestjs/common": "^10.3.8",
27
- "@nestjs/swagger": "^7.4.0",
28
- "@nestjs/typeorm": "^10.0.2",
29
- "class-transformer": "^0.5.1",
30
- "class-validator": "^0.14.1",
31
- "googleapis": "^144.0.0",
32
- "nanoid": "3",
33
- "rxjs": "^7.8.1",
34
- "sharp": "^0.33.5",
35
- "typeorm": "^0.3.20"
36
- },
37
- "devDependencies": {
38
- "@rubiin/tsconfig": "^1.1.2",
39
- "@types/node": "^20.12.12",
40
- "cpx-fixed": "^1.6.0",
41
- "ts-loader": "^9.5.1",
42
- "typescript": "^5.4.5"
43
- },
44
- "packageManager": "pnpm@9.12.2+sha512.22721b3a11f81661ae1ec68ce1a7b879425a1ca5b991c975b074ac220b187ce56c708fe5db69f4c962c989452eee76c82877f4ee80f474cebd61ee13461b6228"
45
- }
1
+ {
2
+ "name": "easywork-common-lib",
3
+ "version": "1.0.490",
4
+ "description": "Librería común de Easywork",
5
+ "main": "dist/index.js",
6
+ "scripts": {
7
+ "build": "tsc && cpx-fixed src/**/*.proto dist/",
8
+ "bump": "sh ./scripts/bump.sh",
9
+ "bump-win": "cross-env ./scripts/bump.sh"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/blindariesgos/easywork-common-lib.git"
14
+ },
15
+ "keywords": [
16
+ "nodejs"
17
+ ],
18
+ "author": "Rosmer Campos",
19
+ "license": "MIT",
20
+ "bugs": {
21
+ "url": "https://github.com/blindariesgos/easywork-common-lib/issues"
22
+ },
23
+ "homepage": "https://github.com/blindariesgos/easywork-common-lib#readme",
24
+ "dependencies": {
25
+ "@golevelup/nestjs-rabbitmq": "^5.6.0",
26
+ "@nestjs/common": "^10.4.7",
27
+ "@nestjs/swagger": "^7.4.2",
28
+ "@nestjs/typeorm": "^10.0.2",
29
+ "class-transformer": "^0.5.1",
30
+ "class-validator": "^0.14.1",
31
+ "googleapis": "^144.0.0",
32
+ "nanoid": "^3.3.7",
33
+ "rxjs": "^7.8.1",
34
+ "sharp": "^0.33.5",
35
+ "typeorm": "^0.3.20"
36
+ },
37
+ "devDependencies": {
38
+ "@rubiin/tsconfig": "^1.2.1",
39
+ "@types/node": "^20.17.6",
40
+ "cpx-fixed": "^1.6.0",
41
+ "ts-loader": "^9.5.1",
42
+ "typescript": "^5.6.3"
43
+ },
44
+ "packageManager": "pnpm@9.12.2+sha512.22721b3a11f81661ae1ec68ce1a7b879425a1ca5b991c975b074ac220b187ce56c708fe5db69f4c962c989452eee76c82877f4ee80f474cebd61ee13461b6228"
45
+ }