podverse-parser 5.1.17-alpha.0 → 5.1.19-alpha.0

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.
@@ -17,5 +17,12 @@ export declare const config: {
17
17
  parser: {
18
18
  addRemoteItemsToMQ: boolean;
19
19
  };
20
+ defaults: {
21
+ account: {
22
+ settings: {
23
+ locale: string;
24
+ };
25
+ };
26
+ };
20
27
  };
21
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;CAmBlB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BlB,CAAC"}
@@ -19,5 +19,12 @@ exports.config = {
19
19
  },
20
20
  parser: {
21
21
  addRemoteItemsToMQ: process.env.PARSER_ADD_REMOTE_ITEMS_TO_MQ === 'true',
22
+ },
23
+ defaults: {
24
+ account: {
25
+ settings: {
26
+ locale: process.env.DEFAULT_ACCOUNT_SETTINGS_LOCALE || 'en-US',
27
+ }
28
+ }
22
29
  }
23
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"handleNewItemNotifications.d.ts","sourceRoot":"","sources":["../../../src/lib/notifications/handleNewItemNotifications.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAA6B,MAAM,cAAc,CAAC;AAElE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAuCpE;;GAEG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,OAAO,EAChB,iBAAiB,EAAE,uBAAuB,GACzC,OAAO,CAAC,IAAI,CAAC,CA+Ef"}
1
+ {"version":3,"file":"handleNewItemNotifications.d.ts","sourceRoot":"","sources":["../../../src/lib/notifications/handleNewItemNotifications.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAA6B,MAAM,cAAc,CAAC;AAElE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAuCpE;;GAEG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,OAAO,EAChB,iBAAiB,EAAE,uBAAuB,GACzC,OAAO,CAAC,IAAI,CAAC,CAgFf"}
@@ -57,7 +57,7 @@ function handleNewItemNotifications(channel, parsedItemsResult) {
57
57
  if (!devicesResult) {
58
58
  return;
59
59
  }
60
- const { devices: allDevices } = devicesResult;
60
+ const { devices: allDevices, webPushSubscriptions, upSubscriptions } = devicesResult;
61
61
  // Get the items to send notifications for using batch queries
62
62
  const itemService = new podverse_orm_1.ItemService();
63
63
  const items = [];
@@ -103,10 +103,11 @@ function handleNewItemNotifications(channel, parsedItemsResult) {
103
103
  // Group devices by locale and platform
104
104
  const groupedDevices = (0, sharedNotificationHelpers_1.groupDevicesByLocaleAndPlatform)(allDevices);
105
105
  // Send notifications
106
- yield (0, sharedNotificationHelpers_1.sendItemNotifications)(itemNotifications, groupedDevices);
106
+ yield (0, sharedNotificationHelpers_1.sendItemNotifications)(itemNotifications, groupedDevices, webPushSubscriptions, upSubscriptions);
107
107
  }
108
108
  catch (error) {
109
109
  loggerService_1.loggerService.logError('handleNewItemNotifications', error);
110
+ loggerService_1.loggerService.logError(`handleNewItemNotifications: Error details - Channel: ${channel.id_text}, Error: ${error.message}`, error);
110
111
  }
111
112
  });
112
113
  }
@@ -53,7 +53,7 @@ function sendLiveItemNotificationsForStatus(channel, itemGuids, channelImages, m
53
53
  if (!devicesResult) {
54
54
  return;
55
55
  }
56
- const { devices: allDevices } = devicesResult;
56
+ const { devices: allDevices, webPushSubscriptions, upSubscriptions } = devicesResult;
57
57
  // Get the items to send notifications for using batch queries
58
58
  const itemService = new podverse_orm_1.ItemService();
59
59
  const items = yield itemService.getManyByGuid(channel, itemGuids, {
@@ -89,6 +89,6 @@ function sendLiveItemNotificationsForStatus(channel, itemGuids, channelImages, m
89
89
  // Group devices by locale and platform
90
90
  const groupedDevices = (0, sharedNotificationHelpers_1.groupDevicesByLocaleAndPlatform)(allDevices);
91
91
  // Send notifications
92
- yield (0, sharedNotificationHelpers_1.sendItemNotifications)(itemNotifications, groupedDevices);
92
+ yield (0, sharedNotificationHelpers_1.sendItemNotifications)(itemNotifications, groupedDevices, webPushSubscriptions, upSubscriptions);
93
93
  });
94
94
  }
@@ -1,6 +1,6 @@
1
1
  import { AccountFCMDevicePlatformEnum, AccountNotificationTypeEnum } from 'podverse-helpers';
2
2
  import { Channel, ChannelImage, Item } from 'podverse-orm';
3
- import { NotificationMessageType, NotificationPlatform } from 'podverse-external-services';
3
+ import { NotificationMessageType, NotificationPlatform, WebPushSubscription, UPSubscription } from 'podverse-notifications';
4
4
  export type DeviceWithLocale = {
5
5
  fcm_token: string;
6
6
  platform: NotificationPlatform;
@@ -45,10 +45,12 @@ export declare function loadChannelImages(channel: Channel): Promise<ChannelImag
45
45
  */
46
46
  export declare function getDevicesForNotificationType(channelIdText: string, notificationType: AccountNotificationTypeEnum): Promise<{
47
47
  devices: DeviceWithLocale[];
48
+ webPushSubscriptions: Map<string, WebPushSubscription[]>;
49
+ upSubscriptions: Map<string, UPSubscription[]>;
48
50
  accountLocaleMap: Map<number, string>;
49
51
  } | null>;
50
52
  /**
51
53
  * Sends notifications for items to grouped devices
52
54
  */
53
- export declare function sendItemNotifications(itemNotifications: ItemNotificationData[], groupedDevices: Map<string, Map<NotificationPlatform, string[]>>): Promise<void>;
55
+ export declare function sendItemNotifications(itemNotifications: ItemNotificationData[], groupedDevices: Map<string, Map<NotificationPlatform, string[]>>, webPushSubscriptions: Map<string, WebPushSubscription[]>, upSubscriptions: Map<string, UPSubscription[]>): Promise<void>;
54
56
  //# sourceMappingURL=sharedNotificationHelpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sharedNotificationHelpers.d.ts","sourceRoot":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GAEG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAUjF;AAED;;GAEG;AACH,wBAAsB,6BAA6B,CACjD,aAAa,EAAE,MAAM,EACrB,gBAAgB,EAAE,2BAA2B,GAC5C,OAAO,CAAC;IAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAAC,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,IAAI,CAAC,CA0DxF;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,iBAAiB,EAAE,oBAAoB,EAAE,EACzC,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,oBAAoB,EAAE,MAAM,EAAE,CAAC,CAAC,GAC/D,OAAO,CAAC,IAAI,CAAC,CAmCf"}
1
+ {"version":3,"file":"sharedNotificationHelpers.d.ts","sourceRoot":"","sources":["../../../src/lib/notifications/sharedNotificationHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC7F,OAAO,EAML,OAAO,EACP,YAAY,EAEZ,IAAI,EACL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAA4B,mBAAmB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAItJ,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,C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C,CAAC,EAChE,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,EAAE,CAAC,EACxD,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,GAC7C,OAAO,CAAC,IAAI,CAAC,CAkGf"}
@@ -18,8 +18,9 @@ exports.getDevicesForNotificationType = getDevicesForNotificationType;
18
18
  exports.sendItemNotifications = sendItemNotifications;
19
19
  const podverse_helpers_1 = require("podverse-helpers");
20
20
  const podverse_orm_1 = require("podverse-orm");
21
- const podverse_external_services_1 = require("podverse-external-services");
21
+ const podverse_notifications_1 = require("podverse-notifications");
22
22
  const loggerService_1 = require("@parser/factories/loggerService");
23
+ const config_1 = require("@parser/config");
23
24
  // Minimum acceptable image size for notifications (in pixels)
24
25
  const NOTIFICATION_IMAGE_MIN_SIZE = 200;
25
26
  // Ideal image size for notifications - not too large to waste bandwidth
@@ -81,9 +82,8 @@ function convertPlatform(platform) {
81
82
  return 'android';
82
83
  case podverse_helpers_1.AccountFCMDevicePlatformEnum.iOS:
83
84
  return 'ios';
84
- case podverse_helpers_1.AccountFCMDevicePlatformEnum.Generic:
85
85
  default:
86
- return 'generic';
86
+ return 'web';
87
87
  }
88
88
  }
89
89
  /**
@@ -144,7 +144,7 @@ function getDevicesForNotificationType(channelIdText, notificationType) {
144
144
  if (hasType) {
145
145
  accountIdsWithTypeEnabled.push(notificationChannel.account_id);
146
146
  // Store the locale for each account
147
- const locale = ((_d = (_c = (_b = notificationChannel.account) === null || _b === void 0 ? void 0 : _b.account_settings) === null || _c === void 0 ? void 0 : _c.account_settings_locale) === null || _d === void 0 ? void 0 : _d.locale) || 'en-US';
147
+ const locale = ((_d = (_c = (_b = notificationChannel.account) === null || _b === void 0 ? void 0 : _b.account_settings) === null || _c === void 0 ? void 0 : _c.account_settings_locale) === null || _d === void 0 ? void 0 : _d.locale) || config_1.config.defaults.account.settings.locale;
148
148
  accountLocaleMap.set(notificationChannel.account_id, locale);
149
149
  }
150
150
  }
@@ -155,31 +155,65 @@ function getDevicesForNotificationType(channelIdText, notificationType) {
155
155
  // Get all FCM devices for the filtered account IDs in a single batch query
156
156
  const accountFCMDeviceService = new podverse_orm_1.AccountFCMDeviceService();
157
157
  const deviceResults = yield accountFCMDeviceService.getAllForAccountIds(accountIdsWithTypeEnabled);
158
- // Early return if no devices to send to
159
- if (deviceResults.length === 0) {
158
+ // Get all Web Push devices for the filtered account IDs in a single batch query
159
+ const accountWebPushDeviceService = new podverse_orm_1.AccountWebPushDeviceService();
160
+ const webPushDeviceResults = yield accountWebPushDeviceService.getAllForAccountIds(accountIdsWithTypeEnabled);
161
+ // Get all Unified Push devices for the filtered account IDs in a single batch query
162
+ const accountUPDeviceService = new podverse_orm_1.AccountUPDeviceService();
163
+ const upDeviceResults = yield accountUPDeviceService.getAllForAccountIds(accountIdsWithTypeEnabled);
164
+ // Early return if no devices to send to (FCM, Web Push, or UP)
165
+ if (deviceResults.length === 0 && webPushDeviceResults.length === 0 && upDeviceResults.length === 0) {
160
166
  return null;
161
167
  }
162
- // Map devices to DeviceWithLocale format
168
+ // Map FCM devices to DeviceWithLocale format
163
169
  const devices = deviceResults.map(device => ({
164
170
  fcm_token: device.fcm_token,
165
171
  platform: convertPlatform(device.platform),
166
- locale: device.locale || accountLocaleMap.get(device.account_id) || 'en-US',
172
+ locale: device.locale || accountLocaleMap.get(device.account_id) || config_1.config.defaults.account.settings.locale,
167
173
  account_id: device.account_id
168
174
  }));
169
- return { devices, accountLocaleMap };
175
+ // Map Web Push devices to WebPushSubscription format, grouped by locale
176
+ const webPushSubscriptions = new Map();
177
+ for (const device of webPushDeviceResults) {
178
+ const locale = device.locale || accountLocaleMap.get(device.account_id) || 'en-US';
179
+ if (!webPushSubscriptions.has(locale)) {
180
+ webPushSubscriptions.set(locale, []);
181
+ }
182
+ webPushSubscriptions.get(locale).push({
183
+ endpoint: device.endpoint,
184
+ keys: {
185
+ p256dh: device.p256dh,
186
+ auth: device.auth
187
+ }
188
+ });
189
+ }
190
+ // Map UP devices to UPSubscription format, grouped by locale
191
+ const upSubscriptions = new Map();
192
+ for (const device of upDeviceResults) {
193
+ const locale = device.locale || accountLocaleMap.get(device.account_id) || 'en-US';
194
+ if (!upSubscriptions.has(locale)) {
195
+ upSubscriptions.set(locale, []);
196
+ }
197
+ upSubscriptions.get(locale).push({
198
+ up_endpoint: device.up_endpoint,
199
+ up_auth_key: device.up_auth_key
200
+ });
201
+ }
202
+ return { devices, webPushSubscriptions, upSubscriptions, accountLocaleMap };
170
203
  });
171
204
  }
172
205
  /**
173
206
  * Sends notifications for items to grouped devices
174
207
  */
175
- function sendItemNotifications(itemNotifications, groupedDevices) {
208
+ function sendItemNotifications(itemNotifications, groupedDevices, webPushSubscriptions, upSubscriptions) {
176
209
  return __awaiter(this, void 0, void 0, function* () {
177
210
  for (const itemNotification of itemNotifications) {
178
211
  const messageText = `${itemNotification.channelTitle} - ${itemNotification.itemTitle}`;
212
+ // Send to FCM devices
179
213
  for (const [locale, platformMap] of groupedDevices) {
180
214
  for (const [platform, tokens] of platformMap) {
181
215
  try {
182
- yield (0, podverse_external_services_1.notificationOrchestrator)({
216
+ yield (0, podverse_notifications_1.notificationOrchestrator)({
183
217
  service: 'firebase',
184
218
  tokens,
185
219
  messageText,
@@ -201,6 +235,56 @@ function sendItemNotifications(itemNotifications, groupedDevices) {
201
235
  }
202
236
  }
203
237
  }
238
+ // Send to Web Push subscriptions
239
+ for (const [locale, subscriptions] of webPushSubscriptions) {
240
+ if (subscriptions.length > 0) {
241
+ try {
242
+ yield (0, podverse_notifications_1.notificationOrchestrator)({
243
+ service: 'webpush',
244
+ subscriptions,
245
+ messageText,
246
+ messageType: itemNotification.messageType,
247
+ locale,
248
+ icon: itemNotification.imageUrl || undefined,
249
+ linkIdText: itemNotification.itemIdText,
250
+ data: {
251
+ itemIdText: itemNotification.itemIdText,
252
+ channelIdText: itemNotification.channelIdText,
253
+ type: itemNotification.messageType
254
+ }
255
+ });
256
+ loggerService_1.loggerService.info(`Sent ${itemNotification.messageType} Web Push notification to ${subscriptions.length} subscription(s) (${locale}) for item: ${itemNotification.itemIdText}`);
257
+ }
258
+ catch (error) {
259
+ loggerService_1.loggerService.logError(`Failed to send Web Push notification for item ${itemNotification.itemIdText} to ${subscriptions.length} subscription(s) (${locale})`, error);
260
+ }
261
+ }
262
+ }
263
+ // Send to Unified Push subscriptions
264
+ for (const [locale, subscriptions] of upSubscriptions) {
265
+ if (subscriptions.length > 0) {
266
+ try {
267
+ yield (0, podverse_notifications_1.notificationOrchestrator)({
268
+ service: 'unifiedpush',
269
+ subscriptions,
270
+ messageText,
271
+ messageType: itemNotification.messageType,
272
+ locale,
273
+ icon: itemNotification.imageUrl || undefined,
274
+ linkIdText: itemNotification.itemIdText,
275
+ data: {
276
+ itemIdText: itemNotification.itemIdText,
277
+ channelIdText: itemNotification.channelIdText,
278
+ type: itemNotification.messageType
279
+ }
280
+ });
281
+ loggerService_1.loggerService.info(`Sent ${itemNotification.messageType} Unified Push notification to ${subscriptions.length} subscription(s) (${locale}) for item: ${itemNotification.itemIdText}`);
282
+ }
283
+ catch (error) {
284
+ loggerService_1.loggerService.logError(`Failed to send Unified Push notification for item ${itemNotification.itemIdText} to ${subscriptions.length} subscription(s) (${locale})`, error);
285
+ }
286
+ }
287
+ }
204
288
  }
205
289
  });
206
290
  }
@@ -16,5 +16,5 @@ export declare const parseRSSFeedAndSaveToDatabase: (url: string, podcast_index_
16
16
  podcast_index_id: number;
17
17
  options: ParseRSSFeedAndSaveToDatabaseOptions;
18
18
  }[];
19
- }>;
19
+ } | undefined>;
20
20
  //# sourceMappingURL=parser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../src/lib/rss/parser.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EAKxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAa,MAAM,oBAAoB,CAAC;AAmC3D,eAAO,MAAM,kBAAkB,GAAU,KAAK,MAAM,wBAUnD,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,IAAI,EAAE,uBAAuB,GAAG,IAAI,CAAC;CACtC,CAAA;AAED,MAAM,MAAM,oCAAoC,GAAG;IACjD,UAAU,EAAE,OAAO,CAAC;IACpB,mBAAmB,EAAE,2BAA2B,CAAC;CAClD,CAAA;AAgBD,eAAO,MAAM,6BAA6B,GACxC,KAAK,MAAM,EACX,kBAAkB,MAAM,EACxB,SAAS,oCAAoC;;;;;;EAoI9C,CAAC"}
1
+ {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../src/lib/rss/parser.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EAKxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAa,MAAM,oBAAoB,CAAC;AAmC3D,eAAO,MAAM,kBAAkB,GAAU,KAAK,MAAM,wBAUnD,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,IAAI,EAAE,uBAAuB,GAAG,IAAI,CAAC;CACtC,CAAA;AAED,MAAM,MAAM,oCAAoC,GAAG;IACjD,UAAU,EAAE,OAAO,CAAC;IACpB,mBAAmB,EAAE,2BAA2B,CAAC;CAClD,CAAA;AAgBD,eAAO,MAAM,6BAA6B,GACxC,KAAK,MAAM,EACX,kBAAkB,MAAM,EACxB,SAAS,oCAAoC;;;;;;cAsI9C,CAAC"}
@@ -125,6 +125,8 @@ const parseRSSFeedAndSaveToDatabase = (url, podcast_index_id, options) => __awai
125
125
  catch (error) {
126
126
  if (error instanceof errors_1.FeedIsParsingError) {
127
127
  loggerService_1.loggerService.warn(`Feed ${feed === null || feed === void 0 ? void 0 : feed.id} is already parsing.`);
128
+ // return so the is_parsing flag is not reset
129
+ return;
128
130
  }
129
131
  else if (error instanceof errors_1.FeedNoChangesSinceLastParsedError) {
130
132
  loggerService_1.loggerService.warn(`Feed ${feed === null || feed === void 0 ? void 0 : feed.id} has no changes since last parsed.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "podverse-parser",
3
- "version": "5.1.17-alpha.0",
3
+ "version": "5.1.19-alpha.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -17,9 +17,10 @@
17
17
  "license": "AGPLv3",
18
18
  "dependencies": {
19
19
  "module-alias": "^2.2.3",
20
- "podverse-external-services": "^5.1.17-alpha.0",
21
- "podverse-helpers": "^5.1.17-alpha.0",
22
- "podverse-orm": "^5.1.17-alpha.0",
20
+ "podverse-external-services": "^5.1.19-alpha.0",
21
+ "podverse-helpers": "^5.1.19-alpha.0",
22
+ "podverse-notifications": "^5.1.19-alpha.0",
23
+ "podverse-orm": "^5.1.19-alpha.0",
23
24
  "podverse-partytime": "^5.0.0"
24
25
  },
25
26
  "devDependencies": {