@ttkit/daily-hot-api 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +77 -0
- package/LICENSE +21 -0
- package/README.md +317 -2
- package/bin/daily-hot-api.js +25 -0
- package/dist/app.controller.d.ts +41 -0
- package/dist/app.controller.js +91 -0
- package/dist/app.controller.js.map +1 -0
- package/dist/app.module.d.ts +4 -0
- package/dist/app.module.js +44 -0
- package/dist/app.module.js.map +1 -0
- package/dist/app.service.d.ts +19 -0
- package/dist/app.service.js +57 -0
- package/dist/app.service.js.map +1 -0
- package/dist/cache/cache.module.d.ts +2 -0
- package/dist/cache/cache.module.js +52 -0
- package/dist/cache/cache.module.js.map +1 -0
- package/dist/cache/cache.service.d.ts +26 -0
- package/dist/cache/cache.service.js +163 -0
- package/dist/cache/cache.service.js.map +1 -0
- package/dist/cli/args.d.ts +24 -0
- package/dist/cli/args.js +261 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/commands/logs.d.ts +3 -0
- package/dist/cli/commands/logs.js +55 -0
- package/dist/cli/commands/logs.js.map +1 -0
- package/dist/cli/commands/restart.d.ts +3 -0
- package/dist/cli/commands/restart.js +62 -0
- package/dist/cli/commands/restart.js.map +1 -0
- package/dist/cli/commands/start.d.ts +3 -0
- package/dist/cli/commands/start.js +280 -0
- package/dist/cli/commands/start.js.map +1 -0
- package/dist/cli/commands/status.d.ts +3 -0
- package/dist/cli/commands/status.js +78 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/stop.d.ts +12 -0
- package/dist/cli/commands/stop.js +135 -0
- package/dist/cli/commands/stop.js.map +1 -0
- package/dist/cli/context.d.ts +4 -0
- package/dist/cli/context.js +3 -0
- package/dist/cli/context.js.map +1 -0
- package/dist/cli/env.d.ts +2 -0
- package/dist/cli/env.js +80 -0
- package/dist/cli/env.js.map +1 -0
- package/dist/cli/errors.d.ts +14 -0
- package/dist/cli/errors.js +25 -0
- package/dist/cli/errors.js.map +1 -0
- package/dist/cli/health.d.ts +2 -0
- package/dist/cli/health.js +44 -0
- package/dist/cli/health.js.map +1 -0
- package/dist/cli/help.d.ts +3 -0
- package/dist/cli/help.js +158 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +94 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/log-file.d.ts +8 -0
- package/dist/cli/log-file.js +58 -0
- package/dist/cli/log-file.js.map +1 -0
- package/dist/cli/output.d.ts +7 -0
- package/dist/cli/output.js +46 -0
- package/dist/cli/output.js.map +1 -0
- package/dist/cli/paths.d.ts +33 -0
- package/dist/cli/paths.js +76 -0
- package/dist/cli/paths.js.map +1 -0
- package/dist/cli/run-state.d.ts +25 -0
- package/dist/cli/run-state.js +159 -0
- package/dist/cli/run-state.js.map +1 -0
- package/dist/common/middlewares/logger.middleware.d.ts +7 -0
- package/dist/common/middlewares/logger.middleware.js +29 -0
- package/dist/common/middlewares/logger.middleware.js.map +1 -0
- package/dist/config/config.module.d.ts +2 -0
- package/dist/config/config.module.js +47 -0
- package/dist/config/config.module.js.map +1 -0
- package/dist/config/configuration.d.ts +3 -0
- package/dist/config/configuration.js +5 -0
- package/dist/config/configuration.js.map +1 -0
- package/dist/config/validation.schema.d.ts +114 -0
- package/dist/config/validation.schema.js +69 -0
- package/dist/config/validation.schema.js.map +1 -0
- package/dist/daily-brief/clients/ai-analysis.client.d.ts +20 -0
- package/dist/daily-brief/clients/ai-analysis.client.js +217 -0
- package/dist/daily-brief/clients/ai-analysis.client.js.map +1 -0
- package/dist/daily-brief/clients/brief-search.service.d.ts +11 -0
- package/dist/daily-brief/clients/brief-search.service.js +52 -0
- package/dist/daily-brief/clients/brief-search.service.js.map +1 -0
- package/dist/daily-brief/clients/deepseek-search.client.d.ts +11 -0
- package/dist/daily-brief/clients/deepseek-search.client.js +70 -0
- package/dist/daily-brief/clients/deepseek-search.client.js.map +1 -0
- package/dist/daily-brief/clients/tavily-search.client.d.ts +11 -0
- package/dist/daily-brief/clients/tavily-search.client.js +72 -0
- package/dist/daily-brief/clients/tavily-search.client.js.map +1 -0
- package/dist/daily-brief/daily-brief.config.d.ts +31 -0
- package/dist/daily-brief/daily-brief.config.js +108 -0
- package/dist/daily-brief/daily-brief.config.js.map +1 -0
- package/dist/daily-brief/daily-brief.controller.d.ts +72 -0
- package/dist/daily-brief/daily-brief.controller.js +169 -0
- package/dist/daily-brief/daily-brief.controller.js.map +1 -0
- package/dist/daily-brief/daily-brief.module.d.ts +2 -0
- package/dist/daily-brief/daily-brief.module.js +49 -0
- package/dist/daily-brief/daily-brief.module.js.map +1 -0
- package/dist/daily-brief/daily-brief.scheduler.d.ts +30 -0
- package/dist/daily-brief/daily-brief.scheduler.js +113 -0
- package/dist/daily-brief/daily-brief.scheduler.js.map +1 -0
- package/dist/daily-brief/daily-brief.service.d.ts +101 -0
- package/dist/daily-brief/daily-brief.service.js +412 -0
- package/dist/daily-brief/daily-brief.service.js.map +1 -0
- package/dist/daily-brief/dto/brief-date-param.dto.d.ts +3 -0
- package/dist/daily-brief/dto/brief-date-param.dto.js +23 -0
- package/dist/daily-brief/dto/brief-date-param.dto.js.map +1 -0
- package/dist/daily-brief/dto/generate-brief.dto.d.ts +6 -0
- package/dist/daily-brief/dto/generate-brief.dto.js +39 -0
- package/dist/daily-brief/dto/generate-brief.dto.js.map +1 -0
- package/dist/daily-brief/dto/list-briefs-query.dto.d.ts +6 -0
- package/dist/daily-brief/dto/list-briefs-query.dto.js +42 -0
- package/dist/daily-brief/dto/list-briefs-query.dto.js.map +1 -0
- package/dist/daily-brief/dto/stock-ranking-query.dto.d.ts +6 -0
- package/dist/daily-brief/dto/stock-ranking-query.dto.js +46 -0
- package/dist/daily-brief/dto/stock-ranking-query.dto.js.map +1 -0
- package/dist/daily-brief/interfaces/daily-brief.interface.d.ts +59 -0
- package/dist/daily-brief/interfaces/daily-brief.interface.js +3 -0
- package/dist/daily-brief/interfaces/daily-brief.interface.js.map +1 -0
- package/dist/daily-brief/interfaces/search-provider.interface.d.ts +11 -0
- package/dist/daily-brief/interfaces/search-provider.interface.js +3 -0
- package/dist/daily-brief/interfaces/search-provider.interface.js.map +1 -0
- package/dist/daily-brief/utils/brief-date.d.ts +2 -0
- package/dist/daily-brief/utils/brief-date.js +16 -0
- package/dist/daily-brief/utils/brief-date.js.map +1 -0
- package/dist/daily-brief/utils/concurrency.d.ts +1 -0
- package/dist/daily-brief/utils/concurrency.js +20 -0
- package/dist/daily-brief/utils/concurrency.js.map +1 -0
- package/dist/database/database.module.d.ts +2 -0
- package/dist/database/database.module.js +57 -0
- package/dist/database/database.module.js.map +1 -0
- package/dist/database/repositories/daily-brief.repository.d.ts +96 -0
- package/dist/database/repositories/daily-brief.repository.js +457 -0
- package/dist/database/repositories/daily-brief.repository.js.map +1 -0
- package/dist/database/repositories/hot-item.repository.d.ts +52 -0
- package/dist/database/repositories/hot-item.repository.js +255 -0
- package/dist/database/repositories/hot-item.repository.js.map +1 -0
- package/dist/database/repositories/source-config.repository.d.ts +15 -0
- package/dist/database/repositories/source-config.repository.js +77 -0
- package/dist/database/repositories/source-config.repository.js.map +1 -0
- package/dist/database/schemas/daily-brief.schema.d.ts +30 -0
- package/dist/database/schemas/daily-brief.schema.js +103 -0
- package/dist/database/schemas/daily-brief.schema.js.map +1 -0
- package/dist/database/schemas/hot-item.schema.d.ts +20 -0
- package/dist/database/schemas/hot-item.schema.js +72 -0
- package/dist/database/schemas/hot-item.schema.js.map +1 -0
- package/dist/database/schemas/source-config.schema.d.ts +15 -0
- package/dist/database/schemas/source-config.schema.js +47 -0
- package/dist/database/schemas/source-config.schema.js.map +1 -0
- package/dist/history/dto/history-response.dto.d.ts +17 -0
- package/dist/history/dto/history-response.dto.js +13 -0
- package/dist/history/dto/history-response.dto.js.map +1 -0
- package/dist/history/dto/search-history.dto.d.ts +10 -0
- package/dist/history/dto/search-history.dto.js +72 -0
- package/dist/history/dto/search-history.dto.js.map +1 -0
- package/dist/history/history.controller.d.ts +13 -0
- package/dist/history/history.controller.js +92 -0
- package/dist/history/history.controller.js.map +1 -0
- package/dist/history/history.module.d.ts +2 -0
- package/dist/history/history.module.js +25 -0
- package/dist/history/history.module.js.map +1 -0
- package/dist/history/history.service.d.ts +15 -0
- package/dist/history/history.service.js +68 -0
- package/dist/history/history.service.js.map +1 -0
- package/dist/host-lists/decorators/hot-source.decorator.d.ts +9 -0
- package/dist/host-lists/decorators/hot-source.decorator.js +11 -0
- package/dist/host-lists/decorators/hot-source.decorator.js.map +1 -0
- package/dist/host-lists/dto/hot-list.dto.d.ts +14 -0
- package/dist/host-lists/dto/hot-list.dto.js +94 -0
- package/dist/host-lists/dto/hot-list.dto.js.map +1 -0
- package/dist/host-lists/hot-lists.controller.d.ts +39 -0
- package/dist/host-lists/hot-lists.controller.js +87 -0
- package/dist/host-lists/hot-lists.controller.js.map +1 -0
- package/dist/host-lists/hot-lists.module.d.ts +2 -0
- package/dist/host-lists/hot-lists.module.js +36 -0
- package/dist/host-lists/hot-lists.module.js.map +1 -0
- package/dist/host-lists/hot-lists.service.d.ts +21 -0
- package/dist/host-lists/hot-lists.service.js +115 -0
- package/dist/host-lists/hot-lists.service.js.map +1 -0
- package/dist/host-lists/interfaces/hot-list-source.interface.d.ts +5 -0
- package/dist/host-lists/interfaces/hot-list-source.interface.js +3 -0
- package/dist/host-lists/interfaces/hot-list-source.interface.js.map +1 -0
- package/dist/host-lists/interfaces/hot-list.interface.d.ts +31 -0
- package/dist/host-lists/interfaces/hot-list.interface.js +3 -0
- package/dist/host-lists/interfaces/hot-list.interface.js.map +1 -0
- package/dist/host-lists/interfaces/router-data.interface.d.ts +19 -0
- package/dist/host-lists/interfaces/router-data.interface.js +3 -0
- package/dist/host-lists/interfaces/router-data.interface.js.map +1 -0
- package/dist/host-lists/sources/36kr.source.d.ts +9 -0
- package/dist/host-lists/sources/36kr.source.js +89 -0
- package/dist/host-lists/sources/36kr.source.js.map +1 -0
- package/dist/host-lists/sources/51cto.source.d.ts +11 -0
- package/dist/host-lists/sources/51cto.source.js +71 -0
- package/dist/host-lists/sources/51cto.source.js.map +1 -0
- package/dist/host-lists/sources/52pojie.source.d.ts +9 -0
- package/dist/host-lists/sources/52pojie.source.js +109 -0
- package/dist/host-lists/sources/52pojie.source.js.map +1 -0
- package/dist/host-lists/sources/acfun.source.d.ts +9 -0
- package/dist/host-lists/sources/acfun.source.js +90 -0
- package/dist/host-lists/sources/acfun.source.js.map +1 -0
- package/dist/host-lists/sources/baidu.source.d.ts +9 -0
- package/dist/host-lists/sources/baidu.source.js +85 -0
- package/dist/host-lists/sources/baidu.source.js.map +1 -0
- package/dist/host-lists/sources/bilibili.source.d.ts +14 -0
- package/dist/host-lists/sources/bilibili.source.js +188 -0
- package/dist/host-lists/sources/bilibili.source.js.map +1 -0
- package/dist/host-lists/sources/caixin.source.d.ts +9 -0
- package/dist/host-lists/sources/caixin.source.js +102 -0
- package/dist/host-lists/sources/caixin.source.js.map +1 -0
- package/dist/host-lists/sources/cls.source.d.ts +9 -0
- package/dist/host-lists/sources/cls.source.js +62 -0
- package/dist/host-lists/sources/cls.source.js.map +1 -0
- package/dist/host-lists/sources/coolapk.source.d.ts +9 -0
- package/dist/host-lists/sources/coolapk.source.js +57 -0
- package/dist/host-lists/sources/coolapk.source.js.map +1 -0
- package/dist/host-lists/sources/csdn.source.d.ts +9 -0
- package/dist/host-lists/sources/csdn.source.js +59 -0
- package/dist/host-lists/sources/csdn.source.js.map +1 -0
- package/dist/host-lists/sources/dgtle.source.d.ts +9 -0
- package/dist/host-lists/sources/dgtle.source.js +57 -0
- package/dist/host-lists/sources/dgtle.source.js.map +1 -0
- package/dist/host-lists/sources/douban-group.source.d.ts +11 -0
- package/dist/host-lists/sources/douban-group.source.js +100 -0
- package/dist/host-lists/sources/douban-group.source.js.map +1 -0
- package/dist/host-lists/sources/douban-movie.source.d.ts +10 -0
- package/dist/host-lists/sources/douban-movie.source.js +103 -0
- package/dist/host-lists/sources/douban-movie.source.js.map +1 -0
- package/dist/host-lists/sources/douyin.d.ts +16 -0
- package/dist/host-lists/sources/douyin.js +215 -0
- package/dist/host-lists/sources/douyin.js.map +1 -0
- package/dist/host-lists/sources/eastmoney-stock.source.d.ts +11 -0
- package/dist/host-lists/sources/eastmoney-stock.source.js +151 -0
- package/dist/host-lists/sources/eastmoney-stock.source.js.map +1 -0
- package/dist/host-lists/sources/eastmoney.source.d.ts +9 -0
- package/dist/host-lists/sources/eastmoney.source.js +86 -0
- package/dist/host-lists/sources/eastmoney.source.js.map +1 -0
- package/dist/host-lists/sources/geekpark.source.d.ts +9 -0
- package/dist/host-lists/sources/geekpark.source.js +60 -0
- package/dist/host-lists/sources/geekpark.source.js.map +1 -0
- package/dist/host-lists/sources/gelonghui.source.d.ts +9 -0
- package/dist/host-lists/sources/gelonghui.source.js +139 -0
- package/dist/host-lists/sources/gelonghui.source.js.map +1 -0
- package/dist/host-lists/sources/github.source.d.ts +12 -0
- package/dist/host-lists/sources/github.source.js +171 -0
- package/dist/host-lists/sources/github.source.js.map +1 -0
- package/dist/host-lists/sources/guokr.source.d.ts +11 -0
- package/dist/host-lists/sources/guokr.source.js +98 -0
- package/dist/host-lists/sources/guokr.source.js.map +1 -0
- package/dist/host-lists/sources/hackernews.source.d.ts +11 -0
- package/dist/host-lists/sources/hackernews.source.js +121 -0
- package/dist/host-lists/sources/hackernews.source.js.map +1 -0
- package/dist/host-lists/sources/hellogithub.source.d.ts +11 -0
- package/dist/host-lists/sources/hellogithub.source.js +98 -0
- package/dist/host-lists/sources/hellogithub.source.js.map +1 -0
- package/dist/host-lists/sources/history.source.d.ts +11 -0
- package/dist/host-lists/sources/history.source.js +92 -0
- package/dist/host-lists/sources/history.source.js.map +1 -0
- package/dist/host-lists/sources/honkai.source.d.ts +9 -0
- package/dist/host-lists/sources/honkai.source.js +72 -0
- package/dist/host-lists/sources/honkai.source.js.map +1 -0
- package/dist/host-lists/sources/hostloc.source.d.ts +9 -0
- package/dist/host-lists/sources/hostloc.source.js +75 -0
- package/dist/host-lists/sources/hostloc.source.js.map +1 -0
- package/dist/host-lists/sources/hupu.source.d.ts +9 -0
- package/dist/host-lists/sources/hupu.source.js +73 -0
- package/dist/host-lists/sources/hupu.source.js.map +1 -0
- package/dist/host-lists/sources/huxiu.source.d.ts +9 -0
- package/dist/host-lists/sources/huxiu.source.js +153 -0
- package/dist/host-lists/sources/huxiu.source.js.map +1 -0
- package/dist/host-lists/sources/ifanr.source.d.ts +9 -0
- package/dist/host-lists/sources/ifanr.source.js +57 -0
- package/dist/host-lists/sources/ifanr.source.js.map +1 -0
- package/dist/host-lists/sources/index.d.ts +2 -0
- package/dist/host-lists/sources/index.js +134 -0
- package/dist/host-lists/sources/index.js.map +1 -0
- package/dist/host-lists/sources/ithome-xijiayi.source.d.ts +9 -0
- package/dist/host-lists/sources/ithome-xijiayi.source.js +75 -0
- package/dist/host-lists/sources/ithome-xijiayi.source.js.map +1 -0
- package/dist/host-lists/sources/ithome.source.d.ts +9 -0
- package/dist/host-lists/sources/ithome.source.js +71 -0
- package/dist/host-lists/sources/ithome.source.js.map +1 -0
- package/dist/host-lists/sources/jd.source.d.ts +9 -0
- package/dist/host-lists/sources/jd.source.js +82 -0
- package/dist/host-lists/sources/jd.source.js.map +1 -0
- package/dist/host-lists/sources/jianshu.source.d.ts +9 -0
- package/dist/host-lists/sources/jianshu.source.js +72 -0
- package/dist/host-lists/sources/jianshu.source.js.map +1 -0
- package/dist/host-lists/sources/jin10.source.d.ts +9 -0
- package/dist/host-lists/sources/jin10.source.js +63 -0
- package/dist/host-lists/sources/jin10.source.js.map +1 -0
- package/dist/host-lists/sources/juejin.source.d.ts +10 -0
- package/dist/host-lists/sources/juejin.source.js +81 -0
- package/dist/host-lists/sources/juejin.source.js.map +1 -0
- package/dist/host-lists/sources/kuaishou.source.d.ts +13 -0
- package/dist/host-lists/sources/kuaishou.source.js +179 -0
- package/dist/host-lists/sources/kuaishou.source.js.map +1 -0
- package/dist/host-lists/sources/linuxdo.source.d.ts +9 -0
- package/dist/host-lists/sources/linuxdo.source.js +62 -0
- package/dist/host-lists/sources/linuxdo.source.js.map +1 -0
- package/dist/host-lists/sources/lol.source.d.ts +9 -0
- package/dist/host-lists/sources/lol.source.js +58 -0
- package/dist/host-lists/sources/lol.source.js.map +1 -0
- package/dist/host-lists/sources/miyoushe.source.d.ts +9 -0
- package/dist/host-lists/sources/miyoushe.source.js +88 -0
- package/dist/host-lists/sources/miyoushe.source.js.map +1 -0
- package/dist/host-lists/sources/netease-news.source.d.ts +9 -0
- package/dist/host-lists/sources/netease-news.source.js +56 -0
- package/dist/host-lists/sources/netease-news.source.js.map +1 -0
- package/dist/host-lists/sources/ngabbs.source.d.ts +9 -0
- package/dist/host-lists/sources/ngabbs.source.js +70 -0
- package/dist/host-lists/sources/ngabbs.source.js.map +1 -0
- package/dist/host-lists/sources/nodeseek.source.d.ts +9 -0
- package/dist/host-lists/sources/nodeseek.source.js +62 -0
- package/dist/host-lists/sources/nodeseek.source.js.map +1 -0
- package/dist/host-lists/sources/nytimes.source.d.ts +9 -0
- package/dist/host-lists/sources/nytimes.source.js +77 -0
- package/dist/host-lists/sources/nytimes.source.js.map +1 -0
- package/dist/host-lists/sources/producthunt.source.d.ts +9 -0
- package/dist/host-lists/sources/producthunt.source.js +75 -0
- package/dist/host-lists/sources/producthunt.source.js.map +1 -0
- package/dist/host-lists/sources/qq-news.source.d.ts +9 -0
- package/dist/host-lists/sources/qq-news.source.js +53 -0
- package/dist/host-lists/sources/qq-news.source.js.map +1 -0
- package/dist/host-lists/sources/sina-news.source.d.ts +9 -0
- package/dist/host-lists/sources/sina-news.source.js +98 -0
- package/dist/host-lists/sources/sina-news.source.js.map +1 -0
- package/dist/host-lists/sources/sina.source.d.ts +9 -0
- package/dist/host-lists/sources/sina.source.js +78 -0
- package/dist/host-lists/sources/sina.source.js.map +1 -0
- package/dist/host-lists/sources/smzdm.source.d.ts +9 -0
- package/dist/host-lists/sources/smzdm.source.js +71 -0
- package/dist/host-lists/sources/smzdm.source.js.map +1 -0
- package/dist/host-lists/sources/sspai.source.d.ts +9 -0
- package/dist/host-lists/sources/sspai.source.js +69 -0
- package/dist/host-lists/sources/sspai.source.js.map +1 -0
- package/dist/host-lists/sources/starrail.source.d.ts +9 -0
- package/dist/host-lists/sources/starrail.source.js +72 -0
- package/dist/host-lists/sources/starrail.source.js.map +1 -0
- package/dist/host-lists/sources/taobao.source.d.ts +10 -0
- package/dist/host-lists/sources/taobao.source.js +169 -0
- package/dist/host-lists/sources/taobao.source.js.map +1 -0
- package/dist/host-lists/sources/thepaper.source.d.ts +9 -0
- package/dist/host-lists/sources/thepaper.source.js +56 -0
- package/dist/host-lists/sources/thepaper.source.js.map +1 -0
- package/dist/host-lists/sources/tieba.source.d.ts +9 -0
- package/dist/host-lists/sources/tieba.source.js +58 -0
- package/dist/host-lists/sources/tieba.source.js.map +1 -0
- package/dist/host-lists/sources/tonghuashun.source.d.ts +9 -0
- package/dist/host-lists/sources/tonghuashun.source.js +112 -0
- package/dist/host-lists/sources/tonghuashun.source.js.map +1 -0
- package/dist/host-lists/sources/toutiao.source.d.ts +9 -0
- package/dist/host-lists/sources/toutiao.source.js +56 -0
- package/dist/host-lists/sources/toutiao.source.js.map +1 -0
- package/dist/host-lists/sources/v2ex.source.d.ts +9 -0
- package/dist/host-lists/sources/v2ex.source.js +67 -0
- package/dist/host-lists/sources/v2ex.source.js.map +1 -0
- package/dist/host-lists/sources/wallstreet.source.d.ts +9 -0
- package/dist/host-lists/sources/wallstreet.source.js +59 -0
- package/dist/host-lists/sources/wallstreet.source.js.map +1 -0
- package/dist/host-lists/sources/weatheralarm.source.d.ts +9 -0
- package/dist/host-lists/sources/weatheralarm.source.js +68 -0
- package/dist/host-lists/sources/weatheralarm.source.js.map +1 -0
- package/dist/host-lists/sources/weibo.source.d.ts +15 -0
- package/dist/host-lists/sources/weibo.source.js +180 -0
- package/dist/host-lists/sources/weibo.source.js.map +1 -0
- package/dist/host-lists/sources/weread.source.d.ts +9 -0
- package/dist/host-lists/sources/weread.source.js +82 -0
- package/dist/host-lists/sources/weread.source.js.map +1 -0
- package/dist/host-lists/sources/xinyu.source.d.ts +9 -0
- package/dist/host-lists/sources/xinyu.source.js +151 -0
- package/dist/host-lists/sources/xinyu.source.js.map +1 -0
- package/dist/host-lists/sources/yicai.source.d.ts +9 -0
- package/dist/host-lists/sources/yicai.source.js +113 -0
- package/dist/host-lists/sources/yicai.source.js.map +1 -0
- package/dist/host-lists/sources/yystv.source.d.ts +9 -0
- package/dist/host-lists/sources/yystv.source.js +57 -0
- package/dist/host-lists/sources/yystv.source.js.map +1 -0
- package/dist/host-lists/sources/zhihu-daily.source.d.ts +9 -0
- package/dist/host-lists/sources/zhihu-daily.source.js +60 -0
- package/dist/host-lists/sources/zhihu-daily.source.js.map +1 -0
- package/dist/host-lists/sources/zhihu.source.d.ts +12 -0
- package/dist/host-lists/sources/zhihu.source.js +195 -0
- package/dist/host-lists/sources/zhihu.source.js.map +1 -0
- package/dist/http/http.module.d.ts +2 -0
- package/dist/http/http.module.js +30 -0
- package/dist/http/http.module.js.map +1 -0
- package/dist/http/http.service.d.ts +53 -0
- package/dist/http/http.service.js +277 -0
- package/dist/http/http.service.js.map +1 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.js +70 -0
- package/dist/main.js.map +1 -0
- package/dist/rss/rss.module.d.ts +2 -0
- package/dist/rss/rss.module.js +21 -0
- package/dist/rss/rss.module.js.map +1 -0
- package/dist/rss/rss.service.d.ts +5 -0
- package/dist/rss/rss.service.js +55 -0
- package/dist/rss/rss.service.js.map +1 -0
- package/dist/scheduler/dto/trigger-fetch.dto.d.ts +3 -0
- package/dist/scheduler/dto/trigger-fetch.dto.js +22 -0
- package/dist/scheduler/dto/trigger-fetch.dto.js.map +1 -0
- package/dist/scheduler/dto/update-source-config.dto.d.ts +4 -0
- package/dist/scheduler/dto/update-source-config.dto.js +29 -0
- package/dist/scheduler/dto/update-source-config.dto.js.map +1 -0
- package/dist/scheduler/scheduler.controller.d.ts +52 -0
- package/dist/scheduler/scheduler.controller.js +132 -0
- package/dist/scheduler/scheduler.controller.js.map +1 -0
- package/dist/scheduler/scheduler.module.d.ts +2 -0
- package/dist/scheduler/scheduler.module.js +34 -0
- package/dist/scheduler/scheduler.module.js.map +1 -0
- package/dist/scheduler/scheduler.service.d.ts +54 -0
- package/dist/scheduler/scheduler.service.js +238 -0
- package/dist/scheduler/scheduler.service.js.map +1 -0
- package/dist/scheduler/tasks/fetch-hot-data.task.d.ts +34 -0
- package/dist/scheduler/tasks/fetch-hot-data.task.js +175 -0
- package/dist/scheduler/tasks/fetch-hot-data.task.js.map +1 -0
- package/dist/token/coolapk.d.ts +11 -0
- package/dist/token/coolapk.js +40 -0
- package/dist/token/coolapk.js.map +1 -0
- package/dist/token/token.module.d.ts +2 -0
- package/dist/token/token.module.js +23 -0
- package/dist/token/token.module.js.map +1 -0
- package/dist/token/token.service.d.ts +19 -0
- package/dist/token/token.service.js +115 -0
- package/dist/token/token.service.js.map +1 -0
- package/dist/token/tools.d.ts +1 -0
- package/dist/token/tools.js +15 -0
- package/dist/token/tools.js.map +1 -0
- package/dist/token/weread.d.ts +2 -0
- package/dist/token/weread.js +55 -0
- package/dist/token/weread.js.map +1 -0
- package/dist/utils/getNum.d.ts +1 -0
- package/dist/utils/getNum.js +20 -0
- package/dist/utils/getNum.js.map +1 -0
- package/dist/utils/getTime.d.ts +11 -0
- package/dist/utils/getTime.js +134 -0
- package/dist/utils/getTime.js.map +1 -0
- package/dist/utils/headers.d.ts +16 -0
- package/dist/utils/headers.js +20 -0
- package/dist/utils/headers.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +12 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/parseRSS.d.ts +11 -0
- package/dist/utils/parseRSS.js +47 -0
- package/dist/utils/parseRSS.js.map +1 -0
- package/package.json +148 -4
- package/views/home.hbs +65 -0
|
@@ -0,0 +1,47 @@
|
|
|
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.SourceConfigSchema = exports.SourceConfig = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
let SourceConfig = class SourceConfig {
|
|
15
|
+
};
|
|
16
|
+
exports.SourceConfig = SourceConfig;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, mongoose_1.Prop)({ required: true, unique: true, index: true }),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], SourceConfig.prototype, "source", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, mongoose_1.Prop)({ default: true }),
|
|
23
|
+
__metadata("design:type", Boolean)
|
|
24
|
+
], SourceConfig.prototype, "enabled", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, mongoose_1.Prop)({ default: 30 }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], SourceConfig.prototype, "interval", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, mongoose_1.Prop)(),
|
|
31
|
+
__metadata("design:type", Date)
|
|
32
|
+
], SourceConfig.prototype, "lastFetchAt", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, mongoose_1.Prop)(),
|
|
35
|
+
__metadata("design:type", Date)
|
|
36
|
+
], SourceConfig.prototype, "createdAt", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, mongoose_1.Prop)(),
|
|
39
|
+
__metadata("design:type", Date)
|
|
40
|
+
], SourceConfig.prototype, "updatedAt", void 0);
|
|
41
|
+
exports.SourceConfig = SourceConfig = __decorate([
|
|
42
|
+
(0, mongoose_1.Schema)({
|
|
43
|
+
timestamps: true,
|
|
44
|
+
})
|
|
45
|
+
], SourceConfig);
|
|
46
|
+
exports.SourceConfigSchema = mongoose_1.SchemaFactory.createForClass(SourceConfig);
|
|
47
|
+
//# sourceMappingURL=source-config.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-config.schema.js","sourceRoot":"","sources":["../../../src/database/schemas/source-config.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAQxD,IAAM,YAAY,GAAlB,MAAM,YAAY;CAkBxB,CAAA;AAlBY,oCAAY;AAEvB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;4CACrC;AAGf;IADC,IAAA,eAAI,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;6CACP;AAGjB;IADC,IAAA,eAAI,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;8CACL;AAGjB;IADC,IAAA,eAAI,GAAE;8BACO,IAAI;iDAAC;AAGnB;IADC,IAAA,eAAI,GAAE;8BACK,IAAI;+CAAC;AAGjB;IADC,IAAA,eAAI,GAAE;8BACK,IAAI;+CAAC;uBAjBN,YAAY;IAHxB,IAAA,iBAAM,EAAC;QACN,UAAU,EAAE,IAAI;KACjB,CAAC;GACW,YAAY,CAkBxB;AAEY,QAAA,kBAAkB,GAAG,wBAAa,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare class HistoryResponseDto {
|
|
2
|
+
data: any[];
|
|
3
|
+
total: number;
|
|
4
|
+
page: number;
|
|
5
|
+
limit: number;
|
|
6
|
+
totalPages: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class SourceStatsDto {
|
|
9
|
+
_id: string;
|
|
10
|
+
count: number;
|
|
11
|
+
latestTimestamp: number;
|
|
12
|
+
}
|
|
13
|
+
export declare class StatsResponseDto {
|
|
14
|
+
totalCount: number;
|
|
15
|
+
totalSources: number;
|
|
16
|
+
sources: SourceStatsDto[];
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StatsResponseDto = exports.SourceStatsDto = exports.HistoryResponseDto = void 0;
|
|
4
|
+
class HistoryResponseDto {
|
|
5
|
+
}
|
|
6
|
+
exports.HistoryResponseDto = HistoryResponseDto;
|
|
7
|
+
class SourceStatsDto {
|
|
8
|
+
}
|
|
9
|
+
exports.SourceStatsDto = SourceStatsDto;
|
|
10
|
+
class StatsResponseDto {
|
|
11
|
+
}
|
|
12
|
+
exports.StatsResponseDto = StatsResponseDto;
|
|
13
|
+
//# sourceMappingURL=history-response.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history-response.dto.js","sourceRoot":"","sources":["../../../src/history/dto/history-response.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,kBAAkB;CAM9B;AAND,gDAMC;AAED,MAAa,cAAc;CAI1B;AAJD,wCAIC;AAED,MAAa,gBAAgB;CAI5B;AAJD,4CAIC"}
|
|
@@ -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.SearchHistoryDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
class SearchHistoryDto {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.page = 1;
|
|
18
|
+
this.limit = 20;
|
|
19
|
+
this.sortBy = 'timestamp';
|
|
20
|
+
this.sortOrder = 'desc';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.SearchHistoryDto = SearchHistoryDto;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsOptional)(),
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], SearchHistoryDto.prototype, "source", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
(0, class_validator_1.MaxLength)(100),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], SearchHistoryDto.prototype, "keyword", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsOptional)(),
|
|
37
|
+
(0, class_validator_1.IsDateString)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], SearchHistoryDto.prototype, "startDate", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsOptional)(),
|
|
42
|
+
(0, class_validator_1.IsDateString)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], SearchHistoryDto.prototype, "endDate", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
|
+
(0, class_transformer_1.Transform)(({ value }) => parseInt(value)),
|
|
48
|
+
(0, class_validator_1.IsNumber)(),
|
|
49
|
+
(0, class_validator_1.Min)(1),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], SearchHistoryDto.prototype, "page", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsOptional)(),
|
|
54
|
+
(0, class_transformer_1.Transform)(({ value }) => parseInt(value)),
|
|
55
|
+
(0, class_validator_1.IsNumber)(),
|
|
56
|
+
(0, class_validator_1.Min)(1),
|
|
57
|
+
(0, class_validator_1.Max)(100),
|
|
58
|
+
__metadata("design:type", Number)
|
|
59
|
+
], SearchHistoryDto.prototype, "limit", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_validator_1.IsOptional)(),
|
|
62
|
+
(0, class_validator_1.IsString)(),
|
|
63
|
+
(0, class_validator_1.IsIn)(['timestamp', 'title', 'createdAt']),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], SearchHistoryDto.prototype, "sortBy", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, class_validator_1.IsOptional)(),
|
|
68
|
+
(0, class_validator_1.IsString)(),
|
|
69
|
+
(0, class_validator_1.IsIn)(['asc', 'desc']),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], SearchHistoryDto.prototype, "sortOrder", void 0);
|
|
72
|
+
//# sourceMappingURL=search-history.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-history.dto.js","sourceRoot":"","sources":["../../../src/history/dto/search-history.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDASyB;AACzB,yDAA8C;AAE9C,MAAa,gBAAgB;IAA7B;QAsBE,SAAI,GAAY,CAAC,CAAC;QAOlB,UAAK,GAAY,EAAE,CAAC;QAKpB,WAAM,GAAY,WAAW,CAAC;QAK9B,cAAS,GAAoB,MAAM,CAAC;IACtC,CAAC;CAAA;AAxCD,4CAwCC;AArCC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gDACK;AAKhB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,2BAAS,EAAC,GAAG,CAAC;;iDACE;AAIjB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,8BAAY,GAAE;;mDACI;AAInB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,8BAAY,GAAE;;iDACE;AAMjB;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAG,EAAC,CAAC,CAAC;;8CACW;AAOlB;IALC,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,qBAAG,EAAC,GAAG,CAAC;;+CACW;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,sBAAI,EAAC,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;;gDACZ;AAK9B;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,sBAAI,EAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;;mDACc"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HistoryService } from './history.service';
|
|
2
|
+
import { SearchHistoryDto } from './dto/search-history.dto';
|
|
3
|
+
import { HistoryResponseDto, StatsResponseDto } from './dto/history-response.dto';
|
|
4
|
+
export declare class HistoryController {
|
|
5
|
+
private readonly historyService;
|
|
6
|
+
constructor(historyService: HistoryService);
|
|
7
|
+
searchHistory(searchDto: SearchHistoryDto): Promise<HistoryResponseDto>;
|
|
8
|
+
getSources(): Promise<string[]>;
|
|
9
|
+
getStats(): Promise<StatsResponseDto>;
|
|
10
|
+
getSourceConfigs(): Promise<import("../database/schemas/source-config.schema").SourceConfig[]>;
|
|
11
|
+
getLatestData(source?: string, limit?: number): Promise<import("../database/schemas/hot-item.schema").HotItem[]>;
|
|
12
|
+
getDataByTimeRange(source: string, startTime: number, endTime: number): Promise<import("../database/schemas/hot-item.schema").HotItem[]>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
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.HistoryController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const history_service_1 = require("./history.service");
|
|
18
|
+
const search_history_dto_1 = require("./dto/search-history.dto");
|
|
19
|
+
let HistoryController = class HistoryController {
|
|
20
|
+
constructor(historyService) {
|
|
21
|
+
this.historyService = historyService;
|
|
22
|
+
}
|
|
23
|
+
async searchHistory(searchDto) {
|
|
24
|
+
return this.historyService.searchHistory(searchDto);
|
|
25
|
+
}
|
|
26
|
+
async getSources() {
|
|
27
|
+
return this.historyService.getSources();
|
|
28
|
+
}
|
|
29
|
+
async getStats() {
|
|
30
|
+
return this.historyService.getStats();
|
|
31
|
+
}
|
|
32
|
+
async getSourceConfigs() {
|
|
33
|
+
return this.historyService.getSourceConfigs();
|
|
34
|
+
}
|
|
35
|
+
async getLatestData(source, limit) {
|
|
36
|
+
if (limit !== undefined && (limit < 1 || limit > 100)) {
|
|
37
|
+
throw new common_1.BadRequestException('limit must be between 1 and 100');
|
|
38
|
+
}
|
|
39
|
+
return this.historyService.getLatestData(source, limit);
|
|
40
|
+
}
|
|
41
|
+
async getDataByTimeRange(source, startTime, endTime) {
|
|
42
|
+
return this.historyService.getDataByTimeRange(source, startTime, endTime);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
exports.HistoryController = HistoryController;
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, common_1.Get)('search'),
|
|
48
|
+
__param(0, (0, common_1.Query)()),
|
|
49
|
+
__metadata("design:type", Function),
|
|
50
|
+
__metadata("design:paramtypes", [search_history_dto_1.SearchHistoryDto]),
|
|
51
|
+
__metadata("design:returntype", Promise)
|
|
52
|
+
], HistoryController.prototype, "searchHistory", null);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, common_1.Get)('sources'),
|
|
55
|
+
__metadata("design:type", Function),
|
|
56
|
+
__metadata("design:paramtypes", []),
|
|
57
|
+
__metadata("design:returntype", Promise)
|
|
58
|
+
], HistoryController.prototype, "getSources", null);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, common_1.Get)('stats'),
|
|
61
|
+
__metadata("design:type", Function),
|
|
62
|
+
__metadata("design:paramtypes", []),
|
|
63
|
+
__metadata("design:returntype", Promise)
|
|
64
|
+
], HistoryController.prototype, "getStats", null);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, common_1.Get)('configs'),
|
|
67
|
+
__metadata("design:type", Function),
|
|
68
|
+
__metadata("design:paramtypes", []),
|
|
69
|
+
__metadata("design:returntype", Promise)
|
|
70
|
+
], HistoryController.prototype, "getSourceConfigs", null);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, common_1.Get)('latest'),
|
|
73
|
+
__param(0, (0, common_1.Query)('source')),
|
|
74
|
+
__param(1, (0, common_1.Query)('limit', new common_1.ParseIntPipe({ optional: true }))),
|
|
75
|
+
__metadata("design:type", Function),
|
|
76
|
+
__metadata("design:paramtypes", [String, Number]),
|
|
77
|
+
__metadata("design:returntype", Promise)
|
|
78
|
+
], HistoryController.prototype, "getLatestData", null);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, common_1.Get)('range/:source/:startTime/:endTime'),
|
|
81
|
+
__param(0, (0, common_1.Param)('source')),
|
|
82
|
+
__param(1, (0, common_1.Param)('startTime', common_1.ParseIntPipe)),
|
|
83
|
+
__param(2, (0, common_1.Param)('endTime', common_1.ParseIntPipe)),
|
|
84
|
+
__metadata("design:type", Function),
|
|
85
|
+
__metadata("design:paramtypes", [String, Number, Number]),
|
|
86
|
+
__metadata("design:returntype", Promise)
|
|
87
|
+
], HistoryController.prototype, "getDataByTimeRange", null);
|
|
88
|
+
exports.HistoryController = HistoryController = __decorate([
|
|
89
|
+
(0, common_1.Controller)('api/history'),
|
|
90
|
+
__metadata("design:paramtypes", [history_service_1.HistoryService])
|
|
91
|
+
], HistoryController);
|
|
92
|
+
//# sourceMappingURL=history.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.controller.js","sourceRoot":"","sources":["../../src/history/history.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAOwB;AACxB,uDAAmD;AACnD,iEAA4D;AAOrD,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC5B,YAA6B,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;IAAG,CAAC;IAIzD,AAAN,KAAK,CAAC,aAAa,CACR,SAA2B;QAEpC,OAAO,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IACtD,CAAC;IAIK,AAAN,KAAK,CAAC,UAAU;QACd,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;IAC1C,CAAC;IAIK,AAAN,KAAK,CAAC,QAAQ;QACZ,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;IACxC,CAAC;IAIK,AAAN,KAAK,CAAC,gBAAgB;QACpB,OAAO,IAAI,CAAC,cAAc,CAAC,gBAAgB,EAAE,CAAC;IAChD,CAAC;IAIK,AAAN,KAAK,CAAC,aAAa,CACA,MAAe,EACsB,KAAc;QAEpE,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,GAAG,CAAC,EAAE,CAAC;YACtD,MAAM,IAAI,4BAAmB,CAAC,iCAAiC,CAAC,CAAC;QACnE,CAAC;QACD,OAAO,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC1D,CAAC;IAIK,AAAN,KAAK,CAAC,kBAAkB,CACL,MAAc,EACG,SAAiB,EACnB,OAAe;QAE/C,OAAO,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;CACF,CAAA;AAlDY,8CAAiB;AAKtB;IADL,IAAA,YAAG,EAAC,QAAQ,CAAC;IAEX,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAY,qCAAgB;;sDAGrC;AAIK;IADL,IAAA,YAAG,EAAC,SAAS,CAAC;;;;mDAGd;AAIK;IADL,IAAA,YAAG,EAAC,OAAO,CAAC;;;;iDAGZ;AAIK;IADL,IAAA,YAAG,EAAC,SAAS,CAAC;;;;yDAGd;AAIK;IADL,IAAA,YAAG,EAAC,QAAQ,CAAC;IAEX,WAAA,IAAA,cAAK,EAAC,QAAQ,CAAC,CAAA;IACf,WAAA,IAAA,cAAK,EAAC,OAAO,EAAE,IAAI,qBAAY,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;;;;sDAMtD;AAIK;IADL,IAAA,YAAG,EAAC,mCAAmC,CAAC;IAEtC,WAAA,IAAA,cAAK,EAAC,QAAQ,CAAC,CAAA;IACf,WAAA,IAAA,cAAK,EAAC,WAAW,EAAE,qBAAY,CAAC,CAAA;IAChC,WAAA,IAAA,cAAK,EAAC,SAAS,EAAE,qBAAY,CAAC,CAAA;;;;2DAGhC;4BAjDU,iBAAiB;IAD7B,IAAA,mBAAU,EAAC,aAAa,CAAC;qCAEqB,gCAAc;GADhD,iBAAiB,CAkD7B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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.HistoryModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const history_controller_1 = require("./history.controller");
|
|
12
|
+
const history_service_1 = require("./history.service");
|
|
13
|
+
const database_module_1 = require("../database/database.module");
|
|
14
|
+
let HistoryModule = class HistoryModule {
|
|
15
|
+
};
|
|
16
|
+
exports.HistoryModule = HistoryModule;
|
|
17
|
+
exports.HistoryModule = HistoryModule = __decorate([
|
|
18
|
+
(0, common_1.Module)({
|
|
19
|
+
imports: [database_module_1.DatabaseModule],
|
|
20
|
+
controllers: [history_controller_1.HistoryController],
|
|
21
|
+
providers: [history_service_1.HistoryService],
|
|
22
|
+
exports: [history_service_1.HistoryService],
|
|
23
|
+
})
|
|
24
|
+
], HistoryModule);
|
|
25
|
+
//# sourceMappingURL=history.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.module.js","sourceRoot":"","sources":["../../src/history/history.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6DAAyD;AACzD,uDAAmD;AACnD,iEAA6D;AAQtD,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IANzB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,gCAAc,CAAC;QACzB,WAAW,EAAE,CAAC,sCAAiB,CAAC;QAChC,SAAS,EAAE,CAAC,gCAAc,CAAC;QAC3B,OAAO,EAAE,CAAC,gCAAc,CAAC;KAC1B,CAAC;GACW,aAAa,CAAG"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HotItemRepository } from '../database/repositories/hot-item.repository';
|
|
2
|
+
import { SourceConfigRepository } from '../database/repositories/source-config.repository';
|
|
3
|
+
import { SearchHistoryDto } from './dto/search-history.dto';
|
|
4
|
+
import { HistoryResponseDto, StatsResponseDto } from './dto/history-response.dto';
|
|
5
|
+
export declare class HistoryService {
|
|
6
|
+
private readonly hotItemRepository;
|
|
7
|
+
private readonly sourceConfigRepository;
|
|
8
|
+
constructor(hotItemRepository: HotItemRepository, sourceConfigRepository: SourceConfigRepository);
|
|
9
|
+
searchHistory(searchDto: SearchHistoryDto): Promise<HistoryResponseDto>;
|
|
10
|
+
getSources(): Promise<string[]>;
|
|
11
|
+
getStats(): Promise<StatsResponseDto>;
|
|
12
|
+
getSourceConfigs(): Promise<import("../database/schemas/source-config.schema").SourceConfig[]>;
|
|
13
|
+
getDataByTimeRange(source: string, startTime: number, endTime: number): Promise<import("../database/schemas/hot-item.schema").HotItem[]>;
|
|
14
|
+
getLatestData(source?: string, limit?: number): Promise<import("../database/schemas/hot-item.schema").HotItem[]>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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.HistoryService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const hot_item_repository_1 = require("../database/repositories/hot-item.repository");
|
|
15
|
+
const source_config_repository_1 = require("../database/repositories/source-config.repository");
|
|
16
|
+
let HistoryService = class HistoryService {
|
|
17
|
+
constructor(hotItemRepository, sourceConfigRepository) {
|
|
18
|
+
this.hotItemRepository = hotItemRepository;
|
|
19
|
+
this.sourceConfigRepository = sourceConfigRepository;
|
|
20
|
+
}
|
|
21
|
+
async searchHistory(searchDto) {
|
|
22
|
+
const options = {
|
|
23
|
+
source: searchDto.source,
|
|
24
|
+
keyword: searchDto.keyword,
|
|
25
|
+
page: searchDto.page,
|
|
26
|
+
limit: searchDto.limit,
|
|
27
|
+
sortBy: searchDto.sortBy,
|
|
28
|
+
sortOrder: searchDto.sortOrder,
|
|
29
|
+
};
|
|
30
|
+
if (searchDto.startDate) {
|
|
31
|
+
options.startDate = new Date(searchDto.startDate);
|
|
32
|
+
}
|
|
33
|
+
if (searchDto.endDate) {
|
|
34
|
+
options.endDate = new Date(searchDto.endDate);
|
|
35
|
+
}
|
|
36
|
+
return this.hotItemRepository.searchHistory(options);
|
|
37
|
+
}
|
|
38
|
+
async getSources() {
|
|
39
|
+
return this.hotItemRepository.getSources();
|
|
40
|
+
}
|
|
41
|
+
async getStats() {
|
|
42
|
+
return this.hotItemRepository.getStats();
|
|
43
|
+
}
|
|
44
|
+
async getSourceConfigs() {
|
|
45
|
+
return this.sourceConfigRepository.findAll();
|
|
46
|
+
}
|
|
47
|
+
async getDataByTimeRange(source, startTime, endTime) {
|
|
48
|
+
return this.hotItemRepository.getDataByTimeRange(source, startTime, endTime);
|
|
49
|
+
}
|
|
50
|
+
async getLatestData(source, limit = 50) {
|
|
51
|
+
const options = {
|
|
52
|
+
source,
|
|
53
|
+
page: 1,
|
|
54
|
+
limit,
|
|
55
|
+
sortBy: 'timestamp',
|
|
56
|
+
sortOrder: 'desc',
|
|
57
|
+
};
|
|
58
|
+
const result = await this.hotItemRepository.searchHistory(options);
|
|
59
|
+
return result.data;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
exports.HistoryService = HistoryService;
|
|
63
|
+
exports.HistoryService = HistoryService = __decorate([
|
|
64
|
+
(0, common_1.Injectable)(),
|
|
65
|
+
__metadata("design:paramtypes", [hot_item_repository_1.HotItemRepository,
|
|
66
|
+
source_config_repository_1.SourceConfigRepository])
|
|
67
|
+
], HistoryService);
|
|
68
|
+
//# sourceMappingURL=history.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.service.js","sourceRoot":"","sources":["../../src/history/history.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,sFAGsD;AACtD,gGAA2F;AAQpF,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,YACmB,iBAAoC,EACpC,sBAA8C;QAD9C,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,2BAAsB,GAAtB,sBAAsB,CAAwB;IAC9D,CAAC;IAGJ,KAAK,CAAC,aAAa,CACjB,SAA2B;QAE3B,MAAM,OAAO,GAAyB;YACpC,MAAM,EAAE,SAAS,CAAC,MAAM;YACxB,OAAO,EAAE,SAAS,CAAC,OAAO;YAC1B,IAAI,EAAE,SAAS,CAAC,IAAI;YACpB,KAAK,EAAE,SAAS,CAAC,KAAK;YACtB,MAAM,EAAE,SAAS,CAAC,MAAM;YACxB,SAAS,EAAE,SAAS,CAAC,SAAS;SAC/B,CAAC;QAGF,IAAI,SAAS,CAAC,SAAS,EAAE,CAAC;YACxB,OAAO,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACpD,CAAC;QACD,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;YACtB,OAAO,CAAC,OAAO,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAChD,CAAC;QAED,OAAO,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACvD,CAAC;IAGD,KAAK,CAAC,UAAU;QACd,OAAO,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,CAAC;IAC7C,CAAC;IAGD,KAAK,CAAC,QAAQ;QACZ,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC;IAC3C,CAAC;IAGD,KAAK,CAAC,gBAAgB;QACpB,OAAO,IAAI,CAAC,sBAAsB,CAAC,OAAO,EAAE,CAAC;IAC/C,CAAC;IAGD,KAAK,CAAC,kBAAkB,CAAC,MAAc,EAAE,SAAiB,EAAE,OAAe;QACzE,OAAO,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,CAC9C,MAAM,EACN,SAAS,EACT,OAAO,CACR,CAAC;IACJ,CAAC;IAGD,KAAK,CAAC,aAAa,CAAC,MAAe,EAAE,QAAgB,EAAE;QACrD,MAAM,OAAO,GAAyB;YACpC,MAAM;YACN,IAAI,EAAE,CAAC;YACP,KAAK;YACL,MAAM,EAAE,WAAW;YACnB,SAAS,EAAE,MAAM;SAClB,CAAC;QAEF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACnE,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC;CACF,CAAA;AAnEY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;qCAG2B,uCAAiB;QACZ,iDAAsB;GAHtD,cAAc,CAmE1B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const HOT_SOURCE_METADATA = "hot-source-metadata";
|
|
2
|
+
export interface HotSourceOptions {
|
|
3
|
+
name: string;
|
|
4
|
+
title: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
link?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function HotSource(options: HotSourceOptions): ClassDecorator;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HOT_SOURCE_METADATA = void 0;
|
|
4
|
+
exports.HotSource = HotSource;
|
|
5
|
+
exports.HOT_SOURCE_METADATA = 'hot-source-metadata';
|
|
6
|
+
function HotSource(options) {
|
|
7
|
+
return (target) => {
|
|
8
|
+
Reflect.defineMetadata(exports.HOT_SOURCE_METADATA, options, target);
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=hot-source.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hot-source.decorator.js","sourceRoot":"","sources":["../../../src/host-lists/decorators/hot-source.decorator.ts"],"names":[],"mappings":";;;AAaA,8BAIC;AAjBY,QAAA,mBAAmB,GAAG,qBAAqB,CAAC;AAazD,SAAgB,SAAS,CAAC,OAAyB;IACjD,OAAO,CAAC,MAAW,EAAE,EAAE;QACrB,OAAO,CAAC,cAAc,CAAC,2BAAmB,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC/D,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class HotListQueryDto {
|
|
2
|
+
noCache?: boolean;
|
|
3
|
+
limit?: string;
|
|
4
|
+
rss?: boolean;
|
|
5
|
+
type?: string;
|
|
6
|
+
area?: string;
|
|
7
|
+
month?: string;
|
|
8
|
+
day?: string;
|
|
9
|
+
province?: string;
|
|
10
|
+
page?: string;
|
|
11
|
+
pageSize?: string;
|
|
12
|
+
cursor?: string;
|
|
13
|
+
game?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
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.HotListQueryDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
class HotListQueryDto {
|
|
16
|
+
}
|
|
17
|
+
exports.HotListQueryDto = HotListQueryDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsOptional)(),
|
|
20
|
+
(0, class_transformer_1.Transform)(({ value }) => {
|
|
21
|
+
if (value === undefined || value === null)
|
|
22
|
+
return false;
|
|
23
|
+
if (typeof value === 'boolean')
|
|
24
|
+
return value;
|
|
25
|
+
if (typeof value === 'string')
|
|
26
|
+
return value === 'true';
|
|
27
|
+
return false;
|
|
28
|
+
}),
|
|
29
|
+
__metadata("design:type", Boolean)
|
|
30
|
+
], HotListQueryDto.prototype, "noCache", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsOptional)(),
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], HotListQueryDto.prototype, "limit", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
(0, class_transformer_1.Transform)(({ value }) => {
|
|
39
|
+
if (value === undefined || value === null)
|
|
40
|
+
return false;
|
|
41
|
+
if (typeof value === 'boolean')
|
|
42
|
+
return value;
|
|
43
|
+
if (typeof value === 'string')
|
|
44
|
+
return value === 'true';
|
|
45
|
+
return false;
|
|
46
|
+
}),
|
|
47
|
+
__metadata("design:type", Boolean)
|
|
48
|
+
], HotListQueryDto.prototype, "rss", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.IsOptional)(),
|
|
51
|
+
(0, class_validator_1.IsString)(),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], HotListQueryDto.prototype, "type", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_validator_1.IsOptional)(),
|
|
56
|
+
(0, class_validator_1.IsString)(),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], HotListQueryDto.prototype, "area", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, class_validator_1.IsOptional)(),
|
|
61
|
+
(0, class_validator_1.IsString)(),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], HotListQueryDto.prototype, "month", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, class_validator_1.IsOptional)(),
|
|
66
|
+
(0, class_validator_1.IsString)(),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], HotListQueryDto.prototype, "day", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.IsOptional)(),
|
|
71
|
+
(0, class_validator_1.IsString)(),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], HotListQueryDto.prototype, "province", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, class_validator_1.IsOptional)(),
|
|
76
|
+
(0, class_validator_1.IsString)(),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], HotListQueryDto.prototype, "page", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, class_validator_1.IsOptional)(),
|
|
81
|
+
(0, class_validator_1.IsString)(),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], HotListQueryDto.prototype, "pageSize", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, class_validator_1.IsOptional)(),
|
|
86
|
+
(0, class_validator_1.IsString)(),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], HotListQueryDto.prototype, "cursor", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, class_validator_1.IsOptional)(),
|
|
91
|
+
(0, class_validator_1.IsString)(),
|
|
92
|
+
__metadata("design:type", String)
|
|
93
|
+
], HotListQueryDto.prototype, "game", void 0);
|
|
94
|
+
//# sourceMappingURL=hot-list.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hot-list.dto.js","sourceRoot":"","sources":["../../../src/host-lists/dto/hot-list.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AACvD,yDAA8C;AAE9C,MAAa,eAAe;CA2D3B;AA3DD,0CA2DC;AAnDC;IAPC,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;QACvB,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;YAAE,OAAO,KAAK,CAAC;QACxD,IAAI,OAAO,KAAK,KAAK,SAAS;YAAE,OAAO,KAAK,CAAC;QAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,KAAK,KAAK,MAAM,CAAC;QACvD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;;gDACgB;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;8CACI;AASf;IAPC,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;QACvB,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;YAAE,OAAO,KAAK,CAAC;QACxD,IAAI,OAAO,KAAK,KAAK,SAAS;YAAE,OAAO,KAAK,CAAC;QAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,KAAK,KAAK,MAAM,CAAC;QACvD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;;4CACY;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;6CACG;AAKd;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;6CACG;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;8CACI;AAIf;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4CACE;AAIb;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;iDACO;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;6CACG;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;iDACO;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;+CACK;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;6CACG"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { HotListsService } from './hot-lists.service';
|
|
2
|
+
import { ConfigService } from '@nestjs/config';
|
|
3
|
+
import { HotListQueryDto } from './dto/hot-list.dto';
|
|
4
|
+
import { Response } from 'express';
|
|
5
|
+
import { RssService } from '../rss/rss.service';
|
|
6
|
+
export declare class HotListsController {
|
|
7
|
+
private readonly hotListsService;
|
|
8
|
+
private readonly configService;
|
|
9
|
+
private readonly rssService;
|
|
10
|
+
constructor(hotListsService: HotListsService, configService: ConfigService, rssService: RssService);
|
|
11
|
+
getAllSources(): {
|
|
12
|
+
code: number;
|
|
13
|
+
count: number;
|
|
14
|
+
routes: {
|
|
15
|
+
name: string;
|
|
16
|
+
title: string;
|
|
17
|
+
path: string;
|
|
18
|
+
}[];
|
|
19
|
+
};
|
|
20
|
+
getHotList(source: string, query: HotListQueryDto, res: Response): Promise<string | {
|
|
21
|
+
name: string;
|
|
22
|
+
title: string;
|
|
23
|
+
type: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
link?: string;
|
|
26
|
+
total: number;
|
|
27
|
+
data: import("./interfaces/hot-list.interface").HotListItem[];
|
|
28
|
+
fromCache?: boolean;
|
|
29
|
+
updateTime?: string;
|
|
30
|
+
message?: string;
|
|
31
|
+
params?: {
|
|
32
|
+
type: {
|
|
33
|
+
name: string;
|
|
34
|
+
type: Record<string, string>;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
code: number;
|
|
38
|
+
}>;
|
|
39
|
+
}
|