@ccci/micro-server 1.0.108 → 1.0.109
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/index.d.ts +2 -0
- package/dist/index.js +131899 -99
- package/dist/types/ApplicationOptionType.d.ts +1 -0
- package/dist/types/NotificationTypes.d.ts +8 -0
- package/dist/utils/PushNotifier.d.ts +18 -0
- package/package.json +3 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { NotificationType, NotificationOptions } from '@/types/NotificationTypes';
|
|
2
|
+
import admin from 'firebase-admin';
|
|
3
|
+
import { BatchResponse } from 'firebase-admin/lib/messaging/messaging-api';
|
|
4
|
+
export default class PushNotifier {
|
|
5
|
+
static FirebaseAdmin: typeof admin;
|
|
6
|
+
static instance: number;
|
|
7
|
+
private static rootDir;
|
|
8
|
+
constructor(path: string);
|
|
9
|
+
/**
|
|
10
|
+
* Initiate sending push notifications
|
|
11
|
+
* @param tokens firebase user tokens
|
|
12
|
+
* @param message message to send
|
|
13
|
+
* @param metadata
|
|
14
|
+
* @param options
|
|
15
|
+
*/
|
|
16
|
+
static sendNotifications(tokens: Array<string>, message: NotificationType, metadata?: any, options?: NotificationOptions): Promise<BatchResponse | undefined>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=PushNotifier.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ccci/micro-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.109",
|
|
4
4
|
"module": "index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -39,6 +39,8 @@
|
|
|
39
39
|
"cors": "^2.8.5",
|
|
40
40
|
"express": "^4.19.2",
|
|
41
41
|
"express-fileupload": "^1.5.0",
|
|
42
|
+
"firebase": "^10.13.1",
|
|
43
|
+
"firebase-admin": "^12.4.0",
|
|
42
44
|
"handlebars": "^4.7.8",
|
|
43
45
|
"helmet": "^7.1.0",
|
|
44
46
|
"jsonwebtoken": "^9.0.2",
|