podverse-parser 1.0.0 → 5.0.0-beta.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.
Files changed (211) hide show
  1. package/.nvmrc +1 -0
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +7 -81
  5. package/dist/lib/chapters/chapters.d.ts +3 -0
  6. package/dist/lib/chapters/chapters.d.ts.map +1 -0
  7. package/dist/lib/chapters/chapters.js +59 -0
  8. package/dist/lib/compat/channel.d.ts +108 -0
  9. package/dist/lib/compat/channel.d.ts.map +1 -0
  10. package/dist/lib/compat/channel.js +279 -0
  11. package/dist/lib/compat/chapters/chapters.d.ts +11 -0
  12. package/dist/lib/compat/chapters/chapters.d.ts.map +1 -0
  13. package/dist/lib/compat/chapters/chapters.js +16 -0
  14. package/dist/lib/compat/partytime/channel.d.ts +110 -0
  15. package/dist/lib/compat/partytime/channel.d.ts.map +1 -0
  16. package/dist/lib/compat/partytime/channel.js +281 -0
  17. package/dist/lib/compat/partytime/compatFull.d.ts +6 -0
  18. package/dist/lib/compat/partytime/compatFull.d.ts.map +1 -0
  19. package/dist/lib/compat/partytime/compatFull.js +11 -0
  20. package/dist/lib/compat/partytime/funding.d.ts +6 -0
  21. package/dist/lib/compat/partytime/funding.d.ts.map +1 -0
  22. package/dist/lib/compat/partytime/funding.js +10 -0
  23. package/dist/lib/compat/partytime/item.d.ts +146 -0
  24. package/dist/lib/compat/partytime/item.d.ts.map +1 -0
  25. package/dist/lib/compat/partytime/item.js +264 -0
  26. package/dist/lib/compat/partytime/liveItem.d.ts +11 -0
  27. package/dist/lib/compat/partytime/liveItem.d.ts.map +1 -0
  28. package/dist/lib/compat/partytime/liveItem.js +20 -0
  29. package/dist/lib/compat/partytime/value.d.ts +62 -0
  30. package/dist/lib/compat/partytime/value.d.ts.map +1 -0
  31. package/dist/lib/compat/partytime/value.js +69 -0
  32. package/dist/lib/rss/base/handleParsedManyData.d.ts +7 -0
  33. package/dist/lib/rss/base/handleParsedManyData.d.ts.map +1 -0
  34. package/dist/lib/rss/base/handleParsedManyData.js +21 -0
  35. package/dist/lib/rss/base/handleParsedOneData.d.ts +7 -0
  36. package/dist/lib/rss/base/handleParsedOneData.d.ts.map +1 -0
  37. package/dist/lib/rss/base/handleParsedOneData.js +21 -0
  38. package/dist/lib/rss/channel/channel.d.ts +4 -0
  39. package/dist/lib/rss/channel/channel.d.ts.map +1 -0
  40. package/dist/lib/rss/channel/channel.js +61 -0
  41. package/dist/lib/rss/channel/channelAbout.d.ts +4 -0
  42. package/dist/lib/rss/channel/channelAbout.d.ts.map +1 -0
  43. package/dist/lib/rss/channel/channelAbout.js +20 -0
  44. package/dist/lib/rss/channel/channelChat.d.ts +4 -0
  45. package/dist/lib/rss/channel/channelChat.d.ts.map +1 -0
  46. package/dist/lib/rss/channel/channelChat.js +21 -0
  47. package/dist/lib/rss/channel/channelDescription.d.ts +4 -0
  48. package/dist/lib/rss/channel/channelDescription.d.ts.map +1 -0
  49. package/dist/lib/rss/channel/channelDescription.js +21 -0
  50. package/dist/lib/rss/channel/channelFunding.d.ts +4 -0
  51. package/dist/lib/rss/channel/channelFunding.d.ts.map +1 -0
  52. package/dist/lib/rss/channel/channelFunding.js +21 -0
  53. package/dist/lib/rss/channel/channelImage.d.ts +4 -0
  54. package/dist/lib/rss/channel/channelImage.d.ts.map +1 -0
  55. package/dist/lib/rss/channel/channelImage.js +21 -0
  56. package/dist/lib/rss/channel/channelLicense.d.ts +4 -0
  57. package/dist/lib/rss/channel/channelLicense.d.ts.map +1 -0
  58. package/dist/lib/rss/channel/channelLicense.js +21 -0
  59. package/dist/lib/rss/channel/channelLocation.d.ts +4 -0
  60. package/dist/lib/rss/channel/channelLocation.d.ts.map +1 -0
  61. package/dist/lib/rss/channel/channelLocation.js +21 -0
  62. package/dist/lib/rss/channel/channelPerson.d.ts +4 -0
  63. package/dist/lib/rss/channel/channelPerson.d.ts.map +1 -0
  64. package/dist/lib/rss/channel/channelPerson.js +21 -0
  65. package/dist/lib/rss/channel/channelPodroll.d.ts +4 -0
  66. package/dist/lib/rss/channel/channelPodroll.d.ts.map +1 -0
  67. package/dist/lib/rss/channel/channelPodroll.js +28 -0
  68. package/dist/lib/rss/channel/channelRemoteItem.d.ts +4 -0
  69. package/dist/lib/rss/channel/channelRemoteItem.d.ts.map +1 -0
  70. package/dist/lib/rss/channel/channelRemoteItem.js +21 -0
  71. package/dist/lib/rss/channel/channelSeason.d.ts +4 -0
  72. package/dist/lib/rss/channel/channelSeason.d.ts.map +1 -0
  73. package/dist/lib/rss/channel/channelSeason.js +25 -0
  74. package/dist/lib/rss/channel/channelSocialInteract.d.ts +4 -0
  75. package/dist/lib/rss/channel/channelSocialInteract.d.ts.map +1 -0
  76. package/dist/lib/rss/channel/channelSocialInteract.js +21 -0
  77. package/dist/lib/rss/channel/channelTrailer.d.ts +4 -0
  78. package/dist/lib/rss/channel/channelTrailer.d.ts.map +1 -0
  79. package/dist/lib/rss/channel/channelTrailer.js +36 -0
  80. package/dist/lib/rss/channel/channelTxt.d.ts +4 -0
  81. package/dist/lib/rss/channel/channelTxt.d.ts.map +1 -0
  82. package/dist/lib/rss/channel/channelTxt.js +21 -0
  83. package/dist/lib/rss/channel/channelValue.d.ts +4 -0
  84. package/dist/lib/rss/channel/channelValue.d.ts.map +1 -0
  85. package/dist/lib/rss/channel/channelValue.js +37 -0
  86. package/dist/lib/rss/feed/feed.d.ts +5 -0
  87. package/dist/lib/rss/feed/feed.d.ts.map +1 -0
  88. package/dist/lib/rss/feed/feed.js +80 -0
  89. package/dist/lib/rss/hash/parsedFeed.d.ts +3 -0
  90. package/dist/lib/rss/hash/parsedFeed.d.ts.map +1 -0
  91. package/dist/lib/rss/hash/parsedFeed.js +22 -0
  92. package/dist/lib/rss/item/item.d.ts +5 -0
  93. package/dist/lib/rss/item/item.d.ts.map +1 -0
  94. package/dist/lib/rss/item/item.js +80 -0
  95. package/dist/lib/rss/item/itemAbout.d.ts +4 -0
  96. package/dist/lib/rss/item/itemAbout.d.ts.map +1 -0
  97. package/dist/lib/rss/item/itemAbout.js +20 -0
  98. package/dist/lib/rss/item/itemChaptersFeed.d.ts +4 -0
  99. package/dist/lib/rss/item/itemChaptersFeed.d.ts.map +1 -0
  100. package/dist/lib/rss/item/itemChaptersFeed.js +21 -0
  101. package/dist/lib/rss/item/itemChat.d.ts +4 -0
  102. package/dist/lib/rss/item/itemChat.d.ts.map +1 -0
  103. package/dist/lib/rss/item/itemChat.js +21 -0
  104. package/dist/lib/rss/item/itemContentLink.d.ts +1 -0
  105. package/dist/lib/rss/item/itemContentLink.d.ts.map +1 -0
  106. package/dist/lib/rss/item/itemContentLink.js +1 -0
  107. package/dist/lib/rss/item/itemDescription.d.ts +4 -0
  108. package/dist/lib/rss/item/itemDescription.d.ts.map +1 -0
  109. package/dist/lib/rss/item/itemDescription.js +21 -0
  110. package/dist/lib/rss/item/itemEnclosure.d.ts +4 -0
  111. package/dist/lib/rss/item/itemEnclosure.d.ts.map +1 -0
  112. package/dist/lib/rss/item/itemEnclosure.js +40 -0
  113. package/dist/lib/rss/item/itemImage.d.ts +4 -0
  114. package/dist/lib/rss/item/itemImage.d.ts.map +1 -0
  115. package/dist/lib/rss/item/itemImage.js +21 -0
  116. package/dist/lib/rss/item/itemLicense.d.ts +4 -0
  117. package/dist/lib/rss/item/itemLicense.d.ts.map +1 -0
  118. package/dist/lib/rss/item/itemLicense.js +21 -0
  119. package/dist/lib/rss/item/itemLocation.d.ts +4 -0
  120. package/dist/lib/rss/item/itemLocation.d.ts.map +1 -0
  121. package/dist/lib/rss/item/itemLocation.js +21 -0
  122. package/dist/lib/rss/item/itemPerson.d.ts +4 -0
  123. package/dist/lib/rss/item/itemPerson.d.ts.map +1 -0
  124. package/dist/lib/rss/item/itemPerson.js +21 -0
  125. package/dist/lib/rss/item/itemSeason.d.ts +4 -0
  126. package/dist/lib/rss/item/itemSeason.d.ts.map +1 -0
  127. package/dist/lib/rss/item/itemSeason.js +30 -0
  128. package/dist/lib/rss/item/itemSeasonEpisode.d.ts +4 -0
  129. package/dist/lib/rss/item/itemSeasonEpisode.d.ts.map +1 -0
  130. package/dist/lib/rss/item/itemSeasonEpisode.js +21 -0
  131. package/dist/lib/rss/item/itemSocialInteract.d.ts +4 -0
  132. package/dist/lib/rss/item/itemSocialInteract.d.ts.map +1 -0
  133. package/dist/lib/rss/item/itemSocialInteract.js +21 -0
  134. package/dist/lib/rss/item/itemSoundbite.d.ts +4 -0
  135. package/dist/lib/rss/item/itemSoundbite.d.ts.map +1 -0
  136. package/dist/lib/rss/item/itemSoundbite.js +21 -0
  137. package/dist/lib/rss/item/itemTranscript.d.ts +4 -0
  138. package/dist/lib/rss/item/itemTranscript.d.ts.map +1 -0
  139. package/dist/lib/rss/item/itemTranscript.js +21 -0
  140. package/dist/lib/rss/item/itemTxt.d.ts +4 -0
  141. package/dist/lib/rss/item/itemTxt.d.ts.map +1 -0
  142. package/dist/lib/rss/item/itemTxt.js +21 -0
  143. package/dist/lib/rss/item/itemValue.d.ts +4 -0
  144. package/dist/lib/rss/item/itemValue.d.ts.map +1 -0
  145. package/dist/lib/rss/item/itemValue.js +65 -0
  146. package/dist/lib/rss/liveItem/liveItem.d.ts +4 -0
  147. package/dist/lib/rss/liveItem/liveItem.d.ts.map +1 -0
  148. package/dist/lib/rss/liveItem/liveItem.js +41 -0
  149. package/dist/lib/rss/parser.d.ts +4 -0
  150. package/dist/lib/rss/parser.d.ts.map +1 -0
  151. package/dist/lib/rss/parser.js +83 -0
  152. package/dist/module-alias-config.d.ts +2 -0
  153. package/dist/module-alias-config.d.ts.map +1 -0
  154. package/dist/module-alias-config.js +7 -0
  155. package/eslint.config.mjs +38 -0
  156. package/package.json +20 -29
  157. package/src/index.ts +3 -0
  158. package/src/lib/chapters/chapters.ts +54 -0
  159. package/src/lib/compat/channel.ts +287 -0
  160. package/src/lib/compat/chapters/chapters.ts +23 -0
  161. package/src/lib/compat/partytime/channel.ts +289 -0
  162. package/src/lib/compat/partytime/compatFull.ts +7 -0
  163. package/src/lib/compat/partytime/funding.ts +8 -0
  164. package/src/lib/compat/partytime/item.ts +273 -0
  165. package/src/lib/compat/partytime/liveItem.ts +18 -0
  166. package/src/lib/compat/partytime/value.ts +64 -0
  167. package/src/lib/rss/base/handleParsedManyData.ts +16 -0
  168. package/src/lib/rss/base/handleParsedOneData.ts +17 -0
  169. package/src/lib/rss/channel/channel.ts +55 -0
  170. package/src/lib/rss/channel/channelAbout.ts +13 -0
  171. package/src/lib/rss/channel/channelChat.ts +14 -0
  172. package/src/lib/rss/channel/channelDescription.ts +14 -0
  173. package/src/lib/rss/channel/channelFunding.ts +14 -0
  174. package/src/lib/rss/channel/channelImage.ts +14 -0
  175. package/src/lib/rss/channel/channelLicense.ts +14 -0
  176. package/src/lib/rss/channel/channelLocation.ts +14 -0
  177. package/src/lib/rss/channel/channelPerson.ts +14 -0
  178. package/src/lib/rss/channel/channelPodroll.ts +21 -0
  179. package/src/lib/rss/channel/channelRemoteItem.ts +14 -0
  180. package/src/lib/rss/channel/channelSeason.ts +14 -0
  181. package/src/lib/rss/channel/channelSocialInteract.ts +14 -0
  182. package/src/lib/rss/channel/channelTrailer.ts +31 -0
  183. package/src/lib/rss/channel/channelTxt.ts +14 -0
  184. package/src/lib/rss/channel/channelValue.ts +30 -0
  185. package/src/lib/rss/feed/feed.ts +79 -0
  186. package/src/lib/rss/hash/parsedFeed.ts +9 -0
  187. package/src/lib/rss/item/item.ts +85 -0
  188. package/src/lib/rss/item/itemAbout.ts +13 -0
  189. package/src/lib/rss/item/itemChaptersFeed.ts +14 -0
  190. package/src/lib/rss/item/itemChat.ts +14 -0
  191. package/src/lib/rss/item/itemContentLink.ts +0 -0
  192. package/src/lib/rss/item/itemDescription.ts +14 -0
  193. package/src/lib/rss/item/itemEnclosure.ts +35 -0
  194. package/src/lib/rss/item/itemImage.ts +14 -0
  195. package/src/lib/rss/item/itemLicense.ts +14 -0
  196. package/src/lib/rss/item/itemLocation.ts +14 -0
  197. package/src/lib/rss/item/itemPerson.ts +14 -0
  198. package/src/lib/rss/item/itemSeason.ts +26 -0
  199. package/src/lib/rss/item/itemSeasonEpisode.ts +14 -0
  200. package/src/lib/rss/item/itemSocialInteract.ts +14 -0
  201. package/src/lib/rss/item/itemSoundbite.ts +14 -0
  202. package/src/lib/rss/item/itemTranscript.ts +14 -0
  203. package/src/lib/rss/item/itemTxt.ts +14 -0
  204. package/src/lib/rss/item/itemValue.ts +60 -0
  205. package/src/lib/rss/liveItem/liveItem.ts +34 -0
  206. package/src/lib/rss/parser.ts +85 -0
  207. package/src/module-alias-config.ts +8 -0
  208. package/tsconfig.json +25 -0
  209. package/LICENSE +0 -674
  210. package/README.md +0 -2
  211. package/dist/index.js.map +0 -7
@@ -0,0 +1,264 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.compatItemValueDtos = exports.compatItemTxtDtos = exports.compatItemTranscriptDtos = exports.compatItemSoundbiteDtos = exports.compatItemSocialInteractDtos = exports.compatItemSeasonEpisodeDto = exports.compatItemSeasonDto = exports.compatItemPersonDtos = exports.compatItemLocationDto = exports.compatItemLicenseDto = exports.compatItemImageDtos = exports.compatItemEnclosureDtos = exports.compatItemDescriptionDto = exports.compatItemChatDto = exports.compatItemChaptersFeedDto = exports.compatItemAboutDto = exports.compatItemDto = void 0;
4
+ const podverse_orm_1 = require("podverse-orm");
5
+ const value_1 = require("./value");
6
+ const compatItemDto = (parsedItem) => ({
7
+ guid: parsedItem.guid || null,
8
+ guid_enclosure_url: parsedItem.enclosure.url,
9
+ pubdate: parsedItem.pubDate || null,
10
+ title: parsedItem.title || null
11
+ });
12
+ exports.compatItemDto = compatItemDto;
13
+ const compatItemAboutDto = (parsedItem) => {
14
+ var _a;
15
+ return ({
16
+ duration: ((_a = parsedItem.duration) === null || _a === void 0 ? void 0 : _a.toFixed(2)) || null,
17
+ explicit: parsedItem.explicit || false,
18
+ website_link_url: parsedItem.link || null,
19
+ item_itunes_episode_type: (0, podverse_orm_1.getItemItunesEpisodeTypeEnumValue)(parsedItem.itunesEpisodeType || 'full')
20
+ });
21
+ };
22
+ exports.compatItemAboutDto = compatItemAboutDto;
23
+ const compatItemChaptersFeedDto = (parsedItem) => {
24
+ var _a, _b, _c, _d;
25
+ if (!((_a = parsedItem.podcastChapters) === null || _a === void 0 ? void 0 : _a.url) && !((_b = parsedItem.podcastChapters) === null || _b === void 0 ? void 0 : _b.type))
26
+ return null;
27
+ return {
28
+ url: (_c = parsedItem.podcastChapters) === null || _c === void 0 ? void 0 : _c.url,
29
+ type: (_d = parsedItem.podcastChapters) === null || _d === void 0 ? void 0 : _d.type
30
+ };
31
+ };
32
+ exports.compatItemChaptersFeedDto = compatItemChaptersFeedDto;
33
+ const compatItemChatDto = (parsedItem) => {
34
+ if (!parsedItem.chat) {
35
+ return null;
36
+ }
37
+ return {
38
+ server: parsedItem.chat.server,
39
+ protocol: parsedItem.chat.protocol,
40
+ account_id: parsedItem.chat.accountId || null,
41
+ space: parsedItem.chat.space || null
42
+ };
43
+ };
44
+ exports.compatItemChatDto = compatItemChatDto;
45
+ const compatItemDescriptionDto = (parsedItem) => {
46
+ if (!parsedItem.description) {
47
+ return null;
48
+ }
49
+ return {
50
+ value: parsedItem.description
51
+ };
52
+ };
53
+ exports.compatItemDescriptionDto = compatItemDescriptionDto;
54
+ const compatItemEnclosureDtos = (parsedItem) => {
55
+ const dtos = [];
56
+ if (parsedItem.alternativeEnclosures && parsedItem.alternativeEnclosures.length > 0) {
57
+ for (const alternativeEnclosure of parsedItem.alternativeEnclosures) {
58
+ const item_enclosure = {
59
+ type: alternativeEnclosure.type,
60
+ length: alternativeEnclosure.length || null,
61
+ bitrate: alternativeEnclosure.bitrate || null,
62
+ height: alternativeEnclosure.height || null,
63
+ language: alternativeEnclosure.lang || null,
64
+ title: alternativeEnclosure.title || null,
65
+ rel: alternativeEnclosure.rel || null,
66
+ codecs: alternativeEnclosure.codecs || null,
67
+ item_enclosure_default: false
68
+ };
69
+ /*
70
+ PTDO: why am I getting this error when I don't use any?
71
+ src/lib/compat/partytime/item.ts:50:14 - error TS4023: Exported variable
72
+ 'compatItemEnclosureDtos' has or is using name 'IntegrityType' from external module
73
+ "/podverse-parser/node_modules/podcast-partytime/dist/parser/phase/phase-3" but cannot be named.
74
+ */
75
+ const item_enclosure_integrity = alternativeEnclosure.integrity || null;
76
+ const item_enclosure_sources = alternativeEnclosure.source.map(source => ({
77
+ uri: source.uri,
78
+ content_type: source.contentType
79
+ }));
80
+ const formattedDto = {
81
+ item_enclosure,
82
+ item_enclosure_integrity,
83
+ item_enclosure_sources
84
+ };
85
+ dtos.push(formattedDto);
86
+ }
87
+ }
88
+ return dtos;
89
+ };
90
+ exports.compatItemEnclosureDtos = compatItemEnclosureDtos;
91
+ const compatItemImageDtos = (parsedItem) => {
92
+ const dtos = [];
93
+ if (parsedItem.itunesImage) {
94
+ dtos.push({
95
+ url: parsedItem.itunesImage,
96
+ image_width_size: null
97
+ });
98
+ }
99
+ else if (parsedItem.image) {
100
+ dtos.push({
101
+ url: parsedItem.image,
102
+ image_width_size: null
103
+ });
104
+ }
105
+ function hasWidth(image) {
106
+ return image.width !== undefined;
107
+ }
108
+ if (Array.isArray(parsedItem.podcastImages)) {
109
+ for (const image of parsedItem.podcastImages) {
110
+ if (image.parsed.url && hasWidth(image.parsed)) {
111
+ dtos.push({
112
+ url: image.parsed.url,
113
+ image_width_size: image.parsed.width
114
+ });
115
+ }
116
+ }
117
+ }
118
+ return dtos;
119
+ };
120
+ exports.compatItemImageDtos = compatItemImageDtos;
121
+ const compatItemLicenseDto = (parsedItem) => {
122
+ var _a;
123
+ if (!((_a = parsedItem === null || parsedItem === void 0 ? void 0 : parsedItem.license) === null || _a === void 0 ? void 0 : _a.identifier)) {
124
+ return null;
125
+ }
126
+ return {
127
+ identifier: parsedItem.license.identifier,
128
+ url: parsedItem.license.url || null
129
+ };
130
+ };
131
+ exports.compatItemLicenseDto = compatItemLicenseDto;
132
+ const compatItemLocationDto = (parsedItem) => {
133
+ var _a, _b;
134
+ if (!((_a = parsedItem === null || parsedItem === void 0 ? void 0 : parsedItem.podcastLocation) === null || _a === void 0 ? void 0 : _a.geo) && !((_b = parsedItem === null || parsedItem === void 0 ? void 0 : parsedItem.podcastLocation) === null || _b === void 0 ? void 0 : _b.osm)) {
135
+ return null;
136
+ }
137
+ return {
138
+ geo: parsedItem.podcastLocation.geo || null,
139
+ osm: parsedItem.podcastLocation.osm || null,
140
+ name: parsedItem.podcastLocation.name || null
141
+ };
142
+ };
143
+ exports.compatItemLocationDto = compatItemLocationDto;
144
+ const compatItemPersonDtos = (parsedItem) => {
145
+ var _a, _b;
146
+ const dtos = [];
147
+ if (Array.isArray(parsedItem.podcastPeople)) {
148
+ for (const p of parsedItem.podcastPeople) {
149
+ if (p.name) {
150
+ dtos.push({
151
+ name: p.name,
152
+ role: ((_a = p.role) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || null,
153
+ person_group: ((_b = p.group) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || 'cast',
154
+ img: p.img || null,
155
+ href: p.href || null
156
+ });
157
+ }
158
+ }
159
+ }
160
+ return dtos;
161
+ };
162
+ exports.compatItemPersonDtos = compatItemPersonDtos;
163
+ const compatItemSeasonDto = (parsedItem) => {
164
+ var _a;
165
+ if (!((_a = parsedItem.podcastSeason) === null || _a === void 0 ? void 0 : _a.number)) {
166
+ return null;
167
+ }
168
+ return {
169
+ number: parsedItem.podcastSeason.number,
170
+ title: parsedItem.podcastSeason.name || null
171
+ };
172
+ };
173
+ exports.compatItemSeasonDto = compatItemSeasonDto;
174
+ const compatItemSeasonEpisodeDto = (parsedItem) => {
175
+ if (!parsedItem.podcastEpisode) {
176
+ return null;
177
+ }
178
+ return {
179
+ display: parsedItem.podcastEpisode.display || null,
180
+ number: parsedItem.podcastEpisode.number
181
+ };
182
+ };
183
+ exports.compatItemSeasonEpisodeDto = compatItemSeasonEpisodeDto;
184
+ const compatItemSocialInteractDtos = (parsedItem) => {
185
+ var _a;
186
+ const dtos = [];
187
+ if ((_a = parsedItem === null || parsedItem === void 0 ? void 0 : parsedItem.podcastSocialInteraction) === null || _a === void 0 ? void 0 : _a.length) {
188
+ for (const ps of parsedItem.podcastSocialInteraction) {
189
+ dtos.push({
190
+ // PTDO: fix keys mismatch between partytime and podverse
191
+ protocol: ps.platform,
192
+ uri: ps.url,
193
+ account_id: ps.id || null,
194
+ account_url: ps.profileUrl || null,
195
+ priority: ps.priority || null
196
+ });
197
+ }
198
+ }
199
+ return dtos;
200
+ };
201
+ exports.compatItemSocialInteractDtos = compatItemSocialInteractDtos;
202
+ const compatItemSoundbiteDtos = (parsedItem) => {
203
+ var _a;
204
+ const dtos = [];
205
+ if ((_a = parsedItem === null || parsedItem === void 0 ? void 0 : parsedItem.podcastSoundbites) === null || _a === void 0 ? void 0 : _a.length) {
206
+ for (const s of parsedItem.podcastSoundbites) {
207
+ dtos.push({
208
+ start_time: s.startTime.toFixed(2),
209
+ duration: s.duration.toFixed(2),
210
+ title: s.title || null
211
+ });
212
+ }
213
+ }
214
+ return dtos;
215
+ };
216
+ exports.compatItemSoundbiteDtos = compatItemSoundbiteDtos;
217
+ const compatItemTranscriptDtos = (parsedItem) => {
218
+ var _a;
219
+ const dtos = [];
220
+ if ((_a = parsedItem === null || parsedItem === void 0 ? void 0 : parsedItem.podcastTranscripts) === null || _a === void 0 ? void 0 : _a.length) {
221
+ for (const t of parsedItem.podcastTranscripts) {
222
+ dtos.push({
223
+ url: t.url,
224
+ type: t.type,
225
+ language: t.language || null,
226
+ rel: t.rel || null
227
+ });
228
+ }
229
+ }
230
+ return dtos;
231
+ };
232
+ exports.compatItemTranscriptDtos = compatItemTranscriptDtos;
233
+ const compatItemTxtDtos = (parsedItem) => {
234
+ var _a;
235
+ const dtos = [];
236
+ if ((_a = parsedItem === null || parsedItem === void 0 ? void 0 : parsedItem.podcastTxt) === null || _a === void 0 ? void 0 : _a.length) {
237
+ for (const txt of parsedItem.podcastTxt) {
238
+ dtos.push({
239
+ purpose: txt.purpose || null,
240
+ value: txt.value
241
+ });
242
+ }
243
+ }
244
+ return dtos;
245
+ };
246
+ exports.compatItemTxtDtos = compatItemTxtDtos;
247
+ const compatItemValueDtos = (parsedItem) => {
248
+ let dtos = [];
249
+ if (parsedItem.value) {
250
+ const dto = (0, value_1.compatItemValue)(parsedItem.value);
251
+ const formattedDto = {
252
+ item_value: {
253
+ type: dto.type,
254
+ method: dto.method,
255
+ suggested: dto.suggested || null
256
+ },
257
+ item_value_recipients: dto.item_value_recipients,
258
+ item_value_time_splits: dto.item_value_time_splits
259
+ };
260
+ dtos.push(formattedDto);
261
+ }
262
+ return dtos;
263
+ };
264
+ exports.compatItemValueDtos = compatItemValueDtos;
@@ -0,0 +1,11 @@
1
+ import { Phase4PodcastLiveItem } from "podcast-partytime/dist/parser/phase/phase-4";
2
+ import { LiveItemStatusEnum } from "podverse-orm";
3
+ export declare const compatLiveItemsDtos: (parsedLiveItems: Phase4PodcastLiveItem[]) => {
4
+ liveItem: {
5
+ live_item_status: LiveItemStatusEnum;
6
+ start_time: Date;
7
+ end_time: Date | null;
8
+ };
9
+ item: Phase4PodcastLiveItem;
10
+ }[];
11
+ //# sourceMappingURL=liveItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"liveItem.d.ts","sourceRoot":"","sources":["../../../../src/lib/compat/partytime/liveItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EAA8B,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAE9E,eAAO,MAAM,mBAAmB,oBAAqB,qBAAqB,EAAE;;;;;;;GAc3E,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.compatLiveItemsDtos = void 0;
4
+ const podverse_orm_1 = require("podverse-orm");
5
+ const compatLiveItemsDtos = (parsedLiveItems) => {
6
+ var _a;
7
+ const dtos = [];
8
+ for (const parsedLiveItem of parsedLiveItems) {
9
+ dtos.push({
10
+ liveItem: {
11
+ live_item_status: (_a = (0, podverse_orm_1.getLiveItemStatusEnumValue)(parsedLiveItem.status)) !== null && _a !== void 0 ? _a : podverse_orm_1.LiveItemStatusEnum.Pending,
12
+ start_time: parsedLiveItem.start,
13
+ end_time: parsedLiveItem.end || null
14
+ },
15
+ item: parsedLiveItem
16
+ });
17
+ }
18
+ return dtos;
19
+ };
20
+ exports.compatLiveItemsDtos = compatLiveItemsDtos;
@@ -0,0 +1,62 @@
1
+ import { Phase4Value } from "podcast-partytime";
2
+ export declare const compatChannelValue: (value: Phase4Value) => {
3
+ type: string;
4
+ method: string;
5
+ suggested: number | null;
6
+ channel_value_recipients: {
7
+ type: string;
8
+ address: string;
9
+ split: number;
10
+ name: string | null;
11
+ custom_key: string | null;
12
+ custom_value: string | null;
13
+ fee: boolean;
14
+ }[];
15
+ };
16
+ export declare const compatItemValue: (value: Phase4Value) => {
17
+ type: string;
18
+ method: string;
19
+ suggested: number | null;
20
+ item_value_recipients: {
21
+ type: string;
22
+ address: string;
23
+ split: number;
24
+ name: string | null;
25
+ custom_key: string | null;
26
+ custom_value: string | null;
27
+ fee: boolean;
28
+ }[];
29
+ item_value_time_splits: ({
30
+ meta: {
31
+ start_time: string;
32
+ duration: string;
33
+ remote_start_time: string;
34
+ remote_percentage: string;
35
+ };
36
+ item_value_time_splits_recipients: never[];
37
+ item_value_time_splits_remote_item: {
38
+ feed_guid: string;
39
+ feed_url: string | null;
40
+ item_guid: string | null;
41
+ title: null;
42
+ } | null;
43
+ } | {
44
+ meta: {
45
+ start_time: string;
46
+ duration: string;
47
+ remote_start_time: string;
48
+ remote_percentage: string;
49
+ };
50
+ item_value_time_splits_recipients: {
51
+ type: string;
52
+ address: string;
53
+ split: number;
54
+ name: string | null;
55
+ custom_key: string | null;
56
+ custom_value: string | null;
57
+ fee: boolean;
58
+ }[];
59
+ item_value_time_splits_remote_item: null;
60
+ })[];
61
+ };
62
+ //# sourceMappingURL=value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../../../src/lib/compat/partytime/value.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAwB,MAAM,mBAAmB,CAAC;AAEtE,eAAO,MAAM,kBAAkB,UAAW,WAAW;;;;;;;;;;;;;CAOpD,CAAC;AAEF,eAAO,MAAM,eAAe,UAAW,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCjD,CAAC"}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.compatItemValue = exports.compatChannelValue = void 0;
4
+ const compatChannelValue = (value) => {
5
+ var _a;
6
+ return {
7
+ type: value.type,
8
+ method: value.method,
9
+ suggested: parseFloat((_a = value.suggested) !== null && _a !== void 0 ? _a : '0') || null,
10
+ channel_value_recipients: compatValueRecipients(value.recipients)
11
+ };
12
+ };
13
+ exports.compatChannelValue = compatChannelValue;
14
+ const compatItemValue = (value) => {
15
+ var _a, _b;
16
+ return {
17
+ type: value.type,
18
+ method: value.method,
19
+ suggested: parseFloat((_a = value.suggested) !== null && _a !== void 0 ? _a : '0') || null,
20
+ item_value_recipients: compatValueRecipients(value.recipients),
21
+ item_value_time_splits: ((_b = value.valueTimeSplits) === null || _b === void 0 ? void 0 : _b.map((valueTimeSplit) => {
22
+ var _a, _b;
23
+ if (valueTimeSplit.type === 'remoteItem') {
24
+ return {
25
+ meta: {
26
+ start_time: valueTimeSplit.startTime.toFixed(2),
27
+ duration: valueTimeSplit.duration.toFixed(2),
28
+ remote_start_time: ((_a = valueTimeSplit.remoteStartTime) === null || _a === void 0 ? void 0 : _a.toFixed(2)) || (0).toFixed(2),
29
+ remote_percentage: ((_b = valueTimeSplit.remotePercentage) === null || _b === void 0 ? void 0 : _b.toFixed(2)) || (100).toFixed(2),
30
+ },
31
+ item_value_time_splits_recipients: [],
32
+ item_value_time_splits_remote_item: valueTimeSplit.remoteItem ? {
33
+ feed_guid: valueTimeSplit.remoteItem.feedGuid,
34
+ feed_url: valueTimeSplit.remoteItem.feedUrl || null,
35
+ item_guid: valueTimeSplit.remoteItem.itemGuid || null,
36
+ title: /* PTDO: ri.title || */ null
37
+ } : null
38
+ };
39
+ }
40
+ else {
41
+ // else: valueTimeSplit.type === 'recipients'
42
+ return {
43
+ meta: {
44
+ start_time: valueTimeSplit.startTime.toFixed(2),
45
+ duration: valueTimeSplit.duration.toFixed(2),
46
+ remote_start_time: (0).toFixed(2),
47
+ remote_percentage: (100).toFixed(2),
48
+ },
49
+ item_value_time_splits_recipients: compatValueRecipients(valueTimeSplit.recipients),
50
+ item_value_time_splits_remote_item: null
51
+ };
52
+ }
53
+ })) || []
54
+ };
55
+ };
56
+ exports.compatItemValue = compatItemValue;
57
+ const compatValueRecipients = (recipients) => {
58
+ return recipients.map((recipient) => {
59
+ return {
60
+ type: recipient.type,
61
+ address: recipient.address,
62
+ split: recipient.split,
63
+ name: recipient.name || null,
64
+ custom_key: recipient.customKey || null,
65
+ custom_value: recipient.customValue || null,
66
+ fee: recipient.fee || false
67
+ };
68
+ }) || [];
69
+ };
@@ -0,0 +1,7 @@
1
+ interface Service<T, P> {
2
+ updateMany(parentEntity: P, dtos: Partial<T>[]): Promise<T[]>;
3
+ deleteAll(parentEntity: P): Promise<void>;
4
+ }
5
+ export declare const handleParsedManyData: <T, P>(parentEntity: P, service: Service<T, P>, dtos: Partial<T>[]) => Promise<void>;
6
+ export {};
7
+ //# sourceMappingURL=handleParsedManyData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleParsedManyData.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/base/handleParsedManyData.ts"],"names":[],"mappings":"AAAA,UAAU,OAAO,CAAC,CAAC,EAAE,CAAC;IACpB,UAAU,CAAC,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAC9D,SAAS,CAAC,YAAY,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3C;AAED,eAAO,MAAM,oBAAoB,GAAS,CAAC,EAAE,CAAC,gBAC9B,CAAC,WACN,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,QAChB,OAAO,CAAC,CAAC,CAAC,EAAE,kBAOnB,CAAC"}
@@ -0,0 +1,21 @@
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.handleParsedManyData = void 0;
13
+ const handleParsedManyData = (parentEntity, service, dtos) => __awaiter(void 0, void 0, void 0, function* () {
14
+ if (dtos.length > 0) {
15
+ yield service.updateMany(parentEntity, dtos);
16
+ }
17
+ else {
18
+ yield service.deleteAll(parentEntity);
19
+ }
20
+ });
21
+ exports.handleParsedManyData = handleParsedManyData;
@@ -0,0 +1,7 @@
1
+ interface Service<T, P> {
2
+ update(parentEntity: P, dto: Partial<T>): Promise<T>;
3
+ _delete?(parentEntity: P): Promise<void>;
4
+ }
5
+ export declare const handleParsedOneData: <T, P>(parentEntity: P, service: Service<T, P>, dto: Partial<T> | null) => Promise<void>;
6
+ export {};
7
+ //# sourceMappingURL=handleParsedOneData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleParsedOneData.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/base/handleParsedOneData.ts"],"names":[],"mappings":"AAAA,UAAU,OAAO,CAAC,CAAC,EAAE,CAAC;IACpB,MAAM,CAAC,YAAY,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACrD,OAAO,CAAC,CAAC,YAAY,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,mBAAmB,GAAU,CAAC,EAAE,CAAC,gBAC9B,CAAC,WACN,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,OACjB,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,kBAOvB,CAAC"}
@@ -0,0 +1,21 @@
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.handleParsedOneData = void 0;
13
+ const handleParsedOneData = (parentEntity, service, dto) => __awaiter(void 0, void 0, void 0, function* () {
14
+ if (dto) {
15
+ yield service.update(parentEntity, dto);
16
+ }
17
+ else if (service._delete) {
18
+ yield service._delete(parentEntity);
19
+ }
20
+ });
21
+ exports.handleParsedOneData = handleParsedOneData;
@@ -0,0 +1,4 @@
1
+ import { FeedObject } from "podcast-partytime";
2
+ import { Channel, ChannelSeasonIndex } from "podverse-orm";
3
+ export declare const handleParsedChannel: (parsedFeed: FeedObject, channel: Channel, channelSeasonIndex: ChannelSeasonIndex) => Promise<void>;
4
+ //# sourceMappingURL=channel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAiB,OAAO,EAAkB,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAiB1F,eAAO,MAAM,mBAAmB,eAAsB,UAAU,WAAW,OAAO,sBAAsB,kBAAkB,kBAoCzH,CAAC"}
@@ -0,0 +1,61 @@
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.handleParsedChannel = void 0;
13
+ const podverse_orm_1 = require("podverse-orm");
14
+ const channel_1 = require("@parser/lib/compat/partytime/channel");
15
+ const channelAbout_1 = require("@parser/lib/rss/channel/channelAbout");
16
+ const channelChat_1 = require("@parser/lib/rss/channel/channelChat");
17
+ const channelDescription_1 = require("@parser/lib/rss/channel/channelDescription");
18
+ const channelFunding_1 = require("@parser/lib/rss/channel/channelFunding");
19
+ const channelImage_1 = require("@parser/lib/rss/channel/channelImage");
20
+ const channelLicense_1 = require("@parser/lib/rss/channel/channelLicense");
21
+ const channelLocation_1 = require("@parser/lib/rss/channel/channelLocation");
22
+ const channelPerson_1 = require("@parser/lib/rss/channel/channelPerson");
23
+ const channelPodroll_1 = require("@parser/lib/rss/channel/channelPodroll");
24
+ const channelRemoteItem_1 = require("@parser/lib/rss/channel/channelRemoteItem");
25
+ const channelSocialInteract_1 = require("@parser/lib/rss/channel/channelSocialInteract");
26
+ const channelTrailer_1 = require("@parser/lib/rss/channel/channelTrailer");
27
+ const channelTxt_1 = require("@parser/lib/rss/channel/channelTxt");
28
+ const channelValue_1 = require("@parser/lib/rss/channel/channelValue");
29
+ const handleParsedChannel = (parsedFeed, channel, channelSeasonIndex) => __awaiter(void 0, void 0, void 0, function* () {
30
+ const channelService = new podverse_orm_1.ChannelService();
31
+ const channelDto = (0, channel_1.compatChannelDto)(parsedFeed);
32
+ yield channelService.update(channel.id, channelDto);
33
+ // TODO: add channelCategory support
34
+ yield podverse_orm_1.AppDataSource.manager.transaction((transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
35
+ yield (0, channelAbout_1.handleParsedChannelAbout)(parsedFeed, channel, transactionalEntityManager);
36
+ yield (0, channelChat_1.handleParsedChannelChat)(parsedFeed, channel, transactionalEntityManager);
37
+ yield (0, channelDescription_1.handleParsedChannelDescription)(parsedFeed, channel, transactionalEntityManager);
38
+ yield (0, channelFunding_1.handleParsedChannelFunding)(parsedFeed, channel, transactionalEntityManager);
39
+ yield (0, channelImage_1.handleParsedChannelImage)(parsedFeed, channel, transactionalEntityManager);
40
+ yield (0, channelLicense_1.handleParsedChannelLicense)(parsedFeed, channel, transactionalEntityManager);
41
+ yield (0, channelLocation_1.handleParsedChannelLocation)(parsedFeed, channel, transactionalEntityManager);
42
+ yield (0, channelPerson_1.handleParsedChannelPerson)(parsedFeed, channel, transactionalEntityManager);
43
+ yield (0, channelPodroll_1.handleParsedChannelPodroll)(parsedFeed, channel, transactionalEntityManager);
44
+ // PTDO: add channelPublisher support
45
+ // const channelPublisherService = new ChannelPublisherService();
46
+ // const channelPublisherRemoteItemService = new ChannelPublisherRemoteItemService();
47
+ // const channelPublisherRemoteItemDtos = compatChannelPublisherRemoteItemDtos(parsedFeed);
48
+ // if (channelPublisherRemoteItemDtos.length > 0) {
49
+ // const channel_publisher = await channelPublisherService.update(channel);
50
+ // await channelPublisherRemoteItemService.updateMany(channel_publisher, channelPodrollRemoteItemDtos);
51
+ // } else {
52
+ // await channelPublisherService.delete(channel);
53
+ // }
54
+ yield (0, channelRemoteItem_1.handleParsedChannelRemoteItem)(parsedFeed, channel, transactionalEntityManager);
55
+ yield (0, channelSocialInteract_1.handleParsedChannelSocialInteract)(parsedFeed, channel, transactionalEntityManager);
56
+ yield (0, channelTrailer_1.handleParsedChannelTrailer)(parsedFeed, channel, channelSeasonIndex, transactionalEntityManager);
57
+ yield (0, channelTxt_1.handleParsedChannelTxt)(parsedFeed, channel, transactionalEntityManager);
58
+ yield (0, channelValue_1.handleParsedChannelValue)(parsedFeed, channel, transactionalEntityManager);
59
+ }));
60
+ });
61
+ exports.handleParsedChannel = handleParsedChannel;
@@ -0,0 +1,4 @@
1
+ import { FeedObject } from "podcast-partytime";
2
+ import { Channel, EntityManager } from "podverse-orm";
3
+ export declare const handleParsedChannelAbout: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager: EntityManager) => Promise<void>;
4
+ //# sourceMappingURL=channelAbout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channelAbout.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelAbout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAuB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG3E,eAAO,MAAM,wBAAwB,eACvB,UAAU,WACb,OAAO,8BACY,aAAa,kBAK1C,CAAC"}
@@ -0,0 +1,20 @@
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.handleParsedChannelAbout = void 0;
13
+ const podverse_orm_1 = require("podverse-orm");
14
+ const channel_1 = require("@parser/lib/compat/partytime/channel");
15
+ const handleParsedChannelAbout = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
16
+ const channelAboutService = new podverse_orm_1.ChannelAboutService(transactionalEntityManager);
17
+ const channelAboutDto = (0, channel_1.compatChannelAboutDto)(parsedFeed);
18
+ yield channelAboutService.update(channel, channelAboutDto);
19
+ });
20
+ exports.handleParsedChannelAbout = handleParsedChannelAbout;
@@ -0,0 +1,4 @@
1
+ import { FeedObject } from "podcast-partytime";
2
+ import { Channel, EntityManager } from "podverse-orm";
3
+ export declare const handleParsedChannelChat: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager: EntityManager) => Promise<void>;
4
+ //# sourceMappingURL=channelChat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channelChat.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelChat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAsB,aAAa,EAAE,MAAM,cAAc,CAAC;AAI1E,eAAO,MAAM,uBAAuB,eACtB,UAAU,WACb,OAAO,8BACY,aAAa,kBAK1C,CAAC"}
@@ -0,0 +1,21 @@
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.handleParsedChannelChat = void 0;
13
+ const podverse_orm_1 = require("podverse-orm");
14
+ const channel_1 = require("@parser/lib/compat/partytime/channel");
15
+ const handleParsedOneData_1 = require("../base/handleParsedOneData");
16
+ const handleParsedChannelChat = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
17
+ const channelChatService = new podverse_orm_1.ChannelChatService(transactionalEntityManager);
18
+ const channelChatDto = (0, channel_1.compatChannelChatDto)(parsedFeed);
19
+ yield (0, handleParsedOneData_1.handleParsedOneData)(channel, channelChatService, channelChatDto);
20
+ });
21
+ exports.handleParsedChannelChat = handleParsedChannelChat;
@@ -0,0 +1,4 @@
1
+ import { FeedObject } from "podcast-partytime";
2
+ import { Channel, EntityManager } from "podverse-orm";
3
+ export declare const handleParsedChannelDescription: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager: EntityManager) => Promise<void>;
4
+ //# sourceMappingURL=channelDescription.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channelDescription.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelDescription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAA6B,aAAa,EAAE,MAAM,cAAc,CAAC;AAIjF,eAAO,MAAM,8BAA8B,eAC7B,UAAU,WACb,OAAO,8BACY,aAAa,kBAK1C,CAAC"}