diff --git a/package-lock.json b/package-lock.json index 1228768..624c3d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,16 +8,20 @@ "name": "erp-plugin-sdk", "version": "1.0.0", "license": "ISC", + "bin": { + "create-erp-plugin": "dist/cli/index.js" + }, "devDependencies": { "@nestjs/common": "^11.1.23", "@nestjs/core": "^11.1.23", "@nestjs/microservices": "^11.1.23", "@types/node": "^25.9.1", "@types/react": "^19.2.15", + "@types/uuid": "^9.0.8", "reflect-metadata": "^0.2.2", "rxjs": "^7.8.2", "typescript": "^6.0.3", - "uuid": "^14.0.0" + "uuid": "^9.0.1" } }, "node_modules/@borewit/text-codec": { @@ -236,6 +240,13 @@ "csstype": "^3.2.2" } }, + "node_modules/@types/uuid": { + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", + "dev": true, + "license": "MIT" + }, "node_modules/consola": { "version": "3.4.2", "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", @@ -474,9 +485,10 @@ "license": "MIT" }, "node_modules/uuid": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz", - "integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).", "dev": true, "funding": [ "https://github.com/sponsors/broofa", @@ -484,7 +496,7 @@ ], "license": "MIT", "bin": { - "uuid": "dist-node/bin/uuid" + "uuid": "dist/bin/uuid" } } } diff --git a/package.json b/package.json index 03886f1..413447f 100644 --- a/package.json +++ b/package.json @@ -25,9 +25,10 @@ "@nestjs/microservices": "^11.1.23", "@types/node": "^25.9.1", "@types/react": "^19.2.15", + "@types/uuid": "^9.0.8", "reflect-metadata": "^0.2.2", "rxjs": "^7.8.2", "typescript": "^6.0.3", - "uuid": "^14.0.0" + "uuid": "^9.0.1" } } diff --git a/src/backend/services/core.service.ts b/src/backend/services/core.service.ts index a312492..87c1361 100644 --- a/src/backend/services/core.service.ts +++ b/src/backend/services/core.service.ts @@ -212,4 +212,15 @@ export class CoreService { }, }); } + + async sendNotification(payload: { userId: number | null; title: string; message: string; icon?: string; image?: string; details?: any }): Promise { + await this.emit('system.notification.send', { + userId: payload.userId, + title: payload.title, + message: payload.message, + icon: payload.icon, + image: payload.image, + details: payload.details, + }); + } }