@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.
Files changed (395) hide show
  1. package/assets/open-connector/catalog/apps/agentearth.json +441 -0
  2. package/assets/open-connector/catalog/apps/appgrowing_mcp.json +863 -0
  3. package/assets/open-connector/catalog/apps/arcmira.json +610 -0
  4. package/assets/open-connector/catalog/apps/bainiu.json +654 -0
  5. package/assets/open-connector/catalog/apps/chaport.json +331 -0
  6. package/assets/open-connector/catalog/apps/cnb.json +1408 -0
  7. package/assets/open-connector/catalog/apps/crtsh.json +123 -0
  8. package/assets/open-connector/catalog/apps/eastmoney_miaoxiang.json +406 -0
  9. package/assets/open-connector/catalog/apps/fastmoss_mcp.json +876 -876
  10. package/assets/open-connector/catalog/apps/ftshare.json +1162 -0
  11. package/assets/open-connector/catalog/apps/fusion-api.json +143 -0
  12. package/assets/open-connector/catalog/apps/fxbaogao.json +308 -0
  13. package/assets/open-connector/catalog/apps/github.json +38 -3
  14. package/assets/open-connector/catalog/apps/hrmos_kintai.json +7519 -0
  15. package/assets/open-connector/catalog/apps/humor_api.json +351 -0
  16. package/assets/open-connector/catalog/apps/kaonavi.json +1723 -0
  17. package/assets/open-connector/catalog/apps/linear_mcp.json +882 -22
  18. package/assets/open-connector/catalog/apps/listinggood.json +362 -0
  19. package/assets/open-connector/catalog/apps/notion_mcp.json +338 -1
  20. package/assets/open-connector/catalog/apps/outlook.json +414 -0
  21. package/assets/open-connector/catalog/apps/porteden.json +1258 -0
  22. package/assets/open-connector/catalog/apps/qiuxiaoce.json +915 -0
  23. package/assets/open-connector/catalog/apps/qqmusic.json +1834 -0
  24. package/assets/open-connector/catalog/apps/rakuraku_seisan.json +217 -0
  25. package/assets/open-connector/catalog/apps/redfox.json +9661 -897
  26. package/assets/open-connector/catalog/apps/salesforce.json +4907 -0
  27. package/assets/open-connector/catalog/apps/sansan.json +4594 -0
  28. package/assets/open-connector/catalog/apps/smarthr.json +8071 -0
  29. package/assets/open-connector/catalog/apps/smooth.json +914 -0
  30. package/assets/open-connector/catalog/apps/tapd.json +727 -0
  31. package/assets/open-connector/catalog/apps/tencent_meeting_mcp.json +1301 -0
  32. package/assets/open-connector/catalog/apps/threatfox.json +203 -0
  33. package/assets/open-connector/catalog/apps/tradebee.json +915 -0
  34. package/assets/open-connector/catalog/apps/twittrapi.json +4914 -0
  35. package/assets/open-connector/catalog/apps/urlhaus.json +246 -0
  36. package/assets/open-connector/catalog/apps/weread.json +1514 -0
  37. package/assets/open-connector/catalog/apps/whatsapp.json +12 -0
  38. package/assets/open-connector/catalog/apps/zhiliaobiaoxun.json +812 -0
  39. package/assets/open-connector/catalog/apps-index.json +1 -1
  40. package/package.json +2 -1
  41. package/src/connection-service.js +55 -11
  42. package/src/core/provider-error-codes.d.ts +9 -0
  43. package/src/core/provider-error-codes.js +13 -0
  44. package/src/core/request.d.ts +2 -0
  45. package/src/core/request.js +11 -2
  46. package/src/mail/imap-smtp/protocol.js +4 -3
  47. package/src/oauth/oauth-flow-service.js +1 -0
  48. package/src/oauth/oauth-token.d.ts +2 -0
  49. package/src/providers/17track/runtime.js +17 -20
  50. package/src/providers/action-contracts.generated.d.ts +36 -6
  51. package/src/providers/agentearth/actions.d.ts +2 -0
  52. package/src/providers/agentearth/actions.js +100 -0
  53. package/src/providers/agentearth/executors.d.ts +4 -0
  54. package/src/providers/agentearth/executors.js +109 -0
  55. package/src/providers/appgrowing_mcp/actions.d.ts +2 -0
  56. package/src/providers/appgrowing_mcp/actions.js +175 -0
  57. package/src/providers/appgrowing_mcp/executors.d.ts +4 -0
  58. package/src/providers/appgrowing_mcp/executors.js +66 -0
  59. package/src/providers/arcmira/executors.d.ts +3 -0
  60. package/src/providers/arcmira/executors.js +8 -0
  61. package/src/providers/arcmira/runtime.d.ts +6 -0
  62. package/src/providers/arcmira/runtime.js +41 -0
  63. package/src/providers/bainiu/actions.d.ts +2 -0
  64. package/src/providers/bainiu/actions.js +108 -0
  65. package/src/providers/bainiu/executors.d.ts +4 -0
  66. package/src/providers/bainiu/executors.js +113 -0
  67. package/src/providers/baixiao/executors.js +1 -1
  68. package/src/providers/bing_webmaster/executors.js +1 -1
  69. package/src/providers/chaport/actions.d.ts +2 -0
  70. package/src/providers/chaport/actions.js +70 -0
  71. package/src/providers/chaport/executors.d.ts +4 -0
  72. package/src/providers/chaport/executors.js +128 -0
  73. package/src/providers/clickup/runtime.js +49 -52
  74. package/src/providers/cnb/actions.d.ts +2 -0
  75. package/src/providers/cnb/actions.js +341 -0
  76. package/src/providers/cnb/executors.d.ts +4 -0
  77. package/src/providers/cnb/executors.js +135 -0
  78. package/src/providers/coupontools/runtime.js +11 -14
  79. package/src/providers/crtsh/executors.d.ts +3 -0
  80. package/src/providers/crtsh/executors.js +19 -0
  81. package/src/providers/crtsh/runtime.d.ts +17 -0
  82. package/src/providers/crtsh/runtime.js +84 -0
  83. package/src/providers/eastmoney_miaoxiang/actions.d.ts +2 -0
  84. package/src/providers/eastmoney_miaoxiang/actions.js +95 -0
  85. package/src/providers/eastmoney_miaoxiang/executors.d.ts +4 -0
  86. package/src/providers/eastmoney_miaoxiang/executors.js +81 -0
  87. package/src/providers/fastmoss_mcp/actions-content.d.ts +2 -0
  88. package/src/providers/fastmoss_mcp/actions-content.js +140 -0
  89. package/src/providers/fastmoss_mcp/actions-creator.d.ts +2 -0
  90. package/src/providers/fastmoss_mcp/actions-creator.js +154 -0
  91. package/src/providers/fastmoss_mcp/actions-product.d.ts +2 -0
  92. package/src/providers/fastmoss_mcp/actions-product.js +167 -0
  93. package/src/providers/fastmoss_mcp/actions-research.d.ts +2 -0
  94. package/src/providers/fastmoss_mcp/actions-research.js +174 -0
  95. package/src/providers/fastmoss_mcp/actions-shop.d.ts +2 -0
  96. package/src/providers/fastmoss_mcp/actions-shop.js +142 -0
  97. package/src/providers/fastmoss_mcp/actions.js +11 -12
  98. package/src/providers/fastmoss_mcp/schemas.d.ts +51 -0
  99. package/src/providers/fastmoss_mcp/schemas.js +52 -0
  100. package/src/providers/ftshare/actions.d.ts +2 -0
  101. package/src/providers/ftshare/actions.js +124 -0
  102. package/src/providers/ftshare/executors.d.ts +4 -0
  103. package/src/providers/ftshare/executors.js +102 -0
  104. package/src/providers/fusion-api/operations.js +37 -0
  105. package/src/providers/fxbaogao/actions.d.ts +2 -0
  106. package/src/providers/fxbaogao/actions.js +74 -0
  107. package/src/providers/fxbaogao/executors.d.ts +4 -0
  108. package/src/providers/fxbaogao/executors.js +155 -0
  109. package/src/providers/github/app-installation.d.ts +37 -0
  110. package/src/providers/github/app-installation.js +233 -0
  111. package/src/providers/github/executors.js +93 -15
  112. package/src/providers/github/runtime-repository.js +21 -1
  113. package/src/providers/github/runtime-shared.d.ts +2 -0
  114. package/src/providers/github/runtime-shared.js +1 -0
  115. package/src/providers/googledrive/runtime-request.js +3 -3
  116. package/src/providers/hrmos_kintai/actions.d.ts +2 -0
  117. package/src/providers/hrmos_kintai/actions.js +139 -0
  118. package/src/providers/hrmos_kintai/attendance-actions.d.ts +2 -0
  119. package/src/providers/hrmos_kintai/attendance-actions.js +276 -0
  120. package/src/providers/hrmos_kintai/business-actions.d.ts +2 -0
  121. package/src/providers/hrmos_kintai/business-actions.js +143 -0
  122. package/src/providers/hrmos_kintai/business-schemas.d.ts +4 -0
  123. package/src/providers/hrmos_kintai/business-schemas.js +320 -0
  124. package/src/providers/hrmos_kintai/executors.d.ts +4 -0
  125. package/src/providers/hrmos_kintai/executors.js +61 -0
  126. package/src/providers/hrmos_kintai/export-actions.d.ts +2 -0
  127. package/src/providers/hrmos_kintai/export-actions.js +58 -0
  128. package/src/providers/hrmos_kintai/operations.d.ts +9 -0
  129. package/src/providers/hrmos_kintai/operations.js +278 -0
  130. package/src/providers/hrmos_kintai/runtime.d.ts +10 -0
  131. package/src/providers/hrmos_kintai/runtime.js +217 -0
  132. package/src/providers/hrmos_kintai/schemas.d.ts +10 -0
  133. package/src/providers/hrmos_kintai/schemas.js +70 -0
  134. package/src/providers/humor_api/actions.d.ts +2 -0
  135. package/src/providers/humor_api/actions.js +96 -0
  136. package/src/providers/humor_api/executors.d.ts +4 -0
  137. package/src/providers/humor_api/executors.js +76 -0
  138. package/src/providers/kaonavi/actions.d.ts +4 -0
  139. package/src/providers/kaonavi/actions.js +144 -0
  140. package/src/providers/kaonavi/additional-actions.d.ts +10 -0
  141. package/src/providers/kaonavi/additional-actions.js +203 -0
  142. package/src/providers/kaonavi/executors.d.ts +4 -0
  143. package/src/providers/kaonavi/executors.js +69 -0
  144. package/src/providers/kaonavi/runtime.d.ts +4 -0
  145. package/src/providers/kaonavi/runtime.js +69 -0
  146. package/src/providers/linear_mcp/actions.d.ts +14 -0
  147. package/src/providers/linear_mcp/actions.js +134 -0
  148. package/src/providers/linear_mcp/runtime-mcp.d.ts +7 -1
  149. package/src/providers/linear_mcp/runtime-mcp.js +140 -28
  150. package/src/providers/linkfox/runtime.js +48 -51
  151. package/src/providers/listinggood/actions.d.ts +2 -0
  152. package/src/providers/listinggood/actions.js +95 -0
  153. package/src/providers/listinggood/executors.d.ts +4 -0
  154. package/src/providers/listinggood/executors.js +99 -0
  155. package/src/providers/mcp-tools.d.ts +3 -0
  156. package/src/providers/mcp-tools.js +5 -4
  157. package/src/providers/notion_mcp/executors.js +53 -24
  158. package/src/providers/notion_mcp/mcp-response.d.ts +26 -0
  159. package/src/providers/notion_mcp/mcp-response.js +95 -0
  160. package/src/providers/omise/executors.js +1 -1
  161. package/src/providers/outlook/executors.js +35 -2
  162. package/src/providers/porteden/actions.d.ts +2 -0
  163. package/src/providers/porteden/actions.js +162 -0
  164. package/src/providers/porteden/executors.d.ts +4 -0
  165. package/src/providers/porteden/executors.js +140 -0
  166. package/src/providers/provider-runtime.d.ts +3 -2
  167. package/src/providers/pushover/runtime.js +28 -31
  168. package/src/providers/qianfan/runtime.js +16 -19
  169. package/src/providers/qiuxiaoce/actions.d.ts +2 -0
  170. package/src/providers/qiuxiaoce/actions.js +248 -0
  171. package/src/providers/qiuxiaoce/executors.d.ts +4 -0
  172. package/src/providers/qiuxiaoce/executors.js +76 -0
  173. package/src/providers/qiuxiaoce/routes.d.ts +1 -0
  174. package/src/providers/qiuxiaoce/routes.js +20 -0
  175. package/src/providers/qqmusic/actions.d.ts +2 -0
  176. package/src/providers/qqmusic/actions.js +229 -0
  177. package/src/providers/qqmusic/executors.d.ts +4 -0
  178. package/src/providers/qqmusic/executors.js +92 -0
  179. package/src/providers/qqmusic/report-schema.d.ts +4 -0
  180. package/src/providers/qqmusic/report-schema.js +119 -0
  181. package/src/providers/rakuraku_seisan/actions.d.ts +2 -0
  182. package/src/providers/rakuraku_seisan/actions.js +50 -0
  183. package/src/providers/rakuraku_seisan/executors.d.ts +4 -0
  184. package/src/providers/rakuraku_seisan/executors.js +40 -0
  185. package/src/providers/rakuraku_seisan/runtime.d.ts +8 -0
  186. package/src/providers/rakuraku_seisan/runtime.js +251 -0
  187. package/src/providers/redfox/actions-account.d.ts +2 -0
  188. package/src/providers/redfox/actions-account.js +24 -0
  189. package/src/providers/redfox/actions-autohome.d.ts +2 -0
  190. package/src/providers/redfox/actions-autohome.js +51 -0
  191. package/src/providers/redfox/actions-baijiahao.d.ts +2 -0
  192. package/src/providers/redfox/actions-baijiahao.js +58 -0
  193. package/src/providers/redfox/actions-bilibili.d.ts +2 -0
  194. package/src/providers/redfox/actions-bilibili.js +67 -0
  195. package/src/providers/redfox/actions-dongchedi.d.ts +2 -0
  196. package/src/providers/redfox/actions-dongchedi.js +49 -0
  197. package/src/providers/redfox/actions-douyin.d.ts +2 -0
  198. package/src/providers/redfox/actions-douyin.js +297 -0
  199. package/src/providers/redfox/actions-generation.d.ts +2 -0
  200. package/src/providers/redfox/actions-generation.js +293 -0
  201. package/src/providers/redfox/actions-instagram.d.ts +2 -0
  202. package/src/providers/redfox/actions-instagram.js +49 -0
  203. package/src/providers/redfox/actions-kuaishou.d.ts +2 -0
  204. package/src/providers/redfox/actions-kuaishou.js +53 -0
  205. package/src/providers/redfox/actions-search.d.ts +2 -0
  206. package/src/providers/redfox/actions-search.js +125 -0
  207. package/src/providers/redfox/actions-tiktok.d.ts +2 -0
  208. package/src/providers/redfox/actions-tiktok.js +136 -0
  209. package/src/providers/redfox/actions-tools.d.ts +2 -0
  210. package/src/providers/redfox/actions-tools.js +151 -0
  211. package/src/providers/redfox/actions-toutiao.d.ts +2 -0
  212. package/src/providers/redfox/actions-toutiao.js +68 -0
  213. package/src/providers/redfox/actions-transcription.d.ts +2 -0
  214. package/src/providers/redfox/actions-transcription.js +165 -0
  215. package/src/providers/redfox/actions-wechat-channel.d.ts +2 -0
  216. package/src/providers/redfox/actions-wechat-channel.js +63 -0
  217. package/src/providers/redfox/actions-wechat.d.ts +2 -0
  218. package/src/providers/redfox/actions-wechat.js +302 -0
  219. package/src/providers/redfox/actions-weibo.d.ts +2 -0
  220. package/src/providers/redfox/actions-weibo.js +61 -0
  221. package/src/providers/redfox/actions-x.d.ts +2 -0
  222. package/src/providers/redfox/actions-x.js +126 -0
  223. package/src/providers/redfox/actions-xiaohongshu.d.ts +2 -0
  224. package/src/providers/redfox/actions-xiaohongshu.js +244 -0
  225. package/src/providers/redfox/actions-yiche.d.ts +2 -0
  226. package/src/providers/redfox/actions-yiche.js +59 -0
  227. package/src/providers/redfox/actions-youtube.d.ts +2 -0
  228. package/src/providers/redfox/actions-youtube.js +64 -0
  229. package/src/providers/redfox/actions-zhihu.d.ts +2 -0
  230. package/src/providers/redfox/actions-zhihu.js +26 -0
  231. package/src/providers/redfox/actions.d.ts +2 -0
  232. package/src/providers/redfox/actions.js +49 -0
  233. package/src/providers/redfox/executors.d.ts +2 -14
  234. package/src/providers/redfox/executors.js +28 -551
  235. package/src/providers/redfox/routes.d.ts +11 -0
  236. package/src/providers/redfox/routes.js +329 -0
  237. package/src/providers/redfox/runtime.d.ts +6 -0
  238. package/src/providers/redfox/runtime.js +151 -0
  239. package/src/providers/redfox/schemas.d.ts +9 -0
  240. package/src/providers/redfox/schemas.js +40 -0
  241. package/src/providers/registry.generated.js +30 -0
  242. package/src/providers/salesforce/context.d.ts +16 -0
  243. package/src/providers/salesforce/context.js +58 -0
  244. package/src/providers/salesforce/executors.d.ts +5 -0
  245. package/src/providers/salesforce/executors.js +54 -0
  246. package/src/providers/salesforce/media.d.ts +9 -0
  247. package/src/providers/salesforce/media.js +66 -0
  248. package/src/providers/salesforce/oauth.d.ts +2 -0
  249. package/src/providers/salesforce/oauth.js +89 -0
  250. package/src/providers/salesforce/runtime-analytics.d.ts +2 -0
  251. package/src/providers/salesforce/runtime-analytics.js +60 -0
  252. package/src/providers/salesforce/runtime-automation.d.ts +2 -0
  253. package/src/providers/salesforce/runtime-automation.js +64 -0
  254. package/src/providers/salesforce/runtime-base.d.ts +2 -0
  255. package/src/providers/salesforce/runtime-base.js +51 -0
  256. package/src/providers/salesforce/runtime-bulk.d.ts +2 -0
  257. package/src/providers/salesforce/runtime-bulk.js +98 -0
  258. package/src/providers/salesforce/runtime-data.d.ts +2 -0
  259. package/src/providers/salesforce/runtime-data.js +207 -0
  260. package/src/providers/salesforce/runtime-files.d.ts +2 -0
  261. package/src/providers/salesforce/runtime-files.js +108 -0
  262. package/src/providers/salesforce/transport.d.ts +9 -0
  263. package/src/providers/salesforce/transport.js +65 -0
  264. package/src/providers/sansan/actions.d.ts +2 -0
  265. package/src/providers/sansan/actions.js +165 -0
  266. package/src/providers/sansan/admin-actions.d.ts +2 -0
  267. package/src/providers/sansan/admin-actions.js +181 -0
  268. package/src/providers/sansan/admin.d.ts +2 -0
  269. package/src/providers/sansan/admin.js +42 -0
  270. package/src/providers/sansan/business-actions.d.ts +2 -0
  271. package/src/providers/sansan/business-actions.js +160 -0
  272. package/src/providers/sansan/business.d.ts +2 -0
  273. package/src/providers/sansan/business.js +51 -0
  274. package/src/providers/sansan/executors.d.ts +4 -0
  275. package/src/providers/sansan/executors.js +59 -0
  276. package/src/providers/sansan/file-schema.d.ts +2 -0
  277. package/src/providers/sansan/file-schema.js +8 -0
  278. package/src/providers/sansan/files.d.ts +11 -0
  279. package/src/providers/sansan/files.js +49 -0
  280. package/src/providers/sansan/organization-actions.d.ts +2 -0
  281. package/src/providers/sansan/organization-actions.js +198 -0
  282. package/src/providers/sansan/organization-columns.d.ts +2 -0
  283. package/src/providers/sansan/organization-columns.js +33 -0
  284. package/src/providers/sansan/organization.d.ts +2 -0
  285. package/src/providers/sansan/organization.js +88 -0
  286. package/src/providers/sansan/read.d.ts +2 -0
  287. package/src/providers/sansan/read.js +25 -0
  288. package/src/providers/sansan/request.d.ts +22 -0
  289. package/src/providers/sansan/request.js +94 -0
  290. package/src/providers/sansan/schemas.d.ts +7 -0
  291. package/src/providers/sansan/schemas.js +72 -0
  292. package/src/providers/shopee/runtime.d.ts +33 -29
  293. package/src/providers/shopee/runtime.js +166 -169
  294. package/src/providers/smarthr/actions.d.ts +2 -0
  295. package/src/providers/smarthr/actions.js +286 -0
  296. package/src/providers/smarthr/employee-runtime.d.ts +1 -0
  297. package/src/providers/smarthr/employee-runtime.js +63 -0
  298. package/src/providers/smarthr/employee-schema.d.ts +3 -0
  299. package/src/providers/smarthr/employee-schema.js +222 -0
  300. package/src/providers/smarthr/executors.d.ts +4 -0
  301. package/src/providers/smarthr/executors.js +35 -0
  302. package/src/providers/smarthr/pagination.d.ts +1 -0
  303. package/src/providers/smarthr/pagination.js +84 -0
  304. package/src/providers/smarthr/resource-routes.d.ts +16 -0
  305. package/src/providers/smarthr/resource-routes.js +163 -0
  306. package/src/providers/smarthr/runtime.d.ts +13 -0
  307. package/src/providers/smarthr/runtime.js +242 -0
  308. package/src/providers/smarthr/supplemental-actions.d.ts +2 -0
  309. package/src/providers/smarthr/supplemental-actions.js +541 -0
  310. package/src/providers/smooth/actions.d.ts +2 -0
  311. package/src/providers/smooth/actions.js +138 -0
  312. package/src/providers/smooth/executors.d.ts +4 -0
  313. package/src/providers/smooth/executors.js +102 -0
  314. package/src/providers/tapd/actions.d.ts +8 -0
  315. package/src/providers/tapd/actions.js +89 -0
  316. package/src/providers/tapd/executors.d.ts +4 -0
  317. package/src/providers/tapd/executors.js +137 -0
  318. package/src/providers/teable/runtime.js +12 -15
  319. package/src/providers/tencent_meeting_mcp/actions.d.ts +2 -0
  320. package/src/providers/tencent_meeting_mcp/actions.js +420 -0
  321. package/src/providers/tencent_meeting_mcp/executors.d.ts +4 -0
  322. package/src/providers/tencent_meeting_mcp/executors.js +117 -0
  323. package/src/providers/threatfox/executors.d.ts +4 -0
  324. package/src/providers/threatfox/executors.js +40 -0
  325. package/src/providers/threatfox/runtime.d.ts +15 -0
  326. package/src/providers/threatfox/runtime.js +128 -0
  327. package/src/providers/ticket_tailor/runtime.js +1 -1
  328. package/src/providers/ticketmaster/runtime.js +3 -6
  329. package/src/providers/timelinesai/runtime.js +13 -16
  330. package/src/providers/tradebee/actions.d.ts +2 -0
  331. package/src/providers/tradebee/actions.js +176 -0
  332. package/src/providers/tradebee/executors.d.ts +4 -0
  333. package/src/providers/tradebee/executors.js +83 -0
  334. package/src/providers/twittrapi/executors.d.ts +4 -0
  335. package/src/providers/twittrapi/executors.js +17 -0
  336. package/src/providers/twittrapi/runtime.d.ts +12 -0
  337. package/src/providers/twittrapi/runtime.js +203 -0
  338. package/src/providers/urlhaus/executors.d.ts +4 -0
  339. package/src/providers/urlhaus/executors.js +40 -0
  340. package/src/providers/urlhaus/runtime.d.ts +15 -0
  341. package/src/providers/urlhaus/runtime.js +142 -0
  342. package/src/providers/wangdian/runtime.js +16 -19
  343. package/src/providers/weread/actions.d.ts +2 -0
  344. package/src/providers/weread/actions.js +424 -0
  345. package/src/providers/weread/executors.d.ts +4 -0
  346. package/src/providers/weread/executors.js +98 -0
  347. package/src/providers/whatsapp/runtime.js +6 -1
  348. package/src/providers/workast/runtime.js +12 -17
  349. package/src/providers/youzan/runtime.js +21 -24
  350. package/src/providers/zenkit/runtime.js +13 -19
  351. package/src/providers/zhiliaobiaoxun/actions.d.ts +2 -0
  352. package/src/providers/zhiliaobiaoxun/actions.js +138 -0
  353. package/src/providers/zhiliaobiaoxun/executors.d.ts +4 -0
  354. package/src/providers/zhiliaobiaoxun/executors.js +78 -0
  355. package/src/server/api/auth.d.ts +2 -0
  356. package/src/server/api/auth.js +2 -1
  357. package/src/server/api/console-catalog-routes.d.ts +17 -0
  358. package/src/server/api/console-catalog-routes.js +88 -0
  359. package/src/server/api/console-oauth-routes.d.ts +18 -0
  360. package/src/server/api/console-oauth-routes.js +298 -0
  361. package/src/server/api/docs-routes.d.ts +12 -0
  362. package/src/server/api/docs-routes.js +38 -0
  363. package/src/server/api/http-utils.d.ts +1 -0
  364. package/src/server/api/http-utils.js +8 -0
  365. package/src/server/api/marketplace-routes.d.ts +7 -0
  366. package/src/server/api/marketplace-routes.js +62 -0
  367. package/src/server/api/mcp-routes.d.ts +18 -0
  368. package/src/server/api/mcp-routes.js +37 -0
  369. package/src/server/api/policy-routes.d.ts +13 -0
  370. package/src/server/api/policy-routes.js +50 -0
  371. package/src/server/api/policy-snapshot.d.ts +14 -0
  372. package/src/server/api/policy-snapshot.js +30 -0
  373. package/src/server/api/run-log-routes.d.ts +7 -0
  374. package/src/server/api/run-log-routes.js +70 -0
  375. package/src/server/api/runtime-api.d.ts +0 -7
  376. package/src/server/api/runtime-api.js +0 -13
  377. package/src/server/api/runtime-app-routes.d.ts +10 -0
  378. package/src/server/api/runtime-app-routes.js +72 -0
  379. package/src/server/api/runtime-catalog-routes.d.ts +37 -0
  380. package/src/server/api/runtime-catalog-routes.js +133 -0
  381. package/src/server/api/runtime-execution-routes.d.ts +16 -0
  382. package/src/server/api/runtime-execution-routes.js +198 -0
  383. package/src/server/api/saas-oauth-routes.d.ts +9 -0
  384. package/src/server/api/saas-oauth-routes.js +27 -0
  385. package/src/server/api/saas-project-routes.d.ts +7 -0
  386. package/src/server/api/saas-project-routes.js +16 -0
  387. package/src/server/api/transit-file-routes.d.ts +9 -0
  388. package/src/server/api/transit-file-routes.js +49 -0
  389. package/src/server/api/trigger-routes.d.ts +15 -0
  390. package/src/server/api/trigger-routes.js +48 -0
  391. package/src/server/connect-app.d.ts +1 -0
  392. package/src/server/connect-app.js +3 -1
  393. package/src/server/connect-server.d.ts +3 -54
  394. package/src/server/connect-server.js +95 -1148
  395. package/src/providers/fastmoss_mcp/official-tools.json +0 -2922
@@ -0,0 +1,109 @@
1
+ import { optionalRecord, optionalRawString } from "../../core/cast.js";
2
+ import { requiredInputString, ProviderRequestError, runProviderRequest, defineApiKeyProviderExecutors, defineProviderProxy, mapProviderActionHandlers, readProviderProxyErrorMessage, withRetryAfterSeconds, } from "../provider-runtime.js";
3
+ import { agentearthActions } from "./actions.js";
4
+ const baseUrl = "https://agentearth.ai/agent-api/v1/tool";
5
+ const defaultHeaders = { accept: "application/json", "content-type": "application/json" };
6
+ const endpoints = {
7
+ get_account: "account",
8
+ recommend_tools: "recommend",
9
+ list_tools: "list",
10
+ get_tool_detail: "detail",
11
+ execute_tool: "execute",
12
+ };
13
+ function executionQuery(value) {
14
+ let url;
15
+ try {
16
+ url = new URL(value);
17
+ }
18
+ catch {
19
+ throw new ProviderRequestError(400, "tool_url must be an AgentEarth execution URL", undefined, "invalid_input");
20
+ }
21
+ if (url.origin !== "https://agentearth.ai" ||
22
+ url.pathname !== "/agent-api/v1/tool/execute" ||
23
+ url.username ||
24
+ url.password ||
25
+ url.hash) {
26
+ throw new ProviderRequestError(400, "tool_url must use the official AgentEarth HTTPS execution endpoint without credentials or fragments", undefined, "invalid_input");
27
+ }
28
+ return url.search;
29
+ }
30
+ async function request({ action, input, apiKey, fetcher, parentSignal }) {
31
+ const execute = action === "execute_tool";
32
+ const post = execute || action === "recommend_tools";
33
+ const query = execute ? executionQuery(input.tool_url) : "";
34
+ const url = new URL(`${baseUrl}/${endpoints[action]}${query}`);
35
+ if (!post) {
36
+ for (const [name, value] of Object.entries(input)) {
37
+ url.searchParams.set(name, String(value));
38
+ }
39
+ }
40
+ return runProviderRequest({ signal: parentSignal, label: "AgentEarth", timeoutMs: execute ? 300_000 : undefined }, async (signal) => {
41
+ const response = await fetcher(url.toString(), {
42
+ method: post ? "POST" : "GET",
43
+ headers: { ...defaultHeaders, "X-Api-Key": apiKey },
44
+ body: post ? JSON.stringify(execute ? { params: input.params ?? {} } : input) : undefined,
45
+ redirect: "manual",
46
+ signal,
47
+ });
48
+ const text = await response.text();
49
+ let payload;
50
+ try {
51
+ payload = JSON.parse(text);
52
+ }
53
+ catch {
54
+ payload = undefined;
55
+ }
56
+ const envelope = optionalRecord(payload);
57
+ if (!response.ok || envelope?.error_no !== 0) {
58
+ const message = optionalRawString(envelope?.error_msg) || `HTTP ${response.status}; invalid or unsuccessful response`;
59
+ throw new ProviderRequestError(response.ok ? 502 : response.status, `AgentEarth request failed: ${message.split(apiKey).join("[REDACTED]")}`, undefined, response.status === 429 ? "rate_limited" : "provider_error");
60
+ }
61
+ return envelope;
62
+ });
63
+ }
64
+ const handlers = mapProviderActionHandlers("agentearth", agentearthActions, (action) => async (dataInput, context) => {
65
+ return request({
66
+ action: action.name,
67
+ input: dataInput,
68
+ apiKey: context.apiKey,
69
+ fetcher: context.fetcher,
70
+ parentSignal: context.signal,
71
+ });
72
+ });
73
+ export const executors = defineApiKeyProviderExecutors("agentearth", handlers, {
74
+ skipDnsValidation: true,
75
+ });
76
+ export const credentialValidators = {
77
+ async apiKey(input, { fetcher, signal }) {
78
+ const account = await request({
79
+ action: "get_account",
80
+ input: {},
81
+ apiKey: requiredInputString(input.apiKey, "API Key"),
82
+ fetcher: fetcher,
83
+ parentSignal: signal,
84
+ });
85
+ return {
86
+ profile: {
87
+ displayName: optionalRawString(account.user_name)?.trim() ||
88
+ optionalRawString(account.key_name)?.trim() ||
89
+ "AgentEarth API Key",
90
+ },
91
+ grantedScopes: [],
92
+ metadata: {},
93
+ };
94
+ },
95
+ };
96
+ export const proxy = defineProviderProxy({
97
+ service: "agentearth",
98
+ baseUrl,
99
+ auth: { type: "api_key_header", name: "X-Api-Key" },
100
+ skipDnsValidation: true,
101
+ customizeRequest({ headers }) {
102
+ for (const [name, value] of Object.entries({ accept: "application/json", "content-type": "application/json" }))
103
+ if (!headers.has(name))
104
+ headers.set(name, value);
105
+ },
106
+ async readError(response) {
107
+ return new ProviderRequestError(response.status, await readProviderProxyErrorMessage(response, "Provider request failed"), withRetryAfterSeconds(response), response.status === 429 ? "rate_limited" : "provider_error");
108
+ },
109
+ });
@@ -0,0 +1,2 @@
1
+ import type { ActionDefinition } from "../../core/types.ts";
2
+ export declare const appgrowingMcpActions: readonly ActionDefinition[];
@@ -0,0 +1,175 @@
1
+ import { jsonSchema as s } from "../../core/json-schema.js";
2
+ import { defineProviderAction } from "../../core/provider-definition.js";
3
+ const service = "appgrowing_mcp";
4
+ const resultSchema = s.requiredObject("The AppGrowing Global MCP tool result.", {
5
+ result: s.unknown("Structured MCP content when available; otherwise the complete MCP content envelope. Data availability and Credits depend on the connected AppGrowing Global account."),
6
+ });
7
+ const category = s.array("Store categories for the selected product type; obtain IDs from filterOptions.", s.nullableInteger("Store category ID."));
8
+ const appStyle = s.array("App styles for the selected product type; obtain IDs from filterOptions.", s.nullableInteger("App style ID."));
9
+ const area = s.array("Countries to include; obtain codes from filterOptions.", s.nullableString("Country code."));
10
+ const page = s.integer("Page number, starting at 1. Each page contains up to 100 results.", { minimum: 1 });
11
+ const creativeSearchInput = s.object("Advertising creative filters. Omit filters that do not apply to the selected product type.", {
12
+ purpose: s.withEnum(s.integer("Promoted product: 1 game, 2 app, 3 website."), [1, 2, 3]),
13
+ startDate: s.date("First date to include."),
14
+ endDate: s.date("Last date to include."),
15
+ isAllDate: s.integer("Use 1 to search all dates, or 0 to use the date range."),
16
+ category,
17
+ resourceElement: s.array("Visual element tags for games or apps.", s.nullableInteger("Visual element tag ID from filterOptions.")),
18
+ appStyle,
19
+ media: s.array("Advertising channels for the selected product type.", s.nullableInteger("Media channel ID from filterOptions.")),
20
+ area,
21
+ format: s.array("Advertising formats for the selected product type.", s.nullableInteger("Ad format ID from filterOptions.")),
22
+ platform: s.array("Promotion platforms for games or apps.", s.nullableInteger("Promotion platform ID from filterOptions.")),
23
+ language: s.array("Creative languages.", s.nullableString("Language value from filterOptions.")),
24
+ videoTime: s.integer("Video duration filter ID from filterOptions, not seconds."),
25
+ minDuration: s.string("Minimum advertising days as a numeric string.", { pattern: "^[0-9]*$" }),
26
+ maxDuration: s.string("Maximum advertising days as a numeric string.", { pattern: "^[0-9]*$" }),
27
+ accurateSearch: s.integer("Use 1 for an exact ordered keyword match, or 0 for broad matching."),
28
+ isNew: s.integer("Use 1 for new creatives only, or 0 to include existing creatives."),
29
+ isNewAd: s.integer("Use 1 for new advertisements only, or 0 to include existing advertisements."),
30
+ resolution: s.integer("Use 1 for high-definition creatives, or 0 to include other resolutions."),
31
+ keyword: s.string("Search keyword."),
32
+ order: s.stringEnum("Sort order.", [
33
+ "_score_desc",
34
+ "max_dt_desc",
35
+ "max_dt",
36
+ "min_dt_desc",
37
+ "min_dt",
38
+ "cnt_ad_id_desc",
39
+ "cnt_dt_desc",
40
+ "cnt_dt",
41
+ "impression_inc_2y_desc",
42
+ "similar_cnt_desc",
43
+ ]),
44
+ page,
45
+ isCreative: s.integer("Use 1 for innovative game or app creatives, or 0 for other creatives."),
46
+ gender: s.array("Audience genders for games or apps.", s.nullableInteger("Gender: 1 male, 2 female, 3 unknown.")),
47
+ ageRange: s.array("Audience age groups for games or apps.", s.nullableString("Age group: 13-17, 18-24, 25-34, 35-44, 45-54, 55-64 or 65+.")),
48
+ isW2a: s.integer("Use 1 for web-to-app promotion; omit to leave it unfiltered."),
49
+ excludeW2a: s.integer("For games or apps, use 0 with isW2a=1 or 1 with isW2a=0; otherwise omit."),
50
+ campaignTypeCombine: s.integer("Use 1 when filtering game or app promotion types; otherwise omit."),
51
+ campaignType: s.array("Game or app promotion types.", s.nullableInteger("Promotion type: 101/201/298/295 app downloads, 299 web-to-APK, 297 PWA/H5; omit for web-to-app.")),
52
+ platformCampaignType: s.array("Platform-specific promotion types.", s.nullableInteger("App platform: 201 Google Play, 295 Galaxy, 298 RuStore, 299 APK, 101 App Store.")),
53
+ appCashWay: s.array("Game or app monetization methods.", s.nullable(s.stringEnum("Monetization method: ads, purchases, mixed, or subscriptions.", [
54
+ "iaa",
55
+ "iap",
56
+ "iaa_iap",
57
+ "subscribable",
58
+ ]))),
59
+ materialRatio: s.array("Creative aspect ratios.", s.nullableString("Aspect ratio from filterOptions.")),
60
+ blockIds: s.array("Creative IDs to exclude.", s.nullableString("Creative ID.")),
61
+ blockAppIds: s.array("Promoted product IDs to exclude.", s.nullableString("Product ID.")),
62
+ isPre: s.integer("Use 1 for games with preregistration campaigns, or 0 for other games."),
63
+ asr: s.integer("Use 1 for narrated creatives, or 0 for creatives without narration."),
64
+ asrLanguage: s.string("Narration language from filterOptions."),
65
+ searchDsl: s.array("Field-level search conditions. The upstream equal operator may not narrow results; prefer contain when appropriate.", s.nullable(s.object("A field-level search condition.", {
66
+ key: s.stringEnum("Field to search.", [
67
+ "campaign_name",
68
+ "appid",
69
+ "slogan",
70
+ "asr",
71
+ "brands_name",
72
+ "developer_name",
73
+ "website",
74
+ ]),
75
+ type: s.stringEnum("Matching operator.", ["contain", "exclude", "equal", "notEqual"]),
76
+ value: s.string("Value to match."),
77
+ }, { required: ["key", "type", "value"] }))),
78
+ isViolation: s.integer("Use 1 for policy-violating game or app advertisements, or 0 for other advertisements."),
79
+ hasCooperate: s.integer("Use 1 for ads featuring a collaborating creator, or 0 for other ads."),
80
+ marketingWord: s.string("Game or app selling-point word returned by creativeSellingPointTrends."),
81
+ singleArea: s.integer("Use 1 for ads running in a single region, or 0 for other ads."),
82
+ postpage: s.integer("Use 1 to filter original advertising posts, or 0 for other creatives."),
83
+ hasPpid: s.integer("Custom product page filter for games or apps."),
84
+ excludeLowQuality: s.integer("Use 1 to exclude low-quality creatives, or 0 to include them. The provider excludes them by default."),
85
+ }, { required: ["purpose", "order"] });
86
+ const sellingPointInput = s.object("Selling-point trend filters for games and apps.", {
87
+ purpose: s.withEnum(s.integer("Promoted product: 1 game, 2 app."), [1, 2]),
88
+ category,
89
+ appStyle,
90
+ area,
91
+ wordAttr: s.array("Selling-point categories.", s.nullableString("Selling-point category from filterOptions.")),
92
+ keyword: s.string("Search keyword."),
93
+ order: s.stringEnum("Sort order.", [
94
+ "adverts_desc",
95
+ "material_cnt_desc",
96
+ "shot_cnt_desc",
97
+ "product_cnt_desc",
98
+ "ratio_desc",
99
+ ]),
100
+ page,
101
+ }, { required: ["purpose"] });
102
+ export const appgrowingMcpActions = [
103
+ defineProviderAction(service, {
104
+ name: "filterOptions",
105
+ operationType: "read",
106
+ description: "List the advertising filters available to your AppGrowing account. Business queries consume account credits.",
107
+ requiredScopes: [],
108
+ inputSchema: s.object("No input is required.", {}),
109
+ outputSchema: resultSchema,
110
+ }),
111
+ defineProviderAction(service, {
112
+ name: "creativeResourceUrl",
113
+ operationType: "read",
114
+ description: "Refresh expired creative download links using the resource filenames, including their extensions.",
115
+ requiredScopes: [],
116
+ inputSchema: s.object("Resources whose download links should be refreshed.", {
117
+ key: s.array("Resource filenames from expired URLs, not resource IDs.", s.nullableString("Resource filename including its extension."), { minItems: 1 }),
118
+ }, { required: ["key"] }),
119
+ outputSchema: resultSchema,
120
+ }),
121
+ defineProviderAction(service, {
122
+ name: "searchAdCreatives",
123
+ operationType: "read",
124
+ description: "Find global advertising creatives by product, audience and campaign filters. Use filterOptions for valid IDs and page to continue through results.",
125
+ requiredScopes: [],
126
+ inputSchema: creativeSearchInput,
127
+ outputSchema: resultSchema,
128
+ }),
129
+ defineProviderAction(service, {
130
+ name: "creativeSellingPointTrends",
131
+ operationType: "read",
132
+ description: "Compare selling-point trends for games and apps by category, style and country.",
133
+ requiredScopes: [],
134
+ inputSchema: sellingPointInput,
135
+ outputSchema: resultSchema,
136
+ }),
137
+ defineProviderAction(service, {
138
+ name: "creativeAIAnalysisData",
139
+ operationType: "read",
140
+ description: "Read narration, selling points and AI analysis for up to 100 creative resources. Pair each resource ID with one of its ad format IDs.",
141
+ requiredScopes: [],
142
+ inputSchema: s.object("Creative resources to analyze.", {
143
+ ids: s.array("Resource IDs from material.creative.resource[].id, in their original form.", s.string("Creative resource ID."), { minItems: 1, maxItems: 100 }),
144
+ format: s.array("One material.format[].id for each resource, in the same order as ids.", s.integer("Ad format ID."), { minItems: 1, maxItems: 100 }),
145
+ }, { required: ["ids", "format"] }),
146
+ outputSchema: resultSchema,
147
+ }),
148
+ defineProviderAction(service, {
149
+ name: "list_tools",
150
+ operationType: "read",
151
+ description: "Discover current AppGrowing Global MCP tools, live argument schemas and behavior annotations for advertising creative, app, publisher and developer research.",
152
+ requiredScopes: [],
153
+ inputSchema: s.requiredObject("No input is required.", {}),
154
+ outputSchema: s.requiredObject("The live AppGrowing Global MCP tool catalog.", {
155
+ tools: s.array("Tools available to the connected AppGrowing Global account.", s.object("One AppGrowing Global MCP tool.", {
156
+ name: s.nonEmptyString("The exact tool name."),
157
+ description: s.string("The current official tool description."),
158
+ annotations: s.looseObject("Official MCP behavior annotations."),
159
+ inputSchema: s.looseObject("The current JSON Schema for tool arguments."),
160
+ }, { optional: ["description", "annotations"] })),
161
+ }),
162
+ followUpActions: ["appgrowing_mcp.call_tool"],
163
+ }),
164
+ defineProviderAction(service, {
165
+ name: "call_tool",
166
+ operationType: "destructive",
167
+ description: "Call any current AppGrowing Global MCP tool after inspecting list_tools. Arguments must match the live schema. Calls may consume AppGrowing credits; inspect behavior annotations before invoking newly added tools.",
168
+ requiredScopes: [],
169
+ inputSchema: s.object("Call a live AppGrowing Global MCP tool.", {
170
+ toolName: s.nonEmptyString("The exact tool name returned by list_tools."),
171
+ arguments: s.looseObject("Arguments matching the selected tool's live input schema."),
172
+ }, { optional: ["arguments"] }),
173
+ outputSchema: resultSchema,
174
+ }),
175
+ ];
@@ -0,0 +1,4 @@
1
+ import type { CredentialValidators, ProviderExecutors, ProviderProxyExecutor } from "../../core/types.ts";
2
+ export declare const executors: ProviderExecutors;
3
+ export declare const credentialValidators: CredentialValidators;
4
+ export declare const proxy: ProviderProxyExecutor;
@@ -0,0 +1,66 @@
1
+ import { sha256Hex } from "../../core/aws-sigv4.js";
2
+ import { recordOrEmpty } from "../../core/cast.js";
3
+ import { callMcpTool, listMcpTools } from "../mcp-tools.js";
4
+ import { defineApiKeyProviderExecutors, defineProviderProxy, mapProviderActionHandlers, requiredInputString, ProviderRequestError, readProviderProxyErrorMessage, withRetryAfterSeconds, } from "../provider-runtime.js";
5
+ import { appgrowingMcpActions } from "./actions.js";
6
+ const origin = "https://api-appgrowing-global.youcloud.com";
7
+ const endpoint = `${origin}/mcp`;
8
+ const defaultHeaders = {
9
+ accept: "application/json, text/event-stream",
10
+ "content-type": "application/json",
11
+ "accept-language": "en",
12
+ };
13
+ const handlers = mapProviderActionHandlers("appgrowing_mcp", appgrowingMcpActions, (action) => async (input, context) => {
14
+ if (action.name === "creativeAIAnalysisData" &&
15
+ input.ids.length !== input.format.length)
16
+ throw new ProviderRequestError(400, "ids and format must have the same length");
17
+ const connection = {
18
+ service: "AppGrowing",
19
+ endpoint,
20
+ headers: { ...defaultHeaders, authorization: `Bearer ${requiredInputString(context.apiKey, "API Key")}` },
21
+ fetcher: context.fetcher,
22
+ signal: context.signal,
23
+ // Cloudflare Workers rejects `redirect: "error"`; a 3xx under "manual" still fails the MCP request.
24
+ redirect: "manual",
25
+ maxResponseBytes: 16 * 1024 * 1024,
26
+ terminateSession: true,
27
+ };
28
+ if (action.name === "list_tools")
29
+ return { tools: await listMcpTools(connection, { includeAnnotations: true }) };
30
+ return {
31
+ result: await callMcpTool({
32
+ ...connection,
33
+ toolName: action.name === "call_tool" ? requiredInputString(input.toolName, "toolName") : action.name,
34
+ arguments: action.name === "call_tool" ? recordOrEmpty(input.arguments) : input,
35
+ }),
36
+ };
37
+ });
38
+ export const executors = defineApiKeyProviderExecutors("appgrowing_mcp", handlers, {
39
+ skipDnsValidation: true,
40
+ });
41
+ export const credentialValidators = {
42
+ async apiKey(input) {
43
+ const hash = sha256Hex(requiredInputString(input.apiKey, "API Key"));
44
+ return {
45
+ profile: { accountId: `appgrowing-mcp:${hash}`, displayName: `AppGrowing Global · ${hash.slice(-6)}` },
46
+ metadata: { mcpEndpoint: endpoint, validationMode: "local_non_empty_key" },
47
+ };
48
+ },
49
+ };
50
+ export const proxy = defineProviderProxy({
51
+ service: "appgrowing_mcp",
52
+ baseUrl: origin,
53
+ auth: { type: "api_key_authorization", prefix: "Bearer " },
54
+ skipDnsValidation: true,
55
+ redirect: "manual",
56
+ customizeRequest({ url, headers }) {
57
+ if (url.href !== endpoint)
58
+ throw new ProviderRequestError(400, "AppGrowing proxy only supports the official /mcp endpoint without query parameters");
59
+ for (const [name, value] of Object.entries(defaultHeaders))
60
+ if (!headers.has(name))
61
+ headers.set(name, value);
62
+ },
63
+ async readError(response) {
64
+ return new ProviderRequestError(response.status, await readProviderProxyErrorMessage(response, "MCP proxy request failed"), withRetryAfterSeconds(response), response.status === 429 ? "rate_limited" : "provider_error");
65
+ },
66
+ });
@@ -0,0 +1,3 @@
1
+ import type { CredentialValidators, ProviderExecutors } from "../../core/types.ts";
2
+ export declare const executors: ProviderExecutors;
3
+ export declare const credentialValidators: CredentialValidators;
@@ -0,0 +1,8 @@
1
+ import { defineApiKeyProviderExecutors } from "../provider-runtime.js";
2
+ import { arcmiraActionHandlers, validateArcmiraCredential } from "./runtime.js";
3
+ export const executors = defineApiKeyProviderExecutors("arcmira", arcmiraActionHandlers);
4
+ export const credentialValidators = {
5
+ apiKey(input, { fetcher, signal }) {
6
+ return validateArcmiraCredential({ apiKey: input.apiKey, fetcher, signal });
7
+ },
8
+ };
@@ -0,0 +1,6 @@
1
+ import type { CredentialValidationResult } from "../../core/types.ts";
2
+ import type { ApiKeyProviderContext, ProviderActionHandlers } from "../provider-runtime.ts";
3
+ type Handler = (input: Record<string, unknown>, context: ApiKeyProviderContext) => Promise<unknown>;
4
+ export declare const arcmiraActionHandlers: ProviderActionHandlers<"arcmira", Handler>;
5
+ export declare function validateArcmiraCredential(context: ApiKeyProviderContext): Promise<CredentialValidationResult>;
6
+ export {};
@@ -0,0 +1,41 @@
1
+ import { optionalRecord, optionalString, requiredString, requiredStringArray } from "../../core/cast.js";
2
+ import { ProviderRequestError, providerResponseError, readProviderJsonBody, runProviderRequest, withRetryAfterSeconds, } from "../provider-runtime.js";
3
+ async function requestArcmira(context, path, input = {}) {
4
+ const url = new URL(`https://api.arcmira.com/v1/${path}`);
5
+ for (const [key, value] of Object.entries(input)) {
6
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
7
+ url.searchParams.set(key, String(value));
8
+ }
9
+ }
10
+ return runProviderRequest({ label: "Arcmira", signal: context.signal }, async (signal) => {
11
+ const response = await context.fetcher(url.toString(), {
12
+ headers: { Authorization: `Bearer ${context.apiKey}`, Accept: "application/json" },
13
+ signal,
14
+ });
15
+ const payload = await readProviderJsonBody(response, {
16
+ emptyBody: null,
17
+ invalidJsonMessage: "Arcmira returned invalid JSON",
18
+ });
19
+ if (!response.ok) {
20
+ const error = optionalRecord(optionalRecord(payload)?.error);
21
+ const status = response.status;
22
+ throw new ProviderRequestError(status, optionalString(error?.message) ?? `Arcmira returned HTTP ${response.status}`, withRetryAfterSeconds(response, payload), status === 402 ? "insufficient_credit" : status === 429 ? "rate_limited" : "provider_error");
23
+ }
24
+ return payload;
25
+ });
26
+ }
27
+ export const arcmiraActionHandlers = {
28
+ get_account: (_input, context) => requestArcmira(context, "me"),
29
+ resolve_entity: (input, context) => requestArcmira(context, "entities/resolve", input),
30
+ search_transcripts: (input, context) => requestArcmira(context, "search", input),
31
+ get_transcript: ({ video_id, ...query }, context) => requestArcmira(context, `transcripts/${encodeURIComponent(requiredString(video_id, "video_id"))}`, query),
32
+ };
33
+ export async function validateArcmiraCredential(context) {
34
+ const payload = optionalRecord(await requestArcmira(context, "me", {}));
35
+ const account = optionalRecord(payload?.account);
36
+ const accountId = requiredString(account?.id, "Arcmira account ID", providerResponseError);
37
+ return {
38
+ profile: { accountId, displayName: optionalString(account?.name) ?? accountId },
39
+ grantedScopes: requiredStringArray(payload?.scopes, "Arcmira scopes", providerResponseError),
40
+ };
41
+ }
@@ -0,0 +1,2 @@
1
+ import type { ActionDefinition } from "../../core/types.ts";
2
+ export declare const bainiuActions: ActionDefinition[];
@@ -0,0 +1,108 @@
1
+ import { jsonSchema as s } from "../../core/json-schema.js";
2
+ import { defineProviderAction } from "../../core/provider-definition.js";
3
+ const keyFields = {
4
+ key: s.string("Company identifier, name, unified social credit code, registration number or organization code.", {
5
+ minLength: 1,
6
+ }),
7
+ key_type: s.stringEnum("Identifier type: 0 entity ID (default), 1 company name, 2 unified social credit code, 3 registration number, 4 organization code.", ["0", "1", "2", "3", "4"]),
8
+ };
9
+ const pagination = {
10
+ page_index: s.integer("Page number, starting at 1. Omit for the provider default.", {
11
+ minimum: 1,
12
+ }),
13
+ page_size: s.integer("Number of records per page. Omit for the provider default.", {
14
+ minimum: 1,
15
+ }),
16
+ };
17
+ const record = s.looseObject("One upstream company record, including provider-specific fields.");
18
+ const page = s.looseObject("A page of upstream records.", {
19
+ datalist: s.array("Records on this page.", record),
20
+ total: s.integer("Total matching records."),
21
+ });
22
+ function companyResponse(result) {
23
+ return s.object("Bainiu response envelope; upstream fields are preserved.", {
24
+ code: s.string("Upstream response code; 200 indicates success."),
25
+ message: s.string("Upstream response message."),
26
+ result,
27
+ ordernum: s.string("Upstream request or order identifier."),
28
+ is_verify: s.string("Billing indicator: 0 not charged, 1 charged."),
29
+ }, { required: ["code", "message", "result"], additionalProperties: true });
30
+ }
31
+ export const bainiuActions = [
32
+ defineProviderAction("bainiu", {
33
+ name: "resolve_companies",
34
+ operationType: "read",
35
+ requiredScopes: [],
36
+ description: "Resolve company identifiers in a batch. Separate multiple lookup keys with commas; queries may consume provider credits.",
37
+ inputSchema: s.object("Company identifier lookup parameters.", keyFields, {
38
+ optional: ["key_type"],
39
+ }),
40
+ outputSchema: companyResponse(s.record("Mapping from each lookup key to its entity ID.", s.string("Company entity ID."))),
41
+ }),
42
+ defineProviderAction("bainiu", {
43
+ name: "search_companies",
44
+ operationType: "read",
45
+ requiredScopes: [],
46
+ description: "Search companies using Bainiu's DSL with filters, sorting, highlighting and pagination. Queries may consume provider credits.",
47
+ inputSchema: s.requiredObject("Company search parameters.", {
48
+ data: s.object("Search request encoded as JSON by Connector. Supports the full upstream query DSL and additional provider options.", {
49
+ dsl_query: s.looseObject('Bainiu filter tree, using must/should and field operators any/all/not/range/exist. Example: {"must":[{"main__ENTNAME":{"all":["小米"]}}]}.'),
50
+ sort: s.looseObject("Upstream sort configuration, including algorithm or geographical sorting."),
51
+ highlight: s.looseObject("Upstream highlight configuration."),
52
+ ...pagination,
53
+ }, { required: ["dsl_query"], additionalProperties: true }),
54
+ }),
55
+ outputSchema: companyResponse(page),
56
+ }),
57
+ defineProviderAction("bainiu", {
58
+ name: "get_company",
59
+ operationType: "read",
60
+ requiredScopes: [],
61
+ description: "Read company registration and business information. Queries may consume provider credits.",
62
+ inputSchema: s.object("Company detail lookup parameters.", keyFields, { required: ["key"] }),
63
+ outputSchema: companyResponse(s.looseObject("Requested company detail nodes.", {
64
+ versions: s.array("Returned detail node codes.", s.string("Detail node code.")),
65
+ basic: record,
66
+ })),
67
+ }),
68
+ defineProviderAction("bainiu", {
69
+ name: "list_company_branches",
70
+ operationType: "read",
71
+ requiredScopes: [],
72
+ description: "List company branches with pagination. Queries may consume provider credits.",
73
+ inputSchema: s.object("Company detail lookup parameters.", { ...keyFields, ...pagination }, { required: ["key"] }),
74
+ outputSchema: companyResponse(s.looseObject("Requested company detail nodes.", {
75
+ versions: s.array("Returned detail node codes.", s.string("Detail node code.")),
76
+ filiation: page,
77
+ })),
78
+ }),
79
+ defineProviderAction("bainiu", {
80
+ name: "list_company_shareholders",
81
+ operationType: "read",
82
+ requiredScopes: [],
83
+ description: "List company shareholders and managers with pagination. Queries may consume provider credits.",
84
+ inputSchema: s.object("Company detail lookup parameters.", { ...keyFields, ...pagination }, { required: ["key"] }),
85
+ outputSchema: companyResponse(s.looseObject("Requested company detail nodes.", {
86
+ versions: s.array("Returned detail node codes.", s.string("Detail node code.")),
87
+ shareholder: page,
88
+ person: page,
89
+ })),
90
+ }),
91
+ defineProviderAction("bainiu", {
92
+ name: "list_company_changes",
93
+ operationType: "read",
94
+ requiredScopes: [],
95
+ description: "List company registration changes with optional type and date filters. Queries may consume provider credits.",
96
+ inputSchema: s.object("Company detail lookup parameters.", {
97
+ ...keyFields,
98
+ ...pagination,
99
+ alttype: s.string("Upstream change type code, for example 01 name, 03 representative, 10 business scope or 20 registered capital."),
100
+ altdate_start: s.date("Inclusive change date lower bound (YYYY-MM-DD)."),
101
+ altdate_end: s.date("Exclusive change date upper bound (YYYY-MM-DD)."),
102
+ }, { required: ["key"] }),
103
+ outputSchema: companyResponse(s.looseObject("Requested company detail nodes.", {
104
+ versions: s.array("Returned detail node codes.", s.string("Detail node code.")),
105
+ alter: page,
106
+ })),
107
+ }),
108
+ ];
@@ -0,0 +1,4 @@
1
+ import type { CredentialValidators, ProviderExecutors, ProviderProxyExecutor } from "../../core/types.ts";
2
+ export declare const executors: ProviderExecutors;
3
+ export declare const credentialValidators: CredentialValidators;
4
+ export declare const proxy: ProviderProxyExecutor;