@runnerpro/backend 1.8.12 → 1.8.13

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.
@@ -26,9 +26,10 @@ const sendMessageChatToClient = (idCliente, text, textPreferredLanguage, preferr
26
26
  return;
27
27
  idEntrenador = entrenadorBBDD.idEntrenador;
28
28
  }
29
+ let result;
29
30
  if (notification) {
30
31
  try {
31
- yield (0, index_2.sendNotification)({
32
+ result = yield (0, index_2.sendNotification)({
32
33
  firebaseMessaging: (0, messaging_1.getMessaging)(),
33
34
  idCliente,
34
35
  body: (0, common_1.removeAccent)((textPreferredLanguage || text).substring(0, 50)) + ((textPreferredLanguage || text).length > 50 ? '...' : ''),
@@ -49,6 +50,7 @@ const sendMessageChatToClient = (idCliente, text, textPreferredLanguage, preferr
49
50
  firebaseMessaging: (0, messaging_1.getMessaging)(),
50
51
  body: (0, common_1.removeAccent)((textPreferredLanguage || text).substring(0, 50)) + ((textPreferredLanguage || text).length > 50 ? '...' : ''),
51
52
  screen: common_1.NOTIFICATION_SCREEN_TYPES.CHAT,
53
+ result,
52
54
  };
53
55
  });
54
56
  exports.sendMessageChatToClient = sendMessageChatToClient;
@@ -33,6 +33,7 @@ const sendNotification = ({ firebaseMessaging, idCliente, title, body, screen =
33
33
  screenParams: screenParamsString,
34
34
  }, device.subscription);
35
35
  }
36
+ return { status: 'success', idNotification, devices };
36
37
  });
37
38
  exports.sendNotification = sendNotification;
38
39
  function notificationWEB(firebaseMessaging, msg, token) {
@@ -1 +1 @@
1
- {"version":3,"file":"sendMessageChatToClient.d.ts","sourceRoot":"","sources":["../../../../src/chat/sendMessageChatToClient.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,uBAAuB,+GAqC5B,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
1
+ {"version":3,"file":"sendMessageChatToClient.d.ts","sourceRoot":"","sources":["../../../../src/chat/sendMessageChatToClient.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,uBAAuB,+GAuC5B,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
@@ -7,6 +7,10 @@ interface Notification {
7
7
  screen?: string;
8
8
  screenParams?: any;
9
9
  }
10
- declare const sendNotification: ({ firebaseMessaging, idCliente, title, body, screen, screenParams, }: Notification) => Promise<void>;
10
+ declare const sendNotification: ({ firebaseMessaging, idCliente, title, body, screen, screenParams, }: Notification) => Promise<{
11
+ status: string;
12
+ idNotification: any;
13
+ devices: any;
14
+ }>;
11
15
  export { sendNotification };
12
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sendNotification/index.ts"],"names":[],"mappings":"AAEA,UAAU,YAAY;IACpB,iBAAiB,EAAE,GAAG,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,GAAG,CAAC;CACpB;AAED,QAAA,MAAM,gBAAgB,yEAOnB,YAAY,kBA8Bd,CAAC;AA4BF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sendNotification/index.ts"],"names":[],"mappings":"AAEA,UAAU,YAAY;IACpB,iBAAiB,EAAE,GAAG,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,GAAG,CAAC;CACpB;AAED,QAAA,MAAM,gBAAgB,yEAOnB,YAAY;;;;EAgCd,CAAC;AA4BF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runnerpro/backend",
3
- "version": "1.8.12",
3
+ "version": "1.8.13",
4
4
  "description": "A collection of common backend functions",
5
5
  "exports": {
6
6
  ".": "./lib/cjs/index.js"