rez_core 2.2.168 → 2.2.170
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/dist/module/listmaster/service/list-master.service.js +3 -1
- package/dist/module/listmaster/service/list-master.service.js.map +1 -1
- package/dist/module/notification/controller/notification.controller.d.ts +2 -1
- package/dist/module/notification/controller/notification.controller.js +15 -2
- package/dist/module/notification/controller/notification.controller.js.map +1 -1
- package/dist/module/notification/controller/otp.controller.d.ts +2 -1
- package/dist/module/notification/controller/otp.controller.js +2 -2
- package/dist/module/notification/controller/otp.controller.js.map +1 -1
- package/dist/module/notification/entity/notification.entity.d.ts +1 -0
- package/dist/module/notification/entity/notification.entity.js +4 -0
- package/dist/module/notification/entity/notification.entity.js.map +1 -1
- package/dist/module/notification/firebase-admin.config.d.ts +6 -1
- package/dist/module/notification/firebase-admin.config.js +20 -6
- package/dist/module/notification/firebase-admin.config.js.map +1 -1
- package/dist/module/notification/notification.module.js +17 -3
- package/dist/module/notification/notification.module.js.map +1 -1
- package/dist/module/notification/service/notification.service.d.ts +19 -0
- package/dist/module/notification/service/notification.service.js +88 -0
- package/dist/module/notification/service/notification.service.js.map +1 -0
- package/dist/module/notification/service/otp.service.d.ts +2 -1
- package/dist/module/notification/service/otp.service.js +8 -3
- package/dist/module/notification/service/otp.service.js.map +1 -1
- package/dist/module/user/controller/login.controller.js +16 -4
- package/dist/module/user/controller/login.controller.js.map +1 -1
- package/dist/module/user/controller/user.controller.d.ts +1 -9
- package/dist/module/user/controller/user.controller.js +10 -4
- package/dist/module/user/controller/user.controller.js.map +1 -1
- package/dist/module/user/entity/user.entity.d.ts +1 -0
- package/dist/module/user/entity/user.entity.js +4 -0
- package/dist/module/user/entity/user.entity.js.map +1 -1
- package/dist/module/user/service/login.service.d.ts +17 -3
- package/dist/module/user/service/login.service.js +14 -5
- package/dist/module/user/service/login.service.js.map +1 -1
- package/dist/module/user/service/user.service.d.ts +7 -10
- package/dist/module/user/service/user.service.js +23 -8
- package/dist/module/user/service/user.service.js.map +1 -1
- package/dist/module/workflow/service/task.service.d.ts +3 -1
- package/dist/module/workflow/service/task.service.js +6 -2
- package/dist/module/workflow/service/task.service.js.map +1 -1
- package/dist/module/workflow/workflow.module.js +2 -0
- package/dist/module/workflow/workflow.module.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/listmaster/service/list-master.service.ts +3 -1
- package/src/module/notification/controller/notification.controller.ts +10 -2
- package/src/module/notification/controller/otp.controller.ts +3 -2
- package/src/module/notification/entity/notification.entity.ts +3 -0
- package/src/module/notification/firebase-admin.config.ts +20 -6
- package/src/module/notification/notification.module.ts +18 -4
- package/src/module/notification/service/notification.service.ts +90 -0
- package/src/module/notification/service/otp.service.ts +9 -3
- package/src/module/user/controller/login.controller.ts +26 -11
- package/src/module/user/controller/user.controller.ts +7 -2
- package/src/module/user/entity/user.entity.ts +3 -0
- package/src/module/user/service/login.service.ts +24 -8
- package/src/module/user/service/user.service.ts +32 -6
- package/src/module/workflow/service/task.service.ts +7 -0
- package/src/module/workflow/workflow.module.ts +2 -0
- package/src/resources/dev.properties.yaml +11 -7
- package/dist/module/notification/firebase-admin.json +0 -13
- package/dist/module/notification/service/firebase.service.d.ts +0 -11
- package/dist/module/notification/service/firebase.service.js +0 -40
- package/dist/module/notification/service/firebase.service.js.map +0 -1
- package/src/module/notification/firebase-admin.json +0 -13
- package/src/module/notification/service/firebase.service.ts +0 -31
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "service_account",
|
|
3
|
-
"project_id": "sample-d7855",
|
|
4
|
-
"private_key_id": "753237e3e7d64a87155b916deda9f3d1cb9cdd52",
|
|
5
|
-
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQChrgvD+0M3u8EU\ntm3xV27RGuYRSjIpZIRi6I3tH0BTwpOde4DnwZWU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WZdpfo/82lO+YX8qotJhFhJ0Zdf7otT4nl8nm//A3oyk3OtjezmN8OeDexQN\nitpT8FABf/ukivqJNDlHOgRBJsanFrcCKYBXEsA9eba0zWeLzsMto5HxAoGBAIaH\nW5udzcDZkwownd+GdtAvPSvQJchwnjIqmS/tAJH1pSTeWpnXca9YnNAJhBjdqdRC\nyMgjQ8uAv9OwoEorW6hKKTS5c++CYkJ3FBfPEj+adItlPWYipt+Luu6XIiUFhz+h\nBoOHIMZhNYnC/4UmvkENUI1FRnKdfqXqa8qLQh9RAoGBAMxOm2fMUKzLPY8xqp0j\nWmo3ZYMkRRi/BFqVn1F+aFGx0ahW8GVT70qy30rhiNJAkl2QnPnllQ6rD/CBc3UT\n3kJLwTc5BWXP1nKxEOuu33xB5wk4mIzyItFf/eYhYFzsWMpJo2gaKE3iNNUKUP0W\nG2coAWXT2iRSS6OHh9B1bRnQ\n-----END PRIVATE KEY-----\n",
|
|
6
|
-
"client_email": "firebase-adminsdk-fbsvc@sample-d7855.iam.gserviceaccount.com",
|
|
7
|
-
"client_id": "115995668082397151669",
|
|
8
|
-
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
|
|
9
|
-
"token_uri": "https://oauth2.googleapis.com/token",
|
|
10
|
-
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
|
|
11
|
-
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-fbsvc%40sample-d7855.iam.gserviceaccount.com",
|
|
12
|
-
"universe_domain": "googleapis.com"
|
|
13
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@nestjs/common';
|
|
2
|
-
import { firebaseAdmin } from '../firebase-admin.config';
|
|
3
|
-
|
|
4
|
-
@Injectable()
|
|
5
|
-
export class NotificationsService {
|
|
6
|
-
private tokens: Map<string, string> = new Map(); // store in memory for now
|
|
7
|
-
|
|
8
|
-
async saveToken(userId: string | undefined, token: string) {
|
|
9
|
-
if (userId) {
|
|
10
|
-
this.tokens.set(userId, token);
|
|
11
|
-
}
|
|
12
|
-
return { success: true, token };
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
async sendToDevice(token: string, title: string, body: string) {
|
|
16
|
-
const message = {
|
|
17
|
-
token,
|
|
18
|
-
notification: { title, body },
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
return firebaseAdmin.messaging().send(message);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Helper: send to a registered user by userId
|
|
25
|
-
async sendToUser(userId: string, title: string, body: string) {
|
|
26
|
-
const token = this.tokens.get(userId);
|
|
27
|
-
if (!token) return { error: 'No token found for user' };
|
|
28
|
-
|
|
29
|
-
return this.sendToDevice(token, title, body);
|
|
30
|
-
}
|
|
31
|
-
}
|