@digipair/skill-push-notification 0.95.0 → 0.95.2
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/index.cjs.js
CHANGED
|
@@ -8886,13 +8886,8 @@ let PushNotificationService = class PushNotificationService {
|
|
|
8886
8886
|
async sendPush(params, _pinsSettingsList, context) {
|
|
8887
8887
|
const { payload, subscription, mailto = context.privates.PUSH_NOTIFICATION_MAILTO, publicKey = context.variables.PUSH_NOTIFICATION_PUBLIC_KEY || context.privates.PUSH_NOTIFICATION_PUBLIC_KEY, privateKey = context.privates.PUSH_NOTIFICATION_PRIVATE_KEY } = params;
|
|
8888
8888
|
src.setVapidDetails(`mailto:${mailto}`, publicKey, privateKey);
|
|
8889
|
-
|
|
8890
|
-
|
|
8891
|
-
return response;
|
|
8892
|
-
} catch (error) {
|
|
8893
|
-
console.error('Error sending notification:', error);
|
|
8894
|
-
}
|
|
8895
|
-
return null;
|
|
8889
|
+
const response = await src.sendNotification(subscription, payload);
|
|
8890
|
+
return response;
|
|
8896
8891
|
}
|
|
8897
8892
|
};
|
|
8898
8893
|
const sendPush = (params, pinsSettingsList, context)=>new PushNotificationService().sendPush(params, pinsSettingsList, context);
|
package/index.esm.js
CHANGED
|
@@ -8867,13 +8867,8 @@ let PushNotificationService = class PushNotificationService {
|
|
|
8867
8867
|
async sendPush(params, _pinsSettingsList, context) {
|
|
8868
8868
|
const { payload, subscription, mailto = context.privates.PUSH_NOTIFICATION_MAILTO, publicKey = context.variables.PUSH_NOTIFICATION_PUBLIC_KEY || context.privates.PUSH_NOTIFICATION_PUBLIC_KEY, privateKey = context.privates.PUSH_NOTIFICATION_PRIVATE_KEY } = params;
|
|
8869
8869
|
src.setVapidDetails(`mailto:${mailto}`, publicKey, privateKey);
|
|
8870
|
-
|
|
8871
|
-
|
|
8872
|
-
return response;
|
|
8873
|
-
} catch (error) {
|
|
8874
|
-
console.error('Error sending notification:', error);
|
|
8875
|
-
}
|
|
8876
|
-
return null;
|
|
8870
|
+
const response = await src.sendNotification(subscription, payload);
|
|
8871
|
+
return response;
|
|
8877
8872
|
}
|
|
8878
8873
|
};
|
|
8879
8874
|
const sendPush = (params, pinsSettingsList, context)=>new PushNotificationService().sendPush(params, pinsSettingsList, context);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PinsSettings } from '@digipair/engine';
|
|
2
2
|
import * as webPush from 'web-push';
|
|
3
|
-
export declare const sendPush: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<webPush.SendResult
|
|
3
|
+
export declare const sendPush: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<webPush.SendResult>;
|
package/package.json
CHANGED
package/schema.fr.json
CHANGED
package/schema.json
CHANGED