@ttkit/daily-hot-api 0.0.0-stage → 0.1.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.
Files changed (450) hide show
  1. package/.env.example +77 -0
  2. package/LICENSE +21 -0
  3. package/README.md +315 -2
  4. package/bin/daily-hot-api.js +25 -0
  5. package/dist/app.controller.d.ts +41 -0
  6. package/dist/app.controller.js +91 -0
  7. package/dist/app.controller.js.map +1 -0
  8. package/dist/app.module.d.ts +4 -0
  9. package/dist/app.module.js +44 -0
  10. package/dist/app.module.js.map +1 -0
  11. package/dist/app.service.d.ts +19 -0
  12. package/dist/app.service.js +57 -0
  13. package/dist/app.service.js.map +1 -0
  14. package/dist/cache/cache.module.d.ts +2 -0
  15. package/dist/cache/cache.module.js +52 -0
  16. package/dist/cache/cache.module.js.map +1 -0
  17. package/dist/cache/cache.service.d.ts +26 -0
  18. package/dist/cache/cache.service.js +163 -0
  19. package/dist/cache/cache.service.js.map +1 -0
  20. package/dist/cli/args.d.ts +24 -0
  21. package/dist/cli/args.js +261 -0
  22. package/dist/cli/args.js.map +1 -0
  23. package/dist/cli/commands/logs.d.ts +3 -0
  24. package/dist/cli/commands/logs.js +55 -0
  25. package/dist/cli/commands/logs.js.map +1 -0
  26. package/dist/cli/commands/restart.d.ts +3 -0
  27. package/dist/cli/commands/restart.js +62 -0
  28. package/dist/cli/commands/restart.js.map +1 -0
  29. package/dist/cli/commands/start.d.ts +3 -0
  30. package/dist/cli/commands/start.js +280 -0
  31. package/dist/cli/commands/start.js.map +1 -0
  32. package/dist/cli/commands/status.d.ts +3 -0
  33. package/dist/cli/commands/status.js +78 -0
  34. package/dist/cli/commands/status.js.map +1 -0
  35. package/dist/cli/commands/stop.d.ts +12 -0
  36. package/dist/cli/commands/stop.js +135 -0
  37. package/dist/cli/commands/stop.js.map +1 -0
  38. package/dist/cli/context.d.ts +4 -0
  39. package/dist/cli/context.js +3 -0
  40. package/dist/cli/context.js.map +1 -0
  41. package/dist/cli/env.d.ts +2 -0
  42. package/dist/cli/env.js +80 -0
  43. package/dist/cli/env.js.map +1 -0
  44. package/dist/cli/errors.d.ts +14 -0
  45. package/dist/cli/errors.js +25 -0
  46. package/dist/cli/errors.js.map +1 -0
  47. package/dist/cli/health.d.ts +2 -0
  48. package/dist/cli/health.js +44 -0
  49. package/dist/cli/health.js.map +1 -0
  50. package/dist/cli/help.d.ts +3 -0
  51. package/dist/cli/help.js +158 -0
  52. package/dist/cli/help.js.map +1 -0
  53. package/dist/cli/index.d.ts +2 -0
  54. package/dist/cli/index.js +94 -0
  55. package/dist/cli/index.js.map +1 -0
  56. package/dist/cli/log-file.d.ts +8 -0
  57. package/dist/cli/log-file.js +58 -0
  58. package/dist/cli/log-file.js.map +1 -0
  59. package/dist/cli/output.d.ts +7 -0
  60. package/dist/cli/output.js +46 -0
  61. package/dist/cli/output.js.map +1 -0
  62. package/dist/cli/paths.d.ts +33 -0
  63. package/dist/cli/paths.js +76 -0
  64. package/dist/cli/paths.js.map +1 -0
  65. package/dist/cli/run-state.d.ts +25 -0
  66. package/dist/cli/run-state.js +159 -0
  67. package/dist/cli/run-state.js.map +1 -0
  68. package/dist/common/middlewares/logger.middleware.d.ts +7 -0
  69. package/dist/common/middlewares/logger.middleware.js +29 -0
  70. package/dist/common/middlewares/logger.middleware.js.map +1 -0
  71. package/dist/config/config.module.d.ts +2 -0
  72. package/dist/config/config.module.js +47 -0
  73. package/dist/config/config.module.js.map +1 -0
  74. package/dist/config/configuration.d.ts +3 -0
  75. package/dist/config/configuration.js +5 -0
  76. package/dist/config/configuration.js.map +1 -0
  77. package/dist/config/validation.schema.d.ts +114 -0
  78. package/dist/config/validation.schema.js +69 -0
  79. package/dist/config/validation.schema.js.map +1 -0
  80. package/dist/daily-brief/clients/ai-analysis.client.d.ts +20 -0
  81. package/dist/daily-brief/clients/ai-analysis.client.js +217 -0
  82. package/dist/daily-brief/clients/ai-analysis.client.js.map +1 -0
  83. package/dist/daily-brief/clients/brief-search.service.d.ts +11 -0
  84. package/dist/daily-brief/clients/brief-search.service.js +52 -0
  85. package/dist/daily-brief/clients/brief-search.service.js.map +1 -0
  86. package/dist/daily-brief/clients/deepseek-search.client.d.ts +11 -0
  87. package/dist/daily-brief/clients/deepseek-search.client.js +70 -0
  88. package/dist/daily-brief/clients/deepseek-search.client.js.map +1 -0
  89. package/dist/daily-brief/clients/tavily-search.client.d.ts +11 -0
  90. package/dist/daily-brief/clients/tavily-search.client.js +72 -0
  91. package/dist/daily-brief/clients/tavily-search.client.js.map +1 -0
  92. package/dist/daily-brief/daily-brief.config.d.ts +31 -0
  93. package/dist/daily-brief/daily-brief.config.js +108 -0
  94. package/dist/daily-brief/daily-brief.config.js.map +1 -0
  95. package/dist/daily-brief/daily-brief.controller.d.ts +72 -0
  96. package/dist/daily-brief/daily-brief.controller.js +169 -0
  97. package/dist/daily-brief/daily-brief.controller.js.map +1 -0
  98. package/dist/daily-brief/daily-brief.module.d.ts +2 -0
  99. package/dist/daily-brief/daily-brief.module.js +49 -0
  100. package/dist/daily-brief/daily-brief.module.js.map +1 -0
  101. package/dist/daily-brief/daily-brief.scheduler.d.ts +30 -0
  102. package/dist/daily-brief/daily-brief.scheduler.js +113 -0
  103. package/dist/daily-brief/daily-brief.scheduler.js.map +1 -0
  104. package/dist/daily-brief/daily-brief.service.d.ts +101 -0
  105. package/dist/daily-brief/daily-brief.service.js +412 -0
  106. package/dist/daily-brief/daily-brief.service.js.map +1 -0
  107. package/dist/daily-brief/dto/brief-date-param.dto.d.ts +3 -0
  108. package/dist/daily-brief/dto/brief-date-param.dto.js +23 -0
  109. package/dist/daily-brief/dto/brief-date-param.dto.js.map +1 -0
  110. package/dist/daily-brief/dto/generate-brief.dto.d.ts +6 -0
  111. package/dist/daily-brief/dto/generate-brief.dto.js +39 -0
  112. package/dist/daily-brief/dto/generate-brief.dto.js.map +1 -0
  113. package/dist/daily-brief/dto/list-briefs-query.dto.d.ts +6 -0
  114. package/dist/daily-brief/dto/list-briefs-query.dto.js +42 -0
  115. package/dist/daily-brief/dto/list-briefs-query.dto.js.map +1 -0
  116. package/dist/daily-brief/dto/stock-ranking-query.dto.d.ts +6 -0
  117. package/dist/daily-brief/dto/stock-ranking-query.dto.js +46 -0
  118. package/dist/daily-brief/dto/stock-ranking-query.dto.js.map +1 -0
  119. package/dist/daily-brief/interfaces/daily-brief.interface.d.ts +59 -0
  120. package/dist/daily-brief/interfaces/daily-brief.interface.js +3 -0
  121. package/dist/daily-brief/interfaces/daily-brief.interface.js.map +1 -0
  122. package/dist/daily-brief/interfaces/search-provider.interface.d.ts +11 -0
  123. package/dist/daily-brief/interfaces/search-provider.interface.js +3 -0
  124. package/dist/daily-brief/interfaces/search-provider.interface.js.map +1 -0
  125. package/dist/daily-brief/utils/brief-date.d.ts +2 -0
  126. package/dist/daily-brief/utils/brief-date.js +16 -0
  127. package/dist/daily-brief/utils/brief-date.js.map +1 -0
  128. package/dist/daily-brief/utils/concurrency.d.ts +1 -0
  129. package/dist/daily-brief/utils/concurrency.js +20 -0
  130. package/dist/daily-brief/utils/concurrency.js.map +1 -0
  131. package/dist/database/database.module.d.ts +2 -0
  132. package/dist/database/database.module.js +57 -0
  133. package/dist/database/database.module.js.map +1 -0
  134. package/dist/database/repositories/daily-brief.repository.d.ts +96 -0
  135. package/dist/database/repositories/daily-brief.repository.js +457 -0
  136. package/dist/database/repositories/daily-brief.repository.js.map +1 -0
  137. package/dist/database/repositories/hot-item.repository.d.ts +52 -0
  138. package/dist/database/repositories/hot-item.repository.js +255 -0
  139. package/dist/database/repositories/hot-item.repository.js.map +1 -0
  140. package/dist/database/repositories/source-config.repository.d.ts +15 -0
  141. package/dist/database/repositories/source-config.repository.js +77 -0
  142. package/dist/database/repositories/source-config.repository.js.map +1 -0
  143. package/dist/database/schemas/daily-brief.schema.d.ts +30 -0
  144. package/dist/database/schemas/daily-brief.schema.js +103 -0
  145. package/dist/database/schemas/daily-brief.schema.js.map +1 -0
  146. package/dist/database/schemas/hot-item.schema.d.ts +20 -0
  147. package/dist/database/schemas/hot-item.schema.js +72 -0
  148. package/dist/database/schemas/hot-item.schema.js.map +1 -0
  149. package/dist/database/schemas/source-config.schema.d.ts +15 -0
  150. package/dist/database/schemas/source-config.schema.js +47 -0
  151. package/dist/database/schemas/source-config.schema.js.map +1 -0
  152. package/dist/history/dto/history-response.dto.d.ts +17 -0
  153. package/dist/history/dto/history-response.dto.js +13 -0
  154. package/dist/history/dto/history-response.dto.js.map +1 -0
  155. package/dist/history/dto/search-history.dto.d.ts +10 -0
  156. package/dist/history/dto/search-history.dto.js +72 -0
  157. package/dist/history/dto/search-history.dto.js.map +1 -0
  158. package/dist/history/history.controller.d.ts +13 -0
  159. package/dist/history/history.controller.js +92 -0
  160. package/dist/history/history.controller.js.map +1 -0
  161. package/dist/history/history.module.d.ts +2 -0
  162. package/dist/history/history.module.js +25 -0
  163. package/dist/history/history.module.js.map +1 -0
  164. package/dist/history/history.service.d.ts +15 -0
  165. package/dist/history/history.service.js +68 -0
  166. package/dist/history/history.service.js.map +1 -0
  167. package/dist/host-lists/decorators/hot-source.decorator.d.ts +9 -0
  168. package/dist/host-lists/decorators/hot-source.decorator.js +11 -0
  169. package/dist/host-lists/decorators/hot-source.decorator.js.map +1 -0
  170. package/dist/host-lists/dto/hot-list.dto.d.ts +14 -0
  171. package/dist/host-lists/dto/hot-list.dto.js +94 -0
  172. package/dist/host-lists/dto/hot-list.dto.js.map +1 -0
  173. package/dist/host-lists/hot-lists.controller.d.ts +39 -0
  174. package/dist/host-lists/hot-lists.controller.js +87 -0
  175. package/dist/host-lists/hot-lists.controller.js.map +1 -0
  176. package/dist/host-lists/hot-lists.module.d.ts +2 -0
  177. package/dist/host-lists/hot-lists.module.js +36 -0
  178. package/dist/host-lists/hot-lists.module.js.map +1 -0
  179. package/dist/host-lists/hot-lists.service.d.ts +21 -0
  180. package/dist/host-lists/hot-lists.service.js +115 -0
  181. package/dist/host-lists/hot-lists.service.js.map +1 -0
  182. package/dist/host-lists/interfaces/hot-list-source.interface.d.ts +5 -0
  183. package/dist/host-lists/interfaces/hot-list-source.interface.js +3 -0
  184. package/dist/host-lists/interfaces/hot-list-source.interface.js.map +1 -0
  185. package/dist/host-lists/interfaces/hot-list.interface.d.ts +31 -0
  186. package/dist/host-lists/interfaces/hot-list.interface.js +3 -0
  187. package/dist/host-lists/interfaces/hot-list.interface.js.map +1 -0
  188. package/dist/host-lists/interfaces/router-data.interface.d.ts +19 -0
  189. package/dist/host-lists/interfaces/router-data.interface.js +3 -0
  190. package/dist/host-lists/interfaces/router-data.interface.js.map +1 -0
  191. package/dist/host-lists/sources/36kr.source.d.ts +9 -0
  192. package/dist/host-lists/sources/36kr.source.js +89 -0
  193. package/dist/host-lists/sources/36kr.source.js.map +1 -0
  194. package/dist/host-lists/sources/51cto.source.d.ts +11 -0
  195. package/dist/host-lists/sources/51cto.source.js +71 -0
  196. package/dist/host-lists/sources/51cto.source.js.map +1 -0
  197. package/dist/host-lists/sources/52pojie.source.d.ts +9 -0
  198. package/dist/host-lists/sources/52pojie.source.js +109 -0
  199. package/dist/host-lists/sources/52pojie.source.js.map +1 -0
  200. package/dist/host-lists/sources/acfun.source.d.ts +9 -0
  201. package/dist/host-lists/sources/acfun.source.js +90 -0
  202. package/dist/host-lists/sources/acfun.source.js.map +1 -0
  203. package/dist/host-lists/sources/baidu.source.d.ts +9 -0
  204. package/dist/host-lists/sources/baidu.source.js +85 -0
  205. package/dist/host-lists/sources/baidu.source.js.map +1 -0
  206. package/dist/host-lists/sources/bilibili.source.d.ts +14 -0
  207. package/dist/host-lists/sources/bilibili.source.js +188 -0
  208. package/dist/host-lists/sources/bilibili.source.js.map +1 -0
  209. package/dist/host-lists/sources/caixin.source.d.ts +9 -0
  210. package/dist/host-lists/sources/caixin.source.js +102 -0
  211. package/dist/host-lists/sources/caixin.source.js.map +1 -0
  212. package/dist/host-lists/sources/cls.source.d.ts +9 -0
  213. package/dist/host-lists/sources/cls.source.js +62 -0
  214. package/dist/host-lists/sources/cls.source.js.map +1 -0
  215. package/dist/host-lists/sources/coolapk.source.d.ts +9 -0
  216. package/dist/host-lists/sources/coolapk.source.js +57 -0
  217. package/dist/host-lists/sources/coolapk.source.js.map +1 -0
  218. package/dist/host-lists/sources/csdn.source.d.ts +9 -0
  219. package/dist/host-lists/sources/csdn.source.js +59 -0
  220. package/dist/host-lists/sources/csdn.source.js.map +1 -0
  221. package/dist/host-lists/sources/dgtle.source.d.ts +9 -0
  222. package/dist/host-lists/sources/dgtle.source.js +57 -0
  223. package/dist/host-lists/sources/dgtle.source.js.map +1 -0
  224. package/dist/host-lists/sources/douban-group.source.d.ts +11 -0
  225. package/dist/host-lists/sources/douban-group.source.js +100 -0
  226. package/dist/host-lists/sources/douban-group.source.js.map +1 -0
  227. package/dist/host-lists/sources/douban-movie.source.d.ts +10 -0
  228. package/dist/host-lists/sources/douban-movie.source.js +103 -0
  229. package/dist/host-lists/sources/douban-movie.source.js.map +1 -0
  230. package/dist/host-lists/sources/douyin.d.ts +16 -0
  231. package/dist/host-lists/sources/douyin.js +215 -0
  232. package/dist/host-lists/sources/douyin.js.map +1 -0
  233. package/dist/host-lists/sources/eastmoney-stock.source.d.ts +11 -0
  234. package/dist/host-lists/sources/eastmoney-stock.source.js +151 -0
  235. package/dist/host-lists/sources/eastmoney-stock.source.js.map +1 -0
  236. package/dist/host-lists/sources/eastmoney.source.d.ts +9 -0
  237. package/dist/host-lists/sources/eastmoney.source.js +86 -0
  238. package/dist/host-lists/sources/eastmoney.source.js.map +1 -0
  239. package/dist/host-lists/sources/geekpark.source.d.ts +9 -0
  240. package/dist/host-lists/sources/geekpark.source.js +60 -0
  241. package/dist/host-lists/sources/geekpark.source.js.map +1 -0
  242. package/dist/host-lists/sources/gelonghui.source.d.ts +9 -0
  243. package/dist/host-lists/sources/gelonghui.source.js +139 -0
  244. package/dist/host-lists/sources/gelonghui.source.js.map +1 -0
  245. package/dist/host-lists/sources/github.source.d.ts +12 -0
  246. package/dist/host-lists/sources/github.source.js +171 -0
  247. package/dist/host-lists/sources/github.source.js.map +1 -0
  248. package/dist/host-lists/sources/guokr.source.d.ts +11 -0
  249. package/dist/host-lists/sources/guokr.source.js +98 -0
  250. package/dist/host-lists/sources/guokr.source.js.map +1 -0
  251. package/dist/host-lists/sources/hackernews.source.d.ts +11 -0
  252. package/dist/host-lists/sources/hackernews.source.js +121 -0
  253. package/dist/host-lists/sources/hackernews.source.js.map +1 -0
  254. package/dist/host-lists/sources/hellogithub.source.d.ts +11 -0
  255. package/dist/host-lists/sources/hellogithub.source.js +98 -0
  256. package/dist/host-lists/sources/hellogithub.source.js.map +1 -0
  257. package/dist/host-lists/sources/history.source.d.ts +11 -0
  258. package/dist/host-lists/sources/history.source.js +92 -0
  259. package/dist/host-lists/sources/history.source.js.map +1 -0
  260. package/dist/host-lists/sources/honkai.source.d.ts +9 -0
  261. package/dist/host-lists/sources/honkai.source.js +72 -0
  262. package/dist/host-lists/sources/honkai.source.js.map +1 -0
  263. package/dist/host-lists/sources/hostloc.source.d.ts +9 -0
  264. package/dist/host-lists/sources/hostloc.source.js +75 -0
  265. package/dist/host-lists/sources/hostloc.source.js.map +1 -0
  266. package/dist/host-lists/sources/hupu.source.d.ts +9 -0
  267. package/dist/host-lists/sources/hupu.source.js +73 -0
  268. package/dist/host-lists/sources/hupu.source.js.map +1 -0
  269. package/dist/host-lists/sources/huxiu.source.d.ts +9 -0
  270. package/dist/host-lists/sources/huxiu.source.js +153 -0
  271. package/dist/host-lists/sources/huxiu.source.js.map +1 -0
  272. package/dist/host-lists/sources/ifanr.source.d.ts +9 -0
  273. package/dist/host-lists/sources/ifanr.source.js +57 -0
  274. package/dist/host-lists/sources/ifanr.source.js.map +1 -0
  275. package/dist/host-lists/sources/index.d.ts +2 -0
  276. package/dist/host-lists/sources/index.js +134 -0
  277. package/dist/host-lists/sources/index.js.map +1 -0
  278. package/dist/host-lists/sources/ithome-xijiayi.source.d.ts +9 -0
  279. package/dist/host-lists/sources/ithome-xijiayi.source.js +75 -0
  280. package/dist/host-lists/sources/ithome-xijiayi.source.js.map +1 -0
  281. package/dist/host-lists/sources/ithome.source.d.ts +9 -0
  282. package/dist/host-lists/sources/ithome.source.js +71 -0
  283. package/dist/host-lists/sources/ithome.source.js.map +1 -0
  284. package/dist/host-lists/sources/jd.source.d.ts +9 -0
  285. package/dist/host-lists/sources/jd.source.js +82 -0
  286. package/dist/host-lists/sources/jd.source.js.map +1 -0
  287. package/dist/host-lists/sources/jianshu.source.d.ts +9 -0
  288. package/dist/host-lists/sources/jianshu.source.js +72 -0
  289. package/dist/host-lists/sources/jianshu.source.js.map +1 -0
  290. package/dist/host-lists/sources/jin10.source.d.ts +9 -0
  291. package/dist/host-lists/sources/jin10.source.js +63 -0
  292. package/dist/host-lists/sources/jin10.source.js.map +1 -0
  293. package/dist/host-lists/sources/juejin.source.d.ts +10 -0
  294. package/dist/host-lists/sources/juejin.source.js +81 -0
  295. package/dist/host-lists/sources/juejin.source.js.map +1 -0
  296. package/dist/host-lists/sources/kuaishou.source.d.ts +13 -0
  297. package/dist/host-lists/sources/kuaishou.source.js +179 -0
  298. package/dist/host-lists/sources/kuaishou.source.js.map +1 -0
  299. package/dist/host-lists/sources/linuxdo.source.d.ts +9 -0
  300. package/dist/host-lists/sources/linuxdo.source.js +62 -0
  301. package/dist/host-lists/sources/linuxdo.source.js.map +1 -0
  302. package/dist/host-lists/sources/lol.source.d.ts +9 -0
  303. package/dist/host-lists/sources/lol.source.js +58 -0
  304. package/dist/host-lists/sources/lol.source.js.map +1 -0
  305. package/dist/host-lists/sources/miyoushe.source.d.ts +9 -0
  306. package/dist/host-lists/sources/miyoushe.source.js +88 -0
  307. package/dist/host-lists/sources/miyoushe.source.js.map +1 -0
  308. package/dist/host-lists/sources/netease-news.source.d.ts +9 -0
  309. package/dist/host-lists/sources/netease-news.source.js +56 -0
  310. package/dist/host-lists/sources/netease-news.source.js.map +1 -0
  311. package/dist/host-lists/sources/ngabbs.source.d.ts +9 -0
  312. package/dist/host-lists/sources/ngabbs.source.js +70 -0
  313. package/dist/host-lists/sources/ngabbs.source.js.map +1 -0
  314. package/dist/host-lists/sources/nodeseek.source.d.ts +9 -0
  315. package/dist/host-lists/sources/nodeseek.source.js +62 -0
  316. package/dist/host-lists/sources/nodeseek.source.js.map +1 -0
  317. package/dist/host-lists/sources/nytimes.source.d.ts +9 -0
  318. package/dist/host-lists/sources/nytimes.source.js +77 -0
  319. package/dist/host-lists/sources/nytimes.source.js.map +1 -0
  320. package/dist/host-lists/sources/producthunt.source.d.ts +9 -0
  321. package/dist/host-lists/sources/producthunt.source.js +75 -0
  322. package/dist/host-lists/sources/producthunt.source.js.map +1 -0
  323. package/dist/host-lists/sources/qq-news.source.d.ts +9 -0
  324. package/dist/host-lists/sources/qq-news.source.js +53 -0
  325. package/dist/host-lists/sources/qq-news.source.js.map +1 -0
  326. package/dist/host-lists/sources/sina-news.source.d.ts +9 -0
  327. package/dist/host-lists/sources/sina-news.source.js +98 -0
  328. package/dist/host-lists/sources/sina-news.source.js.map +1 -0
  329. package/dist/host-lists/sources/sina.source.d.ts +9 -0
  330. package/dist/host-lists/sources/sina.source.js +78 -0
  331. package/dist/host-lists/sources/sina.source.js.map +1 -0
  332. package/dist/host-lists/sources/smzdm.source.d.ts +9 -0
  333. package/dist/host-lists/sources/smzdm.source.js +71 -0
  334. package/dist/host-lists/sources/smzdm.source.js.map +1 -0
  335. package/dist/host-lists/sources/sspai.source.d.ts +9 -0
  336. package/dist/host-lists/sources/sspai.source.js +69 -0
  337. package/dist/host-lists/sources/sspai.source.js.map +1 -0
  338. package/dist/host-lists/sources/starrail.source.d.ts +9 -0
  339. package/dist/host-lists/sources/starrail.source.js +72 -0
  340. package/dist/host-lists/sources/starrail.source.js.map +1 -0
  341. package/dist/host-lists/sources/taobao.source.d.ts +10 -0
  342. package/dist/host-lists/sources/taobao.source.js +169 -0
  343. package/dist/host-lists/sources/taobao.source.js.map +1 -0
  344. package/dist/host-lists/sources/thepaper.source.d.ts +9 -0
  345. package/dist/host-lists/sources/thepaper.source.js +56 -0
  346. package/dist/host-lists/sources/thepaper.source.js.map +1 -0
  347. package/dist/host-lists/sources/tieba.source.d.ts +9 -0
  348. package/dist/host-lists/sources/tieba.source.js +58 -0
  349. package/dist/host-lists/sources/tieba.source.js.map +1 -0
  350. package/dist/host-lists/sources/tonghuashun.source.d.ts +9 -0
  351. package/dist/host-lists/sources/tonghuashun.source.js +112 -0
  352. package/dist/host-lists/sources/tonghuashun.source.js.map +1 -0
  353. package/dist/host-lists/sources/toutiao.source.d.ts +9 -0
  354. package/dist/host-lists/sources/toutiao.source.js +56 -0
  355. package/dist/host-lists/sources/toutiao.source.js.map +1 -0
  356. package/dist/host-lists/sources/v2ex.source.d.ts +9 -0
  357. package/dist/host-lists/sources/v2ex.source.js +67 -0
  358. package/dist/host-lists/sources/v2ex.source.js.map +1 -0
  359. package/dist/host-lists/sources/wallstreet.source.d.ts +9 -0
  360. package/dist/host-lists/sources/wallstreet.source.js +59 -0
  361. package/dist/host-lists/sources/wallstreet.source.js.map +1 -0
  362. package/dist/host-lists/sources/weatheralarm.source.d.ts +9 -0
  363. package/dist/host-lists/sources/weatheralarm.source.js +68 -0
  364. package/dist/host-lists/sources/weatheralarm.source.js.map +1 -0
  365. package/dist/host-lists/sources/weibo.source.d.ts +15 -0
  366. package/dist/host-lists/sources/weibo.source.js +180 -0
  367. package/dist/host-lists/sources/weibo.source.js.map +1 -0
  368. package/dist/host-lists/sources/weread.source.d.ts +9 -0
  369. package/dist/host-lists/sources/weread.source.js +82 -0
  370. package/dist/host-lists/sources/weread.source.js.map +1 -0
  371. package/dist/host-lists/sources/xinyu.source.d.ts +9 -0
  372. package/dist/host-lists/sources/xinyu.source.js +151 -0
  373. package/dist/host-lists/sources/xinyu.source.js.map +1 -0
  374. package/dist/host-lists/sources/yicai.source.d.ts +9 -0
  375. package/dist/host-lists/sources/yicai.source.js +113 -0
  376. package/dist/host-lists/sources/yicai.source.js.map +1 -0
  377. package/dist/host-lists/sources/yystv.source.d.ts +9 -0
  378. package/dist/host-lists/sources/yystv.source.js +57 -0
  379. package/dist/host-lists/sources/yystv.source.js.map +1 -0
  380. package/dist/host-lists/sources/zhihu-daily.source.d.ts +9 -0
  381. package/dist/host-lists/sources/zhihu-daily.source.js +60 -0
  382. package/dist/host-lists/sources/zhihu-daily.source.js.map +1 -0
  383. package/dist/host-lists/sources/zhihu.source.d.ts +12 -0
  384. package/dist/host-lists/sources/zhihu.source.js +195 -0
  385. package/dist/host-lists/sources/zhihu.source.js.map +1 -0
  386. package/dist/http/http.module.d.ts +2 -0
  387. package/dist/http/http.module.js +30 -0
  388. package/dist/http/http.module.js.map +1 -0
  389. package/dist/http/http.service.d.ts +53 -0
  390. package/dist/http/http.service.js +277 -0
  391. package/dist/http/http.service.js.map +1 -0
  392. package/dist/main.d.ts +3 -0
  393. package/dist/main.js +70 -0
  394. package/dist/main.js.map +1 -0
  395. package/dist/rss/rss.module.d.ts +2 -0
  396. package/dist/rss/rss.module.js +21 -0
  397. package/dist/rss/rss.module.js.map +1 -0
  398. package/dist/rss/rss.service.d.ts +5 -0
  399. package/dist/rss/rss.service.js +55 -0
  400. package/dist/rss/rss.service.js.map +1 -0
  401. package/dist/scheduler/dto/trigger-fetch.dto.d.ts +3 -0
  402. package/dist/scheduler/dto/trigger-fetch.dto.js +22 -0
  403. package/dist/scheduler/dto/trigger-fetch.dto.js.map +1 -0
  404. package/dist/scheduler/dto/update-source-config.dto.d.ts +4 -0
  405. package/dist/scheduler/dto/update-source-config.dto.js +29 -0
  406. package/dist/scheduler/dto/update-source-config.dto.js.map +1 -0
  407. package/dist/scheduler/scheduler.controller.d.ts +52 -0
  408. package/dist/scheduler/scheduler.controller.js +132 -0
  409. package/dist/scheduler/scheduler.controller.js.map +1 -0
  410. package/dist/scheduler/scheduler.module.d.ts +2 -0
  411. package/dist/scheduler/scheduler.module.js +34 -0
  412. package/dist/scheduler/scheduler.module.js.map +1 -0
  413. package/dist/scheduler/scheduler.service.d.ts +54 -0
  414. package/dist/scheduler/scheduler.service.js +238 -0
  415. package/dist/scheduler/scheduler.service.js.map +1 -0
  416. package/dist/scheduler/tasks/fetch-hot-data.task.d.ts +34 -0
  417. package/dist/scheduler/tasks/fetch-hot-data.task.js +175 -0
  418. package/dist/scheduler/tasks/fetch-hot-data.task.js.map +1 -0
  419. package/dist/token/coolapk.d.ts +11 -0
  420. package/dist/token/coolapk.js +40 -0
  421. package/dist/token/coolapk.js.map +1 -0
  422. package/dist/token/token.module.d.ts +2 -0
  423. package/dist/token/token.module.js +23 -0
  424. package/dist/token/token.module.js.map +1 -0
  425. package/dist/token/token.service.d.ts +19 -0
  426. package/dist/token/token.service.js +115 -0
  427. package/dist/token/token.service.js.map +1 -0
  428. package/dist/token/tools.d.ts +1 -0
  429. package/dist/token/tools.js +15 -0
  430. package/dist/token/tools.js.map +1 -0
  431. package/dist/token/weread.d.ts +2 -0
  432. package/dist/token/weread.js +55 -0
  433. package/dist/token/weread.js.map +1 -0
  434. package/dist/utils/getNum.d.ts +1 -0
  435. package/dist/utils/getNum.js +20 -0
  436. package/dist/utils/getNum.js.map +1 -0
  437. package/dist/utils/getTime.d.ts +11 -0
  438. package/dist/utils/getTime.js +134 -0
  439. package/dist/utils/getTime.js.map +1 -0
  440. package/dist/utils/headers.d.ts +16 -0
  441. package/dist/utils/headers.js +20 -0
  442. package/dist/utils/headers.js.map +1 -0
  443. package/dist/utils/index.d.ts +1 -0
  444. package/dist/utils/index.js +12 -0
  445. package/dist/utils/index.js.map +1 -0
  446. package/dist/utils/parseRSS.d.ts +11 -0
  447. package/dist/utils/parseRSS.js +47 -0
  448. package/dist/utils/parseRSS.js.map +1 -0
  449. package/package.json +148 -4
  450. package/views/home.hbs +65 -0
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.TavilySearchClient = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const daily_brief_config_1 = require("../daily-brief.config");
15
+ let TavilySearchClient = class TavilySearchClient {
16
+ constructor(config) {
17
+ this.config = config;
18
+ this.name = 'tavily';
19
+ }
20
+ isConfigured() {
21
+ return this.config.tavilyConfigured;
22
+ }
23
+ async search(query) {
24
+ const apiKey = this.config.tavilyApiKey;
25
+ if (!apiKey) {
26
+ throw new Error('TAVILY_API_KEY is not configured');
27
+ }
28
+ const maxResults = this.config.tavilyMaxResults;
29
+ const timeoutMs = this.config.tavilyTimeoutMs;
30
+ const response = await fetch('https://api.tavily.com/search', {
31
+ method: 'POST',
32
+ headers: {
33
+ 'Content-Type': 'application/json',
34
+ },
35
+ body: JSON.stringify({
36
+ api_key: apiKey,
37
+ query,
38
+ search_depth: 'basic',
39
+ include_answer: false,
40
+ include_raw_content: false,
41
+ max_results: maxResults,
42
+ }),
43
+ signal: AbortSignal.timeout(timeoutMs),
44
+ });
45
+ if (!response.ok) {
46
+ throw new Error(`Tavily search failed: HTTP ${response.status}`);
47
+ }
48
+ const data = (await response.json());
49
+ if (!Array.isArray(data.results)) {
50
+ throw new Error('Tavily search returned invalid results');
51
+ }
52
+ return data.results
53
+ .filter((item) => item.title && item.url)
54
+ .map((item) => ({
55
+ title: this.truncate(item.title || '', 160),
56
+ url: item.url || '',
57
+ content: this.truncate(item.content || '', 600),
58
+ score: item.score,
59
+ }));
60
+ }
61
+ truncate(value, maxLength) {
62
+ return value.length > maxLength
63
+ ? `${value.slice(0, maxLength).trim()}...`
64
+ : value;
65
+ }
66
+ };
67
+ exports.TavilySearchClient = TavilySearchClient;
68
+ exports.TavilySearchClient = TavilySearchClient = __decorate([
69
+ (0, common_1.Injectable)(),
70
+ __metadata("design:paramtypes", [daily_brief_config_1.DailyBriefConfigService])
71
+ ], TavilySearchClient);
72
+ //# sourceMappingURL=tavily-search.client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tavily-search.client.js","sourceRoot":"","sources":["../../../src/daily-brief/clients/tavily-search.client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,8DAAgE;AAazD,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAG7B,YAA6B,MAA+B;QAA/B,WAAM,GAAN,MAAM,CAAyB;QAFnD,SAAI,GAAG,QAAiB,CAAC;IAE6B,CAAC;IAEhE,YAAY;QACV,OAAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,KAAa;QACxB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC;QACxC,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACtD,CAAC;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;QAChD,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;QAE9C,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,+BAA+B,EAAE;YAC5D,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;aACnC;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACnB,OAAO,EAAE,MAAM;gBACf,KAAK;gBACL,YAAY,EAAE,OAAO;gBACrB,c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AAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;qCAI0B,4CAAuB;GAHjD,kBAAkB,CAyD9B"}
@@ -0,0 +1,31 @@
1
+ import { ConfigService } from '@nestjs/config';
2
+ import { SearchProviderName } from './interfaces/search-provider.interface';
3
+ export declare class DailyBriefConfigService {
4
+ private readonly configService;
5
+ constructor(configService: ConfigService);
6
+ get enabled(): boolean;
7
+ get cronExpression(): string;
8
+ get timezone(): string;
9
+ get sources(): string[];
10
+ get lookbackHours(): number;
11
+ get topItemsPerSource(): number;
12
+ get maxTopics(): number;
13
+ get stockRankingCacheTtl(): number;
14
+ get generatingTimeoutMinutes(): number;
15
+ get sourceConcurrency(): number;
16
+ get searchConcurrency(): number;
17
+ get searchProviders(): SearchProviderName[];
18
+ get aiModel(): string;
19
+ get aiTimeoutMs(): number;
20
+ get aiMaxRetries(): number;
21
+ get openaiApiKey(): string;
22
+ get openaiBaseUrl(): string | undefined;
23
+ get tavilyApiKey(): string;
24
+ get tavilyConfigured(): boolean;
25
+ get tavilyMaxResults(): number;
26
+ get tavilyTimeoutMs(): number;
27
+ get deepseekSearchApiKey(): string;
28
+ get deepseekSearchConfigured(): boolean;
29
+ get deepseekSearchMaxResults(): number;
30
+ get deepseekSearchTimeoutMs(): number;
31
+ }
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DailyBriefConfigService = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const config_1 = require("@nestjs/config");
15
+ let DailyBriefConfigService = class DailyBriefConfigService {
16
+ constructor(configService) {
17
+ this.configService = configService;
18
+ }
19
+ get enabled() {
20
+ return this.configService.getOrThrow('BRIEF_ENABLED');
21
+ }
22
+ get cronExpression() {
23
+ return this.configService.getOrThrow('BRIEF_CRON_EXPRESSION');
24
+ }
25
+ get timezone() {
26
+ return this.configService.getOrThrow('BRIEF_TIMEZONE');
27
+ }
28
+ get sources() {
29
+ return this.configService
30
+ .getOrThrow('BRIEF_SOURCES')
31
+ .split(',')
32
+ .map((item) => item.trim())
33
+ .filter(Boolean);
34
+ }
35
+ get lookbackHours() {
36
+ return this.configService.getOrThrow('BRIEF_LOOKBACK_HOURS');
37
+ }
38
+ get topItemsPerSource() {
39
+ return this.configService.getOrThrow('BRIEF_TOP_ITEMS_PER_SOURCE');
40
+ }
41
+ get maxTopics() {
42
+ return this.configService.getOrThrow('BRIEF_MAX_TOPICS');
43
+ }
44
+ get stockRankingCacheTtl() {
45
+ return this.configService.getOrThrow('BRIEF_STOCK_RANKING_CACHE_TTL');
46
+ }
47
+ get generatingTimeoutMinutes() {
48
+ return this.configService.getOrThrow('BRIEF_GENERATING_TIMEOUT_MINUTES');
49
+ }
50
+ get sourceConcurrency() {
51
+ return this.configService.getOrThrow('BRIEF_SOURCE_CONCURRENCY');
52
+ }
53
+ get searchConcurrency() {
54
+ return this.configService.getOrThrow('BRIEF_SEARCH_CONCURRENCY');
55
+ }
56
+ get searchProviders() {
57
+ return this.configService
58
+ .getOrThrow('BRIEF_SEARCH_PROVIDERS')
59
+ .split(',')
60
+ .map((name) => name.trim())
61
+ .filter(Boolean);
62
+ }
63
+ get aiModel() {
64
+ return this.configService.getOrThrow('AI_MODEL');
65
+ }
66
+ get aiTimeoutMs() {
67
+ return this.configService.getOrThrow('AI_TIMEOUT_MS');
68
+ }
69
+ get aiMaxRetries() {
70
+ return this.configService.getOrThrow('AI_MAX_RETRIES');
71
+ }
72
+ get openaiApiKey() {
73
+ return this.configService.getOrThrow('OPENAI_API_KEY');
74
+ }
75
+ get openaiBaseUrl() {
76
+ return (this.configService.getOrThrow('OPENAI_API_BASE_URL') || undefined);
77
+ }
78
+ get tavilyApiKey() {
79
+ return this.configService.getOrThrow('TAVILY_API_KEY');
80
+ }
81
+ get tavilyConfigured() {
82
+ return Boolean(this.tavilyApiKey);
83
+ }
84
+ get tavilyMaxResults() {
85
+ return this.configService.getOrThrow('TAVILY_MAX_RESULTS');
86
+ }
87
+ get tavilyTimeoutMs() {
88
+ return this.configService.getOrThrow('TAVILY_TIMEOUT_MS');
89
+ }
90
+ get deepseekSearchApiKey() {
91
+ return this.configService.getOrThrow('DEEPSEEK_SEARCH_API_KEY');
92
+ }
93
+ get deepseekSearchConfigured() {
94
+ return Boolean(this.deepseekSearchApiKey);
95
+ }
96
+ get deepseekSearchMaxResults() {
97
+ return this.configService.getOrThrow('DEEPSEEK_SEARCH_MAX_RESULTS');
98
+ }
99
+ get deepseekSearchTimeoutMs() {
100
+ return this.configService.getOrThrow('DEEPSEEK_SEARCH_TIMEOUT_MS');
101
+ }
102
+ };
103
+ exports.DailyBriefConfigService = DailyBriefConfigService;
104
+ exports.DailyBriefConfigService = DailyBriefConfigService = __decorate([
105
+ (0, common_1.Injectable)(),
106
+ __metadata("design:paramtypes", [config_1.ConfigService])
107
+ ], DailyBriefConfigService);
108
+ //# sourceMappingURL=daily-brief.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daily-brief.config.js","sourceRoot":"","sources":["../../src/daily-brief/daily-brief.config.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2CAA+C;AAaxC,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CA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,IAAI,wBAAwB;QAC1B,OAAO,OAAO,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IAC5C,CAAC;IAED,IAAI,wBAAwB;QAC1B,OAAO,IAAI,CAAC,aAAa,CAAC,UAAU,CAAS,6BAA6B,CAAC,CAAC;IAC9E,CAAC;IAED,IAAI,uBAAuB;QACzB,OAAO,IAAI,CAAC,aAAa,CAAC,UAAU,CAAS,4BAA4B,CAAC,CAAC;IAC7E,CAAC;CACF,CAAA;AA1HY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAU,GAAE;qCAEiC,sBAAa;GAD9C,uBAAuB,CA0HnC"}
@@ -0,0 +1,72 @@
1
+ import { DailyBriefService } from './daily-brief.service';
2
+ import { DailyBriefScheduler } from './daily-brief.scheduler';
3
+ import { GenerateBriefDto } from './dto/generate-brief.dto';
4
+ import { StockRankingQueryDto } from './dto/stock-ranking-query.dto';
5
+ import { ListBriefsQueryDto } from './dto/list-briefs-query.dto';
6
+ import { BriefDateParamDto } from './dto/brief-date-param.dto';
7
+ export declare class DailyBriefController {
8
+ private readonly dailyBriefService;
9
+ private readonly dailyBriefScheduler;
10
+ constructor(dailyBriefService: DailyBriefService, dailyBriefScheduler: DailyBriefScheduler);
11
+ generate(body: GenerateBriefDto): Promise<import("mongoose").FlattenMaps<import("../database/schemas/daily-brief.schema").DailyBriefDocument> & {
12
+ _id: import("mongoose").Types.ObjectId;
13
+ }>;
14
+ getConfig(): {
15
+ cronExpression: string;
16
+ timezone: string;
17
+ sources: string[];
18
+ lookbackHours: number;
19
+ topItemsPerSource: number;
20
+ maxTopics: number;
21
+ stockRankingCacheTtl: number;
22
+ model: string;
23
+ tavilyConfigured: boolean;
24
+ deepseekSearchConfigured: boolean;
25
+ searchProviders: import("./interfaces/search-provider.interface").SearchProviderName[];
26
+ enabled: boolean;
27
+ };
28
+ getSchedulerStatus(): {
29
+ isRunning: boolean;
30
+ enabled: boolean;
31
+ cronExpression: string;
32
+ timezone: string;
33
+ cronJobExists: boolean;
34
+ };
35
+ startScheduler(): {
36
+ message: string;
37
+ };
38
+ stopScheduler(): {
39
+ message: string;
40
+ };
41
+ reconfigureScheduler(): {
42
+ message: string;
43
+ };
44
+ findLatest(period?: string, includeDebug?: string): Promise<(import("mongoose").FlattenMaps<import("../database/schemas/daily-brief.schema").DailyBriefDocument> & {
45
+ _id: import("mongoose").Types.ObjectId;
46
+ }) | null>;
47
+ list(query: ListBriefsQueryDto): Promise<{
48
+ data: import("../database/repositories/daily-brief.repository").DailyBriefListItem[];
49
+ total: number;
50
+ page: number;
51
+ limit: number;
52
+ totalPages: number;
53
+ }>;
54
+ getStockRanking(query: StockRankingQueryDto): Promise<import("./daily-brief.service").StockRankingResponse>;
55
+ deleteHistory(olderThan?: string, beforeDate?: string, period?: string): Promise<{
56
+ mode: string;
57
+ olderThan: string | null;
58
+ beforeDate: string;
59
+ period: string | null;
60
+ deletedCount: number;
61
+ }>;
62
+ findByDate(params: BriefDateParamDto, period?: string, includeDebug?: string): Promise<(import("mongoose").FlattenMaps<import("../database/schemas/daily-brief.schema").DailyBriefDocument> & {
63
+ _id: import("mongoose").Types.ObjectId;
64
+ }) | null>;
65
+ deleteByDate(params: BriefDateParamDto, period?: string): Promise<{
66
+ mode: string;
67
+ briefDate: string;
68
+ period: string | null;
69
+ deletedCount: number;
70
+ }>;
71
+ private parseBoolean;
72
+ }
@@ -0,0 +1,169 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.DailyBriefController = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const daily_brief_service_1 = require("./daily-brief.service");
18
+ const daily_brief_scheduler_1 = require("./daily-brief.scheduler");
19
+ const generate_brief_dto_1 = require("./dto/generate-brief.dto");
20
+ const stock_ranking_query_dto_1 = require("./dto/stock-ranking-query.dto");
21
+ const list_briefs_query_dto_1 = require("./dto/list-briefs-query.dto");
22
+ const brief_date_param_dto_1 = require("./dto/brief-date-param.dto");
23
+ let DailyBriefController = class DailyBriefController {
24
+ constructor(dailyBriefService, dailyBriefScheduler) {
25
+ this.dailyBriefService = dailyBriefService;
26
+ this.dailyBriefScheduler = dailyBriefScheduler;
27
+ }
28
+ generate(body) {
29
+ return this.dailyBriefService.generateBrief(body);
30
+ }
31
+ getConfig() {
32
+ return {
33
+ enabled: this.dailyBriefScheduler.isEnabled(),
34
+ ...this.dailyBriefService.getConfig(),
35
+ };
36
+ }
37
+ getSchedulerStatus() {
38
+ return this.dailyBriefScheduler.getStatus();
39
+ }
40
+ startScheduler() {
41
+ this.dailyBriefScheduler.start();
42
+ return { message: 'Daily brief scheduler started' };
43
+ }
44
+ stopScheduler() {
45
+ this.dailyBriefScheduler.stop();
46
+ return { message: 'Daily brief scheduler stopped' };
47
+ }
48
+ reconfigureScheduler() {
49
+ this.dailyBriefScheduler.reconfigure();
50
+ return { message: 'Daily brief scheduler reconfigured' };
51
+ }
52
+ findLatest(period, includeDebug) {
53
+ return this.dailyBriefService.findLatest(period, this.parseBoolean(includeDebug));
54
+ }
55
+ list(query) {
56
+ return this.dailyBriefService.list(query);
57
+ }
58
+ getStockRanking(query) {
59
+ return this.dailyBriefService.getStockRanking(query);
60
+ }
61
+ deleteHistory(olderThan, beforeDate, period) {
62
+ return this.dailyBriefService.deleteHistory({
63
+ olderThan,
64
+ beforeDate,
65
+ period,
66
+ });
67
+ }
68
+ findByDate(params, period, includeDebug) {
69
+ return this.dailyBriefService.findByDate(params.date, period, this.parseBoolean(includeDebug));
70
+ }
71
+ deleteByDate(params, period) {
72
+ return this.dailyBriefService.deleteByDate(params.date, period);
73
+ }
74
+ parseBoolean(value) {
75
+ return value === 'true';
76
+ }
77
+ };
78
+ exports.DailyBriefController = DailyBriefController;
79
+ __decorate([
80
+ (0, common_1.Post)('generate'),
81
+ __param(0, (0, common_1.Body)()),
82
+ __metadata("design:type", Function),
83
+ __metadata("design:paramtypes", [generate_brief_dto_1.GenerateBriefDto]),
84
+ __metadata("design:returntype", void 0)
85
+ ], DailyBriefController.prototype, "generate", null);
86
+ __decorate([
87
+ (0, common_1.Get)('config'),
88
+ __metadata("design:type", Function),
89
+ __metadata("design:paramtypes", []),
90
+ __metadata("design:returntype", void 0)
91
+ ], DailyBriefController.prototype, "getConfig", null);
92
+ __decorate([
93
+ (0, common_1.Get)('scheduler/status'),
94
+ __metadata("design:type", Function),
95
+ __metadata("design:paramtypes", []),
96
+ __metadata("design:returntype", void 0)
97
+ ], DailyBriefController.prototype, "getSchedulerStatus", null);
98
+ __decorate([
99
+ (0, common_1.Post)('scheduler/start'),
100
+ __metadata("design:type", Function),
101
+ __metadata("design:paramtypes", []),
102
+ __metadata("design:returntype", void 0)
103
+ ], DailyBriefController.prototype, "startScheduler", null);
104
+ __decorate([
105
+ (0, common_1.Post)('scheduler/stop'),
106
+ __metadata("design:type", Function),
107
+ __metadata("design:paramtypes", []),
108
+ __metadata("design:returntype", void 0)
109
+ ], DailyBriefController.prototype, "stopScheduler", null);
110
+ __decorate([
111
+ (0, common_1.Post)('scheduler/reconfigure'),
112
+ __metadata("design:type", Function),
113
+ __metadata("design:paramtypes", []),
114
+ __metadata("design:returntype", void 0)
115
+ ], DailyBriefController.prototype, "reconfigureScheduler", null);
116
+ __decorate([
117
+ (0, common_1.Get)('latest'),
118
+ __param(0, (0, common_1.Query)('period')),
119
+ __param(1, (0, common_1.Query)('includeDebug')),
120
+ __metadata("design:type", Function),
121
+ __metadata("design:paramtypes", [String, String]),
122
+ __metadata("design:returntype", void 0)
123
+ ], DailyBriefController.prototype, "findLatest", null);
124
+ __decorate([
125
+ (0, common_1.Get)(),
126
+ __param(0, (0, common_1.Query)()),
127
+ __metadata("design:type", Function),
128
+ __metadata("design:paramtypes", [list_briefs_query_dto_1.ListBriefsQueryDto]),
129
+ __metadata("design:returntype", void 0)
130
+ ], DailyBriefController.prototype, "list", null);
131
+ __decorate([
132
+ (0, common_1.Get)('statistics/stocks'),
133
+ __param(0, (0, common_1.Query)()),
134
+ __metadata("design:type", Function),
135
+ __metadata("design:paramtypes", [stock_ranking_query_dto_1.StockRankingQueryDto]),
136
+ __metadata("design:returntype", void 0)
137
+ ], DailyBriefController.prototype, "getStockRanking", null);
138
+ __decorate([
139
+ (0, common_1.Delete)('history'),
140
+ __param(0, (0, common_1.Query)('olderThan')),
141
+ __param(1, (0, common_1.Query)('beforeDate')),
142
+ __param(2, (0, common_1.Query)('period')),
143
+ __metadata("design:type", Function),
144
+ __metadata("design:paramtypes", [String, String, String]),
145
+ __metadata("design:returntype", void 0)
146
+ ], DailyBriefController.prototype, "deleteHistory", null);
147
+ __decorate([
148
+ (0, common_1.Get)(':date'),
149
+ __param(0, (0, common_1.Param)()),
150
+ __param(1, (0, common_1.Query)('period')),
151
+ __param(2, (0, common_1.Query)('includeDebug')),
152
+ __metadata("design:type", Function),
153
+ __metadata("design:paramtypes", [brief_date_param_dto_1.BriefDateParamDto, String, String]),
154
+ __metadata("design:returntype", void 0)
155
+ ], DailyBriefController.prototype, "findByDate", null);
156
+ __decorate([
157
+ (0, common_1.Delete)(':date'),
158
+ __param(0, (0, common_1.Param)()),
159
+ __param(1, (0, common_1.Query)('period')),
160
+ __metadata("design:type", Function),
161
+ __metadata("design:paramtypes", [brief_date_param_dto_1.BriefDateParamDto, String]),
162
+ __metadata("design:returntype", void 0)
163
+ ], DailyBriefController.prototype, "deleteByDate", null);
164
+ exports.DailyBriefController = DailyBriefController = __decorate([
165
+ (0, common_1.Controller)('api/briefs'),
166
+ __metadata("design:paramtypes", [daily_brief_service_1.DailyBriefService,
167
+ daily_brief_scheduler_1.DailyBriefScheduler])
168
+ ], DailyBriefController);
169
+ //# sourceMappingURL=daily-brief.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daily-brief.controller.js","sourceRoot":"","sources":["../../src/daily-brief/daily-brief.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAQwB;AACxB,+DAA0D;AAC1D,mEAA8D;AAC9D,iEAA4D;AAC5D,2EAAqE;AACrE,uEAAiE;AACjE,qEAA+D;AAGxD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YACmB,iBAAoC,EACpC,mBAAwC;QADxC,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,wBAAmB,GAAnB,mBAAmB,CAAqB;IACxD,CAAC;IAGJ,QAAQ,CAAS,IAAsB;QACrC,OAAO,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IAGD,SAAS;QACP,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE;YAC7C,GAAG,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE;SACtC,CAAC;IACJ,CAAC;IAGD,kBAAkB;QAChB,OAAO,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE,CAAC;IAC9C,CAAC;IAGD,cAAc;QACZ,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE,CAAC;QACjC,OAAO,EAAE,OAAO,EAAE,+BAA+B,EAAE,CAAC;IACtD,CAAC;IAGD,aAAa;QACX,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC;QAChC,OAAO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Y,CAAC;qCAGe,uCAAiB;QACf,2CAAmB;GAHhD,oBAAoB,CAoGhC"}
@@ -0,0 +1,2 @@
1
+ export declare class DailyBriefModule {
2
+ }
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.DailyBriefModule = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const schedule_1 = require("@nestjs/schedule");
12
+ const cache_module_1 = require("../cache/cache.module");
13
+ const database_module_1 = require("../database/database.module");
14
+ const hot_lists_module_1 = require("../host-lists/hot-lists.module");
15
+ const ai_analysis_client_1 = require("./clients/ai-analysis.client");
16
+ const tavily_search_client_1 = require("./clients/tavily-search.client");
17
+ const deepseek_search_client_1 = require("./clients/deepseek-search.client");
18
+ const brief_search_service_1 = require("./clients/brief-search.service");
19
+ const daily_brief_controller_1 = require("./daily-brief.controller");
20
+ const daily_brief_scheduler_1 = require("./daily-brief.scheduler");
21
+ const daily_brief_service_1 = require("./daily-brief.service");
22
+ const daily_brief_config_1 = require("./daily-brief.config");
23
+ const scheduler_module_1 = require("../scheduler/scheduler.module");
24
+ let DailyBriefModule = class DailyBriefModule {
25
+ };
26
+ exports.DailyBriefModule = DailyBriefModule;
27
+ exports.DailyBriefModule = DailyBriefModule = __decorate([
28
+ (0, common_1.Module)({
29
+ imports: [
30
+ schedule_1.ScheduleModule,
31
+ cache_module_1.CacheModule,
32
+ database_module_1.DatabaseModule,
33
+ hot_lists_module_1.HotListsModule,
34
+ scheduler_module_1.SchedulerModule,
35
+ ],
36
+ controllers: [daily_brief_controller_1.DailyBriefController],
37
+ providers: [
38
+ daily_brief_config_1.DailyBriefConfigService,
39
+ daily_brief_service_1.DailyBriefService,
40
+ daily_brief_scheduler_1.DailyBriefScheduler,
41
+ ai_analysis_client_1.AiAnalysisClient,
42
+ tavily_search_client_1.TavilySearchClient,
43
+ deepseek_search_client_1.DeepseekSearchClient,
44
+ brief_search_service_1.BriefSearchService,
45
+ ],
46
+ exports: [daily_brief_service_1.DailyBriefService],
47
+ })
48
+ ], DailyBriefModule);
49
+ //# sourceMappingURL=daily-brief.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daily-brief.module.js","sourceRoot":"","sources":["../../src/daily-brief/daily-brief.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+CAAkD;AAClD,wDAAoD;AACpD,iEAA6D;AAC7D,qEAAgE;AAChE,qEAAgE;AAChE,yEAAoE;AACpE,6EAAwE;AACxE,yEAAoE;AACpE,qEAAgE;AAChE,mEAA8D;AAC9D,+DAA0D;AAC1D,6DAA+D;AAC/D,oEAAgE;AAsBzD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IApB5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,yBAAc;YACd,0BAAW;YACX,gCAAc;YACd,iCAAc;YACd,kCAAe;SAChB;QACD,WAAW,EAAE,CAAC,6CAAoB,CAAC;QACnC,SAAS,EAAE;YACT,4CAAuB;YACvB,uCAAiB;YACjB,2CAAmB;YACnB,qCAAgB;YAChB,yCAAkB;YAClB,6CAAoB;YACpB,yCAAkB;SACnB;QACD,OAAO,EAAE,CAAC,uCAAiB,CAAC;KAC7B,CAAC;GACW,gBAAgB,CAAG"}
@@ -0,0 +1,30 @@
1
+ import { OnModuleDestroy, OnModuleInit } from '@nestjs/common';
2
+ import { SchedulerRegistry } from '@nestjs/schedule';
3
+ import { DailyBriefService } from './daily-brief.service';
4
+ import { DailyBriefConfigService } from './daily-brief.config';
5
+ export declare class DailyBriefScheduler implements OnModuleInit, OnModuleDestroy {
6
+ private readonly config;
7
+ private readonly schedulerRegistry;
8
+ private readonly dailyBriefService;
9
+ private readonly logger;
10
+ private readonly cronJobName;
11
+ private isRunning;
12
+ private enabled;
13
+ constructor(config: DailyBriefConfigService, schedulerRegistry: SchedulerRegistry, dailyBriefService: DailyBriefService);
14
+ onModuleInit(): void;
15
+ onModuleDestroy(): void;
16
+ isEnabled(): boolean;
17
+ getStatus(): {
18
+ isRunning: boolean;
19
+ enabled: boolean;
20
+ cronExpression: string;
21
+ timezone: string;
22
+ cronJobExists: boolean;
23
+ };
24
+ start(): void;
25
+ stop(): void;
26
+ reconfigure(): void;
27
+ private setupCronJob;
28
+ private stopCronJob;
29
+ private handleCron;
30
+ }