@arkstack/notifications 0.17.13 → 0.17.14
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 +7 -0
- package/dist/index.js +10 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -426,6 +426,13 @@ declare class PusherRealtimeDriver implements RealtimeDriver {
|
|
|
426
426
|
* @returns
|
|
427
427
|
*/
|
|
428
428
|
auth(socketId: string, channel: string, data?: Parameters<PusherClient['authorizeChannel']>[2]): Promise<ReturnType<PusherClient['authorizeChannel']>>;
|
|
429
|
+
/**
|
|
430
|
+
* Register a realtime autorization route
|
|
431
|
+
*
|
|
432
|
+
* @param authEndpoint
|
|
433
|
+
* @param middleware
|
|
434
|
+
*/
|
|
435
|
+
static registerAuthRoute(authEndpoint?: string, middleware?: unknown | unknown[], config?: PusherTransportConfig): Promise<void>;
|
|
429
436
|
/**
|
|
430
437
|
* Register a realtime autorization route
|
|
431
438
|
*
|
package/dist/index.js
CHANGED
|
@@ -535,7 +535,7 @@ var FirebaseRealtimeDriver = class {
|
|
|
535
535
|
* The `pusher` server SDK is an optional peer dependency, imported lazily so the
|
|
536
536
|
* package installs without it; it is only required when this transport is used.
|
|
537
537
|
*/
|
|
538
|
-
var PusherRealtimeDriver = class {
|
|
538
|
+
var PusherRealtimeDriver = class PusherRealtimeDriver {
|
|
539
539
|
options;
|
|
540
540
|
clientPromise;
|
|
541
541
|
constructor(options = {}) {
|
|
@@ -576,6 +576,15 @@ var PusherRealtimeDriver = class {
|
|
|
576
576
|
* @param authEndpoint
|
|
577
577
|
* @param middleware
|
|
578
578
|
*/
|
|
579
|
+
static async registerAuthRoute(authEndpoint = "/realtime/auth", middleware, config = {}) {
|
|
580
|
+
return new PusherRealtimeDriver(config).registerAuthRoute(authEndpoint, middleware);
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* Register a realtime autorization route
|
|
584
|
+
*
|
|
585
|
+
* @param authEndpoint
|
|
586
|
+
* @param middleware
|
|
587
|
+
*/
|
|
579
588
|
async registerAuthRoute(authEndpoint = "/realtime/auth", middleware) {
|
|
580
589
|
const client = await this.client();
|
|
581
590
|
for (const [name, path] of Object.entries({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkstack/notifications",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Framework-agnostic notification module for Arkstack and Nodejs, providing support for multi-channel notification delivery.",
|
|
6
6
|
"homepage": "https://arkstack.toneflix.net/guide/notifications",
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"africastalking": "^0.8.0",
|
|
35
35
|
"nodemailer": "^9.0.3",
|
|
36
36
|
"twilio": "^6.0.2",
|
|
37
|
-
"@arkstack/common": "^0.17.
|
|
37
|
+
"@arkstack/common": "^0.17.14"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@kanun-hq/plugin-phone": "^0.1.8",
|
|
41
41
|
"firebase-admin": "^13.0.0",
|
|
42
42
|
"pusher": "^5.2.0",
|
|
43
|
-
"@arkstack/contract": "^0.17.
|
|
44
|
-
"@arkstack/database": "^0.17.
|
|
45
|
-
"@arkstack/driver-
|
|
46
|
-
"@arkstack/driver-
|
|
43
|
+
"@arkstack/contract": "^0.17.14",
|
|
44
|
+
"@arkstack/database": "^0.17.14",
|
|
45
|
+
"@arkstack/driver-h3": "^0.17.14",
|
|
46
|
+
"@arkstack/driver-express": "^0.17.14"
|
|
47
47
|
},
|
|
48
48
|
"peerDependenciesMeta": {
|
|
49
49
|
"@arkstack/driver-express": {
|