@oomol-lab/open-connector 1.9.0 → 1.9.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/assets/open-connector/catalog/apps/agentearth.json +441 -0
- package/assets/open-connector/catalog/apps/appgrowing_mcp.json +863 -0
- package/assets/open-connector/catalog/apps/arcmira.json +610 -0
- package/assets/open-connector/catalog/apps/bainiu.json +654 -0
- package/assets/open-connector/catalog/apps/chaport.json +331 -0
- package/assets/open-connector/catalog/apps/cnb.json +1408 -0
- package/assets/open-connector/catalog/apps/crtsh.json +123 -0
- package/assets/open-connector/catalog/apps/eastmoney_miaoxiang.json +406 -0
- package/assets/open-connector/catalog/apps/fastmoss_mcp.json +876 -876
- package/assets/open-connector/catalog/apps/ftshare.json +1162 -0
- package/assets/open-connector/catalog/apps/fusion-api.json +143 -0
- package/assets/open-connector/catalog/apps/fxbaogao.json +308 -0
- package/assets/open-connector/catalog/apps/github.json +38 -3
- package/assets/open-connector/catalog/apps/hrmos_kintai.json +7519 -0
- package/assets/open-connector/catalog/apps/humor_api.json +351 -0
- package/assets/open-connector/catalog/apps/kaonavi.json +1723 -0
- package/assets/open-connector/catalog/apps/linear_mcp.json +882 -22
- package/assets/open-connector/catalog/apps/listinggood.json +362 -0
- package/assets/open-connector/catalog/apps/notion_mcp.json +338 -1
- package/assets/open-connector/catalog/apps/outlook.json +414 -0
- package/assets/open-connector/catalog/apps/porteden.json +1258 -0
- package/assets/open-connector/catalog/apps/qiuxiaoce.json +915 -0
- package/assets/open-connector/catalog/apps/qqmusic.json +1834 -0
- package/assets/open-connector/catalog/apps/rakuraku_seisan.json +217 -0
- package/assets/open-connector/catalog/apps/redfox.json +9661 -897
- package/assets/open-connector/catalog/apps/salesforce.json +4907 -0
- package/assets/open-connector/catalog/apps/sansan.json +4594 -0
- package/assets/open-connector/catalog/apps/smarthr.json +8071 -0
- package/assets/open-connector/catalog/apps/smooth.json +914 -0
- package/assets/open-connector/catalog/apps/tapd.json +727 -0
- package/assets/open-connector/catalog/apps/tencent_meeting_mcp.json +1301 -0
- package/assets/open-connector/catalog/apps/threatfox.json +203 -0
- package/assets/open-connector/catalog/apps/tradebee.json +915 -0
- package/assets/open-connector/catalog/apps/twittrapi.json +4914 -0
- package/assets/open-connector/catalog/apps/urlhaus.json +246 -0
- package/assets/open-connector/catalog/apps/weread.json +1514 -0
- package/assets/open-connector/catalog/apps/whatsapp.json +12 -0
- package/assets/open-connector/catalog/apps/zhiliaobiaoxun.json +812 -0
- package/assets/open-connector/catalog/apps-index.json +1 -1
- package/package.json +2 -1
- package/src/connection-service.js +55 -11
- package/src/core/provider-error-codes.d.ts +9 -0
- package/src/core/provider-error-codes.js +13 -0
- package/src/core/request.d.ts +2 -0
- package/src/core/request.js +11 -2
- package/src/mail/imap-smtp/protocol.js +4 -3
- package/src/oauth/oauth-flow-service.js +1 -0
- package/src/oauth/oauth-token.d.ts +2 -0
- package/src/providers/17track/runtime.js +17 -20
- package/src/providers/action-contracts.generated.d.ts +36 -6
- package/src/providers/agentearth/actions.d.ts +2 -0
- package/src/providers/agentearth/actions.js +100 -0
- package/src/providers/agentearth/executors.d.ts +4 -0
- package/src/providers/agentearth/executors.js +109 -0
- package/src/providers/appgrowing_mcp/actions.d.ts +2 -0
- package/src/providers/appgrowing_mcp/actions.js +175 -0
- package/src/providers/appgrowing_mcp/executors.d.ts +4 -0
- package/src/providers/appgrowing_mcp/executors.js +66 -0
- package/src/providers/arcmira/executors.d.ts +3 -0
- package/src/providers/arcmira/executors.js +8 -0
- package/src/providers/arcmira/runtime.d.ts +6 -0
- package/src/providers/arcmira/runtime.js +41 -0
- package/src/providers/bainiu/actions.d.ts +2 -0
- package/src/providers/bainiu/actions.js +108 -0
- package/src/providers/bainiu/executors.d.ts +4 -0
- package/src/providers/bainiu/executors.js +113 -0
- package/src/providers/baixiao/executors.js +1 -1
- package/src/providers/bing_webmaster/executors.js +1 -1
- package/src/providers/chaport/actions.d.ts +2 -0
- package/src/providers/chaport/actions.js +70 -0
- package/src/providers/chaport/executors.d.ts +4 -0
- package/src/providers/chaport/executors.js +128 -0
- package/src/providers/clickup/runtime.js +49 -52
- package/src/providers/cnb/actions.d.ts +2 -0
- package/src/providers/cnb/actions.js +341 -0
- package/src/providers/cnb/executors.d.ts +4 -0
- package/src/providers/cnb/executors.js +135 -0
- package/src/providers/coupontools/runtime.js +11 -14
- package/src/providers/crtsh/executors.d.ts +3 -0
- package/src/providers/crtsh/executors.js +19 -0
- package/src/providers/crtsh/runtime.d.ts +17 -0
- package/src/providers/crtsh/runtime.js +84 -0
- package/src/providers/eastmoney_miaoxiang/actions.d.ts +2 -0
- package/src/providers/eastmoney_miaoxiang/actions.js +95 -0
- package/src/providers/eastmoney_miaoxiang/executors.d.ts +4 -0
- package/src/providers/eastmoney_miaoxiang/executors.js +81 -0
- package/src/providers/fastmoss_mcp/actions-content.d.ts +2 -0
- package/src/providers/fastmoss_mcp/actions-content.js +140 -0
- package/src/providers/fastmoss_mcp/actions-creator.d.ts +2 -0
- package/src/providers/fastmoss_mcp/actions-creator.js +154 -0
- package/src/providers/fastmoss_mcp/actions-product.d.ts +2 -0
- package/src/providers/fastmoss_mcp/actions-product.js +167 -0
- package/src/providers/fastmoss_mcp/actions-research.d.ts +2 -0
- package/src/providers/fastmoss_mcp/actions-research.js +174 -0
- package/src/providers/fastmoss_mcp/actions-shop.d.ts +2 -0
- package/src/providers/fastmoss_mcp/actions-shop.js +142 -0
- package/src/providers/fastmoss_mcp/actions.js +11 -12
- package/src/providers/fastmoss_mcp/schemas.d.ts +51 -0
- package/src/providers/fastmoss_mcp/schemas.js +52 -0
- package/src/providers/ftshare/actions.d.ts +2 -0
- package/src/providers/ftshare/actions.js +124 -0
- package/src/providers/ftshare/executors.d.ts +4 -0
- package/src/providers/ftshare/executors.js +102 -0
- package/src/providers/fusion-api/operations.js +37 -0
- package/src/providers/fxbaogao/actions.d.ts +2 -0
- package/src/providers/fxbaogao/actions.js +74 -0
- package/src/providers/fxbaogao/executors.d.ts +4 -0
- package/src/providers/fxbaogao/executors.js +155 -0
- package/src/providers/github/app-installation.d.ts +37 -0
- package/src/providers/github/app-installation.js +233 -0
- package/src/providers/github/executors.js +93 -15
- package/src/providers/github/runtime-repository.js +21 -1
- package/src/providers/github/runtime-shared.d.ts +2 -0
- package/src/providers/github/runtime-shared.js +1 -0
- package/src/providers/googledrive/runtime-request.js +3 -3
- package/src/providers/hrmos_kintai/actions.d.ts +2 -0
- package/src/providers/hrmos_kintai/actions.js +139 -0
- package/src/providers/hrmos_kintai/attendance-actions.d.ts +2 -0
- package/src/providers/hrmos_kintai/attendance-actions.js +276 -0
- package/src/providers/hrmos_kintai/business-actions.d.ts +2 -0
- package/src/providers/hrmos_kintai/business-actions.js +143 -0
- package/src/providers/hrmos_kintai/business-schemas.d.ts +4 -0
- package/src/providers/hrmos_kintai/business-schemas.js +320 -0
- package/src/providers/hrmos_kintai/executors.d.ts +4 -0
- package/src/providers/hrmos_kintai/executors.js +61 -0
- package/src/providers/hrmos_kintai/export-actions.d.ts +2 -0
- package/src/providers/hrmos_kintai/export-actions.js +58 -0
- package/src/providers/hrmos_kintai/operations.d.ts +9 -0
- package/src/providers/hrmos_kintai/operations.js +278 -0
- package/src/providers/hrmos_kintai/runtime.d.ts +10 -0
- package/src/providers/hrmos_kintai/runtime.js +217 -0
- package/src/providers/hrmos_kintai/schemas.d.ts +10 -0
- package/src/providers/hrmos_kintai/schemas.js +70 -0
- package/src/providers/humor_api/actions.d.ts +2 -0
- package/src/providers/humor_api/actions.js +96 -0
- package/src/providers/humor_api/executors.d.ts +4 -0
- package/src/providers/humor_api/executors.js +76 -0
- package/src/providers/kaonavi/actions.d.ts +4 -0
- package/src/providers/kaonavi/actions.js +144 -0
- package/src/providers/kaonavi/additional-actions.d.ts +10 -0
- package/src/providers/kaonavi/additional-actions.js +203 -0
- package/src/providers/kaonavi/executors.d.ts +4 -0
- package/src/providers/kaonavi/executors.js +69 -0
- package/src/providers/kaonavi/runtime.d.ts +4 -0
- package/src/providers/kaonavi/runtime.js +69 -0
- package/src/providers/linear_mcp/actions.d.ts +14 -0
- package/src/providers/linear_mcp/actions.js +134 -0
- package/src/providers/linear_mcp/runtime-mcp.d.ts +7 -1
- package/src/providers/linear_mcp/runtime-mcp.js +140 -28
- package/src/providers/linkfox/runtime.js +48 -51
- package/src/providers/listinggood/actions.d.ts +2 -0
- package/src/providers/listinggood/actions.js +95 -0
- package/src/providers/listinggood/executors.d.ts +4 -0
- package/src/providers/listinggood/executors.js +99 -0
- package/src/providers/mcp-tools.d.ts +3 -0
- package/src/providers/mcp-tools.js +5 -4
- package/src/providers/notion_mcp/executors.js +53 -24
- package/src/providers/notion_mcp/mcp-response.d.ts +26 -0
- package/src/providers/notion_mcp/mcp-response.js +95 -0
- package/src/providers/omise/executors.js +1 -1
- package/src/providers/outlook/executors.js +35 -2
- package/src/providers/porteden/actions.d.ts +2 -0
- package/src/providers/porteden/actions.js +162 -0
- package/src/providers/porteden/executors.d.ts +4 -0
- package/src/providers/porteden/executors.js +140 -0
- package/src/providers/provider-runtime.d.ts +3 -2
- package/src/providers/pushover/runtime.js +28 -31
- package/src/providers/qianfan/runtime.js +16 -19
- package/src/providers/qiuxiaoce/actions.d.ts +2 -0
- package/src/providers/qiuxiaoce/actions.js +248 -0
- package/src/providers/qiuxiaoce/executors.d.ts +4 -0
- package/src/providers/qiuxiaoce/executors.js +76 -0
- package/src/providers/qiuxiaoce/routes.d.ts +1 -0
- package/src/providers/qiuxiaoce/routes.js +20 -0
- package/src/providers/qqmusic/actions.d.ts +2 -0
- package/src/providers/qqmusic/actions.js +229 -0
- package/src/providers/qqmusic/executors.d.ts +4 -0
- package/src/providers/qqmusic/executors.js +92 -0
- package/src/providers/qqmusic/report-schema.d.ts +4 -0
- package/src/providers/qqmusic/report-schema.js +119 -0
- package/src/providers/rakuraku_seisan/actions.d.ts +2 -0
- package/src/providers/rakuraku_seisan/actions.js +50 -0
- package/src/providers/rakuraku_seisan/executors.d.ts +4 -0
- package/src/providers/rakuraku_seisan/executors.js +40 -0
- package/src/providers/rakuraku_seisan/runtime.d.ts +8 -0
- package/src/providers/rakuraku_seisan/runtime.js +251 -0
- package/src/providers/redfox/actions-account.d.ts +2 -0
- package/src/providers/redfox/actions-account.js +24 -0
- package/src/providers/redfox/actions-autohome.d.ts +2 -0
- package/src/providers/redfox/actions-autohome.js +51 -0
- package/src/providers/redfox/actions-baijiahao.d.ts +2 -0
- package/src/providers/redfox/actions-baijiahao.js +58 -0
- package/src/providers/redfox/actions-bilibili.d.ts +2 -0
- package/src/providers/redfox/actions-bilibili.js +67 -0
- package/src/providers/redfox/actions-dongchedi.d.ts +2 -0
- package/src/providers/redfox/actions-dongchedi.js +49 -0
- package/src/providers/redfox/actions-douyin.d.ts +2 -0
- package/src/providers/redfox/actions-douyin.js +297 -0
- package/src/providers/redfox/actions-generation.d.ts +2 -0
- package/src/providers/redfox/actions-generation.js +293 -0
- package/src/providers/redfox/actions-instagram.d.ts +2 -0
- package/src/providers/redfox/actions-instagram.js +49 -0
- package/src/providers/redfox/actions-kuaishou.d.ts +2 -0
- package/src/providers/redfox/actions-kuaishou.js +53 -0
- package/src/providers/redfox/actions-search.d.ts +2 -0
- package/src/providers/redfox/actions-search.js +125 -0
- package/src/providers/redfox/actions-tiktok.d.ts +2 -0
- package/src/providers/redfox/actions-tiktok.js +136 -0
- package/src/providers/redfox/actions-tools.d.ts +2 -0
- package/src/providers/redfox/actions-tools.js +151 -0
- package/src/providers/redfox/actions-toutiao.d.ts +2 -0
- package/src/providers/redfox/actions-toutiao.js +68 -0
- package/src/providers/redfox/actions-transcription.d.ts +2 -0
- package/src/providers/redfox/actions-transcription.js +165 -0
- package/src/providers/redfox/actions-wechat-channel.d.ts +2 -0
- package/src/providers/redfox/actions-wechat-channel.js +63 -0
- package/src/providers/redfox/actions-wechat.d.ts +2 -0
- package/src/providers/redfox/actions-wechat.js +302 -0
- package/src/providers/redfox/actions-weibo.d.ts +2 -0
- package/src/providers/redfox/actions-weibo.js +61 -0
- package/src/providers/redfox/actions-x.d.ts +2 -0
- package/src/providers/redfox/actions-x.js +126 -0
- package/src/providers/redfox/actions-xiaohongshu.d.ts +2 -0
- package/src/providers/redfox/actions-xiaohongshu.js +244 -0
- package/src/providers/redfox/actions-yiche.d.ts +2 -0
- package/src/providers/redfox/actions-yiche.js +59 -0
- package/src/providers/redfox/actions-youtube.d.ts +2 -0
- package/src/providers/redfox/actions-youtube.js +64 -0
- package/src/providers/redfox/actions-zhihu.d.ts +2 -0
- package/src/providers/redfox/actions-zhihu.js +26 -0
- package/src/providers/redfox/actions.d.ts +2 -0
- package/src/providers/redfox/actions.js +49 -0
- package/src/providers/redfox/executors.d.ts +2 -14
- package/src/providers/redfox/executors.js +28 -551
- package/src/providers/redfox/routes.d.ts +11 -0
- package/src/providers/redfox/routes.js +329 -0
- package/src/providers/redfox/runtime.d.ts +6 -0
- package/src/providers/redfox/runtime.js +151 -0
- package/src/providers/redfox/schemas.d.ts +9 -0
- package/src/providers/redfox/schemas.js +40 -0
- package/src/providers/registry.generated.js +30 -0
- package/src/providers/salesforce/context.d.ts +16 -0
- package/src/providers/salesforce/context.js +58 -0
- package/src/providers/salesforce/executors.d.ts +5 -0
- package/src/providers/salesforce/executors.js +54 -0
- package/src/providers/salesforce/media.d.ts +9 -0
- package/src/providers/salesforce/media.js +66 -0
- package/src/providers/salesforce/oauth.d.ts +2 -0
- package/src/providers/salesforce/oauth.js +89 -0
- package/src/providers/salesforce/runtime-analytics.d.ts +2 -0
- package/src/providers/salesforce/runtime-analytics.js +60 -0
- package/src/providers/salesforce/runtime-automation.d.ts +2 -0
- package/src/providers/salesforce/runtime-automation.js +64 -0
- package/src/providers/salesforce/runtime-base.d.ts +2 -0
- package/src/providers/salesforce/runtime-base.js +51 -0
- package/src/providers/salesforce/runtime-bulk.d.ts +2 -0
- package/src/providers/salesforce/runtime-bulk.js +98 -0
- package/src/providers/salesforce/runtime-data.d.ts +2 -0
- package/src/providers/salesforce/runtime-data.js +207 -0
- package/src/providers/salesforce/runtime-files.d.ts +2 -0
- package/src/providers/salesforce/runtime-files.js +108 -0
- package/src/providers/salesforce/transport.d.ts +9 -0
- package/src/providers/salesforce/transport.js +65 -0
- package/src/providers/sansan/actions.d.ts +2 -0
- package/src/providers/sansan/actions.js +165 -0
- package/src/providers/sansan/admin-actions.d.ts +2 -0
- package/src/providers/sansan/admin-actions.js +181 -0
- package/src/providers/sansan/admin.d.ts +2 -0
- package/src/providers/sansan/admin.js +42 -0
- package/src/providers/sansan/business-actions.d.ts +2 -0
- package/src/providers/sansan/business-actions.js +160 -0
- package/src/providers/sansan/business.d.ts +2 -0
- package/src/providers/sansan/business.js +51 -0
- package/src/providers/sansan/executors.d.ts +4 -0
- package/src/providers/sansan/executors.js +59 -0
- package/src/providers/sansan/file-schema.d.ts +2 -0
- package/src/providers/sansan/file-schema.js +8 -0
- package/src/providers/sansan/files.d.ts +11 -0
- package/src/providers/sansan/files.js +49 -0
- package/src/providers/sansan/organization-actions.d.ts +2 -0
- package/src/providers/sansan/organization-actions.js +198 -0
- package/src/providers/sansan/organization-columns.d.ts +2 -0
- package/src/providers/sansan/organization-columns.js +33 -0
- package/src/providers/sansan/organization.d.ts +2 -0
- package/src/providers/sansan/organization.js +88 -0
- package/src/providers/sansan/read.d.ts +2 -0
- package/src/providers/sansan/read.js +25 -0
- package/src/providers/sansan/request.d.ts +22 -0
- package/src/providers/sansan/request.js +94 -0
- package/src/providers/sansan/schemas.d.ts +7 -0
- package/src/providers/sansan/schemas.js +72 -0
- package/src/providers/shopee/runtime.d.ts +33 -29
- package/src/providers/shopee/runtime.js +166 -169
- package/src/providers/smarthr/actions.d.ts +2 -0
- package/src/providers/smarthr/actions.js +286 -0
- package/src/providers/smarthr/employee-runtime.d.ts +1 -0
- package/src/providers/smarthr/employee-runtime.js +63 -0
- package/src/providers/smarthr/employee-schema.d.ts +3 -0
- package/src/providers/smarthr/employee-schema.js +222 -0
- package/src/providers/smarthr/executors.d.ts +4 -0
- package/src/providers/smarthr/executors.js +35 -0
- package/src/providers/smarthr/pagination.d.ts +1 -0
- package/src/providers/smarthr/pagination.js +84 -0
- package/src/providers/smarthr/resource-routes.d.ts +16 -0
- package/src/providers/smarthr/resource-routes.js +163 -0
- package/src/providers/smarthr/runtime.d.ts +13 -0
- package/src/providers/smarthr/runtime.js +242 -0
- package/src/providers/smarthr/supplemental-actions.d.ts +2 -0
- package/src/providers/smarthr/supplemental-actions.js +541 -0
- package/src/providers/smooth/actions.d.ts +2 -0
- package/src/providers/smooth/actions.js +138 -0
- package/src/providers/smooth/executors.d.ts +4 -0
- package/src/providers/smooth/executors.js +102 -0
- package/src/providers/tapd/actions.d.ts +8 -0
- package/src/providers/tapd/actions.js +89 -0
- package/src/providers/tapd/executors.d.ts +4 -0
- package/src/providers/tapd/executors.js +137 -0
- package/src/providers/teable/runtime.js +12 -15
- package/src/providers/tencent_meeting_mcp/actions.d.ts +2 -0
- package/src/providers/tencent_meeting_mcp/actions.js +420 -0
- package/src/providers/tencent_meeting_mcp/executors.d.ts +4 -0
- package/src/providers/tencent_meeting_mcp/executors.js +117 -0
- package/src/providers/threatfox/executors.d.ts +4 -0
- package/src/providers/threatfox/executors.js +40 -0
- package/src/providers/threatfox/runtime.d.ts +15 -0
- package/src/providers/threatfox/runtime.js +128 -0
- package/src/providers/ticket_tailor/runtime.js +1 -1
- package/src/providers/ticketmaster/runtime.js +3 -6
- package/src/providers/timelinesai/runtime.js +13 -16
- package/src/providers/tradebee/actions.d.ts +2 -0
- package/src/providers/tradebee/actions.js +176 -0
- package/src/providers/tradebee/executors.d.ts +4 -0
- package/src/providers/tradebee/executors.js +83 -0
- package/src/providers/twittrapi/executors.d.ts +4 -0
- package/src/providers/twittrapi/executors.js +17 -0
- package/src/providers/twittrapi/runtime.d.ts +12 -0
- package/src/providers/twittrapi/runtime.js +203 -0
- package/src/providers/urlhaus/executors.d.ts +4 -0
- package/src/providers/urlhaus/executors.js +40 -0
- package/src/providers/urlhaus/runtime.d.ts +15 -0
- package/src/providers/urlhaus/runtime.js +142 -0
- package/src/providers/wangdian/runtime.js +16 -19
- package/src/providers/weread/actions.d.ts +2 -0
- package/src/providers/weread/actions.js +424 -0
- package/src/providers/weread/executors.d.ts +4 -0
- package/src/providers/weread/executors.js +98 -0
- package/src/providers/whatsapp/runtime.js +6 -1
- package/src/providers/workast/runtime.js +12 -17
- package/src/providers/youzan/runtime.js +21 -24
- package/src/providers/zenkit/runtime.js +13 -19
- package/src/providers/zhiliaobiaoxun/actions.d.ts +2 -0
- package/src/providers/zhiliaobiaoxun/actions.js +138 -0
- package/src/providers/zhiliaobiaoxun/executors.d.ts +4 -0
- package/src/providers/zhiliaobiaoxun/executors.js +78 -0
- package/src/server/api/auth.d.ts +2 -0
- package/src/server/api/auth.js +2 -1
- package/src/server/api/console-catalog-routes.d.ts +17 -0
- package/src/server/api/console-catalog-routes.js +88 -0
- package/src/server/api/console-oauth-routes.d.ts +18 -0
- package/src/server/api/console-oauth-routes.js +298 -0
- package/src/server/api/docs-routes.d.ts +12 -0
- package/src/server/api/docs-routes.js +38 -0
- package/src/server/api/http-utils.d.ts +1 -0
- package/src/server/api/http-utils.js +8 -0
- package/src/server/api/marketplace-routes.d.ts +7 -0
- package/src/server/api/marketplace-routes.js +62 -0
- package/src/server/api/mcp-routes.d.ts +18 -0
- package/src/server/api/mcp-routes.js +37 -0
- package/src/server/api/policy-routes.d.ts +13 -0
- package/src/server/api/policy-routes.js +50 -0
- package/src/server/api/policy-snapshot.d.ts +14 -0
- package/src/server/api/policy-snapshot.js +30 -0
- package/src/server/api/run-log-routes.d.ts +7 -0
- package/src/server/api/run-log-routes.js +70 -0
- package/src/server/api/runtime-api.d.ts +0 -7
- package/src/server/api/runtime-api.js +0 -13
- package/src/server/api/runtime-app-routes.d.ts +10 -0
- package/src/server/api/runtime-app-routes.js +72 -0
- package/src/server/api/runtime-catalog-routes.d.ts +37 -0
- package/src/server/api/runtime-catalog-routes.js +133 -0
- package/src/server/api/runtime-execution-routes.d.ts +16 -0
- package/src/server/api/runtime-execution-routes.js +198 -0
- package/src/server/api/saas-oauth-routes.d.ts +9 -0
- package/src/server/api/saas-oauth-routes.js +27 -0
- package/src/server/api/saas-project-routes.d.ts +7 -0
- package/src/server/api/saas-project-routes.js +16 -0
- package/src/server/api/transit-file-routes.d.ts +9 -0
- package/src/server/api/transit-file-routes.js +49 -0
- package/src/server/api/trigger-routes.d.ts +15 -0
- package/src/server/api/trigger-routes.js +48 -0
- package/src/server/connect-app.d.ts +1 -0
- package/src/server/connect-app.js +3 -1
- package/src/server/connect-server.d.ts +3 -54
- package/src/server/connect-server.js +95 -1148
- package/src/providers/fastmoss_mcp/official-tools.json +0 -2922
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { optionalRecord, optionalRawString } from "../../core/cast.js";
|
|
2
|
+
import { requiredInputString, requiredResponseRecord, ProviderRequestError, runProviderRequest, defineApiKeyProviderExecutors, defineProviderProxy, mapProviderActionHandlers, readProviderProxyErrorMessage, withRetryAfterSeconds, } from "../provider-runtime.js";
|
|
3
|
+
import { qiuxiaoceActions } from "./actions.js";
|
|
4
|
+
import { qiuxiaoceRoutes } from "./routes.js";
|
|
5
|
+
const baseUrl = "https://www.qiuxiaoce.com/wp-json/abv2-creator/v1";
|
|
6
|
+
const defaultHeaders = { accept: "application/json" };
|
|
7
|
+
async function request({ route, input, apiKey, fetcher, parentSignal }) {
|
|
8
|
+
return runProviderRequest({ signal: parentSignal, label: "QiuXiaoCe" }, async (signal) => {
|
|
9
|
+
const pathId = route.includes("{id}");
|
|
10
|
+
const url = new URL(`${baseUrl}${pathId ? route.replace("{id}", encodeURIComponent(String(input.id))) : route}`);
|
|
11
|
+
for (const [key, value] of Object.entries(input)) {
|
|
12
|
+
if (value != null && !(pathId && key === "id"))
|
|
13
|
+
url.searchParams.set(key, String(value));
|
|
14
|
+
}
|
|
15
|
+
const response = await fetcher(url.toString(), {
|
|
16
|
+
method: "GET",
|
|
17
|
+
headers: { ...defaultHeaders, "X-API-Key": apiKey },
|
|
18
|
+
signal,
|
|
19
|
+
});
|
|
20
|
+
const text = await response.text();
|
|
21
|
+
let payload;
|
|
22
|
+
try {
|
|
23
|
+
payload = JSON.parse(text);
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
payload = undefined;
|
|
27
|
+
}
|
|
28
|
+
const body = optionalRecord(payload);
|
|
29
|
+
if (!response.ok || body?.success === false || (body?.code != null && body?.success !== true)) {
|
|
30
|
+
const code = optionalRawString(body?.code) ?? optionalRawString(body?.error);
|
|
31
|
+
const message = optionalRawString(body?.message) ?? optionalRawString(body?.error);
|
|
32
|
+
const detail = [code, message].filter(Boolean).join(": ") || `HTTP ${response.status}`;
|
|
33
|
+
throw new ProviderRequestError(response.ok ? 502 : response.status, `QiuXiaoCe request failed: ${detail.split(apiKey).join("[REDACTED]")}`, undefined, response.status === 429 ? "rate_limited" : "provider_error");
|
|
34
|
+
}
|
|
35
|
+
return requiredResponseRecord(payload, "QiuXiaoCe response");
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
const handlers = mapProviderActionHandlers("qiuxiaoce", qiuxiaoceActions, (action) => async (dataInput, context) => {
|
|
39
|
+
const route = qiuxiaoceRoutes[action.name];
|
|
40
|
+
return request({
|
|
41
|
+
route: route,
|
|
42
|
+
input: dataInput,
|
|
43
|
+
apiKey: context.apiKey,
|
|
44
|
+
fetcher: context.fetcher,
|
|
45
|
+
parentSignal: context.signal,
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
export const executors = defineApiKeyProviderExecutors("qiuxiaoce", handlers, {
|
|
49
|
+
skipDnsValidation: true,
|
|
50
|
+
});
|
|
51
|
+
export const credentialValidators = {
|
|
52
|
+
async apiKey(input, { fetcher, signal }) {
|
|
53
|
+
await request({
|
|
54
|
+
route: "/quota",
|
|
55
|
+
input: {},
|
|
56
|
+
apiKey: requiredInputString(input.apiKey, "API Key"),
|
|
57
|
+
fetcher: fetcher,
|
|
58
|
+
parentSignal: signal,
|
|
59
|
+
});
|
|
60
|
+
return { profile: { displayName: "QiuXiaoCe API Key" }, grantedScopes: [], metadata: { apiBaseUrl: baseUrl } };
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
export const proxy = defineProviderProxy({
|
|
64
|
+
service: "qiuxiaoce",
|
|
65
|
+
baseUrl,
|
|
66
|
+
auth: { type: "api_key_header", name: "X-API-Key" },
|
|
67
|
+
skipDnsValidation: true,
|
|
68
|
+
customizeRequest({ headers }) {
|
|
69
|
+
for (const [name, value] of Object.entries({ accept: "application/json" }))
|
|
70
|
+
if (!headers.has(name))
|
|
71
|
+
headers.set(name, value);
|
|
72
|
+
},
|
|
73
|
+
async readError(response) {
|
|
74
|
+
return new ProviderRequestError(response.status, await readProviderProxyErrorMessage(response, "Provider request failed"), withRetryAfterSeconds(response), response.status === 429 ? "rate_limited" : "provider_error");
|
|
75
|
+
},
|
|
76
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const qiuxiaoceRoutes: Record<string, string>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const qiuxiaoceRoutes = {
|
|
2
|
+
get_quota: "/quota",
|
|
3
|
+
get_daily_digest: "/today/digest",
|
|
4
|
+
list_fixtures: "/fixtures",
|
|
5
|
+
get_fixture: "/fixtures/{id}",
|
|
6
|
+
get_fixture_stats: "/fixtures/{id}/stats",
|
|
7
|
+
get_fixture_events: "/fixtures/{id}/events",
|
|
8
|
+
get_fixture_lineups: "/fixtures/{id}/lineups",
|
|
9
|
+
get_fixture_players: "/fixtures/{id}/players",
|
|
10
|
+
search_teams: "/teams",
|
|
11
|
+
get_team: "/teams/{id}",
|
|
12
|
+
list_leagues: "/leagues",
|
|
13
|
+
get_league: "/leagues/{id}",
|
|
14
|
+
get_standings: "/standings",
|
|
15
|
+
list_league_fixtures: "/leagues/{id}/fixtures",
|
|
16
|
+
list_league_teams: "/leagues/{id}/teams",
|
|
17
|
+
list_league_top_scorers: "/leagues/{id}/topscorers",
|
|
18
|
+
list_league_top_assists: "/leagues/{id}/topassists",
|
|
19
|
+
list_league_seasons: "/leagues/{id}/seasons",
|
|
20
|
+
};
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { jsonSchema as s } from "../../core/json-schema.js";
|
|
2
|
+
import { defineProviderAction } from "../../core/provider-definition.js";
|
|
3
|
+
import { dayReport, weekReport, monthReport } from "./report-schema.js";
|
|
4
|
+
const page = s.integer("Zero-based page number; defaults to 0.", { minimum: 0, default: 0 });
|
|
5
|
+
const traceId = s.string("Request trace ID.");
|
|
6
|
+
const responseTimestamp = s.integer("Response timestamp in milliseconds.");
|
|
7
|
+
const gatewayCode = s.integer("Gateway result code; nonzero indicates failure.");
|
|
8
|
+
const businessCode = s.integer("Business result code; nonzero indicates failure.");
|
|
9
|
+
const providerMessage = s.string("Provider message.");
|
|
10
|
+
const songMid = s.string("Song MID.");
|
|
11
|
+
const songName = s.string("Song name.");
|
|
12
|
+
const singerName = s.string("Singer name.");
|
|
13
|
+
const songUrl = s.string("Song listening page URL.");
|
|
14
|
+
const song = s.looseObject("A song with its listening page.", { songMid, songName, singerName, songH5Url: songUrl });
|
|
15
|
+
const albumMid = s.string("Album or radio MID.");
|
|
16
|
+
const albumName = s.string("Album or radio name.");
|
|
17
|
+
const publicationDate = s.string("Publication date.");
|
|
18
|
+
const listenCount = s.integer("Listen count.");
|
|
19
|
+
const albumCategory = s.string("Album category.");
|
|
20
|
+
const albumDescription = s.string("Album or radio description.");
|
|
21
|
+
const album = s.looseObject("Album or radio metadata.", {
|
|
22
|
+
albumMid,
|
|
23
|
+
albumName,
|
|
24
|
+
singerName,
|
|
25
|
+
publicTime: publicationDate,
|
|
26
|
+
listenNum: listenCount,
|
|
27
|
+
category: albumCategory,
|
|
28
|
+
albumDesc: albumDescription,
|
|
29
|
+
});
|
|
30
|
+
const playlistId = s.integer("Playlist ID.");
|
|
31
|
+
const playlistName = s.string("Playlist name.");
|
|
32
|
+
const playlistDescription = s.string("Playlist description.");
|
|
33
|
+
const creatorName = s.string("Creator name; may be empty for AI playlists.");
|
|
34
|
+
const playlist = s.looseObject("Playlist metadata.", {
|
|
35
|
+
dissId: playlistId,
|
|
36
|
+
dissName: playlistName,
|
|
37
|
+
dissDesc: playlistDescription,
|
|
38
|
+
creatorName,
|
|
39
|
+
});
|
|
40
|
+
const hasMore = s.boolean("Whether another page exists.");
|
|
41
|
+
const emptyInput = s.object("No input parameters.", {}, { required: [] });
|
|
42
|
+
const recommendedSongs = s.array("Recommended songs.", song);
|
|
43
|
+
const recommendationOutput = s.looseObject("QQ Music response with upstream fields preserved.", {
|
|
44
|
+
traceId,
|
|
45
|
+
ts: responseTimestamp,
|
|
46
|
+
ret: gatewayCode,
|
|
47
|
+
sub_ret: businessCode,
|
|
48
|
+
msg: providerMessage,
|
|
49
|
+
songlist: recommendedSongs,
|
|
50
|
+
});
|
|
51
|
+
const chartId = s.integer("Chart ID returned by list_charts.");
|
|
52
|
+
const chartName = s.string("Chart name.");
|
|
53
|
+
const listenerCount = s.integer("Listener count.");
|
|
54
|
+
const totalSongs = s.integer("Total song count.");
|
|
55
|
+
const tracks = s.array("Songs on this page.", song);
|
|
56
|
+
export const qqmusicActions = [
|
|
57
|
+
defineProviderAction("qqmusic", {
|
|
58
|
+
operationType: "read",
|
|
59
|
+
requiredScopes: [],
|
|
60
|
+
name: "search",
|
|
61
|
+
description: "Search songs, albums, playlists, music videos, radios, or singers. Increment page while hasMore is true.",
|
|
62
|
+
inputSchema: s.object("Search parameters.", {
|
|
63
|
+
keyword: s.string("Search keywords.", { minLength: 1 }),
|
|
64
|
+
type: {
|
|
65
|
+
...s.string("Search type: 0 songs, 1 albums, 2 playlists, 3 music videos, 4 radios, 5 singers. Defaults to 0.", { default: "0" }),
|
|
66
|
+
enum: ["0", "1", "2", "3", "4", "5"],
|
|
67
|
+
},
|
|
68
|
+
page,
|
|
69
|
+
}, { required: ["keyword"] }),
|
|
70
|
+
outputSchema: s.looseObject("QQ Music response with upstream fields preserved.", {
|
|
71
|
+
traceId,
|
|
72
|
+
ts: responseTimestamp,
|
|
73
|
+
ret: gatewayCode,
|
|
74
|
+
sub_ret: businessCode,
|
|
75
|
+
msg: providerMessage,
|
|
76
|
+
songs: s.nullable(s.array("Matching songs; other result types may be null.", song)),
|
|
77
|
+
albums: s.nullable(s.array("Matching albums.", album)),
|
|
78
|
+
playlists: s.nullable(s.array("Matching playlists.", playlist)),
|
|
79
|
+
mvs: s.nullable(s.array("Matching music videos.", s.looseObject("Music video metadata.", {
|
|
80
|
+
mvVid: s.string("Music video ID."),
|
|
81
|
+
mvName: s.string("Music video name."),
|
|
82
|
+
singerName,
|
|
83
|
+
playCount: s.integer("Play count."),
|
|
84
|
+
publicTime: publicationDate,
|
|
85
|
+
mvUrl: s.string("Music video page URL."),
|
|
86
|
+
}))),
|
|
87
|
+
radios: s.nullable(s.array("Matching radios.", album)),
|
|
88
|
+
singers: s.nullable(s.array("Matching singers.", s.looseObject("Singer metadata.", {
|
|
89
|
+
singerMid: s.string("Singer MID."),
|
|
90
|
+
singerName,
|
|
91
|
+
songNum: s.integer("Song count."),
|
|
92
|
+
albumNum: s.integer("Album count."),
|
|
93
|
+
}))),
|
|
94
|
+
hasMore,
|
|
95
|
+
}),
|
|
96
|
+
}),
|
|
97
|
+
defineProviderAction("qqmusic", {
|
|
98
|
+
operationType: "read",
|
|
99
|
+
requiredScopes: [],
|
|
100
|
+
name: "get_daily_mix",
|
|
101
|
+
description: "Get the daily personalized song recommendations.",
|
|
102
|
+
inputSchema: emptyInput,
|
|
103
|
+
outputSchema: recommendationOutput,
|
|
104
|
+
}),
|
|
105
|
+
defineProviderAction("qqmusic", {
|
|
106
|
+
operationType: "read",
|
|
107
|
+
requiredScopes: [],
|
|
108
|
+
name: "get_radio",
|
|
109
|
+
description: "Get songs from the personalized radio.",
|
|
110
|
+
inputSchema: emptyInput,
|
|
111
|
+
outputSchema: recommendationOutput,
|
|
112
|
+
}),
|
|
113
|
+
defineProviderAction("qqmusic", {
|
|
114
|
+
operationType: "read",
|
|
115
|
+
requiredScopes: [],
|
|
116
|
+
name: "list_ai_playlists",
|
|
117
|
+
description: "List AI-recommended playlists. This endpoint does not accept a prompt or create a playlist.",
|
|
118
|
+
inputSchema: emptyInput,
|
|
119
|
+
outputSchema: s.looseObject("QQ Music response with upstream fields preserved.", {
|
|
120
|
+
traceId,
|
|
121
|
+
ts: responseTimestamp,
|
|
122
|
+
ret: gatewayCode,
|
|
123
|
+
sub_ret: businessCode,
|
|
124
|
+
msg: providerMessage,
|
|
125
|
+
playlists: s.array("AI-recommended playlists.", playlist),
|
|
126
|
+
}),
|
|
127
|
+
}),
|
|
128
|
+
defineProviderAction("qqmusic", {
|
|
129
|
+
operationType: "read",
|
|
130
|
+
requiredScopes: [],
|
|
131
|
+
name: "list_charts",
|
|
132
|
+
description: "List chart groups and chart previews. Use topId to retrieve a chart.",
|
|
133
|
+
inputSchema: emptyInput,
|
|
134
|
+
outputSchema: s.looseObject("QQ Music response with upstream fields preserved.", {
|
|
135
|
+
traceId,
|
|
136
|
+
ts: responseTimestamp,
|
|
137
|
+
ret: gatewayCode,
|
|
138
|
+
sub_ret: businessCode,
|
|
139
|
+
msg: providerMessage,
|
|
140
|
+
groupList: s.array("Chart groups.", s.looseObject("A chart group.", {
|
|
141
|
+
groupName: s.string("Group name."),
|
|
142
|
+
groupTopList: s.array("Charts in this group.", s.looseObject("Chart summary.", {
|
|
143
|
+
topId: chartId,
|
|
144
|
+
topName: chartName,
|
|
145
|
+
listenNum: listenerCount,
|
|
146
|
+
totalNum: totalSongs,
|
|
147
|
+
songList: s.array("Preview of ranked songs.", s.looseObject("A ranked song.", {
|
|
148
|
+
songMid,
|
|
149
|
+
songName,
|
|
150
|
+
singerName,
|
|
151
|
+
songH5Url: songUrl,
|
|
152
|
+
rank: s.integer("Song rank."),
|
|
153
|
+
})),
|
|
154
|
+
})),
|
|
155
|
+
})),
|
|
156
|
+
}),
|
|
157
|
+
}),
|
|
158
|
+
defineProviderAction("qqmusic", {
|
|
159
|
+
operationType: "read",
|
|
160
|
+
requiredScopes: [],
|
|
161
|
+
name: "get_chart",
|
|
162
|
+
description: "Get one page of a chart. Increment page while hasMore is true.",
|
|
163
|
+
inputSchema: s.object("Chart query parameters.", { topId: chartId, page: page }, { required: ["topId"] }),
|
|
164
|
+
outputSchema: s.looseObject("QQ Music response with upstream fields preserved.", {
|
|
165
|
+
traceId,
|
|
166
|
+
ts: responseTimestamp,
|
|
167
|
+
ret: gatewayCode,
|
|
168
|
+
sub_ret: businessCode,
|
|
169
|
+
msg: providerMessage,
|
|
170
|
+
topId: chartId,
|
|
171
|
+
topName: chartName,
|
|
172
|
+
listenNum: listenerCount,
|
|
173
|
+
totalNum: totalSongs,
|
|
174
|
+
topType: s.integer("Chart type."),
|
|
175
|
+
topDesc: s.string("Chart description."),
|
|
176
|
+
topHeaderPic: s.string("Chart header image URL."),
|
|
177
|
+
topBannerPic: s.string("Chart banner image URL."),
|
|
178
|
+
updateTime: s.string("Chart update time."),
|
|
179
|
+
hasMore,
|
|
180
|
+
trackList: tracks,
|
|
181
|
+
}),
|
|
182
|
+
}),
|
|
183
|
+
defineProviderAction("qqmusic", {
|
|
184
|
+
operationType: "read",
|
|
185
|
+
requiredScopes: [],
|
|
186
|
+
name: "get_playlist",
|
|
187
|
+
description: "Get one page of a playlist. Increment page while hasMore is true.",
|
|
188
|
+
inputSchema: s.object("Playlist query parameters.", { dissId: playlistId, page: page }, { required: ["dissId"] }),
|
|
189
|
+
outputSchema: s.looseObject("QQ Music response with upstream fields preserved.", {
|
|
190
|
+
traceId,
|
|
191
|
+
ts: responseTimestamp,
|
|
192
|
+
ret: gatewayCode,
|
|
193
|
+
sub_ret: businessCode,
|
|
194
|
+
msg: providerMessage,
|
|
195
|
+
dissId: playlistId,
|
|
196
|
+
dissName: playlistName,
|
|
197
|
+
desc: playlistDescription,
|
|
198
|
+
picUrl: s.string("Playlist cover image URL."),
|
|
199
|
+
totalNum: totalSongs,
|
|
200
|
+
hasMore,
|
|
201
|
+
trackList: tracks,
|
|
202
|
+
}),
|
|
203
|
+
}),
|
|
204
|
+
defineProviderAction("qqmusic", {
|
|
205
|
+
operationType: "read",
|
|
206
|
+
requiredScopes: [],
|
|
207
|
+
name: "get_listening_report",
|
|
208
|
+
description: "Get personal daily, weekly, or monthly listening statistics. Only the selected time dimension is populated.",
|
|
209
|
+
inputSchema: s.object("Listening report parameters.", {
|
|
210
|
+
timeKey: {
|
|
211
|
+
...s.string("Report period: d daily, w weekly, m or empty monthly; defaults to m.", {
|
|
212
|
+
default: "m",
|
|
213
|
+
}),
|
|
214
|
+
enum: ["d", "w", "m", ""],
|
|
215
|
+
},
|
|
216
|
+
startTime: s.integer("Unix seconds at the target day midnight or target week Monday midnight. Omit for today or this week; ignored for monthly reports."),
|
|
217
|
+
}, { required: [] }),
|
|
218
|
+
outputSchema: s.looseObject("QQ Music response with upstream fields preserved.", {
|
|
219
|
+
traceId,
|
|
220
|
+
ts: responseTimestamp,
|
|
221
|
+
ret: gatewayCode,
|
|
222
|
+
sub_ret: businessCode,
|
|
223
|
+
msg: providerMessage,
|
|
224
|
+
dayData: dayReport,
|
|
225
|
+
weekData: weekReport,
|
|
226
|
+
monthData: monthReport,
|
|
227
|
+
}),
|
|
228
|
+
}),
|
|
229
|
+
];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CredentialValidators, ProviderExecutors, ProviderProxyExecutor } from "../../core/types.ts";
|
|
2
|
+
export declare const executors: ProviderExecutors;
|
|
3
|
+
export declare const credentialValidators: CredentialValidators;
|
|
4
|
+
export declare const proxy: ProviderProxyExecutor;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { optionalRecord, optionalRawString } from "../../core/cast.js";
|
|
2
|
+
import { requiredInputString, requiredResponseRecord, ProviderRequestError, runProviderRequest, isAbortLikeError, defineApiKeyProviderExecutors, defineProviderProxy, mapProviderActionHandlers, readProviderProxyErrorMessage, withRetryAfterSeconds, } from "../provider-runtime.js";
|
|
3
|
+
import { qqmusicActions } from "./actions.js";
|
|
4
|
+
const baseUrl = "https://a.y.qq.com";
|
|
5
|
+
const skillVersion = "0.0.3";
|
|
6
|
+
const defaultHeaders = { "content-type": "application/json" };
|
|
7
|
+
const routes = {
|
|
8
|
+
search: "/discover/search",
|
|
9
|
+
get_daily_mix: "/discover/daily-mix",
|
|
10
|
+
get_radio: "/discover/radio",
|
|
11
|
+
list_ai_playlists: "/discover/ai-playlists",
|
|
12
|
+
list_charts: "/charts",
|
|
13
|
+
get_chart: "/charts/detail",
|
|
14
|
+
get_playlist: "/playlists/detail",
|
|
15
|
+
get_listening_report: "/me/report",
|
|
16
|
+
};
|
|
17
|
+
async function request({ route, params, apiKey, fetcher, parentSignal }) {
|
|
18
|
+
return runProviderRequest({ signal: parentSignal, label: "QQ Music" }, async (signal) => {
|
|
19
|
+
const response = await fetcher(`${baseUrl}${route}`, {
|
|
20
|
+
method: "POST",
|
|
21
|
+
signal,
|
|
22
|
+
headers: { ...defaultHeaders, authorization: `Bearer ${apiKey}` },
|
|
23
|
+
body: JSON.stringify({ params, comm: { skill_version: skillVersion } }),
|
|
24
|
+
});
|
|
25
|
+
let payload;
|
|
26
|
+
try {
|
|
27
|
+
payload = await response.json();
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
if (isAbortLikeError(error))
|
|
31
|
+
throw error;
|
|
32
|
+
payload = undefined;
|
|
33
|
+
}
|
|
34
|
+
const record = optionalRecord(payload);
|
|
35
|
+
const codes = [record?.ret, record?.sub_ret];
|
|
36
|
+
if (!response.ok || codes.some((code) => code != null && code !== 0 && code !== "0")) {
|
|
37
|
+
const detail = optionalRawString(record?.msg) || `HTTP ${response.status}`;
|
|
38
|
+
const codeDetails = codes
|
|
39
|
+
.filter((code) => code != null)
|
|
40
|
+
.map(String)
|
|
41
|
+
.join("/");
|
|
42
|
+
throw new ProviderRequestError(response.ok ? 502 : response.status, `QQ Music request failed${codeDetails ? ` (${codeDetails})` : ""}: ${detail}`.split(apiKey).join("[REDACTED]"), undefined, response.status === 429 ? "rate_limited" : "provider_error");
|
|
43
|
+
}
|
|
44
|
+
return requiredResponseRecord(payload, "QQ Music response");
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const handlers = mapProviderActionHandlers("qqmusic", qqmusicActions, (action) => async (dataInput, context) => {
|
|
48
|
+
const route = routes[action.name];
|
|
49
|
+
const params = dataInput;
|
|
50
|
+
if (action.name === "search")
|
|
51
|
+
params.type ??= "0";
|
|
52
|
+
if (action.name === "get_listening_report")
|
|
53
|
+
params.timeKey ??= "m";
|
|
54
|
+
if (action.name === "list_ai_playlists")
|
|
55
|
+
params.reqType = "all";
|
|
56
|
+
return request({
|
|
57
|
+
route: route,
|
|
58
|
+
params: params,
|
|
59
|
+
apiKey: context.apiKey,
|
|
60
|
+
fetcher: context.fetcher,
|
|
61
|
+
parentSignal: context.signal,
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
export const executors = defineApiKeyProviderExecutors("qqmusic", handlers, {
|
|
65
|
+
skipDnsValidation: true,
|
|
66
|
+
});
|
|
67
|
+
export const credentialValidators = {
|
|
68
|
+
async apiKey(input, { fetcher, signal }) {
|
|
69
|
+
await request({
|
|
70
|
+
route: "/skill/version",
|
|
71
|
+
params: {},
|
|
72
|
+
apiKey: requiredInputString(input.apiKey, "API Key"),
|
|
73
|
+
fetcher: fetcher,
|
|
74
|
+
parentSignal: signal,
|
|
75
|
+
});
|
|
76
|
+
return { profile: { displayName: "QQ Music API Key" }, grantedScopes: [], metadata: { apiBaseUrl: baseUrl } };
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
export const proxy = defineProviderProxy({
|
|
80
|
+
service: "qqmusic",
|
|
81
|
+
baseUrl,
|
|
82
|
+
auth: { type: "api_key_authorization", prefix: "Bearer " },
|
|
83
|
+
skipDnsValidation: true,
|
|
84
|
+
customizeRequest({ headers }) {
|
|
85
|
+
for (const [name, value] of Object.entries({ "content-type": "application/json" }))
|
|
86
|
+
if (!headers.has(name))
|
|
87
|
+
headers.set(name, value);
|
|
88
|
+
},
|
|
89
|
+
async readError(response) {
|
|
90
|
+
return new ProviderRequestError(response.status, await readProviderProxyErrorMessage(response, "Provider request failed"), withRetryAfterSeconds(response), response.status === 429 ? "rate_limited" : "provider_error");
|
|
91
|
+
},
|
|
92
|
+
});
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { jsonSchema as s } from "../../core/json-schema.js";
|
|
2
|
+
const songFields = {
|
|
3
|
+
songMid: s.string("Song MID."),
|
|
4
|
+
songName: s.string("Song name."),
|
|
5
|
+
singerMid: s.string("Singer MID."),
|
|
6
|
+
singerName: s.string("Singer name."),
|
|
7
|
+
};
|
|
8
|
+
const songCounts = s.looseObject("A song listening count.", {
|
|
9
|
+
...songFields,
|
|
10
|
+
sum: s.integer("Number of plays."),
|
|
11
|
+
});
|
|
12
|
+
const singerTimes = s.looseObject("A singer listening duration.", {
|
|
13
|
+
...songFields,
|
|
14
|
+
sum: s.integer("Listening time in seconds."),
|
|
15
|
+
});
|
|
16
|
+
const indexedDuration = s.looseObject("An indexed time-slot value; identify the slot by its array index.", {
|
|
17
|
+
sum: s.integer("Listening duration in seconds."),
|
|
18
|
+
});
|
|
19
|
+
const averageTimes = s.array("Average listening time by time slot; slots are identified by array index.", s.looseObject("Current and recent average listening time for a slot.", {
|
|
20
|
+
currentAverage: indexedDuration,
|
|
21
|
+
nearAverage: indexedDuration,
|
|
22
|
+
}));
|
|
23
|
+
const songMetric = s.looseObject("A monthly song metric.", {
|
|
24
|
+
...songFields,
|
|
25
|
+
sum: s.integer("Provider-defined song metric; units depend on the containing section."),
|
|
26
|
+
});
|
|
27
|
+
const dailyActivity = s.looseObject("A representative song for one day.", {
|
|
28
|
+
...songFields,
|
|
29
|
+
sum: s.integer("Activity flag: 1 means listened on this day, 0 means no listening."),
|
|
30
|
+
});
|
|
31
|
+
const singerStreak = s.looseObject("Singer with the longest listening streak.", {
|
|
32
|
+
...songFields,
|
|
33
|
+
sum: s.integer("Consecutive days listening to this singer."),
|
|
34
|
+
});
|
|
35
|
+
export const dayReport = s.nullable(s.looseObject("Daily listening report.", {
|
|
36
|
+
listenTime: s.integer("Total listening time for this day in seconds."),
|
|
37
|
+
activeHour: s.integer("Active hour of the day, 0 through 23."),
|
|
38
|
+
averageTime: averageTimes,
|
|
39
|
+
singerListen: s.array("Top singers; sum is listening time in seconds.", singerTimes),
|
|
40
|
+
songListen: s.array("Top songs; sum is the play count.", songCounts),
|
|
41
|
+
}));
|
|
42
|
+
export const weekReport = s.nullable(s.looseObject("Weekly listening report.", {
|
|
43
|
+
listenTime: s.integer("Daily average listening time for this week in seconds."),
|
|
44
|
+
floatNumber: s.number("Change ratio compared with last week; positive means an increase."),
|
|
45
|
+
averageTime: averageTimes,
|
|
46
|
+
singerListen: s.array("Top singers; sum is listening time in seconds.", singerTimes),
|
|
47
|
+
songListen: s.array("Top songs; sum is the play count.", songCounts),
|
|
48
|
+
}));
|
|
49
|
+
export const monthReport = s.nullable(s.looseObject("Monthly listening statistics and preferences.", {
|
|
50
|
+
monthDetailList: s.array("Monthly listening details.", s.looseObject("Details for one month.", {
|
|
51
|
+
listenCount: s.integer("Total plays in the month."),
|
|
52
|
+
dataTime: s.string("Month of the data."),
|
|
53
|
+
exportTime: s.string("Data export time."),
|
|
54
|
+
songs: s.array("Songs in the monthly details.", songMetric),
|
|
55
|
+
})),
|
|
56
|
+
topDataList: s.array("Top statistics, one entry per month.", s.looseObject("Top statistics for one month.", {
|
|
57
|
+
selectType: s.integer("Provider data dimension type."),
|
|
58
|
+
month: s.string("Month represented by these statistics."),
|
|
59
|
+
topSinger: s.array("Top singers; sum is listening time in seconds.", singerTimes),
|
|
60
|
+
topSong: s.array("Top songs; sum is the play count.", songCounts),
|
|
61
|
+
favSongMid: s.string("Favorite song MID."),
|
|
62
|
+
favSongName: s.string("Favorite song name."),
|
|
63
|
+
favSingerMid: s.string("Singer MID of the favorite song."),
|
|
64
|
+
favSingerName: s.string("Singer name of the favorite song."),
|
|
65
|
+
repeatSong: s.looseObject("Most repeated song.", {
|
|
66
|
+
...songFields,
|
|
67
|
+
listenDate: s.string("Date of repeated listening."),
|
|
68
|
+
count: s.integer("Repeat count."),
|
|
69
|
+
}),
|
|
70
|
+
midnightSong: s.looseObject("Late-night song.", {
|
|
71
|
+
...songFields,
|
|
72
|
+
month: s.integer("Month number."),
|
|
73
|
+
hour: s.integer("Listening hour, 0 through 23."),
|
|
74
|
+
}),
|
|
75
|
+
})),
|
|
76
|
+
topSinger: s.array("Top singers; sum is listening time in seconds.", singerTimes),
|
|
77
|
+
topSong: s.array("Top songs; sum is the play count.", songCounts),
|
|
78
|
+
preferHour: s.looseObject("Preferred listening hour.", {
|
|
79
|
+
preferHour: s.integer("Preferred hour, 0 through 23."),
|
|
80
|
+
preferInfo: s.array("Listening details indexed by time slot; only sum is populated.", indexedDuration),
|
|
81
|
+
songListen: s.array("Favorite songs in this time slot.", songMetric),
|
|
82
|
+
}),
|
|
83
|
+
consDays: s.looseObject("Consecutive listening statistics.", {
|
|
84
|
+
conDays: s.integer("Consecutive listening days."),
|
|
85
|
+
conInfoList: s.array("Daily listening activity and representative songs.", dailyActivity),
|
|
86
|
+
topListen: s.integer("Maximum song count in one day."),
|
|
87
|
+
singerDay: singerStreak,
|
|
88
|
+
songListen: s.array("Songs during the listening streak.", songMetric),
|
|
89
|
+
}),
|
|
90
|
+
topGenre: s.looseObject("Preferred genres.", {
|
|
91
|
+
genreId: s.integer("Preferred genre ID."),
|
|
92
|
+
genre2Count: s.array("Genre metrics over the past six months.", s.looseObject("A named genre metric.", {
|
|
93
|
+
name: s.string("Genre name."),
|
|
94
|
+
sum: s.integer("Genre occurrence count over the past six months."),
|
|
95
|
+
})),
|
|
96
|
+
genreSong: s.array("Representative songs for the genre.", songMetric),
|
|
97
|
+
}),
|
|
98
|
+
nicheSongs: s.looseObject("Niche and popular music preferences.", {
|
|
99
|
+
nichePercent: s.integer("Niche song percentage, 0 through 100."),
|
|
100
|
+
list: s.array("Representative niche songs.", songMetric),
|
|
101
|
+
hotPercent: s.integer("Popular song percentage, 0 through 100."),
|
|
102
|
+
}),
|
|
103
|
+
newSongs: s.looseObject("New music exploration.", {
|
|
104
|
+
newSongCount: s.integer("New songs explored this month."),
|
|
105
|
+
floatNumber: s.number("Change ratio compared with last month."),
|
|
106
|
+
lastNewSongCount: s.integer("New songs explored last month."),
|
|
107
|
+
list: s.array("Representative newly explored songs.", songMetric),
|
|
108
|
+
}),
|
|
109
|
+
listenCityInfo: s.array("Listening cities ordered by unlock time.", s.looseObject("A listening city.", {
|
|
110
|
+
cityId: s.integer("City ID."),
|
|
111
|
+
cityName: s.string("City name."),
|
|
112
|
+
provinceId: s.integer("Province ID."),
|
|
113
|
+
provinceName: s.string("Province name."),
|
|
114
|
+
countryId: s.integer("Country ID."),
|
|
115
|
+
countryName: s.string("Country name."),
|
|
116
|
+
unlockTime: s.integer("City unlock Unix timestamp in seconds."),
|
|
117
|
+
cityRank: s.integer("City rank."),
|
|
118
|
+
})),
|
|
119
|
+
}));
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { s } from "../../core/json-schema.js";
|
|
2
|
+
import { defineProviderAction } from "../../core/provider-definition.js";
|
|
3
|
+
export const rakurakuSeisanActions = [
|
|
4
|
+
defineProviderAction("rakuraku_seisan", {
|
|
5
|
+
name: "download_journal_file",
|
|
6
|
+
operationType: "read",
|
|
7
|
+
description: "Download the latest automatically generated journal file for an export configuration. Historical files are unavailable. Preserves CSV/TXT MS932 encoding or ZIP bytes in transit storage, up to 64 MiB or the configured storage limit.",
|
|
8
|
+
inputSchema: s.actionInput({ fileGenerateId: s.integer("Automatic file export configuration ID shown in the administration screen.") }, ["fileGenerateId"]),
|
|
9
|
+
outputSchema: s.actionOutput({
|
|
10
|
+
file: s.actionOutput({
|
|
11
|
+
fileId: s.string("Transit file identifier."),
|
|
12
|
+
downloadUrl: s.url("Temporary download URL."),
|
|
13
|
+
name: s.string("Export filename."),
|
|
14
|
+
mimeType: s.string("File MIME type."),
|
|
15
|
+
sizeBytes: s.nonNegativeInteger("File size in bytes."),
|
|
16
|
+
}, "Downloaded journal file in transit storage."),
|
|
17
|
+
}),
|
|
18
|
+
}),
|
|
19
|
+
defineProviderAction("rakuraku_seisan", {
|
|
20
|
+
name: "import_master_csv",
|
|
21
|
+
operationType: "write",
|
|
22
|
+
description: "Schedule a master CSV import from a public URL. Requires MS932 encoding, official column names in the first row, at most 5 MB and 50,000 rows. Creates or updates records without deleting them. Poll get_import_status for completion and failed record counts.",
|
|
23
|
+
inputSchema: s.actionInput({
|
|
24
|
+
fileUrl: s.url("Public URL of the MS932 CSV file, including its header row."),
|
|
25
|
+
masterId: s.integer("Official master ID: 0 employees, 1 departments, 2 positions, 3 payees, 4 projects, 18 approvers, 81-85 general masters. For other supported masters such as exchange rates, use the ID supplied by Rakuraku Seisan."),
|
|
26
|
+
duplicateKey: s.withEnum(s.integer("Duplicate record handling: 0 skip, 1 update. Defaults to 0, or 1 for approvers (masterId 18)."), [0, 1]),
|
|
27
|
+
sendPasswordEmail: s.boolean("Send password setup emails when importing employees. Defaults to false."),
|
|
28
|
+
createCategory: s.boolean("Create missing categories for payees, projects, or general masters. Defaults to false."),
|
|
29
|
+
}, ["fileUrl", "masterId"]),
|
|
30
|
+
outputSchema: s.actionOutput({ processId: s.string("Import process ID used to poll the result.") }),
|
|
31
|
+
asyncLifecycle: {
|
|
32
|
+
startActionId: "rakuraku_seisan.import_master_csv",
|
|
33
|
+
statusActionId: "rakuraku_seisan.get_import_status",
|
|
34
|
+
},
|
|
35
|
+
}),
|
|
36
|
+
defineProviderAction("rakuraku_seisan", {
|
|
37
|
+
name: "get_import_status",
|
|
38
|
+
operationType: "read",
|
|
39
|
+
description: "Get a CSV import result. A complete process may still contain failed records; inspect failureCount and obtain error reports from the Rakuraku Seisan CSV import status screen.",
|
|
40
|
+
inputSchema: s.actionInput({ processId: s.nonEmptyString("Process ID returned by import_master_csv.") }, [
|
|
41
|
+
"processId",
|
|
42
|
+
]),
|
|
43
|
+
outputSchema: s.actionOutput({
|
|
44
|
+
processStatus: s.string("Provider process state: wait, active, complete, abort, or error."),
|
|
45
|
+
successCount: s.nonNegativeInteger("Successfully imported record count, when supplied."),
|
|
46
|
+
failureCount: s.nonNegativeInteger("Failed record count, when supplied."),
|
|
47
|
+
raw: s.unknownObject("Original provider response, including additional fields."),
|
|
48
|
+
}, "CSV import status.", ["processStatus", "raw"]),
|
|
49
|
+
}),
|
|
50
|
+
];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CredentialValidators, ProviderExecutors, ProviderProxyExecutor } from "../../core/types.ts";
|
|
2
|
+
export declare const executors: ProviderExecutors;
|
|
3
|
+
export declare const credentialValidators: CredentialValidators;
|
|
4
|
+
export declare const proxy: ProviderProxyExecutor;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineProviderExecutors, defineProviderProxy, requireApiKeyCredential, mapProviderActionHandlers, requiredInputString, } from "../provider-runtime.js";
|
|
2
|
+
import { rakurakuSeisanActions } from "./actions.js";
|
|
3
|
+
import { normalizeBaseUrl, executeRakurakuSeisanAction, readRakurakuError } from "./runtime.js";
|
|
4
|
+
export const executors = defineProviderExecutors({
|
|
5
|
+
service: "rakuraku_seisan",
|
|
6
|
+
handlers: mapProviderActionHandlers("rakuraku_seisan", rakurakuSeisanActions, (action) => (input, context) => executeRakurakuSeisanAction(action.name, input, context)),
|
|
7
|
+
async createContext(context, fetcher) {
|
|
8
|
+
const credential = await requireApiKeyCredential(context, "rakuraku_seisan");
|
|
9
|
+
return {
|
|
10
|
+
apiKey: credential.apiKey,
|
|
11
|
+
baseUrl: normalizeBaseUrl(credential.values.baseUrl),
|
|
12
|
+
fetcher,
|
|
13
|
+
signal: context.signal,
|
|
14
|
+
transitFiles: context.transitFiles,
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
export const credentialValidators = {
|
|
19
|
+
async apiKey(input) {
|
|
20
|
+
requiredInputString(input.apiKey, "apiKey");
|
|
21
|
+
const baseUrl = normalizeBaseUrl(input.values.baseUrl);
|
|
22
|
+
return {
|
|
23
|
+
profile: {
|
|
24
|
+
accountId: baseUrl,
|
|
25
|
+
displayName: `Rakuraku Seisan ${new URL(baseUrl).host}${new URL(baseUrl).pathname}`,
|
|
26
|
+
},
|
|
27
|
+
grantedScopes: [],
|
|
28
|
+
metadata: { baseUrl, credentialValidation: "on_first_request" },
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
export const proxy = defineProviderProxy({
|
|
33
|
+
service: "rakuraku_seisan",
|
|
34
|
+
async baseUrl(context) {
|
|
35
|
+
const credential = await requireApiKeyCredential(context, "rakuraku_seisan");
|
|
36
|
+
return `${normalizeBaseUrl(credential.values.baseUrl)}/api/v1`;
|
|
37
|
+
},
|
|
38
|
+
auth: { type: "api_key_header", name: "X-RS-apitoken" },
|
|
39
|
+
readError: readRakurakuError,
|
|
40
|
+
});
|