podverse-orm 5.0.5 → 5.1.0-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.
- package/dist/config/index.d.ts +4 -2
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +4 -2
- package/dist/db/index.d.ts +5 -1
- package/dist/db/index.d.ts.map +1 -1
- package/dist/db/index.js +50 -41
- package/dist/entities/account/account.d.ts +32 -0
- package/dist/entities/account/account.d.ts.map +1 -1
- package/dist/entities/account/account.js +80 -0
- package/dist/entities/account/accountAdminRoles.js +1 -1
- package/dist/entities/account/accountAppStorePurchase.d.ts +2 -2
- package/dist/entities/account/accountAppStorePurchase.d.ts.map +1 -1
- package/dist/entities/account/accountAppStorePurchase.js +9 -9
- package/dist/entities/account/accountCredentials.d.ts +1 -0
- package/dist/entities/account/accountCredentials.d.ts.map +1 -1
- package/dist/entities/account/accountCredentials.js +5 -1
- package/dist/entities/account/accountEmailChangeVerification.d.ts +10 -0
- package/dist/entities/account/accountEmailChangeVerification.d.ts.map +1 -0
- package/dist/entities/account/accountEmailChangeVerification.js +46 -0
- package/dist/entities/account/accountFCMDevice.d.ts +1 -0
- package/dist/entities/account/accountFCMDevice.d.ts.map +1 -1
- package/dist/entities/account/accountFCMDevice.js +5 -1
- package/dist/entities/account/accountFollowingAddByRSSChannel.d.ts +1 -1
- package/dist/entities/account/accountFollowingAddByRSSChannel.js +10 -10
- package/dist/entities/account/accountGooglePlayPurchase.d.ts +2 -2
- package/dist/entities/account/accountGooglePlayPurchase.d.ts.map +1 -1
- package/dist/entities/account/accountGooglePlayPurchase.js +9 -9
- package/dist/entities/account/accountMembership.d.ts +2 -0
- package/dist/entities/account/accountMembership.d.ts.map +1 -1
- package/dist/entities/account/accountMembership.js +5 -0
- package/dist/entities/account/accountMembershipStatus.js +1 -1
- package/dist/entities/account/{accountNotification.d.ts → accountNotificationChannel.d.ts} +2 -2
- package/dist/entities/account/accountNotificationChannel.d.ts.map +1 -0
- package/dist/entities/account/{accountNotification.js → accountNotificationChannel.js} +9 -9
- package/dist/entities/account/accountPayPalOrder.d.ts +1 -1
- package/dist/entities/account/accountPayPalOrder.js +9 -9
- package/dist/entities/account/accountProfile.js +1 -1
- package/dist/entities/account/accountResetPassword.js +1 -1
- package/dist/entities/account/accountVerification.js +1 -1
- package/dist/entities/category.d.ts +2 -1
- package/dist/entities/category.d.ts.map +1 -1
- package/dist/entities/category.js +12 -6
- package/dist/entities/channel/channel.d.ts +40 -3
- package/dist/entities/channel/channel.d.ts.map +1 -1
- package/dist/entities/channel/channel.js +95 -4
- package/dist/entities/channel/channelAbout.d.ts +3 -2
- package/dist/entities/channel/channelAbout.d.ts.map +1 -1
- package/dist/entities/channel/channelAbout.js +6 -1
- package/dist/entities/channel/channelCategory.d.ts +3 -1
- package/dist/entities/channel/channelCategory.d.ts.map +1 -1
- package/dist/entities/channel/channelCategory.js +10 -5
- package/dist/entities/channel/channelChat.js +1 -1
- package/dist/entities/channel/channelDescription.js +1 -1
- package/dist/entities/channel/channelLicense.js +1 -1
- package/dist/entities/channel/channelLocation.js +1 -1
- package/dist/entities/channel/channelPodroll.d.ts +2 -0
- package/dist/entities/channel/channelPodroll.d.ts.map +1 -1
- package/dist/entities/channel/channelPodroll.js +6 -1
- package/dist/entities/channel/channelPublisher.d.ts +2 -0
- package/dist/entities/channel/channelPublisher.d.ts.map +1 -1
- package/dist/entities/channel/channelPublisher.js +6 -1
- package/dist/entities/channel/channelPublisherRemoteItem.js +1 -1
- package/dist/entities/channel/channelTrailer.d.ts +1 -1
- package/dist/entities/channel/channelTrailer.d.ts.map +1 -1
- package/dist/entities/channel/channelTrailer.js +2 -2
- package/dist/entities/channel/channelValue.d.ts +2 -0
- package/dist/entities/channel/channelValue.d.ts.map +1 -1
- package/dist/entities/channel/channelValue.js +5 -0
- package/dist/entities/clip.d.ts +2 -2
- package/dist/entities/clip.d.ts.map +1 -1
- package/dist/entities/clip.js +2 -2
- package/dist/entities/feed/feed.d.ts +2 -0
- package/dist/entities/feed/feed.d.ts.map +1 -1
- package/dist/entities/feed/feed.js +8 -0
- package/dist/entities/feed/feedFlagStatus.d.ts +6 -6
- package/dist/entities/feed/feedFlagStatus.d.ts.map +1 -1
- package/dist/entities/feed/feedFlagStatus.js +8 -14
- package/dist/entities/feed/feedLog.d.ts.map +1 -1
- package/dist/entities/feed/feedLog.js +2 -1
- package/dist/entities/item/item.d.ts +41 -6
- package/dist/entities/item/item.d.ts.map +1 -1
- package/dist/entities/item/item.js +107 -12
- package/dist/entities/item/itemAbout.d.ts +2 -2
- package/dist/entities/item/itemAbout.d.ts.map +1 -1
- package/dist/entities/item/itemAbout.js +1 -1
- package/dist/entities/item/itemChapterLocation.js +1 -1
- package/dist/entities/item/itemChaptersFeed.d.ts +2 -0
- package/dist/entities/item/itemChaptersFeed.d.ts.map +1 -1
- package/dist/entities/item/itemChaptersFeed.js +6 -1
- package/dist/entities/item/itemChaptersFeedLog.d.ts.map +1 -1
- package/dist/entities/item/itemChaptersFeedLog.js +2 -1
- package/dist/entities/item/itemChat.js +1 -1
- package/dist/entities/item/itemDescription.js +1 -1
- package/dist/entities/item/itemEnclosure.d.ts +4 -0
- package/dist/entities/item/itemEnclosure.d.ts.map +1 -1
- package/dist/entities/item/itemEnclosure.js +10 -0
- package/dist/entities/item/itemEnclosureIntegrity.js +1 -1
- package/dist/entities/item/itemFlagStatus.d.ts +13 -0
- package/dist/entities/item/itemFlagStatus.d.ts.map +1 -0
- package/dist/entities/item/itemFlagStatus.js +44 -0
- package/dist/entities/item/itemLicense.js +1 -1
- package/dist/entities/item/itemLocation.js +1 -1
- package/dist/entities/item/itemSeason.js +1 -1
- package/dist/entities/item/itemSeasonEpisode.js +1 -1
- package/dist/entities/item/itemValue.d.ts +4 -0
- package/dist/entities/item/itemValue.d.ts.map +1 -1
- package/dist/entities/item/itemValue.js +10 -0
- package/dist/entities/item/itemValueTimeSplit.d.ts +4 -0
- package/dist/entities/item/itemValueTimeSplit.d.ts.map +1 -1
- package/dist/entities/item/itemValueTimeSplit.js +10 -0
- package/dist/entities/item/itemValueTimeSplitRemoteItem.js +1 -1
- package/dist/entities/medium.d.ts +1 -22
- package/dist/entities/medium.d.ts.map +1 -1
- package/dist/entities/medium.js +3 -50
- package/dist/entities/membershipClaimToken.d.ts +3 -3
- package/dist/entities/membershipClaimToken.d.ts.map +1 -1
- package/dist/entities/membershipClaimToken.js +3 -2
- package/dist/entities/playlist/playlist.d.ts +3 -5
- package/dist/entities/playlist/playlist.d.ts.map +1 -1
- package/dist/entities/playlist/playlist.js +4 -7
- package/dist/entities/playlist/playlistResource.d.ts +21 -0
- package/dist/entities/playlist/playlistResource.d.ts.map +1 -0
- package/dist/entities/playlist/playlistResource.js +82 -0
- package/dist/entities/queue/queue.d.ts +4 -2
- package/dist/entities/queue/queue.d.ts.map +1 -1
- package/dist/entities/queue/queue.js +16 -1
- package/dist/entities/queue/queueResource.d.ts +24 -0
- package/dist/entities/queue/queueResource.d.ts.map +1 -0
- package/dist/entities/queue/queueResource.js +93 -0
- package/dist/entities/stats/statsAggregatedAccount.d.ts +24 -0
- package/dist/entities/stats/statsAggregatedAccount.d.ts.map +1 -0
- package/dist/entities/stats/statsAggregatedAccount.js +101 -0
- package/dist/entities/stats/statsAggregatedChannel.d.ts +24 -0
- package/dist/entities/stats/statsAggregatedChannel.d.ts.map +1 -0
- package/dist/entities/stats/statsAggregatedChannel.js +101 -0
- package/dist/entities/stats/statsAggregatedClip.d.ts +24 -0
- package/dist/entities/stats/statsAggregatedClip.d.ts.map +1 -0
- package/dist/entities/stats/statsAggregatedClip.js +101 -0
- package/dist/entities/stats/statsAggregatedItem.d.ts +24 -0
- package/dist/entities/stats/statsAggregatedItem.d.ts.map +1 -0
- package/dist/entities/stats/statsAggregatedItem.js +101 -0
- package/dist/entities/stats/statsAggregatedPlaylist.d.ts +24 -0
- package/dist/entities/stats/statsAggregatedPlaylist.d.ts.map +1 -0
- package/dist/entities/stats/statsAggregatedPlaylist.js +101 -0
- package/dist/entities/stats/statsTrackAccountGuid.d.ts +8 -0
- package/dist/entities/stats/statsTrackAccountGuid.d.ts.map +1 -0
- package/dist/entities/{playlist/playlistResourceBase.js → stats/statsTrackAccountGuid.js} +19 -16
- package/dist/entities/stats/statsTrackEventAccount.d.ts +10 -0
- package/dist/entities/stats/statsTrackEventAccount.d.ts.map +1 -0
- package/dist/entities/stats/statsTrackEventAccount.js +43 -0
- package/dist/entities/stats/statsTrackEventChannel.d.ts +10 -0
- package/dist/entities/stats/statsTrackEventChannel.d.ts.map +1 -0
- package/dist/entities/stats/statsTrackEventChannel.js +43 -0
- package/dist/entities/stats/statsTrackEventClip.d.ts +10 -0
- package/dist/entities/stats/statsTrackEventClip.d.ts.map +1 -0
- package/dist/entities/stats/statsTrackEventClip.js +43 -0
- package/dist/entities/stats/statsTrackEventItem.d.ts +10 -0
- package/dist/entities/stats/statsTrackEventItem.d.ts.map +1 -0
- package/dist/entities/stats/statsTrackEventItem.js +43 -0
- package/dist/entities/stats/statsTrackEventPlaylist.d.ts +10 -0
- package/dist/entities/stats/statsTrackEventPlaylist.d.ts.map +1 -0
- package/dist/entities/stats/statsTrackEventPlaylist.js +43 -0
- package/dist/index.d.ts +39 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +39 -13
- package/dist/services/account/account.d.ts +28 -0
- package/dist/services/account/account.d.ts.map +1 -0
- package/dist/services/account/account.js +159 -0
- package/dist/services/account/accountCredentials.d.ts +14 -0
- package/dist/services/account/accountCredentials.d.ts.map +1 -0
- package/dist/services/account/accountCredentials.js +33 -0
- package/dist/services/account/accountEmailChangeVerification.d.ts +17 -0
- package/dist/services/account/accountEmailChangeVerification.d.ts.map +1 -0
- package/dist/services/account/accountEmailChangeVerification.js +50 -0
- package/dist/services/account/accountFCMDevice.d.ts +12 -0
- package/dist/services/account/accountFCMDevice.d.ts.map +1 -0
- package/dist/services/account/accountFCMDevice.js +70 -0
- package/dist/services/account/accountFollowingAccount.d.ts +15 -0
- package/dist/services/account/accountFollowingAccount.d.ts.map +1 -0
- package/dist/services/account/accountFollowingAccount.js +80 -0
- package/dist/services/account/accountFollowingAddByRSSChannel.d.ts +16 -0
- package/dist/services/account/accountFollowingAddByRSSChannel.d.ts.map +1 -0
- package/dist/services/account/accountFollowingAddByRSSChannel.js +49 -0
- package/dist/services/account/accountFollowingChannel.d.ts +12 -0
- package/dist/services/account/accountFollowingChannel.d.ts.map +1 -0
- package/dist/services/account/accountFollowingChannel.js +60 -0
- package/dist/services/account/accountFollowingPlaylist.d.ts +13 -0
- package/dist/services/account/accountFollowingPlaylist.d.ts.map +1 -0
- package/dist/services/account/accountFollowingPlaylist.js +74 -0
- package/dist/services/account/accountMembership.d.ts +6 -0
- package/dist/services/account/accountMembership.d.ts.map +1 -0
- package/dist/services/account/accountMembership.js +11 -0
- package/dist/services/account/accountMembershipStatus.d.ts +14 -0
- package/dist/services/account/accountMembershipStatus.d.ts.map +1 -0
- package/dist/services/account/accountMembershipStatus.js +38 -0
- package/dist/services/account/accountNotificationChannel.d.ts +14 -0
- package/dist/services/account/accountNotificationChannel.d.ts.map +1 -0
- package/dist/services/account/accountNotificationChannel.js +82 -0
- package/dist/services/account/accountPayPalOrder.d.ts +12 -0
- package/dist/services/account/accountPayPalOrder.d.ts.map +1 -0
- package/dist/services/account/accountPayPalOrder.js +78 -0
- package/dist/services/account/accountProfile.d.ts +13 -0
- package/dist/services/account/accountProfile.d.ts.map +1 -0
- package/dist/services/account/accountProfile.js +32 -0
- package/dist/services/account/accountResetPassword.d.ts +16 -0
- package/dist/services/account/accountResetPassword.d.ts.map +1 -0
- package/dist/services/account/accountResetPassword.js +49 -0
- package/dist/services/account/accountVerification.d.ts +16 -0
- package/dist/services/account/accountVerification.d.ts.map +1 -0
- package/dist/services/account/accountVerification.js +49 -0
- package/dist/services/archiver.d.ts +17 -0
- package/dist/services/archiver.d.ts.map +1 -0
- package/dist/services/archiver.js +131 -0
- package/dist/services/base/baseGetOnlyService.d.ts +14 -0
- package/dist/services/base/baseGetOnlyService.d.ts.map +1 -0
- package/dist/services/base/baseGetOnlyService.js +30 -0
- package/dist/services/base/baseManyService.d.ts +5 -2
- package/dist/services/base/baseManyService.d.ts.map +1 -1
- package/dist/services/base/baseManyService.js +21 -9
- package/dist/services/base/baseOneService.d.ts +2 -1
- package/dist/services/base/baseOneService.d.ts.map +1 -1
- package/dist/services/base/baseOneService.js +7 -6
- package/dist/services/base/baseRemoteItemsService.js +4 -4
- package/dist/services/category.d.ts +7 -0
- package/dist/services/category.d.ts.map +1 -0
- package/dist/services/category.js +73 -0
- package/dist/services/channel/channel.d.ts +14 -9
- package/dist/services/channel/channel.d.ts.map +1 -1
- package/dist/services/channel/channel.js +161 -10
- package/dist/services/channel/channelCategory.d.ts +15 -0
- package/dist/services/channel/channelCategory.d.ts.map +1 -0
- package/dist/services/channel/channelCategory.js +45 -0
- package/dist/services/channel/channelPodroll.d.ts +1 -0
- package/dist/services/channel/channelPodroll.d.ts.map +1 -1
- package/dist/services/channel/channelPodroll.js +8 -0
- package/dist/services/channel/channelPodrollRemoteItem.d.ts +4 -8
- package/dist/services/channel/channelPodrollRemoteItem.d.ts.map +1 -1
- package/dist/services/channel/channelPodrollRemoteItem.js +8 -0
- package/dist/services/channel/channelPublisher.d.ts +4 -1
- package/dist/services/channel/channelPublisher.d.ts.map +1 -1
- package/dist/services/channel/channelPublisher.js +18 -2
- package/dist/services/channel/channelPublisherRemoteItem.d.ts +6 -9
- package/dist/services/channel/channelPublisherRemoteItem.d.ts.map +1 -1
- package/dist/services/channel/channelPublisherRemoteItem.js +10 -2
- package/dist/services/channel/channelRemoteItem.d.ts +4 -8
- package/dist/services/channel/channelRemoteItem.d.ts.map +1 -1
- package/dist/services/channel/channelRemoteItem.js +8 -0
- package/dist/services/channel/channelSeason.js +1 -1
- package/dist/services/channel/channelTrailer.d.ts +1 -1
- package/dist/services/channel/channelTrailer.d.ts.map +1 -1
- package/dist/services/clip.d.ts +25 -0
- package/dist/services/clip.d.ts.map +1 -0
- package/dist/services/clip.js +109 -0
- package/dist/services/feed/feed.d.ts +5 -2
- package/dist/services/feed/feed.d.ts.map +1 -1
- package/dist/services/feed/feed.js +38 -11
- package/dist/services/feed/feedFlagStatus.d.ts +4 -2
- package/dist/services/feed/feedFlagStatus.d.ts.map +1 -1
- package/dist/services/feed/feedFlagStatus.js +18 -3
- package/dist/services/item/item.d.ts +21 -10
- package/dist/services/item/item.d.ts.map +1 -1
- package/dist/services/item/item.js +275 -18
- package/dist/services/item/itemChapter.d.ts +3 -2
- package/dist/services/item/itemChapter.d.ts.map +1 -1
- package/dist/services/item/itemChapter.js +9 -3
- package/dist/services/item/itemFlagStatus.d.ts +6 -0
- package/dist/services/item/itemFlagStatus.d.ts.map +1 -0
- package/dist/services/item/itemFlagStatus.js +27 -0
- package/dist/services/item/itemSoundbite.d.ts +2 -2
- package/dist/services/item/itemSoundbite.d.ts.map +1 -1
- package/dist/services/item/itemSoundbite.js +3 -2
- package/dist/services/item/itemValueTimeSplitRemoteItem.d.ts +2 -7
- package/dist/services/item/itemValueTimeSplitRemoteItem.d.ts.map +1 -1
- package/dist/services/liveItem/liveItem.d.ts +4 -1
- package/dist/services/liveItem/liveItem.d.ts.map +1 -1
- package/dist/services/liveItem/liveItem.js +6 -1
- package/dist/services/medium.d.ts +2 -2
- package/dist/services/medium.d.ts.map +1 -1
- package/dist/services/medium.js +3 -3
- package/dist/services/membershipClaimToken.d.ts +17 -0
- package/dist/services/membershipClaimToken.d.ts.map +1 -0
- package/dist/services/membershipClaimToken.js +71 -0
- package/dist/services/playlist/playlist.d.ts +22 -0
- package/dist/services/playlist/playlist.d.ts.map +1 -0
- package/dist/services/playlist/playlist.js +74 -0
- package/dist/services/playlist/playlistResource.d.ts +51 -0
- package/dist/services/playlist/playlistResource.d.ts.map +1 -0
- package/dist/services/playlist/playlistResource.js +300 -0
- package/dist/services/queue/queue.d.ts +16 -0
- package/dist/services/queue/queue.d.ts.map +1 -0
- package/dist/services/queue/queue.js +57 -0
- package/dist/services/queue/queueResource.d.ts +65 -0
- package/dist/services/queue/queueResource.d.ts.map +1 -0
- package/dist/services/queue/queueResource.js +426 -0
- package/dist/services/stats/baseStatsAggregated.d.ts +35 -0
- package/dist/services/stats/baseStatsAggregated.d.ts.map +1 -0
- package/dist/services/stats/baseStatsAggregated.js +100 -0
- package/dist/services/stats/baseStatsTrackEvent.d.ts +18 -0
- package/dist/services/stats/baseStatsTrackEvent.d.ts.map +1 -0
- package/dist/services/stats/baseStatsTrackEvent.js +97 -0
- package/dist/services/stats/statsAggregatedAccount.d.ts +10 -0
- package/dist/services/stats/statsAggregatedAccount.d.ts.map +1 -0
- package/dist/services/stats/statsAggregatedAccount.js +36 -0
- package/dist/services/stats/statsAggregatedChannel.d.ts +10 -0
- package/dist/services/stats/statsAggregatedChannel.d.ts.map +1 -0
- package/dist/services/stats/statsAggregatedChannel.js +36 -0
- package/dist/services/stats/statsAggregatedClip.d.ts +10 -0
- package/dist/services/stats/statsAggregatedClip.d.ts.map +1 -0
- package/dist/services/stats/statsAggregatedClip.js +36 -0
- package/dist/services/stats/statsAggregatedItem.d.ts +10 -0
- package/dist/services/stats/statsAggregatedItem.d.ts.map +1 -0
- package/dist/services/stats/statsAggregatedItem.js +36 -0
- package/dist/services/stats/statsAggregatedPlaylist.d.ts +10 -0
- package/dist/services/stats/statsAggregatedPlaylist.d.ts.map +1 -0
- package/dist/services/stats/statsAggregatedPlaylist.js +36 -0
- package/dist/services/stats/statsTrackAccountGuid.d.ts +11 -0
- package/dist/services/stats/statsTrackAccountGuid.d.ts.map +1 -0
- package/dist/services/stats/statsTrackAccountGuid.js +56 -0
- package/dist/services/stats/statsTrackEventAccount.d.ts +13 -0
- package/dist/services/stats/statsTrackEventAccount.d.ts.map +1 -0
- package/dist/services/stats/statsTrackEventAccount.js +31 -0
- package/dist/services/stats/statsTrackEventChannel.d.ts +13 -0
- package/dist/services/stats/statsTrackEventChannel.d.ts.map +1 -0
- package/dist/services/stats/statsTrackEventChannel.js +31 -0
- package/dist/services/stats/statsTrackEventClip.d.ts +13 -0
- package/dist/services/stats/statsTrackEventClip.d.ts.map +1 -0
- package/dist/services/stats/statsTrackEventClip.js +31 -0
- package/dist/services/stats/statsTrackEventItem.d.ts +13 -0
- package/dist/services/stats/statsTrackEventItem.d.ts.map +1 -0
- package/dist/services/stats/statsTrackEventItem.js +31 -0
- package/dist/services/stats/statsTrackEventPlaylist.d.ts +13 -0
- package/dist/services/stats/statsTrackEventPlaylist.d.ts.map +1 -0
- package/dist/services/stats/statsTrackEventPlaylist.js +31 -0
- package/package.json +4 -4
- package/dist/entities/account/accountNotification.d.ts.map +0 -1
- package/dist/entities/playlist/playlistResourceBase.d.ts +0 -7
- package/dist/entities/playlist/playlistResourceBase.d.ts.map +0 -1
- package/dist/entities/playlist/playlistResourceClip.d.ts +0 -6
- package/dist/entities/playlist/playlistResourceClip.d.ts.map +0 -1
- package/dist/entities/playlist/playlistResourceClip.js +0 -26
- package/dist/entities/playlist/playlistResourceItem.d.ts +0 -6
- package/dist/entities/playlist/playlistResourceItem.d.ts.map +0 -1
- package/dist/entities/playlist/playlistResourceItem.js +0 -26
- package/dist/entities/playlist/playlistResourceItemAddByRSS.d.ts +0 -5
- package/dist/entities/playlist/playlistResourceItemAddByRSS.d.ts.map +0 -1
- package/dist/entities/playlist/playlistResourceItemAddByRSS.js +0 -24
- package/dist/entities/playlist/playlistResourceItemChapter.d.ts +0 -6
- package/dist/entities/playlist/playlistResourceItemChapter.d.ts.map +0 -1
- package/dist/entities/playlist/playlistResourceItemChapter.js +0 -26
- package/dist/entities/playlist/playlistResourceItemSoundbite.d.ts +0 -6
- package/dist/entities/playlist/playlistResourceItemSoundbite.d.ts.map +0 -1
- package/dist/entities/playlist/playlistResourceItemSoundbite.js +0 -26
- package/dist/entities/queue/queueResourceBase.d.ts +0 -10
- package/dist/entities/queue/queueResourceBase.d.ts.map +0 -1
- package/dist/entities/queue/queueResourceBase.js +0 -45
- package/dist/entities/queue/queueResourceClip.d.ts +0 -6
- package/dist/entities/queue/queueResourceClip.d.ts.map +0 -1
- package/dist/entities/queue/queueResourceClip.js +0 -27
- package/dist/entities/queue/queueResourceItem.d.ts +0 -6
- package/dist/entities/queue/queueResourceItem.d.ts.map +0 -1
- package/dist/entities/queue/queueResourceItem.js +0 -27
- package/dist/entities/queue/queueResourceItemAddByRSS.d.ts +0 -5
- package/dist/entities/queue/queueResourceItemAddByRSS.d.ts.map +0 -1
- package/dist/entities/queue/queueResourceItemAddByRSS.js +0 -25
- package/dist/entities/queue/queueResourceItemChapter.d.ts +0 -6
- package/dist/entities/queue/queueResourceItemChapter.d.ts.map +0 -1
- package/dist/entities/queue/queueResourceItemChapter.js +0 -27
- package/dist/entities/queue/queueResourceItemSoundbite.d.ts +0 -6
- package/dist/entities/queue/queueResourceItemSoundbite.d.ts.map +0 -1
- package/dist/entities/queue/queueResourceItemSoundbite.js +0 -27
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EntityManager } from 'typeorm';
|
|
2
|
+
import { Account } from '@orm/entities/account/account';
|
|
3
|
+
import { AccountProfile } from '@orm/entities/account/accountProfile';
|
|
4
|
+
import { BaseOneService } from '@orm/services/base/baseOneService';
|
|
5
|
+
export type AccountProfileDto = {
|
|
6
|
+
display_name?: string | null;
|
|
7
|
+
bio?: string | null;
|
|
8
|
+
};
|
|
9
|
+
export declare class AccountProfileService extends BaseOneService<AccountProfile, 'account'> {
|
|
10
|
+
constructor(transactionalEntityManager?: EntityManager);
|
|
11
|
+
update(account: Account, dto: AccountProfileDto): Promise<AccountProfile>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=accountProfile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountProfile.d.ts","sourceRoot":"","sources":["../../../src/services/account/accountProfile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEnE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF,qBAAa,qBAAsB,SAAQ,cAAc,CAAC,cAAc,EAAE,SAAS,CAAC;gBACtE,0BAA0B,CAAC,EAAE,aAAa;IAIhD,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC;CAQhF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AccountProfileService = void 0;
|
|
13
|
+
const accountProfile_1 = require("@orm/entities/account/accountProfile");
|
|
14
|
+
const baseOneService_1 = require("@orm/services/base/baseOneService");
|
|
15
|
+
class AccountProfileService extends baseOneService_1.BaseOneService {
|
|
16
|
+
constructor(transactionalEntityManager) {
|
|
17
|
+
super(accountProfile_1.AccountProfile, 'account', transactionalEntityManager);
|
|
18
|
+
}
|
|
19
|
+
update(account, dto) {
|
|
20
|
+
const _super = Object.create(null, {
|
|
21
|
+
_update: { get: () => super._update }
|
|
22
|
+
});
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const finalDto = {
|
|
25
|
+
display_name: dto.display_name,
|
|
26
|
+
bio: dto.bio
|
|
27
|
+
};
|
|
28
|
+
return _super._update.call(this, account, finalDto);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.AccountProfileService = AccountProfileService;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EntityManager } from 'typeorm';
|
|
2
|
+
import { Account } from '@orm/entities/account/account';
|
|
3
|
+
import { AccountResetPassword } from '@orm/entities/account/accountResetPassword';
|
|
4
|
+
import { BaseOneService } from '@orm/services/base/baseOneService';
|
|
5
|
+
export type AccountResetPasswordDto = {
|
|
6
|
+
reset_token: string;
|
|
7
|
+
reset_token_expires_at: Date;
|
|
8
|
+
};
|
|
9
|
+
export declare class AccountResetPasswordService extends BaseOneService<AccountResetPassword, 'account'> {
|
|
10
|
+
constructor(transactionalEntityManager?: EntityManager);
|
|
11
|
+
get(account: Account): Promise<AccountResetPassword | null>;
|
|
12
|
+
getByToken(reset_token: string): Promise<AccountResetPassword | null>;
|
|
13
|
+
update(account: Account, dto: AccountResetPasswordDto): Promise<AccountResetPasswordDto>;
|
|
14
|
+
deleteByAccountId(account_id: number): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=accountResetPassword.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountResetPassword.d.ts","sourceRoot":"","sources":["../../../src/services/account/accountResetPassword.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEnE,MAAM,MAAM,uBAAuB,GAAG;IACpC,WAAW,EAAE,MAAM,CAAA;IACnB,sBAAsB,EAAE,IAAI,CAAA;CAC7B,CAAA;AAED,qBAAa,2BAA4B,SAAQ,cAAc,CAAC,oBAAoB,EAAE,SAAS,CAAC;gBAClF,0BAA0B,CAAC,EAAE,aAAa;IAIhD,GAAG,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAI3D,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAOrE,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAIxF,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG3D"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AccountResetPasswordService = void 0;
|
|
13
|
+
const accountResetPassword_1 = require("@orm/entities/account/accountResetPassword");
|
|
14
|
+
const baseOneService_1 = require("@orm/services/base/baseOneService");
|
|
15
|
+
class AccountResetPasswordService extends baseOneService_1.BaseOneService {
|
|
16
|
+
constructor(transactionalEntityManager) {
|
|
17
|
+
super(accountResetPassword_1.AccountResetPassword, 'account', transactionalEntityManager);
|
|
18
|
+
}
|
|
19
|
+
get(account) {
|
|
20
|
+
const _super = Object.create(null, {
|
|
21
|
+
_get: { get: () => super._get }
|
|
22
|
+
});
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
return _super._get.call(this, account);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
getByToken(reset_token) {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
return this.repositoryRead.findOne({
|
|
30
|
+
where: { reset_token },
|
|
31
|
+
relations: ['account']
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
update(account, dto) {
|
|
36
|
+
const _super = Object.create(null, {
|
|
37
|
+
_update: { get: () => super._update }
|
|
38
|
+
});
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
return _super._update.call(this, account, dto);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
deleteByAccountId(account_id) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
yield this.repositoryReadWrite.delete({ account: { id: account_id } });
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.AccountResetPasswordService = AccountResetPasswordService;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EntityManager } from 'typeorm';
|
|
2
|
+
import { Account } from '@orm/entities/account/account';
|
|
3
|
+
import { AccountVerification } from '@orm/entities/account/accountVerification';
|
|
4
|
+
import { BaseOneService } from '@orm/services/base/baseOneService';
|
|
5
|
+
export type AccountVerificationDto = {
|
|
6
|
+
verification_token: string;
|
|
7
|
+
verification_token_expires_at: Date;
|
|
8
|
+
};
|
|
9
|
+
export declare class AccountVerificationService extends BaseOneService<AccountVerification, 'account'> {
|
|
10
|
+
constructor(transactionalEntityManager?: EntityManager);
|
|
11
|
+
get(account: Account): Promise<AccountVerification | null>;
|
|
12
|
+
getByToken(verification_token: string): Promise<AccountVerification | null>;
|
|
13
|
+
update(account: Account, dto: AccountVerificationDto): Promise<AccountVerificationDto>;
|
|
14
|
+
deleteByAccountId(account_id: number): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=accountVerification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountVerification.d.ts","sourceRoot":"","sources":["../../../src/services/account/accountVerification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEnE,MAAM,MAAM,sBAAsB,GAAG;IACnC,kBAAkB,EAAE,MAAM,CAAA;IAC1B,6BAA6B,EAAE,IAAI,CAAA;CACpC,CAAA;AAED,qBAAa,0BAA2B,SAAQ,cAAc,CAAC,mBAAmB,EAAE,SAAS,CAAC;gBAChF,0BAA0B,CAAC,EAAE,aAAa;IAIhD,GAAG,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC;IAI1D,UAAU,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC;IAO3E,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAItF,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG3D"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AccountVerificationService = void 0;
|
|
13
|
+
const accountVerification_1 = require("@orm/entities/account/accountVerification");
|
|
14
|
+
const baseOneService_1 = require("@orm/services/base/baseOneService");
|
|
15
|
+
class AccountVerificationService extends baseOneService_1.BaseOneService {
|
|
16
|
+
constructor(transactionalEntityManager) {
|
|
17
|
+
super(accountVerification_1.AccountVerification, 'account', transactionalEntityManager);
|
|
18
|
+
}
|
|
19
|
+
get(account) {
|
|
20
|
+
const _super = Object.create(null, {
|
|
21
|
+
_get: { get: () => super._get }
|
|
22
|
+
});
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
return _super._get.call(this, account);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
getByToken(verification_token) {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
return this.repositoryRead.findOne({
|
|
30
|
+
where: { verification_token },
|
|
31
|
+
relations: ['account']
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
update(account, dto) {
|
|
36
|
+
const _super = Object.create(null, {
|
|
37
|
+
_update: { get: () => super._update }
|
|
38
|
+
});
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
return _super._update.call(this, account, dto);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
deleteByAccountId(account_id) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
yield this.repositoryReadWrite.delete({ account: { id: account_id } });
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.AccountVerificationService = AccountVerificationService;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Feed } from '@orm/entities/feed/feed';
|
|
2
|
+
import { Item } from '@orm/entities/item/item';
|
|
3
|
+
export declare class ArchiverService {
|
|
4
|
+
private itemRepositoryRead;
|
|
5
|
+
private itemRepositoryReadWrite;
|
|
6
|
+
private feedRepositoryRead;
|
|
7
|
+
private feedRepositoryReadWrite;
|
|
8
|
+
private playlistResourceRepository;
|
|
9
|
+
private clipRepository;
|
|
10
|
+
getItemsPendingArchive(): Promise<Item[]>;
|
|
11
|
+
getFeedsPendingArchive(): Promise<Feed[]>;
|
|
12
|
+
private processItems;
|
|
13
|
+
processPendingArchiveFeeds(): Promise<void>;
|
|
14
|
+
processPendingArchiveItems(): Promise<void>;
|
|
15
|
+
archiveAll(): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=archiver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"archiver.d.ts","sourceRoot":"","sources":["../../src/services/archiver.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE/C,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAK/C,qBAAa,eAAe;IAC1B,OAAO,CAAC,kBAAkB,CAAyC;IACnE,OAAO,CAAC,uBAAuB,CAA8C;IAC7E,OAAO,CAAC,kBAAkB,CAAyC;IACnE,OAAO,CAAC,uBAAuB,CAA8C;IAC7E,OAAO,CAAC,0BAA0B,CAAqD;IACvF,OAAO,CAAC,cAAc,CAAyC;IAEzD,sBAAsB,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;IAsBzC,sBAAsB,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YAWjC,YAAY;IAmBpB,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC;IAkC3C,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC;IAY3C,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAIlC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ArchiverService = void 0;
|
|
13
|
+
const db_1 = require("@orm/db");
|
|
14
|
+
const clip_1 = require("@orm/entities/clip");
|
|
15
|
+
const feed_1 = require("@orm/entities/feed/feed");
|
|
16
|
+
const feedFlagStatus_1 = require("@orm/entities/feed/feedFlagStatus");
|
|
17
|
+
const item_1 = require("@orm/entities/item/item");
|
|
18
|
+
const itemFlagStatus_1 = require("@orm/entities/item/itemFlagStatus");
|
|
19
|
+
const playlistResource_1 = require("@orm/entities/playlist/playlistResource");
|
|
20
|
+
const itemFlagStatus_2 = require("./item/itemFlagStatus");
|
|
21
|
+
class ArchiverService {
|
|
22
|
+
constructor() {
|
|
23
|
+
this.itemRepositoryRead = db_1.AppDataSourceRead.getRepository(item_1.Item);
|
|
24
|
+
this.itemRepositoryReadWrite = db_1.AppDataSourceReadWrite.getRepository(item_1.Item);
|
|
25
|
+
this.feedRepositoryRead = db_1.AppDataSourceRead.getRepository(feed_1.Feed);
|
|
26
|
+
this.feedRepositoryReadWrite = db_1.AppDataSourceReadWrite.getRepository(feed_1.Feed);
|
|
27
|
+
this.playlistResourceRepository = db_1.AppDataSourceRead.getRepository(playlistResource_1.PlaylistResource);
|
|
28
|
+
this.clipRepository = db_1.AppDataSourceRead.getRepository(clip_1.Clip);
|
|
29
|
+
}
|
|
30
|
+
getItemsPendingArchive() {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
return this.itemRepositoryRead.find({
|
|
33
|
+
where: [
|
|
34
|
+
{
|
|
35
|
+
item_flag_status: {
|
|
36
|
+
id: itemFlagStatus_1.ItemFlagStatusStatusEnum.PendingArchive,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
channel: {
|
|
41
|
+
feed: {
|
|
42
|
+
feed_flag_status: {
|
|
43
|
+
id: feedFlagStatus_1.FeedFlagStatusStatusEnum.PendingArchive,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
relations: ['channel', 'channel.feed', 'item_flag_status', 'channel.feed.feed_flag_status'],
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
getFeedsPendingArchive() {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
return this.feedRepositoryRead.find({
|
|
56
|
+
where: {
|
|
57
|
+
feed_flag_status: {
|
|
58
|
+
id: feedFlagStatus_1.FeedFlagStatusStatusEnum.PendingArchive,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
relations: ['channel', 'channel.items', 'feed_flag_status'],
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
processItems(items, archivedStatus) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
for (const item of items) {
|
|
68
|
+
const hasPlaylistResource = yield this.playlistResourceRepository.findOne({
|
|
69
|
+
where: { item: { id: item.id } },
|
|
70
|
+
});
|
|
71
|
+
const hasClip = yield this.clipRepository.findOne({
|
|
72
|
+
where: { item: { id: item.id } },
|
|
73
|
+
});
|
|
74
|
+
if (hasPlaylistResource || hasClip) {
|
|
75
|
+
item.item_flag_status = archivedStatus;
|
|
76
|
+
yield this.itemRepositoryReadWrite.save(item);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
yield this.itemRepositoryReadWrite.delete(item.id);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
processPendingArchiveFeeds() {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
const feeds = yield this.getFeedsPendingArchive();
|
|
87
|
+
const itemFlagStatusService = new itemFlagStatus_2.ItemFlagStatusService();
|
|
88
|
+
const archivedStatus = yield itemFlagStatusService.get(itemFlagStatus_1.ItemFlagStatusStatusEnum.Archived);
|
|
89
|
+
if (!archivedStatus) {
|
|
90
|
+
throw new Error('Archived item_flag_status not found');
|
|
91
|
+
}
|
|
92
|
+
for (const feed of feeds) {
|
|
93
|
+
const channel = feed.channel;
|
|
94
|
+
if (!channel) {
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
const items = yield this.itemRepositoryRead.find({
|
|
98
|
+
where: {
|
|
99
|
+
channel: feed.channel
|
|
100
|
+
},
|
|
101
|
+
relations: ['item_flag_status']
|
|
102
|
+
});
|
|
103
|
+
if (items.length === 0) {
|
|
104
|
+
yield this.feedRepositoryReadWrite.delete(feed.id);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
const activeOrPendingItems = items.filter(item => [itemFlagStatus_1.ItemFlagStatusStatusEnum.Active, itemFlagStatus_1.ItemFlagStatusStatusEnum.PendingArchive].includes(item.item_flag_status.id));
|
|
108
|
+
yield this.processItems(activeOrPendingItems, archivedStatus);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
processPendingArchiveItems() {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
const items = yield this.getItemsPendingArchive();
|
|
116
|
+
const itemFlagStatusService = new itemFlagStatus_2.ItemFlagStatusService();
|
|
117
|
+
const archivedStatus = yield itemFlagStatusService.get(itemFlagStatus_1.ItemFlagStatusStatusEnum.Archived);
|
|
118
|
+
if (!archivedStatus) {
|
|
119
|
+
throw new Error('Archived item_flag_status not found');
|
|
120
|
+
}
|
|
121
|
+
yield this.processItems(items, archivedStatus);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
archiveAll() {
|
|
125
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
+
yield this.processPendingArchiveFeeds();
|
|
127
|
+
yield this.processPendingArchiveItems();
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
exports.ArchiverService = ArchiverService;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FindManyOptions, FindOneOptions, ObjectLiteral, Repository } from "typeorm";
|
|
2
|
+
interface EntityWithId extends ObjectLiteral {
|
|
3
|
+
id: number;
|
|
4
|
+
}
|
|
5
|
+
export declare class BaseGetOnlyService<T extends EntityWithId> {
|
|
6
|
+
protected repositoryRead: Repository<T>;
|
|
7
|
+
constructor(entity: {
|
|
8
|
+
new (): T;
|
|
9
|
+
});
|
|
10
|
+
get(id: number, config?: FindOneOptions<T>): Promise<T | null>;
|
|
11
|
+
getMany(config?: FindManyOptions<T>): Promise<T[]>;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=baseGetOnlyService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseGetOnlyService.d.ts","sourceRoot":"","sources":["../../../src/services/base/baseGetOnlyService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAoB,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGvG,UAAU,YAAa,SAAQ,aAAa;IAC1C,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,qBAAa,kBAAkB,CAAC,CAAC,SAAS,YAAY;IACpD,SAAS,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;gBAE5B,MAAM,EAAE;QAAE,QAAQ,CAAC,CAAA;KAAE;IAI3B,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAK9D,OAAO,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;CAGzD"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.BaseGetOnlyService = void 0;
|
|
13
|
+
const db_1 = require("@orm/db");
|
|
14
|
+
class BaseGetOnlyService {
|
|
15
|
+
constructor(entity) {
|
|
16
|
+
this.repositoryRead = db_1.AppDataSourceRead.getRepository(entity);
|
|
17
|
+
}
|
|
18
|
+
get(id, config) {
|
|
19
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
const where = { id };
|
|
21
|
+
return this.repositoryRead.findOne(Object.assign({ where }, config));
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
getMany(config) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
return this.repositoryRead.find(config);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.BaseGetOnlyService = BaseGetOnlyService;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EntityManager, FindManyOptions, FindOneOptions, ObjectLiteral, Repository } from "typeorm";
|
|
2
2
|
export declare class BaseManyService<T extends ObjectLiteral, K extends keyof T> {
|
|
3
|
-
protected
|
|
3
|
+
protected repositoryRead: Repository<T>;
|
|
4
|
+
protected repositoryReadWrite: Repository<T>;
|
|
4
5
|
protected parentEntityKey: K;
|
|
5
6
|
protected targetEntity: {
|
|
6
7
|
new (): T;
|
|
@@ -11,8 +12,10 @@ export declare class BaseManyService<T extends ObjectLiteral, K extends keyof T>
|
|
|
11
12
|
}, parentEntityKey: K, transactionalEntityManager?: EntityManager);
|
|
12
13
|
_getAll(parentEntity: T[K], config?: FindManyOptions<T>): Promise<T[]>;
|
|
13
14
|
_get(parentEntity: T[K], whereKeyValues: Record<string, unknown>, config?: FindOneOptions<T>): Promise<T | null>;
|
|
14
|
-
_update(parentEntity: T[K], whereKeys: (keyof T)[],
|
|
15
|
+
_update(parentEntity: T[K], whereKeys: (keyof T)[], // If whereKeys is empty, it will always create a new entity
|
|
16
|
+
dto: Partial<T>, config?: FindOneOptions<T>, existingEntity?: T): Promise<T>;
|
|
15
17
|
_updateMany(parentEntity: T[K], whereKeys: (keyof T)[], dtos: Partial<T>[], config?: FindOneOptions<T>): Promise<T[]>;
|
|
18
|
+
_delete(parentEntity: T[K], whereKeyValues: Record<string, unknown>): Promise<void>;
|
|
16
19
|
_deleteAll(value: T[K]): Promise<void>;
|
|
17
20
|
}
|
|
18
21
|
//# sourceMappingURL=baseManyService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseManyService.d.ts","sourceRoot":"","sources":["../../../src/services/base/baseManyService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAoB,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAMtH,qBAAa,eAAe,CAAC,CAAC,SAAS,aAAa,EAAE,CAAC,SAAS,MAAM,CAAC;IACrE,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"baseManyService.d.ts","sourceRoot":"","sources":["../../../src/services/base/baseManyService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAoB,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAMtH,qBAAa,eAAe,CAAC,CAAC,SAAS,aAAa,EAAE,CAAC,SAAS,MAAM,CAAC;IACrE,SAAS,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IACxC,SAAS,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC7C,SAAS,CAAC,eAAe,EAAE,CAAC,CAAC;IAC7B,SAAS,CAAC,YAAY,EAAE;QAAE,QAAQ,CAAC,CAAA;KAAE,CAAC;IACtC,OAAO,CAAC,0BAA0B,CAAC,CAAgB;gBAEvC,YAAY,EAAE;QAAE,QAAQ,CAAC,CAAA;KAAE,EAAE,eAAe,EAAE,CAAC,EAAE,0BAA0B,CAAC,EAAE,aAAa;IAQ1F,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAKtE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,CAAC,MAAM,EAAC,OAAO,CAAC,EAAE,MAAM,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAQ/G,OAAO,CAClB,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,EAClB,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,4DAA4D;IACpF,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,EACf,MAAM,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,EAC1B,cAAc,CAAC,EAAE,CAAC,GAChB,OAAO,CAAC,CAAC,CAAC;IA6BD,WAAW,CACtB,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,EAClB,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,EACtB,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,EAClB,MAAM,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,GACzB,OAAO,CAAC,CAAC,EAAE,CAAC;IAsDF,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAcnF,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAOpD"}
|
|
@@ -18,22 +18,24 @@ class BaseManyService {
|
|
|
18
18
|
constructor(targetEntity, parentEntityKey, transactionalEntityManager) {
|
|
19
19
|
this.targetEntity = targetEntity;
|
|
20
20
|
this.parentEntityKey = parentEntityKey;
|
|
21
|
-
this.
|
|
21
|
+
this.repositoryRead = db_1.AppDataSourceRead.getRepository(targetEntity);
|
|
22
|
+
this.repositoryReadWrite = db_1.AppDataSourceReadWrite.getRepository(targetEntity);
|
|
22
23
|
this.transactionalEntityManager = transactionalEntityManager;
|
|
23
24
|
}
|
|
24
25
|
_getAll(parentEntity, config) {
|
|
25
26
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
27
|
const where = { [this.parentEntityKey]: parentEntity };
|
|
27
|
-
return this.
|
|
28
|
+
return this.repositoryRead.find(Object.assign({ where }, config));
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
31
|
_get(parentEntity, whereKeyValues, config) {
|
|
31
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
33
|
const where = Object.assign({ [this.parentEntityKey]: parentEntity }, whereKeyValues);
|
|
33
|
-
return this.
|
|
34
|
+
return this.repositoryRead.findOne(Object.assign({ where }, config));
|
|
34
35
|
});
|
|
35
36
|
}
|
|
36
|
-
_update(parentEntity, whereKeys,
|
|
37
|
+
_update(parentEntity, whereKeys, // If whereKeys is empty, it will always create a new entity
|
|
38
|
+
dto, config, existingEntity) {
|
|
37
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
40
|
var _a;
|
|
39
41
|
const whereObject = {};
|
|
@@ -43,7 +45,7 @@ class BaseManyService {
|
|
|
43
45
|
}
|
|
44
46
|
});
|
|
45
47
|
let entity = existingEntity || null;
|
|
46
|
-
if (!entity) {
|
|
48
|
+
if (!entity && Object.keys(whereObject).length > 0) {
|
|
47
49
|
entity = yield this._get(parentEntity, whereObject, config);
|
|
48
50
|
}
|
|
49
51
|
if (!entity) {
|
|
@@ -56,7 +58,7 @@ class BaseManyService {
|
|
|
56
58
|
entity = (0, applyProperties_1.applyProperties)(entity, dto);
|
|
57
59
|
podverse_helpers_1.logger.debug(`Updating entity ${JSON.stringify(entity)}`);
|
|
58
60
|
podverse_helpers_1.logger.debug(`With DTO ${JSON.stringify(dto)}`);
|
|
59
|
-
return ((_a = this.transactionalEntityManager) !== null && _a !== void 0 ? _a : this.
|
|
61
|
+
return ((_a = this.transactionalEntityManager) !== null && _a !== void 0 ? _a : this.repositoryReadWrite).save(entity);
|
|
60
62
|
});
|
|
61
63
|
}
|
|
62
64
|
_updateMany(parentEntity, whereKeys, dtos, config) {
|
|
@@ -89,7 +91,7 @@ class BaseManyService {
|
|
|
89
91
|
const updatedEntity = yield this._update(parentEntity, whereKeys, uniqueDto, config, matchingEntity);
|
|
90
92
|
updatedEntities.push(updatedEntity);
|
|
91
93
|
}
|
|
92
|
-
yield ((_a = this.transactionalEntityManager) !== null && _a !== void 0 ? _a : this.
|
|
94
|
+
yield ((_a = this.transactionalEntityManager) !== null && _a !== void 0 ? _a : this.repositoryReadWrite).save(updatedEntities);
|
|
93
95
|
const entitiesToDelete = existingEntities.filter(existingEntity => {
|
|
94
96
|
let identifier = {};
|
|
95
97
|
for (const whereKey of whereKeys) {
|
|
@@ -98,17 +100,27 @@ class BaseManyService {
|
|
|
98
100
|
return !existingIdentifiers.some(existingIdentifier => JSON.stringify(existingIdentifier) === JSON.stringify(identifier));
|
|
99
101
|
});
|
|
100
102
|
if (entitiesToDelete.length > 0) {
|
|
101
|
-
yield ((_b = this.transactionalEntityManager) !== null && _b !== void 0 ? _b : this.
|
|
103
|
+
yield ((_b = this.transactionalEntityManager) !== null && _b !== void 0 ? _b : this.repositoryReadWrite).remove(entitiesToDelete);
|
|
102
104
|
}
|
|
103
105
|
return updatedEntities;
|
|
104
106
|
});
|
|
105
107
|
}
|
|
108
|
+
_delete(parentEntity, whereKeyValues) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
var _a;
|
|
111
|
+
const where = Object.assign({ [this.parentEntityKey]: parentEntity }, whereKeyValues);
|
|
112
|
+
const rowToDelete = yield this.repositoryRead.findOne({ where });
|
|
113
|
+
if (rowToDelete) {
|
|
114
|
+
yield ((_a = this.transactionalEntityManager) !== null && _a !== void 0 ? _a : this.repositoryReadWrite).remove(rowToDelete);
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
}
|
|
106
118
|
_deleteAll(value) {
|
|
107
119
|
return __awaiter(this, void 0, void 0, function* () {
|
|
108
120
|
var _a;
|
|
109
121
|
const rowsToDelete = yield this._getAll(value);
|
|
110
122
|
if (rowsToDelete) {
|
|
111
|
-
yield ((_a = this.transactionalEntityManager) !== null && _a !== void 0 ? _a : this.
|
|
123
|
+
yield ((_a = this.transactionalEntityManager) !== null && _a !== void 0 ? _a : this.repositoryReadWrite).remove(rowsToDelete);
|
|
112
124
|
}
|
|
113
125
|
});
|
|
114
126
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EntityManager, FindOneOptions, ObjectLiteral, Repository } from "typeorm";
|
|
2
2
|
export declare class BaseOneService<T extends ObjectLiteral, K extends keyof T> {
|
|
3
3
|
private parentEntityKey;
|
|
4
|
-
protected
|
|
4
|
+
protected repositoryRead: Repository<T>;
|
|
5
|
+
protected repositoryReadWrite: Repository<T>;
|
|
5
6
|
private transactionalEntityManager?;
|
|
6
7
|
constructor(entity: {
|
|
7
8
|
new (): T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseOneService.d.ts","sourceRoot":"","sources":["../../../src/services/base/baseOneService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAoB,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAKrG,qBAAa,cAAc,CAAC,CAAC,SAAS,aAAa,EAAE,CAAC,SAAS,MAAM,CAAC;IACpE,OAAO,CAAC,eAAe,CAAI;IAC3B,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"baseOneService.d.ts","sourceRoot":"","sources":["../../../src/services/base/baseOneService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAoB,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAKrG,qBAAa,cAAc,CAAC,CAAC,SAAS,aAAa,EAAE,CAAC,SAAS,MAAM,CAAC;IACpE,OAAO,CAAC,eAAe,CAAI;IAC3B,SAAS,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IACxC,SAAS,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC7C,OAAO,CAAC,0BAA0B,CAAC,CAAgB;gBAEvC,MAAM,EAAE;QAAE,QAAQ,CAAC,CAAA;KAAE,EAAE,eAAe,EAAE,CAAC,EAAE,0BAA0B,CAAC,EAAE,aAAa;IAO3F,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAKvE,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAkB7E,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAMxD"}
|
|
@@ -17,13 +17,14 @@ const hasDifferentValues_1 = require("@orm/lib/hasDifferentValues");
|
|
|
17
17
|
class BaseOneService {
|
|
18
18
|
constructor(entity, parentEntityKey, transactionalEntityManager) {
|
|
19
19
|
this.parentEntityKey = parentEntityKey;
|
|
20
|
-
this.
|
|
20
|
+
this.repositoryRead = db_1.AppDataSourceRead.getRepository(entity);
|
|
21
|
+
this.repositoryReadWrite = db_1.AppDataSourceReadWrite.getRepository(entity);
|
|
21
22
|
this.transactionalEntityManager = transactionalEntityManager;
|
|
22
23
|
}
|
|
23
24
|
_get(parentEntity, config) {
|
|
24
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
const where = { [this.parentEntityKey]: parentEntity };
|
|
26
|
-
return this.
|
|
26
|
+
const where = { [this.parentEntityKey]: { id: parentEntity.id } };
|
|
27
|
+
return this.repositoryRead.findOne(Object.assign({ where }, config));
|
|
27
28
|
});
|
|
28
29
|
}
|
|
29
30
|
_update(parentEntity, dto, config) {
|
|
@@ -31,7 +32,7 @@ class BaseOneService {
|
|
|
31
32
|
var _a;
|
|
32
33
|
let entity = yield this._get(parentEntity, config);
|
|
33
34
|
if (!entity) {
|
|
34
|
-
entity = new this.
|
|
35
|
+
entity = new this.repositoryReadWrite.target();
|
|
35
36
|
entity[this.parentEntityKey] = parentEntity;
|
|
36
37
|
}
|
|
37
38
|
else if (!(0, hasDifferentValues_1.hasDifferentValues)(entity, dto)) {
|
|
@@ -40,14 +41,14 @@ class BaseOneService {
|
|
|
40
41
|
entity = (0, applyProperties_1.applyProperties)(entity, dto);
|
|
41
42
|
podverse_helpers_1.logger.debug(`Updating entity ${JSON.stringify(entity)}`);
|
|
42
43
|
podverse_helpers_1.logger.debug(`With DTO ${JSON.stringify(dto)}`);
|
|
43
|
-
return ((_a = this.transactionalEntityManager) !== null && _a !== void 0 ? _a : this.
|
|
44
|
+
return ((_a = this.transactionalEntityManager) !== null && _a !== void 0 ? _a : this.repositoryReadWrite).save(entity);
|
|
44
45
|
});
|
|
45
46
|
}
|
|
46
47
|
_delete(parentEntity) {
|
|
47
48
|
return __awaiter(this, void 0, void 0, function* () {
|
|
48
49
|
const rowToDelete = yield this._get(parentEntity);
|
|
49
50
|
if (rowToDelete) {
|
|
50
|
-
yield this.
|
|
51
|
+
yield this.repositoryReadWrite.remove(rowToDelete);
|
|
51
52
|
}
|
|
52
53
|
});
|
|
53
54
|
}
|
|
@@ -15,7 +15,7 @@ class BaseRemoteItemsService extends baseManyService_1.BaseManyService {
|
|
|
15
15
|
getAll(parentEntity) {
|
|
16
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
17
|
const where = { [this.parentEntityKey]: parentEntity };
|
|
18
|
-
return this.
|
|
18
|
+
return this.repositoryRead.find({ where });
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
getByItemGuid(parentEntity, item_guid) {
|
|
@@ -24,7 +24,7 @@ class BaseRemoteItemsService extends baseManyService_1.BaseManyService {
|
|
|
24
24
|
[this.parentEntityKey]: parentEntity,
|
|
25
25
|
item_guid
|
|
26
26
|
};
|
|
27
|
-
return this.
|
|
27
|
+
return this.repositoryRead.findOne({ where });
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
getByFeedGuid(parentEntity, feed_guid) {
|
|
@@ -33,7 +33,7 @@ class BaseRemoteItemsService extends baseManyService_1.BaseManyService {
|
|
|
33
33
|
[this.parentEntityKey]: parentEntity,
|
|
34
34
|
feed_guid
|
|
35
35
|
};
|
|
36
|
-
return this.
|
|
36
|
+
return this.repositoryRead.findOne({ where });
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
getByFeedUrl(parentEntity, feed_url) {
|
|
@@ -42,7 +42,7 @@ class BaseRemoteItemsService extends baseManyService_1.BaseManyService {
|
|
|
42
42
|
[this.parentEntityKey]: parentEntity,
|
|
43
43
|
feed_url
|
|
44
44
|
};
|
|
45
|
-
return this.
|
|
45
|
+
return this.repositoryRead.findOne({ where });
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
get(parentEntity, dto) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../src/services/category.ts"],"names":[],"mappings":"AAMA,qBAAa,eAAe;IAC1B,OAAO,CAAC,cAAc,CAA6C;IAG7D,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC;IAapC,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAoCjC,MAAM,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;CAG/B"}
|