easywork-common-lib 1.0.226 → 1.0.227

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/.gitattributes CHANGED
@@ -1,2 +1,2 @@
1
- # Auto detect text files and perform LF normalization
2
- * text=auto
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
@@ -1,13 +1,13 @@
1
- {
2
- "autoBarrel.language.defaultLanguage": "TypeScript",
3
- "autoBarrel.files.disableRecursiveBarrelling": false,
4
- "autoBarrel.files.includeExtensionOnExport": ["ts", "tsx", "vue"],
5
- "autoBarrel.files.ignoreFilePathPatternOnExport": ["**/*.spec.*", "**/*.test.*"],
6
- "autoBarrel.files.keepExtensionOnExport": false,
7
- "autoBarrel.files.detectExportsInFiles": false,
8
- "autoBarrel.files.exportDefaultFilename": "filename",
9
- "autoBarrel.formatting.excludeSemiColonAtEndOfLine": false,
10
- "autoBarrel.formatting.useSingleQuotes": true,
11
- "autoBarrel.formatting.endOfLine": "lf",
12
- "autoBarrel.formatting.insertFinalNewline": true,
1
+ {
2
+ "autoBarrel.language.defaultLanguage": "TypeScript",
3
+ "autoBarrel.files.disableRecursiveBarrelling": false,
4
+ "autoBarrel.files.includeExtensionOnExport": ["ts", "tsx", "vue"],
5
+ "autoBarrel.files.ignoreFilePathPatternOnExport": ["**/*.spec.*", "**/*.test.*"],
6
+ "autoBarrel.files.keepExtensionOnExport": false,
7
+ "autoBarrel.files.detectExportsInFiles": false,
8
+ "autoBarrel.files.exportDefaultFilename": "filename",
9
+ "autoBarrel.formatting.excludeSemiColonAtEndOfLine": false,
10
+ "autoBarrel.formatting.useSingleQuotes": true,
11
+ "autoBarrel.formatting.endOfLine": "lf",
12
+ "autoBarrel.formatting.insertFinalNewline": true,
13
13
  }
@@ -0,0 +1 @@
1
+ export * from "./filter-view.entity";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./filter-view.entity"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/easyapp/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC"}
@@ -0,0 +1,16 @@
1
+ import { AmqpConnection } from "@golevelup/nestjs-rabbitmq";
2
+ import { SendNotificationDto } from "../../common";
3
+ import { Contact, ContactComment, Task, TaskComment } from "../../entities";
4
+ export declare class NotifierService {
5
+ private readonly amqpConnection;
6
+ constructor(amqpConnection: AmqpConnection);
7
+ sendNotification(data: SendNotificationDto): Promise<void>;
8
+ notifyTaskCompletion(task: Task, recipientsId: string[]): Promise<void>;
9
+ notifyTaskContinue(task: Task, recipientsId: string[]): Promise<void>;
10
+ notifyNewTask(task: Task, recipientsId: string[]): Promise<void>;
11
+ notifyTaskUpdate(task: Task, recipientsId: string[], changedFields: string[]): Promise<void>;
12
+ notifyNewComment(task: Task, comment: TaskComment, recipientsId: string[]): Promise<void>;
13
+ notifyNewCommentContact(contact: Contact, comment: ContactComment, recipientsId: string[]): Promise<void>;
14
+ sendOTPPhone(code: string, recipientsId: string[]): Promise<void>;
15
+ sendOTPEmail(code: string, recipientsId: string[]): Promise<void>;
16
+ }
@@ -0,0 +1,204 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.NotifierService = void 0;
13
+ const nestjs_rabbitmq_1 = require("@golevelup/nestjs-rabbitmq");
14
+ const common_1 = require("@nestjs/common");
15
+ const common_2 = require("../../common");
16
+ const logger = new common_1.Logger("NotifierService");
17
+ let NotifierService = class NotifierService {
18
+ amqpConnection;
19
+ constructor(amqpConnection) {
20
+ this.amqpConnection = amqpConnection;
21
+ }
22
+ async sendNotification(data) {
23
+ logger.debug(`Sending notification: ${JSON.stringify(data)}`);
24
+ await this.amqpConnection.publish(process.env.RABBITMQ_EXCHANGE, "notification.principal", data);
25
+ }
26
+ async notifyTaskCompletion(task, recipientsId) {
27
+ const metadata = {
28
+ taskId: task.id,
29
+ taskOwnerId: task.createdBy.id,
30
+ taskResponsibleId: task.responsible[0].id,
31
+ };
32
+ const notificationDto = {
33
+ title: "Task Completed",
34
+ content: `The task ${task.name} has been completed`,
35
+ recipientsId,
36
+ entityId: task.id,
37
+ channels: [common_2.NotificationChannel.APP],
38
+ category: common_2.NotificationCategory.TASK,
39
+ subCategory: common_2.NotificationSubcategory.TASK_COMPLETED,
40
+ metadata,
41
+ };
42
+ await this.sendNotification(notificationDto);
43
+ }
44
+ async notifyTaskContinue(task, recipientsId) {
45
+ const metadata = {
46
+ taskId: task.id,
47
+ taskOwnerId: task.createdBy.id,
48
+ taskResponsibleId: task.responsible[0].id,
49
+ };
50
+ const notificationDto = {
51
+ title: "Task Continue",
52
+ content: `La tarea #${task.number} - ${task.name}, ha sido reanudada`,
53
+ recipientsId,
54
+ entityId: task.id,
55
+ channels: [common_2.NotificationChannel.APP],
56
+ category: common_2.NotificationCategory.TASK,
57
+ subCategory: common_2.NotificationSubcategory.TASK_UPDATED,
58
+ metadata,
59
+ };
60
+ await this.sendNotification(notificationDto);
61
+ }
62
+ async notifyNewTask(task, recipientsId) {
63
+ const fechaLimite = task.deadline ? `<br/>Fecha Limite:${new Date(task.deadline)}` : ``;
64
+ const observadores = task.observers.length > 0 ? `<br/>Observadores: ${task.observers.map(observer => observer.username).join(", ")}` : ``;
65
+ const responsible = task.responsible.length > 0 ? `<br/>Persona Responsable: ${task.responsible.map(responsible => responsible.username).join(", ")}` : ``;
66
+ const participants = task.participants.length > 0 ? `<br/>Participantes: ${task.participants.map(participant => participant.username).join(", ")}` : ``;
67
+ const content = `Nueva Tarea agregada: <a href="/tools/tasks/task/${task.id}?show=true" style="color:blue">[${task.name}]</a>${responsible}${observadores}${participants}${fechaLimite}`;
68
+ const metadata = {
69
+ taskId: task.id,
70
+ taskOwnerId: task.createdBy.id,
71
+ taskResponsibleId: task.responsible[0].id,
72
+ };
73
+ const notificationDto = {
74
+ title: "New Task",
75
+ content,
76
+ recipientsId,
77
+ entityId: task.id,
78
+ channels: [common_2.NotificationChannel.APP, common_2.NotificationChannel.SMS, common_2.NotificationChannel.PUSH],
79
+ category: common_2.NotificationCategory.TASK,
80
+ subCategory: common_2.NotificationSubcategory.NEW_TASK,
81
+ metadata,
82
+ };
83
+ await this.sendNotification(notificationDto);
84
+ }
85
+ async notifyTaskUpdate(task, recipientsId, changedFields) {
86
+ const metadata = {
87
+ taskId: task.id,
88
+ taskOwnerId: task.createdBy.id,
89
+ taskResponsibleId: task.responsible[0].id,
90
+ };
91
+ const createNotificationDto = (content, recipients) => ({
92
+ title: "Task Update",
93
+ content,
94
+ recipientsId: recipients,
95
+ entityId: task.id,
96
+ channels: [common_2.NotificationChannel.APP, common_2.NotificationChannel.SMS, common_2.NotificationChannel.PUSH],
97
+ category: common_2.NotificationCategory.TASK,
98
+ subCategory: common_2.NotificationSubcategory.TASK_UPDATED,
99
+ metadata,
100
+ });
101
+ const taskLink = `<a href="/tools/tasks/task/${task.id}?show=true" style="color:blue">[${task.name}]</a>`;
102
+ let content = `Tarea #${task.number} - ${taskLink}`;
103
+ if (changedFields.length === 0) {
104
+ content += " - ha sido actualizada";
105
+ await this.sendNotification(createNotificationDto(content, recipientsId));
106
+ return;
107
+ }
108
+ content += " - se actualizó:";
109
+ if (changedFields.includes("deadline")) {
110
+ if (task.deadline) {
111
+ const deadLine = new Date(task.deadline);
112
+ content += `<br/>Fecha Limite cambiada: ${deadLine.getDate()}/${deadLine.getMonth() + 1}/${deadLine.getFullYear()}`;
113
+ }
114
+ else {
115
+ content += `<br/>Fecha Limite cambiada: Ninguna`;
116
+ }
117
+ }
118
+ if (changedFields.includes("responsible")) {
119
+ content = `Se le asignó la tarea #${task.number} - ${taskLink}`;
120
+ await this.sendNotification(createNotificationDto(content, [task.responsible[0].id]));
121
+ }
122
+ else {
123
+ if (changedFields.includes("name"))
124
+ content += `<br/>Nombre: ${task.name}`;
125
+ if (changedFields.includes("description"))
126
+ content += `<br/>Descripción: ${task.description}`;
127
+ if (changedFields.includes("status"))
128
+ content += `<br/>Estado: ${task.status}`;
129
+ await this.sendNotification(createNotificationDto(content, recipientsId));
130
+ }
131
+ }
132
+ async notifyNewComment(task, comment, recipientsId) {
133
+ const commentText = comment.comment.slice(0, 20);
134
+ const content = `${comment.createdBy.name} comentó en la tarea: <a href="/tools/tasks/task/${task.id}?show=true" style="color:#170f6b">[${task.name}]</a>. Texto del comentario: ${commentText}`;
135
+ const metadata = {
136
+ taskId: task.id,
137
+ commentId: comment.id,
138
+ taskOwnerId: task.createdBy.id,
139
+ commentOwnerId: comment.createdBy.id,
140
+ taskResponsibleId: task.responsible[0].id,
141
+ };
142
+ const notificationDto = {
143
+ title: "New Comment",
144
+ content,
145
+ recipientsId,
146
+ entityId: task.id,
147
+ channels: [common_2.NotificationChannel.APP, common_2.NotificationChannel.SMS, common_2.NotificationChannel.PUSH],
148
+ category: common_2.NotificationCategory.TASK,
149
+ subCategory: common_2.NotificationSubcategory.TASK_NEW_COMMNET,
150
+ metadata,
151
+ };
152
+ await this.sendNotification(notificationDto);
153
+ }
154
+ async notifyNewCommentContact(contact, comment, recipientsId) {
155
+ const commentText = comment.comment.slice(0, 20);
156
+ const content = `${comment.createdBy.name} comentó en el contacto: <a href="/sales/contacts/contact/${contact.id}?show=true" style="color:#170f6b">[${contact.name}]</a>. Texto del comentario: ${commentText}`;
157
+ const metadata = {
158
+ contactId: contact.id,
159
+ commentId: comment.id,
160
+ contactOwnerId: contact.createdBy.id,
161
+ commentOwnerId: comment.createdBy.id,
162
+ contactAssignedId: contact.assignedBy?.id,
163
+ };
164
+ const notificationDto = {
165
+ title: "New Comment",
166
+ content,
167
+ recipientsId,
168
+ entityId: contact.id,
169
+ channels: [common_2.NotificationChannel.APP, common_2.NotificationChannel.SMS, common_2.NotificationChannel.PUSH],
170
+ category: common_2.NotificationCategory.CRM,
171
+ subCategory: common_2.NotificationSubcategory.CONTACT_NEW_COMMENT,
172
+ metadata,
173
+ };
174
+ await this.sendNotification(notificationDto);
175
+ }
176
+ async sendOTPPhone(code, recipientsId) {
177
+ const notificationDto = {
178
+ title: "OTP Code",
179
+ content: `Easywork: Your OTP code is ${code}`,
180
+ recipientsId,
181
+ channels: [common_2.NotificationChannel.SMS],
182
+ category: common_2.NotificationCategory.OTP,
183
+ subCategory: common_2.NotificationSubcategory.OTP,
184
+ };
185
+ await this.sendNotification(notificationDto);
186
+ }
187
+ async sendOTPEmail(code, recipientsId) {
188
+ const notificationDto = {
189
+ title: "OTP Code",
190
+ content: code,
191
+ recipientsId,
192
+ channels: [common_2.NotificationChannel.EMAIL],
193
+ category: common_2.NotificationCategory.OTP,
194
+ subCategory: common_2.NotificationSubcategory.OTP,
195
+ };
196
+ await this.sendNotification(notificationDto);
197
+ }
198
+ };
199
+ exports.NotifierService = NotifierService;
200
+ exports.NotifierService = NotifierService = __decorate([
201
+ (0, common_1.Injectable)(),
202
+ __metadata("design:paramtypes", [nestjs_rabbitmq_1.AmqpConnection])
203
+ ], NotifierService);
204
+ //# sourceMappingURL=notifier.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifier.service.js","sourceRoot":"","sources":["../../../src/modules/notifier/notifier.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gEAA4D;AAC5D,2CAAoD;AACpD,yCAAuH;AAGvH,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC,iBAAiB,CAAC,CAAC;AAGtC,IAAM,eAAe,GAArB,MAAM,eAAe;IACK;IAA7B,YAA6B,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;IAAI,CAAC;IAEhE,KAAK,CAAC,gBAAgB,CAAC,IAAyB;QAC5C,MAAM,CAAC,KAAK,CAAC,yBAAyB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC9D,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,wBAAwB,EAAE,IAAI,CAAC,CAAC;IACrG,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,IAAU,EAAE,YAAsB;QACzD,MAAM,QAAQ,GAAG;YACb,MAAM,EAAE,IAAI,CAAC,EAAE;YACf,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE;YAC9B,iBAAiB,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE;SAC5C,CAAC;QACF,MAAM,eAAe,GAAwB;YACzC,KAAK,EAAE,gBAAgB;YACvB,OAAO,EAAE,YAAY,IAAI,CAAC,IAAI,qBAAqB;YAC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mBAAU,GAAE;qCAEoC,gCAAc;GADlD,eAAe,CAiN3B"}
package/package.json CHANGED
@@ -1,38 +1,39 @@
1
- {
2
- "name": "easywork-common-lib",
3
- "version": "1.0.226",
4
- "description": "Librería común de Easywork",
5
- "main": "dist/index.js",
6
- "scripts": {
7
- "build": "tsc && cpx 'src/**/*.proto' dist/",
8
- "bump": "./scripts/bump.sh"
9
- },
10
- "repository": {
11
- "type": "git",
12
- "url": "git+https://github.com/criptopreto/easywork-common-lib.git"
13
- },
14
- "keywords": [
15
- "nodejs"
16
- ],
17
- "author": "Rosmer Campos",
18
- "license": "MIT",
19
- "bugs": {
20
- "url": "https://github.com/criptopreto/easywork-common-lib/issues"
21
- },
22
- "homepage": "https://github.com/criptopreto/easywork-common-lib#readme",
23
- "dependencies": {
24
- "@nestjs/common": "^10.3.8",
25
- "@nestjs/swagger": "^7.4.0",
26
- "@nestjs/typeorm": "^10.0.2",
27
- "class-transformer": "^0.5.1",
28
- "class-validator": "^0.14.1",
29
- "rxjs": "^7.8.1",
30
- "typeorm": "^0.3.20"
31
- },
32
- "devDependencies": {
33
- "@rubiin/tsconfig": "^1.1.2",
34
- "@types/node": "^20.12.12",
35
- "ts-loader": "^9.5.1",
36
- "typescript": "^5.4.5"
37
- }
38
- }
1
+ {
2
+ "name": "easywork-common-lib",
3
+ "version": "1.0.227",
4
+ "description": "Librería común de Easywork",
5
+ "main": "dist/index.js",
6
+ "scripts": {
7
+ "build": "tsc && cpx 'src/**/*.proto' dist/",
8
+ "bump": "./scripts/bump.sh"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/criptopreto/easywork-common-lib.git"
13
+ },
14
+ "keywords": [
15
+ "nodejs"
16
+ ],
17
+ "author": "Rosmer Campos",
18
+ "license": "MIT",
19
+ "bugs": {
20
+ "url": "https://github.com/criptopreto/easywork-common-lib/issues"
21
+ },
22
+ "homepage": "https://github.com/criptopreto/easywork-common-lib#readme",
23
+ "dependencies": {
24
+ "@golevelup/nestjs-rabbitmq": "^5.3.0",
25
+ "@nestjs/common": "^10.3.8",
26
+ "@nestjs/swagger": "^7.4.0",
27
+ "@nestjs/typeorm": "^10.0.2",
28
+ "class-transformer": "^0.5.1",
29
+ "class-validator": "^0.14.1",
30
+ "rxjs": "^7.8.1",
31
+ "typeorm": "^0.3.20"
32
+ },
33
+ "devDependencies": {
34
+ "@rubiin/tsconfig": "^1.1.2",
35
+ "@types/node": "^20.12.12",
36
+ "ts-loader": "^9.5.1",
37
+ "typescript": "^5.4.5"
38
+ }
39
+ }
package/scripts/bump.sh CHANGED
@@ -1,6 +1,6 @@
1
- git add .
2
- git commit -m "bump version"
3
- npm version patch
4
- yarn build
5
- npm publish
1
+ git add .
2
+ git commit -m "bump version"
3
+ npm version patch
4
+ yarn build
5
+ npm publish
6
6
  git push
package/test.bat CHANGED
@@ -1,16 +1,16 @@
1
- @echo off
2
- setlocal enabledelayedexpansion
3
-
4
- rem Define the root directory
5
- set "root=C:\Users\ROSME\Documents\GitHub\easywork-common-lib"
6
-
7
- rem Iterate through all directories and subdirectories
8
- for /f "delims=" %%d in ('dir "%root%" /ad /b /s') do (
9
- rem Check if the directory name contains node_modules
10
- echo %%d | findstr /i /c:"\node_modules" >nul
11
- echo %%d | findstr /i /c:"\.git" >nul
12
- if errorlevel 1 (
13
- rem If not, list the directory contents
14
- dir "%%d"
15
- )
1
+ @echo off
2
+ setlocal enabledelayedexpansion
3
+
4
+ rem Define the root directory
5
+ set "root=C:\Users\ROSME\Documents\GitHub\easywork-common-lib"
6
+
7
+ rem Iterate through all directories and subdirectories
8
+ for /f "delims=" %%d in ('dir "%root%" /ad /b /s') do (
9
+ rem Check if the directory name contains node_modules
10
+ echo %%d | findstr /i /c:"\node_modules" >nul
11
+ echo %%d | findstr /i /c:"\.git" >nul
12
+ if errorlevel 1 (
13
+ rem If not, list the directory contents
14
+ dir "%%d"
15
+ )
16
16
  )
@@ -1,4 +1,4 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "exclude": ["node_modules", "test", "dist", "**/*spec.ts", "eslint.config.js"]
4
- }
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "exclude": ["node_modules", "test", "dist", "**/*spec.ts", "eslint.config.js"]
4
+ }
package/tsconfig.json CHANGED
@@ -1,26 +1,26 @@
1
- {
2
- "extends": "@rubiin/tsconfig",
3
- "compilerOptions": {
4
- "module": "commonjs",
5
- "declaration": true,
6
- "removeComments": true,
7
- "emitDecoratorMetadata": true,
8
- "experimentalDecorators": true,
9
- "allowSyntheticDefaultImports": true,
10
- "target": "ES2022",
11
- "sourceMap": true,
12
- "outDir": "./dist",
13
- "rootDir": "./src",
14
- "baseUrl": "./src",
15
- "incremental": true,
16
- "strict": true,
17
- "skipLibCheck": true,
18
- "strictNullChecks": false,
19
- "noImplicitAny": false,
20
- "strictBindCallApply": false,
21
- "forceConsistentCasingInFileNames": true,
22
- "noFallthroughCasesInSwitch": false
23
- },
24
- "include": ["test/**/*", "src/**/*", "eslint.config.js"],
25
- "typeRoots": ["./src/common/@types/typings"]
26
- }
1
+ {
2
+ "extends": "@rubiin/tsconfig",
3
+ "compilerOptions": {
4
+ "module": "commonjs",
5
+ "declaration": true,
6
+ "removeComments": true,
7
+ "emitDecoratorMetadata": true,
8
+ "experimentalDecorators": true,
9
+ "allowSyntheticDefaultImports": true,
10
+ "target": "ES2022",
11
+ "sourceMap": true,
12
+ "outDir": "./dist",
13
+ "rootDir": "./src",
14
+ "baseUrl": "./src",
15
+ "incremental": true,
16
+ "strict": true,
17
+ "skipLibCheck": true,
18
+ "strictNullChecks": false,
19
+ "noImplicitAny": false,
20
+ "strictBindCallApply": false,
21
+ "forceConsistentCasingInFileNames": true,
22
+ "noFallthroughCasesInSwitch": false
23
+ },
24
+ "include": ["test/**/*", "src/**/*", "eslint.config.js"],
25
+ "typeRoots": ["./src/common/@types/typings"]
26
+ }