@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
|
@@ -27,6 +27,7 @@ export const executorModules = {
|
|
|
27
27
|
affinity: () => import("./affinity/executors.js"),
|
|
28
28
|
aftership: () => import("./aftership/executors.js"),
|
|
29
29
|
agent_mail: () => import("./agent_mail/executors.js"),
|
|
30
|
+
agentearth: () => import("./agentearth/executors.js"),
|
|
30
31
|
agentql: () => import("./agentql/executors.js"),
|
|
31
32
|
agenty: () => import("./agenty/executors.js"),
|
|
32
33
|
agiled: () => import("./agiled/executors.js"),
|
|
@@ -90,6 +91,7 @@ export const executorModules = {
|
|
|
90
91
|
appcircle: () => import("./appcircle/executors.js"),
|
|
91
92
|
appcues: () => import("./appcues/executors.js"),
|
|
92
93
|
appdrag: () => import("./appdrag/executors.js"),
|
|
94
|
+
appgrowing_mcp: () => import("./appgrowing_mcp/executors.js"),
|
|
93
95
|
apple_ads: () => import("./apple_ads/executors.js"),
|
|
94
96
|
apple_maps: () => import("./apple_maps/executors.js"),
|
|
95
97
|
apple_notary: () => import("./apple_notary/executors.js"),
|
|
@@ -97,6 +99,7 @@ export const executorModules = {
|
|
|
97
99
|
appstle_subscriptions: () => import("./appstle_subscriptions/executors.js"),
|
|
98
100
|
appveyor: () => import("./appveyor/executors.js"),
|
|
99
101
|
arcgis_online: () => import("./arcgis_online/executors.js"),
|
|
102
|
+
arcmira: () => import("./arcmira/executors.js"),
|
|
100
103
|
aroflo: () => import("./aroflo/executors.js"),
|
|
101
104
|
arxiv: () => import("./arxiv/executors.js"),
|
|
102
105
|
asana: () => import("./asana/executors.js"),
|
|
@@ -121,6 +124,7 @@ export const executorModules = {
|
|
|
121
124
|
ayrshare: () => import("./ayrshare/executors.js"),
|
|
122
125
|
baidu_maps: () => import("./baidu_maps/executors.js"),
|
|
123
126
|
baidu_netdisk: () => import("./baidu_netdisk/executors.js"),
|
|
127
|
+
bainiu: () => import("./bainiu/executors.js"),
|
|
124
128
|
baixiao: () => import("./baixiao/executors.js"),
|
|
125
129
|
baizhi_mcp: () => import("./baizhi_mcp/executors.js"),
|
|
126
130
|
balldontlie_worldcup: () => import("./balldontlie_worldcup/executors.js"),
|
|
@@ -229,6 +233,7 @@ export const executorModules = {
|
|
|
229
233
|
central_station_crm: () => import("./central_station_crm/executors.js"),
|
|
230
234
|
certifier: () => import("./certifier/executors.js"),
|
|
231
235
|
certn: () => import("./certn/executors.js"),
|
|
236
|
+
chaport: () => import("./chaport/executors.js"),
|
|
232
237
|
chargebee: () => import("./chargebee/executors.js"),
|
|
233
238
|
chargeblast: () => import("./chargeblast/executors.js"),
|
|
234
239
|
chargify: () => import("./chargify/executors.js"),
|
|
@@ -278,6 +283,7 @@ export const executorModules = {
|
|
|
278
283
|
cloudflare_worker: () => import("./cloudflare_worker/executors.js"),
|
|
279
284
|
cloudinary: () => import("./cloudinary/executors.js"),
|
|
280
285
|
cloudlayer: () => import("./cloudlayer/executors.js"),
|
|
286
|
+
cnb: () => import("./cnb/executors.js"),
|
|
281
287
|
cochrane: () => import("./cochrane/executors.js"),
|
|
282
288
|
cockroach_labs: () => import("./cockroach_labs/executors.js"),
|
|
283
289
|
coda: () => import("./coda/executors.js"),
|
|
@@ -330,6 +336,7 @@ export const executorModules = {
|
|
|
330
336
|
cronlytic: () => import("./cronlytic/executors.js"),
|
|
331
337
|
crossref: () => import("./crossref/executors.js"),
|
|
332
338
|
crowdin: () => import("./crowdin/executors.js"),
|
|
339
|
+
crtsh: () => import("./crtsh/executors.js"),
|
|
333
340
|
crunchbase: () => import("./crunchbase/executors.js"),
|
|
334
341
|
crustdata: () => import("./crustdata/executors.js"),
|
|
335
342
|
crypto_apis: () => import("./crypto_apis/executors.js"),
|
|
@@ -426,6 +433,7 @@ export const executorModules = {
|
|
|
426
433
|
dynatrace: () => import("./dynatrace/executors.js"),
|
|
427
434
|
e2b: () => import("./e2b/executors.js"),
|
|
428
435
|
eagle_doc: () => import("./eagle_doc/executors.js"),
|
|
436
|
+
eastmoney_miaoxiang: () => import("./eastmoney_miaoxiang/executors.js"),
|
|
429
437
|
easy_peasy_ai: () => import("./easy_peasy_ai/executors.js"),
|
|
430
438
|
easy8: () => import("./easy8/executors.js"),
|
|
431
439
|
easypost: () => import("./easypost/executors.js"),
|
|
@@ -536,12 +544,14 @@ export const executorModules = {
|
|
|
536
544
|
freshstatus: () => import("./freshstatus/executors.js"),
|
|
537
545
|
freshteam: () => import("./freshteam/executors.js"),
|
|
538
546
|
front: () => import("./front/executors.js"),
|
|
547
|
+
ftshare: () => import("./ftshare/executors.js"),
|
|
539
548
|
full_contact: () => import("./full_contact/executors.js"),
|
|
540
549
|
fullenrich: () => import("./fullenrich/executors.js"),
|
|
541
550
|
fundzwatch: () => import("./fundzwatch/executors.js"),
|
|
542
551
|
"fusion-api": () => import("./fusion-api/executors.js"),
|
|
543
552
|
futunn: () => import("./futunn/executors.js"),
|
|
544
553
|
fuxin: () => import("./fuxin/executors.js"),
|
|
554
|
+
fxbaogao: () => import("./fxbaogao/executors.js"),
|
|
545
555
|
fxmacrodata: () => import("./fxmacrodata/executors.js"),
|
|
546
556
|
gagelist: () => import("./gagelist/executors.js"),
|
|
547
557
|
gainsight_nxt: () => import("./gainsight_nxt/executors.js"),
|
|
@@ -662,6 +672,7 @@ export const executorModules = {
|
|
|
662
672
|
hotjar: () => import("./hotjar/executors.js"),
|
|
663
673
|
hotspotsystem: () => import("./hotspotsystem/executors.js"),
|
|
664
674
|
hr_partner: () => import("./hr_partner/executors.js"),
|
|
675
|
+
hrmos_kintai: () => import("./hrmos_kintai/executors.js"),
|
|
665
676
|
html_to_image: () => import("./html_to_image/executors.js"),
|
|
666
677
|
htmlcsstoimage: () => import("./htmlcsstoimage/executors.js"),
|
|
667
678
|
httpsms: () => import("./httpsms/executors.js"),
|
|
@@ -670,6 +681,7 @@ export const executorModules = {
|
|
|
670
681
|
huggingface: () => import("./huggingface/executors.js"),
|
|
671
682
|
humaans: () => import("./humaans/executors.js"),
|
|
672
683
|
humanitix: () => import("./humanitix/executors.js"),
|
|
684
|
+
humor_api: () => import("./humor_api/executors.js"),
|
|
673
685
|
hunter: () => import("./hunter/executors.js"),
|
|
674
686
|
huodingdong_mcp: () => import("./huodingdong_mcp/executors.js"),
|
|
675
687
|
hybrid_analysis: () => import("./hybrid_analysis/executors.js"),
|
|
@@ -738,6 +750,7 @@ export const executorModules = {
|
|
|
738
750
|
kagi: () => import("./kagi/executors.js"),
|
|
739
751
|
kaleido: () => import("./kaleido/executors.js"),
|
|
740
752
|
kandji: () => import("./kandji/executors.js"),
|
|
753
|
+
kaonavi: () => import("./kaonavi/executors.js"),
|
|
741
754
|
karakeep: () => import("./karakeep/executors.js"),
|
|
742
755
|
keen_io: () => import("./keen_io/executors.js"),
|
|
743
756
|
keepa: () => import("./keepa/executors.js"),
|
|
@@ -811,6 +824,7 @@ export const executorModules = {
|
|
|
811
824
|
linkup: () => import("./linkup/executors.js"),
|
|
812
825
|
linux_do: () => import("./linux_do/executors.js"),
|
|
813
826
|
listennotes: () => import("./listennotes/executors.js"),
|
|
827
|
+
listinggood: () => import("./listinggood/executors.js"),
|
|
814
828
|
listmonk: () => import("./listmonk/executors.js"),
|
|
815
829
|
litellm: () => import("./litellm/executors.js"),
|
|
816
830
|
liveagent: () => import("./liveagent/executors.js"),
|
|
@@ -1092,6 +1106,7 @@ export const executorModules = {
|
|
|
1092
1106
|
polar: () => import("./polar/executors.js"),
|
|
1093
1107
|
polygon_io: () => import("./polygon_io/executors.js"),
|
|
1094
1108
|
poper: () => import("./poper/executors.js"),
|
|
1109
|
+
porteden: () => import("./porteden/executors.js"),
|
|
1095
1110
|
positionstack: () => import("./positionstack/executors.js"),
|
|
1096
1111
|
postalytics: () => import("./postalytics/executors.js"),
|
|
1097
1112
|
postgrid: () => import("./postgrid/executors.js"),
|
|
@@ -1134,8 +1149,10 @@ export const executorModules = {
|
|
|
1134
1149
|
qianfan: () => import("./qianfan/executors.js"),
|
|
1135
1150
|
qichacha: () => import("./qichacha/executors.js"),
|
|
1136
1151
|
qingflow: () => import("./qingflow/executors.js"),
|
|
1152
|
+
qiuxiaoce: () => import("./qiuxiaoce/executors.js"),
|
|
1137
1153
|
qlty: () => import("./qlty/executors.js"),
|
|
1138
1154
|
qq_mail: () => import("./qq_mail/executors.js"),
|
|
1155
|
+
qqmusic: () => import("./qqmusic/executors.js"),
|
|
1139
1156
|
quaderno: () => import("./quaderno/executors.js"),
|
|
1140
1157
|
quant_data: () => import("./quant_data/executors.js"),
|
|
1141
1158
|
quentn: () => import("./quentn/executors.js"),
|
|
@@ -1152,6 +1169,7 @@ export const executorModules = {
|
|
|
1152
1169
|
railway: () => import("./railway/executors.js"),
|
|
1153
1170
|
raindrop: () => import("./raindrop/executors.js"),
|
|
1154
1171
|
raisely: () => import("./raisely/executors.js"),
|
|
1172
|
+
rakuraku_seisan: () => import("./rakuraku_seisan/executors.js"),
|
|
1155
1173
|
rawg: () => import("./rawg/executors.js"),
|
|
1156
1174
|
raygun: () => import("./raygun/executors.js"),
|
|
1157
1175
|
razorpay: () => import("./razorpay/executors.js"),
|
|
@@ -1211,10 +1229,12 @@ export const executorModules = {
|
|
|
1211
1229
|
sage_hr: () => import("./sage_hr/executors.js"),
|
|
1212
1230
|
sage_sales_management: () => import("./sage_sales_management/executors.js"),
|
|
1213
1231
|
salesflare: () => import("./salesflare/executors.js"),
|
|
1232
|
+
salesforce: () => import("./salesforce/executors.js"),
|
|
1214
1233
|
salesloft: () => import("./salesloft/executors.js"),
|
|
1215
1234
|
salesmate: () => import("./salesmate/executors.js"),
|
|
1216
1235
|
samcart: () => import("./samcart/executors.js"),
|
|
1217
1236
|
sanity: () => import("./sanity/executors.js"),
|
|
1237
|
+
sansan: () => import("./sansan/executors.js"),
|
|
1218
1238
|
satismeter: () => import("./satismeter/executors.js"),
|
|
1219
1239
|
saucelabs: () => import("./saucelabs/executors.js"),
|
|
1220
1240
|
scanmalware: () => import("./scanmalware/executors.js"),
|
|
@@ -1301,10 +1321,12 @@ export const executorModules = {
|
|
|
1301
1321
|
slicktext: () => import("./slicktext/executors.js"),
|
|
1302
1322
|
sling: () => import("./sling/executors.js"),
|
|
1303
1323
|
slite: () => import("./slite/executors.js"),
|
|
1324
|
+
smarthr: () => import("./smarthr/executors.js"),
|
|
1304
1325
|
smartlead_ai: () => import("./smartlead_ai/executors.js"),
|
|
1305
1326
|
smartrecruiters: () => import("./smartrecruiters/executors.js"),
|
|
1306
1327
|
smartsheet: () => import("./smartsheet/executors.js"),
|
|
1307
1328
|
smartsuite: () => import("./smartsuite/executors.js"),
|
|
1329
|
+
smooth: () => import("./smooth/executors.js"),
|
|
1308
1330
|
sms_alert: () => import("./sms_alert/executors.js"),
|
|
1309
1331
|
smtp2go: () => import("./smtp2go/executors.js"),
|
|
1310
1332
|
smugmug: () => import("./smugmug/executors.js"),
|
|
@@ -1378,6 +1400,7 @@ export const executorModules = {
|
|
|
1378
1400
|
talentlms: () => import("./talentlms/executors.js"),
|
|
1379
1401
|
tally: () => import("./tally/executors.js"),
|
|
1380
1402
|
tanium: () => import("./tanium/executors.js"),
|
|
1403
|
+
tapd: () => import("./tapd/executors.js"),
|
|
1381
1404
|
tapfiliate: () => import("./tapfiliate/executors.js"),
|
|
1382
1405
|
tave: () => import("./tave/executors.js"),
|
|
1383
1406
|
tavily: () => import("./tavily/executors.js"),
|
|
@@ -1394,6 +1417,7 @@ export const executorModules = {
|
|
|
1394
1417
|
templatefox: () => import("./templatefox/executors.js"),
|
|
1395
1418
|
tencent_docs: () => import("./tencent_docs/executors.js"),
|
|
1396
1419
|
tencent_maps: () => import("./tencent_maps/executors.js"),
|
|
1420
|
+
tencent_meeting_mcp: () => import("./tencent_meeting_mcp/executors.js"),
|
|
1397
1421
|
terminus_app: () => import("./terminus_app/executors.js"),
|
|
1398
1422
|
terraform: () => import("./terraform/executors.js"),
|
|
1399
1423
|
textcortex: () => import("./textcortex/executors.js"),
|
|
@@ -1410,6 +1434,7 @@ export const executorModules = {
|
|
|
1410
1434
|
thehive5: () => import("./thehive5/executors.js"),
|
|
1411
1435
|
theirstack: () => import("./theirstack/executors.js"),
|
|
1412
1436
|
thesportsdb: () => import("./thesportsdb/executors.js"),
|
|
1437
|
+
threatfox: () => import("./threatfox/executors.js"),
|
|
1413
1438
|
tianapi: () => import("./tianapi/executors.js"),
|
|
1414
1439
|
tianyancha: () => import("./tianyancha/executors.js"),
|
|
1415
1440
|
tick: () => import("./tick/executors.js"),
|
|
@@ -1443,6 +1468,7 @@ export const executorModules = {
|
|
|
1443
1468
|
torii_image_translator: () => import("./torii_image_translator/executors.js"),
|
|
1444
1469
|
totp: () => import("./totp/executors.js"),
|
|
1445
1470
|
tpscheck: () => import("./tpscheck/executors.js"),
|
|
1471
|
+
tradebee: () => import("./tradebee/executors.js"),
|
|
1446
1472
|
trawlingweb: () => import("./trawlingweb/executors.js"),
|
|
1447
1473
|
trello: () => import("./trello/executors.js"),
|
|
1448
1474
|
tremendous: () => import("./tremendous/executors.js"),
|
|
@@ -1463,6 +1489,7 @@ export const executorModules = {
|
|
|
1463
1489
|
twilio: () => import("./twilio/executors.js"),
|
|
1464
1490
|
twitter: () => import("./twitter/executors.js"),
|
|
1465
1491
|
twitterapi_io: () => import("./twitterapi_io/executors.js"),
|
|
1492
|
+
twittrapi: () => import("./twittrapi/executors.js"),
|
|
1466
1493
|
twochat: () => import("./twochat/executors.js"),
|
|
1467
1494
|
typebot: () => import("./typebot/executors.js"),
|
|
1468
1495
|
typeform: () => import("./typeform/executors.js"),
|
|
@@ -1483,6 +1510,7 @@ export const executorModules = {
|
|
|
1483
1510
|
upsales: () => import("./upsales/executors.js"),
|
|
1484
1511
|
upstash_redis: () => import("./upstash_redis/executors.js"),
|
|
1485
1512
|
uptimerobot: () => import("./uptimerobot/executors.js"),
|
|
1513
|
+
urlhaus: () => import("./urlhaus/executors.js"),
|
|
1486
1514
|
urlscan: () => import("./urlscan/executors.js"),
|
|
1487
1515
|
userflow: () => import("./userflow/executors.js"),
|
|
1488
1516
|
userlist: () => import("./userlist/executors.js"),
|
|
@@ -1548,6 +1576,7 @@ export const executorModules = {
|
|
|
1548
1576
|
weixin_official_account: () => import("./weixin_official_account/executors.js"),
|
|
1549
1577
|
weixin_store: () => import("./weixin_store/executors.js"),
|
|
1550
1578
|
wejam_ai: () => import("./wejam_ai/executors.js"),
|
|
1579
|
+
weread: () => import("./weread/executors.js"),
|
|
1551
1580
|
what3words: () => import("./what3words/executors.js"),
|
|
1552
1581
|
whatsable: () => import("./whatsable/executors.js"),
|
|
1553
1582
|
whatsapp: () => import("./whatsapp/executors.js"),
|
|
@@ -1609,6 +1638,7 @@ export const executorModules = {
|
|
|
1609
1638
|
zerobounce: () => import("./zerobounce/executors.js"),
|
|
1610
1639
|
zerotier: () => import("./zerotier/executors.js"),
|
|
1611
1640
|
zhihu: () => import("./zhihu/executors.js"),
|
|
1641
|
+
zhiliaobiaoxun: () => import("./zhiliaobiaoxun/executors.js"),
|
|
1612
1642
|
zigpoll: () => import("./zigpoll/executors.js"),
|
|
1613
1643
|
zip_archive_api: () => import("./zip_archive_api/executors.js"),
|
|
1614
1644
|
zipcodebase: () => import("./zipcodebase/executors.js"),
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { OAuthProviderContext } from "../provider-runtime.ts";
|
|
2
|
+
export interface SalesforceContext extends OAuthProviderContext {
|
|
3
|
+
base: string;
|
|
4
|
+
version: string;
|
|
5
|
+
origin: string;
|
|
6
|
+
request(path: string, method?: string, body?: unknown): Promise<unknown>;
|
|
7
|
+
object(path: string, method?: string, body?: unknown): Promise<Record<string, unknown>>;
|
|
8
|
+
items(path: string, method?: string, body?: unknown): Promise<{
|
|
9
|
+
results: unknown[];
|
|
10
|
+
}>;
|
|
11
|
+
response<T>(path: string, init: RequestInit, consume: (response: Response, signal: AbortSignal) => Promise<T>): Promise<T>;
|
|
12
|
+
}
|
|
13
|
+
export declare function createSalesforceContext(context: OAuthProviderContext, data: Record<string, unknown>): SalesforceContext;
|
|
14
|
+
export type SalesforceHandler = (data: Record<string, unknown>, context: SalesforceContext) => Promise<unknown>;
|
|
15
|
+
export declare function segment(value: unknown): string;
|
|
16
|
+
export declare function queryPath(path: string, params: Record<string, unknown>): string;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { requiredRawString } from "../../core/cast.js";
|
|
2
|
+
import { providerInputError, providerResponseError, requiredInputString, requiredResponseRecord, } from "../provider-runtime.js";
|
|
3
|
+
import { salesforceFileRequestTimeoutMs, salesforceOrigin, salesforceRequest, withSalesforceResponse, } from "./transport.js";
|
|
4
|
+
export function createSalesforceContext(context, data) {
|
|
5
|
+
const origin = salesforceOrigin(requiredInputString(context.providerSecret?.instanceUrl, "instanceUrl"), "instanceUrl");
|
|
6
|
+
const version = String(data.apiVersion ?? "66.0");
|
|
7
|
+
const base = `/services/data/v${version}`;
|
|
8
|
+
function url(path) {
|
|
9
|
+
const resolved = new URL(path, origin);
|
|
10
|
+
if (resolved.origin !== origin || !path.startsWith("/services/"))
|
|
11
|
+
throw providerInputError("Salesforce path must stay within the connected instance");
|
|
12
|
+
return resolved;
|
|
13
|
+
}
|
|
14
|
+
function initWithAuth(init) {
|
|
15
|
+
const headers = new Headers(init.headers);
|
|
16
|
+
headers.set("authorization", `Bearer ${context.accessToken}`);
|
|
17
|
+
return { ...init, headers };
|
|
18
|
+
}
|
|
19
|
+
async function request(path, method = "GET", body) {
|
|
20
|
+
return (await salesforceRequest(url(path), initWithAuth({
|
|
21
|
+
method,
|
|
22
|
+
headers: body === undefined ? undefined : { "content-type": "application/json" },
|
|
23
|
+
body: body === undefined ? undefined : JSON.stringify(body),
|
|
24
|
+
}), context.fetcher, context.signal)).body;
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
...context,
|
|
28
|
+
base,
|
|
29
|
+
version,
|
|
30
|
+
origin,
|
|
31
|
+
request,
|
|
32
|
+
async object(path, method = "GET", body) {
|
|
33
|
+
return requiredResponseRecord(await request(path, method, body), "Salesforce response");
|
|
34
|
+
},
|
|
35
|
+
async items(path, method = "GET", body) {
|
|
36
|
+
const results = await request(path, method, body);
|
|
37
|
+
if (!Array.isArray(results))
|
|
38
|
+
throw providerResponseError("Salesforce results must be an array");
|
|
39
|
+
return { results };
|
|
40
|
+
},
|
|
41
|
+
response(path, init, consume) {
|
|
42
|
+
return withSalesforceResponse(url(path), initWithAuth(init), context.fetcher, consume, salesforceFileRequestTimeoutMs, context.signal);
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function segment(value) {
|
|
47
|
+
const raw = requiredRawString(value, "path segment", providerInputError);
|
|
48
|
+
if (!raw || raw === "." || raw === "..")
|
|
49
|
+
throw providerInputError("Salesforce path cannot contain dot segments");
|
|
50
|
+
return encodeURIComponent(raw);
|
|
51
|
+
}
|
|
52
|
+
export function queryPath(path, params) {
|
|
53
|
+
const search = new URLSearchParams();
|
|
54
|
+
for (const [key, value] of Object.entries(params))
|
|
55
|
+
if (value !== undefined)
|
|
56
|
+
search.set(key, Array.isArray(value) ? value.join(",") : String(value));
|
|
57
|
+
return search.size ? `${path}?${search}` : path;
|
|
58
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CredentialValidators, ProviderExecutors, ProviderProxyExecutor } from "../../core/types.ts";
|
|
2
|
+
export { oauth } from "./oauth.ts";
|
|
3
|
+
export declare const executors: ProviderExecutors;
|
|
4
|
+
export declare const proxy: ProviderProxyExecutor;
|
|
5
|
+
export declare const credentialValidators: CredentialValidators;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { optionalString } from "../../core/cast.js";
|
|
2
|
+
import { defineOAuthProviderExecutors, defineProviderProxy, providerInputError, providerResponseError, requiredInputString, requiredResponseRecord, } from "../provider-runtime.js";
|
|
3
|
+
import { createSalesforceContext } from "./context.js";
|
|
4
|
+
import { salesforceAnalyticsHandlers } from "./runtime-analytics.js";
|
|
5
|
+
import { salesforceAutomationHandlers } from "./runtime-automation.js";
|
|
6
|
+
import { salesforceBaseHandlers } from "./runtime-base.js";
|
|
7
|
+
import { salesforceBulkHandlers } from "./runtime-bulk.js";
|
|
8
|
+
import { salesforceDataHandlers } from "./runtime-data.js";
|
|
9
|
+
import { salesforceFileHandlers } from "./runtime-files.js";
|
|
10
|
+
import { readSalesforceError, salesforceOrigin, salesforceRequest } from "./transport.js";
|
|
11
|
+
export { oauth } from "./oauth.js";
|
|
12
|
+
const handlers = {};
|
|
13
|
+
for (const [name, handler] of Object.entries({
|
|
14
|
+
...salesforceBaseHandlers,
|
|
15
|
+
...salesforceDataHandlers,
|
|
16
|
+
...salesforceAnalyticsHandlers,
|
|
17
|
+
...salesforceAutomationHandlers,
|
|
18
|
+
...salesforceFileHandlers,
|
|
19
|
+
...salesforceBulkHandlers,
|
|
20
|
+
})) {
|
|
21
|
+
handlers[name] = (input, context) => handler(input, createSalesforceContext(context, input));
|
|
22
|
+
}
|
|
23
|
+
export const executors = defineOAuthProviderExecutors("salesforce", handlers);
|
|
24
|
+
export const proxy = defineProviderProxy({
|
|
25
|
+
service: "salesforce",
|
|
26
|
+
async baseUrl(context, service) {
|
|
27
|
+
const credential = await context.getCredential(service);
|
|
28
|
+
if (credential?.authType !== "oauth2")
|
|
29
|
+
throw providerInputError("Salesforce requires OAuth2");
|
|
30
|
+
return salesforceOrigin(requiredInputString(credential.providerSecret?.instanceUrl, "instanceUrl"), "instanceUrl");
|
|
31
|
+
},
|
|
32
|
+
auth: { type: "oauth_bearer" },
|
|
33
|
+
readError: readSalesforceError,
|
|
34
|
+
});
|
|
35
|
+
export const credentialValidators = {
|
|
36
|
+
async oauth2(credential, { fetcher, signal }) {
|
|
37
|
+
const metadata = credential.providerSecret;
|
|
38
|
+
if (!metadata)
|
|
39
|
+
throw providerInputError("Salesforce connection metadata is missing");
|
|
40
|
+
const url = new URL(requiredInputString(metadata?.identityUrl, "identityUrl"));
|
|
41
|
+
salesforceOrigin(url.origin, "identityUrl");
|
|
42
|
+
const body = requiredResponseRecord((await salesforceRequest(url, { headers: { authorization: `Bearer ${credential.accessToken}` } }, fetcher, signal)).body, "Salesforce identity");
|
|
43
|
+
if (body.organization_id !== metadata?.organizationId || body.user_id !== metadata?.userId)
|
|
44
|
+
throw providerResponseError("Salesforce identity does not match the token response");
|
|
45
|
+
return {
|
|
46
|
+
profile: {
|
|
47
|
+
accountId: `${metadata.organizationId}:${metadata.userId}`,
|
|
48
|
+
displayName: optionalString(body.display_name) ?? optionalString(body.username),
|
|
49
|
+
},
|
|
50
|
+
metadata: { instanceUrl: metadata.instanceUrl },
|
|
51
|
+
grantedScopes: optionalString(credential.metadata.scope)?.split(" ").filter(Boolean),
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TransitFileUpload, TransitFileWriter } from "../../core/types.ts";
|
|
2
|
+
import type { SalesforceContext } from "./context.ts";
|
|
3
|
+
export declare function requireSalesforceTransit(context: SalesforceContext): TransitFileWriter;
|
|
4
|
+
export declare function downloadSalesforceSource(fileUrl: string, maximumBytes: number, context: SalesforceContext): Promise<{
|
|
5
|
+
body: ReadableStream<Uint8Array>;
|
|
6
|
+
sizeBytes: number;
|
|
7
|
+
cleanup(): Promise<void>;
|
|
8
|
+
}>;
|
|
9
|
+
export declare function saveSalesforceDownload(context: SalesforceContext, response: Response, name: string, mimeType: string, signal: AbortSignal): Promise<TransitFileUpload>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { assertPublicHttpUrl, storeResponseInTransit } from "../../core/request.js";
|
|
2
|
+
import { providerFetch, providerInputError, providerResponseError, ProviderRequestError, runProviderRequest, } from "../provider-runtime.js";
|
|
3
|
+
import { salesforceFileRequestTimeoutMs } from "./transport.js";
|
|
4
|
+
export function requireSalesforceTransit(context) {
|
|
5
|
+
const store = context.transitFiles;
|
|
6
|
+
if (!store?.createFromStream)
|
|
7
|
+
throw providerInputError("Salesforce file transfers require a streaming transit file backend (filesystem).");
|
|
8
|
+
return store;
|
|
9
|
+
}
|
|
10
|
+
export async function downloadSalesforceSource(fileUrl, maximumBytes, context) {
|
|
11
|
+
const store = requireSalesforceTransit(context);
|
|
12
|
+
if (!store.response)
|
|
13
|
+
throw providerInputError("Salesforce uploads require a transit backend with streaming reads.");
|
|
14
|
+
const url = assertPublicHttpUrl(fileUrl, { fieldName: "fileUrl", createError: providerInputError });
|
|
15
|
+
if (url.protocol !== "https:")
|
|
16
|
+
throw providerInputError("fileUrl must use HTTPS");
|
|
17
|
+
return runProviderRequest({ label: "Salesforce file source", timeoutMs: salesforceFileRequestTimeoutMs, signal: context.signal }, async (signal) => {
|
|
18
|
+
const response = await providerFetch(url, { signal });
|
|
19
|
+
if (!response.ok || !response.body) {
|
|
20
|
+
await response.body?.cancel();
|
|
21
|
+
throw new ProviderRequestError(response.status, `File source returned HTTP ${response.status}`, undefined, "provider_error");
|
|
22
|
+
}
|
|
23
|
+
const file = await storeResponseInTransit(response, store, {
|
|
24
|
+
name: "source",
|
|
25
|
+
mimeType: "application/octet-stream",
|
|
26
|
+
fieldName: "Salesforce file source",
|
|
27
|
+
createError: (message) => new ProviderRequestError(413, message),
|
|
28
|
+
maxBytes: maximumBytes,
|
|
29
|
+
signal,
|
|
30
|
+
});
|
|
31
|
+
let body = null;
|
|
32
|
+
try {
|
|
33
|
+
if (!file.sizeBytes)
|
|
34
|
+
throw providerInputError("The file source is empty");
|
|
35
|
+
const source = await store.response(file.fileId);
|
|
36
|
+
body = source.body;
|
|
37
|
+
if (!source.ok || !body)
|
|
38
|
+
throw providerResponseError("Salesforce transit source could not be read");
|
|
39
|
+
const sourceBody = body;
|
|
40
|
+
return {
|
|
41
|
+
body: sourceBody,
|
|
42
|
+
sizeBytes: file.sizeBytes,
|
|
43
|
+
async cleanup() {
|
|
44
|
+
await sourceBody.cancel().catch(() => undefined);
|
|
45
|
+
await store.delete(file.fileId);
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
await body?.cancel().catch(() => undefined);
|
|
51
|
+
await store.delete(file.fileId);
|
|
52
|
+
throw error;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
export async function saveSalesforceDownload(context, response, name, mimeType, signal) {
|
|
57
|
+
const store = requireSalesforceTransit(context);
|
|
58
|
+
return storeResponseInTransit(response, store, {
|
|
59
|
+
name,
|
|
60
|
+
mimeType,
|
|
61
|
+
signal,
|
|
62
|
+
maxBytes: 2 * 1024 ** 3,
|
|
63
|
+
fieldName: "Salesforce file",
|
|
64
|
+
createError: (message) => new ProviderRequestError(413, message),
|
|
65
|
+
});
|
|
66
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { optionalNumber, optionalRecord, optionalString, requiredString } from "../../core/cast.js";
|
|
2
|
+
import { ProviderRequestError, providerResponseError, requiredResponseRecord } from "../provider-runtime.js";
|
|
3
|
+
import { salesforceOrigin, salesforceRequest } from "./transport.js";
|
|
4
|
+
function loginOrigin(config) {
|
|
5
|
+
return salesforceOrigin(optionalString(config.extra.loginUrl) ?? "https://login.salesforce.com", "loginUrl");
|
|
6
|
+
}
|
|
7
|
+
async function requestToken(input) {
|
|
8
|
+
const origin = loginOrigin(input.config);
|
|
9
|
+
const result = await salesforceRequest(new URL("/services/oauth2/token", origin), {
|
|
10
|
+
method: "POST",
|
|
11
|
+
headers: { "content-type": "application/x-www-form-urlencoded" },
|
|
12
|
+
body: new URLSearchParams({
|
|
13
|
+
...input.parameters,
|
|
14
|
+
client_id: input.config.clientId,
|
|
15
|
+
client_secret: input.config.clientSecret,
|
|
16
|
+
}),
|
|
17
|
+
}, input.fetcher, input.signal).catch((error) => {
|
|
18
|
+
if (!(error instanceof ProviderRequestError))
|
|
19
|
+
throw error;
|
|
20
|
+
const details = optionalRecord(error.details);
|
|
21
|
+
// Only Salesforce's explicit expired-refresh-token response warrants reconnecting.
|
|
22
|
+
const expired = input.parameters.grant_type === "refresh_token" &&
|
|
23
|
+
details?.errorCode === "invalid_grant" &&
|
|
24
|
+
details.errorDescription === "expired access/refresh token";
|
|
25
|
+
throw input.createError(error.message, expired ? { status: error.status, errorCode: "invalid_grant" } : undefined);
|
|
26
|
+
});
|
|
27
|
+
const body = requiredResponseRecord(result.body, "Salesforce token response");
|
|
28
|
+
const instanceUrl = salesforceOrigin(requiredString(body.instance_url, "Salesforce instance_url", providerResponseError), "instance_url");
|
|
29
|
+
const identityUrl = new URL(requiredString(body.id, "Salesforce identity URL", providerResponseError));
|
|
30
|
+
salesforceOrigin(identityUrl.origin, "identity URL");
|
|
31
|
+
const parts = identityUrl.pathname.split("/");
|
|
32
|
+
if (parts.length !== 4 ||
|
|
33
|
+
parts[1] !== "id" ||
|
|
34
|
+
!parts[2] ||
|
|
35
|
+
!parts[3] ||
|
|
36
|
+
identityUrl.search ||
|
|
37
|
+
identityUrl.hash ||
|
|
38
|
+
identityUrl.username ||
|
|
39
|
+
identityUrl.password)
|
|
40
|
+
throw providerResponseError("Salesforce returned an invalid identity URL");
|
|
41
|
+
const scope = optionalString(body.scope) ?? input.fallbackScopes;
|
|
42
|
+
if (!scope.split(" ").includes("api"))
|
|
43
|
+
throw providerResponseError("Salesforce did not grant the required api scope");
|
|
44
|
+
const expiresIn = optionalNumber(body.expires_in);
|
|
45
|
+
// Salesforce normally omits expires_in; ten minutes is a local refresh budget, not its session lifetime.
|
|
46
|
+
const refreshAfterSeconds = expiresIn !== undefined && expiresIn > 0 ? Math.min(expiresIn, 600) : 600;
|
|
47
|
+
return {
|
|
48
|
+
accessToken: requiredString(body.access_token, "Salesforce access token", providerResponseError),
|
|
49
|
+
refreshToken: input.parameters.grant_type === "authorization_code"
|
|
50
|
+
? requiredString(body.refresh_token, "Salesforce refresh token; enable refresh_token scope and authorize again", input.createError)
|
|
51
|
+
: optionalString(body.refresh_token),
|
|
52
|
+
tokenType: optionalString(body.token_type) ?? "Bearer",
|
|
53
|
+
expiresAt: new Date(Date.now() + refreshAfterSeconds * 1000).toISOString(),
|
|
54
|
+
providerSecret: { instanceUrl, identityUrl: identityUrl.toString(), organizationId: parts[2], userId: parts[3] },
|
|
55
|
+
metadata: { scope },
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export const oauth = {
|
|
59
|
+
buildAuthorizationUrl({ authorizationUrl, clientConfig }) {
|
|
60
|
+
const url = new URL("/services/oauth2/authorize", loginOrigin(clientConfig));
|
|
61
|
+
url.search = authorizationUrl.search;
|
|
62
|
+
return url.toString();
|
|
63
|
+
},
|
|
64
|
+
exchangeCode(input) {
|
|
65
|
+
const parameters = {
|
|
66
|
+
grant_type: "authorization_code",
|
|
67
|
+
code: input.code,
|
|
68
|
+
redirect_uri: input.redirectUri,
|
|
69
|
+
code_verifier: requiredString(input.codeVerifier, "Salesforce PKCE verifier", input.createError),
|
|
70
|
+
};
|
|
71
|
+
return requestToken({
|
|
72
|
+
config: input.clientConfig,
|
|
73
|
+
parameters,
|
|
74
|
+
fetcher: input.fetcher,
|
|
75
|
+
signal: input.signal,
|
|
76
|
+
fallbackScopes: "api refresh_token",
|
|
77
|
+
createError: input.createError,
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
refreshAccessToken(input) {
|
|
81
|
+
return requestToken({
|
|
82
|
+
config: input.clientConfig,
|
|
83
|
+
parameters: { grant_type: "refresh_token", refresh_token: input.refreshToken },
|
|
84
|
+
fetcher: input.fetcher,
|
|
85
|
+
fallbackScopes: optionalString(input.metadata.scope) ?? "api refresh_token",
|
|
86
|
+
createError: input.createError,
|
|
87
|
+
});
|
|
88
|
+
},
|
|
89
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { recordOrEmpty, requiredString } from "../../core/cast.js";
|
|
2
|
+
import { providerResponseError } from "../provider-runtime.js";
|
|
3
|
+
import { queryPath, segment } from "./context.js";
|
|
4
|
+
function reportPath(d, base) {
|
|
5
|
+
return queryPath(`${base}/analytics/reports/${segment(d.reportId)}`, {
|
|
6
|
+
includeDetails: d.includeDetails,
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
function dashboardPath(d, base, suffix = "") {
|
|
10
|
+
return queryPath(`${base}/analytics/dashboards/${segment(d.dashboardId)}${suffix}`, {
|
|
11
|
+
runningUser: d.runningUser,
|
|
12
|
+
filter1: d.filter1,
|
|
13
|
+
filter2: d.filter2,
|
|
14
|
+
filter3: d.filter3,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
export const salesforceAnalyticsHandlers = {
|
|
18
|
+
async list_reports(_d, c) {
|
|
19
|
+
return c.items(`${c.base}/analytics/reports`);
|
|
20
|
+
},
|
|
21
|
+
async describe_report(d, c) {
|
|
22
|
+
return c.object(`${c.base}/analytics/reports/${segment(d.reportId)}/describe`);
|
|
23
|
+
},
|
|
24
|
+
async run_report(d, c) {
|
|
25
|
+
return c.object(reportPath(d, c.base), d.metadata === undefined ? "GET" : "POST", d.metadata === undefined ? undefined : { reportMetadata: d.metadata });
|
|
26
|
+
},
|
|
27
|
+
async submit_report(d, c) {
|
|
28
|
+
const response = await c.object(queryPath(`${c.base}/analytics/reports/${segment(d.reportId)}/instances`, {
|
|
29
|
+
includeDetails: d.includeDetails,
|
|
30
|
+
}), "POST", d.metadata === undefined ? undefined : { reportMetadata: d.metadata });
|
|
31
|
+
// Submit responses put instance fields at the root; result responses use attributes.
|
|
32
|
+
const handle = {
|
|
33
|
+
reportId: d.reportId,
|
|
34
|
+
instanceId: requiredString(response.id, "report instance ID", providerResponseError),
|
|
35
|
+
apiVersion: c.version,
|
|
36
|
+
};
|
|
37
|
+
return { handle, state: requiredString(response.status, "report state", providerResponseError) };
|
|
38
|
+
},
|
|
39
|
+
async get_report_result(d, c) {
|
|
40
|
+
const handle = recordOrEmpty(d.handle);
|
|
41
|
+
const report = await c.object(`/services/data/v${segment(handle.apiVersion)}/analytics/reports/${segment(handle.reportId)}/instances/${segment(handle.instanceId)}`);
|
|
42
|
+
return {
|
|
43
|
+
handle,
|
|
44
|
+
state: requiredString(recordOrEmpty(report.attributes).status, "report state", providerResponseError),
|
|
45
|
+
report,
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
async list_dashboards(_d, c) {
|
|
49
|
+
return c.items(`${c.base}/analytics/dashboards`);
|
|
50
|
+
},
|
|
51
|
+
async get_dashboard(d, c) {
|
|
52
|
+
return c.object(dashboardPath(d, c.base));
|
|
53
|
+
},
|
|
54
|
+
async refresh_dashboard(d, c) {
|
|
55
|
+
return c.object(dashboardPath(d, c.base), "PUT");
|
|
56
|
+
},
|
|
57
|
+
async get_dashboard_status(d, c) {
|
|
58
|
+
return c.object(dashboardPath(d, c.base, "/status"));
|
|
59
|
+
},
|
|
60
|
+
};
|