@digipair/skill-push-notification 0.95.1 → 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
- try {
8890
- const response = await src.sendNotification(subscription, payload);
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
- try {
8871
- const response = await src.sendNotification(subscription, payload);
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 | null>;
3
+ export declare const sendPush: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<webPush.SendResult>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-push-notification",
3
- "version": "0.95.1",
3
+ "version": "0.95.2",
4
4
  "keywords": [
5
5
  "digipair",
6
6
  "service",
package/schema.fr.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "paths": {
11
11
  "/sendPush": {
12
12
  "post": {
13
- "tags": ["web", "spatial"],
13
+ "tags": ["service"],
14
14
  "summary": "Envoie une notification via WebPush.",
15
15
  "description": "Envoie une notification via WebPush avec les données nécessaires.",
16
16
  "parameters": [
package/schema.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "paths": {
11
11
  "/sendPush": {
12
12
  "post": {
13
- "tags": ["web", "spatial"],
13
+ "tags": ["service"],
14
14
  "summary": "Send a web push notification",
15
15
  "description": "Send a web push notification with the specified values.",
16
16
  "parameters": [