dodopayments-mcp 2.6.1 → 2.7.0

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 (701) hide show
  1. package/code-tool-types.d.mts +2 -0
  2. package/code-tool-types.d.mts.map +1 -1
  3. package/code-tool-types.d.ts +2 -0
  4. package/code-tool-types.d.ts.map +1 -1
  5. package/code-tool.d.mts +44 -2
  6. package/code-tool.d.mts.map +1 -1
  7. package/code-tool.d.ts +44 -2
  8. package/code-tool.d.ts.map +1 -1
  9. package/code-tool.js +25 -130
  10. package/code-tool.js.map +1 -1
  11. package/code-tool.mjs +25 -97
  12. package/code-tool.mjs.map +1 -1
  13. package/docs-search-tool.d.mts +12 -6
  14. package/docs-search-tool.d.mts.map +1 -1
  15. package/docs-search-tool.d.ts +12 -6
  16. package/docs-search-tool.d.ts.map +1 -1
  17. package/docs-search-tool.js +3 -0
  18. package/docs-search-tool.js.map +1 -1
  19. package/docs-search-tool.mjs +3 -0
  20. package/docs-search-tool.mjs.map +1 -1
  21. package/package.json +3 -19
  22. package/server.js +1 -1
  23. package/server.mjs +1 -1
  24. package/src/code-tool-types.ts +5 -1
  25. package/src/code-tool.ts +35 -122
  26. package/src/docs-search-tool.ts +7 -0
  27. package/src/server.ts +1 -1
  28. package/src/tools/addons/create-addons.ts +1 -1
  29. package/src/tools/addons/list-addons.ts +1 -1
  30. package/src/tools/addons/retrieve-addons.ts +1 -1
  31. package/src/tools/addons/update-addons.ts +1 -1
  32. package/src/tools/addons/update-images-addons.ts +1 -1
  33. package/src/tools/brands/create-brands.ts +1 -1
  34. package/src/tools/brands/list-brands.ts +1 -1
  35. package/src/tools/brands/retrieve-brands.ts +1 -1
  36. package/src/tools/brands/update-brands.ts +1 -1
  37. package/src/tools/brands/update-images-brands.ts +1 -1
  38. package/src/tools/checkout-sessions/create-checkout-sessions.ts +9 -2
  39. package/src/tools/checkout-sessions/retrieve-checkout-sessions.ts +1 -1
  40. package/src/tools/customers/create-customers.ts +1 -1
  41. package/src/tools/customers/customer-portal/create-customers-customer-portal.ts +1 -1
  42. package/src/tools/customers/list-customers.ts +1 -1
  43. package/src/tools/customers/retrieve-customers.ts +1 -1
  44. package/src/tools/customers/retrieve-payment-methods-customers.ts +1 -1
  45. package/src/tools/customers/update-customers.ts +1 -1
  46. package/src/tools/customers/wallets/ledger-entries/create-wallets-customers-ledger-entries.ts +1 -1
  47. package/src/tools/customers/wallets/ledger-entries/list-wallets-customers-ledger-entries.ts +1 -1
  48. package/src/tools/customers/wallets/list-customers-wallets.ts +1 -1
  49. package/src/tools/discounts/create-discounts.ts +1 -1
  50. package/src/tools/discounts/list-discounts.ts +1 -1
  51. package/src/tools/discounts/retrieve-discounts.ts +1 -1
  52. package/src/tools/discounts/update-discounts.ts +1 -1
  53. package/src/tools/disputes/list-disputes.ts +1 -1
  54. package/src/tools/disputes/retrieve-disputes.ts +1 -1
  55. package/src/tools/license-key-instances/list-license-key-instances.ts +1 -1
  56. package/src/tools/license-key-instances/retrieve-license-key-instances.ts +1 -1
  57. package/src/tools/license-key-instances/update-license-key-instances.ts +1 -1
  58. package/src/tools/license-keys/list-license-keys.ts +1 -1
  59. package/src/tools/license-keys/retrieve-license-keys.ts +1 -1
  60. package/src/tools/license-keys/update-license-keys.ts +1 -1
  61. package/src/tools/licenses/activate-licenses.ts +1 -1
  62. package/src/tools/licenses/validate-licenses.ts +1 -1
  63. package/src/tools/meters/create-meters.ts +9 -2
  64. package/src/tools/meters/list-meters.ts +9 -2
  65. package/src/tools/meters/retrieve-meters.ts +9 -2
  66. package/src/tools/misc/list-supported-countries-misc.ts +1 -1
  67. package/src/tools/payments/create-payments.ts +9 -2
  68. package/src/tools/payments/list-payments.ts +1 -1
  69. package/src/tools/payments/retrieve-line-items-payments.ts +1 -1
  70. package/src/tools/payments/retrieve-payments.ts +9 -2
  71. package/src/tools/payouts/list-payouts.ts +1 -1
  72. package/src/tools/products/create-products.ts +9 -2
  73. package/src/tools/products/images/update-products-images.ts +1 -1
  74. package/src/tools/products/list-products.ts +9 -2
  75. package/src/tools/products/retrieve-products.ts +9 -2
  76. package/src/tools/products/update-files-products.ts +1 -1
  77. package/src/tools/refunds/create-refunds.ts +1 -1
  78. package/src/tools/refunds/list-refunds.ts +1 -1
  79. package/src/tools/refunds/retrieve-refunds.ts +1 -1
  80. package/src/tools/subscriptions/charge-subscriptions.ts +1 -1
  81. package/src/tools/subscriptions/create-subscriptions.ts +9 -2
  82. package/src/tools/subscriptions/list-subscriptions.ts +9 -2
  83. package/src/tools/subscriptions/retrieve-subscriptions.ts +9 -2
  84. package/src/tools/subscriptions/retrieve-usage-history-subscriptions.ts +1 -1
  85. package/src/tools/subscriptions/update-payment-method-subscriptions.ts +1 -1
  86. package/src/tools/subscriptions/update-subscriptions.ts +9 -2
  87. package/src/tools/usage-events/ingest-usage-events.ts +1 -1
  88. package/src/tools/usage-events/list-usage-events.ts +1 -1
  89. package/src/tools/usage-events/retrieve-usage-events.ts +1 -1
  90. package/src/tools/webhooks/create-webhooks.ts +1 -1
  91. package/src/tools/webhooks/headers/retrieve-webhooks-headers.ts +1 -1
  92. package/src/tools/webhooks/list-webhooks.ts +1 -1
  93. package/src/tools/webhooks/retrieve-secret-webhooks.ts +1 -1
  94. package/src/tools/webhooks/retrieve-webhooks.ts +1 -1
  95. package/src/tools/webhooks/update-webhooks.ts +1 -1
  96. package/tools/addons/create-addons.d.mts +12 -6
  97. package/tools/addons/create-addons.d.mts.map +1 -1
  98. package/tools/addons/create-addons.d.ts +12 -6
  99. package/tools/addons/create-addons.d.ts.map +1 -1
  100. package/tools/addons/create-addons.js +5 -1
  101. package/tools/addons/create-addons.js.map +1 -1
  102. package/tools/addons/create-addons.mjs +2 -1
  103. package/tools/addons/create-addons.mjs.map +1 -1
  104. package/tools/addons/list-addons.d.mts +12 -6
  105. package/tools/addons/list-addons.d.mts.map +1 -1
  106. package/tools/addons/list-addons.d.ts +12 -6
  107. package/tools/addons/list-addons.d.ts.map +1 -1
  108. package/tools/addons/list-addons.js +5 -1
  109. package/tools/addons/list-addons.js.map +1 -1
  110. package/tools/addons/list-addons.mjs +2 -1
  111. package/tools/addons/list-addons.mjs.map +1 -1
  112. package/tools/addons/retrieve-addons.d.mts +12 -6
  113. package/tools/addons/retrieve-addons.d.mts.map +1 -1
  114. package/tools/addons/retrieve-addons.d.ts +12 -6
  115. package/tools/addons/retrieve-addons.d.ts.map +1 -1
  116. package/tools/addons/retrieve-addons.js +5 -1
  117. package/tools/addons/retrieve-addons.js.map +1 -1
  118. package/tools/addons/retrieve-addons.mjs +2 -1
  119. package/tools/addons/retrieve-addons.mjs.map +1 -1
  120. package/tools/addons/update-addons.d.mts +12 -6
  121. package/tools/addons/update-addons.d.mts.map +1 -1
  122. package/tools/addons/update-addons.d.ts +12 -6
  123. package/tools/addons/update-addons.d.ts.map +1 -1
  124. package/tools/addons/update-addons.js +5 -1
  125. package/tools/addons/update-addons.js.map +1 -1
  126. package/tools/addons/update-addons.mjs +2 -1
  127. package/tools/addons/update-addons.mjs.map +1 -1
  128. package/tools/addons/update-images-addons.d.mts +12 -6
  129. package/tools/addons/update-images-addons.d.mts.map +1 -1
  130. package/tools/addons/update-images-addons.d.ts +12 -6
  131. package/tools/addons/update-images-addons.d.ts.map +1 -1
  132. package/tools/addons/update-images-addons.js +5 -1
  133. package/tools/addons/update-images-addons.js.map +1 -1
  134. package/tools/addons/update-images-addons.mjs +2 -1
  135. package/tools/addons/update-images-addons.mjs.map +1 -1
  136. package/tools/brands/create-brands.d.mts +12 -6
  137. package/tools/brands/create-brands.d.mts.map +1 -1
  138. package/tools/brands/create-brands.d.ts +12 -6
  139. package/tools/brands/create-brands.d.ts.map +1 -1
  140. package/tools/brands/create-brands.js +5 -1
  141. package/tools/brands/create-brands.js.map +1 -1
  142. package/tools/brands/create-brands.mjs +2 -1
  143. package/tools/brands/create-brands.mjs.map +1 -1
  144. package/tools/brands/list-brands.d.mts +12 -6
  145. package/tools/brands/list-brands.d.mts.map +1 -1
  146. package/tools/brands/list-brands.d.ts +12 -6
  147. package/tools/brands/list-brands.d.ts.map +1 -1
  148. package/tools/brands/list-brands.js +5 -1
  149. package/tools/brands/list-brands.js.map +1 -1
  150. package/tools/brands/list-brands.mjs +2 -1
  151. package/tools/brands/list-brands.mjs.map +1 -1
  152. package/tools/brands/retrieve-brands.d.mts +12 -6
  153. package/tools/brands/retrieve-brands.d.mts.map +1 -1
  154. package/tools/brands/retrieve-brands.d.ts +12 -6
  155. package/tools/brands/retrieve-brands.d.ts.map +1 -1
  156. package/tools/brands/retrieve-brands.js +5 -1
  157. package/tools/brands/retrieve-brands.js.map +1 -1
  158. package/tools/brands/retrieve-brands.mjs +2 -1
  159. package/tools/brands/retrieve-brands.mjs.map +1 -1
  160. package/tools/brands/update-brands.d.mts +12 -6
  161. package/tools/brands/update-brands.d.mts.map +1 -1
  162. package/tools/brands/update-brands.d.ts +12 -6
  163. package/tools/brands/update-brands.d.ts.map +1 -1
  164. package/tools/brands/update-brands.js +5 -1
  165. package/tools/brands/update-brands.js.map +1 -1
  166. package/tools/brands/update-brands.mjs +2 -1
  167. package/tools/brands/update-brands.mjs.map +1 -1
  168. package/tools/brands/update-images-brands.d.mts +12 -6
  169. package/tools/brands/update-images-brands.d.mts.map +1 -1
  170. package/tools/brands/update-images-brands.d.ts +12 -6
  171. package/tools/brands/update-images-brands.d.ts.map +1 -1
  172. package/tools/brands/update-images-brands.js +5 -1
  173. package/tools/brands/update-images-brands.js.map +1 -1
  174. package/tools/brands/update-images-brands.mjs +2 -1
  175. package/tools/brands/update-images-brands.mjs.map +1 -1
  176. package/tools/checkout-sessions/create-checkout-sessions.d.mts +12 -6
  177. package/tools/checkout-sessions/create-checkout-sessions.d.mts.map +1 -1
  178. package/tools/checkout-sessions/create-checkout-sessions.d.ts +12 -6
  179. package/tools/checkout-sessions/create-checkout-sessions.d.ts.map +1 -1
  180. package/tools/checkout-sessions/create-checkout-sessions.js +13 -1
  181. package/tools/checkout-sessions/create-checkout-sessions.js.map +1 -1
  182. package/tools/checkout-sessions/create-checkout-sessions.mjs +11 -2
  183. package/tools/checkout-sessions/create-checkout-sessions.mjs.map +1 -1
  184. package/tools/checkout-sessions/retrieve-checkout-sessions.d.mts +12 -6
  185. package/tools/checkout-sessions/retrieve-checkout-sessions.d.mts.map +1 -1
  186. package/tools/checkout-sessions/retrieve-checkout-sessions.d.ts +12 -6
  187. package/tools/checkout-sessions/retrieve-checkout-sessions.d.ts.map +1 -1
  188. package/tools/checkout-sessions/retrieve-checkout-sessions.js +5 -1
  189. package/tools/checkout-sessions/retrieve-checkout-sessions.js.map +1 -1
  190. package/tools/checkout-sessions/retrieve-checkout-sessions.mjs +2 -1
  191. package/tools/checkout-sessions/retrieve-checkout-sessions.mjs.map +1 -1
  192. package/tools/customers/create-customers.d.mts +12 -6
  193. package/tools/customers/create-customers.d.mts.map +1 -1
  194. package/tools/customers/create-customers.d.ts +12 -6
  195. package/tools/customers/create-customers.d.ts.map +1 -1
  196. package/tools/customers/create-customers.js +5 -1
  197. package/tools/customers/create-customers.js.map +1 -1
  198. package/tools/customers/create-customers.mjs +2 -1
  199. package/tools/customers/create-customers.mjs.map +1 -1
  200. package/tools/customers/customer-portal/create-customers-customer-portal.d.mts +12 -6
  201. package/tools/customers/customer-portal/create-customers-customer-portal.d.mts.map +1 -1
  202. package/tools/customers/customer-portal/create-customers-customer-portal.d.ts +12 -6
  203. package/tools/customers/customer-portal/create-customers-customer-portal.d.ts.map +1 -1
  204. package/tools/customers/customer-portal/create-customers-customer-portal.js +5 -1
  205. package/tools/customers/customer-portal/create-customers-customer-portal.js.map +1 -1
  206. package/tools/customers/customer-portal/create-customers-customer-portal.mjs +2 -1
  207. package/tools/customers/customer-portal/create-customers-customer-portal.mjs.map +1 -1
  208. package/tools/customers/list-customers.d.mts +12 -6
  209. package/tools/customers/list-customers.d.mts.map +1 -1
  210. package/tools/customers/list-customers.d.ts +12 -6
  211. package/tools/customers/list-customers.d.ts.map +1 -1
  212. package/tools/customers/list-customers.js +5 -1
  213. package/tools/customers/list-customers.js.map +1 -1
  214. package/tools/customers/list-customers.mjs +2 -1
  215. package/tools/customers/list-customers.mjs.map +1 -1
  216. package/tools/customers/retrieve-customers.d.mts +12 -6
  217. package/tools/customers/retrieve-customers.d.mts.map +1 -1
  218. package/tools/customers/retrieve-customers.d.ts +12 -6
  219. package/tools/customers/retrieve-customers.d.ts.map +1 -1
  220. package/tools/customers/retrieve-customers.js +5 -1
  221. package/tools/customers/retrieve-customers.js.map +1 -1
  222. package/tools/customers/retrieve-customers.mjs +2 -1
  223. package/tools/customers/retrieve-customers.mjs.map +1 -1
  224. package/tools/customers/retrieve-payment-methods-customers.d.mts +12 -6
  225. package/tools/customers/retrieve-payment-methods-customers.d.mts.map +1 -1
  226. package/tools/customers/retrieve-payment-methods-customers.d.ts +12 -6
  227. package/tools/customers/retrieve-payment-methods-customers.d.ts.map +1 -1
  228. package/tools/customers/retrieve-payment-methods-customers.js +5 -1
  229. package/tools/customers/retrieve-payment-methods-customers.js.map +1 -1
  230. package/tools/customers/retrieve-payment-methods-customers.mjs +2 -1
  231. package/tools/customers/retrieve-payment-methods-customers.mjs.map +1 -1
  232. package/tools/customers/update-customers.d.mts +12 -6
  233. package/tools/customers/update-customers.d.mts.map +1 -1
  234. package/tools/customers/update-customers.d.ts +12 -6
  235. package/tools/customers/update-customers.d.ts.map +1 -1
  236. package/tools/customers/update-customers.js +5 -1
  237. package/tools/customers/update-customers.js.map +1 -1
  238. package/tools/customers/update-customers.mjs +2 -1
  239. package/tools/customers/update-customers.mjs.map +1 -1
  240. package/tools/customers/wallets/ledger-entries/create-wallets-customers-ledger-entries.d.mts +12 -6
  241. package/tools/customers/wallets/ledger-entries/create-wallets-customers-ledger-entries.d.mts.map +1 -1
  242. package/tools/customers/wallets/ledger-entries/create-wallets-customers-ledger-entries.d.ts +12 -6
  243. package/tools/customers/wallets/ledger-entries/create-wallets-customers-ledger-entries.d.ts.map +1 -1
  244. package/tools/customers/wallets/ledger-entries/create-wallets-customers-ledger-entries.js +5 -1
  245. package/tools/customers/wallets/ledger-entries/create-wallets-customers-ledger-entries.js.map +1 -1
  246. package/tools/customers/wallets/ledger-entries/create-wallets-customers-ledger-entries.mjs +2 -1
  247. package/tools/customers/wallets/ledger-entries/create-wallets-customers-ledger-entries.mjs.map +1 -1
  248. package/tools/customers/wallets/ledger-entries/list-wallets-customers-ledger-entries.d.mts +12 -6
  249. package/tools/customers/wallets/ledger-entries/list-wallets-customers-ledger-entries.d.mts.map +1 -1
  250. package/tools/customers/wallets/ledger-entries/list-wallets-customers-ledger-entries.d.ts +12 -6
  251. package/tools/customers/wallets/ledger-entries/list-wallets-customers-ledger-entries.d.ts.map +1 -1
  252. package/tools/customers/wallets/ledger-entries/list-wallets-customers-ledger-entries.js +5 -1
  253. package/tools/customers/wallets/ledger-entries/list-wallets-customers-ledger-entries.js.map +1 -1
  254. package/tools/customers/wallets/ledger-entries/list-wallets-customers-ledger-entries.mjs +2 -1
  255. package/tools/customers/wallets/ledger-entries/list-wallets-customers-ledger-entries.mjs.map +1 -1
  256. package/tools/customers/wallets/list-customers-wallets.d.mts +12 -6
  257. package/tools/customers/wallets/list-customers-wallets.d.mts.map +1 -1
  258. package/tools/customers/wallets/list-customers-wallets.d.ts +12 -6
  259. package/tools/customers/wallets/list-customers-wallets.d.ts.map +1 -1
  260. package/tools/customers/wallets/list-customers-wallets.js +5 -1
  261. package/tools/customers/wallets/list-customers-wallets.js.map +1 -1
  262. package/tools/customers/wallets/list-customers-wallets.mjs +2 -1
  263. package/tools/customers/wallets/list-customers-wallets.mjs.map +1 -1
  264. package/tools/discounts/create-discounts.d.mts +12 -6
  265. package/tools/discounts/create-discounts.d.mts.map +1 -1
  266. package/tools/discounts/create-discounts.d.ts +12 -6
  267. package/tools/discounts/create-discounts.d.ts.map +1 -1
  268. package/tools/discounts/create-discounts.js +5 -1
  269. package/tools/discounts/create-discounts.js.map +1 -1
  270. package/tools/discounts/create-discounts.mjs +2 -1
  271. package/tools/discounts/create-discounts.mjs.map +1 -1
  272. package/tools/discounts/delete-discounts.d.mts +12 -6
  273. package/tools/discounts/delete-discounts.d.mts.map +1 -1
  274. package/tools/discounts/delete-discounts.d.ts +12 -6
  275. package/tools/discounts/delete-discounts.d.ts.map +1 -1
  276. package/tools/discounts/list-discounts.d.mts +12 -6
  277. package/tools/discounts/list-discounts.d.mts.map +1 -1
  278. package/tools/discounts/list-discounts.d.ts +12 -6
  279. package/tools/discounts/list-discounts.d.ts.map +1 -1
  280. package/tools/discounts/list-discounts.js +5 -1
  281. package/tools/discounts/list-discounts.js.map +1 -1
  282. package/tools/discounts/list-discounts.mjs +2 -1
  283. package/tools/discounts/list-discounts.mjs.map +1 -1
  284. package/tools/discounts/retrieve-discounts.d.mts +12 -6
  285. package/tools/discounts/retrieve-discounts.d.mts.map +1 -1
  286. package/tools/discounts/retrieve-discounts.d.ts +12 -6
  287. package/tools/discounts/retrieve-discounts.d.ts.map +1 -1
  288. package/tools/discounts/retrieve-discounts.js +5 -1
  289. package/tools/discounts/retrieve-discounts.js.map +1 -1
  290. package/tools/discounts/retrieve-discounts.mjs +2 -1
  291. package/tools/discounts/retrieve-discounts.mjs.map +1 -1
  292. package/tools/discounts/update-discounts.d.mts +12 -6
  293. package/tools/discounts/update-discounts.d.mts.map +1 -1
  294. package/tools/discounts/update-discounts.d.ts +12 -6
  295. package/tools/discounts/update-discounts.d.ts.map +1 -1
  296. package/tools/discounts/update-discounts.js +5 -1
  297. package/tools/discounts/update-discounts.js.map +1 -1
  298. package/tools/discounts/update-discounts.mjs +2 -1
  299. package/tools/discounts/update-discounts.mjs.map +1 -1
  300. package/tools/disputes/list-disputes.d.mts +12 -6
  301. package/tools/disputes/list-disputes.d.mts.map +1 -1
  302. package/tools/disputes/list-disputes.d.ts +12 -6
  303. package/tools/disputes/list-disputes.d.ts.map +1 -1
  304. package/tools/disputes/list-disputes.js +5 -1
  305. package/tools/disputes/list-disputes.js.map +1 -1
  306. package/tools/disputes/list-disputes.mjs +2 -1
  307. package/tools/disputes/list-disputes.mjs.map +1 -1
  308. package/tools/disputes/retrieve-disputes.d.mts +12 -6
  309. package/tools/disputes/retrieve-disputes.d.mts.map +1 -1
  310. package/tools/disputes/retrieve-disputes.d.ts +12 -6
  311. package/tools/disputes/retrieve-disputes.d.ts.map +1 -1
  312. package/tools/disputes/retrieve-disputes.js +5 -1
  313. package/tools/disputes/retrieve-disputes.js.map +1 -1
  314. package/tools/disputes/retrieve-disputes.mjs +2 -1
  315. package/tools/disputes/retrieve-disputes.mjs.map +1 -1
  316. package/tools/invoices/payments/retrieve-invoices-payments.d.mts +12 -6
  317. package/tools/invoices/payments/retrieve-invoices-payments.d.mts.map +1 -1
  318. package/tools/invoices/payments/retrieve-invoices-payments.d.ts +12 -6
  319. package/tools/invoices/payments/retrieve-invoices-payments.d.ts.map +1 -1
  320. package/tools/invoices/payments/retrieve-refund-invoices-payments.d.mts +12 -6
  321. package/tools/invoices/payments/retrieve-refund-invoices-payments.d.mts.map +1 -1
  322. package/tools/invoices/payments/retrieve-refund-invoices-payments.d.ts +12 -6
  323. package/tools/invoices/payments/retrieve-refund-invoices-payments.d.ts.map +1 -1
  324. package/tools/license-key-instances/list-license-key-instances.d.mts +12 -6
  325. package/tools/license-key-instances/list-license-key-instances.d.mts.map +1 -1
  326. package/tools/license-key-instances/list-license-key-instances.d.ts +12 -6
  327. package/tools/license-key-instances/list-license-key-instances.d.ts.map +1 -1
  328. package/tools/license-key-instances/list-license-key-instances.js +5 -1
  329. package/tools/license-key-instances/list-license-key-instances.js.map +1 -1
  330. package/tools/license-key-instances/list-license-key-instances.mjs +2 -1
  331. package/tools/license-key-instances/list-license-key-instances.mjs.map +1 -1
  332. package/tools/license-key-instances/retrieve-license-key-instances.d.mts +12 -6
  333. package/tools/license-key-instances/retrieve-license-key-instances.d.mts.map +1 -1
  334. package/tools/license-key-instances/retrieve-license-key-instances.d.ts +12 -6
  335. package/tools/license-key-instances/retrieve-license-key-instances.d.ts.map +1 -1
  336. package/tools/license-key-instances/retrieve-license-key-instances.js +5 -1
  337. package/tools/license-key-instances/retrieve-license-key-instances.js.map +1 -1
  338. package/tools/license-key-instances/retrieve-license-key-instances.mjs +2 -1
  339. package/tools/license-key-instances/retrieve-license-key-instances.mjs.map +1 -1
  340. package/tools/license-key-instances/update-license-key-instances.d.mts +12 -6
  341. package/tools/license-key-instances/update-license-key-instances.d.mts.map +1 -1
  342. package/tools/license-key-instances/update-license-key-instances.d.ts +12 -6
  343. package/tools/license-key-instances/update-license-key-instances.d.ts.map +1 -1
  344. package/tools/license-key-instances/update-license-key-instances.js +5 -1
  345. package/tools/license-key-instances/update-license-key-instances.js.map +1 -1
  346. package/tools/license-key-instances/update-license-key-instances.mjs +2 -1
  347. package/tools/license-key-instances/update-license-key-instances.mjs.map +1 -1
  348. package/tools/license-keys/list-license-keys.d.mts +12 -6
  349. package/tools/license-keys/list-license-keys.d.mts.map +1 -1
  350. package/tools/license-keys/list-license-keys.d.ts +12 -6
  351. package/tools/license-keys/list-license-keys.d.ts.map +1 -1
  352. package/tools/license-keys/list-license-keys.js +5 -1
  353. package/tools/license-keys/list-license-keys.js.map +1 -1
  354. package/tools/license-keys/list-license-keys.mjs +2 -1
  355. package/tools/license-keys/list-license-keys.mjs.map +1 -1
  356. package/tools/license-keys/retrieve-license-keys.d.mts +12 -6
  357. package/tools/license-keys/retrieve-license-keys.d.mts.map +1 -1
  358. package/tools/license-keys/retrieve-license-keys.d.ts +12 -6
  359. package/tools/license-keys/retrieve-license-keys.d.ts.map +1 -1
  360. package/tools/license-keys/retrieve-license-keys.js +5 -1
  361. package/tools/license-keys/retrieve-license-keys.js.map +1 -1
  362. package/tools/license-keys/retrieve-license-keys.mjs +2 -1
  363. package/tools/license-keys/retrieve-license-keys.mjs.map +1 -1
  364. package/tools/license-keys/update-license-keys.d.mts +12 -6
  365. package/tools/license-keys/update-license-keys.d.mts.map +1 -1
  366. package/tools/license-keys/update-license-keys.d.ts +12 -6
  367. package/tools/license-keys/update-license-keys.d.ts.map +1 -1
  368. package/tools/license-keys/update-license-keys.js +5 -1
  369. package/tools/license-keys/update-license-keys.js.map +1 -1
  370. package/tools/license-keys/update-license-keys.mjs +2 -1
  371. package/tools/license-keys/update-license-keys.mjs.map +1 -1
  372. package/tools/licenses/activate-licenses.d.mts +12 -6
  373. package/tools/licenses/activate-licenses.d.mts.map +1 -1
  374. package/tools/licenses/activate-licenses.d.ts +12 -6
  375. package/tools/licenses/activate-licenses.d.ts.map +1 -1
  376. package/tools/licenses/activate-licenses.js +5 -1
  377. package/tools/licenses/activate-licenses.js.map +1 -1
  378. package/tools/licenses/activate-licenses.mjs +2 -1
  379. package/tools/licenses/activate-licenses.mjs.map +1 -1
  380. package/tools/licenses/deactivate-licenses.d.mts +12 -6
  381. package/tools/licenses/deactivate-licenses.d.mts.map +1 -1
  382. package/tools/licenses/deactivate-licenses.d.ts +12 -6
  383. package/tools/licenses/deactivate-licenses.d.ts.map +1 -1
  384. package/tools/licenses/validate-licenses.d.mts +12 -6
  385. package/tools/licenses/validate-licenses.d.mts.map +1 -1
  386. package/tools/licenses/validate-licenses.d.ts +12 -6
  387. package/tools/licenses/validate-licenses.d.ts.map +1 -1
  388. package/tools/licenses/validate-licenses.js +5 -1
  389. package/tools/licenses/validate-licenses.js.map +1 -1
  390. package/tools/licenses/validate-licenses.mjs +2 -1
  391. package/tools/licenses/validate-licenses.mjs.map +1 -1
  392. package/tools/meters/archive-meters.d.mts +12 -6
  393. package/tools/meters/archive-meters.d.mts.map +1 -1
  394. package/tools/meters/archive-meters.d.ts +12 -6
  395. package/tools/meters/archive-meters.d.ts.map +1 -1
  396. package/tools/meters/create-meters.d.mts +12 -6
  397. package/tools/meters/create-meters.d.mts.map +1 -1
  398. package/tools/meters/create-meters.d.ts +12 -6
  399. package/tools/meters/create-meters.d.ts.map +1 -1
  400. package/tools/meters/create-meters.js +13 -1
  401. package/tools/meters/create-meters.js.map +1 -1
  402. package/tools/meters/create-meters.mjs +11 -2
  403. package/tools/meters/create-meters.mjs.map +1 -1
  404. package/tools/meters/list-meters.d.mts +12 -6
  405. package/tools/meters/list-meters.d.mts.map +1 -1
  406. package/tools/meters/list-meters.d.ts +12 -6
  407. package/tools/meters/list-meters.d.ts.map +1 -1
  408. package/tools/meters/list-meters.js +13 -1
  409. package/tools/meters/list-meters.js.map +1 -1
  410. package/tools/meters/list-meters.mjs +11 -2
  411. package/tools/meters/list-meters.mjs.map +1 -1
  412. package/tools/meters/retrieve-meters.d.mts +12 -6
  413. package/tools/meters/retrieve-meters.d.mts.map +1 -1
  414. package/tools/meters/retrieve-meters.d.ts +12 -6
  415. package/tools/meters/retrieve-meters.d.ts.map +1 -1
  416. package/tools/meters/retrieve-meters.js +13 -1
  417. package/tools/meters/retrieve-meters.js.map +1 -1
  418. package/tools/meters/retrieve-meters.mjs +11 -2
  419. package/tools/meters/retrieve-meters.mjs.map +1 -1
  420. package/tools/meters/unarchive-meters.d.mts +12 -6
  421. package/tools/meters/unarchive-meters.d.mts.map +1 -1
  422. package/tools/meters/unarchive-meters.d.ts +12 -6
  423. package/tools/meters/unarchive-meters.d.ts.map +1 -1
  424. package/tools/misc/list-supported-countries-misc.d.mts +12 -6
  425. package/tools/misc/list-supported-countries-misc.d.mts.map +1 -1
  426. package/tools/misc/list-supported-countries-misc.d.ts +12 -6
  427. package/tools/misc/list-supported-countries-misc.d.ts.map +1 -1
  428. package/tools/misc/list-supported-countries-misc.js +5 -1
  429. package/tools/misc/list-supported-countries-misc.js.map +1 -1
  430. package/tools/misc/list-supported-countries-misc.mjs +2 -1
  431. package/tools/misc/list-supported-countries-misc.mjs.map +1 -1
  432. package/tools/payments/create-payments.d.mts +12 -6
  433. package/tools/payments/create-payments.d.mts.map +1 -1
  434. package/tools/payments/create-payments.d.ts +12 -6
  435. package/tools/payments/create-payments.d.ts.map +1 -1
  436. package/tools/payments/create-payments.js +13 -1
  437. package/tools/payments/create-payments.js.map +1 -1
  438. package/tools/payments/create-payments.mjs +11 -2
  439. package/tools/payments/create-payments.mjs.map +1 -1
  440. package/tools/payments/list-payments.d.mts +12 -6
  441. package/tools/payments/list-payments.d.mts.map +1 -1
  442. package/tools/payments/list-payments.d.ts +12 -6
  443. package/tools/payments/list-payments.d.ts.map +1 -1
  444. package/tools/payments/list-payments.js +5 -1
  445. package/tools/payments/list-payments.js.map +1 -1
  446. package/tools/payments/list-payments.mjs +2 -1
  447. package/tools/payments/list-payments.mjs.map +1 -1
  448. package/tools/payments/retrieve-line-items-payments.d.mts +12 -6
  449. package/tools/payments/retrieve-line-items-payments.d.mts.map +1 -1
  450. package/tools/payments/retrieve-line-items-payments.d.ts +12 -6
  451. package/tools/payments/retrieve-line-items-payments.d.ts.map +1 -1
  452. package/tools/payments/retrieve-line-items-payments.js +5 -1
  453. package/tools/payments/retrieve-line-items-payments.js.map +1 -1
  454. package/tools/payments/retrieve-line-items-payments.mjs +2 -1
  455. package/tools/payments/retrieve-line-items-payments.mjs.map +1 -1
  456. package/tools/payments/retrieve-payments.d.mts +12 -6
  457. package/tools/payments/retrieve-payments.d.mts.map +1 -1
  458. package/tools/payments/retrieve-payments.d.ts +12 -6
  459. package/tools/payments/retrieve-payments.d.ts.map +1 -1
  460. package/tools/payments/retrieve-payments.js +13 -1
  461. package/tools/payments/retrieve-payments.js.map +1 -1
  462. package/tools/payments/retrieve-payments.mjs +11 -2
  463. package/tools/payments/retrieve-payments.mjs.map +1 -1
  464. package/tools/payouts/list-payouts.d.mts +12 -6
  465. package/tools/payouts/list-payouts.d.mts.map +1 -1
  466. package/tools/payouts/list-payouts.d.ts +12 -6
  467. package/tools/payouts/list-payouts.d.ts.map +1 -1
  468. package/tools/payouts/list-payouts.js +5 -1
  469. package/tools/payouts/list-payouts.js.map +1 -1
  470. package/tools/payouts/list-payouts.mjs +2 -1
  471. package/tools/payouts/list-payouts.mjs.map +1 -1
  472. package/tools/products/archive-products.d.mts +12 -6
  473. package/tools/products/archive-products.d.mts.map +1 -1
  474. package/tools/products/archive-products.d.ts +12 -6
  475. package/tools/products/archive-products.d.ts.map +1 -1
  476. package/tools/products/create-products.d.mts +12 -6
  477. package/tools/products/create-products.d.mts.map +1 -1
  478. package/tools/products/create-products.d.ts +12 -6
  479. package/tools/products/create-products.d.ts.map +1 -1
  480. package/tools/products/create-products.js +13 -1
  481. package/tools/products/create-products.js.map +1 -1
  482. package/tools/products/create-products.mjs +11 -2
  483. package/tools/products/create-products.mjs.map +1 -1
  484. package/tools/products/images/update-products-images.d.mts +12 -6
  485. package/tools/products/images/update-products-images.d.mts.map +1 -1
  486. package/tools/products/images/update-products-images.d.ts +12 -6
  487. package/tools/products/images/update-products-images.d.ts.map +1 -1
  488. package/tools/products/images/update-products-images.js +5 -1
  489. package/tools/products/images/update-products-images.js.map +1 -1
  490. package/tools/products/images/update-products-images.mjs +2 -1
  491. package/tools/products/images/update-products-images.mjs.map +1 -1
  492. package/tools/products/list-products.d.mts +12 -6
  493. package/tools/products/list-products.d.mts.map +1 -1
  494. package/tools/products/list-products.d.ts +12 -6
  495. package/tools/products/list-products.d.ts.map +1 -1
  496. package/tools/products/list-products.js +13 -1
  497. package/tools/products/list-products.js.map +1 -1
  498. package/tools/products/list-products.mjs +11 -2
  499. package/tools/products/list-products.mjs.map +1 -1
  500. package/tools/products/retrieve-products.d.mts +12 -6
  501. package/tools/products/retrieve-products.d.mts.map +1 -1
  502. package/tools/products/retrieve-products.d.ts +12 -6
  503. package/tools/products/retrieve-products.d.ts.map +1 -1
  504. package/tools/products/retrieve-products.js +13 -1
  505. package/tools/products/retrieve-products.js.map +1 -1
  506. package/tools/products/retrieve-products.mjs +11 -2
  507. package/tools/products/retrieve-products.mjs.map +1 -1
  508. package/tools/products/unarchive-products.d.mts +12 -6
  509. package/tools/products/unarchive-products.d.mts.map +1 -1
  510. package/tools/products/unarchive-products.d.ts +12 -6
  511. package/tools/products/unarchive-products.d.ts.map +1 -1
  512. package/tools/products/update-files-products.d.mts +12 -6
  513. package/tools/products/update-files-products.d.mts.map +1 -1
  514. package/tools/products/update-files-products.d.ts +12 -6
  515. package/tools/products/update-files-products.d.ts.map +1 -1
  516. package/tools/products/update-files-products.js +5 -1
  517. package/tools/products/update-files-products.js.map +1 -1
  518. package/tools/products/update-files-products.mjs +2 -1
  519. package/tools/products/update-files-products.mjs.map +1 -1
  520. package/tools/products/update-products.d.mts +12 -6
  521. package/tools/products/update-products.d.mts.map +1 -1
  522. package/tools/products/update-products.d.ts +12 -6
  523. package/tools/products/update-products.d.ts.map +1 -1
  524. package/tools/refunds/create-refunds.d.mts +12 -6
  525. package/tools/refunds/create-refunds.d.mts.map +1 -1
  526. package/tools/refunds/create-refunds.d.ts +12 -6
  527. package/tools/refunds/create-refunds.d.ts.map +1 -1
  528. package/tools/refunds/create-refunds.js +5 -1
  529. package/tools/refunds/create-refunds.js.map +1 -1
  530. package/tools/refunds/create-refunds.mjs +2 -1
  531. package/tools/refunds/create-refunds.mjs.map +1 -1
  532. package/tools/refunds/list-refunds.d.mts +12 -6
  533. package/tools/refunds/list-refunds.d.mts.map +1 -1
  534. package/tools/refunds/list-refunds.d.ts +12 -6
  535. package/tools/refunds/list-refunds.d.ts.map +1 -1
  536. package/tools/refunds/list-refunds.js +5 -1
  537. package/tools/refunds/list-refunds.js.map +1 -1
  538. package/tools/refunds/list-refunds.mjs +2 -1
  539. package/tools/refunds/list-refunds.mjs.map +1 -1
  540. package/tools/refunds/retrieve-refunds.d.mts +12 -6
  541. package/tools/refunds/retrieve-refunds.d.mts.map +1 -1
  542. package/tools/refunds/retrieve-refunds.d.ts +12 -6
  543. package/tools/refunds/retrieve-refunds.d.ts.map +1 -1
  544. package/tools/refunds/retrieve-refunds.js +5 -1
  545. package/tools/refunds/retrieve-refunds.js.map +1 -1
  546. package/tools/refunds/retrieve-refunds.mjs +2 -1
  547. package/tools/refunds/retrieve-refunds.mjs.map +1 -1
  548. package/tools/subscriptions/change-plan-subscriptions.d.mts +12 -6
  549. package/tools/subscriptions/change-plan-subscriptions.d.mts.map +1 -1
  550. package/tools/subscriptions/change-plan-subscriptions.d.ts +12 -6
  551. package/tools/subscriptions/change-plan-subscriptions.d.ts.map +1 -1
  552. package/tools/subscriptions/charge-subscriptions.d.mts +12 -6
  553. package/tools/subscriptions/charge-subscriptions.d.mts.map +1 -1
  554. package/tools/subscriptions/charge-subscriptions.d.ts +12 -6
  555. package/tools/subscriptions/charge-subscriptions.d.ts.map +1 -1
  556. package/tools/subscriptions/charge-subscriptions.js +5 -1
  557. package/tools/subscriptions/charge-subscriptions.js.map +1 -1
  558. package/tools/subscriptions/charge-subscriptions.mjs +2 -1
  559. package/tools/subscriptions/charge-subscriptions.mjs.map +1 -1
  560. package/tools/subscriptions/create-subscriptions.d.mts +12 -6
  561. package/tools/subscriptions/create-subscriptions.d.mts.map +1 -1
  562. package/tools/subscriptions/create-subscriptions.d.ts +12 -6
  563. package/tools/subscriptions/create-subscriptions.d.ts.map +1 -1
  564. package/tools/subscriptions/create-subscriptions.js +13 -1
  565. package/tools/subscriptions/create-subscriptions.js.map +1 -1
  566. package/tools/subscriptions/create-subscriptions.mjs +11 -2
  567. package/tools/subscriptions/create-subscriptions.mjs.map +1 -1
  568. package/tools/subscriptions/list-subscriptions.d.mts +12 -6
  569. package/tools/subscriptions/list-subscriptions.d.mts.map +1 -1
  570. package/tools/subscriptions/list-subscriptions.d.ts +12 -6
  571. package/tools/subscriptions/list-subscriptions.d.ts.map +1 -1
  572. package/tools/subscriptions/list-subscriptions.js +13 -1
  573. package/tools/subscriptions/list-subscriptions.js.map +1 -1
  574. package/tools/subscriptions/list-subscriptions.mjs +11 -2
  575. package/tools/subscriptions/list-subscriptions.mjs.map +1 -1
  576. package/tools/subscriptions/retrieve-subscriptions.d.mts +12 -6
  577. package/tools/subscriptions/retrieve-subscriptions.d.mts.map +1 -1
  578. package/tools/subscriptions/retrieve-subscriptions.d.ts +12 -6
  579. package/tools/subscriptions/retrieve-subscriptions.d.ts.map +1 -1
  580. package/tools/subscriptions/retrieve-subscriptions.js +13 -1
  581. package/tools/subscriptions/retrieve-subscriptions.js.map +1 -1
  582. package/tools/subscriptions/retrieve-subscriptions.mjs +11 -2
  583. package/tools/subscriptions/retrieve-subscriptions.mjs.map +1 -1
  584. package/tools/subscriptions/retrieve-usage-history-subscriptions.d.mts +12 -6
  585. package/tools/subscriptions/retrieve-usage-history-subscriptions.d.mts.map +1 -1
  586. package/tools/subscriptions/retrieve-usage-history-subscriptions.d.ts +12 -6
  587. package/tools/subscriptions/retrieve-usage-history-subscriptions.d.ts.map +1 -1
  588. package/tools/subscriptions/retrieve-usage-history-subscriptions.js +5 -1
  589. package/tools/subscriptions/retrieve-usage-history-subscriptions.js.map +1 -1
  590. package/tools/subscriptions/retrieve-usage-history-subscriptions.mjs +2 -1
  591. package/tools/subscriptions/retrieve-usage-history-subscriptions.mjs.map +1 -1
  592. package/tools/subscriptions/update-payment-method-subscriptions.d.mts +12 -6
  593. package/tools/subscriptions/update-payment-method-subscriptions.d.mts.map +1 -1
  594. package/tools/subscriptions/update-payment-method-subscriptions.d.ts +12 -6
  595. package/tools/subscriptions/update-payment-method-subscriptions.d.ts.map +1 -1
  596. package/tools/subscriptions/update-payment-method-subscriptions.js +5 -1
  597. package/tools/subscriptions/update-payment-method-subscriptions.js.map +1 -1
  598. package/tools/subscriptions/update-payment-method-subscriptions.mjs +2 -1
  599. package/tools/subscriptions/update-payment-method-subscriptions.mjs.map +1 -1
  600. package/tools/subscriptions/update-subscriptions.d.mts +12 -6
  601. package/tools/subscriptions/update-subscriptions.d.mts.map +1 -1
  602. package/tools/subscriptions/update-subscriptions.d.ts +12 -6
  603. package/tools/subscriptions/update-subscriptions.d.ts.map +1 -1
  604. package/tools/subscriptions/update-subscriptions.js +13 -1
  605. package/tools/subscriptions/update-subscriptions.js.map +1 -1
  606. package/tools/subscriptions/update-subscriptions.mjs +11 -2
  607. package/tools/subscriptions/update-subscriptions.mjs.map +1 -1
  608. package/tools/usage-events/ingest-usage-events.d.mts +12 -6
  609. package/tools/usage-events/ingest-usage-events.d.mts.map +1 -1
  610. package/tools/usage-events/ingest-usage-events.d.ts +12 -6
  611. package/tools/usage-events/ingest-usage-events.d.ts.map +1 -1
  612. package/tools/usage-events/ingest-usage-events.js +5 -1
  613. package/tools/usage-events/ingest-usage-events.js.map +1 -1
  614. package/tools/usage-events/ingest-usage-events.mjs +2 -1
  615. package/tools/usage-events/ingest-usage-events.mjs.map +1 -1
  616. package/tools/usage-events/list-usage-events.d.mts +12 -6
  617. package/tools/usage-events/list-usage-events.d.mts.map +1 -1
  618. package/tools/usage-events/list-usage-events.d.ts +12 -6
  619. package/tools/usage-events/list-usage-events.d.ts.map +1 -1
  620. package/tools/usage-events/list-usage-events.js +5 -1
  621. package/tools/usage-events/list-usage-events.js.map +1 -1
  622. package/tools/usage-events/list-usage-events.mjs +2 -1
  623. package/tools/usage-events/list-usage-events.mjs.map +1 -1
  624. package/tools/usage-events/retrieve-usage-events.d.mts +12 -6
  625. package/tools/usage-events/retrieve-usage-events.d.mts.map +1 -1
  626. package/tools/usage-events/retrieve-usage-events.d.ts +12 -6
  627. package/tools/usage-events/retrieve-usage-events.d.ts.map +1 -1
  628. package/tools/usage-events/retrieve-usage-events.js +5 -1
  629. package/tools/usage-events/retrieve-usage-events.js.map +1 -1
  630. package/tools/usage-events/retrieve-usage-events.mjs +2 -1
  631. package/tools/usage-events/retrieve-usage-events.mjs.map +1 -1
  632. package/tools/webhooks/create-webhooks.d.mts +12 -6
  633. package/tools/webhooks/create-webhooks.d.mts.map +1 -1
  634. package/tools/webhooks/create-webhooks.d.ts +12 -6
  635. package/tools/webhooks/create-webhooks.d.ts.map +1 -1
  636. package/tools/webhooks/create-webhooks.js +5 -1
  637. package/tools/webhooks/create-webhooks.js.map +1 -1
  638. package/tools/webhooks/create-webhooks.mjs +2 -1
  639. package/tools/webhooks/create-webhooks.mjs.map +1 -1
  640. package/tools/webhooks/delete-webhooks.d.mts +12 -6
  641. package/tools/webhooks/delete-webhooks.d.mts.map +1 -1
  642. package/tools/webhooks/delete-webhooks.d.ts +12 -6
  643. package/tools/webhooks/delete-webhooks.d.ts.map +1 -1
  644. package/tools/webhooks/headers/retrieve-webhooks-headers.d.mts +12 -6
  645. package/tools/webhooks/headers/retrieve-webhooks-headers.d.mts.map +1 -1
  646. package/tools/webhooks/headers/retrieve-webhooks-headers.d.ts +12 -6
  647. package/tools/webhooks/headers/retrieve-webhooks-headers.d.ts.map +1 -1
  648. package/tools/webhooks/headers/retrieve-webhooks-headers.js +5 -1
  649. package/tools/webhooks/headers/retrieve-webhooks-headers.js.map +1 -1
  650. package/tools/webhooks/headers/retrieve-webhooks-headers.mjs +2 -1
  651. package/tools/webhooks/headers/retrieve-webhooks-headers.mjs.map +1 -1
  652. package/tools/webhooks/headers/update-webhooks-headers.d.mts +12 -6
  653. package/tools/webhooks/headers/update-webhooks-headers.d.mts.map +1 -1
  654. package/tools/webhooks/headers/update-webhooks-headers.d.ts +12 -6
  655. package/tools/webhooks/headers/update-webhooks-headers.d.ts.map +1 -1
  656. package/tools/webhooks/list-webhooks.d.mts +12 -6
  657. package/tools/webhooks/list-webhooks.d.mts.map +1 -1
  658. package/tools/webhooks/list-webhooks.d.ts +12 -6
  659. package/tools/webhooks/list-webhooks.d.ts.map +1 -1
  660. package/tools/webhooks/list-webhooks.js +5 -1
  661. package/tools/webhooks/list-webhooks.js.map +1 -1
  662. package/tools/webhooks/list-webhooks.mjs +2 -1
  663. package/tools/webhooks/list-webhooks.mjs.map +1 -1
  664. package/tools/webhooks/retrieve-secret-webhooks.d.mts +12 -6
  665. package/tools/webhooks/retrieve-secret-webhooks.d.mts.map +1 -1
  666. package/tools/webhooks/retrieve-secret-webhooks.d.ts +12 -6
  667. package/tools/webhooks/retrieve-secret-webhooks.d.ts.map +1 -1
  668. package/tools/webhooks/retrieve-secret-webhooks.js +5 -1
  669. package/tools/webhooks/retrieve-secret-webhooks.js.map +1 -1
  670. package/tools/webhooks/retrieve-secret-webhooks.mjs +2 -1
  671. package/tools/webhooks/retrieve-secret-webhooks.mjs.map +1 -1
  672. package/tools/webhooks/retrieve-webhooks.d.mts +12 -6
  673. package/tools/webhooks/retrieve-webhooks.d.mts.map +1 -1
  674. package/tools/webhooks/retrieve-webhooks.d.ts +12 -6
  675. package/tools/webhooks/retrieve-webhooks.d.ts.map +1 -1
  676. package/tools/webhooks/retrieve-webhooks.js +5 -1
  677. package/tools/webhooks/retrieve-webhooks.js.map +1 -1
  678. package/tools/webhooks/retrieve-webhooks.mjs +2 -1
  679. package/tools/webhooks/retrieve-webhooks.mjs.map +1 -1
  680. package/tools/webhooks/update-webhooks.d.mts +12 -6
  681. package/tools/webhooks/update-webhooks.d.mts.map +1 -1
  682. package/tools/webhooks/update-webhooks.d.ts +12 -6
  683. package/tools/webhooks/update-webhooks.d.ts.map +1 -1
  684. package/tools/webhooks/update-webhooks.js +5 -1
  685. package/tools/webhooks/update-webhooks.js.map +1 -1
  686. package/tools/webhooks/update-webhooks.mjs +2 -1
  687. package/tools/webhooks/update-webhooks.mjs.map +1 -1
  688. package/code-tool-paths.cjs +0 -6
  689. package/code-tool-paths.cjs.map +0 -1
  690. package/code-tool-paths.d.cts +0 -2
  691. package/code-tool-paths.d.cts.map +0 -1
  692. package/code-tool-worker.d.mts +0 -5
  693. package/code-tool-worker.d.mts.map +0 -1
  694. package/code-tool-worker.d.ts +0 -5
  695. package/code-tool-worker.d.ts.map +0 -1
  696. package/code-tool-worker.js +0 -230
  697. package/code-tool-worker.js.map +0 -1
  698. package/code-tool-worker.mjs +0 -225
  699. package/code-tool-worker.mjs.map +0 -1
  700. package/src/code-tool-paths.cts +0 -3
  701. package/src/code-tool-worker.ts +0 -276
@@ -10,5 +10,7 @@ export type WorkerSuccess = {
10
10
  };
11
11
  export type WorkerError = {
12
12
  message: string | undefined;
13
+ logLines: string[];
14
+ errLines: string[];
13
15
  };
14
16
  //# sourceMappingURL=code-tool-types.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool-types.d.mts","sourceRoot":"","sources":["src/code-tool-types.ts"],"names":[],"mappings":"OAEO,EAAE,aAAa,EAAE,MAAM,cAAc;AAE5C,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AACF,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,WAAW,GAAG;IAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"code-tool-types.d.mts","sourceRoot":"","sources":["src/code-tool-types.ts"],"names":[],"mappings":"OAEO,EAAE,aAAa,EAAE,MAAM,cAAc;AAE5C,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AACF,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC"}
@@ -10,5 +10,7 @@ export type WorkerSuccess = {
10
10
  };
11
11
  export type WorkerError = {
12
12
  message: string | undefined;
13
+ logLines: string[];
14
+ errLines: string[];
13
15
  };
14
16
  //# sourceMappingURL=code-tool-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool-types.d.ts","sourceRoot":"","sources":["src/code-tool-types.ts"],"names":[],"mappings":"OAEO,EAAE,aAAa,EAAE,MAAM,cAAc;AAE5C,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AACF,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,WAAW,GAAG;IAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"code-tool-types.d.ts","sourceRoot":"","sources":["src/code-tool-types.ts"],"names":[],"mappings":"OAEO,EAAE,aAAa,EAAE,MAAM,cAAc;AAE5C,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AACF,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC"}
package/code-tool.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { Endpoint } from "./tools/types.mjs";
1
+ import { Metadata, ToolCallResult } from "./tools/types.mjs";
2
2
  /**
3
3
  * A tool that runs code against a copy of the SDK.
4
4
  *
@@ -8,5 +8,47 @@ import { Endpoint } from "./tools/types.mjs";
8
8
  *
9
9
  * @param endpoints - The endpoints to include in the list.
10
10
  */
11
- export declare function codeTool(): Promise<Endpoint>;
11
+ export declare function codeTool(): Promise<{
12
+ metadata: Metadata;
13
+ tool: {
14
+ inputSchema: {
15
+ [x: string]: unknown;
16
+ type: "object";
17
+ properties?: {
18
+ [x: string]: object;
19
+ } | undefined;
20
+ required?: string[] | undefined;
21
+ };
22
+ name: string;
23
+ description?: string | undefined;
24
+ outputSchema?: {
25
+ [x: string]: unknown;
26
+ type: "object";
27
+ properties?: {
28
+ [x: string]: object;
29
+ } | undefined;
30
+ required?: string[] | undefined;
31
+ } | undefined;
32
+ annotations?: {
33
+ title?: string | undefined;
34
+ readOnlyHint?: boolean | undefined;
35
+ destructiveHint?: boolean | undefined;
36
+ idempotentHint?: boolean | undefined;
37
+ openWorldHint?: boolean | undefined;
38
+ } | undefined;
39
+ execution?: {
40
+ taskSupport?: "optional" | "required" | "forbidden" | undefined;
41
+ } | undefined;
42
+ _meta?: {
43
+ [x: string]: unknown;
44
+ } | undefined;
45
+ icons?: {
46
+ src: string;
47
+ mimeType?: string | undefined;
48
+ sizes?: string[] | undefined;
49
+ }[] | undefined;
50
+ title?: string | undefined;
51
+ };
52
+ handler: (_: unknown, args: any) => Promise<ToolCallResult>;
53
+ }>;
12
54
  //# sourceMappingURL=code-tool.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool.d.mts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAKO,EAAgB,QAAQ,EAA4B;AAM3D;;;;;;;;GAQG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,CA+HlD"}
1
+ {"version":3,"file":"code-tool.d.mts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAE,cAAc,EAAuB;AAIxD;;;;;;;;GAQG;AACH,wBAAsB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQF,OAAO,QAAQ,GAAG,KAAG,OAAO,CAAC,cAAc,CAAC;GAqCvE"}
package/code-tool.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Endpoint } from "./tools/types.js";
1
+ import { Metadata, ToolCallResult } from "./tools/types.js";
2
2
  /**
3
3
  * A tool that runs code against a copy of the SDK.
4
4
  *
@@ -8,5 +8,47 @@ import { Endpoint } from "./tools/types.js";
8
8
  *
9
9
  * @param endpoints - The endpoints to include in the list.
10
10
  */
11
- export declare function codeTool(): Promise<Endpoint>;
11
+ export declare function codeTool(): Promise<{
12
+ metadata: Metadata;
13
+ tool: {
14
+ inputSchema: {
15
+ [x: string]: unknown;
16
+ type: "object";
17
+ properties?: {
18
+ [x: string]: object;
19
+ } | undefined;
20
+ required?: string[] | undefined;
21
+ };
22
+ name: string;
23
+ description?: string | undefined;
24
+ outputSchema?: {
25
+ [x: string]: unknown;
26
+ type: "object";
27
+ properties?: {
28
+ [x: string]: object;
29
+ } | undefined;
30
+ required?: string[] | undefined;
31
+ } | undefined;
32
+ annotations?: {
33
+ title?: string | undefined;
34
+ readOnlyHint?: boolean | undefined;
35
+ destructiveHint?: boolean | undefined;
36
+ idempotentHint?: boolean | undefined;
37
+ openWorldHint?: boolean | undefined;
38
+ } | undefined;
39
+ execution?: {
40
+ taskSupport?: "optional" | "required" | "forbidden" | undefined;
41
+ } | undefined;
42
+ _meta?: {
43
+ [x: string]: unknown;
44
+ } | undefined;
45
+ icons?: {
46
+ src: string;
47
+ mimeType?: string | undefined;
48
+ sizes?: string[] | undefined;
49
+ }[] | undefined;
50
+ title?: string | undefined;
51
+ };
52
+ handler: (_: unknown, args: any) => Promise<ToolCallResult>;
53
+ }>;
12
54
  //# sourceMappingURL=code-tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool.d.ts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAKO,EAAgB,QAAQ,EAA4B;AAM3D;;;;;;;;GAQG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,CA+HlD"}
1
+ {"version":3,"file":"code-tool.d.ts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAE,cAAc,EAAuB;AAIxD;;;;;;;;GAQG;AACH,wBAAsB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQF,OAAO,QAAQ,GAAG,KAAG,OAAO,CAAC,cAAc,CAAC;GAqCvE"}
package/code-tool.js CHANGED
@@ -1,42 +1,9 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || (function () {
20
- var ownKeys = function(o) {
21
- ownKeys = Object.getOwnPropertyNames || function (o) {
22
- var ar = [];
23
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
- return ar;
25
- };
26
- return ownKeys(o);
27
- };
28
- return function (mod) {
29
- if (mod && mod.__esModule) return mod;
30
- var result = {};
31
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
- __setModuleDefault(result, mod);
33
- return result;
34
- };
35
- })();
36
3
  Object.defineProperty(exports, "__esModule", { value: true });
37
4
  exports.codeTool = codeTool;
38
- const node_path_1 = require("node:path");
39
- const node_url_1 = require("node:url");
5
+ const types_1 = require("./tools/types.js");
6
+ const server_1 = require("./server.js");
40
7
  /**
41
8
  * A tool that runs code against a copy of the SDK.
42
9
  *
@@ -50,106 +17,34 @@ async function codeTool() {
50
17
  const metadata = { resource: 'all', operation: 'write', tags: [] };
51
18
  const tool = {
52
19
  name: 'execute',
53
- description: 'Runs JavaScript code to interact with the API.\n\nYou are a skilled programmer writing code to interface with the service.\nDefine an async function named "run" that takes a single parameter of an initialized client named "client", and it will be run.\nWrite code within this template:\n\n```\nasync function run(client) {\n // Fill this out\n}\n```\n\nYou will be returned anything that your function returns, plus the results of any console.log statements.\nIf any code triggers an error, the tool will return an error response, so you do not need to add error handling unless you want to output something more helpful than the raw error.\nIt is not necessary to add comments to code, unless by adding those comments you believe that you can generate better code.\nThis code will run in a container, and you will not be able to use fetch or otherwise interact with the network calls other than through the client you are given.\nAny variables you define won\'t live between successive uses of this call, so make sure to return or log any data you might need later.',
20
+ description: 'Runs JavaScript code to interact with the API.\n\nYou are a skilled programmer writing code to interface with the service.\nDefine an async function named "run" that takes a single parameter of an initialized SDK client and it will be run.\nWrite code within this template:\n\n```\nasync function run(client) {\n // Fill this out\n}\n```\n\nYou will be returned anything that your function returns, plus the results of any console.log statements.\nIf any code triggers an error, the tool will return an error response, so you do not need to add error handling unless you want to output something more helpful than the raw error.\nIt is not necessary to add comments to code, unless by adding those comments you believe that you can generate better code.\nThis code will run in a container, and you will not be able to use fetch or otherwise interact with the network calls other than through the client you are given.\nAny variables you define won\'t live between successive uses of this call, so make sure to return or log any data you might need later.',
54
21
  inputSchema: { type: 'object', properties: { code: { type: 'string' } } },
55
22
  };
56
- // Import dynamically to avoid failing at import time in cases where the environment is not well-supported.
57
- const { newDenoHTTPWorker } = await Promise.resolve().then(() => __importStar(require('@valtown/deno-http-worker')));
58
- const { workerPath } = await Promise.resolve().then(() => __importStar(require('./code-tool-paths.cjs')));
59
- const handler = async (client, args) => {
60
- const baseURLHostname = new URL(client.baseURL).hostname;
61
- const { code } = args;
62
- const worker = await newDenoHTTPWorker((0, node_url_1.pathToFileURL)(workerPath), {
63
- runFlags: [
64
- `--node-modules-dir=manual`,
65
- `--allow-read=code-tool-worker.mjs,${workerPath.replace(/([\/\\]node_modules)[\/\\].+$/, '$1')}/`,
66
- `--allow-net=${baseURLHostname}`,
67
- // Allow environment variables because instantiating the client will try to read from them,
68
- // even though they are not set.
69
- '--allow-env',
70
- ],
71
- printOutput: true,
72
- spawnOptions: {
73
- cwd: (0, node_path_1.dirname)(workerPath),
23
+ const handler = async (_, args) => {
24
+ const code = args.code;
25
+ // this is not required, but passing a Stainless API key for the matching project_name
26
+ // will allow you to run code-mode queries against non-published versions of your SDK.
27
+ const stainlessAPIKey = (0, server_1.readEnv)('STAINLESS_API_KEY');
28
+ const codeModeEndpoint = (0, server_1.readEnv)('CODE_MODE_ENDPOINT_URL') ?? 'https://api.stainless.com/api/ai/code-tool';
29
+ const res = await fetch(codeModeEndpoint, {
30
+ method: 'POST',
31
+ headers: {
32
+ ...(stainlessAPIKey && { Authorization: stainlessAPIKey }),
33
+ 'Content-Type': 'application/json',
34
+ client_envs: JSON.stringify({
35
+ DODO_PAYMENTS_API_KEY: (0, server_1.readEnv)('DODO_PAYMENTS_API_KEY'),
36
+ DODO_PAYMENTS_WEBHOOK_KEY: (0, server_1.readEnv)('DODO_PAYMENTS_WEBHOOK_KEY'),
37
+ }),
74
38
  },
39
+ body: JSON.stringify({
40
+ project_name: 'dodo-payments',
41
+ code,
42
+ }),
75
43
  });
76
- try {
77
- const resp = await new Promise((resolve, reject) => {
78
- worker.addEventListener('exit', (exitCode) => {
79
- reject(new Error(`Worker exited with code ${exitCode}`));
80
- });
81
- const opts = {
82
- baseURL: client.baseURL,
83
- bearerToken: client.bearerToken,
84
- webhookKey: client.webhookKey,
85
- defaultHeaders: {
86
- 'X-Stainless-MCP': 'true',
87
- },
88
- };
89
- const req = worker.request('http://localhost', {
90
- headers: {
91
- 'content-type': 'application/json',
92
- },
93
- method: 'POST',
94
- }, (resp) => {
95
- const body = [];
96
- resp.on('error', (err) => {
97
- reject(err);
98
- });
99
- resp.on('data', (chunk) => {
100
- body.push(chunk);
101
- });
102
- resp.on('end', () => {
103
- resolve(new Response(Buffer.concat(body).toString(), {
104
- status: resp.statusCode ?? 200,
105
- headers: resp.headers,
106
- }));
107
- });
108
- });
109
- const body = JSON.stringify({
110
- opts,
111
- code,
112
- });
113
- req.write(body, (err) => {
114
- if (err != null) {
115
- reject(err);
116
- }
117
- });
118
- req.end();
119
- });
120
- if (resp.status === 200) {
121
- const { result, logLines, errLines } = (await resp.json());
122
- const returnOutput = result == null ? null : ({
123
- type: 'text',
124
- text: typeof result === 'string' ? result : JSON.stringify(result),
125
- });
126
- const logOutput = logLines.length === 0 ?
127
- null
128
- : {
129
- type: 'text',
130
- text: logLines.join('\n'),
131
- };
132
- const errOutput = errLines.length === 0 ?
133
- null
134
- : {
135
- type: 'text',
136
- text: 'Error output:\n' + errLines.join('\n'),
137
- };
138
- return {
139
- content: [returnOutput, logOutput, errOutput].filter((block) => block !== null),
140
- };
141
- }
142
- else {
143
- const { message } = (await resp.json());
144
- return {
145
- content: message == null ? [] : [{ type: 'text', text: message }],
146
- isError: true,
147
- };
148
- }
149
- }
150
- finally {
151
- worker.terminate();
44
+ if (!res.ok) {
45
+ throw new Error(`${res.status}: ${res.statusText} error when trying to contact Code Tool server. Details: ${await res.text()}`);
152
46
  }
47
+ return (0, types_1.asTextContentResult)((await res.json()));
153
48
  };
154
49
  return { metadata, tool, handler };
155
50
  }
package/code-tool.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool.js","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBtF,4BA+HC;AAjJD,yCAAoC;AACpC,uCAAyC;AAQzC;;;;;;;;GAQG;AACI,KAAK,UAAU,QAAQ;IAC5B,MAAM,QAAQ,GAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IAC7E,MAAM,IAAI,GAA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EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;gBAC1D,cAAc,EAAE,kBAAkB;gBAClC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC;oBAC1B,qBAAqB,EAAE,IAAA,gBAAO,EAAC,uBAAuB,CAAC;oBACvD,yBAAyB,EAAE,IAAA,gBAAO,EAAC,2BAA2B,CAAC;iBAChE,CAAC;aACH;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACnB,YAAY,EAAE,eAAe;gBAC7B,IAAI;aACL,CAAC;SACH,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CACb,GAAG,GAAG,CAAC,MAAM,KACX,GAAG,CAAC,UACN,4DAA4D,MAAM,GAAG,CAAC,IAAI,EAAE,EAAE,CAC/E,CAAC;QACJ,CAAC;QAED,OAAO,IAAA,2BAAmB,EAAC,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAkB,CAAC,CAAC;IAClE,CAAC,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC"}
package/code-tool.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { dirname } from 'node:path';
3
- import { pathToFileURL } from 'node:url';
2
+ import { asTextContentResult } from "./tools/types.mjs";
3
+ import { readEnv } from "./server.mjs";
4
4
  /**
5
5
  * A tool that runs code against a copy of the SDK.
6
6
  *
@@ -14,106 +14,34 @@ export async function codeTool() {
14
14
  const metadata = { resource: 'all', operation: 'write', tags: [] };
15
15
  const tool = {
16
16
  name: 'execute',
17
- description: 'Runs JavaScript code to interact with the API.\n\nYou are a skilled programmer writing code to interface with the service.\nDefine an async function named "run" that takes a single parameter of an initialized client named "client", and it will be run.\nWrite code within this template:\n\n```\nasync function run(client) {\n // Fill this out\n}\n```\n\nYou will be returned anything that your function returns, plus the results of any console.log statements.\nIf any code triggers an error, the tool will return an error response, so you do not need to add error handling unless you want to output something more helpful than the raw error.\nIt is not necessary to add comments to code, unless by adding those comments you believe that you can generate better code.\nThis code will run in a container, and you will not be able to use fetch or otherwise interact with the network calls other than through the client you are given.\nAny variables you define won\'t live between successive uses of this call, so make sure to return or log any data you might need later.',
17
+ description: 'Runs JavaScript code to interact with the API.\n\nYou are a skilled programmer writing code to interface with the service.\nDefine an async function named "run" that takes a single parameter of an initialized SDK client and it will be run.\nWrite code within this template:\n\n```\nasync function run(client) {\n // Fill this out\n}\n```\n\nYou will be returned anything that your function returns, plus the results of any console.log statements.\nIf any code triggers an error, the tool will return an error response, so you do not need to add error handling unless you want to output something more helpful than the raw error.\nIt is not necessary to add comments to code, unless by adding those comments you believe that you can generate better code.\nThis code will run in a container, and you will not be able to use fetch or otherwise interact with the network calls other than through the client you are given.\nAny variables you define won\'t live between successive uses of this call, so make sure to return or log any data you might need later.',
18
18
  inputSchema: { type: 'object', properties: { code: { type: 'string' } } },
19
19
  };
20
- // Import dynamically to avoid failing at import time in cases where the environment is not well-supported.
21
- const { newDenoHTTPWorker } = await import('@valtown/deno-http-worker');
22
- const { workerPath } = await import('./code-tool-paths.cjs');
23
- const handler = async (client, args) => {
24
- const baseURLHostname = new URL(client.baseURL).hostname;
25
- const { code } = args;
26
- const worker = await newDenoHTTPWorker(pathToFileURL(workerPath), {
27
- runFlags: [
28
- `--node-modules-dir=manual`,
29
- `--allow-read=code-tool-worker.mjs,${workerPath.replace(/([\/\\]node_modules)[\/\\].+$/, '$1')}/`,
30
- `--allow-net=${baseURLHostname}`,
31
- // Allow environment variables because instantiating the client will try to read from them,
32
- // even though they are not set.
33
- '--allow-env',
34
- ],
35
- printOutput: true,
36
- spawnOptions: {
37
- cwd: dirname(workerPath),
20
+ const handler = async (_, args) => {
21
+ const code = args.code;
22
+ // this is not required, but passing a Stainless API key for the matching project_name
23
+ // will allow you to run code-mode queries against non-published versions of your SDK.
24
+ const stainlessAPIKey = readEnv('STAINLESS_API_KEY');
25
+ const codeModeEndpoint = readEnv('CODE_MODE_ENDPOINT_URL') ?? 'https://api.stainless.com/api/ai/code-tool';
26
+ const res = await fetch(codeModeEndpoint, {
27
+ method: 'POST',
28
+ headers: {
29
+ ...(stainlessAPIKey && { Authorization: stainlessAPIKey }),
30
+ 'Content-Type': 'application/json',
31
+ client_envs: JSON.stringify({
32
+ DODO_PAYMENTS_API_KEY: readEnv('DODO_PAYMENTS_API_KEY'),
33
+ DODO_PAYMENTS_WEBHOOK_KEY: readEnv('DODO_PAYMENTS_WEBHOOK_KEY'),
34
+ }),
38
35
  },
36
+ body: JSON.stringify({
37
+ project_name: 'dodo-payments',
38
+ code,
39
+ }),
39
40
  });
40
- try {
41
- const resp = await new Promise((resolve, reject) => {
42
- worker.addEventListener('exit', (exitCode) => {
43
- reject(new Error(`Worker exited with code ${exitCode}`));
44
- });
45
- const opts = {
46
- baseURL: client.baseURL,
47
- bearerToken: client.bearerToken,
48
- webhookKey: client.webhookKey,
49
- defaultHeaders: {
50
- 'X-Stainless-MCP': 'true',
51
- },
52
- };
53
- const req = worker.request('http://localhost', {
54
- headers: {
55
- 'content-type': 'application/json',
56
- },
57
- method: 'POST',
58
- }, (resp) => {
59
- const body = [];
60
- resp.on('error', (err) => {
61
- reject(err);
62
- });
63
- resp.on('data', (chunk) => {
64
- body.push(chunk);
65
- });
66
- resp.on('end', () => {
67
- resolve(new Response(Buffer.concat(body).toString(), {
68
- status: resp.statusCode ?? 200,
69
- headers: resp.headers,
70
- }));
71
- });
72
- });
73
- const body = JSON.stringify({
74
- opts,
75
- code,
76
- });
77
- req.write(body, (err) => {
78
- if (err != null) {
79
- reject(err);
80
- }
81
- });
82
- req.end();
83
- });
84
- if (resp.status === 200) {
85
- const { result, logLines, errLines } = (await resp.json());
86
- const returnOutput = result == null ? null : ({
87
- type: 'text',
88
- text: typeof result === 'string' ? result : JSON.stringify(result),
89
- });
90
- const logOutput = logLines.length === 0 ?
91
- null
92
- : {
93
- type: 'text',
94
- text: logLines.join('\n'),
95
- };
96
- const errOutput = errLines.length === 0 ?
97
- null
98
- : {
99
- type: 'text',
100
- text: 'Error output:\n' + errLines.join('\n'),
101
- };
102
- return {
103
- content: [returnOutput, logOutput, errOutput].filter((block) => block !== null),
104
- };
105
- }
106
- else {
107
- const { message } = (await resp.json());
108
- return {
109
- content: message == null ? [] : [{ type: 'text', text: message }],
110
- isError: true,
111
- };
112
- }
113
- }
114
- finally {
115
- worker.terminate();
41
+ if (!res.ok) {
42
+ throw new Error(`${res.status}: ${res.statusText} error when trying to contact Code Tool server. Details: ${await res.text()}`);
116
43
  }
44
+ return asTextContentResult((await res.json()));
117
45
  };
118
46
  return { metadata, tool, handler };
119
47
  }
package/code-tool.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool.mjs","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,OAAO,EAAE,MAAM,WAAW;OAC5B,EAAE,aAAa,EAAE,MAAM,UAAU;AAQxC;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ;IAC5B,MAAM,QAAQ,GAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IAC7E,MAAM,IAAI,GAAS;QACjB,IAAI,EAAE,SAAS;QACf,WAAW,EACT,6iCAA6iC;QAC/iC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;KAC1E,CAAC;IAEF,2GAA2G;IAC3G,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,2BAA2B,CAAC,CAAC;IACxE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC;IAE7D,MAAM,OAAO,GAAG,KA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,CAAC;YACZ,MAAM,IAAI,KAAK,CACb,GAAG,GAAG,CAAC,MAAM,KACX,GAAG,CAAC,UACN,4DAA4D,MAAM,GAAG,CAAC,IAAI,EAAE,EAAE,CAC/E,CAAC;QACJ,CAAC;QAED,OAAO,mBAAmB,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAkB,CAAC,CAAC;IAClE,CAAC,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC"}
@@ -6,37 +6,43 @@ export declare const handler: (_: unknown, args: Record<string, unknown> | undef
6
6
  declare const _default: {
7
7
  metadata: Metadata;
8
8
  tool: {
9
- [x: string]: unknown;
10
- name: string;
11
9
  inputSchema: {
12
10
  [x: string]: unknown;
13
11
  type: "object";
14
12
  properties?: {
15
- [x: string]: unknown;
13
+ [x: string]: object;
16
14
  } | undefined;
17
15
  required?: string[] | undefined;
18
16
  };
19
- title?: string | undefined;
17
+ name: string;
20
18
  description?: string | undefined;
21
19
  outputSchema?: {
22
20
  [x: string]: unknown;
23
21
  type: "object";
24
22
  properties?: {
25
- [x: string]: unknown;
23
+ [x: string]: object;
26
24
  } | undefined;
27
25
  required?: string[] | undefined;
28
26
  } | undefined;
29
27
  annotations?: {
30
- [x: string]: unknown;
31
28
  title?: string | undefined;
32
29
  readOnlyHint?: boolean | undefined;
33
30
  destructiveHint?: boolean | undefined;
34
31
  idempotentHint?: boolean | undefined;
35
32
  openWorldHint?: boolean | undefined;
36
33
  } | undefined;
34
+ execution?: {
35
+ taskSupport?: "optional" | "required" | "forbidden" | undefined;
36
+ } | undefined;
37
37
  _meta?: {
38
38
  [x: string]: unknown;
39
39
  } | undefined;
40
+ icons?: {
41
+ src: string;
42
+ mimeType?: string | undefined;
43
+ sizes?: string[] | undefined;
44
+ }[] | undefined;
45
+ title?: string | undefined;
40
46
  };
41
47
  handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./tools/types").ToolCallResult>;
42
48
  };
@@ -1 +1 @@
1
- {"version":3,"file":"docs-search-tool.d.mts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB;OAEjC,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA0BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,GAAG,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,oDAKlF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAL+B,OAAO,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAOnF,wBAA2C"}
1
+ {"version":3,"file":"docs-search-tool.d.mts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB;OAEjC,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA0BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,GAAG,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,oDAYlF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAZ+B,OAAO,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAcnF,wBAA2C"}
@@ -6,37 +6,43 @@ export declare const handler: (_: unknown, args: Record<string, unknown> | undef
6
6
  declare const _default: {
7
7
  metadata: Metadata;
8
8
  tool: {
9
- [x: string]: unknown;
10
- name: string;
11
9
  inputSchema: {
12
10
  [x: string]: unknown;
13
11
  type: "object";
14
12
  properties?: {
15
- [x: string]: unknown;
13
+ [x: string]: object;
16
14
  } | undefined;
17
15
  required?: string[] | undefined;
18
16
  };
19
- title?: string | undefined;
17
+ name: string;
20
18
  description?: string | undefined;
21
19
  outputSchema?: {
22
20
  [x: string]: unknown;
23
21
  type: "object";
24
22
  properties?: {
25
- [x: string]: unknown;
23
+ [x: string]: object;
26
24
  } | undefined;
27
25
  required?: string[] | undefined;
28
26
  } | undefined;
29
27
  annotations?: {
30
- [x: string]: unknown;
31
28
  title?: string | undefined;
32
29
  readOnlyHint?: boolean | undefined;
33
30
  destructiveHint?: boolean | undefined;
34
31
  idempotentHint?: boolean | undefined;
35
32
  openWorldHint?: boolean | undefined;
36
33
  } | undefined;
34
+ execution?: {
35
+ taskSupport?: "optional" | "required" | "forbidden" | undefined;
36
+ } | undefined;
37
37
  _meta?: {
38
38
  [x: string]: unknown;
39
39
  } | undefined;
40
+ icons?: {
41
+ src: string;
42
+ mimeType?: string | undefined;
43
+ sizes?: string[] | undefined;
44
+ }[] | undefined;
45
+ title?: string | undefined;
40
46
  };
41
47
  handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./tools/types").ToolCallResult>;
42
48
  };
@@ -1 +1 @@
1
- {"version":3,"file":"docs-search-tool.d.ts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB;OAEjC,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA0BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,GAAG,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,oDAKlF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAL+B,OAAO,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAOnF,wBAA2C"}
1
+ {"version":3,"file":"docs-search-tool.d.ts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB;OAEjC,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA0BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,GAAG,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,oDAYlF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAZ+B,OAAO,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAcnF,wBAA2C"}
@@ -41,6 +41,9 @@ const handler = async (_, args) => {
41
41
  const body = args;
42
42
  const query = new URLSearchParams(body).toString();
43
43
  const result = await fetch(`${docsSearchURL}?${query}`);
44
+ if (!result.ok) {
45
+ throw new Error(`${result.status}: ${result.statusText} when using doc search tool. Details: ${await result.text()}`);
46
+ }
44
47
  return (0, types_1.asTextContentResult)(await result.json());
45
48
  };
46
49
  exports.handler = handler;