@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,8 @@
|
|
|
1
|
+
import type { ApiKeyProviderContext } from "../provider-runtime.ts";
|
|
2
|
+
import { ProviderRequestError } from "../provider-runtime.ts";
|
|
3
|
+
export interface RakurakuContext extends ApiKeyProviderContext {
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function normalizeBaseUrl(value: unknown): string;
|
|
7
|
+
export declare function executeRakurakuSeisanAction(action: string, input: Record<string, unknown>, context: RakurakuContext): Promise<unknown>;
|
|
8
|
+
export declare function readRakurakuError(response: Response): Promise<ProviderRequestError>;
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { optionalRecord, optionalString, looseArray } from "../../core/cast.js";
|
|
2
|
+
import { assertPublicHttpUrl, readBoundedResponseBytes, storeResponseInTransit } from "../../core/request.js";
|
|
3
|
+
import { ProviderRequestError, providerInputError, providerResponseError, providerFetch, requiredInputString, requiredResponseRecord, runProviderRequest, } from "../provider-runtime.js";
|
|
4
|
+
export function normalizeBaseUrl(value) {
|
|
5
|
+
const raw = requiredInputString(value, "baseUrl");
|
|
6
|
+
let url;
|
|
7
|
+
try {
|
|
8
|
+
url = new URL(raw);
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
throw providerInputError("baseUrl must be a valid HTTPS company URL");
|
|
12
|
+
}
|
|
13
|
+
const segments = url.pathname.split("/").filter(Boolean);
|
|
14
|
+
if (url.protocol !== "https:" ||
|
|
15
|
+
url.username ||
|
|
16
|
+
url.password ||
|
|
17
|
+
url.search ||
|
|
18
|
+
url.hash ||
|
|
19
|
+
segments.length !== 1 ||
|
|
20
|
+
segments[0]?.includes("%"))
|
|
21
|
+
throw providerInputError("baseUrl must be an HTTPS company URL with one account path and no credentials, query, or fragment");
|
|
22
|
+
assertPublicHttpUrl(url.toString(), { fieldName: "baseUrl", createError: providerInputError });
|
|
23
|
+
return `${url.origin}/${segments[0]}`;
|
|
24
|
+
}
|
|
25
|
+
function parsePayload(bytes) {
|
|
26
|
+
try {
|
|
27
|
+
return requiredResponseRecord(JSON.parse(new TextDecoder().decode(bytes)), "Rakuraku Seisan response");
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
if (error instanceof ProviderRequestError)
|
|
31
|
+
throw error;
|
|
32
|
+
throw providerResponseError("Rakuraku Seisan returned invalid JSON");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function checkResponse(response, bytes) {
|
|
36
|
+
const prefix = new TextDecoder().decode(bytes.subarray(0, 1024)).trimStart();
|
|
37
|
+
if (prefix.split("\n", 1)[0]?.includes("Status: 503 Maintenance mode"))
|
|
38
|
+
throw new ProviderRequestError(503, "Rakuraku Seisan is under maintenance", undefined, "provider_error");
|
|
39
|
+
const isJson = response.headers.get("content-type")?.includes("json") || prefix.startsWith("{");
|
|
40
|
+
if (!response.ok || isJson) {
|
|
41
|
+
const payload = isJson ? parsePayload(bytes) : undefined;
|
|
42
|
+
if (!response.ok || payload?.status === "error") {
|
|
43
|
+
const errors = optionalRecord(payload?.errors);
|
|
44
|
+
const code = optionalString(errors?.code);
|
|
45
|
+
const details = looseArray(errors?.description)
|
|
46
|
+
.map((value) => {
|
|
47
|
+
const detail = optionalRecord(value);
|
|
48
|
+
return [optionalString(detail?.name), optionalString(detail?.msg)].filter(Boolean).join(": ");
|
|
49
|
+
})
|
|
50
|
+
.filter(Boolean)
|
|
51
|
+
.join("; ");
|
|
52
|
+
const message = `Rakuraku Seisan: ${optionalString(errors?.msg) ?? `HTTP ${response.status}`}${code ? ` (code ${code})` : ""}${details ? `: ${details}` : ""}`;
|
|
53
|
+
throw new ProviderRequestError(response.ok ? 502 : response.status, message, undefined, response.status === 401 && code === "1"
|
|
54
|
+
? "authorization_failed"
|
|
55
|
+
: response.status === 429
|
|
56
|
+
? "rate_limited"
|
|
57
|
+
: "provider_error");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (prefix.startsWith("<"))
|
|
61
|
+
throw providerResponseError("Rakuraku Seisan returned HTML instead of API data");
|
|
62
|
+
}
|
|
63
|
+
async function readApiResponse(response, signal) {
|
|
64
|
+
const bytes = await readBoundedResponseBytes(response, {
|
|
65
|
+
maxBytes: 1024 * 1024,
|
|
66
|
+
fieldName: "Rakuraku Seisan response",
|
|
67
|
+
createError: providerResponseError,
|
|
68
|
+
signal,
|
|
69
|
+
});
|
|
70
|
+
checkResponse(response, bytes);
|
|
71
|
+
return parsePayload(bytes);
|
|
72
|
+
}
|
|
73
|
+
/** Inspect a small prefix without buffering the journal export. */
|
|
74
|
+
async function journalResponse(response, signal) {
|
|
75
|
+
if (!response.ok || response.headers.get("content-type")?.includes("json")) {
|
|
76
|
+
await readApiResponse(response, signal);
|
|
77
|
+
throw providerResponseError("Rakuraku Seisan returned JSON instead of a journal file");
|
|
78
|
+
}
|
|
79
|
+
if (!response.body)
|
|
80
|
+
return response;
|
|
81
|
+
const reader = response.body.getReader();
|
|
82
|
+
const chunks = [];
|
|
83
|
+
let size = 0;
|
|
84
|
+
let done = false;
|
|
85
|
+
let isJson = false;
|
|
86
|
+
try {
|
|
87
|
+
while (size < 1024) {
|
|
88
|
+
signal.throwIfAborted();
|
|
89
|
+
const next = await reader.read();
|
|
90
|
+
if (next.done) {
|
|
91
|
+
done = true;
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
chunks.push(next.value);
|
|
95
|
+
size += next.value.byteLength;
|
|
96
|
+
}
|
|
97
|
+
const prefix = new Uint8Array(Math.min(size, 1024));
|
|
98
|
+
let offset = 0;
|
|
99
|
+
for (const chunk of chunks) {
|
|
100
|
+
const part = chunk.subarray(0, prefix.length - offset);
|
|
101
|
+
prefix.set(part, offset);
|
|
102
|
+
offset += part.length;
|
|
103
|
+
}
|
|
104
|
+
const text = new TextDecoder().decode(prefix).trimStart();
|
|
105
|
+
isJson = text.startsWith("{");
|
|
106
|
+
if (!isJson)
|
|
107
|
+
checkResponse(response, prefix);
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
await reader.cancel().catch(() => undefined);
|
|
111
|
+
reader.releaseLock();
|
|
112
|
+
throw error;
|
|
113
|
+
}
|
|
114
|
+
const replay = new Response(new ReadableStream({
|
|
115
|
+
async pull(controller) {
|
|
116
|
+
try {
|
|
117
|
+
signal.throwIfAborted();
|
|
118
|
+
const buffered = chunks.shift();
|
|
119
|
+
if (buffered) {
|
|
120
|
+
controller.enqueue(buffered);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (done) {
|
|
124
|
+
reader.releaseLock();
|
|
125
|
+
controller.close();
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const next = await reader.read();
|
|
129
|
+
if (next.done) {
|
|
130
|
+
reader.releaseLock();
|
|
131
|
+
controller.close();
|
|
132
|
+
}
|
|
133
|
+
else
|
|
134
|
+
controller.enqueue(next.value);
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
await reader.cancel().catch(() => undefined);
|
|
138
|
+
reader.releaseLock();
|
|
139
|
+
controller.error(error);
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
async cancel(reason) {
|
|
143
|
+
await reader.cancel(reason);
|
|
144
|
+
reader.releaseLock();
|
|
145
|
+
},
|
|
146
|
+
}), { headers: response.headers, status: response.status });
|
|
147
|
+
if (isJson) {
|
|
148
|
+
await readApiResponse(replay, signal);
|
|
149
|
+
throw providerResponseError("Rakuraku Seisan returned JSON instead of a journal file");
|
|
150
|
+
}
|
|
151
|
+
return replay;
|
|
152
|
+
}
|
|
153
|
+
export async function executeRakurakuSeisanAction(action, input, context) {
|
|
154
|
+
return runProviderRequest({
|
|
155
|
+
label: "Rakuraku Seisan",
|
|
156
|
+
signal: context.signal,
|
|
157
|
+
timeoutMs: action === "download_journal_file" ? 300_000 : undefined,
|
|
158
|
+
}, async (signal) => {
|
|
159
|
+
const request = (path, body) => context.fetcher(`${context.baseUrl}/api/v1/${path}`, {
|
|
160
|
+
method: body ? "POST" : "GET",
|
|
161
|
+
headers: { "X-RS-apitoken": context.apiKey },
|
|
162
|
+
body,
|
|
163
|
+
signal,
|
|
164
|
+
redirect: "manual",
|
|
165
|
+
});
|
|
166
|
+
if (action === "download_journal_file") {
|
|
167
|
+
if (!context.transitFiles)
|
|
168
|
+
throw new ProviderRequestError(503, "Journal downloads require configured transit storage", undefined, "provider_error");
|
|
169
|
+
const response = await journalResponse(await request(`fileGenerate/${input.fileGenerateId}/result`), signal);
|
|
170
|
+
const filename = (response.headers.get("content-disposition") ?? "")
|
|
171
|
+
.split(";")
|
|
172
|
+
.map((part) => part.trim())
|
|
173
|
+
.find((part) => part.startsWith("filename="))
|
|
174
|
+
?.slice(9)
|
|
175
|
+
.split('"')
|
|
176
|
+
.join("");
|
|
177
|
+
const name = filename?.split("/").pop()?.split("\\").pop() || `journal-${input.fileGenerateId}.dat`;
|
|
178
|
+
const mimeType = response.headers.get("content-type")?.split(";", 1)[0] ?? "application/octet-stream";
|
|
179
|
+
return {
|
|
180
|
+
file: await storeResponseInTransit(response, context.transitFiles, {
|
|
181
|
+
name,
|
|
182
|
+
mimeType,
|
|
183
|
+
maxBytes: 64 * 1024 * 1024,
|
|
184
|
+
fieldName: "Rakuraku Seisan file",
|
|
185
|
+
createError: providerResponseError,
|
|
186
|
+
signal,
|
|
187
|
+
}),
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
if (action === "import_master_csv") {
|
|
191
|
+
if (input.masterId === 18 && input.duplicateKey === 0)
|
|
192
|
+
throw providerInputError("Approver imports require duplicateKey 1");
|
|
193
|
+
const source = await providerFetch(requiredInputString(input.fileUrl, "fileUrl"), { signal });
|
|
194
|
+
if (!source.ok) {
|
|
195
|
+
await source.body?.cancel();
|
|
196
|
+
throw new ProviderRequestError(source.status, `CSV download failed with HTTP ${source.status}`, undefined, "provider_error");
|
|
197
|
+
}
|
|
198
|
+
const bytes = await readBoundedResponseBytes(source, {
|
|
199
|
+
maxBytes: 5 * 1024 * 1024,
|
|
200
|
+
fieldName: "Rakuraku Seisan CSV",
|
|
201
|
+
createError: providerResponseError,
|
|
202
|
+
signal,
|
|
203
|
+
});
|
|
204
|
+
if (!bytes.byteLength)
|
|
205
|
+
throw providerInputError("CSV file must not be empty");
|
|
206
|
+
const body = new FormData();
|
|
207
|
+
body.set("json", JSON.stringify({
|
|
208
|
+
masterId: input.masterId,
|
|
209
|
+
duplicateKey: input.duplicateKey ?? (input.masterId === 18 ? 1 : 0),
|
|
210
|
+
sendPasswordEmail: input.sendPasswordEmail ? 1 : 0,
|
|
211
|
+
createCategory: input.createCategory ? 1 : 0,
|
|
212
|
+
}));
|
|
213
|
+
body.set("uploadFile", new Blob([Uint8Array.from(bytes)], { type: "application/octet-stream" }), "import.csv");
|
|
214
|
+
const payload = await readApiResponse(await request("csvimport", body), signal);
|
|
215
|
+
const processId = optionalString(payload.processId);
|
|
216
|
+
if (!processId)
|
|
217
|
+
throw providerResponseError("Rakuraku Seisan response is missing processId");
|
|
218
|
+
return { processId };
|
|
219
|
+
}
|
|
220
|
+
const payload = await readApiResponse(await request(`csvimportprocess/${encodeURIComponent(requiredInputString(input.processId, "processId"))}`), signal);
|
|
221
|
+
const processStatus = optionalString(payload.processStatus);
|
|
222
|
+
if (!processStatus)
|
|
223
|
+
throw providerResponseError("Rakuraku Seisan response is missing processStatus");
|
|
224
|
+
const items = optionalRecord(payload.items);
|
|
225
|
+
return {
|
|
226
|
+
processStatus,
|
|
227
|
+
successCount: readCount(items?.successCount),
|
|
228
|
+
failureCount: readCount(items?.failureCount),
|
|
229
|
+
raw: payload,
|
|
230
|
+
};
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
function readCount(value) {
|
|
234
|
+
if (value === undefined || value === null)
|
|
235
|
+
return undefined;
|
|
236
|
+
const number = typeof value === "number" ? value : Number(optionalString(value));
|
|
237
|
+
if (!Number.isInteger(number) || number < 0 || value === "")
|
|
238
|
+
throw providerResponseError("Rakuraku Seisan returned an invalid import count");
|
|
239
|
+
return number;
|
|
240
|
+
}
|
|
241
|
+
export async function readRakurakuError(response) {
|
|
242
|
+
try {
|
|
243
|
+
await readApiResponse(response);
|
|
244
|
+
}
|
|
245
|
+
catch (error) {
|
|
246
|
+
if (error instanceof ProviderRequestError)
|
|
247
|
+
return error;
|
|
248
|
+
throw error;
|
|
249
|
+
}
|
|
250
|
+
return new ProviderRequestError(response.status, "Rakuraku Seisan request failed", undefined, "provider_error");
|
|
251
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsonSchema as s } from "../../core/json-schema.js";
|
|
2
|
+
import { defineProviderAction } from "../../core/provider-definition.js";
|
|
3
|
+
import { responseSchema } from "./schemas.js";
|
|
4
|
+
export const accountActions = [
|
|
5
|
+
defineProviderAction("redfox", {
|
|
6
|
+
name: "get_account_balance",
|
|
7
|
+
operationType: "read",
|
|
8
|
+
description: "Get the points balance associated with the connected RedFoxHub API key.",
|
|
9
|
+
requiredScopes: [],
|
|
10
|
+
inputSchema: s.requiredObject("Request parameters.", {}),
|
|
11
|
+
outputSchema: responseSchema,
|
|
12
|
+
}),
|
|
13
|
+
defineProviderAction("redfox", {
|
|
14
|
+
name: "list_api_usage",
|
|
15
|
+
operationType: "read",
|
|
16
|
+
description: "List API consumption records associated with the connected RedFoxHub API key.",
|
|
17
|
+
requiredScopes: [],
|
|
18
|
+
inputSchema: s.object("Request parameters.", {
|
|
19
|
+
pageNum: s.nonEmptyString("Page number, starting at 1."),
|
|
20
|
+
pageSize: s.nonEmptyString("Number of results per page."),
|
|
21
|
+
}, { optional: ["pageNum", "pageSize"] }),
|
|
22
|
+
outputSchema: responseSchema,
|
|
23
|
+
}),
|
|
24
|
+
];
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsonSchema as s } from "../../core/json-schema.js";
|
|
2
|
+
import { defineProviderAction } from "../../core/provider-definition.js";
|
|
3
|
+
import { responseSchema } from "./schemas.js";
|
|
4
|
+
export const autohomeActions = [
|
|
5
|
+
defineProviderAction("redfox", {
|
|
6
|
+
name: "search_autohome_works",
|
|
7
|
+
operationType: "read",
|
|
8
|
+
description: "Search Autohome posts by keyword.",
|
|
9
|
+
requiredScopes: [],
|
|
10
|
+
inputSchema: s.requiredObject("Request parameters.", {
|
|
11
|
+
keyword: s.nonEmptyString("Search keyword."),
|
|
12
|
+
offset: s.nonEmptyString("Pagination offset. Start with 0 and increase by 10."),
|
|
13
|
+
page: s.nonEmptyString("Page number, starting at 1."),
|
|
14
|
+
sourceType: s.stringEnum("Content source type.", ["club", "article", "video"]),
|
|
15
|
+
}),
|
|
16
|
+
outputSchema: responseSchema,
|
|
17
|
+
}),
|
|
18
|
+
defineProviderAction("redfox", {
|
|
19
|
+
name: "get_autohome_article",
|
|
20
|
+
operationType: "read",
|
|
21
|
+
description: "Get the content and metadata of an Autohome article.",
|
|
22
|
+
requiredScopes: [],
|
|
23
|
+
inputSchema: s.object("Request parameters.", {
|
|
24
|
+
workId: s.nonEmptyString("Work ID."),
|
|
25
|
+
page: s.withDefault(s.integer("Page number, starting at 0.", { minimum: 0 }), 0),
|
|
26
|
+
}, { optional: ["page"] }),
|
|
27
|
+
outputSchema: responseSchema,
|
|
28
|
+
}),
|
|
29
|
+
defineProviderAction("redfox", {
|
|
30
|
+
name: "get_autohome_video",
|
|
31
|
+
operationType: "read",
|
|
32
|
+
description: "Get details of an Autohome video.",
|
|
33
|
+
requiredScopes: [],
|
|
34
|
+
inputSchema: s.requiredObject("Request parameters.", {
|
|
35
|
+
videoId: s.nonEmptyString("Video ID."),
|
|
36
|
+
videoType: s.withEnum(s.integer("Video type: 0 = original account, 4 = Chejiahao."), [0, 4]),
|
|
37
|
+
}),
|
|
38
|
+
outputSchema: responseSchema,
|
|
39
|
+
}),
|
|
40
|
+
defineProviderAction("redfox", {
|
|
41
|
+
name: "list_autohome_user_works",
|
|
42
|
+
operationType: "read",
|
|
43
|
+
description: "List posts published by an Autohome account.",
|
|
44
|
+
requiredScopes: [],
|
|
45
|
+
inputSchema: s.object("Request parameters.", {
|
|
46
|
+
authorId: s.nonEmptyString("Author ID."),
|
|
47
|
+
page: s.withDefault(s.integer("Page number, starting at 0.", { minimum: 0 }), 0),
|
|
48
|
+
}, { optional: ["page"] }),
|
|
49
|
+
outputSchema: responseSchema,
|
|
50
|
+
}),
|
|
51
|
+
];
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsonSchema as s } from "../../core/json-schema.js";
|
|
2
|
+
import { defineProviderAction } from "../../core/provider-definition.js";
|
|
3
|
+
import { responseSchema } from "./schemas.js";
|
|
4
|
+
export const baijiahaoActions = [
|
|
5
|
+
defineProviderAction("redfox", {
|
|
6
|
+
name: "get_baijiahao_article",
|
|
7
|
+
operationType: "read",
|
|
8
|
+
description: "Get the content and metadata of a Baijiahao article.",
|
|
9
|
+
requiredScopes: [],
|
|
10
|
+
inputSchema: s.requiredObject("Request parameters.", {
|
|
11
|
+
articleId: s.nonEmptyString("Article ID."),
|
|
12
|
+
}),
|
|
13
|
+
outputSchema: responseSchema,
|
|
14
|
+
}),
|
|
15
|
+
defineProviderAction("redfox", {
|
|
16
|
+
name: "get_baijiahao_video",
|
|
17
|
+
operationType: "read",
|
|
18
|
+
description: "Get details of a Baijiahao video.",
|
|
19
|
+
requiredScopes: [],
|
|
20
|
+
inputSchema: s.requiredObject("Request parameters.", {
|
|
21
|
+
svId: s.nonEmptyString("Baijiahao video ID."),
|
|
22
|
+
}),
|
|
23
|
+
outputSchema: responseSchema,
|
|
24
|
+
}),
|
|
25
|
+
defineProviderAction("redfox", {
|
|
26
|
+
name: "get_baijiahao_user",
|
|
27
|
+
operationType: "read",
|
|
28
|
+
description: "Get details of a Baijiahao account.",
|
|
29
|
+
requiredScopes: [],
|
|
30
|
+
inputSchema: s.requiredObject("Request parameters.", {
|
|
31
|
+
uk: s.nonEmptyString("Baijiahao account uk identifier."),
|
|
32
|
+
}),
|
|
33
|
+
outputSchema: responseSchema,
|
|
34
|
+
}),
|
|
35
|
+
defineProviderAction("redfox", {
|
|
36
|
+
name: "search_baijiahao_works",
|
|
37
|
+
operationType: "read",
|
|
38
|
+
description: "Search Baijiahao posts by keyword.",
|
|
39
|
+
requiredScopes: [],
|
|
40
|
+
inputSchema: s.object("Request parameters.", {
|
|
41
|
+
sort: s.nonEmptyString("Sort order."),
|
|
42
|
+
pn: s.nonEmptyString("Pagination offset. Start with 0 and increase by 10."),
|
|
43
|
+
keyWord: s.nonEmptyString("Search keyword."),
|
|
44
|
+
}, { optional: ["sort"] }),
|
|
45
|
+
outputSchema: responseSchema,
|
|
46
|
+
}),
|
|
47
|
+
defineProviderAction("redfox", {
|
|
48
|
+
name: "search_baijiahao_users",
|
|
49
|
+
operationType: "read",
|
|
50
|
+
description: "Search Baijiahao accounts by keyword.",
|
|
51
|
+
requiredScopes: [],
|
|
52
|
+
inputSchema: s.requiredObject("Request parameters.", {
|
|
53
|
+
page: s.nonEmptyString("Page cursor encoded as a string. Start with 0, then use the page returned by the previous response."),
|
|
54
|
+
keyword: s.nonEmptyString("Search keyword."),
|
|
55
|
+
}),
|
|
56
|
+
outputSchema: responseSchema,
|
|
57
|
+
}),
|
|
58
|
+
];
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsonSchema as s } from "../../core/json-schema.js";
|
|
2
|
+
import { defineProviderAction } from "../../core/provider-definition.js";
|
|
3
|
+
import { responseSchema } from "./schemas.js";
|
|
4
|
+
export const bilibiliActions = [
|
|
5
|
+
defineProviderAction("redfox", {
|
|
6
|
+
name: "get_bilibili_work",
|
|
7
|
+
operationType: "read",
|
|
8
|
+
description: "Get a Bilibili work by its BV ID or URL. Uses the curated database. Data is updated on a T+1 schedule, not in real time.",
|
|
9
|
+
requiredScopes: [],
|
|
10
|
+
inputSchema: s.requireAnyProperty(s.object("Request parameters.", {
|
|
11
|
+
bvId: s.nonEmptyString("Bilibili BV ID."),
|
|
12
|
+
workUrl: s.nonEmptyString("Work URL."),
|
|
13
|
+
}, { optional: ["bvId", "workUrl"] }), ["bvId", "workUrl"]),
|
|
14
|
+
outputSchema: responseSchema,
|
|
15
|
+
}),
|
|
16
|
+
defineProviderAction("redfox", {
|
|
17
|
+
name: "get_bilibili_user",
|
|
18
|
+
operationType: "read",
|
|
19
|
+
description: "Get details about a Bilibili account. Uses the curated database. Data is updated on a T+1 schedule, not in real time.",
|
|
20
|
+
requiredScopes: [],
|
|
21
|
+
inputSchema: s.requiredObject("Request parameters.", {
|
|
22
|
+
mid: s.nonEmptyString("Bilibili user MID."),
|
|
23
|
+
}),
|
|
24
|
+
outputSchema: responseSchema,
|
|
25
|
+
}),
|
|
26
|
+
defineProviderAction("redfox", {
|
|
27
|
+
name: "search_bilibili_users",
|
|
28
|
+
operationType: "read",
|
|
29
|
+
description: "Search Bilibili accounts by keyword. Uses the curated database. Data is updated on a T+1 schedule, not in real time.",
|
|
30
|
+
requiredScopes: [],
|
|
31
|
+
inputSchema: s.object("Request parameters.", {
|
|
32
|
+
keyword: s.nonEmptyString("Search keyword."),
|
|
33
|
+
page: s.nonEmptyString("Page number, starting at 1."),
|
|
34
|
+
pageSize: s.integer("Number of results per page.", { minimum: 1, maximum: 50 }),
|
|
35
|
+
order: s.stringEnum("Sort order.", ["follower", "like"]),
|
|
36
|
+
}, { optional: ["pageSize", "order"] }),
|
|
37
|
+
outputSchema: responseSchema,
|
|
38
|
+
}),
|
|
39
|
+
defineProviderAction("redfox", {
|
|
40
|
+
name: "search_bilibili_works",
|
|
41
|
+
operationType: "read",
|
|
42
|
+
description: "Search Bilibili works by keyword. Uses the curated database. Data is updated on a T+1 schedule, not in real time.",
|
|
43
|
+
requiredScopes: [],
|
|
44
|
+
inputSchema: s.object("Request parameters.", {
|
|
45
|
+
keyword: s.nonEmptyString("Search keyword."),
|
|
46
|
+
exactMatch: s.boolean("Require the entire keyword phrase in the title, summary, content or author instead of token matching."),
|
|
47
|
+
page: s.nonEmptyString("Page number, starting at 1."),
|
|
48
|
+
pageSize: s.integer("Number of results per page.", { minimum: 1, maximum: 50 }),
|
|
49
|
+
order: s.stringEnum("Sort order.", ["time", "play", "like", "comment", "favorite"]),
|
|
50
|
+
}, { optional: ["exactMatch", "pageSize", "order"] }),
|
|
51
|
+
outputSchema: responseSchema,
|
|
52
|
+
}),
|
|
53
|
+
defineProviderAction("redfox", {
|
|
54
|
+
name: "list_bilibili_user_works",
|
|
55
|
+
operationType: "read",
|
|
56
|
+
description: "List works published by a Bilibili account. Uses the curated database. Data is updated on a T+1 schedule, not in real time.",
|
|
57
|
+
requiredScopes: [],
|
|
58
|
+
inputSchema: s.requireAnyProperty(s.object("Request parameters.", {
|
|
59
|
+
mid: s.nonEmptyString("Bilibili user MID."),
|
|
60
|
+
accountUrl: s.nonEmptyString("Account profile URL."),
|
|
61
|
+
page: s.integer("Page number, starting at 1.", { minimum: 1 }),
|
|
62
|
+
pageSize: s.integer("Number of results per page.", { minimum: 1, maximum: 50 }),
|
|
63
|
+
order: s.stringEnum("Sort order.", ["time", "play", "like"]),
|
|
64
|
+
}, { optional: ["mid", "accountUrl", "page", "pageSize", "order"] }), ["mid", "accountUrl"]),
|
|
65
|
+
outputSchema: responseSchema,
|
|
66
|
+
}),
|
|
67
|
+
];
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsonSchema as s } from "../../core/json-schema.js";
|
|
2
|
+
import { defineProviderAction } from "../../core/provider-definition.js";
|
|
3
|
+
import { responseSchema } from "./schemas.js";
|
|
4
|
+
export const dongchediActions = [
|
|
5
|
+
defineProviderAction("redfox", {
|
|
6
|
+
name: "search_dongchedi_works",
|
|
7
|
+
operationType: "read",
|
|
8
|
+
description: "Search Dongchedi posts by keyword.",
|
|
9
|
+
requiredScopes: [],
|
|
10
|
+
inputSchema: s.requiredObject("Request parameters.", {
|
|
11
|
+
keyword: s.nonEmptyString("Search keyword."),
|
|
12
|
+
offset: s.nonEmptyString("Pagination offset. Start with 0 and increase by 20."),
|
|
13
|
+
sourceType: s.stringEnum("Content source type.", ["1", "2"]),
|
|
14
|
+
}),
|
|
15
|
+
outputSchema: responseSchema,
|
|
16
|
+
}),
|
|
17
|
+
defineProviderAction("redfox", {
|
|
18
|
+
name: "get_dongchedi_work",
|
|
19
|
+
operationType: "read",
|
|
20
|
+
description: "Get details of a Dongchedi post.",
|
|
21
|
+
requiredScopes: [],
|
|
22
|
+
inputSchema: s.requiredObject("Request parameters.", {
|
|
23
|
+
workId: s.nonEmptyString("Work ID."),
|
|
24
|
+
workType: s.stringEnum("Work type: video or article.", ["video", "article"]),
|
|
25
|
+
}),
|
|
26
|
+
outputSchema: responseSchema,
|
|
27
|
+
}),
|
|
28
|
+
defineProviderAction("redfox", {
|
|
29
|
+
name: "search_dongchedi_users",
|
|
30
|
+
operationType: "read",
|
|
31
|
+
description: "Search Dongchedi accounts by keyword.",
|
|
32
|
+
requiredScopes: [],
|
|
33
|
+
inputSchema: s.object("Request parameters.", {
|
|
34
|
+
keyword: s.nonEmptyString("Search keyword."),
|
|
35
|
+
offset: s.withDefault(s.integer("Pagination offset. Start with 0 and use the offset or next cursor returned by the previous response.", { minimum: 0 }), 0),
|
|
36
|
+
}, { optional: ["offset"] }),
|
|
37
|
+
outputSchema: responseSchema,
|
|
38
|
+
}),
|
|
39
|
+
defineProviderAction("redfox", {
|
|
40
|
+
name: "get_dongchedi_user_works",
|
|
41
|
+
operationType: "read",
|
|
42
|
+
description: "List posts published by a Dongchedi account.",
|
|
43
|
+
requiredScopes: [],
|
|
44
|
+
inputSchema: s.requiredObject("Request parameters.", {
|
|
45
|
+
userId: s.nonEmptyString("User ID."),
|
|
46
|
+
}),
|
|
47
|
+
outputSchema: responseSchema,
|
|
48
|
+
}),
|
|
49
|
+
];
|